1
#ifndef __C_GUI_EDITOR_H_INCLUDED__
2
#define __C_GUI_EDITOR_H_INCLUDED__
5
#include "IGUIWindow.h"
6
#include "CGUIAttributeEditor.h"
7
//#include "IGUIStaticText.h"
8
#include "IGUIButton.h"
9
#include "IGUITreeView.h"
11
#include "IAttributes.h"
12
#include "EGUIEditTypes.h"
18
class CGUIEditWindow : public IGUIWindow
23
CGUIEditWindow(IGUIEnvironment* environment, core::rect<s32> rectangle, IGUIElement *parent);
28
//! this part draws the window
31
virtual bool OnEvent(const SEvent &event);
34
virtual void setSelectedElement(IGUIElement *sel);
37
virtual bool isDraggable() const;
40
virtual void setDraggable(bool draggable);
43
virtual core::rect<s32> getClientRect() const;
44
virtual IGUIButton* getCloseButton() const;
45
virtual IGUIButton* getMinimizeButton() const;
46
virtual IGUIButton* getMaximizeButton() const;
47
virtual void setDrawBackground(bool draw) { }
48
virtual bool getDrawBackground() const { return true; }
49
virtual void setDrawTitlebar(bool draw) { }
50
virtual bool getDrawTitlebar() const { return true; }
52
IGUITreeView* getTreeView() const;
53
CGUIAttributeEditor* getAttributeEditor() const;
54
CGUIAttributeEditor* getOptionEditor() const;
55
CGUIAttributeEditor* getEnvironmentEditor() const;
57
//! Returns the type name of the gui element.
58
virtual const c8* getTypeName() const
60
return GUIEditElementTypeNames[EGUIEDIT_GUIEDITWINDOW];
66
void addChildrenToTree(IGUIElement* parentElement, IGUITreeViewNode* treenode);
67
IGUITreeViewNode* getTreeNode(IGUIElement* element, IGUITreeViewNode* searchnode);
68
// for dragging the window
72
core::position2d<s32> DragStart;
74
IGUIElement* SelectedElement; // current selected element
76
CGUIAttributeEditor* AttribEditor; // edits the current attribute
77
CGUIAttributeEditor* OptionEditor; // edits the options for the window
78
CGUIAttributeEditor* EnvEditor; // edits attributes for the environment
79
IGUITreeView* TreeView; // tree view of all elements in scene
80
IGUIButton* ResizeButton;
84
} // end namespace gui
85
} // end namespace irr
87
#endif // __C_GUI_EDITOR_H_INCLUDED__