Hello,

  allow me to highlight the KDE UI library document
titled "Defining menus and toolbars in XML".

  Bernd Gehrmann writes:

While the action pattern allows to encapsulate actions
triggered by the user in an object which can be
"plugged" somewhere in the menu bars or toolbars, it
does not by itself solve the problem of constructing
the menus themselves. In particular, you have build
all popup menus in C++ code and explicitly insert the
actions in a certain order, under consideration of the
style guide for standard actions. This makes it pretty
difficult to allow the user to customize the menus or
change shortcuts to fit his needs, without changing
the source code.

This problem is solved by a set of classes called
XMLGUI. Basically, this separates actions (coded in
C++) from their appearance in menu bars and tool bars
(coded in XML). Without modifying any source code,
menus can be simply customized by adjusting an XML
file. Furthermore, it helps to make sure that standard
actions (such as File->Open or Help->About) appear in
the locations suggested by the style guide. XMLGUI is
especially important for modular programs, where the
items appearing in the menu bar may come from many
different plugins or parts.

KDE's class for toplevel windows, KMainWindow,
inherits KXMLGUIClient and therefore supports XMLGUI
out of the box. All actions created within it must
have the client's actionCollection() as parent. A call
to createGUI() will then build the whole set of menu
and tool bars defined the applications XML file
(conventionally with the suffix ui.rc). 

  More @
http://developer.kde.org/documentation/library/kdeqt/kde3arch/xmlgui.html

  - Gerald

-------------------
Gerald Bauer

XUL Alliance | http://xul.sourceforge.net  
United XAML  | http://xaml.sourceforge.net

Interested in hiring Gerald Bauer? Yes, I'm available.

If you know of an opportunity, please contact me today.


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
xul-announce mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xul-announce

Reply via email to