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
|------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

  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: 网易duilib xml设计器是一种基于网易duilib框架的可视化界面设计工具。该工具能够辅助开发人员快速创建和编辑duilib控件的界面布局,提高开发效率。 通过网易duilib xml设计器,开发人员可以直观地设计用户界面布局,无需手动编写XML代码。它提供了大量的可视化设计元素,如按钮、文本框、列表框等,开发人员只需要拖拽这些元素到指定位置即可完成界面布局的设计。同时,设计器还提供了强大的属性编辑器,开发人员可以通过设置属性的方式对控件进行进一步的定制和样式调整。这种可视化的设计方式大大简化了界面开发的流程,减少了繁琐的手动编写代码的过程。 除了简单直观的界面设计功能,网易duilib xml设计器还提供了一些辅助功能,如控件的对齐、分组等。开发人员可以通过这些功能来调整控件的位置和布局,使界面更加美观和合理。此外,设计器还支持实时预览功能,开发人员可以随时查看和调整设计的界面效果,提前发现和解决可能存在的问题。 总而言之,网易duilib xml设计器是一个功能强大且易于使用的界面设计工具,它能够帮助开发人员快速创建和编辑duilib控件的界面布局,提高开发效率,同时还提供了一些辅助功能和实时预览功能,让界面设计更加简便和便捷。 ### 回答2: 网易duilib xml设计器是一款专为duilib界面库设计的可视化工具。它通过可拖拽、可视化的方式,让用户能够快速方便地创建和编辑duilib的UI界面。 首先,这个设计器提供了丰富的组件库,包括各种常用的控件,如按钮、文本框、列表框等。用户可以通过简单的拖拽操作将这些控件放置在界面中,并进行尺寸、位置的调整。 其次,设计器支持实时预览功能,使用户能够随时查看界面的效果。这对于调试和调整布局非常方便,用户无需频繁地手动编译和部署应用程序。 此外,设计器还提供了各种属性编辑器,用户可以通过这些编辑器对控件进行参数设置。例如,用户可以设置控件的字体、颜色、边框等属性,还可以定义点击事件和状态切换效果等。 最后,网易duilib xml设计器还支持导入和导出功能,用户可以将已经设计好的界面导出为duilibxml文件,方便在代码中使用;同时,用户也可以导入已有的xml文件进行修改和编辑。 总之,网易duilib xml设计器是一款专业、易用的界面设计工具,可以帮助用户快速创建和编辑duilib的UI界面,大大提高了开发效率。无论是duilib初学者还是有经验的开发者,都可以受益于这个强大的工具。 ### 回答3: 网易duilib xml设计器是一款用于设计和编辑duilib XML布局文件的工具。duilib是一款优秀的跨平台UI框架,使用XML描述界面布局,通过在XML文件中设置控件属性和关联关系来完成界面的设计。而网易duilib xml设计器则提供了可视化的界面,方便用户通过拖拽、调整组件大小和位置等方式来设计和编辑XML布局文件,大大提高了界面设计的效率。 网易duilib xml设计器具有以下特点和功能: 1. 可视化界面:设计器提供了直观的可视化界面,用户可以通过拖拽组件、调整属性等方式来设计和编辑界面,无需手动编写XML代码。 2. 快速生成XML代码:设计器自动生成符合duilib规范的XML代码,用户可以随时查看和修改生成的代码,方便进行手动调整和优化。 3. 组件管理:设计器提供了组件库,用户可以从库中选择合适的组件,并进行属性设置和布局调整。同时,用户还可以自定义组件,方便扩展和重用。 4. 属性设置:设计器支持对组件的属性进行设置,如大小、位置、字体、颜色等,方便用户根据需求进行个性化设计。 5. 关联关系设置:用户可以通过设计器设置组件之间的关联关系,如父子关系、兄弟关系等,以及设置事件处理函数,实现交互逻辑。 6. 格式化和验证:设计器支持对XML代码进行格式化和验证,确保生成的XML文件符合duilib的规范。 7. 目管理:用户可以将多个XML布局文件组织为目,方便管理和切换不同的布局。 总之,网易duilib xml设计器是一款强大而易用的工具,可以帮助用户快速设计和编辑duilib XML布局文件,提高界面设计的效率和质量。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值