Re: Docs + topping a window



Peter Rottengatter <peter rottengatter de> writes: 
I haven't used GTK for long, but I find it very tiring to look for docs 
on a specific subject. As an example, I'm looking for a way to make some
window that might have been covered by other windows (of my application)
to become the topmost again.

In GTK 1.2:

  if (GTK_WIDGET_REALIZED (window))
    gdk_window_raise (window->window);

in 2.0:

 gtk_window_present (window);

I've checked the header files, but they are not very explicit about the 
purpose of the API routines, as one might expect. I've checked the
"reference" set of HTML files that can be found at gtk.org, but in most
places they are little more that the header files nicely formatted. Then
I also check the tutorial (also at gtk.org), however it only covers the 
most basic stuff. The FAQ covers some very special stuff, but it's not 
comprehensive of course. Aren't there any other docs ?

The GTK 2 docs are a good bit more comprehensive than the 1.2
docs. See http://developer.gnome.org/doc/API/2.0/gtk/

If a function there isn't available in 1.2, usually you can look at
its implementation code and see what you need to do in 1.2 to
implement that feature manually.


Another thing I haven't been able to figure out is how to set an optionmenu
to a specific entry (that's already in the menu). For instance, I want the
optionmenu button to show the entry no.3. Do I need to read out the menu
entry text no.3, and
a) set the button text using gtk_label_set_text (How do I obtain the 
   GtkLabel *label ?)
b) set the menu using gtk_menu_set_active ?
Or is there a simpler solution ?

gtk_option_menu_set_history().

Havoc



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]