Re: GtkEditable and MVC (from: GtkEtext overview[...])



Derek Simkowiak <dereks@kd-dev.com> writes:  
> 	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.
> 

I think it is. It doesn't really make much sense in this context.

> 	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...(?)
> 

I'm just using GtkLayout to get the infinite scroll area. In GTK 1.4
GdkWindow has 32-bit coordinates anyway though, so GtkLayout will be
useless and going away. You probably want to simply derive from
GtkWidget (or GtkContainer if your text widget will allow embedded
child widgets).

Havoc



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