Re: Gnome menubars
- From: Havoc Pennington <rhpennin midway uchicago edu>
- To: Peter <zed mentasm com>
- cc: gnome-gui-list gnome org
- Subject: Re: Gnome menubars
- Date: Mon, 28 Sep 1998 01:37:29 -0500 (CDT)
On Mon, 28 Sep 1998, Peter wrote:
>
> I am thinking of Gnome-ifying one of my programs.
>
> Just some questions about the menubar system.
>
> 1/ Is it possible to have checkmark-able menu items?
>
> 2/ If so, is it possible to change their state on the fly? Ie turn the
> check off or on while the menubar/window is still open.
>
> I'd appreciate any help in these areas.
>
Hi,
You're probably on the wrong list; this is for UI issues. Most development
traffic has been on gtk-app-devel and gtk-list in the past, though
technically those don't cover Gnome, so gnome-list is good too.
What you want is a GtkCheckMenuItem. In Gnome you can get this with
gnome-app-helper, creating a GNOME_APP_UI_TOGGLEITEM (or something like
that; look at the headers, and I think there are even docs in CVS now, see
gnome-libs/devel-docs/gnome-app-helper.sgml). In Gtk you create it
manually or with the ItemFactory, both covered in the Gtk tutorial. You
can set the state, no problem. (The function is even called that, I
think.) To set state in Gnome you'll have to use the widget pointer in the
GnomeUIInfo struct.
Whenever you're looking for a widget, the best thing to do is run
'testgtk' from the Gtk distribution. testgtk.c contains sample code to use
each widget too. Of course, it doesn't include Gnome widgets; some of
those are in 'testgnome' and 'stock_demo' but not all.
Havoc
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]