GUIFramework 1.1.0
Framework for desktop GUI applications in C++.
Loading...
Searching...
No Matches
ISingleTextLocalized.h
Go to the documentation of this file.
1#pragma once
2
3#include "ITextLocalized.h"
4
5namespace gui_framework
6{
7 namespace interfaces
8 {
11 {
12 private:
13 std::string localizationKey;
14
15 protected:
16 virtual void updateLocalization(std::wstring_view localizedText) = 0;
17
18 public:
19 ISingleTextLocalized(bool autoUpdate = true);
20
21 virtual void setLocalizationKey(std::string_view localizationKey) final;
22
23 virtual void setLocalizationKey(std::string&& localizationKey) noexcept final;
24
25 virtual const std::string& getLocalizationKey() const final;
26
27 virtual bool updateLocalizationEvent() final override;
28
29 virtual ~ISingleTextLocalized() = default;
30 };
31 }
32}
#define GUI_FRAMEWORK_API
Change localization of buttons, edit controls, etc.
virtual void setLocalizationKey(std::string_view localizationKey) final
virtual void setLocalizationKey(std::string &&localizationKey) noexcept final
virtual void updateLocalization(std::wstring_view localizedText)=0
Provides changing localization in component by calling GUIFramework::changeLocalization.