打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
DuiLib——xml配置项

DuiLib——xml配置项

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
    |------ofile/res                                  string
    |------orestype                                  string
    |------odest                                       RECT(long left, long top, long right,long bottom)
    |------osource                                    RECT(long left, long top, long right,long bottom)
    |------ocorner                                    RECT(long left, long top, long right,long bottom)
    |------omask                                      string #FFFFFFFF
    |------ofade                                       byte
    |------ohole                                       bool [true|false]
    |------oxtiled                                     bool [true|false]
    |------oytiled                                     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   
    |------opos                                       RECT(long left, long top, long right,long bottom)
    |------orelativepos                            (int nMoveXPercent, int nMoveYPercent,int nZoomXPercent,intnZoomYPercent)
    |------opadding                                 RECT(long left, long top, long right,long bottom)
    |------obkcolor/bkcolor1                    string #RRGGBBAA
    |------obkcolor2                                 string #RRGGBBAA
    |------obkcolor3                                 string #RRGGBBAA
    |------obordercolor                             string #RRGGBBAA
    |------ofocusbordercolor                     string #RRGGBBAA
    |------obordersize                               int 
    |------oborderround                            SIZE(int x, int y)
    |------obkimage                                  Image 属性
    |------owidth                                      int
    |------oheight                                     int
    |------ominwidth                                  int
    |------ominheight                                 int
    |------omaxwidth                                  int
    |------omaxheight                                 int
    |------oname                                        string
    |------otext                                           string
    |------otooltip                                       string
    |------ouserdata                                  string
    |------oenabled                                   bool [true|false]
    |------omouse                                     bool [true|false]
    |------ovisible                                     bool [true|false]
    |------ofloat                                       bool [true|false]
    |------oshortcut                                  TCHAR
    |------omenu                                      bool [true|false]
    
    
    
容器
Container                           CContainerUI
    |------oinset                                     RECT(long left, long top, long right,long bottom)
    |------omousechild                            bool [true|false]
    |------ovscrollbar                               bool [true|false]
    |------ohscrollbar                               bool [true|false]
    |------ochildpadding                           int
    
布局管理器
VerticalLayout                                          CVerticalLayoutUI : public  CContainerUI
    |------osepheight                                 int
    |------osepimm                                    bool [true|false]
    |------oCContainerUI::SetAttribute(pstrName, pstrValue)
    
HorizontalLayout                                     CHorizontalLayoutUI : public CContainerUI
    |------osepwidth                                  int
    |------osepimm                                    bool [true|false]
    |------oCContainerUI::SetAttribute(pstrName, pstrValue)

DialogLayout                                           CDialogLayoutUI : public  CContainerUI
    |------oCContainerUI::SetAttribute(pstrName, pstrValue)
    
TileLayout                                               CTitleLayoutUI : public  CContainerUI
    |------ocolumns                                   int
    |------oCContainerUI::SetAttribute(pstrName, pstrValue)
    
TabLayout                                                CTabLayoutUI : public CContainerUI
    |------oselectedid                                int
    |------oCContainerUI::SetAttribute(pstrName, pstrValue)


    
   

Edit                                                          CEditUI : public CLabelUI
    |------oreadonly                                   bool [true|false]
    |------opassword                                  bool [true|false]
    |------omaxchar                                    int
    |------onormalimage                              Image 属性
    |------ohotimage                                   Image 属性
    |------ofocusedimage                             Image 属性
    |------odisabledimage                            Image 属性
    |------onativebkcolor                             string #RRGGBBAA
    |------oCLabelUI::SetAttribute(pstrName, pstrValue)

List                               CListUI : public CVerticalLayoutUI, public IListUI
    |------oheader                                    string bool [hidden|Show]
    |------oheaderbkimage                             string path
    |------oscrollselect                              bool [true|false]
    |------omultiexpanding                            bool [true|false]
    |------oitemfont                                  int    Font列表的索引号
    |------oitemalign                                 string enum [left|center|right]
    |------oitemendellipsis                           bool [true|false]
    |------oitemtextpadding                           RECT(long left, long top, long right,long bottom)
    |------oitemtextcolor                             string #RRGGBBAA
    |------oitembkcolor                               string #RRGGBBAA
    |------oitemimage                                 string path
    |------oitemselectedtextcolor                     string #RRGGBBAA
    |------oitemselectedbkcolor                       string #RRGGBBAA
    |------oitemselectedimage                         string path
    |------oitemhottextcolor                          string #RRGGBBAA
    |------oitemhotbkcolor                            string #RRGGBBAA
    |------oitemhotimage                              Image 属性
             |------ofile                         string path
             |------ocorner                       RECT(long left, long top, long right,long bottom)
    |------oitemdisabledtextcolor                     string #RRGGBBAA
    |------oitemdisabledbkcolor                       string #RRGGBBAA
    |------oitemdisabledimage                         Image 属性
    |------oitemlinecolor                             string #RRGGBBAA
    |------oitemshowhtml                              bool [true|false]
    |------oCVerticalLayoutUI::SetAttribute(pstrName, pstrValue)
    
