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