This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Interface to the generic menu and toolbar


Nobody objected (what is reasonable -- the Tk and iwidgets style cannot
be that bad) so I went ahead and did it.  I will soon have a description 
as part of the new Plugin facility (I am still writting it).

	* library/gdbmenubar.itcl (constructor): Remove unused code.
	(add): New method.  Emulate the style of the menubar iwidget commands.
	(menubar_show): Old name.
	(show): New name.
	(menubar_menu_exists): Old name.
	(exists): New name.
	(menubar_clear_menu): Old name.
	(clear): New name.
	(menubar_delete_menu): Old name.
        (delete): New name.
	(menubar_new_menu): Make private.  Does not return anything.
	(menubar_add_menu_command): Make private.
	(menubar_add_menu_separator): Ditto.
	(menubar_change_menu_state): Ditto.
	* library/srcbar.itcl: Adjust to the above syntax.
	* library/plugins/plugins.tcl: Ditto.
	* library/plugins/rhabout/rhabout.itcl: Ditto.




Fernando Nasser wrote:
> 
> The existent interface to the menubar (which uses Tk menu) is
> currently:
> 
> # GDBMenuBar
>   public method menubar_show {}
>   public method set_class_state {enable_list}
>   method menubar_new_menu {name label underline}
>   method menubar_menu_exists {name}
>   method menubar_clear_menu {name}
>   method menubar_add_menu_separator {}
>   method menubar_add_menu_command {class label command args}
>   method menubar_change_menu_state {menu state}
>   method menubar_set_current_menu {menup}
> 
> Note that the code currently uses positional parameters.
> 
> I would like to make this more like iwidgets (or even Tk), with
> commands and arguments.
> 
> For instance:
> 
> $Menu add menubutton <name> -label <label> -underline <pos>
> 
> instead of
> 
> $Menu menubar_new_menu <name> <label> <pos>
> 
> I don't mean we should have all the operations the iwidget menubar has
> or that
> we do not add some operations we find useful.  I am just talking about
> the style.
> We do have some extra functionality anyway (like the classes that can be
> enabled/disabled).
> We could keep the names of the options that are equivalent the same
> though.
> 

-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]