我这里是借用网友colin3dmax整理的关于duilib的分析哈,感谢他的分享,我觉得很有必要贴出来让大家都学习观摩下

DUILibxml配置项
根节点        子类      属性                            类型
Window                                                         
    |--------Image      图片信息
    |            o------name                            string
    |            o------restype                         string
    |            o------mask                            unsigned long#
    |
    |--------Font            字体信息
    |            o------name                            string
    |            o------size                            long
    |            o------bold                            bool
    |            o------underline                       bool
    |            o------default                         bool
    |
    |--------Default    默认Attribute属性
                 o------name                            string
                 o------value                           string
    
root(Window属性)
    o--size              窗体初始化大小                 SIZE(int cx, int cy)
    o--sizebox           窗体区域                       RECT(long left, long top, long right,long bottom)
    o--caption           窗体标题栏区域                 RECT(long left, long top, long right,long bottom)
    o--roundcorner       圆角大小                       SIZE(int cx, int cy)
    o--mininfo           窗体最小大小                   SIZE(int cx, int cy)
    o--maxinfo           窗体最大大小                   SIZE(int cx, int cy)
    o--showdirty         窗体显示                       bool [true|false]
    o--alpha             窗体透明度                     int
    o--bktrans           背景是否支持透明               bool [true|false]
    o--disabledfontcolor 无效字体颜色                   string  #RRGGBBAA
    o--defaultfontcolor  默认字体颜色                   string     #RRGGBBAA
    o--linkfontcolor     链接正常字体色                 string     #RRGGBBAA
    o--linkhoverfontcolor链接悬停字体色                 string     #RRGGBBAA
    o--selectedcolor     字体被选后颜色                 string     #RRGGBBAA
    
公共资源
Image
    |------o file/res                                   string
    |------o restype                                    string
    |------o dest                                       RECT(long left, long top, long right,long bottom)
    |------o source                                     RECT(long left, long top, long right,long bottom)
    |------o corner                                     RECT(long left, long top, long right,long bottom)
    |------o mask                                       string #FFFFFFFF
    |------o fade                                       byte
    |------o hole                                       bool [true|false]
    |------o xtiled                                     bool [true|false]
    |------o ytiled                                     bool [true|false]
使用说明:
    // 1、aaa.jpg
    // 2、file='aaa.jpg' res='' restype='0' dest='0,0,0,0' source='0,0,0,0' corner='0,0,0,0' 
    // mask='#FF0000' fade='255' hole='false' xtiled='false' ytiled='false'

Font
Default

控件Control

控件名称                                类

控件基类
Control                             CControlUI   
    |------o pos                                        RECT(long left, long top, long right,long bottom)
    |------o relativepos                                (int nMoveXPercent, int nMoveYPercent,int nZoomXPercent,int nZoomYPercent)
    |------o padding                                    RECT(long left, long top, long right,long bottom)
    |------o bkcolor/bkcolor1                           string #RRGGBBAA
    |------o bkcolor2                                   string #RRGGBBAA
    |------o bkcolor3                                   string #RRGGBBAA
    |------o bordercolor                                string #RRGGBBAA
    |------o focusbordercolor                           string #RRGGBBAA
    |------o bordersize                                 int 
    |------o borderround                                SIZE(int x, int y)
    |------o bkimage                                    Image 属性
    |------o width                                      int
    |------o height                                     int
    |------o minwidth                                   int
    |------o minheight                                  int
    |------o maxwidth                                   int
    |------o maxheight                                  int
    |------o name                                       string
    |------o text                                       string
    |------o tooltip                                    string
    |------o userdata                                   string
    |------o enabled                                    bool [true|false]
    |------o mouse                                      bool [true|false]
    |------o visible                                    bool [true|false]
    |------o float                                      bool [true|false]
    |------o shortcut                                   TCHAR
    |------o menu                                       bool [true|false]
    
    
    
容器
Container                            CContainerUI
    |------o inset                                      RECT(long left, long top, long right,long bottom)
    |------o mousechild                                 bool [true|false]
    |------o vscrollbar                                 bool [true|false]
    |------o hscrollbar                                 bool [true|false]
    |------o childpadding                               int
    
