Basic questions about GtkAda

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Basic questions about GtkAda

Gautier de Montmollin
Hello,

Here are a some basic questions from a total GtkAda beginner - they are so basic that I did not find an answer in the "GtkAda User's Guide".

1) I have created a project with GLADE from the GPL 2011 for Windows version (probably 2.x).

GLADE generated Ada code with the corresponding objects, callbacks, etc. . 

Now with GPL 2012 there is a GLADE with a nicer look, but I can't find the way of generating Ada code.

So, my question: how to generate the packages with the newer GLADE ?

2) When I change the body of the callback package (say Azip_Pkg.Callbacks) by replacing the "null;" by real actions, does GLADE preserve the code on next code generation ?

3) More generally, what packages are generated as stub (so, meant to be generated once per project), and what packages are regenerated upon project changes ?

Thanks in advance!

Gautier


_______________________________________________
gtkada mailing list
[hidden email]
http://lists.adacore.com/mailman/listinfo/gtkada
Reply | Threaded
Open this post in threaded view
|

Re: Basic questions about GtkAda

Gautier de Montmollin
Found some answers by comparing the doc of both versions...

So, as I understand it...

1) Until 2.x there was an Ada code generator, Gate. With the newer version, there is no more code generator, the UI information contained in the .glade file is loaded dynamically and objects.

2-3) There is no more worry about the generated code since there is no more generated code...

Now it raise another question: with Gate you got a package

package Azip_Pkg is


   type Azip_Record is new Gtk_Window_Record with record

      Vbox2 : Gtk_Vbox;

      Menubar1 : Gtk_Menu_Bar;

      Menuitem4 : Gtk_Menu_Item;

      Menuitem4_Menu : Gtk_Menu;

      New_Archive : Gtk_Image_Menu_Item;

      Image13 : Gtk_Image;

      Open_Archive : Gtk_Image_Menu_Item;

...

So for instance you could have a panel with buttons inside, as Ada objects, right ? And it was possible to change dynamically items' properties, I suppose.

In GWindows, it would be things like: my_panel.button_2.Text("New label for this button");

Now, if there is no more generated code, where are the objects, e.g. the buttons ? Is everything going through callbacks ?

Thanks for any light...

Gautier


_______________________________________________
gtkada mailing list
[hidden email]
http://lists.adacore.com/mailman/listinfo/gtkada
Reply | Threaded
Open this post in threaded view
|

Re: Basic questions about GtkAda

Pascal-68
Hello Gautier,

I have put some basic explanations in:
http://blady.pagesperso-orange.fr/telechargements/gtkada/gtk-ada.pdf
from
http://blady.pagesperso-orange.fr/a_savoir.html#gtkada
(French language tutorials)

I began first with gate but as it has been discontinued in GtkAda, thus I switched to GtkBuilder.
So you'll find both in the tutorial.

Keep me informed of your progress ;-)

Regards, Pascal.
http://blady.pagesperso-orange.fr


Le 5 juil. 2012 à 13:35, Gautier de Montmollin a écrit :

> Found some answers by comparing the doc of both versions...
>
> So, as I understand it...
>
> 1) Until 2.x there was an Ada code generator, Gate. With the newer version, there is no more code generator, the UI information contained in the .glade file is loaded dynamically and objects.
>
> 2-3) There is no more worry about the generated code since there is no more generated code...
>
> Now it raise another question: with Gate you got a package
>
> package Azip_Pkg is
>
>
>    type Azip_Record is new Gtk_Window_Record with record
>
>       Vbox2 : Gtk_Vbox;
>
>       Menubar1 : Gtk_Menu_Bar;
>
>       Menuitem4 : Gtk_Menu_Item;
>
>       Menuitem4_Menu : Gtk_Menu;
>
>       New_Archive : Gtk_Image_Menu_Item;
>
>       Image13 : Gtk_Image;
>
>       Open_Archive : Gtk_Image_Menu_Item;
>
> ...
>
> So for instance you could have a panel with buttons inside, as Ada objects, right ? And it was possible to change dynamically items' properties, I suppose.
>
> In GWindows, it would be things like: my_panel.button_2.Text("New label for this button");
>
> Now, if there is no more generated code, where are the objects, e.g. the buttons ? Is everything going through callbacks ?
>
> Thanks for any light...
>
> Gautier
>
> _______________________________________________
> gtkada mailing list
> [hidden email]
> http://lists.adacore.com/mailman/listinfo/gtkada

_______________________________________________
gtkada mailing list
[hidden email]
http://lists.adacore.com/mailman/listinfo/gtkada
Reply | Threaded
Open this post in threaded view
|

Re: Basic questions about GtkAda

Gautier de Montmollin
Hello Pascal,
A tutorial, especially covering GtkBuilder, is what I need the most.
Then, thanks a lot.
You'll definitely hear about my progress :-) !
Gautier

> Date: Sun, 8 Jul 2012 17:57:33 +0200
>

> Hello Gautier,
>
> I have put some basic explanations in:
> http://blady.pagesperso-orange.fr/telechargements/gtkada/gtk-ada.pdf
> from
> http://blady.pagesperso-orange.fr/a_savoir.html#gtkada
> (French language tutorials)
>
> I began first with gate but as it has been discontinued in GtkAda, thus I switched to GtkBuilder.
> So you'll find both in the tutorial.
>
> Keep me informed of your progress ;-)
>
> Regards, Pascal.
> http://blady.pagesperso-orange.fr
>
>
> Le 5 juil. 2012 à 13:35, Gautier de Montmollin a écrit :
>
> > Found some answers by comparing the doc of both versions...
> >
> > So, as I understand it...
> >
> > 1) Until 2.x there was an Ada code generator, Gate. With the newer version, there is no more code generator, the UI information contained in the .glade file is loaded dynamically and objects.
> >
> > 2-3) There is no more worry about the generated code since there is no more generated code...
> >
> > Now it raise another question: with Gate you got a package
> >
> > package Azip_Pkg is
> >
> >
> > type Azip_Record is new Gtk_Window_Record with record
> >
> > Vbox2 : Gtk_Vbox;
> >
> > Menubar1 : Gtk_Menu_Bar;
> >
> > Menuitem4 : Gtk_Menu_Item;
> >
> > Menuitem4_Menu : Gtk_Menu;
> >
> > New_Archive : Gtk_Image_Menu_Item;
> >
> > Image13 : Gtk_Image;
> >
> > Open_Archive : Gtk_Image_Menu_Item;
> >
> > ...
> >
> > So for instance you could have a panel with buttons inside, as Ada objects, right ? And it was possible to change dynamically items' properties, I suppose.
> >
> > In GWindows, it would be things like: my_panel.button_2.Text("New label for this button");
> >
> > Now, if there is no more generated code, where are the objects, e.g. the buttons ? Is everything going through callbacks ?
> >
> > Thanks for any light...
> >
> > Gautier
> >
> > _______________________________________________
> > gtkada mailing list
> > [hidden email]
> > http://lists.adacore.com/mailman/listinfo/gtkada
>

_______________________________________________
gtkada mailing list
[hidden email]
http://lists.adacore.com/mailman/listinfo/gtkada