#ifndef __C_GUI_WINDOW_H_INCLUDED__
#define __C_GUI_WINDOW_H_INCLUDED__
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_GUI_
#include "IGUIWindow.h"
namespace irr
{
namespace gui
{
class IGUIButton;
class CGUIWindow : public IGUIWindow
{
public:
CGUIWindow(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle);
virtual ~CGUIWindow();
virtual bool OnEvent(const SEvent& event);
virtual void updateAbsolutePosition();
virtual void draw();
virtual IGUIButton* getCloseButton() const;
virtual IGUIButton* getMinimizeButton() const;
virtual IGUIButton* getMaximizeButton() const;
virtual bool isDraggable() const;
virtual void setDraggable(bool draggable);
virtual void setDrawBackground(bool draw);
virtual bool getDrawBackground() const;
virtual void setDrawTitlebar(bool draw);
virtual bool getDrawTitlebar() const;
virtual core::rect<s32> getClientRect() const;
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const;
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options);
protected:
void updateClientRect();
void refreshSprites();
IGUIButton* CloseButton;
IGUIButton* MinButton;
IGUIButton* RestoreButton;
core::rect<s32> ClientRect;
video::SColor CurrentIconColor;
core::position2d<s32> DragStart;
bool Dragging, IsDraggable;
bool DrawBackground;
bool DrawTitlebar;
bool IsActive;
};
}
}
#endif
#endif