DuiLib――xml配置项

前端之家收集整理的这篇文章主要介绍了DuiLib――xml配置项前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

DUILibxml配置项
根节点子类属性类型
Window
|--------Image图片信息
|o------namestring
|o------restypestring
|o------maskunsigned long#
|
|--------Font字体信息
|o------namestring
|o------sizelong
|o------boldbool
|o------underlinebool
|o------defaultbool
|
|--------Default默认Attribute属性
o------namestring
o------valuestring

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 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/resstring
|------o restypestring
|------o destRECT(long left,long bottom)
|------o sourceRECT(long left,long bottom)
|------o cornerRECT(long left,long bottom)
|------o maskstring #FFFFFFFF
|------o fadebyte
|------o holebool [true|false]
|------o xtiledbool [true|false]
|------o ytiledbool [true|false]
使用说明:
// 1、aaa.jpg
// 2、file='aaa.jpg' res='' restype='0' dest='0,0' source='0,0' corner='0,0'
// mask='#FF0000' fade='255' hole='false' xtiled='false' ytiled='false'


Font
Default

控件Control

控件名称

控件基类
ControlCControlUI
|------o posRECT(long left,long bottom)
|------o relativepos(int nMoveXPercent,int nMoveYPercent,int nZoomXPercent,int nZoomYPercent)
|------o paddingRECT(long left,long bottom)
|------o bkcolor/bkcolor1string #RRGGBBAA
|------o bkcolor2string #RRGGBBAA
|------o bkcolor3string #RRGGBBAA
|------o bordercolorstring #RRGGBBAA
|------o focusbordercolorstring #RRGGBBAA
|------o bordersizeint
|------o borderroundSIZE(int x,int y)
|------o bkimageImage 属性
|------o widthint
|------o heightint
|------o minwidthint
|------o minheightint
|------o maxwidthint
|------o maxheightint
|------o namestring
|------o textstring
|------o tooltipstring
|------o userdatastring
|------o enabledbool [true|false]
|------o mousebool [true|false]
|------o visiblebool [true|false]
|------o floatbool [true|false]
|------o shortcutTCHAR
|------o menubool [true|false]



容器
ContainerCContainerUI
|------o insetRECT(long left,long bottom)
|------o mousechildbool [true|false]
|------o vscrollbarbool [true|false]
|------o hscrollbarbool [true|false]
|------o childpaddingint

布局管理器
VerticalLayoutCVerticalLayoutUI : publicCContainerUI
|------o sepheightint
|------o sepimmbool [true|false]
|------o CContainerUI::SetAttribute(pstrName,pstrValue)

HorizontalLayoutCHorizontalLayoutUI : publicCContainerUI
|------o sepwidthint
|------o sepimmbool [true|false]
|------o CContainerUI::SetAttribute(pstrName,pstrValue)

DialogLayoutCDialogLayoutUI : publicCContainerUI
|------o CContainerUI::SetAttribute(pstrName,pstrValue)

TileLayoutCTitleLayoutUI : publicCContainerUI
|------o columnsint
|------o CContainerUI::SetAttribute(pstrName,pstrValue)

TabLayoutCTabLayoutUI : public CContainerUI
|------o selectedidint
|------o CContainerUI::SetAttribute(pstrName,220);">

