26 #ifndef _TGUI_CHILD_WINDOW_INCLUDED_
27 #define _TGUI_CHILD_WINDOW_INCLUDED_
50 TitleAlignmentCentered,
100 virtual bool load(
float width,
float height,
const sf::Color& backgroundColor,
const std::string& pathname);
108 virtual std::string getLoadedPathname()
const;
117 virtual bool setBackgroundImage(
const std::string& filename =
"");
125 virtual void setTitlebarHeight(
unsigned int height);
131 virtual unsigned int getTitleBarHeight()
const;
142 virtual void setTransparency(
unsigned char transparency);
148 virtual unsigned char getTransparency()
const;
159 virtual void setBorders(
unsigned int leftBorder = 0,
160 unsigned int topBorder = 0,
161 unsigned int rightBorder = 0,
162 unsigned int bottomBorder = 0);
168 virtual bool mouseOnObject(
float x,
float y);
177 virtual void handleEvent(sf::Event& event,
float mouseX = 0,
float mouseY = 0);
184 virtual void draw(sf::RenderTarget& target, sf::RenderStates states)
const;
208 unsigned int m_TitleBarHeight;
209 std::string m_LoadedPathname;
211 Vector2f m_DraggingPosition;
212 unsigned char m_Opacity;
214 sf::Texture* m_TextureTitleBar_L;
215 sf::Texture* m_TextureTitleBar_M;
216 sf::Texture* m_TextureTitleBar_R;
218 sf::Sprite m_SpriteTitleBar_L;
219 sf::Sprite m_SpriteTitleBar_M;
220 sf::Sprite m_SpriteTitleBar_R;
232 #endif //_TGUI_CHILD_WINDOW_INCLUDED_
Layout layout
Should the close button be on the right side or on the left side of the title bar?
Definition: ChildWindow.hpp:191
Movable Panel with title bar.
Definition: ChildWindow.hpp:36
sf::String title
The title of the window.
Definition: ChildWindow.hpp:203
Parent struct for every object that has borders.
Definition: Objects.hpp:299
sf::Color borderColor
The color that is used to draw the borders of the window.
Definition: ChildWindow.hpp:200
TitleAlignment titleAlignment
Should the text be on the left or the right or should it be centered?
Definition: ChildWindow.hpp:194
A static group of objects. The background color can be solid or transparent.
Definition: Panel.hpp:36
unsigned int distanceToSide
The distance between the side of the title bar and the close button.
Definition: ChildWindow.hpp:197