[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Context menus (an idea for summer of code?)
From:       Thomas Friedrichsmeier <thomas.friedrichsmeier () ruhr-uni-bochum ! de>
Date:       2005-06-14 17:22:21
Message-ID: 200506141922.21373.thomas.friedrichsmeier () ruhr-uni-bochum ! de
[Download RAW message or body]

> > So, we'd have a class KontextMenu, which is derived from KPopupMenu. There
> > will be an API for this class to tell it: "Ok, there is a context called
> > 'image'. This context is associated with the following options: A, B, C.
> > Next there is a context called 'link' with options C, D, E...". Then, when
>
> I think it would be better to associate it with a menu defined in the XMLGUI 
> file.
> AFAIK it is already supported to create popupmenus this way, but only a few 
> applications actually use it.
> Maybe this could be made easier with a special context menu class.

Yes, this would definitely be a good idea. However, creating popupmenus that 
way is only part of the concept. Rather instead of a static menu, you'd 
create _contexts_ using an XMLGUI file. The options in those contexts would 
be merged automatically by KPopupMenu to form a single menu (of course it 
would still be possible to define all context-options in a single 
XMLGUI-file, but I'd like to stress that the basic unit should be a context, 
not a static menu). Something roughly like:

void KontextMenu::popup (SomeType list_of_contexts_to_show, QPoint position);

Thomas
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic