搜索
查看: 14351|回复: 3

[教程] HTMLayout范例浏览器

  [复制链接]

188

主题

2545

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
14139
发表于 2012-2-29 07:17:27 | 显示全部楼层 |阅读模式
//HTMLayout 界面预览工具
import win.cur;
import win.ui;
import win.ui.menu;
/*DSG{{*/
var winform = ..win.form( text="web.layout(HTMLayout) 界面范例浏览器";bottom=542;parent=...;right=856;border="resizable" )
winform.add(
tab={ dr=1;dl=1;bottom=530;right=843;left=236;dt=1;top=9;z=2;db=1;edge=1;cls=
"tab" };
treeview={ dl=1;bgcolor=15793151;vscroll=1;infoTip=1;right=231;left=23;dt=1;db=1;cls=
"treeview";bottom=527;top=10;z=1;hscroll=1;edge=1;asel=false }
)
/*}}*/

import fsys;
import zlib.unzip;
import inet.downBox;
if( !..io.exist("/html_samples" ) ){
   
if( ..win.msgboxTest(  "HTMLayout范例尚未安装,您需要下载安装HTMLayout范例吗?","aardio") ){
            
        
var downBox = inet.downBox(winform,"aardio - 下载HTMLayout范例")
        downBox.endProc =
function(ret,fileSize,err){
            
if(!err)
               
owner.endModal();
        }
        
        downBox.download(
            
"http://download.aardio.com/aardio/samples/htmlayout_samples.zip"
            ,
"/htmlayout_samples.zip"
            )  

        
if( ! downBox.complete ){
            
return;
        }
        
        
try{
            io.open()
            zlib.unzip.extract(
"/htmlayout_samples.zip","/",
               
function(fileName,extractPath,fileInfo,size,unitSize,unitName){
                    io.print(
"正在解压缩",extractPath)
                    
return true;
                }
            )
            io.close()
        }
        
catch(e){
            fsys.delete(
"/html_samples" )
        }
         
        
if( !..io.exist("/html_samples" ) ){
            winform.msgboxErr(
"下载HTMLayout范例失败","aardio")
        }
        fsys.attrib(
"/html_samples",/*移除*/,0x2/*_FILE_ATTRIBUTE_HIDDEN*/)
    }
}

var frmPreview = winform.tab.add( text="效果预览"; bottom=140;right=325 )
var frmSourceCode = winform.tab.add( text="编辑源码";right=599;bottom=390 )
frmSourceCode.add(
btnHelp={ dr=1;bottom=385;text=
"HTMLayout中文教程";left=20;top=353;z=3;db=1;right=159;cls="button" };
btnExplore={ disabled=1;dr=1;bottom=385;text=
"浏览 ...";left=200;top=353;z=5;db=1;right=314;cls="button" };
richedit={ dr=1;dl=1;bottom=346;vscroll=1;right=591;left=7;dt=1;top=6;multiline=1;z=1;db=1;hscroll=1;edge=1;cls=
"richedit" };
btnCreateProject={ dr=1;disabled=1;bottom=385;right=473;left=319;top=353;z=2;db=1;text=
"另存为 HTMLayout工程";cls="button" };
btnSave={ dr=1;disabled=1;bottom=385;text=
"保存更改";left=481;top=353;z=4;db=1;right=587;cls="button" }
)
frmSourceCode.btnCreateProject.oncommand =
function(id,event){
     createDemoProject();
}
frmSourceCode.btnHelp.oncommand =
function(id,event){
   
import process;
    process.openUrl(
"http://bbs.aardio.com/doc/htmlayout/HTMLLayoutDocMx3.htm")
}
frmSourceCode.richedit.modifyEvent(,0x1
/*_ENM_CHANGE*/);
frmSourceCode.richedit.oncommand =
function(id,event){
   
if( event == 0x300/*_EN_CHANGE*/ ){
        frmSourceCode.btnSave.disabled =
false
    }
}
frmSourceCode.btnSave.oncommand =
function(id,event){
    string.save(getCurrentHtmlFileUrl(), frmSourceCode.richedit.text )
    loadHtmlFile();  
}
frmSourceCode.btnExplore.oncommand =
function(id,event){
    exploreFile();
}

