Re: [gtk-list] GtkEtext overview and: GTK_WIDGET_SET_FLAGS inheritance?
- From: Paul Barton-Davis <pbd op net>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] GtkEtext overview and: GTK_WIDGET_SET_FLAGS inheritance?
- Date: Mon, 03 Apr 2000 16:55:40 -0400
> In the implementation, the GtkEtextView widget instance struct
>will have a pointer to a GtkEtextBuffer. Then, any insertions or
>deletions you do to that GtkEtextView will simply be done on the
>corresponding GtkEtextBuffer.
>
> This is a little strange, because one member of the child class
>will be a (pointer to an) instance of the parent class. But I can't find
>anything wrong with it, and a post to gtk-devel-list offered no other
>suggestions. It seems logical since I want the user to be able to do
>insertions/deletions to the GtkEtextView, but still have the ability to
>handle multiple views.
If you're trying to implement MVC, then having View inherit from Model
is the wrong approach. Views and Models and Controllers have no
inheritance relationship. You should read "Design Patterns" by Gamma
et al. to get a clearer picture of the model (lower-case) that you may
want to use.
--p
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]