ANNOUNCE: Specification for abstract user interface for Windows, GNOME and Aqua

GUI Task Force people I am pleased to announce that on HToolkit web site is placed the first draft of the specification for the future development of HToolkit. The paper is focused on the possibility to develop abstract GUI API which will be able to ensure the native look & feel on both Windows, GNOME and Aqua platforms. The specification is not close and will be extended and/or particularized in the future. I hope that the ideas explained in the paper will also be helpful for the Common GUI API specification. The source of the paper is available in PDF and LaTeX format from the following locations: http://htoolkit.sourceforge.net/doc/specification.pdf http://htoolkit.sourceforge.net/doc/specification.tex All the best, Krasimir __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com

On Saturday, Aug 9, 2003, at 12:52 Europe/Paris, Krasimir Angelov wrote:
http://htoolkit.sourceforge.net/doc/specification.pdf http://htoolkit.sourceforge.net/doc/specification.tex
I have to admit you were faster. I attach my attempt which so far only tries to draw some conclusions and gives no specific API yet. It can be found at: http://www.cs.kent.ac.uk/people/staff/as49/rationale.pdf To summarize, I make the following proposal: - have two application setups, document centered and control oriented - have toolbars, each toolbar item correspond to a menu item - have toolboxes which lets the user choose between, well, tools I haven't written anything on menus yet, so I'll look at your document before adding more. Axel.

--- Axel Simon
http://www.cs.kent.ac.uk/people/staff/as49/rationale.pdf
To summarize, I make the following proposal:
- have two application setups, document centered and control oriented - have toolbars, each toolbar item correspond to a menu item - have toolboxes which lets the user choose between, well, tools
Very useful reference. It is more detailed and contains some points which I leave out. I think that the controled SDI (CSDI) interface can be added to HToolkit without modification of the high-level API of the library. For toolbars I already have some ideas. In the time being I work against time on the toolbars for Windows. I think that we need a common abstraction for toolbar items and for menu items. The idea is that the toolbar and menu item which are related to one and the same command must share the same bitmap, title and tooltip. Krasimir __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com

On Sunday, Aug 10, 2003, at 10:11 Europe/Paris, Krasimir Angelov wrote: ...
For toolbars I already have some ideas. In the time being I work against time on the toolbars for Windows. I think that we need a common abstraction for toolbar items and for menu items. The idea is that the toolbar and menu item which are related to one and the same command must share the same bitmap, title and tooltip.
A word of warning: I don't think we should abstract where it isn't possible. That only makes the CGA more complex and it will be more difficult for high-level approaches like Fudgets to build on CGA. In particular I don't see a reason why there need to be a common abstraction for menu items and toolbars. But it would be nice if the user can add the standard menu entries like "Save" and the corresponding icon in the toolbar at the same time. I am still looking through your document and I am picking up some things which I have missed so far. Still I guess we should try to formalize an API without any bias towards a specific binding. I will try to be more specific by giving an example. Axel.

