Re: Default GC's
- From: Havoc Pennington <hp redhat com>
- To: Tomas Berndtsson <tomas nocrew org>
- Cc: GTK+ List <gtk-list gnome org>
- Subject: Re: Default GC's
- Date: 23 Apr 2001 08:20:31 -0400
Tomas Berndtsson <tomas nocrew org> writes:
>
> I couldn't find any description of the default GC's available in the
> GtkStyle struct in the documentation. The ones I'm thinking of are:
>
> GdkGC *fg_gc[5];
> GdkGC *bg_gc[5];
> GdkGC *light_gc[5];
> GdkGC *dark_gc[5];
> GdkGC *mid_gc[5];
> GdkGC *text_gc[5];
> GdkGC *base_gc[5];
> GdkGC *black_gc;
> GdkGC *white_gc;
>
> The arrayed ones, I understood are these:
>
> GTK_STATE_NORMAL,
> GTK_STATE_ACTIVE,
> GTK_STATE_PRELIGHT,
> GTK_STATE_SELECTED,
> GTK_STATE_INSENSITIVE
>
> However, it's not easy trying to figure out what it used where. And
> when it the background of fg_gc used, and not the foreground of bg_gc?
> I'm also interested in knowing what GC is used for example with
> checkbox and radio widgets, when the mouse is over it. It sounds like
> GTK_STATE_ACTIVE or GTK_STATE_PRELIGHT, but on which array?
>
> Is there documentation for this, and I've just missed it? If so,
> please point me to the place.
>
http://developer.gnome.org/doc/API/gtk/gtk-resource-files.html lists
their purpose briefly, cut-and-pasted:
bg[state] = color
Set color used for the background of most widgets.
fg[state] = color
Set color used for the foreground of most widgets.
base[state] = color
Set color used for the background of widgets displaying editable
text. This color is used for the background of, among others,
GtkText, GtkEntry, GtkList, and GtkClist.
text[state] = color
Set color used for foreground of widgets using base for the
background color.
The foreground of the GC's is always used. dark/light GC's are used to
make bevels/shadows. black/white GC's are used for black and white. ;-)
Scroll down a bit in the RC file docs and it also lists what the
various states are used for.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]