GUIFramework 1.1.0
Framework for desktop GUI applications in C++.
Loading...
Searching...
No Matches
GUIFrameworkConstants.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <string>
6#include <cstdint>
7#include <memory>
8
9#include <CommCtrl.h>
10#include <Richedit.h>
11
12namespace gui_framework
13{
14 namespace standard_classes
15 {
16 inline const std::wstring button = WC_BUTTONW;
17 inline const std::wstring editControl = WC_EDITW;
18 inline const std::wstring staticControl = WC_STATICW;
19 inline const std::wstring comboBox = WC_COMBOBOXW;
20 inline const std::wstring listBox = WC_LISTBOXW;
21 inline const std::wstring richEdit = MSFTEDIT_CLASS;
22 inline const std::wstring tabControl = WC_TABCONTROLW;
23 inline const std::wstring listView = WC_LISTVIEWW;
24 inline const std::wstring progressBar = PROGRESS_CLASSW;
25 inline const std::wstring trackbarControl = TRACKBAR_CLASSW;
26 inline const std::wstring scrollBar = WC_SCROLLBARW;
27 }
28
29 namespace standard_menu_items
30 {
31 inline const std::string dropDownMenuItem = "DropDown";
32 inline const std::string menuItem = "MenuItem";
33 }
34
35 namespace standard_sizes
36 {
37 inline constexpr uint16_t comboBoxAdditionalWidth = 10;
38
39 inline constexpr uint16_t listBoxAdditionalWidth = 20;
40
41 inline constexpr uint16_t dialogBoxBuilderMinWidth = 300;
42 inline constexpr uint16_t dialogBoxBuilderMinHeight = 200;
43
44 inline constexpr uint16_t defaultImagesCount = 16;
45
46 inline const uint16_t largeIconWidth = GetSystemMetrics(SM_CXICON);
47 inline const uint16_t largeIconHeight = GetSystemMetrics(SM_CYICON);
48
49 inline const uint16_t smallIconWidth = GetSystemMetrics(SM_CXSMICON);
50 inline const uint16_t smallIconHeight = GetSystemMetrics(SM_CYSMICON);
51
52 inline constexpr uint16_t additionalListViewReportColumnWidth = 10;
53 }
54
55 namespace json_settings
56 {
57 inline constexpr std::string_view settingsJSONFile = "gui_framework.json";
58
59 inline const std::string settingsObject = "settings";
60
61 inline const std::string usingCreatorsSetting = "usingCreators";
62 inline const std::string usingDeserializersSetting = "usingDeserializers";
63 inline const std::string threadsCountSetting = "threadsCount";
64 inline const std::string usingNotImplementedExceptions = "usingNotImplementedExceptions";
65 inline const std::string usingExtendedExceptions = "usingExtendedExceptions";
66 inline const std::string modulesSetting = "modules";
67 inline const std::string moduleNameSetting = "moduleName";
68 inline constexpr std::string_view pathToModuleSettings = "pathToModule";
69 }
70
71 namespace libraries
72 {
73 inline constexpr std::wstring_view msftEditLibrary = L"MsftEdit.dll";
74 }
75
77 using onClickSignature = void(*)();
78
80 using onDestroySignature = void(*)();
81
83 using onCloseSignature = bool(*)();
84}
85
87#define IMPLEMENT_SERIALIZABLE_FUNCTION extern "C" __declspec(dllexport)
88
89#ifdef GUI_FRAMEWORK_DLL
90#define GUI_FRAMEWORK_API __declspec(dllexport)
91#define GUI_FRAMEWORK_API_FUNCTION extern "C" __declspec(dllexport)
92#define JSON_DLL
93#define THREAD_POOL_DLL
94
96template<typename T>
97using smartPointerType = std::shared_ptr<T>;
98
99#pragma warning(disable: 4251)
100#pragma warning(disable: 4275)
101#pragma warning(disable: 4190)
102#else
103#define GUI_FRAMEWORK_API
104#define GUI_FRAMEWORK_API_FUNCTION
105
107template<typename T>
108using smartPointerType = std::unique_ptr<T>;
109#endif // GUI_FRAMEWORK_DLL
std::unique_ptr< T > smartPointerType
Compatible smart pointer type.
const std::string usingDeserializersSetting
const std::string usingNotImplementedExceptions
constexpr std::string_view settingsJSONFile
constexpr std::string_view pathToModuleSettings
constexpr std::wstring_view msftEditLibrary
constexpr uint16_t dialogBoxBuilderMinWidth
constexpr uint16_t dialogBoxBuilderMinHeight
constexpr uint16_t additionalListViewReportColumnWidth
void(*)() onClickSignature
Default on click signature.
bool(*)() onCloseSignature
Default on close signature. Worked only in BaseSeparateWindow subclasses. Called if user pressed clos...
void(*)() onDestroySignature
Default on destroy signature. Called before window is destroyed.