?? gtkrc.sgml
字號:
<literal>*</literal>. So for example, the following specifies different icons touse for left-to-right and right-to-left languages:<informalexample><programlisting>stock["my-stock-item"] = { { "itemltr.png", LTR, *, * }, { "itemrtl.png", RTL, *, * }}</programlisting></informalexample>This could be abbreviated as follows:<informalexample><programlisting>stock["my-stock-item"] = { { "itemltr.png", LTR }, { "itemrtl.png", RTL }}</programlisting></informalexample></para><para>You can specify custom icons for specific sizes, as follows:<informalexample><programlisting>stock["my-stock-item"] = { { "itemmenusize.png", *, *, "gtk-menu" }, { "itemtoolbarsize.png", *, *, "gtk-large-toolbar" } { "itemgeneric.png" } /* implicit *, *, * as a fallback */}</programlisting></informalexample>The sizes that come with GTK+ itself are <literal>"gtk-menu"</literal>,<literal>"gtk-small-toolbar"</literal>, <literal>"gtk-large-toolbar"</literal>,<literal>"gtk-button"</literal>, <literal>"gtk-dialog"</literal>. Applicationscan define other sizes.</para><para>It's also possible to use custom icons for a given state, for example:<informalexample><programlisting>stock["my-stock-item"] = { { "itemprelight.png", *, PRELIGHT }, { "iteminsensitive.png", *, INSENSITIVE }, { "itemgeneric.png" } /* implicit *, *, * as a fallback */}</programlisting></informalexample></para><para>When selecting an icon source to use, GTK+ will consider text direction mostimportant, state second, and size third. It will select the best match based onthose criteria. If an attribute matches exactly (e.g. you specified<literal>PRELIGHT</literal> or specified the size), GTK+ won't modify the image;if the attribute matches with a wildcard, GTK+ will scale or modify the image tomatch the state and size the user requested.</para></refsect2><refsect2><title>Key bindings</title><para>Key bindings allow the user to specify actions to be taken on particular key presses. The form of a bindingset declaration is:</para><informalexample><programlisting>binding <replaceable>name</replaceable> { bind <replaceable>key</replaceable> { <replaceable>signalname</replaceable> (<replaceable>param</replaceable>, ...) ... } ...}</programlisting></informalexample><para><replaceable>key</replaceable> is a string consisting of a series of modifiers followed by the name of a key. Themodifiers can be:<simplelist><member><literal><alt></literal></member><member><literal><control></literal></member><member><literal><mod1></literal></member><member><literal><mod2></literal></member><member><literal><mod3></literal></member><member><literal><mod4></literal></member><member><literal><mod5></literal></member><member><literal><release></literal></member><member><literal><shft></literal></member><member><literal><shift></literal></member></simplelist><literal><shft></literal> is an alias for <literal><shift></literal> and <literal><alt></literal> is an alias for<literal><mod1></literal>.</para><para>The action that is bound to the key is a sequenceof signal names (strings) followed by parameters for each signal. The signals must be action signals.(See g_signal_new()). Each parameter can bea float, integer, string, or unquoted stringrepresenting an enumeration value. The types ofthe parameters specified must match the types of the parameters of the signal.</para><para>Binding sets are connected to widgets in the same manner as styles, with one difference: Binding sets override other binding sets first by pattern type, then by priority and then by order of specification.The priorities that can be specified and their default values are the same as for styles.</para></refsect2><!-- ##### SECTION See_Also ##### --><para></para><!-- ##### SECTION Stability_Level ##### --><!-- ##### STRUCT GtkRcStyle ##### --><para>The #GtkRcStyle structure is used to represent a setof information about the appearance of a widget.This can later be composited together with other#GtkRcStyle structures to form a #GtkStyle.</para>@name: @bg_pixmap_name: @font_desc: @color_flags: @fg: @bg: @text: @base: @xthickness: @ythickness: <!-- ##### ENUM GtkRcFlags ##### --><para>The #GtkRcFlags enumeration is used as a bitmaskto specify which fields of a #GtkRcStyle have beenset for each state.</para>@GTK_RC_FG: If present, the foreground color has been set for this state.@GTK_RC_BG: If present, the background color has been set for this state.@GTK_RC_TEXT: If present, the text color has been set for this state.@GTK_RC_BASE: If present, the base color has been set for this state.<!-- ##### ENUM GtkRcTokenType ##### --><para>The #GtkRcTokenType enumeration represents the tokensin the RC file. It is exposed so that theme enginescan reuse these tokens when parsing the theme-enginespecific portions of a RC file.</para>@GTK_RC_TOKEN_INVALID: @GTK_RC_TOKEN_INCLUDE: @GTK_RC_TOKEN_NORMAL: @GTK_RC_TOKEN_ACTIVE: @GTK_RC_TOKEN_PRELIGHT: @GTK_RC_TOKEN_SELECTED: @GTK_RC_TOKEN_INSENSITIVE: @GTK_RC_TOKEN_FG: @GTK_RC_TOKEN_BG: @GTK_RC_TOKEN_TEXT: @GTK_RC_TOKEN_BASE: @GTK_RC_TOKEN_XTHICKNESS: @GTK_RC_TOKEN_YTHICKNESS: @GTK_RC_TOKEN_FONT: @GTK_RC_TOKEN_FONTSET: @GTK_RC_TOKEN_FONT_NAME: @GTK_RC_TOKEN_BG_PIXMAP: @GTK_RC_TOKEN_PIXMAP_PATH: @GTK_RC_TOKEN_STYLE: @GTK_RC_TOKEN_BINDING: @GTK_RC_TOKEN_BIND: @GTK_RC_TOKEN_WIDGET: @GTK_RC_TOKEN_WIDGET_CLASS: @GTK_RC_TOKEN_CLASS: @GTK_RC_TOKEN_LOWEST: @GTK_RC_TOKEN_GTK: @GTK_RC_TOKEN_APPLICATION: @GTK_RC_TOKEN_THEME: @GTK_RC_TOKEN_RC: @GTK_RC_TOKEN_HIGHEST: @GTK_RC_TOKEN_ENGINE: @GTK_RC_TOKEN_MODULE_PATH: @GTK_RC_TOKEN_IM_MODULE_PATH: @GTK_RC_TOKEN_IM_MODULE_FILE: @GTK_RC_TOKEN_STOCK: @GTK_RC_TOKEN_LTR: @GTK_RC_TOKEN_RTL: @GTK_RC_TOKEN_LAST: <!-- ##### FUNCTION gtk_rc_scanner_new ##### --><para></para>@Returns: <!-- ##### FUNCTION gtk_rc_get_style ##### --><para></para>@widget: @Returns: <!-- ##### FUNCTION gtk_rc_get_style_by_paths ##### --><para></para>@settings: @widget_path: @class_path: @type: @Returns: <!-- ##### FUNCTION gtk_rc_add_widget_name_style ##### --><para>Adds a #GtkRcStyle that will be looked up by a match againstthe widget's pathname. This is equivalent to a:<literal>widget PATTERN style STYLE</literal>statement in a RC file.</para>@rc_style: the #GtkRcStyle to use for widgets matching @pattern@pattern: the pattern<!-- ##### FUNCTION gtk_rc_add_widget_class_style ##### --><para>Adds a #GtkRcStyle that will be looked up by a match againstthe widget's class pathname. This is equivalent to a:<literal>widget_class PATTERN style STYLE</literal>statement in a RC file.</para>@rc_style: the #GtkRcStyle to use for widgets matching @pattern@pattern: the pattern<!-- ##### FUNCTION gtk_rc_add_class_style ##### --><para>Adds a #GtkRcStyle that will be looked up by a matching againstthe class hierarchy of the widget. This is equivalent to a:<literal>class PATTERN style STYLE</literal>statement in a RC file.</para>@rc_style: the #GtkRcStyle to use for widgets deriving from @pattern@pattern: the pattern<!-- ##### FUNCTION gtk_rc_parse ##### --><para>Parses a given resource file.</para>@filename: the filename of a file to parse. If @filename is not absolute, it is searched in the current directory.<!-- ##### FUNCTION gtk_rc_parse_string ##### --><para>Parses resource information directly from a string.</para>@rc_string: a string to parse.<!-- ##### FUNCTION gtk_rc_reparse_all ##### --><para></para>@Returns: <!-- ##### FUNCTION gtk_rc_reparse_all_for_settings ##### --><para></para>@settings: @force_load: @Returns: <!-- ##### FUNCTION gtk_rc_reset_styles ##### --><para></para>@settings: <!-- ##### FUNCTION gtk_rc_add_default_file ##### --><para></para>@filename: <!-- ##### FUNCTION gtk_rc_get_default_files ##### --><para></para>@Returns: <!-- ##### FUNCTION gtk_rc_set_default_files ##### --><para></para>@filenames: <!-- ##### FUNCTION gtk_rc_parse_color ##### --><para>Parses a color in the <link linkend="color-format">format</link> expected in a RC file.</para>@scanner: a #GtkScanner@color: a pointer to a #GtkColor structure in which to store the result@Returns: %G_TOKEN_NONE if parsing succeeded, otherwise the tokenthat was expected but not found.<!-- ##### FUNCTION gtk_rc_parse_state ##### --><para>Parses a #GtkStateType variable from the format expectedin a RC file.</para>@scanner: a #GtkScanner (must be initialized for parsing an RC file)@state: A pointer to a #GtkStateType variable in which tostore the result.@Returns: %G_TOKEN_NONE if parsing succeeded, otherwise the tokenthat was expected but not found.<!-- ##### FUNCTION gtk_rc_parse_priority ##### --><para>Parses a #GtkPathPriorityType variable from the format expectedin a RC file.</para>@scanner: a #GtkScanner (must be initialized for parsing an RC file)@priority: A pointer to #GtkPathPriorityType variable in whichto store the result.@Returns: %G_TOKEN_NONE if parsing succeeded, otherwise the tokenthat was expected but not found.<!-- ##### FUNCTION gtk_rc_find_module_in_path ##### --><para></para>@module_file: The name of the module to search for.@Returns: <!-- ##### FUNCTION gtk_rc_find_pixmap_in_path ##### --><para></para>@settings: @scanner: a #GtkScanner. Used for printing out warning messagesif the file is not found.@pixmap_file: The name of the file to search for.@Returns: The filename, if found (must be freed with g_free()),otherwise %NULL.<!-- # Unused Parameters # -->@context: <!-- ##### FUNCTION gtk_rc_get_module_dir ##### --><para></para>@Returns: <!-- ##### FUNCTION gtk_rc_get_im_module_path ##### --><para></para>@Returns: <!-- ##### FUNCTION gtk_rc_get_im_module_file ##### --><para></para>@Returns: <!-- ##### FUNCTION gtk_rc_get_theme_dir ##### --><para>Returns the standard directory in which themes shouldbe installed. (GTK+ does not actually use this directoryitself.)</para>@Returns: The directory (must be freed with g_free()).<!-- ##### FUNCTION gtk_rc_style_new ##### --><para>Creates a new #GtkRcStyle with no fields set anda reference count of 1.</para>@Returns: the newly-created #GtkRcStyle<!-- ##### FUNCTION gtk_rc_style_copy ##### --><para></para>@orig: @Returns: <!-- ##### FUNCTION gtk_rc_style_ref ##### --><para>Increments the reference count of a #GtkRcStyle.</para>@rc_style: a #GtkRcStyle<!-- ##### FUNCTION gtk_rc_style_unref ##### --><para>Decrements the reference count of a #GtkRcStyle andfrees if the result is 0.</para>@rc_style: a #GtkRcStyle
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -