PixelLightAPI
.
|
#include <Widget.h>
Public Member Functions | |
PLGUI_API | Widget (Widget *pParent=nullptr, bool bManaged=false) |
Constructor. | |
PLGUI_API | Widget (PLCore::handle nNativeWindowHandle) |
Constructor. | |
virtual PLGUI_API | ~Widget () |
Destructor. | |
PLGUI_API Gui * | GetGui () const |
Get owner GUI. | |
PLGUI_API WidgetImpl * | GetImpl () const |
Get implementation. | |
PLGUI_API PLCore::handle | GetNativeWindowHandle () const |
Get system native window handle. | |
PLGUI_API PLCore::uint32 | GetID () const |
Get ID. | |
PLGUI_API void | SetID (PLCore::uint32 nID) |
Set ID. | |
PLGUI_API PLCore::String | GetName () const |
Get name. | |
PLGUI_API void | SetName (const PLCore::String &sName) |
Set name. | |
PLGUI_API PLCore::String | GetDescriptor () const |
Get descriptor. | |
PLGUI_API void * | GetUserData () const |
Get user defined data. | |
PLGUI_API void | SetUserData (void *pData) |
Set user defined data. | |
PLGUI_API bool | IsManaged () const |
Get whether or not the widget is managed. | |
PLGUI_API PLCore::String | GetTitle () const |
Get title. | |
PLGUI_API void | SetTitle (const PLCore::String &sTitle) |
Set title. | |
PLGUI_API const Image & | GetIcon () const |
Get icon. | |
PLGUI_API void | SetIcon (const Image &cIcon) |
Set icon. | |
PLGUI_API const Cursor & | GetCursor () const |
Get cursor. | |
PLGUI_API void | SetCursor (const Cursor &cCursor) |
Set cursor. | |
PLGUI_API Widget * | GetParent () const |
Get parent widget. | |
PLGUI_API Widget * | GetCommonParent (const Widget &cWidget) const |
Get common parent of this and another widget. | |
PLGUI_API Widget * | GetTopLevelWidget () const |
Get top level widget that is parent of this widget. | |
virtual PLGUI_API Widget * | GetContentWidget () const |
Get content widget. | |
PLGUI_API const PLCore::List < Widget * > & | GetChildren () const |
Get list of children. | |
PLGUI_API Widget * | GetFirstChild () const |
Get first child widget. | |
PLGUI_API Widget * | GetLastChild () const |
Get last child widget. | |
PLGUI_API Widget * | GetPreviousSibling () const |
Get previous sibling widget. | |
PLGUI_API Widget * | GetNextSibling () const |
Get next sibling widget. | |
PLGUI_API bool | IsTopLevel () const |
Check if widget is a top level window. | |
PLGUI_API bool | IsShowInTaskbar () const |
Check if widget is visible in the taskbar. | |
PLGUI_API void | SetShowInTaskbar (bool bShowInTaskbar) |
Set if widget is visible in the taskbar. | |
PLGUI_API Screen * | GetScreen () const |
Get screen the widget is on. | |
PLGUI_API void | MoveToScreen (Screen &cScreen) |
Move widget to another screen. | |
PLGUI_API PLMath::Vector2i | GetPos () const |
Get widget position. | |
PLGUI_API void | SetPos (const PLMath::Vector2i &vPos) |
Set widget position. | |
PLGUI_API PLMath::Vector2i | GetSize () const |
Get widget size. | |
PLGUI_API void | SetSize (const PLMath::Vector2i &vSize) |
Set widget size. | |
PLGUI_API bool | GetTopmost () const |
Check if widget is topmost (always above all other widgets) | |
PLGUI_API void | SetTopmost (bool bTopmost) |
Set if widget is topmost (always above all other widgets) | |
PLGUI_API PLMath::Vector2i | GetAbsPos () const |
Get absolute widget position. | |
PLGUI_API PLMath::Vector2i | GetRelativePos (Widget &cWidget) const |
Get position relative to another widget. | |
PLGUI_API void | Center (ECenter nCenter) |
Center widget. | |
PLGUI_API void | CenterOnScreen (Screen &cScreen) |
Center widget relative to the screen. | |
PLGUI_API void | CenterOnWidget (Widget &cWidget) |
Center widget relative to another widget. | |
PLGUI_API void | CalculatePreferredSize (const PLMath::Vector2i &vRefSize=PLMath::Vector2i(-1,-1)) |
Calculate preferred size. | |
PLGUI_API PLMath::Vector2i | GetPreferredSize () const |
Get preferred size. | |
PLGUI_API void | FitSize () |
Set size of widget to fit it's content. | |
PLGUI_API void | SetZPos (EZPos nZPos, Widget *pWidget=nullptr) |
Set Z position. | |
PLGUI_API EWindowState | GetWindowState () const |
Get window state. | |
PLGUI_API void | SetWindowState (EWindowState nWindowState) |
Set window state. | |
PLGUI_API PLGraphics::Color4 | GetBackgroundColor () const |
Get background color. | |
PLGUI_API void | SetBackgroundColor (const PLGraphics::Color4 &cColor) |
Set background color. | |
PLGUI_API void | SetTransparency (ETransparency nTransparency, const PLGraphics::Color4 &cColor) |
Set transparency mode. | |
PLGUI_API void | Close () |
Close widget. | |
PLGUI_API bool | IsDestroyed () const |
Check if widget has been destroyed. | |
PLGUI_API void | Destroy () |
Destroy widget. | |
PLGUI_API bool | IsVisible () const |
Check if widget is visible. | |
PLGUI_API void | SetVisible (bool bVisible) |
Show or hide widget. | |
PLGUI_API bool | IsEnabled () const |
Check if widget is enabled. | |
PLGUI_API void | SetEnabled (bool bEnabled) |
Enable or disable widget. | |
PLGUI_API EFocusStyle | GetFocusStyle () const |
Get focus style. | |
PLGUI_API void | SetFocusStyle (EFocusStyle nFocusStyle) |
Set focus style. | |
PLGUI_API bool | CanAcceptFocus () const |
Check if widget can accept the focus. | |
PLGUI_API bool | IsTabStop () |
Get tab-stop. | |
PLGUI_API void | SetTabStop (bool bTabStop) |
Set tab-stop. | |
PLGUI_API bool | HasFocus () const |
Check if widget has the focus. | |
PLGUI_API bool | SetFocus () |
Set keyboard focus to the widget. | |
PLGUI_API bool | IsActive () const |
Check if widget is active (either the widget or one of it's children has the focus) | |
PLGUI_API void | Activate () |
Activate a widget (bring it to the top and set the focus to it) | |
PLGUI_API bool | NextTabStop (bool bForward) |
Give keyboard focus to next tab-stop widget. | |
PLGUI_API bool | IsMouseIn () const |
Check if the mouse is currently inside the widget. | |
PLGUI_API bool | IsMouseOver () const |
Check if the mouse is currently over either the widget or one of it's child widgets. | |
PLGUI_API bool | GetMousePos (PLMath::Vector2i &vPos) const |
Get current mouse cursor position inside the widget. | |
virtual PLGUI_API PLCore::uint32 | GetWidgetState () const |
Get widget state. | |
PLGUI_API void | Redraw () |
Redraw widget. | |
PLGUI_API void | RedrawAll () |
Redraw widget and all child widgets. | |
PLGUI_API bool | IsCaptureMouse () const |
Check if widget has captured mouse input. | |
PLGUI_API void | SetCaptureMouse (bool bCapture) |
Capture mouse input. | |
PLGUI_API void | SetTrapMouse (bool bTrap) |
Trap mouse inside the widget. | |
PLGUI_API PLCore::uint32 | RegisterHotkey (PLCore::uint32 nModKey, PLCore::uint32 nKey) |
Register a hotkey. | |
PLGUI_API void | UnregisterHotkey (PLCore::uint32 nID) |
Unregister a hotkey. | |
PLGUI_API Theme * | GetTheme () const |
Get theme. | |
PLGUI_API void | SetTheme (Theme *pTheme) |
Set theme. | |
PLGUI_API const PLCore::List < Modifier * > & | GetModifiers () const |
Get modifiers. | |
PLGUI_API Modifier * | GetModifier (const PLCore::String &sName) const |
Get modifier. | |
PLGUI_API void | AddModifier (Modifier *pModifier) |
Add modifier. | |
PLGUI_API void | AddModifier (const PLCore::String &sName, Modifier *pModifier) |
Add modifier. | |
PLGUI_API void | AddModifier (const PLCore::String &sClass, const PLCore::String &sOptions) |
Add modifier. | |
PLGUI_API void | AddModifier (const PLCore::String &sName, const PLCore::String &sClass, const PLCore::String &sOptions) |
Add modifier. | |
PLGUI_API void | RemoveModifier (Modifier *pModifier) |
Remove modifier. | |
PLGUI_API void | RemoveModifier (const PLCore::String &sName) |
Remove modifier. | |
PLGUI_API Layout * | GetLayout () const |
Get layout. | |
PLGUI_API void | SetLayout (Layout *pLayout) |
Set layout. | |
PLGUI_API void | SetLayout (const PLCore::String &sClass, const PLCore::String &sOptions) |
Set layout. | |
PLGUI_API LayoutHints & | GetLayoutHints () |
Get layout hints. | |
PLGUI_API void | AdjustContent () |
Adjust content of the widget. | |
PLGUI_API void | UpdateContent () |
Update content. | |
Protected Member Functions | |
PLGUI_API | Widget (Gui *pGui) |
Constructor. | |
PLGUI_API void | AddChild (Widget *pWidget) |
Add child widget. | |
PLGUI_API void | RemoveChild (Widget *pWidget) |
Remove child widget. | |
PLGUI_API bool | ActivateFirstTabStop () |
Give focus to first tab-stop widget (including this and all children) | |
PLGUI_API bool | ActivateLastTabStop () |
Give focus to last tab-stop widget (including this and all children) | |
PLGUI_API void | DrawBackground (Graphics &cGraphics) |
Draw background. | |
PLGUI_API void | Draw (Graphics &cGraphics) |
Draw widget. | |
virtual PLGUI_API void | OnMessage (const GuiMessage &cMessage) override |
Process GUI message. | |
virtual PLGUI_API PLMath::Vector2i | OnPreferredSize (const PLMath::Vector2i &vRefSize) const override |
Called when the widget is to calculate it's preferred size. | |
virtual PLGUI_API void | OnThemeChanged () override |
Called when the theme has been changed. | |
virtual PLGUI_API void | OnUpdateContent () override |
Called when the widget has been changed. | |
virtual PLGUI_API void | OnAdjustContent () override |
Called when the widget content has to be adjusted. | |
Protected Attributes | |
Gui * | m_pGui |
bool | m_bManaged |
bool | m_bRootWidget |
PLCore::uint32 | m_nID |
PLCore::String | m_sName |
Widget * | m_pParent |
WidgetImpl * | m_pWidgetImpl |
Theme * | m_pTheme |
PLCore::List< Widget * > | m_lstChildren |
PLCore::List< Modifier * > | m_lstModifiers |
PLCore::HashMap < PLCore::String, Modifier * > | m_mapModifiers |
Layout * | m_pLayout |
LayoutHints | m_cLayoutHints |
EWindowState | m_nWindowState |
PLMath::Vector2i | m_vPos |
PLMath::Vector2i | m_vSize |
bool | m_bTopmost |
PLCore::String | m_sTitle |
Image | m_cIcon |
Cursor | m_cCursor |
EFocusStyle | m_nFocusStyle |
bool | m_bTabStop |
bool | m_bCaptureMouse |
PLGraphics::Color4 | m_cBackgroundColor |
PLMath::Vector2i | m_vPreferredSize |
void * | m_pUserData |
Widget class.
PLGUI_API PLGui::Widget::Widget | ( | Widget * | pParent = nullptr , |
bool | bManaged = false |
||
) |
Constructor.
[in] | pParent | Pointer to the parent widget |
[in] | bManaged | If 'true', the widget is not automatically destroyed by Gui and will not appear in the list of top-level windows |
PLGUI_API PLGui::Widget::Widget | ( | PLCore::handle | nNativeWindowHandle | ) |
Constructor.
[in] | nNativeWindowHandle | System native window handle |
virtual PLGUI_API PLGui::Widget::~Widget | ( | ) | [virtual] |
Destructor.
PLGUI_API PLGui::Widget::Widget | ( | Gui * | pGui | ) | [protected] |
Constructor.
[in] | pGui | Pointer to the parent GUI |
PLGUI_API Gui* PLGui::Widget::GetGui | ( | ) | const |
Get owner GUI.
PLGUI_API WidgetImpl* PLGui::Widget::GetImpl | ( | ) | const |
Get implementation.
PLGUI_API PLCore::handle PLGui::Widget::GetNativeWindowHandle | ( | ) | const |
Get system native window handle.
PLGUI_API PLCore::uint32 PLGui::Widget::GetID | ( | ) | const |
Get ID.
PLGUI_API void PLGui::Widget::SetID | ( | PLCore::uint32 | nID | ) |
Set ID.
[in] | nID | Widget ID |
PLGUI_API PLCore::String PLGui::Widget::GetName | ( | ) | const |
Get name.
PLGUI_API void PLGui::Widget::SetName | ( | const PLCore::String & | sName | ) |
Set name.
[in] | sName | Widget name |
PLGUI_API PLCore::String PLGui::Widget::GetDescriptor | ( | ) | const |
Get descriptor.
PLGUI_API void* PLGui::Widget::GetUserData | ( | ) | const |
PLGUI_API void PLGui::Widget::SetUserData | ( | void * | pData | ) |
PLGUI_API bool PLGui::Widget::IsManaged | ( | ) | const |
Get whether or not the widget is managed.
PLGUI_API PLCore::String PLGui::Widget::GetTitle | ( | ) | const |
Get title.
PLGUI_API void PLGui::Widget::SetTitle | ( | const PLCore::String & | sTitle | ) |
Set title.
[in] | sTitle | Widget title |
PLGUI_API const Image& PLGui::Widget::GetIcon | ( | ) | const |
PLGUI_API void PLGui::Widget::SetIcon | ( | const Image & | cIcon | ) |
PLGUI_API const Cursor& PLGui::Widget::GetCursor | ( | ) | const |
Get cursor.
PLGUI_API void PLGui::Widget::SetCursor | ( | const Cursor & | cCursor | ) |
Set cursor.
[in] | cCursor | Mouse cursor |
PLGUI_API Widget* PLGui::Widget::GetParent | ( | ) | const |
Get parent widget.
PLGUI_API Widget* PLGui::Widget::GetCommonParent | ( | const Widget & | cWidget | ) | const |
Get common parent of this and another widget.
[in] | cWidget | The other widget |
PLGUI_API Widget* PLGui::Widget::GetTopLevelWidget | ( | ) | const |
Get top level widget that is parent of this widget.
virtual PLGUI_API Widget* PLGui::Widget::GetContentWidget | ( | ) | const [virtual] |
Get content widget.
Reimplemented in PLGui::Splitter, PLGui::WindowContainer, and PLGui::ContainerWidget.
PLGUI_API const PLCore::List<Widget*>& PLGui::Widget::GetChildren | ( | ) | const |
Get list of children.
PLGUI_API Widget* PLGui::Widget::GetFirstChild | ( | ) | const |
Get first child widget.
PLGUI_API Widget* PLGui::Widget::GetLastChild | ( | ) | const |
Get last child widget.
PLGUI_API Widget* PLGui::Widget::GetPreviousSibling | ( | ) | const |
Get previous sibling widget.
PLGUI_API Widget* PLGui::Widget::GetNextSibling | ( | ) | const |
Get next sibling widget.
PLGUI_API bool PLGui::Widget::IsTopLevel | ( | ) | const |
Check if widget is a top level window.
PLGUI_API bool PLGui::Widget::IsShowInTaskbar | ( | ) | const |
Check if widget is visible in the taskbar.
PLGUI_API void PLGui::Widget::SetShowInTaskbar | ( | bool | bShowInTaskbar | ) |
Set if widget is visible in the taskbar.
[in] | bShowInTaskbar | 'true' if the widget is visible in the taskbar, else 'false' |
PLGUI_API Screen* PLGui::Widget::GetScreen | ( | ) | const |
Get screen the widget is on.
PLGUI_API void PLGui::Widget::MoveToScreen | ( | Screen & | cScreen | ) |
Move widget to another screen.
[in] | cScreen | Screen to which the widget shall be moved |
PLGUI_API PLMath::Vector2i PLGui::Widget::GetPos | ( | ) | const |
Get widget position.
PLGUI_API void PLGui::Widget::SetPos | ( | const PLMath::Vector2i & | vPos | ) |
Set widget position.
[in] | vPos | Position (X, Y) |
PLGUI_API PLMath::Vector2i PLGui::Widget::GetSize | ( | ) | const |
Get widget size.
PLGUI_API void PLGui::Widget::SetSize | ( | const PLMath::Vector2i & | vSize | ) |
Set widget size.
[in] | vSize | Size (width, height) |
PLGUI_API bool PLGui::Widget::GetTopmost | ( | ) | const |
Check if widget is topmost (always above all other widgets)
PLGUI_API void PLGui::Widget::SetTopmost | ( | bool | bTopmost | ) |
Set if widget is topmost (always above all other widgets)
[in] | bTopmost | 'true' if the widget is topmost, else 'false' |
PLGUI_API PLMath::Vector2i PLGui::Widget::GetAbsPos | ( | ) | const |
Get absolute widget position.
PLGUI_API PLMath::Vector2i PLGui::Widget::GetRelativePos | ( | Widget & | cWidget | ) | const |
Get position relative to another widget.
[in] | cWidget | Widget to which the relative position shall be computed |
PLGUI_API void PLGui::Widget::Center | ( | ECenter | nCenter | ) |
Center widget.
[in] | nCenter | How to center the widget (see ECenter) |
PLGUI_API void PLGui::Widget::CenterOnScreen | ( | Screen & | cScreen | ) |
Center widget relative to the screen.
[in] | cScreen | Screen to which this widget is centered |
PLGUI_API void PLGui::Widget::CenterOnWidget | ( | Widget & | cWidget | ) |
Center widget relative to another widget.
[in] | cWidget | Widget to which this widget is centered |
PLGUI_API void PLGui::Widget::CalculatePreferredSize | ( | const PLMath::Vector2i & | vRefSize = PLMath::Vector2i(-1,-1) | ) |
Calculate preferred size.
[in] | vRefSize | Precalculated reference size, can be (-1, -1) if no reference size is available |
PLGUI_API PLMath::Vector2i PLGui::Widget::GetPreferredSize | ( | ) | const |
Get preferred size.
PLGUI_API void PLGui::Widget::FitSize | ( | ) |
Set size of widget to fit it's content.
PLGUI_API void PLGui::Widget::SetZPos | ( | EZPos | nZPos, |
Widget * | pWidget = nullptr |
||
) |
Set Z position.
[in] | nZPos | Z position (see EZPos) |
[in] | pWidget | Other widget used to align relative to (only matters for 'ZAbove' or 'ZBehind') |
PLGUI_API EWindowState PLGui::Widget::GetWindowState | ( | ) | const |
Get window state.
PLGUI_API void PLGui::Widget::SetWindowState | ( | EWindowState | nWindowState | ) |
Set window state.
[in] | nWindowState | Window state (see EWindowState) |
PLGUI_API PLGraphics::Color4 PLGui::Widget::GetBackgroundColor | ( | ) | const |
PLGUI_API void PLGui::Widget::SetBackgroundColor | ( | const PLGraphics::Color4 & | cColor | ) |
Set background color.
[in] | cColor | Background color |
PLGUI_API void PLGui::Widget::SetTransparency | ( | ETransparency | nTransparency, |
const PLGraphics::Color4 & | cColor | ||
) |
Set transparency mode.
[in] | nTransparency | Transparency mode (see ETransparency) |
[in] | cColor | If nMode is ColorKey, all pixels of the specified color will be transparent. If nMode is Alpha, only the alpha channel of the color will be used (1.0 = opaque, 0.0 = transparent) |
PLGUI_API void PLGui::Widget::Close | ( | ) |
Close widget.
PLGUI_API bool PLGui::Widget::IsDestroyed | ( | ) | const |
Check if widget has been destroyed.
PLGUI_API void PLGui::Widget::Destroy | ( | ) |
Destroy widget.
PLGUI_API bool PLGui::Widget::IsVisible | ( | ) | const |
Check if widget is visible.
PLGUI_API void PLGui::Widget::SetVisible | ( | bool | bVisible | ) |
Show or hide widget.
[in] | bVisible | 'true' shows the widget, 'false' hides it |
PLGUI_API bool PLGui::Widget::IsEnabled | ( | ) | const |
Check if widget is enabled.
PLGUI_API void PLGui::Widget::SetEnabled | ( | bool | bEnabled | ) |
Enable or disable widget.
[in] | bEnabled | 'true' if the widget is enabled, else 'false' |
PLGUI_API EFocusStyle PLGui::Widget::GetFocusStyle | ( | ) | const |
Get focus style.
PLGUI_API void PLGui::Widget::SetFocusStyle | ( | EFocusStyle | nFocusStyle | ) |
Set focus style.
[in] | nFocusStyle | Focus style(s) |
PLGUI_API bool PLGui::Widget::CanAcceptFocus | ( | ) | const |
Check if widget can accept the focus.
PLGUI_API bool PLGui::Widget::IsTabStop | ( | ) |
Get tab-stop.
PLGUI_API void PLGui::Widget::SetTabStop | ( | bool | bTabStop | ) |
Set tab-stop.
[in] | bTabStop | 'true' if widget can get the focus by tabbing, else 'false' |
PLGUI_API bool PLGui::Widget::HasFocus | ( | ) | const |
Check if widget has the focus.
PLGUI_API bool PLGui::Widget::SetFocus | ( | ) |
Set keyboard focus to the widget.
PLGUI_API bool PLGui::Widget::IsActive | ( | ) | const |
Check if widget is active (either the widget or one of it's children has the focus)
PLGUI_API void PLGui::Widget::Activate | ( | ) |
Activate a widget (bring it to the top and set the focus to it)
PLGUI_API bool PLGui::Widget::NextTabStop | ( | bool | bForward | ) |
Give keyboard focus to next tab-stop widget.
[in] | bForward | 'true' to go forward, 'false' to go backwards |
PLGUI_API bool PLGui::Widget::IsMouseIn | ( | ) | const |
Check if the mouse is currently inside the widget.
PLGUI_API bool PLGui::Widget::IsMouseOver | ( | ) | const |
Check if the mouse is currently over either the widget or one of it's child widgets.
PLGUI_API bool PLGui::Widget::GetMousePos | ( | PLMath::Vector2i & | vPos | ) | const |
Get current mouse cursor position inside the widget.
[out] | vPos | Receives the mouse cursor position if all went fine, on error, the given variable is not manipulated |
virtual PLGUI_API PLCore::uint32 PLGui::Widget::GetWidgetState | ( | ) | const [virtual] |
Get widget state.
PLGUI_API void PLGui::Widget::Redraw | ( | ) |
Redraw widget.
PLGUI_API void PLGui::Widget::RedrawAll | ( | ) |
Redraw widget and all child widgets.
PLGUI_API bool PLGui::Widget::IsCaptureMouse | ( | ) | const |
Check if widget has captured mouse input.
PLGUI_API void PLGui::Widget::SetCaptureMouse | ( | bool | bCapture | ) |
Capture mouse input.
[in] | bCapture | 'true' if the mouse should be captured by the widget, else 'false' |
PLGUI_API void PLGui::Widget::SetTrapMouse | ( | bool | bTrap | ) |
Trap mouse inside the widget.
[in] | bTrap | 'true' if the mouse should be trapped inside the widget, else 'false' |
PLGUI_API PLCore::uint32 PLGui::Widget::RegisterHotkey | ( | PLCore::uint32 | nModKey, |
PLCore::uint32 | nKey | ||
) |
Register a hotkey.
[in] | nModKey | Modification key (for example PLGUIMOD_ALT) |
[in] | nKey | Key (for example PLGUIKEY_RETURN) |
PLGUI_API void PLGui::Widget::UnregisterHotkey | ( | PLCore::uint32 | nID | ) |
Unregister a hotkey.
[in] | nID | Hotkey ID |
PLGUI_API Theme* PLGui::Widget::GetTheme | ( | ) | const |
Get theme.
PLGUI_API void PLGui::Widget::SetTheme | ( | Theme * | pTheme | ) |
Set theme.
[in] | pTheme | Theme |
PLGUI_API const PLCore::List<Modifier*>& PLGui::Widget::GetModifiers | ( | ) | const |
Get modifiers.
PLGUI_API Modifier* PLGui::Widget::GetModifier | ( | const PLCore::String & | sName | ) | const |
Get modifier.
[in] | sName | Name of modifier |
PLGUI_API void PLGui::Widget::AddModifier | ( | Modifier * | pModifier | ) |
Add modifier.
[in] | pModifier | Pointer to the new modifier |
PLGUI_API void PLGui::Widget::AddModifier | ( | const PLCore::String & | sName, |
Modifier * | pModifier | ||
) |
Add modifier.
[in] | sName | Name of modifier (can be empty) |
[in] | pModifier | Pointer to the new modifier |
PLGUI_API void PLGui::Widget::AddModifier | ( | const PLCore::String & | sClass, |
const PLCore::String & | sOptions | ||
) |
Add modifier.
[in] | sClass | Name of the modifier class |
[in] | sOptions | Options for the modifier |
PLGUI_API void PLGui::Widget::AddModifier | ( | const PLCore::String & | sName, |
const PLCore::String & | sClass, | ||
const PLCore::String & | sOptions | ||
) |
Add modifier.
[in] | sName | Name of modifier (can be empty) |
[in] | sClass | Name of the modifier class |
[in] | sOptions | Options for the modifier |
PLGUI_API void PLGui::Widget::RemoveModifier | ( | Modifier * | pModifier | ) |
Remove modifier.
[in] | pModifier | Pointer to the modifier |
PLGUI_API void PLGui::Widget::RemoveModifier | ( | const PLCore::String & | sName | ) |
Remove modifier.
[in] | sName | Name of modifier |
PLGUI_API Layout* PLGui::Widget::GetLayout | ( | ) | const |
Get layout.
PLGUI_API void PLGui::Widget::SetLayout | ( | Layout * | pLayout | ) |
Set layout.
[in] | pLayout | Layout |
PLGUI_API void PLGui::Widget::SetLayout | ( | const PLCore::String & | sClass, |
const PLCore::String & | sOptions | ||
) |
PLGUI_API LayoutHints& PLGui::Widget::GetLayoutHints | ( | ) |
Get layout hints.
PLGUI_API void PLGui::Widget::AdjustContent | ( | ) |
Adjust content of the widget.
PLGUI_API void PLGui::Widget::UpdateContent | ( | ) |
Update content.
PLGUI_API void PLGui::Widget::AddChild | ( | Widget * | pWidget | ) | [protected] |
Add child widget.
[in] | pWidget | Widget to add |
PLGUI_API void PLGui::Widget::RemoveChild | ( | Widget * | pWidget | ) | [protected] |
Remove child widget.
[in] | pWidget | Widget to remove |
PLGUI_API bool PLGui::Widget::ActivateFirstTabStop | ( | ) | [protected] |
Give focus to first tab-stop widget (including this and all children)
PLGUI_API bool PLGui::Widget::ActivateLastTabStop | ( | ) | [protected] |
Give focus to last tab-stop widget (including this and all children)
PLGUI_API void PLGui::Widget::DrawBackground | ( | Graphics & | cGraphics | ) | [protected] |
Draw background.
[in] | cGraphics | Graphics object used for painting |
PLGUI_API void PLGui::Widget::Draw | ( | Graphics & | cGraphics | ) | [protected] |
Draw widget.
[in] | cGraphics | Graphics object used for painting |
virtual PLGUI_API void PLGui::Widget::OnMessage | ( | const GuiMessage & | cMessage | ) | [override, protected, virtual] |
Process GUI message.
[in] | cMessage | GUI message |
Reimplemented from PLGui::WidgetFunctions.
virtual PLGUI_API PLMath::Vector2i PLGui::Widget::OnPreferredSize | ( | const PLMath::Vector2i & | vRefSize | ) | const [override, protected, virtual] |
Called when the widget is to calculate it's preferred size.
[in] | vRefSize | Precalculated reference size, can be (-1, -1) if no reference size is available |
Reimplemented from PLGui::WidgetFunctions.
Reimplemented in PLGui::TabBar, PLGui::TabBarEntry, PLGui::AbstractMenu, PLGui::Splitter, PLGui::Border, PLGui::ScrollBar, PLGui::Slider, PLGui::Panel, PLGui::Button, PLGui::CheckBox, PLGui::MenuBar, PLGui::RadioButton, and PLGui::SlimEntry.
virtual PLGUI_API void PLGui::Widget::OnThemeChanged | ( | ) | [override, protected, virtual] |
Called when the theme has been changed.
Reimplemented from PLGui::WidgetFunctions.
Reimplemented in PLGui::ContainerWidget.
virtual PLGUI_API void PLGui::Widget::OnUpdateContent | ( | ) | [override, protected, virtual] |
Called when the widget has been changed.
Reimplemented from PLGui::WidgetFunctions.
virtual PLGUI_API void PLGui::Widget::OnAdjustContent | ( | ) | [override, protected, virtual] |
Called when the widget content has to be adjusted.
Reimplemented from PLGui::WidgetFunctions.
Reimplemented in PLGui::TabBar, PLGui::TabBarEntry, PLGui::Window, PLGui::WindowContainer, PLGui::TabContainer, PLGui::Splitter, PLGui::ScrollWidget, PLGui::Border, PLGui::Panel, and PLGui::ContainerWidget.
Gui* PLGui::Widget::m_pGui [protected] |
Pointer to GUI instance
bool PLGui::Widget::m_bManaged [protected] |
If a widget is managed, it will not be listed in the list of top level widgets and not be deleted automatically!
bool PLGui::Widget::m_bRootWidget [protected] |
If 'true', the widget is a dummy object for the 'root' of a GUI implementation (no real widget at all!)
PLCore::uint32 PLGui::Widget::m_nID [protected] |
Widget ID
PLCore::String PLGui::Widget::m_sName [protected] |
Widget name
Widget* PLGui::Widget::m_pParent [protected] |
Pointer to parent widget
WidgetImpl* PLGui::Widget::m_pWidgetImpl [protected] |
Widget implementation
Theme* PLGui::Widget::m_pTheme [protected] |
Current theme
PLCore::List<Widget*> PLGui::Widget::m_lstChildren [protected] |
List of child widgets
PLCore::List<Modifier*> PLGui::Widget::m_lstModifiers [protected] |
List of modifiers
PLCore::HashMap<PLCore::String, Modifier*> PLGui::Widget::m_mapModifiers [protected] |
Map 'Name' -> 'Modifier'
Layout* PLGui::Widget::m_pLayout [protected] |
LayoutHints PLGui::Widget::m_cLayoutHints [protected] |
Layout hints for the widget
EWindowState PLGui::Widget::m_nWindowState [protected] |
Current window state
PLMath::Vector2i PLGui::Widget::m_vPos [protected] |
Position of the widget
Reimplemented in PLGui::Window.
PLMath::Vector2i PLGui::Widget::m_vSize [protected] |
Size of the widget
bool PLGui::Widget::m_bTopmost [protected] |
Topmost flag
PLCore::String PLGui::Widget::m_sTitle [protected] |
Widget title
Image PLGui::Widget::m_cIcon [protected] |
Widget icon
Reimplemented in PLGui::TabBarEntry.
Cursor PLGui::Widget::m_cCursor [protected] |
Mouse cursor
EFocusStyle PLGui::Widget::m_nFocusStyle [protected] |
How does this widget accept the keyboard focus?
bool PLGui::Widget::m_bTabStop [protected] |
Does the widget accept the focus by tabbing?
bool PLGui::Widget::m_bCaptureMouse [protected] |
Is the mouse captured by the widget?
PLGraphics::Color4 PLGui::Widget::m_cBackgroundColor [protected] |
Background color of the widget
PLMath::Vector2i PLGui::Widget::m_vPreferredSize [protected] |
Preferred size of the widget
void* PLGui::Widget::m_pUserData [protected] |
User defined data
|