GUIFramework 1.1.0
Framework for desktop GUI applications in C++.
Loading...
Searching...
No Matches
IMultipleTextLocalized.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::vector<std::string> localizationKeys;
14
15 protected:
16 virtual void updateLocalization(size_t index, std::wstring_view localizedText) = 0;
17
18 public:
19 IMultipleTextLocalized(bool autoUpdate = true);
20
21 void addLocalizationKey(std::string_view localizationKey);
22
23 void insertLocalizationKey(size_t index, const std::string& localizationKey);
24
25 void insertLocalizationKey(size_t index, std::string&& localizationKey) noexcept;
26
27 void removeLocalizationKey(size_t index);
28
29 void removeLocalizationKey(std::string_view localizationKey);
30
31 const std::vector<std::string>& getLocalizationKeys() const;
32
33 virtual bool updateLocalizationEvent() final override;
34
35 virtual ~IMultipleTextLocalized() = default;
36 };
37 }
38}
#define GUI_FRAMEWORK_API
Change localization of combo boxes, list views, tab controls, etc.
void removeLocalizationKey(std::string_view localizationKey)
void insertLocalizationKey(size_t index, const std::string &localizationKey)
virtual void updateLocalization(size_t index, std::wstring_view localizedText)=0
void insertLocalizationKey(size_t index, std::string &&localizationKey) noexcept
Provides changing localization in component by calling GUIFramework::changeLocalization.