Re: Toolbar editor
- From: Owen Taylor <otaylor redhat com>
- To: mpeseng tin it
- Cc: gtk-devel-list gnome org, iain prettypeople org
- Subject: Re: Toolbar editor
- Date: 31 Mar 2003 17:27:18 -0500
On Mon, 2003-03-31 at 11:10, mpeseng tin it wrote:
> >Can you summarize exactly what the addition is that you are
> >proposing and how it relates to the other libegg components?
>
> I'm proposing to add a way to build editable toolbars on the top of EggMenu.
>
> What applications would need to do:
>
> Create a EggEditableToolbar instance passing to it the EggMenuMerge they
> are using to build their menus ui.
> Provide an xml file with the available action and the default layout.
> Call egg_editable_toolbar_edit to show the editor and put the toolbar in
> edit mode (from a Edit->Customize toolbar, for example).
>
> My implementation:
>
> Toolbar build steps:
>
> - load available actions and user custom layout (or default when there is
> not one) in EggToolbarsGroup.
> - Create an xml string from the data model
> - merge it with EggMenuMerge (that will use EggToolbar to create the widgets)
>
> Editing:
> - When edit mode is activated, a dialog with the available actions is showed
> and EggToolbar. I use egg_tool_item_set_use_drag_window to disable clicks
> on the items and I set them as drag source.
> - When the user drag items on the toolbar (from the toolbar itself, another
> toolbar or the editor), I get the position the items has been dropped with
> egg_toolbar_get_drop_index and I update the data model.
> The selection data of the drag is just the EggAction name.
> - The toolbar is recreated to match the new model (add new one/remove old
> one, with EggMenuMerge).
>
> I hope this is what you needed to know. Many of these things are just details
> of current implementation, if they are not good I'd be happy to improve
> them later. But I think it would be good to have a base in libegg asap.
> I hope the basic idea is fine though.
This sounds reasonable enough to me to go ahead and put something into
libegg.
Some questions that I think will have to be answered before putting
such a widget into GTK+:
- What determines whether an application should have a customizable
toolbar?
(More of a UI guide question, but it would be best to have a some
sort of answer to this in the GTK+ documentation as well, if we don't
want to see ping frontends with customizable toolbars and word
processors without.)
- How does saving work when the toolbar defaults change? (Jody's
question, a always a real hard question for any sort of UI
customization.)
- How is the customization dialog going to be made accessible and
keyboard navigatable?; a sample solution would be for every item
either in the dialog or on the toolbar to have accessible actions /
context menus with:
- Add to toolbar [for dialog]
- Remove from toolbar [for toolbar]
- Move to next toolbar [for toolbar]
- Move left, move right [for toolbar]
It would still be relatively painful, but at least it would
be possible.
- How would this be used in an application that allows binding toolbar
items to chunks of script? Are their other ways that an
application would need to be able to customize the process?
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]