29 #ifndef _CEGUITabControl_h_
30 #define _CEGUITabControl_h_
33 #include "../Window.h"
38 # pragma warning(push)
39 # pragma warning(disable : 4251)
121 size_t getTabCount(
void)
const;
130 {
return d_tabPanePos; }
138 void setTabPanePosition(TabPanePosition pos);
146 void setSelectedTab(
const String &name);
154 void setSelectedTab(uint ID);
162 void setSelectedTabAtIndex(
size_t index);
169 void makeTabVisible(
const String &name);
176 void makeTabVisible(uint ID);
183 void makeTabVisibleAtIndex(
size_t index);
197 Window* getTabContentsAtIndex(
size_t index)
const;
225 Window* getTabContents(uint ID)
const;
239 bool isTabContentsSelected(
Window* wnd)
const;
248 size_t getSelectedTabIndex()
const;
276 virtual void initialiseComponents(
void);
282 void setTabHeight(
const UDim& height);
288 void setTabTextPadding(
const UDim& padding);
305 void removeTab(
const String& name);
312 void removeTab(uint ID);
353 virtual void addButtonForTabContent(
Window* wnd);
358 virtual void removeButtonForTabContent(
Window* wnd);
377 virtual void selectTab_impl(
Window* wnd);
386 virtual void makeTabVisible_impl(
Window* wnd);
399 Window* getTabButtonPane()
const;
412 Window* getTabPane()
const;
414 void performChildWindowLayout(
bool nonclient_sized_hint =
false,
415 bool client_sized_hint =
false);
419 virtual bool validateWindowRenderer(
const WindowRenderer* renderer)
const;
432 void removeTab_impl(
Window* window);
460 CEGUI_VECTOR_ALLOC(
TabButton*)> TabButtonVector;
465 std::map<Window*, Event::ScopedConnection> d_eventConnections;
487 void calculateTabButtonSizePosition(
size_t index);
493 void addTabControlProperties(
void);
495 void addChild_impl(
Element* element);
496 void removeChild_impl(
Element* element);
504 bool handleContentWindowTextChanged(
const EventArgs& args);
505 bool handleTabButtonClicked(
const EventArgs& args);
506 bool handleScrollPane(
const EventArgs& e);
507 bool handleDraggedPane(
const EventArgs& e);
508 bool handleWheeledPane(
const EventArgs& e);
515 typedef TabControl::TabPanePosition return_type;
516 typedef return_type safe_method_return_type;
517 typedef TabControl::TabPanePosition pass_type;
520 static const String& getDataTypeName()
522 static String type(
"TabPanePosition");
527 static return_type fromString(
const String& str)
531 return TabControl::Bottom;
535 return TabControl::Top;
539 static string_return_type toString(pass_type val)
541 if (val == TabControl::Top)
545 else if (val == TabControl::Bottom)
551 assert(
false &&
"Invalid Tab Pane Position");
559 #if defined(_MSC_VER)
560 # pragma warning(pop)
563 #endif // end of guard _CEGUITabControl_h_
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
TabButtonVector d_tabButtonVector
Sorting for tabs.
Definition: widgets/TabControl.h:461
Base class for standard Tab Control widget.
Definition: widgets/TabControl.h:78
static const String EventNamespace
Namespace for global events.
Definition: widgets/TabControl.h:81
static const String TabButtonName
Widget name for the tab button components.
Definition: widgets/TabControl.h:105
Adds name to the Element class, including name path traversal.
Definition: NamedElement.h:74
Base class for TabControl window renderer objects.
Definition: widgets/TabControl.h:54
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
A positioned and sized rectangular node in a tree graph.
Definition: Element.h:242
Base class used as the argument to all subscribers Event object.
Definition: EventArgs.h:49
struct that holds some context relating to a RenderingSurface object.
Definition: RenderingContext.h:39
UDim d_tabHeight
The height of the tabs in pixels.
Definition: widgets/TabControl.h:457
static const String TabButtonPaneName
Widget name for the tab button pane component.
Definition: widgets/TabControl.h:106
Base-class for the assignable WindowRenderer object.
Definition: WindowRenderer.h:50
const UDim & getTabHeight(void) const
Return the height of the tabs.
Definition: widgets/TabControl.h:254
float d_btGrabPos
Definition: widgets/TabControl.h:464
virtual void drawSelf(const RenderingContext &)
Perform the actual rendering for this Window.
Definition: widgets/TabControl.h:347
static const String EventSelectionChanged
Definition: widgets/TabControl.h:99
TabPanePosition d_tabPanePos
The position of the tab pane.
Definition: widgets/TabControl.h:463
An abstract base class providing common functionality and specifying the required interface for deriv...
Definition: Window.h:149
static const String WidgetTypeName
Window factory name.
Definition: widgets/TabControl.h:82
Helper class used to convert various data types to and from the format expected in Property strings...
Definition: ForwardRefs.h:84
static const String ButtonScrollRight
Widget name for the scroll tabs to left pane component.
Definition: widgets/TabControl.h:108
static const String ButtonScrollLeft
Widget name for the scroll tabs to right pane component.
Definition: widgets/TabControl.h:107
EventArgs based class that is used for objects passed to handlers triggered for events concerning som...
Definition: InputEvent.h:251
TabPanePosition getTabPanePosition(void) const
Return the positioning of the tab pane.
Definition: widgets/TabControl.h:129
float d_firstTabOffset
The offset in pixels of the first tab.
Definition: widgets/TabControl.h:462
Dimension that has both a relative 'scale' portion and and absolute 'offset' portion.
Definition: UDim.h:92
static const String ContentPaneName
Widget name for the tab content pane component.
Definition: widgets/TabControl.h:104
Class used to create XML Document.
Definition: XMLSerializer.h:85
UDim d_tabPadding
The padding of the tabs relative to parent.
Definition: widgets/TabControl.h:458
String class used within the GUI system.
Definition: String.h:62