Introduction of Tangram
Tangram Tangram is a Web Based lightweight XML Script engine for Desktop Application. It has fast and native support for various component: ActiveX, DotNet Control, MFC View, MFC Window, and Html Page. In Tangram, a general Window Object can host a Web Page without using a web browser control, but you can use it just as you have a Window behind Web Page A typical Window behind Web Page like the following: <html> <script> function Tangram_OnPageLoaded(SourceWindow, URL) { if (SourceWindow ==window) { Tangram.AddObjToHtml("MainFrame", true, Tangram.External); MainFrame.Text = "Welcome to the World of Tangram"; Tangram.NavigateMDIForm(MainFrame, "", Tangram.xtml("xtmlStartupDoc")); } } </script> <body> <xml id="xtmlStartupDoc"> <tangram> <window> <node name="Start_S0001" id="TangramTab" cnnid="TangramTabbedWnd.TabbedComponent.1" style="39"> <node name="WinHtml" caption="MdiParent <node name="Page1" caption="Tangram HTML Source Code" id="hostview" cnnid="TangramView.Connector.1" />
<node name="Page3" caption="Sink .NET </node> </window> </tangram> </xml> </body> </html> Tangram use the Body Part of this page as UI Script Just as the role of DOM in Web Browser. Xml come from web page will be realized as some Desktop UI Elements, and JS Code in this web page will give a further function realization for corresponding window object. Tangram Node In Tangram, Some typical Component such as ActiveX Control, DotNet User Control etc. will treated as a “Node” object, a collection of Node will be organized as a general window object, some kind of Node can be a node container, in tangram, tow kind of Node Container are very important, one is Splitter Node, another is Tab Node. Splitter Node is used as a “Grid UI Structure” which has M-Rows and N-Columns Structure. For example, the following picture give a Splitter Structure:
In a Splitter Node, each grid can be filled by some other Node, for example, you can filled it as an activeX node, dotnet node… etc. an xml script for splitter node like the following:
Tab Node is another Node Container in Tangram. A tab node is corresponding a Tabbed Window, a typical tabbed window like the following: Each tab page in a tabbed window cab be another node object, especially, you can nested Splitter node and tab node to construct compound node object.
In a Typical Desktop Application, Window Object is a very basic Object, we know each window object must have a window handle, some window object can have one or more child windows, in Tangram, if a window object has a child window, and the position and size this child window is Only dependent on this window, we call this kind of child window is “can navigated” window, this kind of window is very important for tangram, for example, if the DOCK property of a dotnet user control is “Dock filled”, this user control is “can navigated”, another “can navigated” window is the MDI Client of MDI Parent Window. “can navigated” window and its parent window composed as a navigable pair in tangram. If we have such a pair, a node xml will be realized a UI window embed between
If you have a navigable pair, (to be continues…) |