Duilib Source Analysis (v) UI layout-layout

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.