GUIFramework 1.1.0
Framework for desktop GUI applications in C++.
Loading...
Searching...
No Matches
IResizableComponent.h
Go to the documentation of this file.
1#pragma once
2
3#include "Core.h"
4
5namespace gui_framework
6{
7 namespace interfaces
8 {
11 {
12 private:
13 HWND resizeableHandle;
14 HWND parent;
15
16 protected:
19 int initX;
20 int initY;
21 uint16_t initWidth;
22 uint16_t initHeight;
23 uint16_t parentWidth;
24 uint16_t parentHeight;
25
26 public:
27 IResizableComponent(HWND resizeableHandle, HWND parent, bool autoResize = false, bool blockResize = false);
28
32 virtual void resize(uint16_t width, uint16_t height);
33
34 virtual RECT calculateNewSizes(uint16_t width, uint16_t height) final;
35
36 virtual void setBlockResize(bool blockResize) final;
37
38 virtual void setAutoResize(bool autoResize) final;
39
40 virtual bool getBlockResize() const final;
41
42 virtual bool getAutoResize() const final;
43
44 virtual ~IResizableComponent() = default;
45 };
46 }
47}
#define GUI_FRAMEWORK_API
Provides resize, setBlockResize, getBlockResize methods.