亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? gtk_tut-21.html

?? GTK development guide
?? HTML
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.7">
 <TITLE>GTK v1.2 Tutorial: GTK's rc Files </TITLE>
 <LINK HREF="gtk_tut-22.html" REL=next>
 <LINK HREF="gtk_tut-20.html" REL=previous>
 <LINK HREF="gtk_tut.html#toc21" REL=contents>
</HEAD>
<BODY TEXT="#CCCCCC" BGCOLOR="#000000" LINK="#33cc00" VLINK="#009900" ALINK="#FF0000">
<A HREF="gtk_tut-22.html">Next</A>
<A HREF="gtk_tut-20.html">Previous</A>
<A HREF="gtk_tut.html#toc21">Contents</A>
<HR>
<H2><A NAME="sec_gtkrc_files"></A> <A NAME="s21">21. GTK's rc Files </A></H2>

<P>GTK has its own way of dealing with application defaults, by using rc
files. These can be used to set the colors of just about any widget, and
can also be used to tile pixmaps onto the background of some widgets.  
<P>
<H2><A NAME="ss21.1">21.1 Functions For rc Files </A>
</H2>

<P>When your application starts, you should include a call to:
<P>
<BLOCKQUOTE><CODE>
<PRE>
void gtk_rc_parse( char *filename );
</PRE>
</CODE></BLOCKQUOTE>
<P>Passing in the filename of your rc file. This will cause GTK to parse
this file, and use the style settings for the widget types defined
there.
<P>If you wish to have a special set of widgets that can take on a
different style from others, or any other logical division of widgets,
use a call to:
<P>
<BLOCKQUOTE><CODE>
<PRE>
void gtk_widget_set_name( GtkWidget *widget,
                          gchar     *name );
</PRE>
</CODE></BLOCKQUOTE>
<P>Passing your newly created widget as the first argument, and the name
you wish to give it as the second. This will allow you to change the
attributes of this widget by name through the rc file.
<P>If we use a call something like this:
<P>
<BLOCKQUOTE><CODE>
<PRE>
button = gtk_button_new_with_label ("Special Button");
gtk_widget_set_name (button, "special button");
</PRE>
</CODE></BLOCKQUOTE>
<P>Then this button is given the name "special button" and may be addressed by
name in the rc file as "special button.GtkButton".  [&lt;--- Verify ME!]
<P>The example rc file below, sets the properties of the main window, and lets
all children of that main window inherit the style described by the "main
button" style.  The code used in the application is:
<P>
<BLOCKQUOTE><CODE>
<PRE>
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_widget_set_name (window, "main window");
</PRE>
</CODE></BLOCKQUOTE>
<P>And then the style is defined in the rc file using:
<P>
<BLOCKQUOTE><CODE>
<PRE>
widget "main window.*GtkButton*" style "main_button"
</PRE>
</CODE></BLOCKQUOTE>
<P>Which sets all the Button widgets in the "main window" to the
"main_buttons" style as defined in the rc file.
<P>As you can see, this is a fairly powerful and flexible system.  Use your
imagination as to how best to take advantage of this.
<P>
<H2><A NAME="ss21.2">21.2 GTK's rc File Format</A>
</H2>

