83 #include "render/graphics.h"
91 const std::string &skin) :
96 mListModel(listModel),
97 mWrappingEnabled(false),
98 mSelectionListeners(),
99 mHighlightColor(getThemeColor(
ThemeColorId::HIGHLIGHT, 255U)),
100 mForegroundSelectedColor(getThemeColor(
ThemeColorId::LISTBOX_SELECTED,
102 mForegroundSelectedColor2(getThemeColor(
110 mDistributeMousePressed(true),
121 if (
theme !=
nullptr)
129 if (
mSkin !=
nullptr)
150 if (
theme !=
nullptr)
197 i < sz; ++i,
y += rowHeight)
451 (*iter)->valueChanged(event);
void requestFocus(const Widget *const widget)
int getWidth(const std::string &text) const
void drawString(Graphics *const graphics, Color col, const Color &col2, const std::string &text, const int x, const int y)
virtual void fillRectangle(const Rect &rectangle)=0
virtual void setColor(const Color &color)
void removeDragged(const Widget *const widget)
void setListModel(ListModel *listModel)
ListBox(const Widget2 *const widget, ListModel *const listModel, const std::string &skin)
SelectionListenerList mSelectionListeners
void mouseReleased1(const MouseEvent &event)
void mouseWheelMovedDown(MouseEvent &event)
void mouseDragged(MouseEvent &event)
void mouseWheelMovedUp(MouseEvent &event)
void distributeValueChangedEvent()
void mousePressed(MouseEvent &event)
virtual unsigned int getRowHeight() const
void draw(Graphics *const graphics)
Color mForegroundSelectedColor2
void mouseReleased(MouseEvent &event)
void removeSelectionListener(SelectionListener *const selectionListener)
virtual void adjustSize()
SelectionListenerList::iterator SelectionListenerIterator
void safeDraw(Graphics *const graphics)
void keyPressed(KeyEvent &event)
void setSelected(const int selected)
void addSelectionListener(SelectionListener *const selectionListener)
virtual int getSelectionByMouse(const int y) const
ListModel * getListModel() const
Color mForegroundSelectedColor
bool mDistributeMousePressed
virtual std::string getElementAt(int i)=0
virtual int getNumberOfElements()=0
MouseButtonT getButton() const
int getClickCount() const
int getOption(const std::string &name) const
void unload(Skin *const skin)
static std::string getThemePath()
Skin * load(const std::string &filename, const std::string &filename2, const bool full, const std::string &defaultPath)
float getMinimumOpacity() const
#define FOR_EACH(type, iter, array)
#define BLOCK_START(name)