import web.layout;
import web.layout.behavior.tabs;
import web.layout.behavior.shellIcon;
import web.layout.behavior.lightBoxDialog;
import web.layout.behavior.collapsibleByIcon;
import web.layout.behavior.grid;
import web.layout.behavior.sortableGrid;
import web.layout.behavior.scroller;
import web.layout.behavior.dropdown;
import web.layout.behavior.popup;
import web.layout.behavior.expandableList;
import web.layout.behavior.collapsibleList;
import web.layout.behavior.sizer;
import web.layout.behavior.gripper;
import web.layout.behavior.splitter;

var wbLayout = web.layout(frmPreview);

import web.layout.debug; //导入该库以显示HTMLayout错误
wbLayout.attachEventHandler( web.layout.debug ); //为CSSS!添加全局函数 debug;

getCurrentHtmlFileUrl =
function(){
   
if(!winform.treeview.lastClickItem)
        
return;
        
   
var path = winform.treeview.getItemText(winform.treeview.lastClickItem )
   
if( #path ){
        
if( string.find(path,":") ){
            
//中文标题,使用子节点获取真实目录
            var hitem = winform.treeview.getChildItem(winform.treeview.lastClickItem)
            path = winform.treeview.getItemText( hitem );
            path = fsys.getParentDir(path)
            frmSourceCode.btnCreateProject.disabled =
true;
            
return fsys.joinpath("/html_samples",path)
        }
        
        frmSourceCode.btnCreateProject.disabled =
false;
        
return fsys.joinpath("/html_samples",path)  
    }
}

import ide;
import fsys.dlg;
var templateLayout = /********************
import win.ui;
/*DSG{{*/
var winform = win.form( bottom=399;parent=...;text="aardio Form";right=599 )
/*}}*/

import web.layout;
import web.layout.behavior.tabs;

var wbLayout = web.layout(winform);
wbLayout.go("${URL}")

wbLayout.onButtonClick = function (ltTarget,ltEle,reason,behaviorParams) {
   
}

winform.show()
win.loopMessage();

            ********************/

            
var templateLayoutHtml = /********************
import win.ui;
/*DSG{{*/
var winform = win.form( bottom=399;parent=...;text="aardio Form";right=599 )
/*}}*/

import web.layout;
import web.layout.behavior.tabs;
var wbLayout = web.layout(winform);

wbLayout.html = /*********
${HTML}
*********/

wbLayout.onButtonClick = function (ltTarget,ltEle,reason,behaviorParams) {
   
}

winform.show()
win.loopMessage();

            ********************/

            
import fsys.codepage;           
createDemoProject =
function(){
   
var targetDir = fsys.dlg.opendir(,,"请选择工程保存目录");
   
if(!targetDir)return;
    targetDir = fsys.joinpath(targetDir,
"/HTMLayout范例工程/")
    fsys.createDir(targetDir);
    fsys.copy(
"~\extensions\wizard\project\win",targetDir)
    targetDir = fsys.joinpath(targetDir,
"win")
   
var samplesPath = getCurrentHtmlFileUrl();

   
if( wbLayout.loadFileCount ){
        
var samplesDir = fsys.getParentDir(samplesPath);
        fsys.copy( samplesDir,fsys.joinpath(targetDir,
"\res") );
        
        
var url = fsys.path.relative( samplesPath ,fsys.getParentDir(samplesDir),true)  
        string.save(fsys.joinpath(targetDir,
"main.aardio"),( string.replace(templateLayout,"@${URL}",fsys.joinpath("\res",url) ) ) )
    }
   
else {
            string.save(fsys.joinpath(targetDir,
"main.aardio"),( string.replace(templateLayoutHtml,"@${HTML}",fsys.codepage.load(samplesPath) ) ) )
    }
   
    ide.openDocument(fsys.joinpath(targetDir,
"default.aproj"))
}

frmSourceCode.richedit.wndproc =
function(hwnd,message,wParam,lParam){
   
if( message == 0x204/*_WM_RBUTTONDOWN*/  ){
      
owner.popMenu( {
        {
"在IDE中创建HTMLayout工程"; createDemoProject }
       } );
    }
}

