CGUIAttributeEditor.h 1.1 KB

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