26 #ifndef _TGUI_COMBO_BOX_INCLUDED_
27 #define _TGUI_COMBO_BOX_INCLUDED_
46 ComboBox(
const ComboBox& copy);
58 ComboBox& operator= (
const ComboBox& right);
64 virtual void initialize();
70 virtual ComboBox* clone();
91 virtual bool load(
const std::string& comboBoxPathname,
94 unsigned int nrOfItemsInListToDisplay = 10,
95 const std::string& scrollbarPathname =
"");
104 virtual void setSize(
float width,
float height);
110 virtual Vector2u getSize()
const;
116 virtual Vector2f getScaledSize()
const;
124 virtual std::string getLoadedPathname()
const;
132 virtual std::string getLoadedScrollbarPathname()
const;
141 virtual void setItemsToDisplay(
unsigned int nrOfItemsInListToDisplay);
149 virtual unsigned int getItemsToDisplay()
const;
161 virtual void changeColors(
const sf::Color& backgroundColor = sf::Color::White,
162 const sf::Color& textColor = sf::Color::Black,
163 const sf::Color& selectedBackgroundColor = sf::Color(50, 100, 200),
164 const sf::Color& selectedTextColor = sf::Color::White,
165 const sf::Color& borderColor = sf::Color::Black);
172 virtual void setBackgroundColor(
const sf::Color& backgroundColor);
179 virtual void setTextColor(
const sf::Color& textColor);
186 virtual void setSelectedBackgroundColor(
const sf::Color& selectedBackgroundColor);
193 virtual void setSelectedTextColor(
const sf::Color& selectedTextColor);
200 virtual void setBorderColor(
const sf::Color& borderColor);
206 virtual const sf::Color& getBackgroundColor()
const;
211 virtual const sf::Color& getTextColor()
const;
216 virtual const sf::Color& getSelectedBackgroundColor()
const;
221 virtual const sf::Color& getSelectedTextColor()
const;
226 virtual const sf::Color& getBorderColor()
const;
232 virtual void setTextFont(
const sf::Font& font);
237 virtual const sf::Font* getTextFont()
const;
248 virtual void setBorders(
unsigned int leftBorder = 0,
249 unsigned int topBorder = 0,
250 unsigned int rightBorder = 0,
251 unsigned int bottomBorder = 0);
270 virtual unsigned int addItem(
const sf::String& itemName);
287 virtual bool setSelectedItem(
const sf::String& itemName);
304 virtual bool setSelectedItem(
unsigned int id);
310 virtual void removeItem(
unsigned int id);
316 virtual void removeItem(
const sf::String& itemName);
322 virtual void removeAllItems();
332 virtual sf::String getItem(
unsigned int id)
const;
344 virtual unsigned int getItemID(
const sf::String& itemName)
const;
350 virtual std::vector<sf::String>& getItems()
const;
360 virtual sf::String getSelectedItem()
const;
372 virtual unsigned int getSelectedItemID()
const;
378 virtual bool setScrollbar(
const std::string& scrollbarPathname);
386 virtual void removeScrollbar();
395 virtual void setMaximumItems(
unsigned int maximumItems = 0);
403 virtual unsigned int getMaximumItems()
const;
410 virtual bool mouseOnObject(
float x,
float y);
411 virtual void leftMousePressed(
float x,
float y);
412 virtual void leftMouseReleased(
float x,
float y);
413 virtual void mouseMoved(
float x,
float y);
414 virtual void mouseWheelMoved(
int delta);
415 virtual void mouseNoLongerDown();
426 virtual void draw(sf::RenderTarget& target, sf::RenderStates states)
const;
436 bool m_MouseOnListBox;
440 unsigned int m_NrOfItemsToDisplay;
446 std::string m_LoadedScrollbarPathname;
449 sf::Texture* m_TextureNormal;
450 sf::Texture* m_TextureHover;
453 sf::Sprite m_SpriteNormal;
454 sf::Sprite m_SpriteHover;
457 std::string m_LoadedPathname;
467 #endif //_TGUI_COMBO_BOX_INCLUDED_
The parent struct for every object.
Definition: Objects.hpp:36
Parent struct for every object that has borders.
Definition: Objects.hpp:299
Definition: ListBox.hpp:37
Definition: ComboBox.hpp:35