|
IrrlichtEngine
|
00001 // Copyright (C) 2002-2011 Nikolaus Gebhardt 00002 // This file is part of the "Irrlicht Engine". 00003 // For conditions of distribution and use, see copyright notice in irrlicht.h 00004 00005 #ifndef __I_GUI_TAB_CONTROL_H_INCLUDED__ 00006 #define __I_GUI_TAB_CONTROL_H_INCLUDED__ 00007 00008 #include "IGUIElement.h" 00009 #include "SColor.h" 00010 #include "IGUISkin.h" 00011 00012 namespace irr 00013 { 00014 namespace gui 00015 { 00017 00018 class IGUITab : public IGUIElement 00019 { 00020 public: 00021 00023 IGUITab(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) 00024 : IGUIElement(EGUIET_TAB, environment, parent, id, rectangle) {} 00025 00027 00030 virtual s32 getNumber() const = 0; 00031 00033 virtual void setDrawBackground(bool draw=true) = 0; 00034 00036 virtual void setBackgroundColor(video::SColor c) = 0; 00037 00039 virtual bool isDrawingBackground() const = 0; 00040 00042 virtual video::SColor getBackgroundColor() const = 0; 00043 00045 virtual void setTextColor(video::SColor c) = 0; 00046 00048 virtual video::SColor getTextColor() const = 0; 00049 }; 00050 00052 class IGUITabControl : public IGUIElement 00053 { 00054 public: 00055 00057 IGUITabControl(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) 00058 : IGUIElement(EGUIET_TAB_CONTROL, environment, parent, id, rectangle) {} 00059 00061 virtual IGUITab* addTab(const wchar_t* caption, s32 id=-1) = 0; 00062 00064 00065 virtual IGUITab* insertTab(s32 idx, const wchar_t* caption, s32 id=-1) = 0; 00066 00068 virtual void removeTab(s32 idx) = 0; 00069 00071 virtual void clear() = 0; 00072 00074 virtual s32 getTabCount() const = 0; 00075 00077 00080 virtual IGUITab* getTab(s32 idx) const = 0; 00081 00083 00085 virtual bool setActiveTab(s32 idx) = 0; 00086 00088 00090 virtual bool setActiveTab(IGUITab *tab) = 0; 00091 00093 virtual s32 getActiveTab() const = 0; 00094 00096 00097 virtual s32 getTabAt(s32 xpos, s32 ypos) const = 0; 00098 00100 virtual void setTabHeight( s32 height ) = 0; 00101 00103 00104 virtual s32 getTabHeight() const = 0; 00105 00107 virtual void setTabMaxWidth(s32 width ) = 0; 00108 00110 virtual s32 getTabMaxWidth() const = 0; 00111 00113 00114 virtual void setTabVerticalAlignment( gui::EGUI_ALIGNMENT alignment ) = 0; 00115 00117 00118 virtual gui::EGUI_ALIGNMENT getTabVerticalAlignment() const = 0; 00119 00121 virtual void setTabExtraWidth( s32 extraWidth ) = 0; 00122 00124 00125 virtual s32 getTabExtraWidth() const = 0; 00126 }; 00127 00128 00129 } // end namespace gui 00130 } // end namespace irr 00131 00132 #endif 00133