29 #ifndef _CEGUITabControl_h_ 30 #define _CEGUITabControl_h_ 33 #include "../Window.h" 38 # pragma warning(push) 39 # pragma warning(disable : 4251) 54 class CEGUIEXPORT TabControlWindowRenderer :
public WindowRenderer
61 TabControlWindowRenderer(
const String& name);
71 virtual TabButton* createTabButton(
const String& name)
const = 0;
78 class CEGUIEXPORT TabControl :
public Window
81 static const String EventNamespace;
82 static const String WidgetTypeName;
99 static const String EventSelectionChanged;
104 static const String ContentPaneName;
105 static const String TabButtonName;
106 static const String TabButtonPaneName;
107 static const String ButtonScrollLeft;
108 static const String ButtonScrollRight;
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;
461 TabButtonVector d_tabButtonVector;
462 float d_firstTabOffset;
463 TabPanePosition d_tabPanePos;
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;
518 typedef String string_return_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: debian/tmp/usr/include/cegui-0.8.4/CEGUI/widgets/TabControl.h:260
Base class for standard Tab Control widget.
Definition: cegui/include/CEGUI/widgets/TabControl.h:78
Adds name to the Element class, including name path traversal.
Definition: cegui/include/CEGUI/NamedElement.h:74
Main namespace for Crazy Eddie's GUI Library.
Definition: cegui/include/CEGUI/Affector.h:42
A positioned and sized rectangular node in a tree graph.
Definition: cegui/include/CEGUI/Element.h:242
Base class used as the argument to all subscribers Event object.
Definition: cegui/include/CEGUI/EventArgs.h:49
struct that holds some context relating to a RenderingSurface object.
Definition: cegui/include/CEGUI/RenderingContext.h:39
Base-class for the assignable WindowRenderer object.
Definition: cegui/include/CEGUI/WindowRenderer.h:50
const UDim & getTabHeight(void) const
Return the height of the tabs.
Definition: debian/tmp/usr/include/cegui-0.8.4/CEGUI/widgets/TabControl.h:254
virtual void drawSelf(const RenderingContext &)
Perform the actual rendering for this Window.
Definition: debian/tmp/usr/include/cegui-0.8.4/CEGUI/widgets/TabControl.h:347
An abstract base class providing common functionality and specifying the required interface for deriv...
Definition: cegui/include/CEGUI/Window.h:149
Helper class used to convert various data types to and from the format expected in Property strings...
Definition: cegui/include/CEGUI/ForwardRefs.h:84
EventArgs based class that is used for objects passed to handlers triggered for events concerning som...
Definition: cegui/include/CEGUI/InputEvent.h:251
TabPanePosition getTabPanePosition(void) const
Return the positioning of the tab pane.
Definition: debian/tmp/usr/include/cegui-0.8.4/CEGUI/widgets/TabControl.h:129
Dimension that has both a relative 'scale' portion and and absolute 'offset' portion.
Definition: cegui/include/CEGUI/UDim.h:92
Class used to create XML Document.
Definition: cegui/include/CEGUI/XMLSerializer.h:85
String class used within the GUI system.
Definition: cegui/include/CEGUI/String.h:62