22 std::vector<ListBoxItem> _selections;
25 __int64 _firstVisibleRow;
26 __int64 _lastVisibleRow;
92 void onArrowUp(BOOL shiftPressed, BOOL ctrlPressed)
override;
93 void onArrowDown(BOOL shiftPressed, BOOL ctrlPressed)
override;
94 void onPageUp(BOOL shiftPressed, BOOL ctrlPressed)
override;
95 void onPageDown(BOOL shiftPressed, BOOL ctrlPressed)
override;
96 void onKeyHome(BOOL shiftPressed, BOOL ctrlPressed)
override;
97 void onKeyEnd(BOOL shiftPressed, BOOL ctrlPressed)
override;
HWND WinHandle
Definition Common.h:16
Component()
Constructs a new Component instance.
Definition Graphics.h:161
void addItem(const wstring &text, COLORREF color=Theme::BackgroundColor)
Adds to the list of selectable options.
void onKeyHome(BOOL shiftPressed, BOOL ctrlPressed) override
void onFocusGained() override
Called when the component gains keyboard focus.
virtual ~ListBox()
Destructor.
ListBox()
Constructs an empty ListBox component.
void onPageDown(BOOL shiftPressed, BOOL ctrlPressed) override
void onFocusLost() override
Called when the component loses keyboard focus.
void windowCreated()
Called once the native window has been created.
void onMousePressed(WinHandle hWnd, int x, int y, int clickCount, BOOL shiftPressed, BOOL ctrlPressed) override
Called when the mouse is pressed within the component.
void onArrowDown(BOOL shiftPressed, BOOL ctrlPressed) override
void onArrowUp(BOOL shiftPressed, BOOL ctrlPressed) override
void setScrollbarTopOffset(__int64 firstVisibleRow) override
Sets the scrollbar's top offset.
BOOL onMouseWheel(WinHandle hWnd, int x, int y, int delta) override
Called when the mouse wheel is used over the component.
void onPageUp(BOOL shiftPressed, BOOL ctrlPressed) override
void setSelectedItem(const wstring &text)
Sets the currently selected item by text.
wstring getSelectedItem()
Retrieves the currently selected item text.
void onPaint(Graphics *g) override
Called to paint the component's client area.
void onKeyEnd(BOOL shiftPressed, BOOL ctrlPressed) override
void addItemDoubleClickedListener(RowDoubleClickListener *l)
BOOL getScrollingInfo(__int64 &scrollMin, __int64 &scrollMax, __int64 &pageSize) override
Provides scrolling information if supported.
BOOL getCreateWindowOptions(wstring &title, UINT &widownStyles, wstring &wndClassName, BOOL &isCustomWndProc)
Provides native window creation options for the ListBox control.
void addSelectionChangedListener(SelectionChangeListener *l)
void onWindowResized() override
Called when the component's window is resized.
wstring _text
Definition ListBox.h:8
COLORREF _color
Definition ListBox.h:9
Bounds _rect
Definition ListBox.h:10
Definition EventListeners.h:60
Definition EventListeners.h:31
static COLORREF BackgroundColor
Definition Theme.h:103