Re: gtk question.

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

 



On Thu, Aug 16, 2012 at 01:00:17PM +0200, priolof@xxxxxxxxx wrote:
> Hi all this is Federico from Italy, I am working on two opensource
> projects one is a debugger for Opencobol and another is a Gui for
> opencobol.  Both projects  are on sourceforge and some documents are
> also available at www.tp-srl.it (site of mine).
> 
> This is the question. For the GuiCobol I must define some new events
> for widgets (typically GTK-Windows). In particular I need to add one
> that is emitted when the form is created (first time only).

Can you be more specific what you mean by ‘created’?

There are various things that can be considered creation, with
corresponding signals, such as "realize" (see gtk_widget_realize() that
corresponds to creation of widget's window if it has one) but they can
occur repeatedly.

Connecting something to creation of the object from the outside does not
make much sense:
// Here we do not have anything to connect to.
GtkWidget *widget = gtk_window_new(...);
// Here the object has already been created.

If you want to run some code whenever an object of specific type is
created, you can *subclass* it, i.e. create some MyWindow derived from
GtkWindow and then run the code for example in the MyWindow instance
init() method.

Or, if the windows are created via some wrapper (don't know how GuiCobol
works) then this wrapper can run whatever is necessary when creating
them.

Yeti

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list



[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux