Last change
on this file since 639 was
619,
checked in by pharms, 12 years ago
|
- adapted implementation to now generate a full GUI model as well as concrete GUI interaction events
|
File size:
1.5 KB
|
Rev | Line | |
---|
[619] | 1 |
|
---|
[434] | 2 | package de.ugoe.cs.quest.plugin.mfc;
|
---|
[1] | 3 |
|
---|
[619] | 4 | import de.ugoe.cs.quest.plugin.mfc.guimodel.WindowTree;
|
---|
[1] | 5 |
|
---|
[171] | 6 | /**
|
---|
| 7 | * <p>
|
---|
[619] | 8 | * Handler for {@code WM_DESTROY} message. The handler maintains the {@link WindowTree}.
|
---|
[171] | 9 | * </p>
|
---|
| 10 | *
|
---|
| 11 | * @author Steffen Herbold
|
---|
| 12 | * @version 1.0
|
---|
| 13 | */
|
---|
[1] | 14 | public class HandlerDestroy extends MessageHandler {
|
---|
| 15 |
|
---|
[619] | 16 | /**
|
---|
| 17 | * <p>
|
---|
| 18 | * Constructor. Creates a new HandlerDestroy.
|
---|
| 19 | * </p>
|
---|
| 20 | *
|
---|
| 21 | * @param windowTree
|
---|
| 22 | * the tree of GUI element specifications to be created and adapted during parsing
|
---|
| 23 | */
|
---|
| 24 | public HandlerDestroy(WindowTree windowTree) {
|
---|
| 25 | super(windowTree);
|
---|
| 26 | }
|
---|
[1] | 27 |
|
---|
[619] | 28 | /**
|
---|
| 29 | * <p>
|
---|
| 30 | * HWND of the window that is destroyed.
|
---|
| 31 | * </p>
|
---|
| 32 | */
|
---|
| 33 | private long hwnd;
|
---|
[171] | 34 |
|
---|
[619] | 35 | /*
|
---|
| 36 | * (non-Javadoc)
|
---|
| 37 | *
|
---|
| 38 | * @see de.ugoe.cs.quest.plugin.mfc.MessageHandler#onEndElement()
|
---|
| 39 | */
|
---|
| 40 | @Override
|
---|
| 41 | public void onEndElement() {
|
---|
| 42 | if (hwnd != 0) {
|
---|
| 43 | super.getWindowTree().remove(hwnd);
|
---|
| 44 | }
|
---|
| 45 | }
|
---|
[1] | 46 |
|
---|
[619] | 47 | /*
|
---|
| 48 | * (non-Javadoc)
|
---|
| 49 | *
|
---|
| 50 | * @see de.ugoe.cs.quest.plugin.mfc.MessageHandler#onParameter(java.lang.String ,
|
---|
| 51 | * java.lang.String)
|
---|
| 52 | */
|
---|
| 53 | @Override
|
---|
| 54 | public void onParameter(String name, String value) {
|
---|
| 55 | if (name.equals("window.hwnd")) {
|
---|
| 56 | hwnd = Long.parseLong(value);
|
---|
| 57 | }
|
---|
| 58 | }
|
---|
[1] | 59 |
|
---|
[619] | 60 | /*
|
---|
| 61 | * (non-Javadoc)
|
---|
| 62 | *
|
---|
| 63 | * @see de.ugoe.cs.quest.plugin.mfc.MessageHandler#onStartElement()
|
---|
| 64 | */
|
---|
| 65 | @Override
|
---|
| 66 | public void onStartElement() {
|
---|
| 67 | hwnd = 0;
|
---|
| 68 | }
|
---|
[1] | 69 |
|
---|
| 70 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.