2007-05-20 11:03:49 -07:00
|
|
|
#ifndef __C_GUI_EDITOR_H_INCLUDED__
|
|
|
|
#define __C_GUI_EDITOR_H_INCLUDED__
|
|
|
|
|
|
|
|
|
|
|
|
#include "IGUIWindow.h"
|
|
|
|
#include "CGUIAttributeEditor.h"
|
2007-08-29 16:37:24 -07:00
|
|
|
//#include "IGUIStaticText.h"
|
|
|
|
#include "IGUIButton.h"
|
2007-05-20 11:03:49 -07:00
|
|
|
#include "irrArray.h"
|
|
|
|
#include "IAttributes.h"
|
|
|
|
|
|
|
|
namespace irr
|
|
|
|
{
|
|
|
|
namespace gui
|
|
|
|
{
|
|
|
|
class CGUIEditWindow : public IGUIWindow
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
//! constructor
|
|
|
|
CGUIEditWindow(IGUIEnvironment* environment, core::rect<s32> rectangle, IGUIElement *parent);
|
|
|
|
|
|
|
|
//! destructor
|
|
|
|
~CGUIEditWindow();
|
|
|
|
|
|
|
|
//! this part draws the window
|
|
|
|
virtual void draw();
|
|
|
|
//! handles events
|
2007-09-19 01:03:29 -07:00
|
|
|
virtual bool OnEvent(const SEvent &event);
|
2007-05-20 11:03:49 -07:00
|
|
|
|
|
|
|
//! change selection
|
|
|
|
virtual void setSelectedElement(IGUIElement *sel);
|
|
|
|
|
2009-03-11 03:26:33 -07:00
|
|
|
//! get draggable
|
|
|
|
virtual bool isDraggable() const;
|
|
|
|
|
|
|
|
//! get draggable
|
|
|
|
virtual void setDraggable(bool draggable);
|
|
|
|
|
2007-05-20 11:03:49 -07:00
|
|
|
// not used
|
2007-09-19 01:03:29 -07:00
|
|
|
virtual IGUIButton* getCloseButton() const;
|
|
|
|
virtual IGUIButton* getMinimizeButton() const;
|
|
|
|
virtual IGUIButton* getMaximizeButton() const;
|
2009-07-09 13:54:21 -07:00
|
|
|
virtual void setDrawBackground(bool draw) { }
|
|
|
|
virtual bool getDrawBackground() const { return true; }
|
|
|
|
virtual void setDrawTitlebar(bool draw) { }
|
|
|
|
virtual bool getDrawTitlebar() const { return true; }
|
2007-05-20 11:03:49 -07:00
|
|
|
|
2007-09-19 01:03:29 -07:00
|
|
|
CGUIAttributeEditor* getAttributeEditor() const;
|
|
|
|
CGUIAttributeEditor* getOptionEditor() const;
|
|
|
|
CGUIAttributeEditor* getEnvironmentEditor() const;
|
2007-05-20 11:03:49 -07:00
|
|
|
|
|
|
|
//! this shoudln't be serialized, but this is included as it's an example
|
|
|
|
virtual const c8* getTypeName() const { return "GUIEditWindow"; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
|
|
// for dragging the window
|
2007-08-29 16:37:24 -07:00
|
|
|
bool Dragging;
|
2009-03-11 03:26:33 -07:00
|
|
|
bool IsDraggable;
|
2007-08-29 16:37:24 -07:00
|
|
|
bool Resizing;
|
|
|
|
core::position2d<s32> DragStart;
|
2007-05-20 11:03:49 -07:00
|
|
|
|
2007-08-29 16:37:24 -07:00
|
|
|
IGUIElement* SelectedElement; // current selected element
|
2007-05-20 11:03:49 -07:00
|
|
|
|
2007-08-29 16:37:24 -07:00
|
|
|
CGUIAttributeEditor* AttribEditor; // edits the current attribute
|
|
|
|
CGUIAttributeEditor* OptionEditor; // edits the options for the window
|
|
|
|
CGUIAttributeEditor* EnvEditor; // edits attributes for the environment
|
|
|
|
IGUIButton* ResizeButton;
|
2007-05-20 11:03:49 -07:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace gui
|
|
|
|
} // end namespace irr
|
|
|
|
|
|
|
|
#endif // __C_GUI_EDITOR_H_INCLUDED__
|
|
|
|
|