1 #ifndef __C_GUI_ATTRIBUTE_EDITOR_H_INCLUDED__ 2 #define __C_GUI_ATTRIBUTE_EDITOR_H_INCLUDED__ 3 4 #include "IGUIElement.h" 5 #include "CGUIPanel.h" 6 #include "irrArray.h" 7 #include "IAttributes.h" 8 #include "EGUIEditTypes.h" 9 10 namespace irr 11 { 12 namespace gui 13 { 14 15 class CGUIAttribute; 16 17 18 class CGUIAttributeEditor : public CGUIPanel 19 { 20 public: 21 22 //! constructor 23 CGUIAttributeEditor(IGUIEnvironment* environment, s32 id, IGUIElement *parent=0); 24 25 //! destructor 26 ~CGUIAttributeEditor(); 27 28 // gets the current attributes list 29 virtual io::IAttributes* getAttribs(); 30 31 // update the attribute list after making a change 32 void refreshAttribs(); 33 34 // save the attributes 35 void updateAttribs(); 36 37 //! Returns the type name of the gui element. getTypeName()38 virtual const c8* getTypeName() const 39 { 40 return GUIEditElementTypeNames[EGUIEDIT_ATTRIBUTEEDITOR]; 41 } 42 43 private: 44 45 core::array<CGUIAttribute*> AttribList; // attributes editing controls 46 io::IAttributes* Attribs; // current attributes 47 CGUIPanel* Panel; 48 }; 49 50 } // end namespace gui 51 } // end namespace irr 52 53 #endif // __C_GUI_ATTRIBUTE_EDITOR_H_INCLUDED__ 54 55