|
NAMEAG_StyleSheet —
agar cascading style sheets
SYNOPSIS#include <agar/core.h> #include <agar/gui.h> DESCRIPTIONTheAG_StyleSheet interface allows Agar GUI style
attributes to be loaded from a cascading style sheet. Agar style sheets use a
particular syntax. Style sheets contain blocks of attributes which are
applicable to specific Agar widget classes (and possibly, specific widget
states as well). For example:
AG_Button { # Set colors for default state color: rgb(125,125,125); text-color: rgb(0,0,0); # Set colors for "disabled" state color#disabled: rgb(200,200,200); text-color#disabled: rgb(125,125,125); # Set colors for mouse hover state color#hover: rgb(200,250,200); text-color#hover: rgb(125,150,125); } By default, a widget instance inherits its style attributes from its parent. The syntax allows certain attributes, such as "font-size" and "color" to be specified in relation to the parent. For example: font-size: 50%; # Half of parent font size color: hsv(100%,50%,100%); # Half of parent saturation color: hsv(100%,100%,75%); # 3/4 of parent value The generic AG_Widget class defines the basic attributes "font-family", "font-size", "font-weight", "font-style", "color", "text-color", "line-color", "shape-color" and "border-color". For a full description of those attributes, refer to the “STYLE PROPERTIES” of the AG_Widget(3) manual page. Other Agar widget classes may define their own style attributes (these should be documented under the “STYLE PROPERTIES” section of the widget's manual page). INITIALIZATIONvoidAG_InitStyleSheet (AG_StyleSheet
*ss);
The The The SEE ALSOAG_Intro(3), AG_Widget(3), AG_Window(3)HISTORYTheAG_StyleSheet interface first appeared in Agar
1.5.0.
Visit the GSP FreeBSD Man Page Interface. |