#include <pgwindow.h>
Inheritance diagram for PG_Window:

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 std::string &windowtext=PG_NULLSTR, WindowFlags flags=DEFAULT, const std::string &style="Window", int heightTitlebar=25) | |
| Constructor for the PG_Window class. | |
| ~PG_Window () | |
| void | LoadThemeStyle (const std::string &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 std::string &title, PG_Label::TextAlign alignment=PG_Label::CENTER) |
| set window title and alignment | |
| void | SetText (const std::string &text) |
| Sets text. | |
| const PG_String & | GetTitle () |
| get window title | |
| const PG_String & | GetText () |
| Returns text. | |
| SDL_Surface * | GetIcon () |
| get window icon | |
| void | SetIcon (const std::string &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. | |
Definition at line 51 of file pgwindow.h.
|
|
Signal type declaration.
Definition at line 71 of file pgwindow.h. |
|
|
Definition at line 72 of file pgwindow.h. |
|
|
Definition at line 73 of file pgwindow.h. |
|
|
Definition at line 62 of file pgwindow.h. |
|
|
Definition at line 55 of file pgwindow.h. |
|
||||||||||||||||||||||||||||
|
Constructor for the PG_Window class.
Definition at line 34 of file pgwindow.cpp. References PG_Label::CENTER, PG_Widget::EnableReceiver(), handleButtonClick(), PG_Widget::Hide(), IDWINDOW_CLOSE, IDWINDOW_MINIMIZE, LoadThemeStyle(), PG_Rect::my_width, PG_Rect::PG_Rect(), PG_ThemeWidget::PG_ThemeWidget(), PG_Label::SetAlignment(), PG_Widget::SetID(), and PG_Button::sigClick. |
|
|
Definition at line 66 of file pgwindow.cpp. |
|
||||||||||||||||
|
overridable eventhandler to blit the widget contents to the screen
Reimplemented from PG_ThemeWidget. Definition at line 139 of file pgwindow.cpp. References PG_Widget::DrawBorder(), PG_ThemeWidget::eventBlit(), PG_Widget::my_bordersize, PG_Rect::my_height, PG_Rect::my_width, PG_Rect::my_xpos, and PG_Rect::my_ypos. |
|
|
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. Definition at line 154 of file pgwindow.cpp. References PG_Rect::my_height, PG_Rect::my_width, PG_Rect::my_xpos, PG_Rect::my_ypos, PG_MessageObject::SetCapture(), PG_Widget::Show(), PG_Point::x, and PG_Point::y. |
|
|
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. Reimplemented in WeaponInfoPanel. Definition at line 182 of file pgwindow.cpp. References PG_Application::GetScreen(), PG_Rect::my_height, PG_Rect::my_width, PG_MessageObject::ReleaseCapture(), screen, PG_Point::x, and PG_Point::y. Referenced by WeaponInfoPanel::eventMouseButtonUp(). |
|
|
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. Reimplemented in WeaponInfoPanel. Definition at line 210 of file pgwindow.cpp. References PG_MessageObject::eventMouseMotion(), PG_Widget::GetParent(), PG_Application::GetScreen(), PG_Widget::MoveWidget(), PG_Rect::my_height, PG_Rect::my_width, screen, PG_Point::x, and PG_Point::y. |
|
||||||||||||
|
Callback for the SizeWidget event.
Reimplemented from PG_ThemeWidget. Definition at line 129 of file pgwindow.cpp. References PG_ThemeWidget::eventSizeWidget(), PG_Rect::my_height, PG_Rect::my_width, and RecalcPositions(). |
|
|
get window icon
Definition at line 283 of file pgwindow.cpp. References PG_Label::GetIcon(). |
|
|
Returns text.
Reimplemented from PG_Widget. Definition at line 77 of file pgwindow.cpp. References PG_Widget::GetText(). Referenced by GetTitle(). |
|
|
get window title
Definition at line 81 of file pgwindow.cpp. References GetText(). |
|
|
get window title
Definition at line 271 of file pgwindow.cpp. References PG_Widget::GetFontColor(). |
|
|
get window titlebar height
Definition at line 292 of file pgwindow.cpp. Referenced by AdminGameWindow::AdminGameWindow(), AuthenticationDialog::AuthenticationDialog(), BitMapEditor::BitMapEditor(), EditGameOptions::EditGameOptions(), EditMapParameters::EditMapParameters(), FileSelectionWindow::FileSelectionWindow(), ItemSelectorWindow::ItemSelectorWindow(), MessageSelectionWindow::MessageSelectionWindow(), VehicleProduction_SelectionWindow::VehicleProduction_SelectionWindow(), and WeaponInfoPanel::WeaponInfoPanel(). |
|
|
Reimplemented in ChooseTech. Definition at line 246 of file pgwindow.cpp. References PG_Widget::GetID(), PG_Widget::Hide(), IDWINDOW_CLOSE, IDWINDOW_MINIMIZE, PG_Widget::QuitModal(), sigClose, and sigMinimize. Referenced by ChooseTech::handleButtonClick(), and PG_Window(). |
|
|
Load a specific themestyle.
Reimplemented from PG_ThemeWidget. Reimplemented in MessageDialog, and PG_MessageBox. Definition at line 100 of file pgwindow.cpp. References PG_Theme::GetColor(), PG_Widget::GetFontColor(), PG_Theme::GetProperty(), PG_Application::GetTheme(), PG_Button::LoadThemeStyle(), PG_ThemeWidget::LoadThemeStyle(), RecalcPositions(), SetTitlebarColor(), and PG_Widget::Show(). Referenced by PG_MessageBox::LoadThemeStyle(), MessageDialog::LoadThemeStyle(), and PG_Window(). |
|
|
Definition at line 85 of file pgwindow.cpp. References PG_Widget::MoveWidget(), PG_Rect::my_width, PG_Rect::PG_Rect(), and PG_Widget::SizeWidget(). Referenced by eventSizeWidget(), LoadThemeStyle(), and SetTitlebarHeight(). |
|
|
set window icon
Definition at line 279 of file pgwindow.cpp. References PG_Label::SetIcon(). |
|
|
set window icon
Definition at line 275 of file pgwindow.cpp. References PG_Label::SetIcon(). |
|
|
Make window handle / ignore dragging.
Definition at line 296 of file pgwindow.cpp. |
|
|
Sets text.
Reimplemented from PG_Widget. Definition at line 68 of file pgwindow.cpp. References PG_Widget::SetText(). Referenced by SetTitle(). |
|
||||||||||||
|
set window title and alignment
Definition at line 72 of file pgwindow.cpp. References PG_Label::SetAlignment(), and SetText(). Referenced by FileSelectionWindow::FileSelectionWindow(), and ASCGUI_Window::setup(). |
|
|
set window titlebar color
Definition at line 267 of file pgwindow.cpp. References PG_Widget::SetFontColor(). Referenced by LoadThemeStyle(), and SetWindowAtts(). |
|
|
set window titlebar height
Definition at line 287 of file pgwindow.cpp. References RecalcPositions(). Referenced by ASCGUI_Window::setup(). |
|
|
|
Definition at line 156 of file pgwindow.h. Referenced by handleButtonClick(). |
|
|
Definition at line 157 of file pgwindow.h. |
1.4.2