26 #ifndef TGUI_CHILD_WINDOW_HPP 27 #define TGUI_CHILD_WINDOW_HPP 30 #include <TGUI/Container.hpp> 113 virtual bool load(
const std::string& configFileFilename,
const std::string& sectionName =
"ChildWindow");
123 const std::string& getLoadedConfigFile()
const;
135 void setSize(
float width,
float height);
146 virtual sf::Vector2f getSize()
const;
157 virtual sf::Vector2f getFullSize()
const;
171 void setBackgroundTexture(sf::Texture *
const texture =
nullptr);
181 sf::Texture* getBackgroundTexture();
192 void setTitleBarHeight(
unsigned int height);
201 unsigned int getTitleBarHeight()
const;
210 void setBackgroundColor(
const sf::Color& backgroundColor);
219 const sf::Color& getBackgroundColor()
const;
232 virtual void setTransparency(
unsigned char transparency);
241 void setTitle(
const sf::String& title);
250 const sf::String& getTitle()
const;
259 void setTitleColor(
const sf::Color& color);
268 const sf::Color& getTitleColor()
const;
277 void setBorderColor(
const sf::Color& borderColor);
286 const sf::Color& getBorderColor()
const;
298 virtual void setBorders(
unsigned int leftBorder = 0,
299 unsigned int topBorder = 0,
300 unsigned int rightBorder = 0,
301 unsigned int bottomBorder = 0);
310 void setDistanceToSide(
unsigned int distanceToSide);
319 unsigned int getDistanceToSide()
const;
348 void setIcon(
const std::string& filename);
379 void keepInParent(
bool enabled);
391 bool isKeptInParent()
const;
401 virtual sf::Vector2f getWidgetsOffset()
const;
417 void setPosition(
float x,
float y);
424 virtual bool mouseOnWidget(
float x,
float y);
429 virtual void leftMousePressed(
float x,
float y);
434 virtual void leftMouseReleased(
float x,
float y);
439 virtual void mouseMoved(
float x,
float y);
444 virtual void mouseWheelMoved(
int delta,
int x,
int y);
449 virtual void mouseNoLongerDown();
457 virtual bool setProperty(std::string property,
const std::string& value);
464 virtual bool getProperty(std::string property, std::string& value)
const;
472 virtual std::list< std::pair<std::string, std::string> > getPropertyList()
const;
482 virtual void initialize(
Container *
const container);
489 virtual void draw(sf::RenderTarget& target, sf::RenderStates states)
const;
500 LeftMousePressed = WidgetCallbacksCount * 1,
501 Closed = WidgetCallbacksCount * 2,
502 Moved = WidgetCallbacksCount * 4,
504 AllChildWindowCallbacks = WidgetCallbacksCount * 16 - 1,
505 ChildWindowCallbacksCount = WidgetCallbacksCount * 16
512 std::string m_LoadedConfigFile;
516 sf::Color m_BackgroundColor;
517 sf::Texture* m_BackgroundTexture;
518 sf::Sprite m_BackgroundSprite;
522 sf::Text m_TitleText;
523 unsigned int m_TitleBarHeight;
525 sf::Vector2f m_DraggingPosition;
526 unsigned int m_DistanceToSide;
528 sf::Color m_BorderColor;
529 bool m_MouseDownOnTitleBar;
547 #endif // TGUI_CHILD_WINDOW_HPP Namespace that contains all TGUI functions and classes.
Definition: AnimatedPicture.hpp:33
Places the title on the left side of the title bar.
Definition: ChildWindow.hpp:52
Movable Panel with title bar.
Definition: ChildWindow.hpp:41
ChildWindowCallbacks
Defines specific triggers to ChildWindow.
Definition: ChildWindow.hpp:498
Definition: TextureManager.hpp:52
Parent class for widgets that store multiple widgets.
Definition: Container.hpp:43
Places the title in the middle of the title bar.
Definition: ChildWindow.hpp:55
TitleAlignment
Title alignments, possible options for the setTitleAlignment function.
Definition: ChildWindow.hpp:49