22 #ifndef GUI_WIDGETS_POPUP_H 23 #define GUI_WIDGETS_POPUP_H 25 #include "gui/dialog.h" 26 #include "gui/widget.h" 27 #include "common/str.h" 28 #include "common/array.h" 57 void handleMouseDown(
int x,
int y,
int button,
int clickCount)
override;
58 void handleMouseWheel(
int x,
int y,
int direction)
override;
61 void appendEntry(
const Common::String &entry, uint32 tag = (uint32)-1);
63 int numEntries() {
return _entries.
size(); }
71 int getSelected()
const {
return _selectedItem; }
72 uint32 getSelectedTag()
const {
return (_selectedItem >= 0) ? _entries[_selectedItem].tag : (uint32)-1; }
75 void handleMouseEntered(
int button)
override {
if (_selectedItem != -1) read(_entries[_selectedItem].name); setFlags(WIDGET_HILITED);
markAsDirty(); }
76 void handleMouseLeft(
int button)
override { clearFlags(WIDGET_HILITED);
markAsDirty(); }
78 void reflowLayout()
override;
80 void drawWidget()
override;
93 int _initialSelection;
96 int _entriesPerColumn;
110 void open()
override;
111 void reflowLayout()
override;
112 void drawDialog(DrawLayer layerToDraw)
override;
114 void handleMouseUp(
int x,
int y,
int button,
int clickCount)
override;
115 void handleMouseWheel(
int x,
int y,
int direction)
override;
116 void handleMouseMoved(
int x,
int y,
int button)
override;
117 void handleMouseLeft(
int button)
override;
120 void setPosition(
int x,
int y);
121 void setPadding(
int left,
int right);
122 void setLineHeight(
int lineHeight);
123 void setWidth(uint16 width);
127 void setSelection(
int item);
130 void drawMenuEntry(
int entry,
bool hilite);
132 int findItem(
int x,
int y)
const;
size_type size() const
Definition: array.h:315
Definition: keyboard.h:294