Re: [gtk-list] Re: ANNOUNCE: GTK+ 1.1.5 Released
- From: Tim Janik <timj gtk org>
- To: gtk-list redhat com
- cc: Gtk-- mailing-list <gtkmm modeemi cs tut fi>
- Subject: Re: [gtk-list] Re: ANNOUNCE: GTK+ 1.1.5 Released
- Date: Mon, 23 Nov 1998 09:15:00 +0100 (CET)
On 23 Nov 1998, Guillaume Laurent wrote:
> "Shawn T . Amundson" <amundson@gimp.org> writes:
>
> > * gtk_widget_new() and gtk_object_new() will now auto-construct new objects.
> > A new function gtk_object_default_construct() is provided now which should
> > be called after every gtk_type_new() to perfom the auto-construction
>
> After a quick look at the code, I'm not sure how well this integrates
> with the Gtk-- construction mechanism.
>
> What is sure is that we'll have to change things since the
> _construct() functions where basically added for us :-). What isn't
> sure is if we can at all integrate with this new mechanism. Tero ?
it will integrate very well, trust me ;)
clist and ctree still provide their _construct() variants, because
the constructor arguments are vital to those widgets.
gtk_scrolled_window_construct() is now superceeded by
gtk_scrolled_window_set_hadjustment() and
gtk_scrolled_window_set_vadjustment().
you can now use gtk_widget_new (GTK_TYPE_SCROLLED_WINDOW, NULL); and
may optionally specify the "hadjustment" or "vadjustment" args.
if you don't set an adjustment, it will be default created and may
be changed at any later point.
as an alternative interface, you can also create the scrolled window
with gtk_type_new() and then optionally call
gtk_scrolled_window_set_[hv]adjustment(), followed by (mandatory)
gtk_object_default_construct().
though, the gtk_widget_new() form is actually the recommended variant,
because gtk_widget_new/gtk_object_new will invoke
gtk_object_default_construct() automatically, and will thus asure
that the scrolled window is fully constructed, taking care about
which construct arguments have already been supplied and which ones
need to be provided automatically.
for gtk_progress_bar_construct(), basically the same aplies with
gtk_progress_set_adjustment().
gtk_spin_button_construct() has been deprecated for a long time already,
because the required setup steps can be performed through
gtk_spin_button_configure().
hscale, vscale, hscrollbar and vscrollbar now provide construction
functionality through the arg system or gtk_range_set_adjustment(),
which wasn't even in place before.
as you may have figured, the changes didn't impose removal of (construct-)
functionality, but merely made the construction arguments be alterable
at any point within an objects life-time.
objects may now be default constructed (e.g. for GUI builders, but
eventually for C++ default constructors as well) and then provide the
neccessary guts automatically, but still feature prior setting of
the required bits (premature to automatic creation actually).
in general, _construct() versions for an object should (and will at
some point) only be available where really required, e.g. for a clist
where it actually doesn't make sense to create the widget with a preset
value that can not be changed at a later point.
this is now also reflected in the argument system, GTK_ARG_CONSTRUCT arguments
may be set at any time, whereas GTK_ARG_CONSTRUCT_ONLY args actually correspond
to the arguments that are passed to a _construct() variant, thus
GTK_ARG_CONSTRUCT_ONLY args may only be set before an object is
GTK_OBJECT_CONSTRUCTED().
>
> --
> Guillaume.
> http://www.worldnet.fr/~glaurent
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]