9#if !defined(OWL_LAYOUTWI_H)
13#if defined(BI_HAS_PRAGMA_ONCE)
152 enum TWhichConstraint {
159 TChildMetrics* ChildMetrics;
160 TConstraint* Constraints;
162 TVariable* Variables;
168 TChildMetrics* GetChildMetrics(
const TWindow& child);
170 void AddConstraint(TChildMetrics& metrics,
172 TWhichConstraint whichContraint);
173 void BuildConstraints(TChildMetrics& childMetrics);
174 void RemoveConstraints(TChildMetrics& childMetrics);
180 int LayoutUnitsToPixels(
int);
181 void GetFontHeight();
When specifying the layout metrics for a window, four layout constraints are needed.
TEdgeConstraint Y
Y contains the Y (top, center, bottom) edge constraint of the window.
TEdgeOrWidthConstraint Width
Contains the width size constraint, center edge constraint, or right edge (lmRight) constraint of the...
TEdgeOrHeightConstraint Height
Contains the height size constraint, center edge constraint, or bottom edge constraint of the window.
void SetMeasurementUnits(TMeasurementUnits units)
TEdgeConstraint X
X contains the X (left, center, right) edge constraint of the window.
TLayoutMetrics()
Defaults each co: RelWin=0, MyEdge=(1st from above), Relationship=AsIs.
Derived from TWindow, TLayoutWindow provides functionality for defining the layout metrics for a wind...
void EvSetFont(HFONT, bool redraw)
Updates the window layout, if "redraw" is true.
TLayoutWindow(TWindow *parent, LPCTSTR title=0, TModule *module=0)
Creates a TLayoutWindow object with specified parent, window caption, and library ID.
void EvSize(uint sizeType, const TSize &size)
Responds to a change in size by calling Layout() to resize the window.
virtual void Layout()
Causes the window to resize and position its children according to the specified metrics.
bool GetChildLayoutMetrics(const TWindow &child, TLayoutMetrics &metrics)
Gets the layout metrics of the child window.
auto EvGetFont() -> HFONT
void SetChildLayoutMetrics(TWindow &child, const TLayoutMetrics &metrics)
Sets the metrics for the window and removes any existing ones.
void RemoveChild(TWindow *) override
Overrides TWindow virtual to allow cleanup of child metrics.
bool RemoveChildLayoutMetrics(const TWindow &child)
Removes child (layout) metrics for a given child (if found) and updates other children as necessary.
void Init(TWindow *parent, LPCTSTR title, TModule *module)
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
The tagSIZE struct is defined as.
TWindow(TWindow *parent, LPCTSTR title=nullptr, TModule *module=nullptr)
Adds this to the child list of parent if nonzero, and calls EnableAutoCreate so that this will be cre...
TMeasurementUnits
Used by the TLayoutConstraint struct, TMeasurementUnits enumerates the measurement units (lmPixels or...
#define DECLARE_STREAMABLE_OWL(cls, ver)
#define DECLARE_STREAMABLE_INLINES(cls)
Definition of class TLayoutConstraint.
Object Windows Library (OWLNext Core).
TEdgeConstraint adds member functions that set edge (but not size) constraints.
TLayoutConstraint is a structure that defines a relationship (a layout constraint) between an edge or...
Base window class TWindow definition, including HWND encapsulation.