Changeset 9

Show
Ignore:
Timestamp:
01/17/08 09:05:49 (4 years ago)
Author:
bobef
Message:

Small changes in HTMLayout

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/examples/htmlayout/msvs_start_page.d

    r7 r9  
    3838                return true; //handled the event 
    3939            } 
    40             return false; //not call other handlers 
     40            return false; //call other handlers 
    4141        }); 
    4242 
  • trunk/import/flowerd/common.d

    r5 r9  
    5454    int end=basedirs.length-(lastCommonDir+1); 
    5555    for (uint i=0;i<end; ++i) ret ~= ".."~FileConst.PathSeparatorString; 
    56     TArray!(char[]).deleteItems(destdirs,0,lastCommonDir+1); 
     56    Array.remove(destdirs,0u,cast(uint)lastCommonDir+1); 
    5757    if(destdirs.length) ret ~= join(destdirs,FileConst.PathSeparatorString); 
    5858    if(!ret.length) ret="."; 
     
    6060} 
    6161 
    62 template TArray(_type) 
     62class Array 
    6363{ 
    64     int sort(inout _type[] ar,int function(_type a,_type b) compareFunc
     64    static bool remove(T)(ref T[] ar,T item,uint len=1
    6565    { 
    66         if(!ar.length) return 0; 
    67         _type tmp; 
    68         byte notdone=1; 
    69         int c=0,c2=0; 
     66        return Array.remove(ar,Array.index(ar,item),len); 
     67    } 
     68 
     69    static bool remove(T)(ref T[] ar,uint index,uint len=1) 
     70    { 
     71        if(index>=ar.length || index+len>ar.length) return false; 
     72        if(len==0) return true; 
     73        if(len==ar.length) 
     74        { 
     75            ar=null; 
     76            return 1; 
     77        } 
     78        ar=ar[0..index]~ar[index+len..ar.length]; 
     79        return true; 
     80    } 
     81 
     82    static uint index(T)(T[] ar,T item) 
     83    { 
     84        foreach(i,v;ar) if(v is item) return i; 
     85        return ar.length; 
     86    } 
     87 
     88    static bool insert(T)(ref T[] ar,T item,uint index=uint.max) 
     89    { 
     90        if(index==uint.max) index=ar.length; 
     91        if(index>ar.length) return false; 
     92        ar.length=ar.length+1; 
     93        if(Array.move(ar,ar.length-1,index)==false) return false; 
     94        ar[index]=item; 
     95        return true; 
     96    } 
     97 
     98    static bool move(T)(ref T[] ar,T src,T dest) 
     99    { 
     100        if(src is dest) return true; 
     101        return Array.move(ar,Array.index(ar,src),Array.index(ar,dest)); 
     102    } 
     103 
     104    static bool move(T)(ref T[] ar,uint src,uint dest) 
     105    { 
     106        if(src>=ar.length || dest>=ar.length) return false; 
     107        if(src==dest) return true; 
     108        int step=1; 
     109        uint next; 
     110        T t; 
     111        if(src>dest) step=-1; 
     112        for(;src!=dest;src=next) 
     113        { 
     114            next=src+step; 
     115            t=ar[src]; 
     116            ar[src]=ar[next]; 
     117            ar[next]=t; 
     118        } 
     119        return true; 
     120    } 
     121 
     122    static bool sort(T)(ref T[] ar,int function(T a,T b) compareFunc) 
     123    { 
     124        if(ar.length==0) return false; 
     125        T tmp; 
     126        bool notdone=true; 
     127        uint c=0,c2=0; 
    70128        for(;notdone;) 
    71129        { 
    72             notdone=0
     130            notdone=false
    73131            for(c=ar.length-1;c>0;c=c2) 
    74132            { 
     
    79137                    ar[c2]=ar[c]; 
    80138                    ar[c]=tmp; 
    81                     notdone=1
     139                    notdone=true
    82140                } 
    83141            } 
    84142        } 
    85         return 1; 
    86     } 
    87  
    88     int deleteItems(inout _type[] ar,int index,int len=1) 
    89     { 
    90         if(index<0 || index>=ar.length || index+len>ar.length) return 0; 
    91         if(len==0) return 1; 
    92         if(len==ar.length) 
    93         { 
    94             ar=null; 
    95             return 1; 
    96         } 
    97         ar=ar[0..index]~ar[index+len..ar.length]; 
    98         return 1; 
     143        return true; 
    99144    } 
    100145} 
     
    102147class SimpleStack(T) 
    103148{ 
    104     this(int step=5){this.step=step<=0?1:step;} 
     149    this(int step=5,T bad=T.init){this.bad=bad;this.step=step<=0?1:step;} 
    105150 
    106151    void push(T item) 
     
    127172    { 
    128173        if(stack.length) return stack[pointer-1]; 
    129         else return T.init
     174        else return bad
    130175    } 
    131176 
     
    139184    int pointer; 
    140185    T[] stack; 
     186    T bad; 
    141187} 
  • trunk/import/flowerd/config.d

    r5 r9  
    205205        { 
    206206            if(!n) return; 
    207             foreach(int i,Node a;mchildren) if(n is a) {TArray!(Node).deleteItems(mchildren,i,1);break;} 
     207            Array.remove(mchildren,n); 
    208208        } 
    209209 
     
    323323            if(a[c]!="..") 
    324324            { 
    325                 for(int c2=c;c2<a.length;++c2) 
     325                for(uint c2=c;c2<a.length;++c2) 
    326326                { 
    327327                    if(a[c2]=="..") 
     
    331331                            c=-1; 
    332332                            done=0; 
    333                             TArray!(char[]).deleteItems(a,c2-1,2); 
     333                            Array.remove(a,c2-1,2u); 
    334334                            break; 
    335335                        } 
     
    342342                            c=-1; 
    343343                            done=0; 
    344                             TArray!(char[]).deleteItems(a,c2,1); 
     344                            Array.remove(a,c2,1u); 
    345345                            break; 
    346346                        } 
  • trunk/import/htmlayout/behaviors/test.d

    r5 r9  
    1212class HTestBehavior : HBehavior 
    1313{ 
    14     this(){super("test",EVENT_GROUPS.HANDLE_MOUSE);} 
     14    this(){super("test",HANDLE_MOUSE);} 
    1515 
    16     bool onMouse(HElement el,MOUSE_PARAMS *params) {tango.io.Stdout.Stdout("handling mouse\n");return false;} 
     16    bool onMouse(HMouse params) {tango.io.Stdout.Stdout("handling mouse\n");return false;} 
    1717} 
  • trunk/import/htmlayout/capi.d

    r6 r9  
    99 
    1010extern(Windows): 
     11 
     12/////// update 3.2.2.4 
     13 
     14alias UINT function( LPCWSTR text, UINT textLength, UINT mode, JSON_VALUE *pVal ) HTMLayoutParseValue_t; 
     15HTMLayoutParseValue_t HTMLayoutParseValue; 
    1116 
    1217/////// update 3.2.2.1 
     
    384389alias BEHAVIOR_EVENTS.INIT_DATA_VIEW INIT_DATA_VIEW; 
    385390alias BEHAVIOR_EVENTS.ROWS_DATA_REQUEST ROWS_DATA_REQUEST; 
     391alias BEHAVIOR_EVENTS.UI_STATE_CHANGED UI_STATE_CHANGED; 
    386392alias BEHAVIOR_EVENTS.FIRST_APPLICATION_EVENT_CODE FIRST_APPLICATION_EVENT_CODE; 
    387393 
     
    494500        r.method_name=toStringz(name); 
    495501        r.argv=params.ptr; 
     502        r.argc=params.length; 
     503        return r; 
     504    } 
     505 
     506    static XCALL_PARAMS* opCall(char[] name,JSON_VALUE *param=null) 
     507    { 
     508        auto r=new XCALL_PARAMS; 
     509        r.methodparams.methodID = XCALL; 
     510        r.method_name=toStringz(name); 
     511        r.argv=param; 
     512        r.argc=1; 
    496513        return r; 
    497514    } 
     
    649666 
    650667    METHOD_PARAMS* opCast(){return &methodparams;} 
     668    INT pos(){return value;} 
    651669    INT min(){return min_value;} 
    652670    INT max(){return max_value;} 
     
    800818    { 
    801819        if(v_type==V_STRING) return .toString((cast(wchar_t*)(data.s_val+1))[0..data.s_val.length]); 
    802         else if(v_type==V_UNDEFINED && data.l_val!=0) return Int.toString(data.l_val); 
     820        else if(v_type==V_UNDEFINED) 
     821        { 
     822            if(data.l_val!=0) return Int.toString(data.l_val); 
     823            else return "undefined"; 
     824        } 
    803825        else if(v_type==V_INT) return Int.toString(data.i_val); 
    804826        else if(v_type==V_BOOL) return data.i_val?"true":"false"; 
     
    819841        else if(v_type==V_INT || v_type==V_BOOL) return data.i_val; 
    820842        else if(v_type==V_STRING) return Float.toFloat(toString); 
    821         else throw new Exception("Don't know how to convert "~typename~"to float"); 
     843        else return double.nan;//throw new Exception("Don't know how to convert "~typename~"to float"); 
    822844    } 
    823845 
     
    829851        else if(v_type==V_STRING) return Int.toLong(toString); 
    830852        else throw new Exception("Don't know how to convert "~typename~"to integer"); 
     853    } 
     854 
     855    bool toBool() 
     856    { 
     857        if(v_type==V_UNDEFINED) 
     858        { 
     859            if(data.l_val!=0) return cast(bool)data.l_val; 
     860            else return false; 
     861        } 
     862        else if(v_type==V_INT || v_type==V_BOOL) return cast(bool)data.i_val; 
     863        else if(v_type==V_REAL) return cast(bool)data.r_val; 
     864        else if(v_type==V_STRING) return cast(bool)toString.length; 
     865        else throw new Exception("Don't know how to convert "~typename~"to boolean"); 
    831866    } 
    832867 
     
    845880        else if(v_type==V_MAP) return "map"; 
    846881        else return null; 
     882    } 
     883 
     884    static JSON_VALUE* parse(char[] text,uint mode=0) 
     885    { 
     886        auto value=new JSON_VALUE; 
     887        if(HTMLayoutParseValue(toString16(text).ptr,text.length,mode,value)==0) 
     888        { 
     889            delete value; 
     890            return null; 
     891        } 
     892        return value; 
    847893    } 
    848894 
     
    17341780 
    17351781import tango.sys.SharedLib; 
    1736 private SharedLib __dll_htmlayout; 
    17371782 
    17381783void loadHTMLayout(char[] name=null) 
    17391784{ 
    1740     __dll_htmlayout=SharedLib.load(name?name:"htmlayout.dll"); 
    1741     HTMLayout_UseElement=cast(HTMLayout_UseElement_t)__dll_htmlayout.getSymbol("HTMLayout_UseElement\0"); 
    1742     HTMLayout_UnuseElement=cast(HTMLayout_UnuseElement_t)__dll_htmlayout.getSymbol("HTMLayout_UnuseElement\0"); 
    1743     HTMLayoutGetRootElement=cast(HTMLayoutGetRootElement_t)__dll_htmlayout.getSymbol("HTMLayoutGetRootElement\0"); 
    1744     HTMLayoutGetFocusElement=cast(HTMLayoutGetFocusElement_t)__dll_htmlayout.getSymbol("HTMLayoutGetFocusElement\0"); 
    1745     HTMLayoutFindElement=cast(HTMLayoutFindElement_t)__dll_htmlayout.getSymbol("HTMLayoutFindElement\0"); 
    1746     HTMLayoutGetChildrenCount=cast(HTMLayoutGetChildrenCount_t)__dll_htmlayout.getSymbol("HTMLayoutGetChildrenCount\0"); 
    1747     HTMLayoutGetNthChild=cast(HTMLayoutGetNthChild_t)__dll_htmlayout.getSymbol("HTMLayoutGetNthChild\0"); 
    1748     HTMLayoutGetParentElement=cast(HTMLayoutGetParentElement_t)__dll_htmlayout.getSymbol("HTMLayoutGetParentElement\0"); 
    1749     HTMLayoutGetElementText=cast(HTMLayoutGetElementText_t)__dll_htmlayout.getSymbol("HTMLayoutGetElementText\0"); 
    1750     HTMLayoutGetElementHtml=cast(HTMLayoutGetElementHtml_t)__dll_htmlayout.getSymbol("HTMLayoutGetElementHtml\0"); 
    1751     HTMLayoutGetElementInnerText=cast(HTMLayoutGetElementInnerText_t)__dll_htmlayout.getSymbol("HTMLayoutGetElementInnerText\0"); 
    1752     HTMLayoutSetElementInnerText=cast(HTMLayoutSetElementInnerText_t)__dll_htmlayout.getSymbol("HTMLayoutSetElementInnerText\0"); 
    1753     HTMLayoutGetElementInnerText16=cast(HTMLayoutGetElementInnerText16_t)__dll_htmlayout.getSymbol("HTMLayoutGetElementInnerText16\0"); 
    1754     HTMLayoutSetElementInnerText16=cast(HTMLayoutSetElementInnerText16_t)__dll_htmlayout.getSymbol("HTMLayoutSetElementInnerText16\0"); 
    1755     HTMLayoutGetAttributeCount=cast(HTMLayoutGetAttributeCount_t)__dll_htmlayout.getSymbol("HTMLayoutGetAttributeCount\0"); 
    1756     HTMLayoutGetNthAttribute=cast(HTMLayoutGetNthAttribute_t)__dll_htmlayout.getSymbol("HTMLayoutGetNthAttribute\0"); 
    1757     HTMLayoutGetAttributeByName=cast(HTMLayoutGetAttributeByName_t)__dll_htmlayout.getSymbol("HTMLayoutGetAttributeByName\0"); 
    1758     HTMLayoutSetAttributeByName=cast(HTMLayoutSetAttributeByName_t)__dll_htmlayout.getSymbol("HTMLayoutSetAttributeByName\0"); 
    1759     HTMLayoutClearAttributes=cast(HTMLayoutClearAttributes_t)__dll_htmlayout.getSymbol("HTMLayoutClearAttributes\0"); 
    1760     HTMLayoutGetElementIndex=cast(HTMLayoutGetElementIndex_t)__dll_htmlayout.getSymbol("HTMLayoutGetElementIndex\0"); 
    1761     HTMLayoutGetElementType=cast(HTMLayoutGetElementType_t)__dll_htmlayout.getSymbol("HTMLayoutGetElementType\0"); 
    1762     HTMLayoutGetStyleAttribute=cast(HTMLayoutGetStyleAttribute_t)__dll_htmlayout.getSymbol("HTMLayoutGetStyleAttribute\0"); 
    1763     HTMLayoutSetStyleAttribute=cast(HTMLayoutSetStyleAttribute_t)__dll_htmlayout.getSymbol("HTMLayoutSetStyleAttribute\0"); 
    1764     HTMLayoutUpdateElement=cast(HTMLayoutUpdateElement_t)__dll_htmlayout.getSymbol("HTMLayoutUpdateElement\0"); 
    1765     HTMLayoutUpdateElementEx=cast(HTMLayoutUpdateElementEx_t)__dll_htmlayout.getSymbol("HTMLayoutUpdateElementEx\0"); 
    1766     HTMLayoutSetCapture=cast(HTMLayoutSetCapture_t)__dll_htmlayout.getSymbol("HTMLayoutSetCapture\0"); 
    1767     HTMLayoutGetElementHwnd=cast(HTMLayoutGetElementHwnd_t)__dll_htmlayout.getSymbol("HTMLayoutGetElementHwnd\0"); 
    1768     HTMLayoutCombineURL=cast(HTMLayoutCombineURL_t)__dll_htmlayout.getSymbol("HTMLayoutCombineURL\0"); 
    1769     HTMLayoutVisitElements=cast(HTMLayoutVisitElements_t)__dll_htmlayout.getSymbol("HTMLayoutVisitElements\0"); 
    1770     HTMLayoutSelectElements=cast(HTMLayoutSelectElements_t)__dll_htmlayout.getSymbol("HTMLayoutSelectElements\0"); 
    1771     HTMLayoutSelectParent=cast(HTMLayoutSelectParent_t)__dll_htmlayout.getSymbol("HTMLayoutSelectParent\0"); 
    1772     HTMLayoutSetElementHtml=cast(HTMLayoutSetElementHtml_t)__dll_htmlayout.getSymbol("HTMLayoutSetElementHtml\0"); 
    1773     HTMLayoutDeleteElement=cast(HTMLayoutDeleteElement_t)__dll_htmlayout.getSymbol("HTMLayoutDeleteElement\0"); 
    1774     HTMLayoutGetElementUID=cast(HTMLayoutGetElementUID_t)__dll_htmlayout.getSymbol("HTMLayoutGetElementUID\0"); 
    1775     HTMLayoutGetElementByUID=cast(HTMLayoutGetElementByUID_t)__dll_htmlayout.getSymbol("HTMLayoutGetElementByUID\0"); 
    1776     HTMLayoutShowPopup=cast(HTMLayoutShowPopup_t)__dll_htmlayout.getSymbol("HTMLayoutShowPopup\0"); 
    1777     HTMLayoutShowPopupAt=cast(HTMLayoutShowPopupAt_t)__dll_htmlayout.getSymbol("HTMLayoutShowPopupAt\0"); 
    1778     HTMLayoutHidePopup=cast(HTMLayoutHidePopup_t)__dll_htmlayout.getSymbol("HTMLayoutHidePopup\0"); 
    1779     HTMLayoutGetElementState=cast(HTMLayoutGetElementState_t)__dll_htmlayout.getSymbol("HTMLayoutGetElementState\0"); 
    1780     HTMLayoutCreateElement=cast(HTMLayoutCreateElement_t)__dll_htmlayout.getSymbol("HTMLayoutCreateElement\0"); 
    1781     HTMLayoutCloneElement=cast(HTMLayoutCloneElement_t)__dll_htmlayout.getSymbol("HTMLayoutCloneElement\0"); 
    1782     HTMLayoutInsertElement=cast(HTMLayoutInsertElement_t)__dll_htmlayout.getSymbol("HTMLayoutInsertElement\0"); 
    1783     HTMLayoutDetachElement=cast(HTMLayoutDetachElement_t)__dll_htmlayout.getSymbol("HTMLayoutDetachElement\0"); 
    1784     HTMLayoutSetTimer=cast(HTMLayoutSetTimer_t)__dll_htmlayout.getSymbol("HTMLayoutSetTimer\0"); 
    1785     HTMLayoutAttachEventHandler=cast(HTMLayoutAttachEventHandler_t)__dll_htmlayout.getSymbol("HTMLayoutAttachEventHandler\0"); 
    1786     HTMLayoutAttachEventHandlerEx=cast(HTMLayoutAttachEventHandlerEx_t)__dll_htmlayout.getSymbol("HTMLayoutAttachEventHandlerEx\0"); 
    1787     HTMLayoutWindowAttachEventHandler=cast(HTMLayoutWindowAttachEventHandler_t)__dll_htmlayout.getSymbol("HTMLayoutWindowAttachEventHandler\0"); 
    1788     HTMLayoutSendEvent=cast(HTMLayoutSendEvent_t)__dll_htmlayout.getSymbol("HTMLayoutSendEvent\0"); 
    1789     HTMLayoutPostEvent=cast(HTMLayoutPostEvent_t)__dll_htmlayout.getSymbol("HTMLayoutPostEvent\0"); 
    1790     HTMLayoutCallBehaviorMethod=cast(HTMLayoutCallBehaviorMethod_t)__dll_htmlayout.getSymbol("HTMLayoutCallBehaviorMethod\0"); 
    1791     HTMLayoutRequestElementData=cast(HTMLayoutRequestElementData_t)__dll_htmlayout.getSymbol("HTMLayoutRequestElementData\0"); 
    1792     HTMLayoutGetScrollInfo=cast(HTMLayoutGetScrollInfo_t)__dll_htmlayout.getSymbol("HTMLayoutGetScrollInfo\0"); 
    1793     HTMLayoutSetScrollPos=cast(HTMLayoutSetScrollPos_t)__dll_htmlayout.getSymbol("HTMLayoutSetScrollPos\0"); 
    1794     HTMLayoutIsElementVisible=cast(HTMLayoutIsElementVisible_t)__dll_htmlayout.getSymbol("HTMLayoutIsElementVisible\0"); 
    1795     HTMLayoutIsElementEnabled=cast(HTMLayoutIsElementEnabled_t)__dll_htmlayout.getSymbol("HTMLayoutIsElementEnabled\0"); 
    1796     HTMLayoutSortElements=cast(HTMLayoutSortElements_t)__dll_htmlayout.getSymbol("HTMLayoutSortElements\0"); 
    1797     HTMLayoutSwapElements=cast(HTMLayoutSwapElements_t)__dll_htmlayout.getSymbol("HTMLayoutSwapElements\0"); 
    1798     HTMLayoutTraverseUIEvent=cast(HTMLayoutTraverseUIEvent_t)__dll_htmlayout.getSymbol("HTMLayoutTraverseUIEvent\0"); 
    1799     HTMLayoutControlGetType=cast(HTMLayoutControlGetType_t)__dll_htmlayout.getSymbol("HTMLayoutControlGetType\0"); 
    1800     HTMLayoutControlGetValue=cast(HTMLayoutControlGetValue_t)__dll_htmlayout.getSymbol("HTMLayoutControlGetValue\0"); 
    1801     HTMLayoutControlSetValue=cast(HTMLayoutControlSetValue_t)__dll_htmlayout.getSymbol("HTMLayoutControlSetValue\0"); 
    1802     HTMLayoutEnumerate=cast(HTMLayoutEnumerate_t)__dll_htmlayout.getSymbol("HTMLayoutEnumerate\0"); 
    1803     HTMLayoutGetCharacterRect=cast(HTMLayoutGetCharacterRect_t)__dll_htmlayout.getSymbol("HTMLayoutGetCharacterRect\0"); 
    1804     HTMLayoutClassNameA=cast(HTMLayoutClassNameA_t)__dll_htmlayout.getSymbol("HTMLayoutClassNameA\0"); 
    1805     HTMLayoutClassNameW=cast(HTMLayoutClassNameW_t)__dll_htmlayout.getSymbol("HTMLayoutClassNameW\0"); 
    1806     HTMLayoutDataReady=cast(HTMLayoutDataReady_t)__dll_htmlayout.getSymbol("HTMLayoutDataReady\0"); 
    1807     HTMLayoutDataReadyAsync=cast(HTMLayoutDataReadyAsync_t)__dll_htmlayout.getSymbol("HTMLayoutDataReadyAsync\0"); 
    1808     HTMLayoutProc=cast(HTMLayoutProc_t)__dll_htmlayout.getSymbol("HTMLayoutProc\0"); 
    1809     HTMLayoutProcND=cast(HTMLayoutProcND_t)__dll_htmlayout.getSymbol("HTMLayoutProcND\0"); 
    1810     HTMLayoutGetMinWidth=cast(HTMLayoutGetMinWidth_t)__dll_htmlayout.getSymbol("HTMLayoutGetMinWidth\0"); 
    1811     HTMLayoutGetMinHeight=cast(HTMLayoutGetMinHeight_t)__dll_htmlayout.getSymbol("HTMLayoutGetMinHeight\0"); 
    1812     HTMLayoutLoadFile=cast(HTMLayoutLoadFile_t)__dll_htmlayout.getSymbol("HTMLayoutLoadFile\0"); 
    1813     HTMLayoutLoadHtml=cast(HTMLayoutLoadHtml_t)__dll_htmlayout.getSymbol("HTMLayoutLoadHtml\0"); 
    1814     HTMLayoutLoadHtmlEx=cast(HTMLayoutLoadHtmlEx_t)__dll_htmlayout.getSymbol("HTMLayoutLoadHtmlEx\0"); 
    1815     HTMLayoutSetMode=cast(HTMLayoutSetMode_t)__dll_htmlayout.getSymbol("HTMLayoutSetMode\0"); 
    1816     HTMLayoutSetCallback=cast(HTMLayoutSetCallback_t)__dll_htmlayout.getSymbol("HTMLayoutSetCallback\0"); 
    1817     HTMLayoutSelectionExist=cast(HTMLayoutSelectionExist_t)__dll_htmlayout.getSymbol("HTMLayoutSelectionExist\0"); 
    1818     HTMLayoutGetSelectedHTML=cast(HTMLayoutGetSelectedHTML_t)__dll_htmlayout.getSymbol("HTMLayoutGetSelectedHTML\0"); 
    1819     HTMLayoutClipboardCopy=cast(HTMLayoutClipboardCopy_t)__dll_htmlayout.getSymbol("HTMLayoutClipboardCopy\0"); 
    1820     HTMLayoutEnumResources=cast(HTMLayoutEnumResources_t)__dll_htmlayout.getSymbol("HTMLayoutEnumResources\0"); 
    1821     HTMLayoutSetMasterCSS=cast(HTMLayoutSetMasterCSS_t)__dll_htmlayout.getSymbol("HTMLayoutSetMasterCSS\0"); 
    1822     HTMLayoutSetCSS=cast(HTMLayoutSetCSS_t)__dll_htmlayout.getSymbol("HTMLayoutSetCSS\0"); 
    1823     HTMLayoutSetMediaType=cast(HTMLayoutSetMediaType_t)__dll_htmlayout.getSymbol("HTMLayoutSetMediaType\0"); 
    1824     HTMLayoutSetHttpHeaders=cast(HTMLayoutSetHttpHeaders_t)__dll_htmlayout.getSymbol("HTMLayoutSetHttpHeaders\0"); 
    1825     HTMLayoutRender=cast(HTMLayoutRender_t)__dll_htmlayout.getSymbol("HTMLayoutRender\0"); 
    1826     HTMLayoutDialog=cast(HTMLayoutDialog_t)__dll_htmlayout.getSymbol("HTMLayoutDialog\0"); 
    1827     HTMLiteCreateInstance=cast(HTMLiteCreateInstance_t)__dll_htmlayout.getSymbol("HTMLiteCreateInstance\0"); 
    1828     HTMLiteDestroyInstance=cast(HTMLiteDestroyInstance_t)__dll_htmlayout.getSymbol("HTMLiteDestroyInstance\0"); 
    1829     HTMLiteSetTag=cast(HTMLiteSetTag_t)__dll_htmlayout.getSymbol("HTMLiteSetTag\0"); 
    1830     HTMLiteGetTag=cast(HTMLiteGetTag_t)__dll_htmlayout.getSymbol("HTMLiteGetTag\0"); 
    1831     HTMLiteLoadHtmlFromFile=cast(HTMLiteLoadHtmlFromFile_t)__dll_htmlayout.getSymbol("HTMLiteLoadHtmlFromFile\0"); 
    1832     HTMLiteLoadHtmlFromMemory=cast(HTMLiteLoadHtmlFromMemory_t)__dll_htmlayout.getSymbol("HTMLiteLoadHtmlFromMemory\0"); 
    1833     HTMLiteMeasure=cast(HTMLiteMeasure_t)__dll_htmlayout.getSymbol("HTMLiteMeasure\0"); 
    1834     HTMLiteRender=cast(HTMLiteRender_t)__dll_htmlayout.getSymbol("HTMLiteRender\0"); 
    1835     HTMLiteRenderOnBitmap=cast(HTMLiteRenderOnBitmap_t)__dll_htmlayout.getSymbol("HTMLiteRenderOnBitmap\0"); 
    1836     HTMLiteSetDataReady=cast(HTMLiteSetDataReady_t)__dll_htmlayout.getSymbol("HTMLiteSetDataReady\0"); 
    1837     HTMLiteGetDocumentMinWidth=cast(HTMLiteGetDocumentMinWidth_t)__dll_htmlayout.getSymbol("HTMLiteGetDocumentMinWidth\0"); 
    1838     HTMLiteGetDocumentMinHeight=cast(HTMLiteGetDocumentMinHeight_t)__dll_htmlayout.getSymbol("HTMLiteGetDocumentMinHeight\0"); 
    1839     HTMLiteSetMediaType=cast(HTMLiteSetMediaType_t)__dll_htmlayout.getSymbol("HTMLiteSetMediaType\0"); 
    1840     HTMLiteGetRootElement=cast(HTMLiteGetRootElement_t)__dll_htmlayout.getSymbol("HTMLiteGetRootElement\0"); 
    1841     HTMLiteFindElement=cast(HTMLiteFindElement_t)__dll_htmlayout.getSymbol("HTMLiteFindElement\0"); 
    1842     HTMLiteSetCallback=cast(HTMLiteSetCallback_t)__dll_htmlayout.getSymbol("HTMLiteSetCallback\0"); 
    1843     HTMLiteAdvanceFocus=cast(HTMLiteAdvanceFocus_t)__dll_htmlayout.getSymbol("HTMLiteAdvanceFocus\0"); 
    1844     HTMLiteTraverseUIEvent=cast(HTMLiteTraverseUIEvent_t)__dll_htmlayout.getSymbol("HTMLiteTraverseUIEvent\0"); 
    1845     HTMLayoutSetElementState=cast(HTMLayoutSetElementState_t)__dll_htmlayout.getSymbol("HTMLayoutSetElementState\0"); 
    1846     HTMLayoutDetachEventHandler=cast(HTMLayoutDetachEventHandler_t)__dll_htmlayout.getSymbol("HTMLayoutDetachEventHandler\0"); 
    1847     HTMLayoutWindowDetachEventHandler=cast(HTMLayoutWindowDetachEventHandler_t)__dll_htmlayout.getSymbol("HTMLayoutWindowDetachEventHandler\0"); 
    1848     HTMLayoutRangeCreate=cast(HTMLayoutRangeCreate_t)__dll_htmlayout.getSymbol("HTMLayoutRangeCreate\0"); 
    1849     HTMLayoutRangeFromSelection=cast(HTMLayoutRangeFromSelection_t)__dll_htmlayout.getSymbol("HTMLayoutRangeFromSelection\0"); 
    1850     HTMLayoutRangeFromPositions=cast(HTMLayoutRangeFromPositions_t)__dll_htmlayout.getSymbol("HTMLayoutRangeFromPositions\0"); 
    1851     HTMLayoutRangeRelease=cast(HTMLayoutRangeRelease_t)__dll_htmlayout.getSymbol("HTMLayoutRangeRelease\0"); 
    1852     HTMLayoutRangeAdvancePos=cast(HTMLayoutRangeAdvancePos_t)__dll_htmlayout.getSymbol("HTMLayoutRangeAdvancePos\0"); 
    1853     HTMLayoutRangeToHtml=cast(HTMLayoutRangeToHtml_t)__dll_htmlayout.getSymbol("HTMLayoutRangeToHtml\0"); 
    1854     HTMLayoutRangeReplace=cast(HTMLayoutRangeReplace_t)__dll_htmlayout.getSymbol("HTMLayoutRangeReplace\0"); 
    1855     HTMLayoutRangeInsertHtml=cast(HTMLayoutRangeInsertHtml_t)__dll_htmlayout.getSymbol("HTMLayoutRangeInsertHtml\0"); 
    1856     HTMLayoutRangeIsEmpty=cast(HTMLayoutRangeIsEmpty_t)__dll_htmlayout.getSymbol("HTMLayoutRangeIsEmpty\0"); 
    1857     HTMLayoutSetOption=cast(HTMLayoutSetOption_t)__dll_htmlayout.getSymbol("HTMLayoutSetOption\0"); 
    1858     HTMLayoutDeclareElementType=cast(HTMLayoutDeclareElementType_t)__dll_htmlayout.getSymbol("HTMLayoutDeclareElementType\0"); 
    1859     HTMLayoutAppendMasterCSS=cast(HTMLayoutAppendMasterCSS_t)__dll_htmlayout.getSymbol("HTMLayoutAppendMasterCSS\0"); 
    1860     HTMLayoutScrollToView=cast(HTMLayoutScrollToView_t)__dll_htmlayout.getSymbol("HTMLayoutScrollToView\0"); 
    1861     HTMLayoutElementSetExpando=cast(HTMLayoutElementSetExpando_t)__dll_htmlayout.getSymbol("HTMLayoutElementSetExpando\0"); 
    1862     HTMLayoutElementGetExpando=cast(HTMLayoutElementGetExpando_t)__dll_htmlayout.getSymbol("HTMLayoutElementGetExpando\0"); 
     1785    static SharedLib dll; 
     1786    dll=SharedLib.load(name?name:"htmlayout.dll"); 
     1787    HTMLayout_UseElement=cast(HTMLayout_UseElement_t)dll.getSymbol("HTMLayout_UseElement\0"); 
     1788    HTMLayout_UnuseElement=cast(HTMLayout_UnuseElement_t)dll.getSymbol("HTMLayout_UnuseElement\0"); 
     1789    HTMLayoutGetRootElement=cast(HTMLayoutGetRootElement_t)dll.getSymbol("HTMLayoutGetRootElement\0"); 
     1790    HTMLayoutGetFocusElement=cast(HTMLayoutGetFocusElement_t)dll.getSymbol("HTMLayoutGetFocusElement\0"); 
     1791    HTMLayoutFindElement=cast(HTMLayoutFindElement_t)dll.getSymbol("HTMLayoutFindElement\0"); 
     1792    HTMLayoutGetChildrenCount=cast(HTMLayoutGetChildrenCount_t)dll.getSymbol("HTMLayoutGetChildrenCount\0"); 
     1793    HTMLayoutGetNthChild=cast(HTMLayoutGetNthChild_t)dll.getSymbol("HTMLayoutGetNthChild\0"); 
     1794    HTMLayoutGetParentElement=cast(HTMLayoutGetParentElement_t)dll.getSymbol("HTMLayoutGetParentElement\0"); 
     1795    HTMLayoutGetElementText=cast(HTMLayoutGetElementText_t)dll.getSymbol("HTMLayoutGetElementText\0"); 
     1796    HTMLayoutGetElementHtml=cast(HTMLayoutGetElementHtml_t)dll.getSymbol("HTMLayoutGetElementHtml\0"); 
     1797    HTMLayoutGetElementInnerText=cast(HTMLayoutGetElementInnerText_t)dll.getSymbol("HTMLayoutGetElementInnerText\0"); 
     1798    HTMLayoutSetElementInnerText=cast(HTMLayoutSetElementInnerText_t)dll.getSymbol("HTMLayoutSetElementInnerText\0"); 
     1799    HTMLayoutGetElementInnerText16=cast(HTMLayoutGetElementInnerText16_t)dll.getSymbol("HTMLayoutGetElementInnerText16\0"); 
     1800    HTMLayoutSetElementInnerText16=cast(HTMLayoutSetElementInnerText16_t)dll.getSymbol("HTMLayoutSetElementInnerText16\0"); 
     1801    HTMLayoutGetAttributeCount=cast(HTMLayoutGetAttributeCount_t)dll.getSymbol("HTMLayoutGetAttributeCount\0"); 
     1802    HTMLayoutGetNthAttribute=cast(HTMLayoutGetNthAttribute_t)dll.getSymbol("HTMLayoutGetNthAttribute\0"); 
     1803    HTMLayoutGetAttributeByName=cast(HTMLayoutGetAttributeByName_t)dll.getSymbol("HTMLayoutGetAttributeByName\0"); 
     1804    HTMLayoutSetAttributeByName=cast(HTMLayoutSetAttributeByName_t)dll.getSymbol("HTMLayoutSetAttributeByName\0"); 
     1805    HTMLayoutClearAttributes=cast(HTMLayoutClearAttributes_t)dll.getSymbol("HTMLayoutClearAttributes\0"); 
     1806    HTMLayoutGetElementIndex=cast(HTMLayoutGetElementIndex_t)dll.getSymbol("HTMLayoutGetElementIndex\0"); 
     1807    HTMLayoutGetElementType=cast(HTMLayoutGetElementType_t)dll.getSymbol("HTMLayoutGetElementType\0"); 
     1808    HTMLayoutGetStyleAttribute=cast(HTMLayoutGetStyleAttribute_t)dll.getSymbol("HTMLayoutGetStyleAttribute\0"); 
     1809    HTMLayoutSetStyleAttribute=cast(HTMLayoutSetStyleAttribute_t)dll.getSymbol("HTMLayoutSetStyleAttribute\0"); 
     1810    HTMLayoutUpdateElement=cast(HTMLayoutUpdateElement_t)dll.getSymbol("HTMLayoutUpdateElement\0"); 
     1811    HTMLayoutUpdateElementEx=cast(HTMLayoutUpdateElementEx_t)dll.getSymbol("HTMLayoutUpdateElementEx\0"); 
     1812    HTMLayoutSetCapture=cast(HTMLayoutSetCapture_t)dll.getSymbol("HTMLayoutSetCapture\0"); 
     1813    HTMLayoutGetElementHwnd=cast(HTMLayoutGetElementHwnd_t)dll.getSymbol("HTMLayoutGetElementHwnd\0"); 
     1814    HTMLayoutCombineURL=cast(HTMLayoutCombineURL_t)dll.getSymbol("HTMLayoutCombineURL\0"); 
     1815    HTMLayoutVisitElements=cast(HTMLayoutVisitElements_t)dll.getSymbol("HTMLayoutVisitElements\0"); 
     1816    HTMLayoutSelectElements=cast(HTMLayoutSelectElements_t)dll.getSymbol("HTMLayoutSelectElements\0"); 
     1817    HTMLayoutSelectParent=cast(HTMLayoutSelectParent_t)dll.getSymbol("HTMLayoutSelectParent\0"); 
     1818    HTMLayoutSetElementHtml=cast(HTMLayoutSetElementHtml_t)dll.getSymbol("HTMLayoutSetElementHtml\0"); 
     1819    HTMLayoutDeleteElement=cast(HTMLayoutDeleteElement_t)dll.getSymbol("HTMLayoutDeleteElement\0"); 
     1820    HTMLayoutGetElementUID=cast(HTMLayoutGetElementUID_t)dll.getSymbol("HTMLayoutGetElementUID\0"); 
     1821    HTMLayoutGetElementByUID=cast(HTMLayoutGetElementByUID_t)dll.getSymbol("HTMLayoutGetElementByUID\0"); 
     1822    HTMLayoutShowPopup=cast(HTMLayoutShowPopup_t)dll.getSymbol("HTMLayoutShowPopup\0"); 
     1823    HTMLayoutShowPopupAt=cast(HTMLayoutShowPopupAt_t)dll.getSymbol("HTMLayoutShowPopupAt\0"); 
     1824    HTMLayoutHidePopup=cast(HTMLayoutHidePopup_t)dll.getSymbol("HTMLayoutHidePopup\0"); 
     1825    HTMLayoutGetElementState=cast(HTMLayoutGetElementState_t)dll.getSymbol("HTMLayoutGetElementState\0"); 
     1826    HTMLayoutCreateElement=cast(HTMLayoutCreateElement_t)dll.getSymbol("HTMLayoutCreateElement\0"); 
     1827    HTMLayoutCloneElement=cast(HTMLayoutCloneElement_t)dll.getSymbol("HTMLayoutCloneElement\0"); 
     1828    HTMLayoutInsertElement=cast(HTMLayoutInsertElement_t)dll.getSymbol("HTMLayoutInsertElement\0"); 
     1829    HTMLayoutDetachElement=cast(HTMLayoutDetachElement_t)dll.getSymbol("HTMLayoutDetachElement\0"); 
     1830    HTMLayoutSetTimer=cast(HTMLayoutSetTimer_t)dll.getSymbol("HTMLayoutSetTimer\0"); 
     1831    HTMLayoutAttachEventHandler=cast(HTMLayoutAttachEventHandler_t)dll.getSymbol("HTMLayoutAttachEventHandler\0"); 
     1832    HTMLayoutAttachEventHandlerEx=cast(HTMLayoutAttachEventHandlerEx_t)dll.getSymbol("HTMLayoutAttachEventHandlerEx\0"); 
     1833    HTMLayoutWindowAttachEventHandler=cast(HTMLayoutWindowAttachEventHandler_t)dll.getSymbol("HTMLayoutWindowAttachEventHandler\0"); 
     1834    HTMLayoutSendEvent=cast(HTMLayoutSendEvent_t)dll.getSymbol("HTMLayoutSendEvent\0"); 
     1835    HTMLayoutPostEvent=cast(HTMLayoutPostEvent_t)dll.getSymbol("HTMLayoutPostEvent\0"); 
     1836    HTMLayoutCallBehaviorMethod=cast(HTMLayoutCallBehaviorMethod_t)dll.getSymbol("HTMLayoutCallBehaviorMethod\0"); 
     1837    HTMLayoutRequestElementData=cast(HTMLayoutRequestElementData_t)dll.getSymbol("HTMLayoutRequestElementData\0"); 
     1838    HTMLayoutGetScrollInfo=cast(HTMLayoutGetScrollInfo_t)dll.getSymbol("HTMLayoutGetScrollInfo\0"); 
     1839    HTMLayoutSetScrollPos=cast(HTMLayoutSetScrollPos_t)dll.getSymbol("HTMLayoutSetScrollPos\0"); 
     1840    HTMLayoutIsElementVisible=cast(HTMLayoutIsElementVisible_t)dll.getSymbol("HTMLayoutIsElementVisible\0"); 
     1841    HTMLayoutIsElementEnabled=cast(HTMLayoutIsElementEnabled_t)dll.getSymbol("HTMLayoutIsElementEnabled\0"); 
     1842    HTMLayoutSortElements=cast(HTMLayoutSortElements_t)dll.getSymbol("HTMLayoutSortElements\0"); 
     1843    HTMLayoutSwapElements=cast(HTMLayoutSwapElements_t)dll.getSymbol("HTMLayoutSwapElements\0"); 
     1844    HTMLayoutTraverseUIEvent=cast(HTMLayoutTraverseUIEvent_t)dll.getSymbol("HTMLayoutTraverseUIEvent\0"); 
     1845    HTMLayoutControlGetType=cast(HTMLayoutControlGetType_t)dll.getSymbol("HTMLayoutControlGetType\0"); 
     1846    HTMLayoutControlGetValue=cast(HTMLayoutControlGetValue_t)dll.getSymbol("HTMLayoutControlGetValue\0"); 
     1847    HTMLayoutControlSetValue=cast(HTMLayoutControlSetValue_t)dll.getSymbol("HTMLayoutControlSetValue\0"); 
     1848    HTMLayoutEnumerate=cast(HTMLayoutEnumerate_t)dll.getSymbol("HTMLayoutEnumerate\0"); 
     1849    HTMLayoutGetCharacterRect=cast(HTMLayoutGetCharacterRect_t)dll.getSymbol("HTMLayoutGetCharacterRect\0"); 
     1850    HTMLayoutClassNameA=cast(HTMLayoutClassNameA_t)dll.getSymbol("HTMLayoutClassNameA\0"); 
     1851    HTMLayoutClassNameW=cast(HTMLayoutClassNameW_t)dll.getSymbol("HTMLayoutClassNameW\0"); 
     1852    HTMLayoutDataReady=cast(HTMLayoutDataReady_t)dll.getSymbol("HTMLayoutDataReady\0"); 
     1853    HTMLayoutDataReadyAsync=cast(HTMLayoutDataReadyAsync_t)dll.getSymbol("HTMLayoutDataReadyAsync\0"); 
     1854    HTMLayoutProc=cast(HTMLayoutProc_t)dll.getSymbol("HTMLayoutProc\0"); 
     1855    HTMLayoutProcND=cast(HTMLayoutProcND_t)dll.getSymbol("HTMLayoutProcND\0"); 
     1856    HTMLayoutGetMinWidth=cast(HTMLayoutGetMinWidth_t)dll.getSymbol("HTMLayoutGetMinWidth\0"); 
     1857    HTMLayoutGetMinHeight=cast(HTMLayoutGetMinHeight_t)dll.getSymbol("HTMLayoutGetMinHeight\0"); 
     1858    HTMLayoutLoadFile=cast(HTMLayoutLoadFile_t)dll.getSymbol("HTMLayoutLoadFile\0"); 
     1859    HTMLayoutLoadHtml=cast(HTMLayoutLoadHtml_t)dll.getSymbol("HTMLayoutLoadHtml\0"); 
     1860    HTMLayoutLoadHtmlEx=cast(HTMLayoutLoadHtmlEx_t)dll.getSymbol("HTMLayoutLoadHtmlEx\0"); 
     1861    HTMLayoutSetMode=cast(HTMLayoutSetMode_t)dll.getSymbol("HTMLayoutSetMode\0"); 
     1862    HTMLayoutSetCallback=cast(HTMLayoutSetCallback_t)dll.getSymbol("HTMLayoutSetCallback\0"); 
     1863    HTMLayoutSelectionExist=cast(HTMLayoutSelectionExist_t)dll.getSymbol("HTMLayoutSelectionExist\0"); 
     1864    HTMLayoutGetSelectedHTML=cast(HTMLayoutGetSelectedHTML_t)dll.getSymbol("HTMLayoutGetSelectedHTML\0"); 
     1865    HTMLayoutClipboardCopy=cast(HTMLayoutClipboardCopy_t)dll.getSymbol("HTMLayoutClipboardCopy\0"); 
     1866    HTMLayoutEnumResources=cast(HTMLayoutEnumResources_t)dll.getSymbol("HTMLayoutEnumResources\0"); 
     1867    HTMLayoutSetMasterCSS=cast(HTMLayoutSetMasterCSS_t)dll.getSymbol("HTMLayoutSetMasterCSS\0"); 
     1868    HTMLayoutSetCSS=cast(HTMLayoutSetCSS_t)dll.getSymbol("HTMLayoutSetCSS\0"); 
     1869    HTMLayoutSetMediaType=cast(HTMLayoutSetMediaType_t)dll.getSymbol("HTMLayoutSetMediaType\0"); 
     1870    HTMLayoutSetHttpHeaders=cast(HTMLayoutSetHttpHeaders_t)dll.getSymbol("HTMLayoutSetHttpHeaders\0"); 
     1871    HTMLayoutRender=cast(HTMLayoutRender_t)dll.getSymbol("HTMLayoutRender\0"); 
     1872    HTMLayoutDialog=cast(HTMLayoutDialog_t)dll.getSymbol("HTMLayoutDialog\0"); 
     1873    HTMLiteCreateInstance=cast(HTMLiteCreateInstance_t)dll.getSymbol("HTMLiteCreateInstance\0"); 
     1874    HTMLiteDestroyInstance=cast(HTMLiteDestroyInstance_t)dll.getSymbol("HTMLiteDestroyInstance\0"); 
     1875    HTMLiteSetTag=cast(HTMLiteSetTag_t)dll.getSymbol("HTMLiteSetTag\0"); 
     1876    HTMLiteGetTag=cast(HTMLiteGetTag_t)dll.getSymbol("HTMLiteGetTag\0"); 
     1877    HTMLiteLoadHtmlFromFile=cast(HTMLiteLoadHtmlFromFile_t)dll.getSymbol("HTMLiteLoadHtmlFromFile\0"); 
     1878    HTMLiteLoadHtmlFromMemory=cast(HTMLiteLoadHtmlFromMemory_t)dll.getSymbol("HTMLiteLoadHtmlFromMemory\0"); 
     1879    HTMLiteMeasure=cast(HTMLiteMeasure_t)dll.getSymbol("HTMLiteMeasure\0"); 
     1880    HTMLiteRender=cast(HTMLiteRender_t)dll.getSymbol("HTMLiteRender\0"); 
     1881    HTMLiteRenderOnBitmap=cast(HTMLiteRenderOnBitmap_t)dll.getSymbol("HTMLiteRenderOnBitmap\0"); 
     1882    HTMLiteSetDataReady=cast(HTMLiteSetDataReady_t)dll.getSymbol("HTMLiteSetDataReady\0"); 
     1883    HTMLiteGetDocumentMinWidth=cast(HTMLiteGetDocumentMinWidth_t)dll.getSymbol("HTMLiteGetDocumentMinWidth\0"); 
     1884    HTMLiteGetDocumentMinHeight=cast(HTMLiteGetDocumentMinHeight_t)dll.getSymbol("HTMLiteGetDocumentMinHeight\0"); 
     1885    HTMLiteSetMediaType=cast(HTMLiteSetMediaType_t)dll.getSymbol("HTMLiteSetMediaType\0"); 
     1886    HTMLiteGetRootElement=cast(HTMLiteGetRootElement_t)dll.getSymbol("HTMLiteGetRootElement\0"); 
     1887    HTMLiteFindElement=cast(HTMLiteFindElement_t)dll.getSymbol("HTMLiteFindElement\0"); 
     1888    HTMLiteSetCallback=cast(HTMLiteSetCallback_t)dll.getSymbol("HTMLiteSetCallback\0"); 
     1889    HTMLiteAdvanceFocus=cast(HTMLiteAdvanceFocus_t)dll.getSymbol("HTMLiteAdvanceFocus\0"); 
     1890    HTMLiteTraverseUIEvent=cast(HTMLiteTraverseUIEvent_t)dll.getSymbol("HTMLiteTraverseUIEvent\0"); 
     1891    HTMLayoutSetElementState=cast(HTMLayoutSetElementState_t)dll.getSymbol("HTMLayoutSetElementState\0"); 
     1892    HTMLayoutDetachEventHandler=cast(HTMLayoutDetachEventHandler_t)dll.getSymbol("HTMLayoutDetachEventHandler\0"); 
     1893    HTMLayoutWindowDetachEventHandler=cast(HTMLayoutWindowDetachEventHandler_t)dll.getSymbol("HTMLayoutWindowDetachEventHandler\0"); 
     1894    HTMLayoutRangeCreate=cast(HTMLayoutRangeCreate_t)dll.getSymbol("HTMLayoutRangeCreate\0"); 
     1895    HTMLayoutRangeFromSelection=cast(HTMLayoutRangeFromSelection_t)dll.getSymbol("HTMLayoutRangeFromSelection\0"); 
     1896    HTMLayoutRangeFromPositions=cast(HTMLayoutRangeFromPositions_t)dll.getSymbol("HTMLayoutRangeFromPositions\0"); 
     1897    HTMLayoutRangeRelease=cast(HTMLayoutRangeRelease_t)dll.getSymbol("HTMLayoutRangeRelease\0"); 
     1898    HTMLayoutRangeAdvancePos=cast(HTMLayoutRangeAdvancePos_t)dll.getSymbol("HTMLayoutRangeAdvancePos\0"); 
     1899    HTMLayoutRangeToHtml=cast(HTMLayoutRangeToHtml_t)dll.getSymbol("HTMLayoutRangeToHtml\0"); 
     1900    HTMLayoutRangeReplace=cast(HTMLayoutRangeReplace_t)dll.getSymbol("HTMLayoutRangeReplace\0"); 
     1901    HTMLayoutRangeInsertHtml=cast(HTMLayoutRangeInsertHtml_t)dll.getSymbol("HTMLayoutRangeInsertHtml\0"); 
     1902    HTMLayoutRangeIsEmpty=cast(HTMLayoutRangeIsEmpty_t)dll.getSymbol("HTMLayoutRangeIsEmpty\0"); 
     1903    HTMLayoutSetOption=cast(HTMLayoutSetOption_t)dll.getSymbol("HTMLayoutSetOption\0"); 
     1904    HTMLayoutDeclareElementType=cast(HTMLayoutDeclareElementType_t)dll.getSymbol("HTMLayoutDeclareElementType\0"); 
     1905    HTMLayoutAppendMasterCSS=cast(HTMLayoutAppendMasterCSS_t)dll.getSymbol("HTMLayoutAppendMasterCSS\0"); 
     1906    HTMLayoutScrollToView=cast(HTMLayoutScrollToView_t)dll.getSymbol("HTMLayoutScrollToView\0"); 
     1907    HTMLayoutElementSetExpando=cast(HTMLayoutElementSetExpando_t)dll.getSymbol("HTMLayoutElementSetExpando\0"); 
     1908    HTMLayoutElementGetExpando=cast(HTMLayoutElementGetExpando_t)dll.getSymbol("HTMLayoutElementGetExpando\0"); 
     1909    HTMLayoutParseValue=cast(HTMLayoutParseValue_t)dll.getSymbol("HTMLayoutParseValue\0"); 
    18631910} 
  • trunk/import/htmlayout/element.d

    r7 r9  
    1616{ 
    1717    this(HELEMENT mHandle,bool use=false){this.mHandle=mHandle;if(use) keep();} 
     18    this(HElement element,bool use=false){this(element.mHandle,use);} 
    1819    this(char[] tagname,char[] text=null) 
    1920    { 
     
    216217    bool update(bool renderNow=false){return (lastResult=HTMLayoutUpdateElement(mHandle,renderNow))==HLDOM_OK;} 
    217218    bool updateEx(UINT flags){return (lastResult=HTMLayoutUpdateElementEx(mHandle,flags))==HLDOM_OK;} 
    218     bool setCapture(){return (lastResult=HTMLayoutSetCapture(mHandle))==HLDOM_OK;} 
     219    bool capture(bool capt=true) 
     220    { 
     221        if(capt) return (lastResult=HTMLayoutSetCapture(mHandle))==HLDOM_OK; 
     222        else return cast(bool)ReleaseCapture(); 
     223    } 
    219224    char[] combineURL(char[] url) 
    220225    { 
     
    271276    } 
    272277 
     278    bool hasClass(char[] clas) 
     279    { 
     280        auto cn=className; 
     281        uint i=0; 
     282        while(1) 
     283        { 
     284            i=locatePattern(cn,clas,i); 
     285            if(i==cn.length) return false; 
     286            if(i>0 && cn[i-1]!=' ') continue; 
     287            if(i+clas.length==cn.length) return true; 
     288            if(cn[i+clas.length]!=' ') continue; 
     289            return true; 
     290        } 
     291        return false; 
     292    } 
     293 
    273294    bool delClass(char[] clas) 
    274295    { 
     296        if(!hasClass(clas)) return false; 
    275297        auto c=split(className," "); 
    276298        char[][] d; 
     
    379401    bool click(){return callMethod(&HMethodParams(DO_CLICK));} 
    380402    bool xcall(char[] name,HJson[] values=null){return callMethod(HXcall(name,values).opCast);} 
     403    bool xcall(char[] name,HJson *value){return callMethod(HXcall(name,value).opCast);} 
    381404 
    382405    bool requestData(char[] url, UINT dataType, HElement initiator){return (lastResult=HTMLayoutRequestElementData(mHandle,toString16z(toString16(url)),dataType,initiator?initiator.mHandle:null))==HLDOM_OK;} 
     
    395418        return b; 
    396419    } 
     420    SIZE viewSize() 
     421    { 
     422        auto r=viewRect; 
     423        return SIZE(r.right-r.left,r.bottom-r.top); 
     424    } 
    397425    SIZE contentSize() 
    398426    { 
     
    401429        return c; 
    402430    } 
    403     bool scrollPos(int x,int y, bool smooth) //setter 
     431    bool scrollPos(POINT p,bool smooth=false) {return scrollPos(p.x,p.y,smooth);} 
     432    bool scrollPos(int x,int y, bool smooth=false) //setter 
    404433    {return (lastResult=HTMLayoutSetScrollPos(mHandle,POINT(x,y),smooth))==HLDOM_OK;} 
    405434 
     
    514543{ 
    515544    this(HELEMENT mHandle,bool use=false){super(mHandle,use);} 
    516     this(HElement el,bool use=false){super(el.mHandle,use);} 
     545    this(HElement el,bool use=false){super(el,use);} 
    517546 
    518547    char[] textValue() 
     
    559588{ 
    560589    this(HELEMENT mHandle,bool use=false){super(mHandle,use);} 
    561     this(HElement el,bool use=false){super(el.mHandle,use);} 
     590    this(HElement el,bool use=false){super(el,use);} 
    562591 
    563592    HScrollbarValue* getValue() 
  • trunk/import/htmlayout/events.d

    r6 r9  
    103103    } 
    104104 
    105     final bool dispatch(HELEMENT target,UINT event,LPVOID params) 
     105    bool dispatch(HELEMENT target,UINT event,LPVOID params) 
    106106    { 
    107107        if(event==HANDLE_INITIALIZATION){return onInit(HInitialization(target,cast(INITIALIZATION_PARAMS*)params));} 
     
    120120    } 
    121121 
    122     final static HEventHandler find(void* tag) 
     122    static HEventHandler find(void* tag) 
    123123    { 
    124124        auto h=cast(uint)tag in mHandlers; 
  • trunk/import/htmlayout/htmlayout.d

    r6 r9  
    1 //wrapper for Andrew Fedoniouk's excellent HTMLayout (3.2.2.3) - http://www.terrainformatica.com/ 
    2 //author: bobef 
    3 //license: bsd cc mit pit sms blah blah blah. use anyway u like with clear consciousness 
    4  
     1//wrapper for Andrew Fedoniouk's excellent HTMLayout (3.2.2.4) - http://www.terrainformatica.com/ 
     2 
     3//todo: update to version 3.2.2.5 (i.e. wrap grahin functions) 
     4//todo: wrap HRange propperly 
    55//todo: complete HJson templates {fromAA,toAA,fromArray,toArray}; HJson.toString should work with arrays and maps maybe 
    66//todo: port Andrew's hpp behaviors 
     
    1111 
    1212changelog: 
     13 
     140.3: 
     15    added HJson.parse, JSon.toBool 
     16    added missing alias for UI_STATE_CHANGED 
     17    added HElement.hasClass, HElement.scrollPos(POINT), HElement.viewSize 
     18    renamed HElement.setCapture to capture 
    1319 
    14200.2: