]> git.lizzy.rs Git - irrlicht.git/blob - include/IGUIWindow.h
Fix COSOperator::getSystemMemory
[irrlicht.git] / include / IGUIWindow.h
1 // Copyright (C) 2002-2012 Nikolaus Gebhardt\r
2 // This file is part of the "Irrlicht Engine".\r
3 // For conditions of distribution and use, see copyright notice in irrlicht.h\r
4 \r
5 #ifndef __I_GUI_WINDOW_H_INCLUDED__\r
6 #define __I_GUI_WINDOW_H_INCLUDED__\r
7 \r
8 #include "IGUIElement.h"\r
9 #include "EMessageBoxFlags.h"\r
10 \r
11 namespace irr\r
12 {\r
13 namespace gui\r
14 {\r
15         class IGUIButton;\r
16 \r
17         //! Default moveable window GUI element with border, caption and close icons.\r
18         /** \par This element can create the following events of type EGUI_EVENT_TYPE:\r
19         \li EGET_ELEMENT_CLOSED\r
20         */\r
21         class IGUIWindow : public IGUIElement\r
22         {\r
23         public:\r
24 \r
25                 //! constructor\r
26                 IGUIWindow(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)\r
27                         : IGUIElement(EGUIET_WINDOW, environment, parent, id, rectangle) {}\r
28 \r
29                 //! Returns pointer to the close button\r
30                 /** You can hide the button by calling setVisible(false) on the result. */\r
31                 virtual IGUIButton* getCloseButton() const = 0;\r
32 \r
33                 //! Returns pointer to the minimize button\r
34                 /** You can hide the button by calling setVisible(false) on the result. */\r
35                 virtual IGUIButton* getMinimizeButton() const = 0;\r
36 \r
37                 //! Returns pointer to the maximize button\r
38                 /** You can hide the button by calling setVisible(false) on the result. */\r
39                 virtual IGUIButton* getMaximizeButton() const = 0;\r
40 \r
41                 //! Returns true if the window can be dragged with the mouse, false if not\r
42                 virtual bool isDraggable() const = 0;\r
43 \r
44                 //! Sets whether the window can be dragged by the mouse\r
45                 virtual void setDraggable(bool draggable) = 0;\r
46 \r
47                 //! Set if the window background will be drawn\r
48                 virtual void setDrawBackground(bool draw) = 0;\r
49 \r
50                 //! Get if the window background will be drawn\r
51                 virtual bool getDrawBackground() const = 0;\r
52 \r
53                 //! Set if the window titlebar will be drawn\r
54                 //! Note: If the background is not drawn, then the titlebar is automatically also not drawn\r
55                 virtual void setDrawTitlebar(bool draw) = 0;\r
56 \r
57                 //! Get if the window titlebar will be drawn\r
58                 virtual bool getDrawTitlebar() const = 0;\r
59 \r
60                 //! Returns the rectangle of the drawable area (without border and without titlebar)\r
61                 /** The coordinates are given relative to the top-left position of the gui element.<br>\r
62                 So to get absolute positions you have to add the resulting rectangle to getAbsolutePosition().UpperLeftCorner.<br>\r
63                 To get it relative to the parent element you have to add the resulting rectangle to getRelativePosition().UpperLeftCorner.\r
64                 Beware that adding a menu will not change the clientRect as menus are own gui elements, so in that case you might want to subtract\r
65                 the menu area additionally. */\r
66                 virtual core::rect<s32> getClientRect() const = 0;\r
67         };\r
68 \r
69 \r
70 } // end namespace gui\r
71 } // end namespace irr\r
72 \r
73 #endif\r
74 \r