Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members | Tutorials

# IGUIContextMenu.h

Go to the documentation of this file.

    00001 // Copyright (C) 2002-2009 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_CONTEXT_MENU_H_INCLUDED__
    00006 #define __I_GUI_CONTEXT_MENU_H_INCLUDED__
    00007
    00008 #include "IGUIElement.h"
    00009
    00010 namespace irr
    00011 {
    00012 namespace gui
    00013 {
    00014
    00016         class IGUIContextMenu : public IGUIElement
    00017         {
    00018         public:
    00019
    00021                 IGUIContextMenu(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
    00022                         : IGUIElement(EGUIET_CONTEXT_MENU, environment, parent, id, rectangle) {}
    00023
    00025                 virtual u32 getItemCount() const = 0;
    00026
    00028
    00038                 virtual u32 addItem(const wchar_t* text, s32 commandId=-1, bool enabled=true,
    00039                         bool hasSubMenu=false, bool checked=false) = 0;
    00040
    00042                 virtual void addSeparator() = 0;
    00043
    00045
    00046                 virtual const wchar_t* getItemText(u32 idx) const = 0;
    00047
    00049
    00051                 virtual void setItemText(u32 idx, const wchar_t* text) = 0;
    00052
    00054
    00055                 virtual bool isItemEnabled(u32 idx) const = 0;
    00056
    00058
    00060                 virtual void setItemEnabled(u32 idx, bool enabled) = 0;
    00061
    00063
    00065                 virtual void setItemChecked(u32 idx, bool enabled) = 0;
    00066
    00068
    00069                 virtual bool isItemChecked(u32 idx) const = 0;
    00070
    00072
    00073                 virtual void removeItem(u32 idx) = 0;
    00074
    00076                 virtual void removeAllItems() = 0;
    00077
    00079
    00080                 virtual s32 getSelectedItem() const = 0;
    00081
    00083
    00084                 virtual s32 getItemCommandId(u32 idx) const = 0;
    00085
    00087
    00090                 virtual void setItemCommandId(u32 idx, s32 id) = 0;
    00091
    00093
    00096                 virtual IGUIContextMenu* getSubMenu(u32 idx) const = 0;
    00097         };
    00098
    00099 } // end namespace gui
    00100 } // end namespace irr
    00101
    00102 #endif
    00103

| The Irrlicht Engine Documentation © 2003-2009 by Nikolaus Gebhardt. Generated on Sun Jan 10 09:24:03 2010 by Doxygen (1.5.6)