布局管理器
VerticalLayout                      CVerticalLayoutUI : public  CContainerUI
    |------o sepheight                                  int
    |------o sepimm                                     bool [true|false]
    |------o CContainerUI::SetAttribute(pstrName, pstrValue)
    
HorizontalLayout                    CHorizontalLayoutUI : public  CContainerUI
    |------o sepwidth                                   int
    |------o sepimm                                     bool [true|false]
    |------o CContainerUI::SetAttribute(pstrName, pstrValue)

DialogLayout                        CDialogLayoutUI : public  CContainerUI
    |------o CContainerUI::SetAttribute(pstrName, pstrValue)
    
TileLayout                          CTitleLayoutUI : public  CContainerUI
    |------o columns                                    int
    |------o CContainerUI::SetAttribute(pstrName, pstrValue)
    
TabLayout                           CTabLayoutUI : public CContainerUI
    |------o selectedid                                 int
    |------o CContainerUI::SetAttribute(pstrName, pstrValue)

Edit                                CEditUI : public CLabelUI
    |------o readonly                                   bool [true|false]
    |------o password                                   bool [true|false]
    |------o maxchar                                    int
    |------o normalimage                                Image 属性
    |------o hotimage                                   Image 属性
    |------o focusedimage                               Image 属性
    |------o disabledimage                              Image 属性
    |------o nativebkcolor                              string #RRGGBBAA
    |------o CLabelUI::SetAttribute(pstrName, pstrValue)

List                                CListUI : public CVerticalLayoutUI, public IListUI
    |------o header                                     string bool [hidden|Show]
    |------o headerbkimage                              string path
    |------o scrollselect                               bool [true|false]
    |------o multiexpanding                             bool [true|false]
    |------o itemfont                                   int     Font列表的索引号
    |------o itemalign                                  string enum [left|center|right]
    |------o itemendellipsis                            bool [true|false]
    |------o itemtextpadding                            RECT(long left, long top, long right,long bottom)
    |------o itemtextcolor                              string #RRGGBBAA
    |------o itembkcolor                                string #RRGGBBAA
    |------o itemimage                                  string path
    |------o itemselectedtextcolor                      string #RRGGBBAA
    |------o itemselectedbkcolor                        string #RRGGBBAA
    |------o itemselectedimage                          string path
    |------o itemhottextcolor                           string #RRGGBBAA
    |------o itemhotbkcolor                             string #RRGGBBAA
    |------o itemhotimage                               Image 属性
    |            |------o file                          string path
    |            |------o corner                        RECT(long left, long top, long right,long bottom)
    |------o itemdisabledtextcolor                      string #RRGGBBAA
    |------o itemdisabledbkcolor                        string #RRGGBBAA
    |------o itemdisabledimage                          Image 属性
    |------o itemlinecolor                              string #RRGGBBAA
    |------o itemshowhtml                               bool [true|false]
    |------o CVerticalLayoutUI::SetAttribute(pstrName, pstrValue)
    
ListHeaderItem                      CListHeaderItemUI : public CControlUI
    |------o dragable                                   bool [true|false]
    |------o sepwidth                                   int
    |------o align                                      string enum [left|center|right]
    |------o itemshowhtml                               bool [true|false]
    |------o endellipsis                                bool [true|false]
    |------o font                                       int     Font列表的索引号
    |------o textcolor                                  string #RRGGBBAA
    |------o textpadding                                RECT(long left, long top, long right,long bottom)
    |------o showhtml                                   bool [true|false]
    |------o normalimage                                Image 属性
    |------o hotimage                                   Image 属性
    |------o pushedimage                                Image 属性
    |------o focusedimage                               Image 属性
    |------o sepimage                                   Image 属性
    
CListElementUI : public CControlUI, public IListItemUI
    |------o selected                                   value 有此属性就选中 
    |------o CControlUI::SetAttribute(pstrName, pstrValue)  
    
ListExpandElement                   CListExpandElementUI : public CListTextElementUI    
    |------o expander                                   RECT(long left, long top, long right,long bottom)
    |------o hideself                                   bool [true|false]
    |------o selected                                   bool
    |------o CListTextElementUI::SetAttribute(pstrName, pstrValue)
    
ListContainerElement                CListContainerElementUI            List容器
    |------o selected                                   value 有此属性就选中
    
