SavvyUI C++ UI Library
Loading...
Searching...
No Matches
CheckComboBox.h
Go to the documentation of this file.
1#pragma once
2
3#include "Component.h"
4#include "CheckList.h"
5
14class CheckComboBox : public Component,
16{
20 wstring _displayText;
21
25 CheckList _checkList;
26
27protected:
37 BOOL getCreateWindowOptions(wstring& title, UINT& widownStyles, wstring& wndClassName, BOOL& isCustomWndProc);
38
43
44public:
49
53 virtual ~CheckComboBox();
54
59
65 void setOptions(const vector<KeyValue>& selections);
66
72 void setSelectedItems(const vector<KeyValue>& selections);
73
79 vector<KeyValue> getSelectedItems();
80
86 void onPaint(Graphics *g);
87
92
97
108 void onMousePressed(WinHandle hWnd, int x, int y, int clickCount, BOOL shiftPressed, BOOL ctrlPressed);
109
116
123};
HWND WinHandle
Definition Common.h:16
virtual ~CheckComboBox()
Destroys the CheckComboBox instance.
void onSelectionChanged(const SelectionChangeEvent &ev)
Responds to selection changes triggered by internal components like CheckList.
void setSelectedItems(const vector< KeyValue > &selections)
Sets which items are selected based on a list of key-value pairs.
void setOptions(const vector< KeyValue > &selections)
Sets the available options that can be selected via the checklist.
int getPreferredHeight()
Returns the preferred height.
void onWindowResized()
Called when the window containing the control is resized.
void onWindowMoved()
Called when the window containing the control is moved.
void windowCreated()
Called after the control window has been successfully created.
CheckComboBox()
Constructs a new CheckComboBox instance.
void onMousePressed(WinHandle hWnd, int x, int y, int clickCount, BOOL shiftPressed, BOOL ctrlPressed)
Handles mouse press events.
void onPaint(Graphics *g)
Renders the CheckComboBox.
void addSelectionChangedListener(SelectionChangeListener *l)
Adds a listener to be notified when the selection changes.
BOOL getCreateWindowOptions(wstring &title, UINT &widownStyles, wstring &wndClassName, BOOL &isCustomWndProc)
Retrieves window creation options for the control.
vector< KeyValue > getSelectedItems()
Retrieves the list of currently selected items.
A UI component that displays a list of checkable items.
Definition CheckList.h:23
Component()
Constructs a new Component instance.
Definition Graphics.h:161
Definition EventListeners.h:22
Definition EventListeners.h:31