Next, continue to analyze Duilib's UI layout layouts, which are currently available in the following layouts: Verticallayout, Horizontallayout, Tilelayout, Tablayout, childlayout, respectively, vertical layout, Horizontal layout, tile layout, tab layout, sub-form layout;
The general project uses more is the vertical layout, the horizontal layout, we will analyze each layout separately;
Verticallayout: Vertical Layout, inherited from the Ccontainerui container UI class, and Ccontainerui also inherit from Ccontrolui, so Verticallayout is actually a UI control;
member functions:
GetClass: Gets the class name (Verticallayoutui);
GetInterface: Gets the class object under the class name;
GetControlFlags: Gets the control tag;
Setsepheight/getsepheight: Sets/Gets the height of the separator;
Setsepimmmode/issepimmmode: Sets/Gets the current drag delimiter, whether the size is changed immediately;
SetAttribute: Sets the property value of the specified name;
Doevent: Event handler function (mainly handling mouse events);
SetPos: Set position, adjust control position and scroll bar;
Dopostpaint: Draw event to draw the container partition area color is 0xaa000000;
GetThumbRect: Gets the partition area;
Member variables:
M_isepheight: delimiter height;
M_ubuttonstate: Button (control) state;
Ptlastmouse: The last position of the mouse;
M_rcnewpos: Control area position;
M_bimmmode: Is the immediate mode (change size immediately);
Duilib Source Analysis (v) UI layout-layout