PixelLightAPI  .
Public Member Functions | Public Attributes | Protected Member Functions
PLGui::WindowContainer Class Reference

Base class for window containers. More...

#include <WindowContainer.h>

Inheritance diagram for PLGui::WindowContainer:
Inheritance graph
[legend]

List of all members.

Public Member Functions

PLGUI_API WindowContainer (Widget *pParent=nullptr)
 Constructor.
virtual PLGUI_API ~WindowContainer ()
 Destructor.
virtual PLGUI_API WidgetGetContentWidget () const
 Get content widget.
PLGUI_API void Clear ()
 Clear container.
PLGUI_API const
PLCore::Container< Widget * > & 
GetWindows () const
 Get list of windows inside the container.
PLGUI_API void AddWindow (Widget *pWindow)
 Add window to container.
PLGUI_API void RemoveWindow (Widget *pWindow)
 Remove window from container.
PLGUI_API int GetSelection () const
 Get currently selected window.
PLGUI_API void SetSelection (int nWindow)
 Set currently selected window.
PLGUI_API void SetSelection (Widget *pWindow)
 Set currently selected window.

Public Attributes

PLCore::Event< Widget * > EventAddWindow
PLCore::Event< Widget * > EventRemoveWindow
PLCore::Event< int > EventSelectWindow
Widgetm_pContentWidget
PLCore::List< Widget * > m_lstWindows
int m_nSelection
Widgetm_pSelection

Protected Member Functions

virtual PLGUI_API void OnAddWindow (Widget *pWindow)
 Called when a window has been added.
virtual PLGUI_API void OnRemoveWindow (Widget *pWindow)
 Called when a window has been removed.
virtual PLGUI_API void OnSelectWindow (int nWindow)
 Called when the current selection has been changed.
virtual PLGUI_API void OnAdjustContent ()
 Called when the widget content has to be adjusted.

Detailed Description

Base class for window containers.


Constructor & Destructor Documentation

PLGUI_API PLGui::WindowContainer::WindowContainer ( Widget pParent = nullptr)

Constructor.

Parameters:
[in]pParentPointer to parent widget
virtual PLGUI_API PLGui::WindowContainer::~WindowContainer ( ) [virtual]

Destructor.


Member Function Documentation

virtual PLGUI_API Widget* PLGui::WindowContainer::GetContentWidget ( ) const [virtual]

Get content widget.

Returns:
Content widget
Remarks:
If a widget is a container for other widgets, a container widget is often used as the parent for all of the child widgets. This is e.g. necessary to separate the "outside" from the "inside", e.g. there may be other (internal) child widgets, that are also children of the same parent (e.g. buttons in the title bar or frame widgets). So if you want to insert widgets inside other widgets, you should use the widget returned by GetContentWidget() as the parent widget, not the widget itself. If a widget don't have a content widget, it will return a pointer to itself as the content widget.

Reimplemented from PLGui::Widget.

PLGUI_API void PLGui::WindowContainer::Clear ( )

Clear container.

Get list of windows inside the container.

Returns:
List of windows
PLGUI_API void PLGui::WindowContainer::AddWindow ( Widget pWindow)

Add window to container.

Parameters:
[in]pWindowWindow
PLGUI_API void PLGui::WindowContainer::RemoveWindow ( Widget pWindow)

Remove window from container.

Parameters:
[in]pWindowWindow
PLGUI_API int PLGui::WindowContainer::GetSelection ( ) const

Get currently selected window.

Returns:
Index of currently selected window
PLGUI_API void PLGui::WindowContainer::SetSelection ( int  nWindow)

Set currently selected window.

Parameters:
[in]nWindowIndex of currently selected window
PLGUI_API void PLGui::WindowContainer::SetSelection ( Widget pWindow)

Set currently selected window.

Parameters:
[in]pWindowPointer to currently selected window
virtual PLGUI_API void PLGui::WindowContainer::OnAddWindow ( Widget pWindow) [protected, virtual]

Called when a window has been added.

Parameters:
[in]pWindowWindow

Reimplemented in PLGui::TabContainer.

virtual PLGUI_API void PLGui::WindowContainer::OnRemoveWindow ( Widget pWindow) [protected, virtual]

Called when a window has been removed.

Parameters:
[in]pWindowWindow

Reimplemented in PLGui::TabContainer.

virtual PLGUI_API void PLGui::WindowContainer::OnSelectWindow ( int  nWindow) [protected, virtual]

Called when the current selection has been changed.

Parameters:
[in]nWindowIndex of currently selected window

Reimplemented in PLGui::TabContainer.

virtual PLGUI_API void PLGui::WindowContainer::OnAdjustContent ( ) [protected, virtual]

Called when the widget content has to be adjusted.

Reimplemented from PLGui::Widget.

Reimplemented in PLGui::TabContainer.


Member Data Documentation

Window has been added

Window has been removed

Current selection has been changed

Inner widget that contains the content windows

List of windows

Index of currently selected window

Pointer to currently selected window


The documentation for this class was generated from the following file:


PixelLight PixelLight 0.9.11-R1
Copyright (C) 2002-2012 by The PixelLight Team
Last modified Thu Feb 23 2012 14:09:33
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported