Irrlicht 3D Engine: IGUIListBox.h Source File

| Irrlicht 3D Engine |

IGUIListBox.h
Go to the documentation of this file.

    00001 // Copyright (C) 2002-2012 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_LIST_BOX_H_INCLUDED__
    00006 #define __I_GUI_LIST_BOX_H_INCLUDED__
    00007
    00008 #include "IGUIElement.h"
    00009 #include "SColor.h"
    00010
    00011 namespace irr
    00012 {
    00013 namespace gui
    00014 {
    00015     class IGUISpriteBank;
    00016
    00018     enum EGUI_LISTBOX_COLOR
    00019     {
    00021         EGUI_LBC_TEXT=0,
    00023         EGUI_LBC_TEXT_HIGHLIGHT,
    00025         EGUI_LBC_ICON,
    00027         EGUI_LBC_ICON_HIGHLIGHT,
    00029         EGUI_LBC_COUNT
    00030     };
    00031
    00032
    00034
    00038     class IGUIListBox : public IGUIElement
    00039     {
    00040     public:
    00042         IGUIListBox(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
    00043             : IGUIElement(EGUIET_LIST_BOX, environment, parent, id, rectangle) {}
    00044
    00046         virtual u32 getItemCount() const = 0;
    00047
    00049         virtual const wchar_t* getListItem(u32 id) const = 0;
    00050
    00052         virtual u32 addItem(const wchar_t* text) = 0;
    00053
    00055
    00058         virtual u32 addItem(const wchar_t* text, s32 icon) = 0;
    00059
    00061         virtual void removeItem(u32 index) = 0;
    00062
    00064
    00065         virtual s32 getItemAt(s32 xpos, s32 ypos) const = 0;
    00066
    00068         virtual s32 getIcon(u32 index) const = 0;
    00069
    00071
    00075         virtual void setSpriteBank(IGUISpriteBank* bank) = 0;
    00076
    00078         virtual void clear() = 0;
    00079
    00081         virtual s32 getSelected() const = 0;
    00082
    00084         virtual void setSelected(s32 index) = 0;
    00085
    00087         virtual void setSelected(const wchar_t *item) = 0;
    00088
    00090         virtual void setAutoScrollEnabled(bool scroll) = 0;
    00091
    00093         virtual bool isAutoScrollEnabled() const = 0;
    00094
    00096         virtual void setItemOverrideColor(u32 index, video::SColor color) = 0;
    00097
    00099         virtual void setItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType, video::SColor color) = 0;
    00100
    00102         virtual void clearItemOverrideColor(u32 index) = 0;
    00103
    00105         virtual void clearItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType) = 0;
    00106
    00108         virtual bool hasItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType) const = 0;
    00109
    00111         virtual video::SColor getItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType) const = 0;
    00112
    00114         virtual video::SColor getItemDefaultColor(EGUI_LISTBOX_COLOR colorType) const = 0;
    00115
    00117         virtual void setItem(u32 index, const wchar_t* text, s32 icon) = 0;
    00118
    00120
    00121         virtual s32 insertItem(u32 index, const wchar_t* text, s32 icon) = 0;
    00122
    00124         virtual void swapItems(u32 index1, u32 index2) = 0;
    00125
    00127         virtual void setItemHeight( s32 height ) = 0;
    00128
    00130         virtual void setDrawBackground(bool draw) = 0;
    00131 };
    00132
    00133
    00134 } // end namespace gui
    00135 } // end namespace irr
    00136
    00137 #endif
    00138