<P>The format of the GTK file is illustrated in the example below. This is
the testgtkrc file from the GTK distribution, but I've added a
few comments and things. You may wish to include this explanation in
your application to allow the user to fine tune his application.
<P>There are several directives to change the attributes of a widget.
<P>
<UL>
<LI>fg - Sets the foreground color of a widget.</LI>
<LI>bg - Sets the background color of a widget.</LI>
<LI>bg_pixmap - Sets the background of a widget to a tiled pixmap.</LI>
<LI>font - Sets the font to be used with the given widget.</LI>
</UL>
<P>In addition to this, there are several states a widget can be in, and you
can set different colors, pixmaps and fonts for each state. These states are:
<P>
<UL>
<LI>NORMAL - The normal state of a widget, without the mouse over top of
it, and not being pressed, etc.</LI>
<LI>PRELIGHT - When the mouse is over top of the widget, colors defined
using this state will be in effect.</LI>
<LI>ACTIVE - When the widget is pressed or clicked it will be active, and
the attributes assigned by this tag will be in effect.</LI>
<LI>INSENSITIVE - When a widget is set insensitive, and cannot be
activated, it will take these attributes.</LI>
<LI>SELECTED - When an object is selected, it takes these attributes.</LI>
</UL>
<P>When using the "fg" and "bg" keywords to set the colors of widgets, the
format is:
<P>
<BLOCKQUOTE><CODE>
<PRE>
fg[&lt;STATE>] = { Red, Green, Blue }
</PRE>
</CODE></BLOCKQUOTE>
<P>Where STATE is one of the above states (PRELIGHT, ACTIVE, etc), and the Red,
Green and Blue are values in the range of 0 - 1.0,  { 1.0, 1.0, 1.0 } being
white. They must be in float form, or they will register as 0, so a straight 
"1" will not work, it must be "1.0".  A straight "0" is fine because it 
doesn't matter if it's not recognized.  Unrecognized values are set to 0.
<P>bg_pixmap is very similar to the above, except the colors are replaced by a
filename.
<P>pixmap_path is a list of paths separated by ":"'s.  These paths will be
searched for any pixmap you specify.
<P>The font directive is simply:
<BLOCKQUOTE><CODE>
<PRE>
font = "&lt;font name>"
</PRE>
</CODE></BLOCKQUOTE>
<P>The only hard part is figuring out the font string. Using xfontsel or
a similar utility should help.
<P>The "widget_class" sets the style of a class of widgets. These classes are
listed in the widget overview on the class hierarchy.
<P>The "widget" directive sets a specifically named set of widgets to a
given style, overriding any style set for the given widget class.
These widgets are registered inside the application using the
gtk_widget_set_name() call. This allows you to specify the attributes of a
widget on a per widget basis, rather than setting the attributes of an
entire widget class. I urge you to document any of these special widgets so
users may customize them.
<P>When the keyword <CODE>parent</CODE> is used as an attribute, the widget will take on
the attributes of its parent in the application.
<P>When defining a style, you may assign the attributes of a previously defined
style to this new one.
<P>
<BLOCKQUOTE><CODE>
<PRE>
style "main_button" = "button"
{
  font = "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*"
  bg[PRELIGHT] = { 0.75, 0, 0 }
}
</PRE>
</CODE></BLOCKQUOTE>
<P>This example takes the "button" style, and creates a new "main_button" style
simply by changing the font and prelight background color of the "button"
style.
<P>Of course, many of these attributes don't apply to all widgets. It's a
simple matter of common sense really. Anything that could apply, should.
<P>
<H2><A NAME="ss21.3">21.3 Example rc file</A>
</H2>

<P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
# pixmap_path "&lt;dir 1>:&lt;dir 2>:&lt;dir 3>:..."
#
pixmap_path "/usr/include/X11R6/pixmaps:/home/imain/pixmaps"
#
# style &lt;name> [= &lt;name>]
# {
#   &lt;option>
# }
#
# widget &lt;widget_set> style &lt;style_name>
# widget_class &lt;widget_class_set> style &lt;style_name>


# Here is a list of all the possible states.  Note that some do not apply to
# certain widgets.
#
# NORMAL - The normal state of a widget, without the mouse over top of
# it, and not being pressed, etc.
#
# PRELIGHT - When the mouse is over top of the widget, colors defined
# using this state will be in effect.
#
# ACTIVE - When the widget is pressed or clicked it will be active, and
# the attributes assigned by this tag will be in effect.
#
# INSENSITIVE - When a widget is set insensitive, and cannot be
# activated, it will take these attributes.
#
# SELECTED - When an object is selected, it takes these attributes.
#
# Given these states, we can set the attributes of the widgets in each of
# these states using the following directives.
#
# fg - Sets the foreground color of a widget.
# fg - Sets the background color of a widget.
# bg_pixmap - Sets the background of a widget to a tiled pixmap.
# font - Sets the font to be used with the given widget.
#

# This sets a style called "button".  The name is not really important, as
# it is assigned to the actual widgets at the bottom of the file.

style "window"
{
  #This sets the padding around the window to the pixmap specified.
  #bg_pixmap[&lt;STATE>] = "&lt;pixmap filename>"
  bg_pixmap[NORMAL] = "warning.xpm"
}

style "scale"
{
  #Sets the foreground color (font color) to red when in the "NORMAL"
  #state.
  
  fg[NORMAL] = { 1.0, 0, 0 }
  
  #Sets the background pixmap of this widget to that of its parent.
  bg_pixmap[NORMAL] = "&lt;parent>"
}

style "button"
{
  # This shows all the possible states for a button.  The only one that
  # doesn't apply is the SELECTED state.
  
  fg[PRELIGHT] = { 0, 1.0, 1.0 }
  bg[PRELIGHT] = { 0, 0, 1.0 }
  bg[ACTIVE] = { 1.0, 0, 0 }
  fg[ACTIVE] = { 0, 1.0, 0 }
  bg[NORMAL] = { 1.0, 1.0, 0 }
  fg[NORMAL] = { .99, 0, .99 }
  bg[INSENSITIVE] = { 1.0, 1.0, 1.0 }
  fg[INSENSITIVE] = { 1.0, 0, 1.0 }
}

