GUIFramework
1.1.0
Framework for desktop GUI applications in C++.
Loading...
Searching...
No Matches
BaseStaticControl.cpp
Go to the documentation of this file.
1
#include "
BaseStaticControl.h
"
2
3
#include "
Styles/Components/StaticControlStyles.h
"
4
5
using namespace
std;
6
7
namespace
gui_framework
8
{
9
void
BaseStaticControl::updateLocalization
(wstring_view localizedText)
10
{
11
ITextOperations::setText(localizedText);
12
}
13
14
BaseStaticControl::BaseStaticControl
(
const
wstring& staticControlName,
const
wstring& staticControlText,
const
utility::ComponentSettings
& settings,
BaseComposite
* parent) :
15
BaseComponent
16
(
17
standard_classes::staticControl,
18
staticControlName,
19
settings,
20
styles::StaticControlStyles(),
21
parent
22
),
23
ITextOperations(handle, staticControlText)
24
{
25
this->
removeBorder
();
26
}
27
28
void
BaseStaticControl::addBorder
()
29
{
30
gui_framework::utility::appendStyle
(
handle
, WS_BORDER);
31
}
32
33
void
BaseStaticControl::removeBorder
()
34
{
35
gui_framework::utility::removeStyle
(
handle
, WS_BORDER);
36
}
37
38
void
BaseStaticControl::setText
(string_view localizationKey)
39
{
40
this->
setLocalizationKey
(localizationKey);
41
42
ITextOperations::setText(localizationKey);
43
}
44
}
BaseStaticControl.h
StaticControlStyles.h
gui_framework::BaseComponent
Base class for all windows, controls, etc.
Definition
BaseComponent.h:17
gui_framework::BaseComponent::handle
HWND handle
Definition
BaseComponent.h:33
gui_framework::BaseComposite
Base class for all windows that has children windows.
Definition
BaseComposite.h:23
gui_framework::BaseStaticControl::BaseStaticControl
BaseStaticControl(const std::wstring &staticControlName, const std::wstring &staticControlText, const utility::ComponentSettings &settings, BaseComposite *parent)
Definition
BaseStaticControl.cpp:14
gui_framework::BaseStaticControl::updateLocalization
virtual void updateLocalization(std::wstring_view localizedText) override
Definition
BaseStaticControl.cpp:9
gui_framework::BaseStaticControl::removeBorder
void removeBorder()
Remove border.
Definition
BaseStaticControl.cpp:33
gui_framework::BaseStaticControl::setText
virtual void setText(std::string_view localizationKey) final override
Definition
BaseStaticControl.cpp:38
gui_framework::BaseStaticControl::addBorder
void addBorder()
Add border.
Definition
BaseStaticControl.cpp:28
gui_framework::interfaces::ISingleTextLocalized::setLocalizationKey
virtual void setLocalizationKey(std::string_view localizationKey) final
gui_framework::utility::removeStyle
void removeStyle(HWND handle, LONG_PTR styleToRemove)
Remove WinAPI style.
Definition
Utility.cpp:31
gui_framework::utility::appendStyle
void appendStyle(HWND handle, LONG_PTR newStyle)
Append WinAPI style.
Definition
Utility.cpp:21
gui_framework
Definition
BaseComponent.cpp:21
gui_framework::utility::ComponentSettings
All settings for windows.
Definition
ComponentSettings.h:11
GUIFramework
src
BaseComponents
StandardComponents
BaseStaticControl.cpp
Generated by
1.12.0