Hello Everyone! Those documents you posted are both great work, IMHO. Just some fine points; Axel Simon wrote:
- have toolbars, each toolbar item correspond to a menu item - have toolboxes which lets the user choose between, well, tools
Perfect.
- have two application setups, document centered and control oriented
Yes, that's a good starting point. Should we postpone the following more advanced features to later versions of the CGA? *) multiple document types For different document types, most non-mac people will probably want different menus rather than just disabling menu items. On the mac, this wouldn't be the right thing to do, although there _have_ been respected Mac OS programs that did that to a limited extent. *) multi-window documents Some applications open a separate window for editing objects which are part of one document (imagine a word-processing app that opens a separate formula editor window when you double-click a formula). *) Control-oriented applications and menu bars: Some control-oriented applications have menu bars --- a MP3 player application might have one, for example. Others consist of one or more dialog windows and no application-specific menu commands. Do Win32 and GNOME users expect the main dialog window to have a menu bar with the standard commands (About, Quit, Edit commands), and nothing else? Mac users certainly do, but I've seen many small Windows & Unix utility apps display just a dialog without any menus. And now about Krasimir's document: *) The Services menu in Aqua is filled by the OS. It's contents are defined by other applications installed on the system. For example, Apple's Mail application provides "Send Selection" and "Send Mail To" entries that work on the currently selected text in any application. In order to support this, an application has to provide information about what is currenlty selected; for the standard text widgets, this can be handled transparently by the backend. For other things (the mechanism isn't limited to text), it's probably too platform-specific to bother. *) Open Dialogs on Mac OS allow multiple selection (so you can open several files at once). *) Mac application have to specify the document types they support (together with their associated ic ons, extensions and traditional Mac OS file type codes), in a separate "property list" file that is included within the application package. It cannot be specified at runtime because it has to be available before the application is ever run. *) Apart from the use of file extensions, Mac OS also supports four-character type codes ("HFS file types"). Apple currently recommends using both, although many programs only use one of the two methods. In the open dialog box, a text editor would need to display *) all files whose HFS file type is 'TEXT' and *) all files whose HFS file type is unspecified and whose name ends with ".txt". For application-specific file formats this is simpler, as it will be sufficient to use just file extensions. Also, Mac OS doesn't usually display a "Show all files" option (in most cases, they don't make sense, after all). Some applications (plain text editors, hex editors, etc.), provide one, so maybe add another Bool parameter for that. I've seen at least one Java application that was next to unusable on the mac because it expected users to choose "*.*" from a file type menu that didn't exist in the mac version... *) Opening files via drag&drop: In order to open a file on the mac, you drag it to the Application's icon, not to one of it's window. Dragging something to a window means: insert it _into_ that document (if possible), not open a new document. Whether or not it is possible to drag a particular file to the application icon is determined by the list of supported document types that I mentioned earlier. *) The "Zoom" command (Window menu) and the Zoom (+) button in the window title bar (both do the same). Apart from un-minimizing a window, zoom also switches a window between a user defined size and position and an "optimal" application defined size and position. This is similar to the maximize button on other platforms, but it's not the same. The application-defined size needn't be the full screen; for example, for word-processing apps, it shouldn't be wider than the documen'ts page width, and for image processing apps it shouldn't be larger than the image. Zooming to full-screen is a good choice, but seldom perfect. For this to work perfectly, the optimal size has to be calculated by the application. It's probably OK to ignore this in a first version and add it as an optional feature later. Cheers, Wolfgang

Hello Wolfgang!
First of all thanks for your constructive criticism.
--- Wolfgang Thaller
Do Win32 and GNOME users expect the main dialog window to have a menu bar with the standard commands (About, Quit, Edit commands), and nothing else? Mac users certainly do, but I've seen many small Windows & Unix utility apps display just a dialog without any menus.
Not obligatory. Maybe this should be optional.
And now about Krasimir's document: [..] *) Open Dialogs on Mac OS allow multiple selection (so you can open several files at once).
For that reason in HToolkit there are two functions: runInputFileDialog and runInputFilesDialog. The first allows selection of just one file while the second allows selection of multiple files. Allowing multiple selection in the File/Open option should be useful for both Win32 and GNOME ports.
*) Mac application have to specify the document types they support (together with their associated ic ons, extensions and traditional Mac OS file type codes), in a separate "property list" file that is included within the application package. It cannot be specified at runtime because it has to be available before the application is ever run.
Where I can read more about the content of the "property list" file?
*) Apart from the use of file extensions, Mac OS also supports four-character type codes ("HFS file types").
For that reason GNOME uses "mime types". In my proposal the mime type is accessible from dtMimeType field in the DocumentTemplate record. One solution is to add dtContentType field which will contain HFS file type.
*) Opening files via drag&drop: In order to open a file on the mac, you drag it to the Application's icon, not to one of it's window. Dragging something to a window means: insert it _into_ that document (if possible), not open a new document. Whether or not it is possible to drag a particular file to the application icon is determined by the list of supported document types that I mentioned earlier.
The same situation is when the Windows user double click a file from the Explorer. The association between the file type and the application is determined from small database in the Windows Registry. Many applications fills the records for their supported file types when they are started for the first time. I think that the information collected in the DocumentTemplate records is enough to fill the types database. For that aim the library should export function like: registerFileTypes :: IO () The only missing part is that to fill the database we need the document name. For example for MP3 files the usual name is MP3File, for GIF - GIFFile ... The document name can be constructed from the dtContentType field (announced above) and the "File" word. Under Mac the registerFileTypes function can generate the "property list" file. Cheers, Krasimir __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com
participants (3)
-
Axel Simon
-
Krasimir Angelov
-
Wolfgang Thaller