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