Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/john/gui/rc @ 3177

Last change on this file since 3177 was 2018, checked in by bensch, 20 years ago

orxonox/trunk: merged guicc and the new Configure.ac to the Trunk. Now I have to Check if everything compiles on windows.

File size: 3.9 KB
Line 
1# pixmap_path "<dir 1>:<dir 2>:<dir 3>:..."
2#
3pixmap_path "/usr/include/X11R6/pixmaps:/home/imain/pixmaps"
4#
5# style <name> [= <name>]
6# {
7#   <option>
8# }
9#
10# widget <widget_set> style <style_name>
11# widget_class <widget_class_set> style <style_name>
12
13# Here is a list of all the possible states.  Note that some do not apply to
14# certain widgets.
15#
16# NORMAL - The normal state of a widget, without the mouse over top of
17# it, and not being pressed, etc.
18#
19# PRELIGHT - When the mouse is over top of the widget, colors defined
20# using this state will be in effect.
21#
22# ACTIVE - When the widget is pressed or clicked it will be active, and
23# the attributes assigned by this tag will be in effect.
24#
25# INSENSITIVE - When a widget is set insensitive, and cannot be
26# activated, it will take these attributes.
27#
28# SELECTED - When an object is selected, it takes these attributes.
29#
30# Given these states, we can set the attributes of the widgets in each of
31# these states using the following directives.
32#
33# fg - Sets the foreground color of a widget.
34# fg - Sets the background color of a widget.
35# bg_pixmap - Sets the background of a widget to a tiled pixmap.
36# font - Sets the font to be used with the given widget.
37#
38
39# This sets a style called "button".  The name is not really important, as
40# it is assigned to the actual widgets at the bottom of the file.
41
42style "window"
43{
44  #This sets the padding around the window to the pixmap specified.
45  #bg_pixmap[<STATE>] = "<pixmap filename>"
46  #bg_pixmap[NORMAL] = "warning.xpm"
47  bg[NORMAL] = { 0, 0, 0 }
48  fg[NORMAL] = { 1.0, 0, 0 }
49}
50
51style "scale"
52{
53  #Sets the foreground color (font color) to red when in the "NORMAL"
54  #state.
55 
56  fg[NORMAL] = { 1.0, 0, 0 }
57  bg[NORMAL] = { 1.0, 0, 0 }
58  bg[PRELIGHT] = { 1.0, 0, 0 }
59 
60  #Sets the background pixmap of this widget to that of its parent.
61  bg_pixmap[NORMAL] = "<parent>"
62}
63
64style "button"
65{
66  # This shows all the possible states for a button.  The only one that
67  # doesn't apply is the SELECTED state.
68 
69  fg[PRELIGHT] = { 0, 0, 0 }
70  bg[PRELIGHT] = { 1.0, 0, 0 }
71  bg[ACTIVE] = { 1.0, 0, 0 }
72  fg[ACTIVE] = { 0, 1.0, 0 }
73  bg[NORMAL] = { 0, 0, 0 }
74  fg[NORMAL] = { 1.0, 0, 0 }
75  bg[INSENSITIVE] = { 1.0, 1.0, 1.0 }
76  fg[INSENSITIVE] = { 1.0, 0, 1.0 }
77}
78
79# In this example, we inherit the attributes of the "button" style and then
80# override the font and background color when prelit to create a new
81# "main_button" style.
82
83style "main_button" = "button"
84{
85  font = "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*"
86  bg[PRELIGHT] = { 0.75, 0, 0 }
87}
88
89style "toggle_button" = "button"
90{
91  fg[NORMAL] = { 1.0, 0, 0 }
92  fg[ACTIVE] = { 1.0, 0, 0 }
93  text[NORMAL] = { 0, 0, 0}
94  # This sets the background pixmap of the toggle_button to that of its
95  # parent widget (as defined in the application).
96  #bg_pixmap[NORMAL] = "<parent>"
97}
98
99style "text"
100{
101  #bg_pixmap[NORMAL] = "marble.xpm"
102  fg[NORMAL] = { 1.0, 0, 0 }
103}
104
105style "ruler"
106{
107  font = "-adobe-helvetica-medium-r-normal--*-20-*-*-*-*-*-*"
108}
109
110# pixmap_path "~/.pixmaps"
111
112# These set the widget types to use the styles defined above.
113# The widget types are listed in the class hierarchy, but could probably be
114# just listed in this document for the users reference.
115
116widget_class "GtkWindow" style "window"
117widget_class "GtkFrame" style "window"
118widget_class "GtkDialog" style "window"
119widget_class "GtkFileSelection" style "window"
120widget_class "*Gtk*Scale" style "scale"
121widget_class "*GtkCheckButton*" style "toggle_button"
122widget_class "*Gtk*Menu*" style "toggle_button"
123widget_class "*GtkRadioButton*" style "toggle_button"
124widget_class "*GtkButton*" style "button"
125widget_class "*Ruler" style "ruler"
126widget_class "*GtkText" style "text"
127widget_class "*GtkLabel" style "text"
128
129
130# This sets all the buttons that are children of the "main window" to
131# the main_button style.  These must be documented to be taken advantage of.
132widget "main window.*GtkButton*" style "main_button"
Note: See TracBrowser for help on using the repository browser.