[gtkada] Re: gtkada digest, Vol 1 #125 - 5 msgs

Frode Tennebø frode at tennebo.com
Wed Apr 3 20:39:05 CEST 2002


On Wednesday 03 April 2002 12:01, you wrote:
> Frode wrote:
> >1) With the C version it's possible to #include and have them
> >statically linked into the binary. Is there a way of doing this in
> >GtkAda?
>
> Yes, with the Create_Pixmap function. You might need to
> convert the result to Gtk_Widget to pass it to Append_Element.
> Put the pixmap in a Chars_Ptr_Array. I rename
> Interfaces.C.Strings.New_String to "+" for convenience.

You mean like:

   Main_Window.Button3 := Append_Element
     (Toolbar => Main_Window.Toolbar1,
      The_Type => Toolbar_Child_Button,
      Text => -"Save",
      Icon => Gtk_Widget (Create_Pixmap ("save.xpm", Main_Window)));

This requires that the pixmap is in the current directory when running 
the program. Not exactly what I would like. 

> >2) Where are they located? I can't seem to find them anywhere (well,
> > I found save.xpm (and open.xpm and new.xpm) in the editor example,
> > but the rest...?
>
> Glade puts them in the pixmaps subdirectory.

Errr...beg to differ, but the only files in the pixmaps directory are 
the ones I have put there myself...I use the glade from the gnuada 
site. Are there differences in the builds?

 -Frode






More information about the gtkada mailing list