HTMLayout支持一些自定义的协议,例如 data:.... res:.... stock:....,格式都类似。
stock实际上仅用于绘制方向箭头(实际上是内置的几个png文件),可用于替代图像URL,下面是使用范例:
import win.ui;
/*DSG{{*/
var winform = ..win.form( bottom=399;parent=...;text="aardio Form";right=599 )
winform.add( )
/*}}*/
import web.layout;
wbLayout = web.layout( winform )
wbLayout.html = /**
<img src="stock:arrow-left" ></img>
<img src="stock:arrow-right" ></img>
<img src="stock:arrow-up" ></img>
<img src="stock:arrow-down" ></img>
<hr />
<div #left > </div>
**/
wbLayout.css = /**
#left {
background:url(stock:arrow-left) no-repeat 0 0 ;
width:48px;
height:48px;
}
**/
winform.show()
win.loopMessage();
|