Creates a window entirely inside ParaGUI. This window can be modal or non-modal. Non-modal windows can be brought in front of others by clicking the titlebar.
Public Types | |
typedef PG_Signal1< PG_Window * > | SignalWindowClose |
Signal type declaration. | |
typedef PG_Signal1< PG_Window * > | SignalWindowMinimize |
typedef PG_Signal1< PG_Window * > | SignalWindowRestore |
enum | WindowFlags { MODAL = 0x01, SHOW_CLOSE = 0x02, SHOW_MINIMIZE = 0x04, DEFAULT = SHOW_CLOSE } |
enum | { IDWINDOW_CLOSE = PG_WIDGETID_INTERNAL + 14, IDWINDOW_MINIMIZE = PG_WIDGETID_INTERNAL + 15, IDWINDOW_RESTORE = PG_WIDGETID_INTERNAL + 15 } |
Public Member Functions | |
PG_Window (PG_Widget *parent, const PG_Rect &r=PG_Rect::null, const char *windowtext=NULL, WindowFlags flags=DEFAULT, const char *style="Window", int heightTitlebar=25) | |
~PG_Window () | |
void | LoadThemeStyle (const char *widgettype) |
Load a specific themestyle. | |
void | SetColorTitlebar (const PG_Color &c) |
void | SetTitle (const char *title, PG_Label::TextAlign alignment=PG_Label::CENTER) |
set window title and alignment | |
const char * | GetTitle () |
get window title | |
SDL_Surface * | GetIcon () |
get window icon | |
void | SetIcon (const char *filename) |
void | SetIcon (SDL_Surface *icon) |
Public Attributes | |
SignalWindowClose | sigClose |
SignalWindowMinimize | sigMinimize |
SignalWindowRestore | sigRestore |
Protected Member Functions | |
void | eventShow () |
overridable eventhandler called whenever the widget gets shown. | |
void | eventBlit (SDL_Surface *surface, const PG_Rect &src, const PG_Rect &dst) |
overridable eventhandler to blit the widget contents to the screen | |
void | eventSizeWidget (Uint16 w, Uint16 h) |
Callback for the SizeWidget event. | |
bool | handleButtonClick (PG_Button *button) |
bool | eventMouseButtonDown (const SDL_MouseButtonEvent *button) |
Overridable Eventhandler for a SDL_MouseButtonEvent message. | |
bool | eventMouseButtonUp (const SDL_MouseButtonEvent *button) |
Overridable Eventhandler for a SDL_MouseButtonEvent message. | |
bool | eventMouseMotion (const SDL_MouseMotionEvent *motion) |
Overridable Eventhandler for a SDL_MouseMotionEvent message. |
|
Signal type declaration.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
overridable eventhandler to blit the widget contents to the screen
Reimplemented from PG_ThemeWidget. |
|
Overridable Eventhandler for a SDL_MouseButtonEvent message. This handler is called when a mouse button is pressed. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented from PG_MessageObject. |
|
Overridable Eventhandler for a SDL_MouseButtonEvent message. This handler is called when a mouse button is released. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented from PG_MessageObject. |
|
Overridable Eventhandler for a SDL_MouseMotionEvent message. This handler is called when mouse movement is detected. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented from PG_MessageObject. |
|
overridable eventhandler called whenever the widget gets shown.
Reimplemented from PG_Widget. |
|
Callback for the SizeWidget event.
Reimplemented from PG_ThemeWidget. |
|
get window icon
|
|
get window title
|
|
|
|
Load a specific themestyle.
Reimplemented from PG_ThemeWidget. Reimplemented in PG_MessageBox. |
|
|
|
|
|
|
|
set window title and alignment
|
|
|
|
|
|
|