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) | |
Constructor for the PG_Window class. | |
~PG_Window () | |
void | LoadThemeStyle (const char *widgettype) |
Load a specific themestyle. | |
void | SetTitlebarColor (const PG_Color &c) |
set window titlebar color | |
PG_Color | GetTitlebarColor () |
get window title | |
void | SetTitlebarHeight (Uint8 height) |
set window titlebar height | |
Uint8 | GetTitlebarHeight () |
get window titlebar height | |
void | SetTitle (const char *title, PG_Label::TextAlign alignment=PG_Label::CENTER) |
set window title and alignment | |
void | SetText (const char *text) |
Sets text. | |
const char * | GetTitle () |
get window title | |
const char * | GetText () |
Returns text. | |
SDL_Surface * | GetIcon () |
get window icon | |
void | SetIcon (const char *filename) |
set window icon | |
void | SetIcon (SDL_Surface *icon) |
set window icon | |
void | SetMoveable (bool moveable=true) |
Make window handle / ignore dragging. | |
Public Attributes | |
SignalWindowClose | sigClose |
SignalWindowMinimize | sigMinimize |
SignalWindowRestore | sigRestore |
Protected Member Functions | |
void | RecalcPositions () |
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. | |
virtual 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.
|
|
|
|
|
|
|
|
|
|
Constructor for the PG_Window class.
|
|
|
|
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. |
|
Callback for the SizeWidget event.
Reimplemented from PG_ThemeWidget. |
|
get window icon
|
|
Returns text.
Reimplemented from PG_Widget. |
|
get window title
|
|
get window title
|
|
get window titlebar height
|
|
|
|
Load a specific themestyle.
Reimplemented from PG_ThemeWidget. Reimplemented in PG_MessageBox. |
|
|
|
set window icon
|
|
set window icon
|
|
Make window handle / ignore dragging.
|
|
Sets text.
Reimplemented from PG_Widget. |
|
set window title and alignment
|
|
set window titlebar color
|
|
set window titlebar height
|
|
|
|
|
|
|