26 #ifndef _TGUI_TAB_INCLUDED_
27 #define _TGUI_TAB_INCLUDED_
72 Tab& operator= (
const Tab& right);
78 virtual void initialize();
101 virtual bool load(
const std::string& pathname);
117 virtual void setSize(
float width,
float height);
126 virtual Vector2u getSize()
const;
135 virtual Vector2f getScaledSize()
const;
145 virtual std::string getLoadedPathname()
const;
159 virtual unsigned int add(
const sf::String& name,
bool select =
true);
173 virtual void select(
const sf::String& name);
186 virtual void select(
unsigned int index);
193 virtual void deselect();
206 virtual void remove(
const sf::String& name);
219 virtual void remove(
unsigned int index);
226 virtual void removeAll();
236 virtual sf::String getSelected()
const;
248 virtual int getSelectedIndex()
const;
260 virtual void setTextFont(
const sf::Font& font);
269 virtual const sf::Font* getTextFont()
const;
278 virtual void setTextColor(
const sf::Color& color);
287 virtual const sf::Color& getTextColor()
const;
297 virtual void setTextSize(
unsigned int size);
306 virtual unsigned int getTextSize()
const;
317 virtual void setTabHeight(
unsigned int height);
326 virtual unsigned int getTabHeight()
const;
333 virtual bool mouseOnObject(
float x,
float y);
334 virtual void leftMousePressed(
float x,
float y);
345 virtual void draw(sf::RenderTarget& target, sf::RenderStates states)
const;
362 std::string m_LoadedPathname;
364 bool m_SeparateSelectedImage;
366 unsigned int m_TabHeight;
367 unsigned int m_TextSize;
371 std::vector<sf::String> m_TabNames;
372 std::vector<float> m_NameWidth;
374 sf::Texture* m_TextureNormal_L;
375 sf::Texture* m_TextureNormal_M;
376 sf::Texture* m_TextureNormal_R;
377 sf::Texture* m_TextureSelected_L;
378 sf::Texture* m_TextureSelected_M;
379 sf::Texture* m_TextureSelected_R;
381 sf::Sprite m_SpriteNormal_L;
382 sf::Sprite m_SpriteNormal_M;
383 sf::Sprite m_SpriteNormal_R;
384 sf::Sprite m_SpriteSelected_L;
385 sf::Sprite m_SpriteSelected_M;
386 sf::Sprite m_SpriteSelected_R;
400 #endif //_TGUI_TAB_INCLUDED_
The parent struct for every object.
Definition: Objects.hpp:36
unsigned int maximumTabWidth
Definition: Tab.hpp:356
unsigned int distanceToSide
The distance between the side of the tab and the text that is drawn on top of the tab...
Definition: Tab.hpp:352