Flowchart of creating widgets using a hand-drawn mygui

Source: Internet
Author: User

In the previous article "pure hand-drawn mygui class diagram and rendering flowchart", I probably used the rendering process of mygui to know that all rendering actions occur in basemanager. in drawoneframe (), the starting point is isubwidget, which generates vertex data to vertexbuffer. After layer-by-layer forwarding by layermanager, it is finally fed to idirect3ddevice9. drawprimitive (). However, even though another very important object widget in the mygui system is also under layernode, it seems to be isolated from the rendering process at the beginning, the logical relationship between the widget and the subwidget is not seen yet (the subwidget is understood as child
The widget is obviously incorrect .) I (liigo) manually drawn the following two sketch, basically connected to the two sides of the contact between widgets and subwidgets.

Widget. createwidget, skinitem. _ createskinitem, layeritem. attchtolayeritemnode:

Widgets inherit from skinitem, skinitem also inherits from layeritem, so the widget IS-A skinitem, And the IS-A layeritem.

All actions shown in the figure occur within the widget. createwidget. There are two steps: loading skin resource XML, creating isubwidgets, and recording it inside the widget object; attaching root widgets to the user-specified layer (for each root widget (window) create a layernode separately. Child widgets will be attached to this layernode in the future.) generate drawitem (to renderitem) based on the previously created isubwidgets and attach it to the layernode. Isubwidget is the sub-door responsible for rendering in the widget. In this sense, the "sub" also makes sense.

The above content is for easy understanding. At present, the level of understanding is limited, so it is not expected to ask for help from external users.

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.