29#ifndef _CEGUITabControl_h_
30#define _CEGUITabControl_h_
39# pragma warning(disable : 4251)
130 {
return d_tabPanePos; }
415 bool client_sized_hint =
false);
460 CEGUI_VECTOR_ALLOC(
TabButton*)> TabButtonVector;
466 std::map<Window*, Event::ScopedConnection, std::less<Window*>
494 void addTabControlProperties(
void);
505 bool handleContentWindowTextChanged(
const EventArgs& args);
506 bool handleTabButtonClicked(
const EventArgs& args);
507 bool handleScrollPane(
const EventArgs& e);
508 bool handleDraggedPane(
const EventArgs& e);
509 bool handleWheeledPane(
const EventArgs& e);
516 typedef TabControl::TabPanePosition return_type;
517 typedef return_type safe_method_return_type;
518 typedef TabControl::TabPanePosition pass_type;
521 static const String& getDataTypeName()
523 static String type(
"TabPanePosition");
528 static return_type fromString(
const String& str)
532 return TabControl::Bottom;
536 return TabControl::Top;
542 if (val == TabControl::Top)
546 else if (val == TabControl::Bottom)
552 assert(
false &&
"Invalid Tab Pane Position");
A positioned and sized rectangular node in a tree graph.
Definition: Element.h:246
Base class used as the argument to all subscribers Event object.
Definition: EventArgs.h:51
Event::Connection wrapper that automatically disconnects the connection when the object is deleted (o...
Definition: Event.h:92
Adds name to the Element class, including name path traversal.
Definition: NamedElement.h:76
Helper class used to convert various data types to and from the format expected in Property strings.
Definition: ForwardRefs.h:84
String class used within the GUI system.
Definition: String.h:64
Base class for TabControl window renderer objects.
Definition: widgets/TabControl.h:55
TabControlWindowRenderer(const String &name)
Constructor.
virtual TabButton * createTabButton(const String &name) const =0
create and return a pointer to a TabButton widget for use as a clickable tab header
Base class for standard Tab Control widget.
Definition: widgets/TabControl.h:79
void setTabTextPadding(const UDim &padding)
Set the amount of padding to add either side of the text in the tab.
void setTabPanePosition(TabPanePosition pos)
Change the positioning of the tab button pane.
TabPanePosition d_tabPanePos
The position of the tab pane.
Definition: widgets/TabControl.h:463
Window * getTabButtonPane() const
Return a pointer to the tab button pane (Window)for this TabControl.
virtual void drawSelf(const RenderingContext &)
Perform the actual rendering for this Window.
Definition: widgets/TabControl.h:347
virtual void removeButtonForTabContent(Window *wnd)
Remove the TabButton for the specified child Window.
void removeChild_impl(Element *element)
Remove given element from child list.
virtual void selectTab_impl(Window *wnd)
Internal implementation of select tab.
void setSelectedTabAtIndex(size_t index)
Set the selected tab by the index position in the tab control. Also ensures that the tab is made visi...
Window * getTabContents(uint ID) const
Return the Window which is the tab content with the given ID.
Window * getTabPane() const
Return a pointer to the content component widget for this TabControl.
float d_firstTabOffset
The offset in pixels of the first tab.
Definition: widgets/TabControl.h:462
UDim d_tabPadding
The padding of the tabs relative to parent.
Definition: widgets/TabControl.h:458
virtual void addButtonForTabContent(Window *wnd)
Add a TabButton for the specified child Window.
void setSelectedTab(const String &name)
Set the selected tab by the name of the root window within it. Also ensures that the tab is made visi...
static const String TabButtonName
Widget name for the tab button components.
Definition: widgets/TabControl.h:105
static const String ButtonScrollLeft
Widget name for the scroll tabs to right pane component.
Definition: widgets/TabControl.h:107
TabPanePosition getTabPanePosition(void) const
Return the positioning of the tab pane.
Definition: widgets/TabControl.h:129
size_t getSelectedTabIndex() const
Return the index of the currently selected tab.
virtual void initialiseComponents(void)
Initialise the Window based object ready for use.
void calculateTabButtonSizePosition(size_t index)
create and return a pointer to a TabButton widget for use as a clickable tab header
static const String EventSelectionChanged
Definition: widgets/TabControl.h:99
void addTab(Window *wnd)
Add a new tab to the tab control.
std::map< Window *, Event::ScopedConnection, std::less< Window * > CEGUI_MAP_ALLOC(Window *, Event::ScopedConnection)> d_eventConnections
Container used to track event subscriptions to added tab windows.
Definition: widgets/TabControl.h:467
TabControl(const String &type, const String &name)
Constructor for TabControl base class.
static const String ButtonScrollRight
Widget name for the scroll tabs to left pane component.
Definition: widgets/TabControl.h:108
static const String TabButtonPaneName
Widget name for the tab button pane component.
Definition: widgets/TabControl.h:106
size_t getTabCount(void) const
Return number of tabs.
virtual void makeTabVisible_impl(Window *wnd)
Internal implementation of make tab visible.
void removeTab(const String &name)
Remove the named tab from the tab control.
String makeButtonName(Window *wnd)
Construct a button name to handle a window.
TabButton * getButtonForTabContents(Window *wnd) const
Return the TabButton associated with this Window.
Window * getTabContents(const String &name) const
Return the Window which is the tab content with the given name.
void setTabHeight(const UDim &height)
Set the height of the tabs.
void removeTab_impl(Window *window)
Implementation function to do main work of removing a tab.
static const String EventNamespace
Namespace for global events.
Definition: widgets/TabControl.h:81
static const String ContentPaneName
Widget name for the tab content pane component.
Definition: widgets/TabControl.h:104
bool isTabContentsSelected(Window *wnd) const
void makeTabVisible(uint ID)
Ensure that the tab by the ID of the root window within it is visible.
float d_btGrabPos
Definition: widgets/TabControl.h:464
const UDim & getTabHeight(void) const
Return the height of the tabs.
Definition: widgets/TabControl.h:254
TabButton * createTabButton(const String &name) const
create and return a pointer to a TabButton widget for use as a clickable tab header
virtual ~TabControl(void)
Destructor for Listbox base class.
virtual void onSelectionChanged(WindowEventArgs &e)
Handler called internally when the currently selected item or items changes.
void addChild_impl(Element *element)
Add given element to child list at an appropriate position.
Window * getTabContentsAtIndex(size_t index) const
Return the Window which is the first child of the tab at index position index.
TabButtonVector d_tabButtonVector
Sorting for tabs.
Definition: widgets/TabControl.h:461
void makeTabVisibleAtIndex(size_t index)
Ensure that the tab by the index position in the tab control is visible.
UDim d_tabHeight
The height of the tabs in pixels.
Definition: widgets/TabControl.h:457
void makeTabVisible(const String &name)
Ensure that the tab by the name of the root window within it is visible.
virtual void onFontChanged(WindowEventArgs &e)
Handler called when the window's font is changed.
const UDim & getTabTextPadding(void) const
Return the amount of padding to add either side of the text in the tab.
Definition: widgets/TabControl.h:260
virtual bool validateWindowRenderer(const WindowRenderer *renderer) const
Function used in checking if a WindowRenderer is valid for this window.
void removeTab(uint ID)
Remove the tab with the given ID from the tab control.
virtual NamedElement * getChildByNamePath_impl(const String &name_path) const
Retrieves a child at name_path or 0 if none such exists.
void performChildWindowLayout(bool nonclient_sized_hint=false, bool client_sized_hint=false)
Layout child window content.
static const String WidgetTypeName
Window factory name.
Definition: widgets/TabControl.h:82
void setSelectedTab(uint ID)
Set the selected tab by the ID of the root window within it. Also ensures that the tab is made visibl...
Dimension that has both a relative 'scale' portion and and absolute 'offset' portion.
Definition: UDim.h:94
EventArgs based class that is used for objects passed to handlers triggered for events concerning som...
Definition: InputEvent.h:252
Base-class for the assignable WindowRenderer object.
Definition: WindowRenderer.h:52
An abstract base class providing common functionality and specifying the required interface for deriv...
Definition: Window.h:151
Class used to create XML Document.
Definition: XMLSerializer.h:87
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
struct that holds some context relating to a RenderingSurface object.
Definition: RenderingContext.h:41