GUIFramework 1.1.0
Framework for desktop GUI applications in C++.
Loading...
Searching...
No Matches
BaseListBox.h
Go to the documentation of this file.
1#pragma once
2
7
8namespace gui_framework
9{
13 public BaseComponent,
15 {
16 protected:
18 uint8_t columnsWidth;
19
20 protected:
21 virtual void updateLocalization(size_t index, std::wstring_view localizedText) override;
22
23 public:
24 BaseListBox(std::wstring_view listBoxName, const utility::ComponentSettings& settings, const styles::ListBoxStyles& styles, BaseComposite* parent);
25
30 LRESULT addValue(std::wstring_view value);
31
37 LRESULT addValue(std::string_view localizationKey);
38
43 LRESULT removeValue(size_t index);
44
50 virtual LRESULT insertValue(std::wstring_view value, LRESULT index);
51
57 LRESULT insertValue(std::string_view localizationKey, LRESULT index);
58
64 virtual LRESULT changeValue(std::wstring_view newValue, LRESULT index);
65
71 LRESULT changeValue(std::string_view localizationKey, LRESULT index);
72
77 LRESULT findSubstring(std::wstring_view subStringToFind);
78
83 LRESULT findString(std::wstring_view stringToFind);
84
89 std::wstring getValue(size_t index) const;
90
94 LRESULT getCurrentSelectionIndex() const;
95
100 virtual LRESULT setCurrentSelection(LRESULT index) const;
101
105 LRESULT size() const;
106
108 void clear();
109
115 LRESULT setItemsHeight(uint8_t height);
116
121 LRESULT setColumnsWidth(uint8_t width);
122
127 LRESULT getItemsHeight() const;
128
132 uint8_t getColumnsWidth() const;
133
138 virtual void resize(uint16_t width, uint16_t height) override;
139
142 virtual size_t getHash() const override = 0;
143
144 virtual json::JSONBuilder getStructure() const override;
145
146 virtual ~BaseListBox() = default;
147 };
148}
#define GUI_FRAMEWORK_API
Base class for all windows, controls, etc.
Base class for all windows that has children windows.
Base class for all list boxes.
Definition BaseListBox.h:15
LRESULT addValue(std::string_view localizationKey)
LRESULT addValue(std::wstring_view value)
virtual LRESULT insertValue(std::wstring_view value, LRESULT index)
virtual size_t getHash() const override=0
Used as key in creators.
virtual LRESULT changeValue(std::wstring_view newValue, LRESULT index)
virtual ~BaseListBox()=default
LRESULT changeValue(std::string_view localizationKey, LRESULT index)
LRESULT insertValue(std::string_view localizationKey, LRESULT index)
Change localization of combo boxes, list views, tab controls, etc.
Provides resize, setBlockResize, getBlockResize methods.
Base class for list box styles.