GtkEditable and MVC (from: GtkEtext overview[...])
- From: Derek Simkowiak <dereks kd-dev com>
- To: Havoc Pennington <hp redhat com>
- cc: gtk-list redhat com
- Subject: GtkEditable and MVC (from: GtkEtext overview[...])
- Date: Mon, 3 Apr 2000 14:14:09 -0700 (PDT)
> Derek the problem with your design is that the buffer isn't a widget;
> GtkEditable is a widget. Thus the buffer is not a GtkEditable. You
> can't derive from it.
*Sigh*... okay, I'll derive the buffer from GtkObject then, as you
have done.
> Look at my GtkTextView/GtkTextBuffer, that's about the only way to
> implement this with single inheritance.
Your GtkTextView is derived from GtkLayout, I believe because you
want to use its scrolling. I was planning on implementing my own
scrolling (something I don't really understand yet--I was planning on
just copying GtkText's scrolling for now).
Would it make sense to have my "View" derive from GtkEditable,
since it will, in fact, be a widget? If I do derive from GtkEditable,
then what will my widget do with the "insert_text", "delete_text", and
"changed" signal handlers?
I guess it does not make sense for the View to derive from the
GtkEditable, because (as you have said) what does
gtk_editable_insert_text() [or]
gtk_editable_get_chars()
...mean on a View? It looks like the GtkEditable is useless, as
far as implementing a multiple-view text widget is concerned.
So what is the most logical widget to derive a View from? I'd
like to know more about the GtkLayout, and why you chose it for your
View...(?)
Again, thank you for your help with this...
--Derek
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]