# In this example, we inherit the attributes of the "button" style and then
# override the font and background color when prelit to create a new
# "main_button" style.

style "main_button" = "button"
{
  font = "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*"
  bg[PRELIGHT] = { 0.75, 0, 0 }
}

style "toggle_button" = "button"
{
  fg[NORMAL] = { 1.0, 0, 0 }
  fg[ACTIVE] = { 1.0, 0, 0 }
  
  # This sets the background pixmap of the toggle_button to that of its
  # parent widget (as defined in the application).
  bg_pixmap[NORMAL] = "&lt;parent>"
}

style "text"
{
  bg_pixmap[NORMAL] = "marble.xpm"
  fg[NORMAL] = { 1.0, 1.0, 1.0 }
}

style "ruler"
{
  font = "-adobe-helvetica-medium-r-normal--*-80-*-*-*-*-*-*"
}

# pixmap_path "~/.pixmaps"

# These set the widget types to use the styles defined above.
# The widget types are listed in the class hierarchy, but could probably be
# just listed in this document for the users reference.

widget_class "GtkWindow" style "window"
widget_class "GtkDialog" style "window"
widget_class "GtkFileSelection" style "window"
widget_class "*Gtk*Scale" style "scale"
widget_class "*GtkCheckButton*" style "toggle_button"
widget_class "*GtkRadioButton*" style "toggle_button"
widget_class "*GtkButton*" style "button"
widget_class "*Ruler" style "ruler"
widget_class "*GtkText" style "text"