EditCEditUI : public CLabelUI
|------o readonlybool [true|false]
|------o passwordbool [true|false]
|------o maxcharint
|------o normalimageImage 属性
|------o hotimageImage 属性
|------o focusedimageImage 属性
|------o disabledimageImage 属性
|------o nativebkcolorstring #RRGGBBAA
|------o CLabelUI::SetAttribute(pstrName,220);">ListCListUI : public CVerticalLayoutUI,public IListUI
|------o headerstring bool [hidden|Show]
|------o headerbkimagestring path
|------o scrollselectbool [true|false]
|------o multiexpandingbool [true|false]
|------o itemfontintFont列表的索引号
|------o itemalignstring enum [left|center|right]
|------o itemendellipsisbool [true|false]
|------o itemtextpaddingRECT(long left,long bottom)
|------o itemtextcolorstring #RRGGBBAA
|------o itembkcolorstring #RRGGBBAA
|------o itemimagestring path
|------o itemselectedtextcolorstring #RRGGBBAA
|------o itemselectedbkcolorstring #RRGGBBAA
|------o itemselectedimagestring path
|------o itemhottextcolorstring #RRGGBBAA
|------o itemhotbkcolorstring #RRGGBBAA
|------o itemhotimageImage 属性
||------o filestring path
||------o cornerRECT(long left,long bottom)
|------o itemdisabledtextcolorstring #RRGGBBAA
|------o itemdisabledbkcolorstring #RRGGBBAA
|------o itemdisabledimageImage 属性
|------o itemlinecolorstring #RRGGBBAA
|------o itemshowhtmlbool [true|false]
|------o CVerticalLayoutUI::SetAttribute(pstrName,pstrValue)

ListHeaderItemCListHeaderItemUI : public CControlUI
|------o dragablebool [true|false]
|------o sepwidthint
|------o alignstring enum [left|center|right]
|------o itemshowhtmlbool [true|false]
|------o endellipsisbool [true|false]
|------o fontintFont列表的索引号
|------o textcolorstring #RRGGBBAA
|------o textpaddingRECT(long left,long bottom)
|------o showhtmlbool [true|false]
|------o normalimageImage 属性
|------o hotimageImage 属性
|------o pushedimageImage 属性
|------o focusedimageImage 属性
|------o sepimageImage 属性

CListElementUI : public CControlUI,public IListItemUI
|------o selectedvalue 有此属性就选中
|------o CControlUI::SetAttribute(pstrName,pstrValue)

ListExpandElementCListExpandElementUI : public CListTextElementUI
|------o expanderRECT(long left,long bottom)
|------o hideselfbool [true|false]
|------o selectedbool
|------o CListTextElementUI::SetAttribute(pstrName,pstrValue)

ListContainerElementCListContainerElementUIList容器
|------o selectedvalue 有此属性就选中

ListHeaderCListHeaderUI

CListLabelElementUI : public CListElementUI


ListTextElementCListTextElementUI : public CListLabelElementUI


LabelCLabelUI : publicCControlUI
|------o alignstring enum [left|center|right]
|------o endellipsisbool [true|false]
|------o fontintFont列表的索引号
|------o textcolorstring #RRGGBBAA
|------o disabledtextcolorstring #RRGGBBAA
|------o textpaddingRECT(long left,long bottom)
|------o showhtmlbool [true|false]
|------o CControlUI::SetAttribute( pstrName,pstrValue )


TextCTextUI : publicCLabelUI

ComboCComboUI : public CContainerUI,public IListOwnerUI
|------o textpaddingRECT(long left,long bottom)
|------o normalimageImage 属性
|------o hotimageImage 属性
|------o pushedimageImage 属性
|------o focusedimageImage 属性
|------o disabledimageImage 属性
|------o dropBoxstring
|------o itemfontintFont列表的索引号
|------o itemalignstring enum [left|center|right]
|------o itemtextpaddingRECT(long left,long bottom)
|------o itemtextcolorstring #RRGGBBAA
|------o itembkcolorstring #RRGGBBAA
|------o itemimageImage 属性
|------o itemselectedtextcolorstring #RRGGBBAA
|------o itemselectedimageImage 属性
|------o itemhottextcolorstring #RRGGBBAA
|------o itemhotbkcolorstring #RRGGBBAA
|------o itemhotimageImage 属性
|------o itemdisabledtextcolorstring #RRGGBBAA
|------o itemdisabledbkcolorstring #RRGGBBAA
|------o itemdisabledimageImage 属性
|------o itemlinecolorstring #RRGGBBAA
|------o itemshowhtmlbool [true|false]
|------o CContainerUI::SetAttribute(pstrName,220);">ButtonCButtonUI : public CLabelUI
|------o normalimageImage 属性
|------o hotimageImage 属性
|------o pushedimageImage 属性
|------o focusedimageImage 属性
|------o disabledimageImage 属性
|------o hottextcolorstring #RRGGBBAA
|------o pushedtextcolorstring #RRGGBBAA
|------o focusedtextcolorstring #RRGGBBAA
|------o CLabelUI::SetAttribute(pstrName,pstrValue)