ListHeader                          CListHeaderUI

CListLabelElementUI : public CListElementUI

ListTextElement                     CListTextElementUI : public CListLabelElementUI

Label                               CLabelUI : public  CControlUI
    |------o align                                      string enum [left|center|right]
    |------o endellipsis                                bool [true|false]
    |------o font                                       int     Font列表的索引号
    |------o textcolor                                  string #RRGGBBAA
    |------o disabledtextcolor                          string #RRGGBBAA
    |------o textpadding                                RECT(long left, long top, long right,long bottom)
    |------o showhtml                                   bool [true|false]
    |------o CControlUI::SetAttribute( pstrName, pstrValue )
    
    
Text                                CTextUI : public  CLabelUI

Combo                               CComboUI : public CContainerUI, public IListOwnerUI
    |------o textpadding                                RECT(long left, long top, long right,long bottom)
    |------o normalimage                                Image 属性
    |------o hotimage                                   Image 属性
    |------o pushedimage                                Image 属性
    |------o focusedimage                               Image 属性
    |------o disabledimage                              Image 属性
    |------o dropbox                                    string 
    |------o itemfont                                   int     Font列表的索引号
    |------o itemalign                                  string enum [left|center|right]
    |------o itemtextpadding                            RECT(long left, long top, long right,long bottom)
    |------o itemtextcolor                              string #RRGGBBAA
    |------o itembkcolor                                string #RRGGBBAA
    |------o itemimage                                  Image 属性
    |------o itemselectedtextcolor                      string #RRGGBBAA
    |------o itemselectedimage                          Image 属性
    |------o itemhottextcolor                           string #RRGGBBAA
    |------o itemhotbkcolor                             string #RRGGBBAA
    |------o itemhotimage                               Image 属性
    |------o itemdisabledtextcolor                      string #RRGGBBAA
    |------o itemdisabledbkcolor                        string #RRGGBBAA
    |------o itemdisabledimage                          Image 属性
    |------o itemlinecolor                              string #RRGGBBAA
    |------o itemshowhtml                               bool [true|false]
    |------o CContainerUI::SetAttribute(pstrName, pstrValue)

Button                              CButtonUI : public CLabelUI
    |------o normalimage                                Image 属性
    |------o hotimage                                   Image 属性
    |------o pushedimage                                Image 属性
    |------o focusedimage                               Image 属性
    |------o disabledimage                              Image 属性
    |------o hottextcolor                               string #RRGGBBAA
    |------o pushedtextcolor                            string #RRGGBBAA
    |------o focusedtextcolor                           string #RRGGBBAA
    |------o CLabelUI::SetAttribute(pstrName, pstrValue)
    
Option                              COptionUI : public CButtonUI
    |------o group                                      string
    |------o selected                                   bool [true|false]
    |------o selectedimage                              Image 属性
    |------o foreimage                                  Image 属性
    |------o selectedtextcolor                          string #RRGGBBAA
    |------o CButtonUI::SetAttribute(pstrName, pstrValue)

Progress                            CProgressUI : public  CLabelUI
    |------o fgimage                                    Image 属性
    |------o hor                                        bool
    |------o min                                        int
    |------o max                                        int
    |------o value                                      int
    |------o CLabelUI::SetAttribute(pstrName, pstrValue)
    
Slider                              CSliderUI : public  CProgressUI
    |------o thumbimage                                 Image 属性
    |------o thumbhotimage                              Image 属性
    |------o thumbpushedimage                           Image 属性
    |------o thumbsize                                  SIZE(int x, int y)
    |------o step                                       int
    |------o CProgressUI::SetAttribute(pstrName, pstrValue)    
    
RichEdit                            CRichEditUI : public CContainerUI, public IMessageFilterUI
    |------o vscrollbar                                 bool [true|false]
    |------o autovscroll                                bool [true|false]
    |------o hscrollbar                                 bool [true|false]
    |------o autohscroll                                bool [true|false]
    |------o wanttab                                    bool [true|false]
    |------o wantreturn                                 bool [true|false]
    |------o wantctrlreturn                             bool [true|false]
    |------o rich                                       bool [true|false]
    |------o multiline                                  bool [false|true]
    |------o readonly                                   bool [true|false]
    |------o numberonly                                 bool [true|false]
    |------o password                                   bool [true|false]
    |------o align                                      string enum [left|center|right]
    |------o font                                       int     Font列表的索引号
    |------o textcolor                                  string #RRGGBBAA
    |------o CContainerUI::SetAttribute(pstrName, pstrValue)

