An actual decorated window. More...
#include <gui_tk.h>
Public Member Functions | |
template<typename STR > | |
ToplevelWindow (Screen *parent, int x, int y, int w, int h, const STR title) | |
Create a new GUI Frame with title bar, border and close button. | |
~ToplevelWindow () | |
Call cleanup handlers. | |
virtual void | actionExecuted (ActionEventSource *src, const String &item) |
Menu callback function. | |
void | addCloseHandler (ToplevelWindow_Callback *handler) |
Add a window event handler. | |
void | removeCloseHandler (ToplevelWindow_Callback *handler) |
Remove a window event handler. | |
virtual void | paint (Drawable &d) const |
Draw this window's content. | |
virtual bool | mouseDown (int x, int y, MouseButton button) |
Mouse was pressed. Returns true if event was handled. | |
virtual bool | mouseDoubleClicked (int x, int y, MouseButton button) |
Mouse was double-clicked. Returns true if event was handled. | |
virtual bool | mouseUp (int x, int y, MouseButton button) |
Mouse was released. Returns true if event was handled. | |
virtual bool | mouseDragged (int x, int y, MouseButton button) |
Mouse was moved while a button was pressed. Returns true if event was handled. | |
virtual bool | mouseMoved (int x, int y) |
Mouse was moved. Returns true if event was handled. | |
virtual bool | raise () |
Put window on top of all other windows without changing their relative order. | |
template<typename STR > | |
void | setTitle (const STR title) |
Set a new title. | |
const String & | getTitle () |
Retrieve current title. | |
void | close () |
Close window. | |
Protected Attributes | |
String | title |
Title text. | |
int | dragx |
Drag base. | |
int | dragy |
std::list < ToplevelWindow_Callback * > | closehandlers |
List of registered event handlers. | |
Menu * | systemMenu |
System menu (top left) |