# This sets all the buttons that are children of the "main window" to
# the main_button style.  These must be documented to be taken advantage of.
widget "main window.*GtkButton*" style "main_button"
</PRE>
</CODE></BLOCKQUOTE>
<P>
<HR>
<A HREF="gtk_tut-22.html">Next</A>
<A HREF="gtk_tut-20.html">Previous</A>
<A HREF="gtk_tut.html#toc21">Contents</A>
</BODY>
</HTML>

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产午夜亚洲精品理论片色戒| 风间由美中文字幕在线看视频国产欧美| 日本在线播放一区二区三区| 免费在线观看一区| 国产91富婆露脸刺激对白| 91片在线免费观看| 欧美一区二区三区视频免费 | 亚洲欧美韩国综合色| 亚洲国产视频直播| 国产一区二区主播在线| 成人黄色在线看| 欧美久久一区二区| 国产嫩草影院久久久久| 亚洲bt欧美bt精品777| 国产成人免费视频精品含羞草妖精 | 欧美色综合网站| 精品国产伦一区二区三区免费| 亚洲欧美自拍偷拍| 日韩国产精品91| 成人涩涩免费视频| 91精品国产色综合久久不卡蜜臀| 中文在线免费一区三区高中清不卡| 亚洲一区二区三区四区的| 国产一区二区三区精品视频| 在线观看亚洲一区| 中国色在线观看另类| 另类综合日韩欧美亚洲| 色94色欧美sute亚洲线路二| 久久久久国产一区二区三区四区| 亚洲影视在线观看| 成人免费视频视频| 精品久久久久久亚洲综合网| 一区二区三区产品免费精品久久75| 黑人精品欧美一区二区蜜桃| 欧美日韩国产首页在线观看| 国产精品美女久久久久久2018| 美女视频黄免费的久久 | 亚洲第一激情av| 99久久国产综合精品女不卡 | 丁香一区二区三区| 日韩一级片网站| 亚洲一区二区五区| 91影院在线免费观看| 久久久久国产免费免费| 麻豆精品精品国产自在97香蕉 | 日韩主播视频在线| 一本大道久久a久久综合婷婷| 亚洲精品一区二区三区影院| 亚洲一卡二卡三卡四卡无卡久久| 波多野结衣在线一区| 久久婷婷一区二区三区| 男女男精品视频网| 在线成人免费观看| 亚洲午夜日本在线观看| av在线不卡电影| 国产欧美日韩综合精品一区二区| 久久99在线观看| 欧美一级视频精品观看| 日韩高清不卡在线| 在线不卡a资源高清| 亚洲国产欧美在线| 欧美又粗又大又爽| 亚洲宅男天堂在线观看无病毒| 成人午夜看片网址| 欧美国产精品中文字幕| 大尺度一区二区| 国产精品午夜电影| www.亚洲国产| 亚洲欧洲av在线| 99精品国产视频| 亚洲欧美日韩在线播放| 色综合色综合色综合色综合色综合 | 秋霞电影一区二区| 5566中文字幕一区二区电影| 日韩经典一区二区| 欧美一区二区观看视频| 久久精品99国产精品日本| 日韩写真欧美这视频| 老汉av免费一区二区三区| 精品国产精品网麻豆系列| 久久精工是国产品牌吗| 久久久久久免费毛片精品| 国产传媒久久文化传媒| 中文字幕免费一区| 成人国产一区二区三区精品| 亚洲色图视频网站| 色婷婷综合久久久中文一区二区 | 欧美一卡2卡三卡4卡5免费| 日韩av中文在线观看| 日韩欧美中文字幕公布| 国产毛片精品一区| 18成人在线观看| 欧美专区在线观看一区| 毛片一区二区三区| 国产三级精品三级| 一本到三区不卡视频| 视频在线在亚洲| 久久久亚洲国产美女国产盗摄 | 亚洲欧美日韩国产一区二区三区| 91黄色免费网站| 三级欧美韩日大片在线看| 欧美mv和日韩mv国产网站| 国产成人精品免费看| 亚洲一区在线观看免费| 欧美大片日本大片免费观看| 成人综合激情网| 亚洲一区二区三区三| 精品久久久久一区二区国产| 成人av在线观| 天天影视网天天综合色在线播放| 欧美精品一区二区久久婷婷| 99精品国产99久久久久久白柏| 午夜国产不卡在线观看视频| 久久婷婷国产综合国色天香| 91麻豆精东视频| 美女www一区二区| 自拍av一区二区三区| 欧美一区二区三区四区五区| 成人av午夜电影| 天天亚洲美女在线视频| 欧美激情一区二区三区在线| 欧美日韩在线播放一区| 国产美女精品在线| 午夜精品久久久久久久| 久久精品夜色噜噜亚洲aⅴ| 在线亚洲人成电影网站色www| 久久精品99久久久| 亚洲综合在线电影| 国产色一区二区| 欧美久久久久久久久久| av在线免费不卡| 国内精品第一页| 亚洲一区二区三区四区五区中文| 国产网站一区二区| 欧美一区二区三区在线看| 色婷婷综合久久久久中文| 国产精品一二三四五| 午夜视频在线观看一区| 国产精品美女久久久久久久| 日韩一级二级三级| 欧美在线视频全部完| 国产不卡在线视频| 日本网站在线观看一区二区三区| 日本一区二区三区免费乱视频| 欧美久久久久久久久久| 91免费看片在线观看| 国产精一区二区三区| 日日摸夜夜添夜夜添国产精品| 亚洲欧美日韩国产综合在线| 国产日韩欧美a| 日韩一二三区不卡| 欧美情侣在线播放| 91久久线看在观草草青青| 国产宾馆实践打屁股91| 久久精品国产精品亚洲综合| 亚洲va欧美va人人爽午夜| 亚洲美女在线一区| 中文字幕一区视频| 国产午夜精品一区二区三区视频 | 久久成人麻豆午夜电影| 日本女人一区二区三区| 亚洲国产视频一区| 亚洲免费观看高清在线观看| 国产精品电影一区二区| 国产亚洲福利社区一区| 精品国产伦一区二区三区观看方式| 欧美精选午夜久久久乱码6080| 91论坛在线播放| av高清久久久| 成人精品高清在线| 福利一区二区在线| 国产99久久久国产精品潘金| 国产最新精品精品你懂的| 久久精品国产一区二区三 | 日韩午夜在线观看视频| 欧美乱熟臀69xxxxxx| 欧美日韩免费观看一区二区三区 | 亚洲成人你懂的| 亚洲国产一区二区在线播放| 亚洲愉拍自拍另类高清精品| 亚洲最大色网站| 亚洲成av人片在www色猫咪| 亚洲一区二区在线观看视频 | 日韩欧美亚洲一区二区| 日韩一区二区在线观看视频| 91麻豆精品国产无毒不卡在线观看 | 国产精品―色哟哟| 18欧美乱大交hd1984| 亚洲理论在线观看| 亚洲国产精品一区二区久久恐怖片| 亚洲女同ⅹxx女同tv| 亚洲小说春色综合另类电影| 亚洲地区一二三色| 日韩av电影免费观看高清完整版 | 欧美sm极限捆绑bd| 国产亚洲一区二区在线观看| 国产无人区一区二区三区| 国产精品成人一区二区三区夜夜夜| 国产精品福利电影一区二区三区四区| 亚洲欧美一区二区视频|