ActiveX                             CActiveXUI : public  CControlUI
    |------o clsid                                      string
    |------o modulename                                 string
    |------o delaycreate                                bool [true|false]
    |------o CControlUI::SetAttribute(pstrName, pstrValue)

ScrollBar                           CScrollBarUI : public CControlUI
    |------o button1normalimage                         Image 属性
    |------o button1hotimage                            Image 属性
    |------o button1pushedimage                         Image 属性
    |------o button1disabledimage                       Image 属性
    |------o button2normalimage                         Image 属性
    |------o button2hotimage                            Image 属性
    |------o button2pushedimage                         Image 属性
    |------o button2disabledimage                       Image 属性
    |------o thumbnormalimage                           Image 属性
    |------o thumbhotimage                              Image 属性
    |------o thumbpushedimage                           Image 属性
    |------o thumbdisabledimage                         Image 属性
    |------o railnormalimage                            Image 属性
    |------o railhotimage                               Image 属性
    |------o railpushedimage                            Image 属性
    |------o raildisabledimage                          Image 属性
    |------o bknormalimage                              Image 属性
    |------o bkhotimage                                 Image 属性
    |------o bkpushedimage                              Image 属性
    |------o bkdisabledimage                            Image 属性
    |------o hor                                        bool [true|false]
    |------o linesize                                   int
    |------o range                                      int
    |------o value                                      int
    |------o showbutton1                                bool [true|false]
    |------o showbutton2                                bool [true|false]
    |------o CControlUI::SetAttribute(pstrName, pstrValue)

控件的通用属性
stretch        STRETCHMODE
    o--------move_x
    o--------move_y
    o--------move_xy
    o--------size_x
    o--------size_y
    o--------size_xy
    o--------group
    o--------line
    
    
考虑到在xml编辑器中使用<>符号不方便,可以使用{}符号代替
支持标签嵌套(如<l><b>text</b></l>),但是交叉嵌套是应该避免的(如<l><b>text</l></b>)
The string formatter supports a kind of "mini-html" that consists of various short tags:

Bold:             <b>text</b>
  Color:            <c #xxxxxx>text</c>  where x = RGB in hex
  Font:             <f x>text</f>        where x = font id
  Italic:           <i>text</i>
  Image:            <i x y z>            where x = image name and y = imagelist num and z(optional) = imagelist id
  Link:             <a x>text</a>        where x(optional) = link content, normal like app:notepad or http:www.xxx.com
  NewLine           <n>                  
  Paragraph:        <p x>text</p>        where x = extra pixels indent in p
  Raw Text:         <r>text</r>
  Selected:         <s>text</s>
  Underline:        <u>text</u>
  X Indent:         <x i>                where i = hor indent in pixels
  Y Indent:         <y i>                where i = ver indent in pixels 
————————————————————————————————————————————————————
对DUiLib的理解可能有偏差,发现错误之处希望及时纠正