ListHeaderItem                     CListHeaderItemUI : public CControlUI
    |------odragable                                  bool [true|false]
    |------osepwidth                                  int
    |------oalign                                     string enum [left|center|right]
    |------oitemshowhtml                              bool [true|false]
    |------oendellipsis                               bool [true|false]
    |------ofont                                      int    Font列表的索引号
    |------otextcolor                                 string #RRGGBBAA
    |------otextpadding                               RECT(long left, long top, long right,long bottom)
    |------oshowhtml                                  bool [true|false]
    |------onormalimage                               Image 属性
    |------ohotimage                                  Image 属性
    |------opushedimage                               Image 属性
    |------ofocusedimage                              Image 属性
    |------osepimage                                  Image 属性
    
CListElementUI : public CControlUI, public IListItemUI
    |------oselected                                  value 有此属性就选中 
    |------oCControlUI::SetAttribute(pstrName,pstrValue)  
    
ListExpandElement                  CListExpandElementUI : publicCListTextElementUI    
    |------oexpander                                  RECT(long left, long top, long right,long bottom)
    |------ohideself                                  bool [true|false]
    |------oselected                                  bool
    |------oCListTextElementUI::SetAttribute(pstrName, pstrValue)
    
ListContainerElement               CListContainerElementUI           List容器
    |------oselected                                  value 有此属性就选中
    
ListHeader                         CListHeaderUI

CListLabelElementUI : public CListElementUI


ListTextElement                    CListTextElementUI : public CListLabelElementUI


Label                              CLabelUI : public  CControlUI
    |------oalign                                     string enum [left|center|right]
    |------oendellipsis                               bool [true|false]
    |------ofont                                      int    Font列表的索引号
    |------otextcolor                                 string #RRGGBBAA
    |------odisabledtextcolor                         string #RRGGBBAA
    |------otextpadding                               RECT(long left, long top, long right,long bottom)
    |------oshowhtml                                  bool [true|false]
    |------oCControlUI::SetAttribute( pstrName, pstrValue )
    
    
Text                               CTextUI : public  CLabelUI

Combo                              CComboUI : public CContainerUI, public IListOwnerUI
    |------otextpadding                               RECT(long left, long top, long right,long bottom)
    |------onormalimage                               Image 属性
    |------ohotimage                                  Image 属性
    |------opushedimage                               Image 属性
    |------ofocusedimage                              Image 属性
    |------odisabledimage                             Image 属性
    |------odropbox                                   string 
    |------oitemfont                                  int    Font列表的索引号
    |------oitemalign                                 string enum [left|center|right]
    |------oitemtextpadding                           RECT(long left, long top, long right,long bottom)
    |------oitemtextcolor                             string #RRGGBBAA
    |------oitembkcolor                               string #RRGGBBAA
    |------oitemimage                                 Image 属性
    |------oitemselectedtextcolor                     string #RRGGBBAA
    |------oitemselectedimage                         Image 属性
    |------oitemhottextcolor                          string #RRGGBBAA
    |------oitemhotbkcolor                            string #RRGGBBAA
    |------oitemhotimage                              Image 属性
    |------oitemdisabledtextcolor                     string #RRGGBBAA
    |------oitemdisabledbkcolor                       string #RRGGBBAA
    |------oitemdisabledimage                         Image 属性
    |------oitemlinecolor                             string #RRGGBBAA
    |------oitemshowhtml                              bool [true|false]
    |------oCContainerUI::SetAttribute(pstrName, pstrValue)

Button                             CButtonUI : public CLabelUI
    |------onormalimage                               Image 属性
    |------ohotimage                                  Image 属性
    |------opushedimage                               Image 属性
    |------ofocusedimage                              Image 属性
    |------odisabledimage                             Image 属性
    |------ohottextcolor                              string #RRGGBBAA
    |------opushedtextcolor                           string #RRGGBBAA
    |------ofocusedtextcolor                          string #RRGGBBAA
    |------oCLabelUI::SetAttribute(pstrName, pstrValue)
    
