Re: gtkmm 3.0.
- From: Michael <space3000 gmail com>
- To: Oscar Lazzarino <oscar lazzarino gmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: gtkmm 3.0.
- Date: Thu, 25 Mar 2010 03:04:35 +0200
As a compromise between those two suggestions, I'd rather see
Gtk::Button, the way it is now, but would have added
typedef Glib::RefPtr<Gtk::Button> Gtk::ButtonPtr;
And so on for all the widgets/objects. This would make it both
comfortable and explicit, and would reduce the number of keystrokes.
Anyway uniformity and consistency is important, as it enables, you to
write a working code in a more intuitive way.
On Thu, 2010-03-25 at 00:00 +0100, Oscar Lazzarino wrote:
> On Wed, Mar 24, 2010 at 11:55 PM, Germán Diago <germandiago gmail com> wrote:
> > Hello. I've been using gtkmm for two small projects now.
> > From my usage, I would like to make some (realistic) suggestions.
> >
> > I see there are some pieces of the api where Glib::RefPtr is used, and
> > some others where it's not used at all. As gtkmm 3.0 approaches, there's
> > an opportunity to break API and ABI.
> >
> > I would suggest to treat every object in the same way. gtk+ uses
> > reference counting.
> > What I would suggest is something that gobjectconsume
> > (http://live.gnome.org/GObjectIntrospection/GObjectConsume see
> > examples)
> > already does:
> >
> > to wrap the c type in this way:
> >
> > Gtk::Button button("push me");
> > Gtk::Button samebutton = button; //increases reference count.
> >
>
> FWIW, I think keeping explicit RefPtr helps keeping in mind that a
> widget should not be copied and can not be placed in multiple places.
>
> But I agree that some uniformity would be nice (and I would like
> seeing RefPtr everywhere).
>
> O.
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]