Re: GtkColorSelection
- From: Vlad Harchev <hvv hippo ru>
- To: Havoc Pennington <hp redhat com>
- Cc: gtk-devel-list gnome org
- Subject: Re: GtkColorSelection
- Date: Wed, 28 Feb 2001 12:42:31 +0400 (SAMT)
On 27 Feb 2001, Havoc Pennington wrote:
Hi,
Sorry for my ignorance - what "previous_color" mean?
If it's some kind of a selection history - I would like to suggest storring
(in memory of the app, not persistent) a list of LRU colors selected with the
widget - say 16 recent ones - as KDE's (or Qt's) widget does - this is VERY
handy I think. Though if 'previous_color' is some kind of selection history,
why programmer may want to set it?
Also, what 'palette' means here? How its entries are initialized by default?
>
> Hi,
>
> Suggest revamping the API, as appended. The API being revamped was
> added post-1.2 so there are no backward compat issues, except for
> gtk_color_selection_set_color() which I've marked deprecated.
>
> The other changes:
>
> - rename set_use_opacity() to set_has_opacity_control()
> - rename set_use_palette() to set_has_palette()
> - provide set_current_color() and set_current_alpha() to replace
> set_color(), in order to get rid of the odd array of doubles
> API (that among other things doesn't work as an object property,
> GUI builders can't understand it)
> - rename set_old_color() to set_previous_color(), and
> use GdkColor not array of doubles as with set_current_color()
> - add get_palette_size() so you don't have to open the widget,
> look at the size, and hardcode said size in your app
> - address palette cells by index, not by x/y coordinate, so we can
> rearrange them and leave the API making sense
> - remove the is_adjusting() function, because I don't see what it's
> for, though I'm willing to be convinced
>
> Have a look at current CVS for compare-and-contrast. Please comment on
> the changes... I'm merging a modified version of Lee's property
> patches for the color sel while I'm doing this, so that will be part
> of the patch.
>
> Havoc
[...]
>
> void gtk_color_selection_get_palette_size (GtkColorSelection
> *colorsel);
May be the one above should return anything ? :)
> void gtk_color_selection_get_palette_color (GtkColorSelection
> *colorsel,
> gint
> index,
> GdkColor
> *color);
> void gtk_color_selection_set_palette_color (GtkColorSelection
> *colorsel,
> gint
> index,
> GdkColor
> *color);
> void gtk_color_selection_unset_palette_color (GtkColorSelection
> *colorsel,
> gint
> index);
>
Best regards,
-Vlad
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]