GUIFramework 1.1.0
Framework for desktop GUI applications in C++.
Loading...
Searching...
No Matches
HorizontalTrackbarControl.cpp
Go to the documentation of this file.
2
4
5using namespace std;
6
7namespace gui_framework
8{
9 HorizontalTrackbarControl::HorizontalTrackbarControl(const wstring& trackbarName, const utility::ComponentSettings& settings, BaseComposite* parent, bool autoTicks, horizontalTickPosition position, bool selectionRange, bool noTicks) :
11 (
12 trackbarName,
13 settings,
14 styles::HorizontalTrackbarControlStyles(position),
15 parent
16 )
17 {
18 if (autoTicks)
19 {
20 utility::appendStyle(handle, TBS_AUTOTICKS);
21 }
22
23 if (selectionRange)
24 {
25 utility::appendStyle(handle, TBS_ENABLESELRANGE);
26 }
27
28 if (noTicks)
29 {
30 utility::appendStyle(handle, TBS_NOTICKS);
31 }
32 }
33
35 {
36 return typeid(HorizontalTrackbarControl).hash_code();
37 }
38
40 {
41 using json::utility::jsonObject;
42
43 json::JSONBuilder builder = BaseTrackbarControl::getStructure();
44 jsonObject& current = get<jsonObject>(builder[utility::to_string(windowName, ISerializable::getCodepage())]);
45
46 return builder;
47 }
48}
const std::wstring windowName
Base class for all windows that has children windows.
Base class for all tracbar controls.
virtual json::JSONBuilder getStructure() const override
HorizontalTrackbarControl(const std::wstring &trackbarName, const utility::ComponentSettings &settings, BaseComposite *parent, bool autoTicks=true, horizontalTickPosition position=horizontalTickPosition::bottom, bool selectionRange=false, bool noTicks=false)
json::JSONBuilder getStructure() const override
size_t getHash() const override
Used as key in creators.
void appendStyle(HWND handle, LONG_PTR newStyle)
Append WinAPI style.
Definition Utility.cpp:21
string to_string(wstring_view stringToConvert, uint32_t codepage)
Definition Utility.cpp:41