GUIFramework 1.1.0
Framework for desktop GUI applications in C++.
Loading...
Searching...
No Matches
ISingleTextLocalized.cpp
Go to the documentation of this file.
2
3using namespace std;
4
5namespace gui_framework
6{
7 namespace interfaces
8 {
10 ITextLocalized(autoUpdate)
11 {
12
13 }
14
15 void ISingleTextLocalized::setLocalizationKey(string_view localizationKey)
16 {
17 this->localizationKey = localizationKey;
18 }
19
20 void ISingleTextLocalized::setLocalizationKey(string&& localizationKey) noexcept
21 {
22 this->localizationKey = move(localizationKey);
23 }
24
26 {
27 return localizationKey;
28 }
29
31 {
32 if (localizationKey.size())
33 {
34 this->updateLocalization(localization::WTextLocalization::get()[localizationKey]);
35
36 return true;
37 }
38
39 return false;
40 }
41 }
42}
virtual void setLocalizationKey(std::string_view localizationKey) final
virtual const std::string & getLocalizationKey() const final
virtual void updateLocalization(std::wstring_view localizedText)=0
Provides changing localization in component by calling GUIFramework::changeLocalization.