Option                             COptionUI : public CButtonUI
    |------ogroup                                     string
    |------oselected                                  bool [true|false]
    |------oselectedimage                             Image 属性
    |------oforeimage                                 Image 属性
    |------oselectedtextcolor                         string #RRGGBBAA
    |------oCButtonUI::SetAttribute(pstrName, pstrValue)

Progress                           CProgressUI : public  CLabelUI
    |------ofgimage                                   Image 属性
    |------ohor                                       bool
    |------omin                                       int
    |------omax                                       int
    |------ovalue                                     int
    |------oCLabelUI::SetAttribute(pstrName, pstrValue)
    
Slider                             CSliderUI : public  CProgressUI
    |------othumbimage                                Image 属性
    |------othumbhotimage                             Image 属性
    |------othumbpushedimage                          Image 属性
    |------othumbsize                                 SIZE(int x, int y)
    |------ostep                                      int
    |------oCProgressUI::SetAttribute(pstrName,pstrValue)    
    
RichEdit                           CRichEditUI : public CContainerUI, publicIMessageFilterUI
    |------ovscrollbar                                bool [true|false]
    |------oautovscroll                               bool [true|false]
    |------ohscrollbar                                bool [true|false]
    |------oautohscroll                               bool [true|false]
    |------owanttab                                   bool [true|false]
    |------owantreturn                                bool [true|false]
    |------owantctrlreturn                            bool [true|false]
    |------orich                                      bool [true|false]
    |------omultiline                                 bool [false|true]
    |------oreadonly                                  bool [true|false]
    |------onumberonly                                bool [true|false]
    |------opassword                                  bool [true|false]
    |------oalign                                     string enum [left|center|right]
    |------ofont                                      int    Font列表的索引号
    |------otextcolor                                 string #RRGGBBAA
    |------oCContainerUI::SetAttribute(pstrName, pstrValue)


ActiveX                            CActiveXUI : public  CControlUI
    |------oclsid                                     string
    |------omodulename                                string
    |------odelaycreate                               bool [true|false]
    |------oCControlUI::SetAttribute(pstrName, pstrValue)

ScrollBar                          CScrollBarUI : public CControlUI
    |------obutton1normalimage                        Image 属性
    |------obutton1hotimage                           Image 属性
    |------obutton1pushedimage                        Image 属性
    |------obutton1disabledimage                      Image 属性
    |------obutton2normalimage                        Image 属性
    |------obutton2hotimage                           Image 属性
    |------obutton2pushedimage                        Image 属性
    |------obutton2disabledimage                      Image 属性
    |------othumbnormalimage                          Image 属性
    |------othumbhotimage                             Image 属性
    |------othumbpushedimage                          Image 属性
    |------othumbdisabledimage                        Image 属性
    |------orailnormalimage                           Image 属性
    |------orailhotimage                              Image 属性
    |------orailpushedimage                           Image 属性
    |------oraildisabledimage                         Image 属性
    |------obknormalimage                             Image 属性
    |------obkhotimage                                Image 属性
    |------obkpushedimage                             Image 属性
    |------obkdisabledimage                           Image 属性
    |------ohor                                       bool [true|false]
    |------olinesize                                  int
    |------orange                                     int
    |------ovalue                                     int
    |------oshowbutton1                               bool [true|false]
    |------oshowbutton2                               bool [true|false]
    |------oCControlUI::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 consistsof various short tags:

 Bold:            <b>text</b>
 Color:           <c#xxxxxx>text</c> where x = RGB in hex
 Font:            <fx>text</f>       where x = font id
 Italic:          <i>text</i>
 Image:           <i x yz>           where x = image name and y = imagelist num and z(optional) =imagelist id
 Link:            <ax>text</a>       where x(optional) = link content, normal like app:notepad orhttp:www.xxx.com
 NewLine          <n>                  
 Paragraph:       <px>text</p>       where x = extra pixels indent in p
  RawText:        <r>text</r>
 Selected:        <s>text</s>
 Underline:       <u>text</u>
  XIndent:        <xi>               where i = hor indent in pixels
  YIndent:        <yi>               where i = ver indent in pixels 

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
OpenCV实现遍历文件夹下所有文件
在listbox里显示多行文本1
一起学习PHP中GD库的使用(一)
C#自定义PropertyGrid属性
包含图形用户界面 (GUI) 的 EA 交易: 创建面板 (第一部分)
《React-Native系列》10、 RN组件之Text和TextInput以及注意要点
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服