watch for close button actions with all registered XWinManaged windows More...
#include <GUI/XWinManaged.H>
Public Member Functions | |
void | add (XWinManaged *win) |
add a window to the list by pointer | |
void | add (XWinManaged &win) |
add a window to the list by reference | |
void | remove (XWinManaged *win) |
remove a window from the list by pointer | |
void | remove (XWinManaged &win) |
remove a window from the list by reference | |
bool | pressedAnyCloseButton () |
has a close button been pressed at any of the windows? | |
void | waitForClose () |
wait for a close button to be pressed |
watch for close button actions with all registered XWinManaged windows
Definition at line 178 of file XWinManaged.H.
void CloseButtonListener::add | ( | XWinManaged & | win | ) | [inline] |
add a window to the list by reference
Definition at line 215 of file XWinManaged.H.
References add().
void CloseButtonListener::add | ( | XWinManaged * | win | ) | [inline] |
add a window to the list by pointer
Definition at line 212 of file XWinManaged.H.
bool CloseButtonListener::pressedAnyCloseButton | ( | ) | [inline] |
has a close button been pressed at any of the windows?
This function will seg fault if the list contains pointers to windows that don't exist anymore. Make sure that you remove windows from the CloseButtonListener before you explicitely delete them!
Definition at line 230 of file XWinManaged.H.
Referenced by main(), and waitForClose().
void CloseButtonListener::remove | ( | XWinManaged & | win | ) | [inline] |
remove a window from the list by reference
Definition at line 226 of file XWinManaged.H.
void CloseButtonListener::remove | ( | XWinManaged * | win | ) | [inline] |
remove a window from the list by pointer
Definition at line 219 of file XWinManaged.H.
void CloseButtonListener::waitForClose | ( | ) | [inline] |
wait for a close button to be pressed
run in an idle loop until a close button is pressed
Definition at line 238 of file XWinManaged.H.
References pressedAnyCloseButton().