PixelLightAPI
.
|
Tab bar entry. More...
#include <TabBarEntry.h>
Public Member Functions | |
PLGUI_API | TabBarEntry (Widget *pParent=nullptr) |
Constructor. | |
virtual PLGUI_API | ~TabBarEntry () |
Destructor. | |
PLGUI_API TabBar * | GetTabBar () const |
Get TabBar. | |
PLGUI_API PLCore::String | GetText () const |
Get text. | |
PLGUI_API void | SetText (const PLCore::String &sText) |
Set text. | |
PLGUI_API const Image & | GetIcon () const |
Get icon. | |
PLGUI_API void | SetIcon (const Image &cIcon) |
Set icon. | |
PLGUI_API Widget * | GetWidget () const |
Get associated widget. | |
PLGUI_API void | SetWidget (Widget *pWidget) |
Set associated widget. | |
PLGUI_API void * | GetUserData () const |
Get associated data. | |
PLGUI_API void | SetUserData (void *pData) |
Set associated data. | |
PLGUI_API int | GetIndex () const |
Get tab index. | |
PLGUI_API bool | IsClosable () const |
Check if tab can be closed by the user. | |
Protected Member Functions | |
PLGUI_API void | SetTabBar (TabBar *pTabBar) |
Set TabBar. | |
PLGUI_API void | SetIndex (int nIndex) |
Set tab index. | |
PLGUI_API void | SetClosable (bool bClosable) |
Set if tab can be closed by the user. | |
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 | OnMouseEnter () |
Called when the mouse has entered the widget. | |
virtual PLGUI_API void | OnMouseLeave () |
Called when the mouse has left the widget. | |
virtual PLGUI_API void | OnMouseButtonClick (PLCore::uint32 nButton, const PLMath::Vector2i &vPos) |
Called when a mouse button is clicked. | |
Protected Attributes | |
PLCore::String | m_sText |
Image | m_cIcon |
Widget * | m_pWidget |
void * | m_pData |
TabBar * | m_pTabBar |
int | m_nIndex |
bool | m_bClosable |
TabBarButton * | m_pButtonClose |
Tab bar entry.
PLGUI_API PLGui::TabBarEntry::TabBarEntry | ( | Widget * | pParent = nullptr | ) |
Constructor.
[in] | pParent | Pointer to parent widget |
virtual PLGUI_API PLGui::TabBarEntry::~TabBarEntry | ( | ) | [virtual] |
Destructor.
PLGUI_API TabBar* PLGui::TabBarEntry::GetTabBar | ( | ) | const |
PLGUI_API PLCore::String PLGui::TabBarEntry::GetText | ( | ) | const |
Get text.
PLGUI_API void PLGui::TabBarEntry::SetText | ( | const PLCore::String & | sText | ) |
Set text.
[in] | sText | Text |
PLGUI_API const Image& PLGui::TabBarEntry::GetIcon | ( | ) | const |
PLGUI_API void PLGui::TabBarEntry::SetIcon | ( | const Image & | cIcon | ) |
PLGUI_API Widget* PLGui::TabBarEntry::GetWidget | ( | ) | const |
PLGUI_API void PLGui::TabBarEntry::SetWidget | ( | Widget * | pWidget | ) |
Set associated widget.
[in] | pWidget | Widget (can be a null pointer) |
PLGUI_API void* PLGui::TabBarEntry::GetUserData | ( | ) | const |
PLGUI_API void PLGui::TabBarEntry::SetUserData | ( | void * | pData | ) |
Set associated data.
[in] | pData | Data pointer |
Reimplemented from PLGui::Widget.
PLGUI_API int PLGui::TabBarEntry::GetIndex | ( | ) | const |
Get tab index.
PLGUI_API bool PLGui::TabBarEntry::IsClosable | ( | ) | const |
Check if tab can be closed by the user.
PLGUI_API void PLGui::TabBarEntry::SetTabBar | ( | TabBar * | pTabBar | ) | [protected] |
PLGUI_API void PLGui::TabBarEntry::SetIndex | ( | int | nIndex | ) | [protected] |
Set tab index.
[in] | nIndex | Index of tab |
PLGUI_API void PLGui::TabBarEntry::SetClosable | ( | bool | bClosable | ) | [protected] |
Set if tab can be closed by the user.
[in] | bClosable | 'true' if tab is closable, else 'false' |
virtual PLGUI_API PLMath::Vector2i PLGui::TabBarEntry::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::TabBarEntry::OnAdjustContent | ( | ) | [protected, virtual] |
Called when the widget content has to be adjusted.
Reimplemented from PLGui::Widget.
virtual PLGUI_API void PLGui::TabBarEntry::OnMouseEnter | ( | ) | [protected, virtual] |
Called when the mouse has entered the widget.
Reimplemented from PLGui::WidgetFunctions.
virtual PLGUI_API void PLGui::TabBarEntry::OnMouseLeave | ( | ) | [protected, virtual] |
Called when the mouse has left the widget.
Reimplemented from PLGui::WidgetFunctions.
virtual PLGUI_API void PLGui::TabBarEntry::OnMouseButtonClick | ( | PLCore::uint32 | nButton, |
const PLMath::Vector2i & | vPos | ||
) | [protected, virtual] |
Called when a mouse button is clicked.
[in] | nButton | Mouse button that is clicked |
[in] | vPos | Mouse position within the widget |
Reimplemented from PLGui::WidgetFunctions.
PLCore::String PLGui::TabBarEntry::m_sText [protected] |
Text displayed in tab
Image PLGui::TabBarEntry::m_cIcon [protected] |
Tab icon
Reimplemented from PLGui::Widget.
Widget* PLGui::TabBarEntry::m_pWidget [protected] |
Widget associated with the tab (data only!)
void* PLGui::TabBarEntry::m_pData [protected] |
User data
TabBar* PLGui::TabBarEntry::m_pTabBar [protected] |
TabBar to which the entry belongs
int PLGui::TabBarEntry::m_nIndex [protected] |
Tab index
bool PLGui::TabBarEntry::m_bClosable [protected] |
Can the tab be closed by the user?
TabBarButton* PLGui::TabBarEntry::m_pButtonClose [protected] |
Button to close the tab
|