|
GUIFramework 1.1.0
Framework for desktop GUI applications in C++.
|
Base class for all windows, controls, etc. More...
#include <BaseComponent.h>
Public Member Functions | |
| 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) | |
| LRESULT | handleMessages (HWND handle, UINT message, WPARAM wparam, LPARAM lparam, bool &isUsed) |
| bool | destroyComponent () |
| bool | asyncDestroyComponent () |
| void | enable () |
| void | disable () |
| bool | isEnabled () const |
| bool | isDisabled () const |
| LRESULT | sendRawMessage (UINT message, WPARAM wparam, LPARAM lparam) |
| SendMessage WinAPI wrapper. | |
| void | setDesiredWidth (uint16_t desiredWidth) |
| void | setDesiredHeight (uint16_t desiredHeight) |
| void | setDesiredX (int desiredX) |
| void | setDesiredY (int desiredY) |
| virtual void | setBackgroundColor (uint8_t red, uint8_t green, uint8_t blue) |
| virtual void | setTextColor (uint8_t red, uint8_t green, uint8_t blue) |
| BaseComponent * | getParent () const |
| HWND | getHandle () const |
| std::wstring_view | getWindowName () const |
| std::wstring_view | getClassName () const |
| uint16_t | getDesiredWidth () const |
| uint16_t | getDesiredHeight () const |
| uint16_t | getActualWidth () const |
| uint16_t | getActualHeight () const |
| RECT | getActualCoordinates () const |
| int | getDesiredX () const |
| int | getDesiredY () const |
| uint32_t | getId () const |
| COLORREF | getBackgroundColor () const |
| COLORREF | getTextColor () const |
| const smartPointerType< interfaces::IStyles > & | getStyles () const |
| virtual size_t | getHash () const =0 |
| Used as key in creators. | |
| virtual json::JSONBuilder | getStructure () const override |
| virtual | ~BaseComponent () |
Public Member Functions inherited from gui_framework::interfaces::ISerializable | |
| ISerializable ()=default | |
| virtual | ~ISerializable ()=default |
Static Public Member Functions | |
| static void | runFunctionAsync (const std::function< void()> &callable, const std::function< void()> &callback=nullptr) noexcept |
| Add task to thread pool. | |
| static void | runFunctionAsync (std::function< void()> &&callable, const std::function< void()> &callback=nullptr) noexcept |
| Add task to thread pool. | |
Static Public Member Functions inherited from gui_framework::interfaces::ISerializable | |
| static uint32_t | getCodepage () |
Protected Member Functions | |
| virtual LRESULT | preWindowMessagesHandle (HWND handle, UINT message, WPARAM wparam, LPARAM lparam, bool &isUsed) |
| virtual LRESULT | windowMessagesHandle (HWND handle, UINT message, WPARAM wparam, LPARAM lparam, bool &isUsed) |
| virtual void | setLocalizationKeys (interfaces::ITextLocalized *localized, const std::vector< std::string > &localizationKeys) |
| Override for custom localization. | |
Protected Attributes | |
| BaseComposite * | parent |
| const std::wstring | className |
| const std::wstring | windowName |
| HWND | handle |
| uint16_t | desiredWidth |
| uint16_t | desiredHeight |
| int | desiredX |
| int | desiredY |
| uint32_t | id |
| COLORREF | backgroundColor |
| COLORREF | textColor |
| smartPointerType< interfaces::IStyles > | styles |
Friends | |
| class | BaseComposite |
Base class for all windows, controls, etc.
Definition at line 16 of file BaseComponent.h.
| gui_framework::BaseComponent::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 ) |
| windowFunctionName | Value that you pass in CREATE_DEFAULT_WINDOW_FUNCTION macro |
| moduleName | Name of loaded resource module with icons |
| smallIconResource | Integer value from auto generated Visual Studio resources |
| largeIconResource | Integer value from auto generated Visual Studio resources |
Definition at line 75 of file BaseComponent.cpp.
|
virtual |
Definition at line 467 of file BaseComponent.cpp.
| bool gui_framework::BaseComponent::asyncDestroyComponent | ( | ) |
Definition at line 238 of file BaseComponent.cpp.
| bool gui_framework::BaseComponent::destroyComponent | ( | ) |
Definition at line 223 of file BaseComponent.cpp.
| void gui_framework::BaseComponent::disable | ( | ) |
Definition at line 258 of file BaseComponent.cpp.
| void gui_framework::BaseComponent::enable | ( | ) |
Definition at line 253 of file BaseComponent.cpp.
| RECT gui_framework::BaseComponent::getActualCoordinates | ( | ) | const |
Definition at line 360 of file BaseComponent.cpp.
| uint16_t gui_framework::BaseComponent::getActualHeight | ( | ) | const |
Definition at line 351 of file BaseComponent.cpp.
| uint16_t gui_framework::BaseComponent::getActualWidth | ( | ) | const |
Definition at line 342 of file BaseComponent.cpp.
| COLORREF gui_framework::BaseComponent::getBackgroundColor | ( | ) | const |
Definition at line 386 of file BaseComponent.cpp.
| wstring_view gui_framework::BaseComponent::getClassName | ( | ) | const |
Definition at line 327 of file BaseComponent.cpp.
| uint16_t gui_framework::BaseComponent::getDesiredHeight | ( | ) | const |
Definition at line 337 of file BaseComponent.cpp.
| uint16_t gui_framework::BaseComponent::getDesiredWidth | ( | ) | const |
Definition at line 332 of file BaseComponent.cpp.
| int gui_framework::BaseComponent::getDesiredX | ( | ) | const |
Definition at line 371 of file BaseComponent.cpp.
| int gui_framework::BaseComponent::getDesiredY | ( | ) | const |
Definition at line 376 of file BaseComponent.cpp.
| HWND gui_framework::BaseComponent::getHandle | ( | ) | const |
Definition at line 317 of file BaseComponent.cpp.
|
pure virtual |
Used as key in creators.
Implemented in gui_framework::BaseButton, gui_framework::BaseCheckBox, gui_framework::BaseChildWindow, gui_framework::BaseComboBox, gui_framework::BaseComposite, gui_framework::BaseDialogBox, gui_framework::BaseEditControl, gui_framework::BaseHorizontalScrollBar, gui_framework::BaseIconListView, gui_framework::BaseInfiniteProgressBar, gui_framework::BaseListBox, gui_framework::BaseListIconListView, gui_framework::BaseListListView, gui_framework::BaseListTextIconListView, gui_framework::BaseListTextListView, gui_framework::BaseListView, gui_framework::BaseMainWindow, gui_framework::BaseMultipleSelectListBox, gui_framework::BaseProgressBar, gui_framework::BaseRichEdit, gui_framework::BaseScrollBar, gui_framework::BaseSeparateWindow, gui_framework::BaseStaticControl, gui_framework::BaseTabControl, gui_framework::BaseTextIconListView, gui_framework::BaseTextListView, gui_framework::BaseTrackbarControl, gui_framework::BaseVerticalAndHorizontalScrollBar, gui_framework::BaseVerticalScrollBar, gui_framework::BaseWindow, gui_framework::Button, gui_framework::CheckBox, gui_framework::ChildWindow, gui_framework::DialogBox, gui_framework::DropDownComboBox, gui_framework::DropDownListComboBox, gui_framework::EditControl, gui_framework::GroupBox, gui_framework::HorizontalTrackbarControl, gui_framework::IconListView, gui_framework::ImageButton, gui_framework::InfiniteProgressBar, gui_framework::ListBox, gui_framework::ListIconListView, gui_framework::ListTextIconListView, gui_framework::ListTextListView, gui_framework::MultipleSelectListBox, gui_framework::ProgressBar, gui_framework::RichEdit, gui_framework::SeparateWindow, gui_framework::SimpleComboBox, gui_framework::StaticControl, gui_framework::TabControl, gui_framework::TextIconListView, gui_framework::TextListView, and gui_framework::VerticalTrackbarControl.
| uint32_t gui_framework::BaseComponent::getId | ( | ) | const |
Definition at line 381 of file BaseComponent.cpp.
| BaseComponent * gui_framework::BaseComponent::getParent | ( | ) | const |
Definition at line 312 of file BaseComponent.cpp.
|
overridevirtual |
Implements gui_framework::interfaces::ISerializable.
Reimplemented in gui_framework::BaseButton, gui_framework::BaseCheckBox, gui_framework::BaseComboBox, gui_framework::BaseComposite, gui_framework::BaseEditControl, gui_framework::BaseIconListView, gui_framework::BaseInfiniteProgressBar, gui_framework::BaseListBox, gui_framework::BaseListIconListView, gui_framework::BaseListTextIconListView, gui_framework::BaseListTextListView, gui_framework::BaseMainWindow, gui_framework::BaseMultipleSelectListBox, gui_framework::BaseProgressBar, gui_framework::BaseRichEdit, gui_framework::BaseSeparateWindow, gui_framework::BaseTabControl, gui_framework::BaseTextIconListView, gui_framework::BaseTextListView, gui_framework::BaseTrackbarControl, gui_framework::BaseWindow, gui_framework::CheckBox, gui_framework::DropDownComboBox, gui_framework::DropDownListComboBox, gui_framework::HorizontalTrackbarControl, gui_framework::IconListView, gui_framework::ImageButton, gui_framework::InfiniteProgressBar, gui_framework::ListIconListView, gui_framework::ListTextIconListView, gui_framework::ListTextListView, gui_framework::MultipleSelectListBox, gui_framework::ProgressBar, gui_framework::RichEdit, gui_framework::SimpleComboBox, gui_framework::TabControl, gui_framework::TextIconListView, gui_framework::TextListView, and gui_framework::VerticalTrackbarControl.
Definition at line 401 of file BaseComponent.cpp.
| const smartPointerType< interfaces::IStyles > & gui_framework::BaseComponent::getStyles | ( | ) | const |
Definition at line 396 of file BaseComponent.cpp.
| COLORREF gui_framework::BaseComponent::getTextColor | ( | ) | const |
Definition at line 391 of file BaseComponent.cpp.
| wstring_view gui_framework::BaseComponent::getWindowName | ( | ) | const |
Definition at line 322 of file BaseComponent.cpp.
| LRESULT gui_framework::BaseComponent::handleMessages | ( | HWND | handle, |
| UINT | message, | ||
| WPARAM | wparam, | ||
| LPARAM | lparam, | ||
| bool & | isUsed ) |
Definition at line 211 of file BaseComponent.cpp.
| bool gui_framework::BaseComponent::isDisabled | ( | ) | const |
Definition at line 268 of file BaseComponent.cpp.
| bool gui_framework::BaseComponent::isEnabled | ( | ) | const |
Definition at line 263 of file BaseComponent.cpp.
|
protectedvirtual |
Reimplemented in gui_framework::BaseComposite.
Definition at line 32 of file BaseComponent.cpp.
|
staticnoexcept |
Add task to thread pool.
| callable | Function to call async |
| callback | Function to call after callable invokes |
|
staticnoexcept |
Add task to thread pool.
| callable | Function to call async |
| callback | Function to call after callable invokes |
| LRESULT gui_framework::BaseComponent::sendRawMessage | ( | UINT | message, |
| WPARAM | wparam, | ||
| LPARAM | lparam ) |
SendMessage WinAPI wrapper.
| message | |
| wparam | |
| lparam |
Definition at line 273 of file BaseComponent.cpp.
|
virtual |
Reimplemented in gui_framework::BaseComboBox, gui_framework::BaseComposite, gui_framework::BaseInfiniteProgressBar, gui_framework::BaseListView, gui_framework::BaseProgressBar, gui_framework::BaseRichEdit, gui_framework::BaseTabControl, and gui_framework::BaseWindow.
Definition at line 298 of file BaseComponent.cpp.
| void gui_framework::BaseComponent::setDesiredHeight | ( | uint16_t | desiredHeight | ) |
Definition at line 283 of file BaseComponent.cpp.
| void gui_framework::BaseComponent::setDesiredWidth | ( | uint16_t | desiredWidth | ) |
Definition at line 278 of file BaseComponent.cpp.
| void gui_framework::BaseComponent::setDesiredX | ( | int | desiredX | ) |
Definition at line 288 of file BaseComponent.cpp.
| void gui_framework::BaseComponent::setDesiredY | ( | int | desiredY | ) |
Definition at line 293 of file BaseComponent.cpp.
|
protectedvirtual |
Override for custom localization.
Your interface must be implemented before BaseComponent subclass inheritance
| localized | Non nullptr base localization class pointer |
Definition at line 60 of file BaseComponent.cpp.
|
virtual |
Reimplemented in gui_framework::BaseButton, gui_framework::BaseComboBox, gui_framework::BaseIconListView, gui_framework::BaseInfiniteProgressBar, gui_framework::BaseListIconListView, gui_framework::BaseListView, gui_framework::BaseProgressBar, gui_framework::BaseRichEdit, gui_framework::BaseTabControl, and gui_framework::BaseTrackbarControl.
Definition at line 305 of file BaseComponent.cpp.
|
protectedvirtual |
Reimplemented in gui_framework::BaseButton, gui_framework::BaseComboBox, gui_framework::BaseComposite, gui_framework::BaseMainWindow, gui_framework::BaseRichEdit, and gui_framework::BaseTabControl.
Definition at line 53 of file BaseComponent.cpp.
|
friend |
Definition at line 138 of file BaseComponent.h.
|
protected |
Definition at line 39 of file BaseComponent.h.
|
protected |
Definition at line 31 of file BaseComponent.h.
|
protected |
Definition at line 35 of file BaseComponent.h.
|
protected |
Definition at line 34 of file BaseComponent.h.
|
protected |
Definition at line 36 of file BaseComponent.h.
|
protected |
Definition at line 37 of file BaseComponent.h.
|
protected |
Definition at line 33 of file BaseComponent.h.
|
protected |
Definition at line 38 of file BaseComponent.h.
|
protected |
Definition at line 30 of file BaseComponent.h.
|
protected |
Definition at line 41 of file BaseComponent.h.
|
protected |
Definition at line 40 of file BaseComponent.h.
|
protected |
Definition at line 32 of file BaseComponent.h.