From: Phillip M. <pm...@us...> - 2003-10-23 03:54:48
|
<img src="http://aztec.sourceforge.net/images/groupcontainer.png" align="right"> After yet another short break with aztec, we are back, rolling along again. One notable thing that just got up and working is collapsable group containers. This allows user interfaces to be grouped nicely, giving less clutter, and more organisation. A screenshot of this in action is to the right. <P> The neat part is, that it is all doable in javascript as well. This is a pretty major achievement for me, having a scriptable user interface. Just as a demonstration, here is the code used to produce the window shown here: <pre> function toggleGroup(groupContainer) { groupContainer.expanded = !groupContainer.expanded; } function groupContainerExample() { var mainWindow = new MWindow(); // the flow layout takes three args, the x and y margins, // and then the number of components per row mainWindow.setLayoutManager(new MParagraphLayout()); var group1 = new MGroupContainer("My Group"); mainWindow.addComponent(group1); with (group1.content) { addComponent(new MTextField("Click the button below", 20)); addComponent(new MTextField("to show how to collapse/expand", 20)); addComponent(new MTextField("a group container", 20)); addComponent(new MTextField(" using javascript", 20)); addComponent(new MTextField("", 20)); var button = new MButton("Click me!"); button.addListener(toggleGroup, group1); addComponent(button); } var group2 = new MGroupContainer("Group 2"); mainWindow.addComponent(group2); with (group2.content) { addComponent(new MTextField("Try collasping", 20)); addComponent(new MTextField("this group", 20)); addComponent(new MTextField("", 20)); addComponent(new MTextField("", 20)); addComponent(new MButton("Im in the second group")); } var group3 = new MGroupContainer("Group 3"); group2.content.addComponent(group3); with (group3.content) { addComponent(new MTextField("Group 3", 20)); addComponent(new MTextField("is inside", 20)); addComponent(new MTextField("Group 2", 20)); addComponent(new MTextField("", 20)); addComponent(new MTextField("", 20)); addComponent(new MButton("Click me!")); } mainWindow.setSize(mainWindow.getMinimumSize()); mainWindow.setVisible(true); } groupContainerExample(); </pre> Most of the space is taken up by the text fields, so it is fairly compact. I'm sure it will be streamlined a bit in future, to make user scripts much tidier and nicer to use. <P> To wrap up this small update, heres a list of changes made since the last release (September 15) <ul> <li>Added javascript bindings to have group containers and paragraph layouts. This includes a javascript example as well. (Phillip) <li>Added in a paragraph layout which lays out components one at a time as wide as possible, but in a vertical sequence. (Phillip) <li>Added a container than can collapse its contents. Works well for the channel bar, and will be great for laying out dialogs. (Phillip) <li>Added an event method MContainer::onChildResized(). This allows containers to be notified when the size of a child component changes. This is to pave the way to having collapsable containers of components. (Phillip) <li>The UV Edit window and the feedback from using the UV window now works in Aztec 2. Bug 803217. (Phillip) <li>Fixed so isolated single edges in an edge connect do not have points inserted on them. Bug 811401 (Phillip) <li>Fixed multiple edge connect so all the edges are always selected properly. Bug 811375 (Phillip) <li>Undo is now recorded for each individual call to a Scene function inside javascript. If this behaviour is undesirable in a script, it can wrap a bunch of script calls between a Scene.undoBegin() and a Scene.undoEnd() calls. Fixes bugs 811398 811399 and 811400. (Phillip) <li>Made it so the zoom distance limits itself to sensible values. bug 812348 (Phillip) <li>Fixed the problem where the channel bar would display squashed up attributes. (Phillip) <li>Fixed the edge divide display so it only displays the potential new edge if it really will create one. Bug 810325 (Phillip) <li>Fixed the context menu only appearing after the second click bug. Bug 810330. (Phillip) </ul><P>- Phillip<P> |