Re: Combo box investigation + proposed new API
- From: Havoc Pennington <hp redhat com>
- To: kristian planet nl
- Cc: GTK Development list <gtk-devel-list gnome org>
- Subject: Re: Combo box investigation + proposed new API
- Date: 05 Oct 2000 16:36:00 -0400
Kristian Rietveld <kristian planet nl> writes:
> I used the HBox derivation in the new GtkComboBox, because the old
> GtkCombo and the GtkComboBox of Gnumeric also use the HBox
> derivation. Which is the best widget to derive GtkComboBox from?
>
Just GtkContainer I think.
> + <new_widget_to_derive_GtkComboBox_from>
> + GtkComboBox
> + GtkComboBoxGrid
> + GtkComboBoxPixbuf
>
I don't think the Pixbuf version is needed, really (it would just call
gtk_image_new_from_pixbuf() for you, which seems not worth its own
widget).
> Should the GtkComboBox base class also use GtkTreeView? I had in mind that
> the base class only supplies functions to add the popdown and entry
> widgets. The GtkComboBoxGrid won't be using the GtkTreeView, only the
> GtkComboBoxText will.
>
Yes. What I'm saying is that if you want to do something custom (use a
tree view other than the standard one GtkComboBoxText provides) you
can simply use GtkComboBox directly.
> gtk_combo_box_text_set_pattern_matching(): sets the pattern matching on or
> off. So it'll try to match an entry in the list while you're typing.
>
Does this mean Internet Explorer-style autocompletion? If so I'd call
it autocomplete rather than pattern_matching.
Most likely part of the support for that has to be done in GtkEntry, I
would envision something like an "autocomplete" signal on GtkEntry
maybe.
> think it's better rename the function to:
>
> void gtk_combo_box_text_select ( GtkComboBoxText *cboxtext,
> const gchar *string );
>
Yep, the signal-emitting function should match the signal name.
> For the function which will get all the strings from the popdown I
> propose:
>
> const gchar **gtk_combo_box_text_get_strings ( GtkComboBoxText *cboxtext
> );
>
I would instead return an allocated copy of the array, or an allocated
list. If you do const gchar** you're locked into an implementation
that stores the strings as an array.
> This function came from the original GtkCombo, it seems to disable the
> activation of the ComboBox. I think we should ditch this function,
> because we're able to {en,dis}able to combo box by setting the arrow
> sensitive or insensitive.
>
Seems sensible to me. (Or you can just set the whole combo
insensitive, I don't know why you'd set just the arrow.)
> If I've collected all feedback on this headers, I'll post edited ones. If
> those will be ok, I'll start implementing.
>
Expect additional comments from various people throughout the
implementation process. ;-) But I think getting started implementing
should be fine; I'd say people agree on the basic structure with a
GtkComboBox base widget, with text and grid subclasses.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]