irrlicht/tools/GUIEditor/CGUIEditWindow.h
bitplane 9e4d29dd2b CuteAlien's menu changes and fixes, CuteAlien/StarSonata's coloured listbox item extension.
Added a close event for windows (and in future other elements), absorbing this event will prevent the window from closing.
Used the new skin icon in the gui editor's resize button.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@879 dfc29bdd-3216-0410-991c-e03cc46cb475
2007-08-29 23:37:24 +00:00

68 lines
1.7 KiB
C++

#ifndef __C_GUI_EDITOR_H_INCLUDED__
#define __C_GUI_EDITOR_H_INCLUDED__
#include "IGUIWindow.h"
#include "CGUIAttributeEditor.h"
//#include "IGUIStaticText.h"
#include "IGUIButton.h"
#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
virtual bool OnEvent(SEvent event);
//! change selection
virtual void setSelectedElement(IGUIElement *sel);
// not used
virtual IGUIButton* getCloseButton();
virtual IGUIButton* getMinimizeButton();
virtual IGUIButton* getMaximizeButton();
CGUIAttributeEditor* getAttributeEditor();
CGUIAttributeEditor* getOptionEditor();
CGUIAttributeEditor* getEnvironmentEditor();
//! 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
bool Dragging;
bool Resizing;
core::position2d<s32> DragStart;
IGUIElement* SelectedElement; // current selected element
CGUIAttributeEditor* AttribEditor; // edits the current attribute
CGUIAttributeEditor* OptionEditor; // edits the options for the window
CGUIAttributeEditor* EnvEditor; // edits attributes for the environment
IGUIButton* ResizeButton;
};
} // end namespace gui
} // end namespace irr
#endif // __C_GUI_EDITOR_H_INCLUDED__