Irrlicht 3D Engine
 
Loading...
Searching...
No Matches
IGUITabControl.h
Go to the documentation of this file.
1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h
4
5#ifndef __I_GUI_TAB_CONTROL_H_INCLUDED__
6#define __I_GUI_TAB_CONTROL_H_INCLUDED__
7
8#include "IGUIElement.h"
9#include "SColor.h"
10#include "IGUISkin.h"
11
12namespace irr
13{
14namespace gui
15{
17
18 class IGUITab : public IGUIElement
19 {
20 public:
21
23 IGUITab(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
24 : IGUIElement(EGUIET_TAB, environment, parent, id, rectangle) {}
25
27
30 virtual s32 getNumber() const = 0;
31
33 virtual void setDrawBackground(bool draw=true) = 0;
34
36 virtual void setBackgroundColor(video::SColor c) = 0;
37
39 virtual bool isDrawingBackground() const = 0;
40
42 virtual video::SColor getBackgroundColor() const = 0;
43
45 virtual void setTextColor(video::SColor c) = 0;
46
48 virtual video::SColor getTextColor() const = 0;
49 };
50
52
56 {
57 public:
58
60 IGUITabControl(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
61 : IGUIElement(EGUIET_TAB_CONTROL, environment, parent, id, rectangle) {}
62
64 virtual IGUITab* addTab(const wchar_t* caption, s32 id=-1) = 0;
65
67
68 virtual IGUITab* insertTab(s32 idx, const wchar_t* caption, s32 id=-1) = 0;
69
71 virtual void removeTab(s32 idx) = 0;
72
74 virtual void clear() = 0;
75
77 virtual s32 getTabCount() const = 0;
78
80
83 virtual IGUITab* getTab(s32 idx) const = 0;
84
86
88 virtual bool setActiveTab(s32 idx) = 0;
89
91
93 virtual bool setActiveTab(IGUITab *tab) = 0;
94
96 virtual s32 getActiveTab() const = 0;
97
99
100 virtual s32 getTabAt(s32 xpos, s32 ypos) const = 0;
101
103 virtual void setTabHeight( s32 height ) = 0;
104
106
107 virtual s32 getTabHeight() const = 0;
108
110 virtual void setTabMaxWidth(s32 width ) = 0;
111
113 virtual s32 getTabMaxWidth() const = 0;
114
116
117 virtual void setTabVerticalAlignment( gui::EGUI_ALIGNMENT alignment ) = 0;
118
120
122
124 virtual void setTabExtraWidth( s32 extraWidth ) = 0;
125
127
128 virtual s32 getTabExtraWidth() const = 0;
129 };
130
131
132} // end namespace gui
133} // end namespace irr
134
135#endif
136
Axis aligned bounding box in 3d dimensional space.
Definition aabbox3d.h:22
Base class of all GUI elements.
Definition IGUIElement.h:26
virtual void draw()
Draws the element and its children.
GUI Environment. Used as factory and manager of all other GUI elements.
A standard tab control.
IGUITabControl(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)
constructor
virtual void removeTab(s32 idx)=0
Removes a tab from the tabcontrol.
virtual bool setActiveTab(s32 idx)=0
Brings a tab to front.
virtual gui::EGUI_ALIGNMENT getTabVerticalAlignment() const =0
Get the alignment of the tabs.
virtual void setTabVerticalAlignment(gui::EGUI_ALIGNMENT alignment)=0
Set the alignment of the tabs.
virtual IGUITab * addTab(const wchar_t *caption, s32 id=-1)=0
Adds a tab.
virtual s32 getTabMaxWidth() const =0
get the maximal width of a tab
virtual IGUITab * insertTab(s32 idx, const wchar_t *caption, s32 id=-1)=0
Insert the tab at the given index.
virtual void setTabMaxWidth(s32 width)=0
set the maximal width of a tab. Per default width is 0 which means "no width restriction".
virtual s32 getTabCount() const =0
Returns amount of tabs in the tabcontrol.
virtual void setTabHeight(s32 height)=0
Set the height of the tabs.
virtual IGUITab * getTab(s32 idx) const =0
Returns a tab based on zero based index.
virtual void setTabExtraWidth(s32 extraWidth)=0
Set the extra width added to tabs on each side of the text.
virtual s32 getTabAt(s32 xpos, s32 ypos) const =0
get the the id of the tab at the given absolute coordinates
virtual void clear()=0
Clears the tabcontrol removing all tabs.
virtual bool setActiveTab(IGUITab *tab)=0
Brings a tab to front.
virtual s32 getActiveTab() const =0
Returns which tab is currently active.
virtual s32 getTabExtraWidth() const =0
Get the extra width added to tabs on each side of the text.
virtual s32 getTabHeight() const =0
Get the height of the tabs.
A tab-page, onto which other gui elements could be added.
virtual void setDrawBackground(bool draw=true)=0
sets if the tab should draw its background
IGUITab(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)
constructor
virtual void setTextColor(video::SColor c)=0
sets the color of the text
virtual video::SColor getTextColor() const =0
gets the color of the text
virtual bool isDrawingBackground() const =0
returns true if the tab is drawing its background, false if not
virtual video::SColor getBackgroundColor() const =0
returns the color of the background
virtual void setBackgroundColor(video::SColor c)=0
sets the color of the background, if it should be drawn.
virtual s32 getNumber() const =0
Returns zero based index of tab if in tabcontrol.
Class representing a 32 bit ARGB color.
Definition SColor.h:202
@ EGUIET_TAB
A tab (IGUITab)
@ EGUIET_TAB_CONTROL
A tab control.
Everything in the Irrlicht Engine can be found in this namespace.
Definition aabbox3d.h:13
signed int s32
32 bit signed variable.
Definition irrTypes.h:66