diff options
author | David Walter Seikel | 2014-01-13 19:47:58 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-01-13 19:47:58 +1000 |
commit | f9158592e1478b2013afc7041d9ed041cf2d2f4a (patch) | |
tree | b16e389d7988700e21b4c9741044cefa536dcbae /libraries/irrlicht-1.8.1/include/IGUITabControl.h | |
parent | Libraries readme updated with change markers and more of the Irrlicht changes. (diff) | |
download | SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.zip SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.gz SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.bz2 SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.xz |
Update Irrlicht to 1.8.1. Include actual change markers this time. lol
Diffstat (limited to 'libraries/irrlicht-1.8.1/include/IGUITabControl.h')
-rw-r--r-- | libraries/irrlicht-1.8.1/include/IGUITabControl.h | 136 |
1 files changed, 136 insertions, 0 deletions
diff --git a/libraries/irrlicht-1.8.1/include/IGUITabControl.h b/libraries/irrlicht-1.8.1/include/IGUITabControl.h new file mode 100644 index 0000000..660c4d0 --- /dev/null +++ b/libraries/irrlicht-1.8.1/include/IGUITabControl.h | |||
@@ -0,0 +1,136 @@ | |||
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 | |||
12 | namespace irr | ||
13 | { | ||
14 | namespace gui | ||
15 | { | ||
16 | //! A tab-page, onto which other gui elements could be added. | ||
17 | /** IGUITab refers to the page itself, not to the tab in the tabbar of an IGUITabControl. */ | ||
18 | class IGUITab : public IGUIElement | ||
19 | { | ||
20 | public: | ||
21 | |||
22 | //! constructor | ||
23 | IGUITab(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) | ||
24 | : IGUIElement(EGUIET_TAB, environment, parent, id, rectangle) {} | ||
25 | |||
26 | //! Returns zero based index of tab if in tabcontrol. | ||
27 | /** Can be accessed later IGUITabControl::getTab() by this number. | ||
28 | Note that this number can change when other tabs are inserted or removed . | ||
29 | */ | ||
30 | virtual s32 getNumber() const = 0; | ||
31 | |||
32 | //! sets if the tab should draw its background | ||
33 | virtual void setDrawBackground(bool draw=true) = 0; | ||
34 | |||
35 | //! sets the color of the background, if it should be drawn. | ||
36 | virtual void setBackgroundColor(video::SColor c) = 0; | ||
37 | |||
38 | //! returns true if the tab is drawing its background, false if not | ||
39 | virtual bool isDrawingBackground() const = 0; | ||
40 | |||
41 | //! returns the color of the background | ||
42 | virtual video::SColor getBackgroundColor() const = 0; | ||
43 | |||
44 | //! sets the color of the text | ||
45 | virtual void setTextColor(video::SColor c) = 0; | ||
46 | |||
47 | //! gets the color of the text | ||
48 | virtual video::SColor getTextColor() const = 0; | ||
49 | }; | ||
50 | |||
51 | //! A standard tab control | ||
52 | /** \par This element can create the following events of type EGUI_EVENT_TYPE: | ||
53 | \li EGET_TAB_CHANGED | ||
54 | */ | ||
55 | class IGUITabControl : public IGUIElement | ||
56 | { | ||
57 | public: | ||
58 | |||
59 | //! constructor | ||
60 | IGUITabControl(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) | ||
61 | : IGUIElement(EGUIET_TAB_CONTROL, environment, parent, id, rectangle) {} | ||
62 | |||
63 | //! Adds a tab | ||
64 | virtual IGUITab* addTab(const wchar_t* caption, s32 id=-1) = 0; | ||
65 | |||
66 | //! Insert the tab at the given index | ||
67 | /** \return The tab on success or NULL on failure. */ | ||
68 | virtual IGUITab* insertTab(s32 idx, const wchar_t* caption, s32 id=-1) = 0; | ||
69 | |||
70 | //! Removes a tab from the tabcontrol | ||
71 | virtual void removeTab(s32 idx) = 0; | ||
72 | |||
73 | //! Clears the tabcontrol removing all tabs | ||
74 | virtual void clear() = 0; | ||
75 | |||
76 | //! Returns amount of tabs in the tabcontrol | ||
77 | virtual s32 getTabCount() const = 0; | ||
78 | |||
79 | //! Returns a tab based on zero based index | ||
80 | /** \param idx: zero based index of tab. Is a value betwenn 0 and getTabcount()-1; | ||
81 | \return Returns pointer to the Tab. Returns 0 if no tab | ||
82 | is corresponding to this tab. */ | ||
83 | virtual IGUITab* getTab(s32 idx) const = 0; | ||
84 | |||
85 | //! Brings a tab to front. | ||
86 | /** \param idx: number of the tab. | ||
87 | \return Returns true if successful. */ | ||
88 | virtual bool setActiveTab(s32 idx) = 0; | ||
89 | |||
90 | //! Brings a tab to front. | ||
91 | /** \param tab: pointer to the tab. | ||
92 | \return Returns true if successful. */ | ||
93 | virtual bool setActiveTab(IGUITab *tab) = 0; | ||
94 | |||
95 | //! Returns which tab is currently active | ||
96 | virtual s32 getActiveTab() const = 0; | ||
97 | |||
98 | //! get the the id of the tab at the given absolute coordinates | ||
99 | /** \return The id of the tab or -1 when no tab is at those coordinates*/ | ||
100 | virtual s32 getTabAt(s32 xpos, s32 ypos) const = 0; | ||
101 | |||
102 | //! Set the height of the tabs | ||
103 | virtual void setTabHeight( s32 height ) = 0; | ||
104 | |||
105 | //! Get the height of the tabs | ||
106 | /** return Returns the height of the tabs */ | ||
107 | virtual s32 getTabHeight() const = 0; | ||
108 | |||
109 | //! set the maximal width of a tab. Per default width is 0 which means "no width restriction". | ||
110 | virtual void setTabMaxWidth(s32 width ) = 0; | ||
111 | |||
112 | //! get the maximal width of a tab | ||
113 | virtual s32 getTabMaxWidth() const = 0; | ||
114 | |||
115 | //! Set the alignment of the tabs | ||
116 | /** Use EGUIA_UPPERLEFT or EGUIA_LOWERRIGHT */ | ||
117 | virtual void setTabVerticalAlignment( gui::EGUI_ALIGNMENT alignment ) = 0; | ||
118 | |||
119 | //! Get the alignment of the tabs | ||
120 | /** return Returns the alignment of the tabs */ | ||
121 | virtual gui::EGUI_ALIGNMENT getTabVerticalAlignment() const = 0; | ||
122 | |||
123 | //! Set the extra width added to tabs on each side of the text | ||
124 | virtual void setTabExtraWidth( s32 extraWidth ) = 0; | ||
125 | |||
126 | //! Get the extra width added to tabs on each side of the text | ||
127 | /** return Returns the extra width of the tabs */ | ||
128 | virtual s32 getTabExtraWidth() const = 0; | ||
129 | }; | ||
130 | |||
131 | |||
132 | } // end namespace gui | ||
133 | } // end namespace irr | ||
134 | |||
135 | #endif | ||
136 | |||