OptionCOptionUI : public CButtonUI
|------o groupstring
|------o selectedbool [true|false]
|------o selectedimageImage 属性
|------o foreimageImage 属性
|------o selectedtextcolorstring #RRGGBBAA
|------o CButtonUI::SetAttribute(pstrName,220);">ProgressCProgressUI : publicCLabelUI
|------o fgimageImage 属性
|------o horbool
|------o minint
|------o maxint
|------o valueint
|------o CLabelUI::SetAttribute(pstrName,pstrValue)

SliderCSliderUI : publicCProgressUI
|------o thumbimageImage 属性
|------o thumbhotimageImage 属性
|------o thumbpushedimageImage 属性
|------o thumbsizeSIZE(int x,int y)
|------o stepint
|------o CProgressUI::SetAttribute(pstrName,pstrValue)

RichEditCRichEditUI : public CContainerUI,public IMessageFilterUI
|------o vscrollbarbool [true|false]
|------o autovscrollbool [true|false]
|------o hscrollbarbool [true|false]
|------o autohscrollbool [true|false]
|------o wanttabbool [true|false]
|------o wantreturnbool [true|false]
|------o wantctrlreturnbool [true|false]
|------o richbool [true|false]
|------o multilinebool [false|true]
|------o readonlybool [true|false]
|------o numberonlybool [true|false]
|------o passwordbool [true|false]
|------o alignstring enum [left|center|right]
|------o fontintFont列表的索引号
|------o textcolorstring #RRGGBBAA
|------o CContainerUI::SetAttribute(pstrName,220);">
ActiveXCActiveXUI : publicCControlUI
|------o clsidstring
|------o modulenamestring
|------o delaycreatebool [true|false]
|------o CControlUI::SetAttribute(pstrName,220);">ScrollBarCScrollBarUI : public CControlUI
|------o button1normalimageImage 属性
|------o button1hotimageImage 属性
|------o button1pushedimageImage 属性
|------o button1disabledimageImage 属性
|------o button2normalimageImage 属性
|------o button2hotimageImage 属性
|------o button2pushedimageImage 属性
|------o button2disabledimageImage 属性
|------o thumbnormalimageImage 属性
|------o thumbhotimageImage 属性
|------o thumbpushedimageImage 属性
|------o thumbdisabledimageImage 属性
|------o railnormalimageImage 属性
|------o railhotimageImage 属性
|------o railpushedimageImage 属性
|------o raildisabledimageImage 属性
|------o bknormalimageImage 属性
|------o bkhotimageImage 属性
|------o bkpushedimageImage 属性
|------o bkdisabledimageImage 属性
|------o horbool [true|false]
|------o linesizeint
|------o rangeint
|------o valueint
|------o showbutton1bool [true|false]
|------o showbutton2bool [true|false]
|------o CControlUI::SetAttribute(pstrName,220);">
控件的通用属性
stretchSTRETCHMODE
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 hexFont:<f x>text</f>where x = font idItalic:<i>text</i>Image:<i x y z>where x = image name and y = imagelist num and z(optional) = imagelist idLink:<a x>text</a>where x(optional) = link content,normal like app:notepad or http:www.xxx.comNewLine<n>Paragraph:<p x>text</p>where x = extra pixels indent in pRaw Text:<r>text</r>Selected:<s>text</s>Underline:<u>text</u>X Indent:<x i>where i = hor indent in pixelsY Indent:<y i>where i = ver indent in pixels

原文链接:https://www.f2er.com/xml/298584.html

猜你在找的XML相关文章