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

转自:http://www.cnblogs.com/wuqi924/articles/2127061.html

DuiLib——xml配置项的更多相关文章

  1. Duilib XML嵌套

    duilib使用嵌套xml可以简化代码的书写,有利于模块化的页面布局分解,duilib库的xml嵌套主要有两种方式 方式一.以创建控件的方式嵌套xml 在CreateControl(LPCTSTR p ...

  2. Duilib XML嵌套/自定义控件

    转载:https://www.jianshu.com/p/0fe8610dcc8d  // https://github.com/Washington-DC/Duilib-ListView  //这是 ...

  3. Hadoop core-site.xml 配置项列表

    core-default.xml与core-site.xml的功能是一样的,如果在core-site.xml里没有配置的属性,则会自动会获取core-default.xml里的相同属性的值 官方文档: ...

  4. core-site.xml配置项:hadoop.tmp.dir

    hadoop.tmp.dir:A base for other temporary directories. 集群运行后,修改该配置项后,发现类似错误: -- ::, INFO org.apache. ...

  5. 【转】web.xml配置项详解

    史上最全web.xml配置文件元素详解   一.web.xml配置文件常用元素及其意义预览 1 <web-app> 2 3 <!--定义了WEB应用的名字--> 4 <d ...

  6. Tomcat conf/server.xml 配置项详解

    本文参考来源:https://blog.csdn.net/a314368439/article/details/60132783# <Server port="8005" s ...

  7. 2013 duilib入门简明教程 -- XML配置界面(6)

        前面那些教程都是为了让小伙伴们从win32.MFC过渡到duilib,让大家觉得duilib不是那么陌生,如果大家现在还对duilib非常陌生的话,那就说明前面的教程做得不好,请大家在下面留言 ...

  8. 2013 duilib入门简明教程 -- XML基础类(7)

    现在大家应该对XML描述界面不那么陌生了,那么我们做进一步介绍. 前面的教程我们写了很多代码,为的是让大家了解下基本流程,其实duilib已经对常用的操作做了很好的包装,正式使用时无需像前面的教程那样 ...

  9. duilib入门简明教程 -- XML基础类(7)

    现在大家应该对XML描述界面不那么陌生了,那么我们做进一步介绍. 前面的教程我们写了很多代码,为的是让大家了解下基本流程,其实duilib已经对常用的操作做了很好的包装,正式使用时无需像前面的教程那样 ...

随机推荐

  1. STM32之GPIO端口位带操作

    #ifndef __SYS_H #define __SYS_H #include "stm32f10x.h" //位带操作 //把“位带地址+位序号”转换别名地址宏 #define ...

  2. GoldenGate 之 Bounded Recovery说明

    首先,我们来看两个OGG同步中可能的问题: l oracle在线日志包含已提交的和未提交的事务,但OGG只会将已提交的事务写入到队列文件.因此,针对未提交的事务,特别是未提交的长事务,OGG会怎样处理 ...

  3. linux中/etc/fstab文件删除或修改了,导致系统无法启动

    在linux中,/etc/fstab文件是磁盘挂载的问题,若该文件不小心给修改了,或者被删除了,那么就会导致系统无法重启.因为/etc/fstab文件是记录磁盘挂载的信息,若该文件出现了问题,那么对应 ...

  4. 2013年9月份第1周51Aspx源码发布详情

    大型B2B家具门户网源码  2013-9-6 [VS2008]功能描述: 1.门户信息管理 安全取数据即使数据库连接中断不会报错 2.稳定性 每句代码经过3次以上检查.此网站还在运营3年了,没有出过问 ...

  5. passivedns 安装指南

    install passivedns on ubuntu Passive DNS对安全研究非常重要,因为它可以在前期帮助我们构建出目标的基础设施结构,并且可以得到以下三方面的答案:该域名曾经绑定过哪些 ...

  6. Multiple dex files define

    Multiple dex files define 在项目中,有一个类的包名和引用的jar包中的类和包名一致

  7. BZOJ 2467 生成树

    当(n-1)条中间的边:4^(n-1)*4*C(n-1,n). ......以此类推Σ. f[n]=Σ(i=0..n-1)4^(i+1)*(n-i)*C(n,i) =Σ(i=0..n-1)4^(i+1 ...

  8. python构建模拟模型——网站独立访问用户数量

    背景:发现一个有趣的现象,即一些用户在每一月都仅仅访问网站一次,我们想要了解这些人数量的变化趋势. 建立数学模型:简化问题,根据瓮模型推导出公式(具体推导见<数据之魅>,有时间再补充... ...

  9. C# 封装一个钩子类

    利用C#设置钩子函数,并封装成类.如果想要实现全局钩子的话,必须将实现的代码封装到类库里. using System; using System.Collections.Generic; using ...

  10. 【转】Web应用的组件化开发(一)

    原文转自:http://blog.jobbole.com/56161/ 基本思路 1. 为什么要做组件化? 无论前端也好,后端也好,都是整个软件体系的一部分.软件产品也是产品,它的研发过程也必然是有其 ...