duilib库分析3.DUILibxml配置的更多相关文章

  1. duilib库分析2.第一篇UIManager

    DUiLib 源码分析 ——以UiLib 1.01版为分析目标--------------------------------------------------------------------- ...

  2. duilib库分析4.第二篇UIBase

    DUiLib 源码分析 ——以UiLib 1.01版为分析目标 ——colin3dmax 分析于2011-6-16 19:44------------------------------------- ...

  3. duilib库分析: 消息流程分析

      转 看下CWindowWnd类与CPaintManagerUI类是咋进行消息分发的吧. 1. 先看下CPaintManagerUI类的MessageLoop函数: void CPaintManag ...

  4. duilib库分析1.消息流程分析

    看下CWindowWnd类与CPaintManagerUI类是咋进行消息分发的吧. 1. 先看下CPaintManagerUI类的MessageLoop函数: void CPaintManagerUI ...

  5. DuiLib逆向分析の按钮事件定位

    目录 DuiLib逆向分析の按钮事件定位 0x00 前言 DuiLib介绍 DuiLib安装 DuiLib Hello,World! Duilib逆向分析之定位按钮事件 碎碎念 第一步:获取xml布局 ...

  6. 日志分析工具ELK配置详解

    日志分析工具ELK配置详解 一.ELK介绍 1.1 elasticsearch 1.1.1 elasticsearch介绍 ElasticSearch是一个基于Lucene的搜索服务器.它提供了一个分 ...

  7. Innovus教程 - Flow系列 - MMMC分析环境的配置概述(理论+实践+命令)

    本文转自:自己的微信公众号<集成电路设计及EDA教程> <Innovus教程 - Flow系列 - MMMC分析环境的配置概述(理论+实践+命令)>   轻轻走过,悄悄看过,无 ...

  8. MyCat源码分析系列之——配置信息和启动流程

    更多MyCat源码分析,请戳MyCat源码分析系列 MyCat配置信息 除了一些默认的配置参数,大多数的MyCat配置信息是通过读取若干.xml/.properties文件获取的,主要包括: 1)se ...

  9. 如何在WTL和MFC中使用duilib及如何静态使用duilib库!(初级讲解 附带一个Demo)

    关于duilib的历史,我也就不多说了,能看到这篇文章的人都是有一定了解才能找到这个的. 我直接说下对这个库的基本使用吧. 我个人对一些好技术都是比较感兴趣的. 因为个人原因 喜欢接触一个好技术. 所 ...

随机推荐

  1. Ansible介绍

    第一章 ansible服务介绍 1.1 ansible批量管理服务概述 是基于python语言开发的自动化软件工具 是基于SSH远程管理服务实现远程主机批量管理 1.2 ansible批量管理服务意义 ...

  2. 【学术篇】规律选手再次证明自己(舒老师的胡策题 T2 LX还在迷路)

    只要你不强制在线, 我就能分块. --Reflash 就算你强制在线, 我还是要分块. --Enzymii 今天做了一波舒老师的毒瘤题, T1据说很水但是没思路所以直接放掉了.. 去看了看T2好像可以 ...

  3. hadoop创建目录文件失败

    mkdir: Cannot create directory /file. Name node is in safe mode.   刚刚在hadoop想创建一个目录的时候,发现报错了 具体信息如下: ...

  4. sublime快捷键汇总

    Sublime Text 3 快捷键精华版 Ctrl+Shift+P:打开命令面板Ctrl+P:搜索项目中的文件Ctrl+G:跳转到第几行Ctrl+W:关闭当前打开文件Ctrl+Shift+W:关闭所 ...

  5. smarty基础总结

    前提: 1. 部署smarty模板目录: 2. 编写Smarty类的子类,定制好template_dir.compile_dir.config_dir.cache_dir.left_delimiter ...

  6. thinkphp 上传安全

    网站的上传功能也是一个非常容易被攻击的入口,所以对上传功能的安全检查是尤其必要的. 大理石平台支架 系统提供的上传类Think\Upload提供了安全方面的支持,包括对文件后缀.文件类型.文件大小以及 ...

  7. centos 服务器编译安装apache+php

    1.检查服务器中是否自带httpd,如果/etc/httpd/httpd.conf,说明系统自带httpd服务,需要卸载或关闭服务,不要让他影响到本次安装的服务启动 可以用 service httpd ...

  8. HDU6331Problem M. Walking Plan

    传送门 分块floyd $f[i][j][k]$表示从i走k步到j的最短路 $g[i][j][k]$表示从i走k*100步到j的最短路 $h[i][j][k]$表示从i至少走k步到j的最短路 询问从x ...

  9. NX二次开发-通过点击按钮来控制显示工具条

    NX9+VS2012 1.打开D:\Program Files\Siemens\NX 9.0\UGII\menus\ug_main.men 找到装配和PMI,在中间加上一段 TOGGLE_BUTTON ...

  10. HDU5923-Prediction-有继承味道的并查集

    目录 目录 思路: (有任何问题欢迎留言或私聊 && 欢迎交流讨论哦 目录 题意:传送门  原题目描述在最下面.  有一个n个节点m条边的无向图和一个m个节点的有根树(根为1).树上每 ...