PixelLightAPI
.
|
Tab bar widget. More...
#include <TabBar.h>
Public Member Functions | |
PLGUI_API | TabBar (Widget *pParent=nullptr) |
Constructor. | |
virtual PLGUI_API | ~TabBar () |
Destructor. | |
PLGUI_API ESide | GetSide () const |
Get side the tabbar is positioned on. | |
PLGUI_API void | SetSide (ESide nSide) |
Set side the tabbar is positioned on. | |
PLGUI_API PLCore::uint32 | GetOptions () const |
Get TabBar options. | |
PLGUI_API void | SetOptions (PLCore::uint32 nOptions) |
Set TabBar options. | |
PLGUI_API PLCore::uint32 | GetTabWidth () const |
Get tab width. | |
PLGUI_API void | SetTabWidth (PLCore::uint32 nWidth) |
Set tab width. | |
PLGUI_API PLCore::uint32 | GetTabHeight () const |
Get tab height. | |
PLGUI_API void | SetTabHeight (PLCore::uint32 nHeight) |
Set tab height. | |
PLGUI_API void | CreateTab () |
Create a new tab. | |
PLGUI_API void | CloseTab (TabBarEntry *pTab) |
Close tab. | |
PLGUI_API void | CloseTab (PLCore::uint32 nTab) |
Close tab. | |
PLGUI_API const PLCore::Container< TabBarEntry * > & | GetTabs () const |
Get list of tabs. | |
PLGUI_API TabBarEntry * | AddTab (const PLCore::String &sText) |
Add tab. | |
PLGUI_API TabBarEntry * | AddTab (const PLCore::String &sText, const Image &cIcon) |
Add tab. | |
PLGUI_API bool | RemoveTab (TabBarEntry *pTab) |
Remove tab. | |
PLGUI_API bool | RemoveTab (PLCore::uint32 nTab) |
Remove tab. | |
PLGUI_API int | GetSelection () const |
Get currently selected tab. | |
PLGUI_API void | SetSelection (int nTab) |
Set currently selected tab. | |
PLGUI_API int | GetScrollingPos () const |
Get scrolling position. | |
PLGUI_API void | SetScrollingPos (int nTab) |
Set scrolling position. | |
PLGUI_API int | GetMouseSelection () const |
Get tab that is currently selected by the mouse. | |
Public Attributes | |
PLCore::Event< TabBarEntry * > | EventAddTab |
PLCore::Event< TabBarEntry * > | EventRemoveTab |
PLCore::Event< TabBarEntry * > | EventCloseTab |
PLCore::Event< int > | EventSelectTab |
PLCore::Event | EventCreateTab |
ESide | m_nSide |
PLCore::uint32 | m_nOptions |
PLCore::uint32 | m_nTabWidth |
PLCore::uint32 | m_nTabHeight |
PLCore::List< TabBarEntry * > | m_lstTabs |
int | m_nSelection |
int | m_nMouseSelection |
int | m_nScrollingPos |
TabBarButton * | m_pButtonCreate |
TabBarButton * | m_pButtonNext |
TabBarButton * | m_pButtonPrev |
Protected Member Functions | |
PLGUI_API void | RedrawTab (int nTab) |
Redraw tab. | |
PLGUI_API void | SetMouseSelection (int nTab) |
Set tab that is currently selected by the mouse. | |
virtual PLGUI_API PLMath::Vector2i | OnPreferredSize (const PLMath::Vector2i &vRefSize) const |
Called when the widget is to calculate it's preferred size. | |
virtual PLGUI_API void | OnAdjustContent () |
Called when the widget content has to be adjusted. | |
virtual PLGUI_API void | OnAddTab (TabBarEntry *pTab) |
Called when a new tab is added. | |
virtual PLGUI_API void | OnRemoveTab (TabBarEntry *pTab) |
Called when a tab is removed. | |
virtual PLGUI_API void | OnCloseTab (TabBarEntry *pTab) |
Called when a tab shall be closed. | |
virtual PLGUI_API void | OnSelectTab (int nTab) |
Called when the current selection has been changed. | |
virtual PLGUI_API void | OnCreateTab () |
Called when a new tab shall be created. |
Tab bar widget.
PLGUI_API PLGui::TabBar::TabBar | ( | Widget * | pParent = nullptr | ) |
Constructor.
[in] | pParent | Pointer to parent widget |
virtual PLGUI_API PLGui::TabBar::~TabBar | ( | ) | [virtual] |
Destructor.
PLGUI_API ESide PLGui::TabBar::GetSide | ( | ) | const |
Get side the tabbar is positioned on.
PLGUI_API void PLGui::TabBar::SetSide | ( | ESide | nSide | ) |
Set side the tabbar is positioned on.
[in] | nSide | Side |
PLGUI_API PLCore::uint32 PLGui::TabBar::GetOptions | ( | ) | const |
PLGUI_API void PLGui::TabBar::SetOptions | ( | PLCore::uint32 | nOptions | ) |
PLGUI_API PLCore::uint32 PLGui::TabBar::GetTabWidth | ( | ) | const |
PLGUI_API void PLGui::TabBar::SetTabWidth | ( | PLCore::uint32 | nWidth | ) |
Set tab width.
[in] | nWidth | Tab width |
PLGUI_API PLCore::uint32 PLGui::TabBar::GetTabHeight | ( | ) | const |
Get tab height.
PLGUI_API void PLGui::TabBar::SetTabHeight | ( | PLCore::uint32 | nHeight | ) |
Set tab height.
[in] | nHeight | Tab height |
PLGUI_API void PLGui::TabBar::CreateTab | ( | ) |
Create a new tab.
PLGUI_API void PLGui::TabBar::CloseTab | ( | TabBarEntry * | pTab | ) |
PLGUI_API void PLGui::TabBar::CloseTab | ( | PLCore::uint32 | nTab | ) |
Close tab.
[in] | nTab | Tab index |
PLGUI_API const PLCore::Container<TabBarEntry*>& PLGui::TabBar::GetTabs | ( | ) | const |
Get list of tabs.
PLGUI_API TabBarEntry* PLGui::TabBar::AddTab | ( | const PLCore::String & | sText | ) |
Add tab.
[in] | sText | Tab text |
PLGUI_API TabBarEntry* PLGui::TabBar::AddTab | ( | const PLCore::String & | sText, |
const Image & | cIcon | ||
) |
PLGUI_API bool PLGui::TabBar::RemoveTab | ( | TabBarEntry * | pTab | ) |
Remove tab.
[in] | pTab | Tab |
PLGUI_API bool PLGui::TabBar::RemoveTab | ( | PLCore::uint32 | nTab | ) |
Remove tab.
[in] | nTab | Tab index |
PLGUI_API int PLGui::TabBar::GetSelection | ( | ) | const |
Get currently selected tab.
PLGUI_API void PLGui::TabBar::SetSelection | ( | int | nTab | ) |
Set currently selected tab.
[in] | nTab | Index of currently selected tab |
PLGUI_API int PLGui::TabBar::GetScrollingPos | ( | ) | const |
Get scrolling position.
PLGUI_API void PLGui::TabBar::SetScrollingPos | ( | int | nTab | ) |
Set scrolling position.
[in] | nTab | Index of first visible tab |
PLGUI_API int PLGui::TabBar::GetMouseSelection | ( | ) | const |
Get tab that is currently selected by the mouse.
PLGUI_API void PLGui::TabBar::RedrawTab | ( | int | nTab | ) | [protected] |
Redraw tab.
[in] | nTab | Index of tab |
PLGUI_API void PLGui::TabBar::SetMouseSelection | ( | int | nTab | ) | [protected] |
Set tab that is currently selected by the mouse.
[in] | nTab | Index of currently selected tab |
virtual PLGUI_API PLMath::Vector2i PLGui::TabBar::OnPreferredSize | ( | const PLMath::Vector2i & | vRefSize | ) | const [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::Widget.
virtual PLGUI_API void PLGui::TabBar::OnAdjustContent | ( | ) | [protected, virtual] |
Called when the widget content has to be adjusted.
Reimplemented from PLGui::Widget.
virtual PLGUI_API void PLGui::TabBar::OnAddTab | ( | TabBarEntry * | pTab | ) | [protected, virtual] |
Called when a new tab is added.
[in] | pTab | Tab |
virtual PLGUI_API void PLGui::TabBar::OnRemoveTab | ( | TabBarEntry * | pTab | ) | [protected, virtual] |
Called when a tab is removed.
[in] | pTab | Tab |
virtual PLGUI_API void PLGui::TabBar::OnCloseTab | ( | TabBarEntry * | pTab | ) | [protected, virtual] |
Called when a tab shall be closed.
[in] | pTab | Tab |
virtual PLGUI_API void PLGui::TabBar::OnSelectTab | ( | int | nTab | ) | [protected, virtual] |
Called when the current selection has been changed.
[in] | nTab | Index of currently selected tab |
virtual PLGUI_API void PLGui::TabBar::OnCreateTab | ( | ) | [protected, virtual] |
Called when a new tab shall be created.
New tab is added
Tab is removed
Tab is to be closed
Current selection has been changed
New tab shall be created
ESide PLGui::TabBar::m_nSide |
Side the tabbar is positioned on
PLCore::uint32 PLGui::TabBar::m_nOptions |
TabBar options (ETabBarOption)
PLCore::uint32 PLGui::TabBar::m_nTabWidth |
Tab width
PLCore::uint32 PLGui::TabBar::m_nTabHeight |
Tab height
List of tabs
Index of currently selected tab
Index of tab currently selected by the mouse
First displayed tab (scrolling)
Button to create a new tab
Button to scroll (next)
Button to scroll (previous)
|