22 static void runFunctionAsync(
const std::function<
void()>& callable,
const std::function<
void()>& callback =
nullptr) noexcept;
27 static
void runFunctionAsync(std::function<
void()>&& callable, const std::function<
void()>& callback =
nullptr) noexcept;
31 const std::wstring className;
32 const std::wstring windowName;
34 uint16_t desiredWidth;
35 uint16_t desiredHeight;
39 COLORREF backgroundColor;
44 virtual LRESULT preWindowMessagesHandle(HWND handle, UINT message, WPARAM wparam, LPARAM lparam,
bool& isUsed);
46 virtual LRESULT windowMessagesHandle(HWND handle, UINT message, WPARAM wparam, LPARAM lparam,
bool& isUsed);
53 virtual
void setLocalizationKeys(interfaces::ITextLocalized* localized, const std::vector<std::
string>& localizationKeys);
61 BaseComponent(std::wstring_view className, std::wstring_view windowName, const utility::ComponentSettings& settings, const interfaces::IStyles& styles,
BaseComposite* parent =
nullptr, std::string_view windowFunctionName = "", std::string_view moduleName = "", uint16_t smallIconResource = NULL, uint16_t largeIconResource = NULL);
63 LRESULT handleMessages(HWND handle, UINT message, WPARAM wparam, LPARAM lparam,
bool& isUsed);
65 bool destroyComponent();
67 bool asyncDestroyComponent();
73 bool isEnabled() const;
75 bool isDisabled() const;
84 LRESULT sendRawMessage(UINT message, WPARAM wparam, LPARAM lparam);
86 void setDesiredWidth(uint16_t desiredWidth);
88 void setDesiredHeight(uint16_t desiredHeight);
90 void setDesiredX(
int desiredX);
92 void setDesiredY(
int desiredY);
94 virtual
void setBackgroundColor(uint8_t red, uint8_t green, uint8_t blue);
96 virtual
void setTextColor(uint8_t red, uint8_t green, uint8_t blue);
100 HWND getHandle() const;
102 std::wstring_view getWindowName() const;
104 std::wstring_view getClassName() const;
106 uint16_t getDesiredWidth() const;
108 uint16_t getDesiredHeight() const;
110 uint16_t getActualWidth() const;
112 uint16_t getActualHeight() const;
114 RECT getActualCoordinates() const;
116 int getDesiredX() const;
118 int getDesiredY() const;
122 uint32_t getId() const;
124 COLORREF getBackgroundColor() const;
126 COLORREF getTextColor() const;
132 virtual
size_t getHash() const = 0;
134 virtual json::JSONBuilder getStructure() const override;