See into S60
» Subscribe
» Favorite Links
» What is S60?
» Freeware & Trials
» S60 devices
» Hints and tips

» About this blog
» Blognotes (15)
» Bugs and Workarounds (4)
» Build tools (5)
» Carbide.c++ 1.1 (4)
» Carbide.c++ 1.2 (8)
» Carbide.c++ 1.3.x (9)
» Carbide.c++ 2.0.x (12)
» Carbide Plug-Ins (4)
» CodeWarrior (2)
» FAQ (6)
» Future directions (25)
» General (48)
» Off-topic (5)
» On-device debugging (13)
» Performance Investigator (2)
» Product features (18)
» Product releases (16)
» Screencast (14)
» Support (36)
» Tool setup (6)
» UI Designer (8)
» Usability (18)
» Work in Progress (14)
» Write-build-debug (4)
» Tommi's Reports from Wonderland
» Voice of S60
» Creating Carbide C++
» S60 Multimedia Blog
» The Convergence Zone
» Web Browser for S60 Blog
» Consumed by S60
» Java for S60
» Mobile Web Server
» Mobile Security
» See into S60
» Business2GO
» Nokia Podcasting Application Blog
» New Remote Connections View
» Terminating Multiple Processes
» Agile Tuning of the Austin Team
» Introduction to the workspace screencast
» Adding DLLs while Debugging
» September 2008
» August 2008
» July 2008
» June 2008
» May 2008
» April 2008
» March 2008
» February 2008
» August 2007
» May 2007
» April 2007
» March 2007
» February 2007
» January 2007
» December 2006
» November 2006
» October 2006
» September 2006
» August 2006
» July 2006
» June 2006
Subscribe
Links
February 13, 2008 Control Collection Visualization - part one Posted by David Dubrow at 08:18 AM | Categories: UI Designer

Adding support for UIQ to the Carbide.c++ UI designer posed some challeneges for our existing architecture. Perhaps the most challenging aspect was how to present the control collection to the user in a way that was both meaningful and useful and not overly cumbersome. Having decided to generate source code that would share control data using the control collection, we now had to find a way to present this to developers within the graphical editor.

First, I should probably explain a little about the control collection for those readers not well versed in UIQ UI programming. The control collection is basically an array of layout-agnostic control data for the controls that are used in different layouts corresponding to the same view. For each control, there is an entry with its shared data in the control collection. In each layout, the shared data for these controls is referenced through a unique id.

For any view, there may be multiple layouts defined for different UI configurations (e.g., softkeys, pen, portrait, landscape, etc.). In a given application, the same control may exist in different layouts corresponding to different UI configurations. Because UIQ uses layout managers, different UI configurations will often all use the same layout, but they can have different layouts as well depending on the design of the application. A text editor for collecting some kind of textual data from the user may exist in both softkey and pen configurations, and the maximum number of characters it accepts may be the same, even if it is laid out differently in the different UI configurations. The maximum length of the text editor control is an example of data that can be expressed in the control collection. In different layouts, each control in the control collection is augmented with layout-specific data (this data is the layout manager settings that are specific to how that control is laid out in that specific layout).

For each control the developer adds to a design, the UI designer tool had to present two different sets of data: shared data and layout-specific data. We had several design goals in mind. The shared data had to be presented so that it could be easily accessed irrespective of which layout the developer was editing. We didn't want to make the single layout use case more cumbersome in order to support the multiple layout case. First, we needed to present the controls in the control collection so that they could easily be added to new layouts while still allowing the developer to create brand new controls. And second, we needed to present the shared data for each control in a way that was easily accessible, rather than make the developer have to hunt down where to edit these values.

In the UI designer tool, we have various eclipse views working together. There is the main editor. This has a layout area where controls are rendered as they would look in the running application. In the editor, there is a palette of control creation tools arranged in drawers by type (e.g., editors like text or numeric editors, controls like labels and images, etc.). Controls can be added to a design from the palette by selecting them in the palette and clicking or dragging them on the layout area. Once an object is created, it also appears in the outline view, and when selected, its properties can be edited in the properties view. There are additional views as well, but these provide the main editing environment.

In the S60 UI designer, we had no data sharing requirements, objects are simply created from the palette and there is no shared data separate from layout-specific data. We decided that to separate the shared data from the layout-specific data, we would make two kinds of control types. One kind would allow editing the control-specific data and the other would be a generic control type with layout-specific data. This seemed ok, but we needed to tie these together. Our framework already contained the concept of one object containing a reference to another object through a special kind of property, and this seemed exactly the facility to use to tie the two objects together. For source generation, the reference property would be sufficient. Each layout control would have a reference to a control in the control collection. But this referencing facility would have to be really beefed up to allow us to make the visualization and editing as intuitive as it would need to be.

In my next blog entry, I will discuss some of the reference property enhancements and other new facilities we added to the UI designer framework to support our stated design goals in a general and reusable manner.


Permalink |


Post a comment







«Back to previous page