(2013年舊文)
YAUI
YAUI(Y et A nother UI), 是一個新思路的GUI系統(tǒng), 它參考了傳統(tǒng)GUI和HTML的設(shè)計(jì)
以下是它的特點(diǎn):
- 較完備的layout, GUI比較麻煩的地方,在于排版布局,YAUI的布局系統(tǒng)類似HTML;
- 組合性,并不直接提供高級控件(目前),而是基礎(chǔ)圖元(div, rect, round, map等),通過控件模板容易地組合出高級控件,屬性繼承的提供類似css的功能;
- 可撿圖元對象和變換,可用于提供可視化對象的編輯功能;
- XML layout desc, 使用query, 事件綁定;
- YAUI,可用做傳統(tǒng)UI(如編輯器),也適合做平面化設(shè)計(jì);
代碼示例;
var strXML = @"
<div layout='vertical, shrink'>
<label id='lb1' text='touch me!'><label>
<label id='lb2' text='touch me again!'><label>
<label id='lb3' text='donnot touch me!'><label>
</div>"; //layout
var ui = UI.loadXML(strXML);
var lb = ui.findByID('lb1') as UILable; //query
lb.text = "touch me!"; //屬性
lb.evtClick = ()=>print("i am touched!"); //事件
demo
[download][1]
![demo pic][21]
![demo pic][3]
![demo pic][31]

demo pic

demo pic
todo list
- more feathers, 位圖支持, 漸變色填充,xml定義控件,預(yù)置控件(window style)...
- 修改dirty rect 實(shí)現(xiàn), 優(yōu)化;
- (visula) runtime, demo.
- 渲染支持,render by cairo or direct2D,direct3D/openGL/opengl es?
- layered window? app UI system?
- canvas(in html5) version?
- c++ & scripts version?
Version
0.1
me
453588006@qq.com
[1]:https://raw.githubusercontent.com/TheWindX/YAUI/master/demo.zip
[2]:https://raw.githubusercontent.com/TheWindX/YAUI/master/doc/demo2.png
[21]:https://raw.githubusercontent.com/TheWindX/YAUI/master/doc/demo21.png
[3]:https://raw.githubusercontent.com/TheWindX/YAUI/master/doc/demo3.png
[31]:https://raw.githubusercontent.com/TheWindX/YAUI/master/doc/demo31.png
(2013舊文)