|
|
@ -151,6 +151,9 @@ enum SizingType {
|
|
|
|
ST_RESIZE, ///< Resize the nested widget tree.
|
|
|
|
ST_RESIZE, ///< Resize the nested widget tree.
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Forward declarations. */
|
|
|
|
|
|
|
|
class NWidgetCore;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Baseclass for nested widgets.
|
|
|
|
* Baseclass for nested widgets.
|
|
|
|
* @invariant After initialization, \f$current\_x = smallest\_x + n * resize\_x, for n \geq 0\f$.
|
|
|
|
* @invariant After initialization, \f$current\_x = smallest\_x + n * resize\_x, for n \geq 0\f$.
|
|
|
@ -165,6 +168,7 @@ public:
|
|
|
|
virtual void AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool allow_resize_x, bool allow_resize_y, bool rtl) = 0;
|
|
|
|
virtual void AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool allow_resize_x, bool allow_resize_y, bool rtl) = 0;
|
|
|
|
|
|
|
|
|
|
|
|
virtual void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl) = 0;
|
|
|
|
virtual void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl) = 0;
|
|
|
|
|
|
|
|
virtual void FillNestedArray(NWidgetCore **array, uint length) = 0;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Set additional space (padding) around the widget.
|
|
|
|
* Set additional space (padding) around the widget.
|
|
|
@ -260,6 +264,7 @@ public:
|
|
|
|
|
|
|
|
|
|
|
|
int SetupSmallestSize();
|
|
|
|
int SetupSmallestSize();
|
|
|
|
void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl);
|
|
|
|
void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl);
|
|
|
|
|
|
|
|
/* virtual */ void FillNestedArray(NWidgetCore **array, uint length);
|
|
|
|
|
|
|
|
|
|
|
|
Colours colour; ///< Colour of this widget.
|
|
|
|
Colours colour; ///< Colour of this widget.
|
|
|
|
int index; ///< Index of the nested widget in the widget array of the window (\c -1 means 'not used').
|
|
|
|
int index; ///< Index of the nested widget in the widget array of the window (\c -1 means 'not used').
|
|
|
@ -275,6 +280,7 @@ public:
|
|
|
|
~NWidgetContainer();
|
|
|
|
~NWidgetContainer();
|
|
|
|
|
|
|
|
|
|
|
|
void Add(NWidgetBase *wid);
|
|
|
|
void Add(NWidgetBase *wid);
|
|
|
|
|
|
|
|
/* virtual */ void FillNestedArray(NWidgetCore **array, uint length);
|
|
|
|
|
|
|
|
|
|
|
|
/** Return whether the container is empty. */
|
|
|
|
/** Return whether the container is empty. */
|
|
|
|
inline bool IsEmpty() { return head == NULL; };
|
|
|
|
inline bool IsEmpty() { return head == NULL; };
|
|
|
@ -353,6 +359,7 @@ public:
|
|
|
|
|
|
|
|
|
|
|
|
int SetupSmallestSize();
|
|
|
|
int SetupSmallestSize();
|
|
|
|
void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl);
|
|
|
|
void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl);
|
|
|
|
|
|
|
|
/* virtual */ void FillNestedArray(NWidgetCore **array, uint length);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** Nested widget with a child.
|
|
|
|
/** Nested widget with a child.
|
|
|
@ -369,6 +376,8 @@ public:
|
|
|
|
void AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool allow_resize_x, bool allow_resize_y, bool rtl);
|
|
|
|
void AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool allow_resize_x, bool allow_resize_y, bool rtl);
|
|
|
|
|
|
|
|
|
|
|
|
void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl);
|
|
|
|
void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl);
|
|
|
|
|
|
|
|
/* virtual */ void FillNestedArray(NWidgetCore **array, uint length);
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
private:
|
|
|
|
NWidgetPIPContainer *child; ///< Child widget.
|
|
|
|
NWidgetPIPContainer *child; ///< Child widget.
|
|
|
|
};
|
|
|
|
};
|
|
|
|