Ember
Loading...
Searching...
No Matches
ProportionalLayout.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4#include <wx/aui/aui.h>
5#include <wx/string.h>
6
7namespace EmberUI {
8
10struct PaneEntry {
11 wxString paneName;
12 double proportion;
14 bool isWidth;
15};
16
19 public:
21 void Track(const wxString &paneName, double proportion, double minProportion, bool isWidth);
23 void HandleResize(wxAuiManager *mgr, const wxSize &oldClientSize, const wxSize &newClientSize);
24
25 private:
26 std::vector<PaneEntry> m_entries;
27};
28
29} // namespace EmberUI
Tracks pane proportions and applies them on AUI manager resize.
std::vector< PaneEntry > m_entries
void HandleResize(wxAuiManager *mgr, const wxSize &oldClientSize, const wxSize &newClientSize)
Updates pane sizes when the managed window is resized.
void Track(const wxString &paneName, double proportion, double minProportion, bool isWidth)
Registers a pane to track with given proportion and constraints.
Definition Panel.h:8
Entry describing a pane's proportion and resize behavior.
wxString paneName
AUI pane identifier.
bool isWidth
True if proportion applies to width, false for height.
double minProportion
Minimum proportion when resizing.
double proportion
Proportional share of available space.