var NMHL_LOAD_DATA = web.layout.NMHL_LOAD_DATA;
wbLayout.callback =
function ( message, wParam, lParam, vParam, notifyCode ) {  
   
if( notifyCode ==0xB01/*_HLN_LOAD_DATA*/ ){
        
var nmld = raw.convert(lParam,NMHL_LOAD_DATA() );
        
var url = string.fromUnicode( nmld.uri,,true);
        
if( ! string.startWith(url,"data:",true) ){
            wbLayout.loadFileCount++;
        };
    }
}

import inet.whttp;
var http = inet.whttp();
loadHtmlFile =
function(){
   
var path = getCurrentHtmlFileUrl()
   
if(!#path)return;
    winform.text =
"web.layout(HTMLayout) 界面范例浏览器 " + path;
   
    win.cur.beginWaitCur();
    frmSourceCode.richedit.text =
"正在加载......"
    wbLayout.write(
"<body>正在加载.......</body>" )   
    winform.setTimeout(
        
function(){
            wbLayout.loadFileCount = 0;
            wbLayout.go(path,,
true);
            frmSourceCode.btnExplore.disabled =
false;
            frmSourceCode.richedit.text = string.load(path);
            frmSourceCode.btnSave.disabled =
true;
            win.cur.endCur()   
        }
    )   
}

import process;
exploreFile =
function(){
   
var path = getCurrentHtmlFileUrl()
   
if(!#path)return;
   
if( fsys.isDir(path) )
        process.explore(path)
   
else {
        process.explore_select(path)
    }
}

winform.treeview.onnotify =
function(id,code,ptr){

   
if( code == 0xFFFFFFFE/*_NM_CLICK*/ ){  
        
var hItem = winform.treeview.hitTest()  
        
if( hItem ){
             winform.treeview.lastClickItem = hItem
            
var path = winform.treeview.getItemText(hItem);
            
if( (#path) ? string.endWith(path,".htm",true) ){
                loadHtmlFile()
             }
        }
    }
   
elseif(code = 0xFFFFFFFB/*_NM_RCLICK*/){
        
var hItem,tvht = winform.treeview.hitTest();
        winform.treeview.setSelected(hItem)
        
var menu = win.ui.popmenu(winform)
        menu.add(
"预览效果",loadHtmlFile )
        menu.add(
"使用资源管理器浏览...",exploreFile )
        menu.add(
"在IDE中创建HTMLayout工程",createDemoProject )
        menu.popup(x,y,
true);
    }
}
   
var tab = {
{ text=
"cssmap.htm" };
{ text=
"index.htm" };
{ text=
"CSS扩展";
    children={
        { text=
"css-plus\aspect-ratio.htm" };
        { text=
"css-plus\back-fore.htm" };
        { text=
"css-plus\big-scrollbar-styling.htm" };
        { text=
"css-plus\color-transform-gamma.htm" };
        { text=
"css-plus\color-transform.htm" };
        { text=
"css-plus\constants.htm" };
        { text=
"css-plus\content-transform.htm" };
        { text=
"css-plus\hsl-colors.htm" };
        { text=
"css-plus\opacity.htm" };
        { text=
"css-plus\outline-glow-on-black.htm" };
        { text=
"css-plus\outline-glow.htm" };
        { text=
"css-plus\outline-styles.htm" };
        { text=
"css-plus\scroll-manner-styling-flow-grid.htm" };
        { text=
"css-plus\scroll-manner-styling-table.htm" };
        { text=
"css-plus\scroll-manner-styling.htm" };
        { text=
"css-plus\scrollbar-styling.htm" };
        { text=
"css-plus\small-scrollbar-styling.htm" };
        { text=
"css-plus\table-of-content.htm" };
        { text=
"css-plus\theme-images.htm" };
        { text=
"css-plus\tree-view-lines.htm" }
    }
};
{ text=
"csss!脚本";
    children={
        { text=
"csss!\1.htm" };
        { text=
"csss!\animate-bounce.htm" };
        { text=
"csss!\animate-cubic.htm" };
        { text=
"csss!\animate-ease-list.htm" };
        { text=
"csss!\animation-expand-horz.htm" };
        { text=
"csss!\animation-expand.htm" };
        { text=
"csss!\animation-fade.htm" };
        { text=
"csss!\animation-simple.htm" };
        { text=
"csss!\animation-slide.htm" };
        { text=
"csss!\autofocus.htm" };
        { text=
"csss!\behavior-method-calls.htm" };
        { text=
"csss!\bound-slider.htm" };
        { text=
"csss!\calc-basic.htm" };
        { text=
"csss!\calc-dom.htm" };
        { text=
"csss!\calc-ext.htm" };
        { text=
"csss!\chart-custom-methods.htm" };
        { text=
"csss!\collapsible-by-checkbox.htm" };
        { text=
"csss!\collapsible-by-icon.htm" };
        { text=
"csss!\collapsible-when-action.htm" };
        { text=
"csss!\collapsible-with-behavior.htm" };
        { text=
"csss!\custom-global-functions.htm" };
        { text=
"csss!\custom-tooltip-positioning.htm" };
        { text=
"csss!\dip-units.htm" };
        { text=
"csss!\dropdown-list.htm" };
        { text=
"csss!\frame-loading.htm" };
        { text=
"csss!\grid-sortable.htm" };
        { text=
"csss!\grid-with-collapsibles.htm" };
        { text=
"csss!\highlight-links.htm" };
        { text=
"csss!\keyboard-handling.htm" };
        { text=
"csss!\label-for-activation.htm" };
        { text=
"csss!\localization.htm" };
        { text=
"csss!\loops.htm" };
        { text=
"csss!\progress.htm" };
        { text=
"csss!\pure-css-tabs-states.htm" };
        { text=
"csss!\pure-css-tabs.htm" };
        { text=
"csss!\scroll-to-view.htm" };
        { text=
"csss!\show-popup.htm" };
        { text=
"csss!\size-changed.htm" };
        { text=
"csss!\slider-and-better-buddy.htm" };
        { text=
"csss!\styles-link-activation.htm" };
        { text=
"csss!\table-checkboxes.htm" };
        { text=
"csss!\text-width.htm" };
        { text=
"csss!\textarea-method-calls.htm" };
        { text=
"csss!\total.htm" };
        { text=
"csss!\use-of-consts.htm" };
        { text=
"csss!\use-of-other-dom-elements.htm" };
    };
};
{ text=
"入门";
    children = {
        { text=
"generic\backgrounds.htm" };
        { text=
"generic\custom-control-border.htm" };
        { text=
"generic\hidden.htm" };
        { text=
"generic\iframe.htm" };
        { text=
"generic\overflows.htm" };
        { text=
"generic\selectors.htm" };
        { text=
"generic\sidebars.htm" };
        { text=
"generic\tabindex_navigation.htm" };
        children = {
            { text=
"generic\backgrounds" };
            { text=
"generic\sidebars" }
        }
    };
};
{ text=
"推荐";
    children={
        { text=
"goodies\animated-cursor.htm" };
        { text=
"goodies\animatedgifs.htm" };
        { text=
"goodies\cursor.htm" };
        { text=
"goodies\custom-tags.htm" };
        { text=
"goodies\data-url.htm" };
        { text=
"goodies\file-icon.htm" };
        { text=
"goodies\gifs.htm" };
        { text=
"goodies\icon.htm" };
        { text=
"goodies\picture.htm" };
        { text=
"goodies\pictures" };
        { text=
"goodies\smiley" };
    }
};
{ text=
"特效";
    children={
        { text=
"effects\marquee.htm" };
        { text=
"effects\reflection.htm" }
    }
};
{ text=
"鱼眼特效";
    children={
        { text=
"fisheye\magnifier-4.htm" };
        { text=
"fisheye\magnifier-left-bottom.htm" };
        { text=
"fisheye\magnifier.htm" };
        { text=
"fisheye\magnifieranza.htm" }
    }
};
{ text=
"绝对定位";
    children={
        { text=
"abs\abs.htm" };
        { text=
"abs\abspos.htm" };
        { text=
"abs\abs_fix.htm" };
        { text=
"abs\fix_center.htm" };
        { text=
"abs\menus.htm" };
        { text=
"abs\rel_abs.htm" }
    }
};
{ text=
"背景";
    children={
        { text=
"back\alpha-back.htm" };
        { text=
"back\backdemo.htm" };
        { text=
"back\keep-ratio.htm" }
    };
};
{ text=
"圆角边框";
    children={
        { text=
"border-radius\border-radius.htm" };
        { text=
"border-radius\rounded-tabs-at-bottom.htm" };
        { text=
"border-radius\rounded-tabs.htm" }
    }
};
{ text=
"字体";
    children={
        { text=
"@font-face\test.htm" }
    };
};
{ text=
"svg绘图";
    children={
        { text=
"svg\gradient-svg.htm" };
        { text=
"svg\cowboy-svg.htm" };
    }
};
{ text=
"PNG动画";
    children={
        { text=
"animated-png\apng.htm" };
        { text=
"animated-png\disposal.htm" };
        { text=
"animated-png\loading.htm" }
    }
};
{ text=
"动画";
    children={
        { text=
"animations\blend.htm" };
        { text=
"animations\h-sliding-bar-csss!.htm" };
        { text=
"animations\h-sliding-bar.htm" };
        { text=
"animations\popup-animations.htm" };
        { text=
"animations\sliding-bar-csss!.htm" };
        { text=
"animations\sliding-bar.htm" };
        { text=
"animations\sliding-list.htm" }
    }
};
{ text=
"渐变效果(transition)";
    children={
        { text=
"transitions\!transition-doc.htm" };
        { text=
"transitions\accordion.htm" };
        { text=
"transitions\border-animation.htm" };
        { text=
"transitions\easing-functions.htm" };
        { text=
"transitions\flex-units-transition.htm" };
        { text=
"transitions\folding.htm" };
        { text=
"transitions\margin-animation.htm" };
        { text=
"transitions\opacity.htm" };
        { text=
"transitions\reverse-modes.htm" };
        { text=
"transitions\to-intrinsic-height.htm" }
    }
};
{ text=
"交互扩展(behaviors)";
    children = {
        { text=
"behaviors\accesskeys.htm" };
        { text=
"behaviors\actions.htm" };
        { text=
"behaviors\chart.htm" };
        { text=
"behaviors\colorpopup.htm" };
        { text=
"behaviors\commands.htm" };
        { text=
"behaviors\dropdown-with-select.htm" };
        { text=
"behaviors\dropdown.htm" };
        { text=
"behaviors\editable-select.htm" };
        { text=
"behaviors\form-test.htm" };
        { text=
"behaviors\graphin-live-clock.htm" };
        { text=
"behaviors\htmlarea.htm" };
        { text=
"behaviors\hyperlinks.htm" };
        { text=
"behaviors\light-box-dialog.htm" };
        { text=
"behaviors\live-clock.htm" };
        { text=
"behaviors\more_tabs.htm" };
        { text=
"behaviors\path-behavior.htm" };
        { text=
"behaviors\scroller.htm" };
        { text=
"behaviors\select-buddy.htm" };
        { text=
"behaviors\shell-icon.htm" };
        { text=
"behaviors\sizer-popup.htm" };
        { text=
"behaviors\treeview.htm" };
        { text=
"behaviors\splitters.htm" };
        children={
            { text=
"behaviors\colorpopup" };
            { text=
"behaviors\more_tabs" }
        }
    }
};
{ text=
"提交表单";
    children={
        { text=
"communication\file-upload.htm" };
        { text=
"communication\form-submission.htm" }
    }
};

{ text=
"拖放";
    children={
        { text=
"drag-n-drop\drop-target-types.htm" };
        { text=
"drag-n-drop\gripper.htm" };
        { text=
"drag-n-drop\menu-dd.htm" };
        { text=
"drag-n-drop\shopping-cart.htm" };
        { text=
"drag-n-drop\tabs-reordering.htm" };
        { text=
"drag-n-drop\tree-view-context.htm" };
        { text=
"drag-n-drop\tree-view-rtl.htm" };
        { text=
"drag-n-drop\tree-view.htm" }
    }
};
{ text=
"窗口控件";
    children={
    { text=
"forms\basiccontrols.htm" };
    { text=
"forms\buttons.htm" };
    { text=
"forms\custom-ctl-styles.htm" };
    { text=
"forms\custom-dropdown-selects.htm" };
    { text=
"forms\datetime.htm" };
    { text=
"forms\dropdown-select-tree.htm" };
    { text=
"forms\dropdown-selects.htm" };
    { text=
"forms\editable-dropdown-selects.htm" };
    { text=
"forms\edits.htm" };
    { text=
"forms\form.htm" };
    { text=
"forms\input-text-and-button.htm" };
    { text=
"forms\listview.htm" };
    { text=
"forms\multiselect.htm" };
    { text=
"forms\path-select.htm" };
    { text=
"forms\plaintext.htm" };
    { text=
"forms\popup-selector.htm" };
    { text=
"forms\progress.htm" };
    { text=
"forms\scrollbars.htm" };
    { text=
"forms\selects.htm" };
    { text=
"forms\slider.htm" };
    { text=
"forms\table-select.htm" };
    { text=
"forms\tabs-in-tabs.htm" };
    { text=
"forms\tabs.htm" };
    { text=
"forms\textarea.htm" };
    { text=
"forms\tree-view.htm" };
    { text=
"forms\tristate-checkbox.htm" }
    };
};
{ text=
"菜单";
    children={
        { text=
"menu\c-menu.htm" };
        { text=
"menu\context-menu.htm" };
        { text=
"menu\for-track-popup-test.htm" };
        { text=
"menu\menu-bar.htm" };
        { text=
"menu\non-rectangular-menu.htm" };
        { text=
"menu\popup-menu.htm" }
    }
};
{ text=
"tooltip提示";
    children={  
        { text=
"tooltips\month.htm" };
        { text=
"tooltips\titles.htm" }
    }
};
{ text=
"编辑器";
    children={
        { text=
"editor\index.htm" }
    }
};
{ text=
"richtext控件";
    children={
        { text=
"richtext\help-shortcuts.htm" };
        { text=
"richtext\plaintext-modes.htm" };
        { text=
"richtext\plaintext.htm" };
        { text=
"richtext\richtext-list.htm" };
        { text=
"richtext\richtext.htm" }
    };  
};
{ text=
"fieldset标签";
    children={
        { text=
"fieldset\layout.htm" }
    }
};

{ text=
"table表格";
    children={
    { text=
"fixed-table\collapsible-sections-classic.htm" };
    { text=
"fixed-table\collapsible-sections.htm" };
    { text=
"fixed-table\simple-sections.htm" };
    { text=
"fixed-table\simple.htm" };
    { text=
"fixed-table\table-fixed-10000-rows-sections.htm" };
    { text=
"fixed-table\table-fixed-10000-rows.htm" }
    }
};
{ text=
"布局模式";
    children={
        { text=
"flows\columns.htm" };
        { text=
"flows\demo-at-w3c.htm" };
        { text=
"flows\dynamic-flow-tmpl.htm" };
        { text=
"flows\grid-layout-2.htm" };
        { text=
"flows\grid-layout-3.htm" };
        { text=
"flows\grid-layout-4.htm" };
        { text=
"flows\grid.htm" };
        { text=
"flows\h-flow.htm" };
        { text=
"flows\template-layout-using-indexes.htm" };
        { text=
"flows\template-layout.htm" };
        { text=
"flows\text-fragment.htm" };
        { text=
"flows\v-flow.htm" };
        {  { text=
"flows\content";
                children = {
                        { text=
"flows\content\flow-and-floats.htm" };
                        { text=
"flows\content\flow-horizontal-flow.htm" };
                        { text=
"flows\content\flow-horizontal.htm" };
                        { text=
"flows\content\flow-template.htm" };
                        { text=
"flows\content\flow-vertical-flow.htm" };
                        { text=
"flows\content\flow-vertical.htm" };
                        { text=
"flows\content\lorem-ipsum.htm" }
                };
            }
        }
    };
};
{ text=
"for-at";
    children={
        { text=
"for-at\buttons.htm" };
        { text=
"for-at\ext-scrollbars.htm" }
    }
};

{ text=
"框架应用";
    children={
        { text=
"frames\behaviors.htm" };
        { text=
"frames\border-spacing.htm" };
        { text=
"frames\frame-splitter-styling.htm" };
        { text=
"frames\frame1.htm" };
        { text=
"frames\frame2.htm" };
        { text=
"frames\frame3.htm" };
        { text=
"frames\frame4.htm" };
        { text=
"frames\frames-rtl.htm" };
        { text=
"frames\frames.htm" };
        { text=
"frames\frameset-splitter.htm" };
        { text=
"frames\large-content-in-frames.htm" };
        { text=
"frames\standalone-frame.htm" };
        { text=
"sort-of-frames\help.htm" }
    }
};
{  text=
"网格(grid)";
    children={
        { text=
"grid\scrollable-table.htm" };
        { text=
"grid\sortable-grid.htm" };
        { text=
"grid\table-tbody-thead.htm" };
        { text=
"grid\virtual-table.htm" }
    }
};
{ text=
"水平/垂直对齐";
    children={
    { text=
"horizontal-vertical-align\horizontal-align-flow.htm" };
    { text=
"horizontal-vertical-align\horizontal-align.htm" };
    { text=
"horizontal-vertical-align\vertical-align.htm" }
    }
};
{ text=
"include语法";
    children={
        { text=
"includes\root.htm" }
        { text=
"includes\chunk1.htm" };
        { text=
"includes\chunk2.htm" };
    }
};
{ text=
"优化";
    children={
        { text=
"optimizations\dyn-updates.htm" }
    }
};
{ text=
"打印";
    children={
        { text=
"printing\!readme!.htm" };
        { text=
"printing\page-break-after.htm" };
        { text=
"printing\page-break-before.htm" };
        { text=
"printing\page-break-inside.htm" }
    }
};
{ text=
"MSVS 起始页效果";
    children={
        { text=
"MSVS-start-page\start-page.htm" };
        { text=
"MSVS-start-page\content\getting-started.htm" };
        { text=
"MSVS-start-page\content\headlines.htm" };
        { text=
"MSVS-start-page\content\list-of-projects.htm" };
        { text=
"MSVS-start-page\content\msdn-recent-news.htm" }
    }
};
{ text=
"压力测试";
    children={
        { text=
"stress\animation.htm" };
        { text=
"stress\complex_tables.htm" };
        { text=
"stress\grid-1000-outline-glow.htm" };
        { text=
"stress\grid-1000-rounded-corners.htm" };
        { text=
"stress\grid-1000.htm" };
        { text=
"stress\grid-fixed-1000.htm" };
        { text=
"stress\grid-fixed-10000.htm" };
        { text=
"stress\select-10000.htm" };
        { text=
"stress\table-10000.htm" };
        { text=
"stress\table-fixed-10000.htm" };
        { text=
"stress\tabs" ;
            children={  
                { text=
"stress\tabs\form.htm" };
                { text=
"stress\tabs\grid-1000.htm" };
                { text=
"stress\tabs\tabs.htm" };
                { text=
"stress\tabs\tree-view.htm" };
            }
        }
    };
};
{ text=
"HTML32.htm" };
}

import web.json;
import win.clip
win.clip.write( web.json.stringify(tab,
true))
hitem = winform.treeview.insertItem( tab )


winform.show()
win.loopMessage();
回复

使用道具 举报

188

主题

2545

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
14139
 楼主| 发表于 2012-2-29 07:38:26 | 显示全部楼层

在forms目录下可以看到常用窗口控件的演示,例如按钮,进度条......等等。 而部分动画范例需要编写相应的扩展才能显示效果。 建议使用 HTMLay

在forms目录下可以看到常用窗口控件的演示,例如按钮,进度条......等等。
而部分动画范例需要编写相应的扩展才能显示效果。

建议使用 HTMLayout  结合 web.form 来做界面,
例如上半部导航窗口用HTMLaout,下半部主窗口用web.form,
这样相互结合可以优势互补,达到最佳效果。

回复

使用道具 举报

7

主题

305

帖子

1914

积分

新手入门

积分
1914
QQ
发表于 2012-2-29 21:18:09 | 显示全部楼层

这个范例有好多需要学习的,慢慢消化。

这个范例有好多需要学习的,慢慢消化。
每天进步一点点......
回复

使用道具 举报

53

主题

275

帖子

1738

积分

四级会员

Rank: 6Rank: 6

积分
1738
发表于 2012-7-20 11:35:40 | 显示全部楼层

范例下载不了了 那个zip文件

范例下载不了了  那个zip文件
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

手机版|未经许可严禁引用或转载本站文章|站长邮箱|aardio.com|aardio官方社区 ( 皖ICP备09012014号 )

GMT+8, 2020-11-24 19:57 , Processed in 0.062500 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表