GUIFramework 1.1.0
Framework for desktop GUI applications in C++.
Loading...
Searching...
No Matches
BaseWindow.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace gui_framework
8{
11 public BaseComposite,
13 {
14 private:
15 struct drawedImages
16 {
18 std::unordered_map<uint16_t, std::pair<int, int>> coordinates;
20
22
23 void addImage(BaseWindow* owner, int x, int y, const std::filesystem::path& pathToImage);
24
25 void removeImage(const std::filesystem::path& pathToImage);
26 };
27
28 protected:
29 std::unordered_map<std::string, drawedImages> pictures;
30
31 public:
36 BaseWindow(const std::wstring& className, const std::wstring& windowName, const utility::ComponentSettings& settings, const interfaces::IStyles& styles, BaseComposite* parent = nullptr, const std::string& windowFunctionName = "", const std::string& moduleName = "", uint16_t smallIconResource = NULL, uint16_t largeIconResource = NULL);
37
44 virtual void initDrawing(const std::string& pictureBlockName, uint16_t imagesWidth, uint16_t imagesHeight, utility::BaseLoadableHolder::imageType type) final;
45
53 virtual void addImage(const std::string& pictureBlockName, int x, int y, const std::filesystem::path& pathToImage);
54
59 virtual void removeImage(const std::string& pictureBlockName, const std::filesystem::path& pathToImage);
60
62 virtual void drawAllImages() final;
63
64 virtual void setBackgroundColor(uint8_t red, uint8_t green, uint8_t blue) final override;
65
68 virtual size_t getHash() const override = 0;
69
70 virtual json::JSONBuilder getStructure() const override;
71
72 virtual ~BaseWindow() = default;
73 };
74}
#define GUI_FRAMEWORK_API
std::unique_ptr< T > smartPointerType
Compatible smart pointer type.
Base class for all windows that has children windows.
Base class for composite windows.
Definition BaseWindow.h:13
std::unordered_map< std::string, drawedImages > pictures
Definition BaseWindow.h:29
Provides styles for other classes.
Definition IStyles.h:11