Re: Hinting GtkEntry



Qui, 2007-05-24 �13:13 -0400, Havoc Pennington escreveu:
> Would it be better to just support an icon inside the entry? (how many 
> different use cases are there really for this, maybe all of them should 
> just be supported directly?)
> 
> The reason for the side windows in GtkTextView is sort of different: 
> they scroll with the text view contents. The scrolling aspect would be 
> difficult to achieve without the side window feature.
> 
> For putting an icon in an entry, there isn't really this complexity; 
> something like gtk_entry_set_icon() or just gtk_entry_set_left_widget() 
> would work fine, instead of having to deal with GdkWindow and custom 
> drawing.
> 
 Yeah, allowing to set a child widget would be much nicer to the
programmer. It would also be more powerful; you could easily build a
combo box by setting a GtkButton on it. :) (Nobody is going to do a
regular combo box, but e.g. a browser may want to do a specialized combo
box where you select a search engine.)

 The set_icon() is maybe too specialized. It would require a special
signal for when clicked, and programmers would want to set the hand
mouse cursor on it to indicate it is clickable. Exposing its GdkWindow
could be avoid having methods for these, but...

 Let's settle on the child widget solution? Always better to go for the
superset I think. :)

Cheers,
 Ricardo

> Also, the icon I would think can avoid GdkWindow overhead and just be 
> drawn without a separate window?
> 


> Havoc
> 




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