All classes derived from GLayout need to implement the Pour function. This function is called by the parent class to ask the object where abouts it wants to be located in the remaining space available. The order that the GLayout's are added to the parent is important, in terms of who gets first pickings at the area.
![]() |
class GLayout : public GView { public: // Layout bool GetPourLargest() bool Pour(GdcComplexRegion &r) void SetPourLargest(bool I) // ScrollBars bool SetScrollBars(bool x, bool y) virtual void GetScrollPos(int &x, int &y) virtual void SetScrollPos(int x, int y) }; |
Get the "Pour Largest" setting.
Argument | Description |
GdcComplexRegion &r |
The non-rectangular region available to the window.
Use these functions to search the area:
|
This is called to give the control a chance to position itself in the remaining screen area. It should look at the list of regions and decide where it should go. Then it should set it's own position and return true.
By default the control returns false if no layout is performed, in this case the control is ignored. Most of the time this is because it's a dialog control.
Argument | Description |
bool I |
Sets the "Pour Largest" setting. If this is TRUE then the GLayout control automatically takes up the largest region available.
Argument | Description |
bool x | true for horizontal scroll bar |
bool y | true for vertical scrollbar |
Switches on scroll bars for the window.
The scroll bars will notify you of user input through the OnNotify handler. To correctly identify the control you will need to set it's Id (using SetId()).
Argument | Description |
int &x | |
int &y |
Get the current scroll bar position. 0 will be returned for a scrollbar that doesn't exist.
Argument | Description |
int x | |
int y |
Set the scroll bar's values.