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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sec-containers.html

?? gtk_text program sample&eg
?? HTML
?? 第 1 頁 / 共 4 頁
字號:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html>  <head>    <title>      Containers And Widget Layout    </title>    <meta name="GENERATOR" content=    "Modular DocBook HTML Stylesheet Version 1.45">    <link rel="HOME" title="GTK+ / Gnome Application Development"    href="ggad.html">    <link rel="UP" title="GTK+ Basics" href="cha-gtk.html">    <link rel="PREVIOUS" title="GTK+ Basics" href="cha-gtk.html">    <link rel="NEXT" title="Widget Concepts" href="z57.html">  </head>  <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink=   "#840084" alink="#0000FF">    <div class="NAVHEADER">      <table width="100%" border="0" bgcolor="#ffffff" cellpadding=       "1" cellspacing="0">        <tr>          <th colspan="4" align="center">            <font color="#000000" size="2">GTK+ / Gnome Application            Development</font>          </th>        </tr>        <tr>          <td width="25%" bgcolor="#ffffff" align="left">            <a href="cha-gtk.html"><font color="#0000ff" size="2">            <b>&lt;&lt;&lt; Previous</b></font></a>          </td>          <td width="25%" colspan="2" bgcolor="#ffffff" align=           "center">            <font color="#0000ff" size="2"><b><a href="ggad.html">            <font color="#0000ff" size="2"><b>            Home</b></font></a></b></font>          </td>          <td width="25%" bgcolor="#ffffff" align="right">            <a href="z57.html"><font color="#0000ff" size="2"><b>            Next &gt;&gt;&gt;</b></font></a>          </td>        </tr>      </table>    </div>    <div class="SECT1">      <h1 class="SECT1">        <a name="SEC-CONTAINERS">Containers And Widget Layout</a>      </h1>      <p>        There are two kinds of container widgets in GTK+. All of        them are subclasses of the abstract <tt class="CLASSNAME">        GtkContainer</tt>. The first type of container widget        always descends from <tt class="CLASSNAME">GtkBin</tt>,        another abstract base class. Descendents of <tt class=         "CLASSNAME">GtkBin</tt> can contain only one child widget;        these containers add some kind of functionality to the        child. For example, <tt class="CLASSNAME">GtkButton</tt> is        a <tt class="CLASSNAME">GtkBin</tt> which makes the child        into a clickable button. <tt class="CLASSNAME">        GtkFrame</tt> is a <tt class="CLASSNAME">GtkBin</tt> which        draws a relieved border around the child. <tt class=         "CLASSNAME">GtkWindow</tt> allows the child to appear in a        toplevel window.      </p>      <p>        The second type of container widget often has <tt class=         "CLASSNAME">GtkContainer</tt> as its immediate parent.        These containers can have more than one child, and their        purpose is to manage layout. "Manage layout" means that        these containers assign <i class="EMPHASIS">sizes</i> and        <i class="EMPHASIS">positions</i> to the widgets they        contain. For example, <tt class="CLASSNAME">GtkVBox</tt>        arranges its children in a vertical stack. <tt class=         "CLASSNAME">GtkFixed</tt> allows you to position children        at arbitrary coordinates. <tt class="CLASSNAME">        GtkPacker</tt> gives you Tk-style layout management.      </p>      <p>        This chapter is about the second kind of container. To        produce the layout you want without hard-coding any sizes,        you'll need to understand how to use these. The goal is to        avoid making assumptions about window size, screen size,        widget appearance, fonts, and so on. Your application        should automatically adapt if these factors change.      </p>      <div class="SECT2">        <h2 class="SECT2">          <a name="SEC-SIZENEGOTIATION">Size Allocation</a>        </h2>        <p>          To understand layout containers, you first have to          understand how GTK+ widgets negotiate their size. It's          quite simple really; there are only two concepts, <i          class="FIRSTTERM">requisition</i> and <i class=          "FIRSTTERM">allocation</i>. These correspond to the two          phases of layout.        </p>        <div class="SECT3">          <h3 class="SECT3">            <a name="Z47">Requisition</a>          </h3>          <p>            A widget's <i class="FIRSTTERM">requisition</i>            consists of a width and a height---the size the widget            would like to be. This is represented by a <span class=             "STRUCTNAME">GtkRequisition</span> struct:          </p>          <table border="0" bgcolor="#E0E0E0" width="100%">            <tr>              <td><pre class="PROGRAMLISTING">&#13;typedef struct _GtkRequisition    GtkRequisition;struct _GtkRequisition{  gint16 width;  gint16 height;};&#13;</pre>              </td>            </tr>          </table>          <p>            Different widgets choose what size to request in            different ways. <tt class="CLASSNAME">GtkLabel</tt>,            for example, requests enough size to display all the            text in the label. Most container widgets base their            size request on the size requests of their children.            For example, if you place several buttons in a box, the            box will ask to be large enough to hold all the            buttons.          </p>          <p>            The first phase of layout starts with a toplevel widget            such as <tt class="CLASSNAME">GtkWindow</tt>. Since            it's a container, <tt class="CLASSNAME">GtkWindow</tt>            asks its child widget for a size request; that child            might ask its own children; and so on recursively. When            all child widgets have been queried, <tt class=             "CLASSNAME">GtkWindow</tt> will finally get a <span            class="STRUCTNAME">GtkRequisition</span> back from its            child. Depending on how it was configured, <tt class=             "CLASSNAME">GtkWindow</tt> may or may not be able to            expand to accomodate the size request.          </p>        </div>        <div class="SECT3">          <h3 class="SECT3">            <a name="Z48">Allocation</a>          </h3>          <p>            Phase two of layout begins at this point. <tt class=             "CLASSNAME">GtkWindow</tt> makes a decision about how            much space is actually available for its child, and            communicates its decision to the child. This is known            as the child's <i class="FIRSTTERM">allocation</i>,            represented by the following struct:          </p>          <table border="0" bgcolor="#E0E0E0" width="100%">            <tr>              <td><pre class="PROGRAMLISTING">&#13;typedef struct _GtkAllocation     GtkAllocation;struct _GtkAllocation{  gint16 x;  gint16 y;  guint16 width;  guint16 height;};&#13;</pre>              </td>            </tr>          </table>          <p>            The <span class="STRUCTNAME">width</span> and <span            class="STRUCTNAME">height</span> elements are identical            to <span class="STRUCTNAME">GtkRequisition</span>; they            represent the size of the widget. A <span class=             "STRUCTNAME">GtkAllocation</span> also includes the            coordinates of the child with respect to its parent.            <span class="STRUCTNAME">GtkAllocation</span>s are            assigned to children by their parent container.          </p>          <p>            Widgets are required to honor the <span class=             "STRUCTNAME">GtkAllocation</span> given to them. <span            class="STRUCTNAME">GtkRequisition</span> is only a            request; widgets must be able to cope with any size.          </p>          <p>            Given the layout process, it's easy to see what role            containers play. Their job is to assemble each child's            requisition into a single requisition to be passed up            the widget tree; then to divide the allocation they            receive between their children. Exactly how this            happens depends on the particular container.          </p>        </div>      </div>      <div class="SECT2">        <h2 class="SECT2">          <a name="SEC-GTKBOX"><tt class="CLASSNAME">          GtkBox</tt></a>        </h2>        <p>          A <tt class="CLASSNAME">GtkBox</tt> manages a row (<tt          class="CLASSNAME">GtkHBox</tt>) or column (<tt class=           "CLASSNAME">GtkVBox</tt>) of widgets. For <tt class=           "CLASSNAME">GtkHBox</tt>, all the widgets are assigned          the same height; the box's job is to distribute the          available width between them. <tt class="CLASSNAME">          GtkHBox</tt> optionally uses some of the available width          to leave gaps (called "spacing") between widgets. <tt          class="CLASSNAME">GtkVBox</tt> is identical, but in the          opposite direction (i.e., it distributes available height          rather than width). <tt class="CLASSNAME">GtkBox</tt> is          an abstract base class; <tt class="CLASSNAME">          GtkVBox</tt> and <tt class="CLASSNAME">GtkHBox</tt> can          be used almost entirely via its interface. Boxes are the          most useful container widget.        </p>        <p>          To create a <tt class="CLASSNAME">GtkBox</tt>, you use          one of the constructors shown in <a href=           "sec-containers.html#FL-HBOXCONSTRUCT">Figure 2</a> and          <a href="sec-containers.html#FL-VBOXCONSTRUCT">Figure          3</a>. The box constructor functions take two parameters.          If <span class="STRUCTNAME">TRUE</span>, <span class=           "STRUCTNAME">homogeneous</span> means that all children          of the box will be allocated the same amount of space.          <span class="STRUCTNAME">spacing</span> specifies the          amount of space between each child. There are functions          to change spacing and toggle homogeneity after the box is          created.        </p>        <div class="FIGURE">          <a name="FL-HBOXCONSTRUCT"></a>          <div class="FUNCSYNOPSIS">            <a name="FL-HBOXCONSTRUCT.SYNOPSIS"></a>            <table border="0" bgcolor="#E0E0E0" width="100%">              <tr>                <td><pre class="FUNCSYNOPSISINFO">#include &lt;gtk/gtkhbox.h&gt;</pre>                </td>              </tr>            </table>            <p>              <code><code class="FUNCDEF">GtkWidget* <tt class=               "FUNCTION">gtk_hbox_new</tt></code>(gboolean <tt              class="PARAMETER"><i>homogeneous</i></tt>, gint <tt              class="PARAMETER"><i>spacing</i></tt>);</code>            </p>          </div>          <p>            <b>Figure 2. <tt class="CLASSNAME">GtkHBox</tt>            Constructor</b>          </p>        </div>        <div class="FIGURE">          <a name="FL-VBOXCONSTRUCT"></a>          <div class="FUNCSYNOPSIS">            <a name="FL-VBOXCONSTRUCT.SYNOPSIS"></a>            <table border="0" bgcolor="#E0E0E0" width="100%">              <tr>                <td><pre class="FUNCSYNOPSISINFO">#include &lt;gtk/gtkvbox.h&gt;</pre>                </td>              </tr>            </table>            <p>              <code><code class="FUNCDEF">GtkWidget* <tt class=               "FUNCTION">gtk_vbox_new</tt></code>(gboolean <tt              class="PARAMETER"><i>homogeneous</i></tt>, gint <tt              class="PARAMETER"><i>spacing</i></tt>);</code>            </p>          </div>          <p>            <b>Figure 3. <tt class="CLASSNAME">GtkVBox</tt>            Constructor</b>          </p>        </div>        <p>          There are two basic functions to add a child to a <tt          class="CLASSNAME">GtkBox</tt>; they are shown in <a href=           "sec-containers.html#FL-BOXPACK">Figure 4</a>.        </p>        <div class="FIGURE">          <a name="FL-BOXPACK"></a>          <div class="FUNCSYNOPSIS">            <a name="FL-BOXPACK.SYNOPSIS"></a>            <table border="0" bgcolor="#E0E0E0" width="100%">              <tr>                <td><pre class="FUNCSYNOPSISINFO">#include &lt;gtk/gtkbox.h&gt;</pre>                </td>              </tr>            </table>            <p>              <code><code class="FUNCDEF">void <tt class=              "FUNCTION">gtk_box_pack_start</tt></code>(GtkBox* <tt              class="PARAMETER"><i>box</i></tt>, GtkWidget* <tt              class="PARAMETER"><i>child</i></tt>, gboolean <tt              class="PARAMETER"><i>expand</i></tt>, gboolean <tt              class="PARAMETER"><i>fill</i></tt>, gint <tt class=               "PARAMETER"><i>padding</i></tt>);</code>            </p>            <p>              <code><code class="FUNCDEF">void <tt class=              "FUNCTION">gtk_box_pack_end</tt></code>(GtkBox* <tt              class="PARAMETER"><i>box</i></tt>, GtkWidget* <tt              class="PARAMETER"><i>child</i></tt>, gboolean <tt              class="PARAMETER"><i>expand</i></tt>, gboolean <tt              class="PARAMETER"><i>fill</i></tt>, gint <tt class=               "PARAMETER"><i>padding</i></tt>);</code>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧洲国产专区| 日本欧美在线观看| 日本不卡视频一二三区| 高清不卡一二三区| 日韩欧美123| 亚洲一区二区三区小说| 国产精品 日产精品 欧美精品| 色欧美乱欧美15图片| 国产欧美日韩亚州综合| 日本欧美在线看| 欧美午夜不卡在线观看免费| 中文字幕巨乱亚洲| 久久精品国产精品亚洲红杏| 欧美精品三级在线观看| 国产精品传媒视频| 国产激情视频一区二区在线观看 | 五月综合激情婷婷六月色窝| 国产99久久精品| 久久亚洲免费视频| 蜜臀91精品一区二区三区| 欧美性色黄大片手机版| 亚洲视频在线一区观看| 成人激情黄色小说| 国产精品美女一区二区| 国产精品一区二区三区网站| 精品黑人一区二区三区久久| 久色婷婷小香蕉久久| 欧美精品粉嫩高潮一区二区| 一区二区三区精品| 欧美日韩免费观看一区三区| 亚洲精品一二三区| 色天使久久综合网天天| 亚洲国产另类av| 欧美视频在线一区二区三区 | 7777精品伊人久久久大香线蕉的 | 国产精品网站在线播放| 国产一区二区在线观看免费| 欧美mv日韩mv| 国产美女在线观看一区| 国产欧美一区二区三区在线看蜜臀| 国产一区二区看久久| 欧美激情一区二区三区在线| 国产精品1区2区3区| 欧美激情一区二区| 色88888久久久久久影院野外| 亚洲综合一区二区| 91麻豆精品国产综合久久久久久| 美日韩一区二区三区| 精品少妇一区二区三区在线视频| 精品一二线国产| 国产精品三级电影| 色婷婷一区二区三区四区| 视频在线观看国产精品| 精品国产髙清在线看国产毛片| 捆绑变态av一区二区三区| 国产精品女同互慰在线看| 色综合久久久久综合体桃花网| 亚洲超碰精品一区二区| 日韩你懂的在线观看| 国产精品一区二区在线观看不卡| 1024精品合集| 91精品国产91久久久久久最新毛片 | 一区在线观看免费| 欧美日韩在线播放三区| 精品一区二区久久久| 最新热久久免费视频| 欧美日韩国产区一| 成人高清在线视频| 午夜av电影一区| 国产精品九色蝌蚪自拍| 91精品国产一区二区三区| 国产高清精品网站| 日本 国产 欧美色综合| 国产精品久久久久精k8| 制服.丝袜.亚洲.另类.中文| 成人性生交大片免费看视频在线| 亚洲成人动漫在线免费观看| 国产午夜精品一区二区| 欧美精品丝袜中出| 不卡视频一二三| 久久精品国产精品青草| 亚洲黄色av一区| 欧美激情一区二区三区不卡 | 欧美日韩免费一区二区三区视频| 国产v日产∨综合v精品视频| 三级欧美韩日大片在线看| 中文在线一区二区| 日韩视频国产视频| 色久综合一二码| 国产91丝袜在线播放0| 秋霞影院一区二区| 一区二区三区免费网站| 国产日韩一级二级三级| 欧美一区二区在线看| 色网综合在线观看| 成人免费视频一区| 久久国产尿小便嘘嘘尿| 亚洲va国产天堂va久久en| 亚洲欧美偷拍另类a∨色屁股| 久久久99久久| 欧美成人a在线| 欧美一区二区视频在线观看2020 | 91日韩一区二区三区| 极品少妇一区二区三区精品视频 | 欧美日韩国产在线播放网站| 99久久精品国产导航| 成人毛片老司机大片| 国产老肥熟一区二区三区| 奇米亚洲午夜久久精品| 日韩va亚洲va欧美va久久| 亚洲国产一区二区三区| 亚洲一区在线观看视频| 一区二区三区在线视频免费观看| 亚洲国产高清aⅴ视频| 久久久亚洲午夜电影| 久久精品一区二区三区不卡| 久久久99久久精品欧美| 久久久精品免费网站| 国产亚洲成aⅴ人片在线观看| 久久日韩精品一区二区五区| 久久午夜电影网| 国产日韩欧美a| 最新不卡av在线| 夜夜揉揉日日人人青青一国产精品| 亚洲精品视频在线| 亚洲国产成人av网| 蜜桃av一区二区在线观看 | 一区二区三区四区不卡在线| 亚洲黄一区二区三区| 天天射综合影视| 久久精品国产**网站演员| 91蝌蚪国产九色| 91精品1区2区| 欧美日产在线观看| 欧美一卡二卡在线| 精品国产一区二区国模嫣然| 亚洲精品一区二区三区影院| 国产欧美一区二区精品仙草咪| 欧美国产精品专区| 一区二区三区日韩欧美精品| 午夜在线成人av| 国产在线精品免费av| 不卡欧美aaaaa| 91超碰这里只有精品国产| 久久午夜免费电影| 亚洲综合视频在线观看| 免费的成人av| 9久草视频在线视频精品| 欧美日韩久久一区| 久久奇米777| 亚洲最新视频在线播放| 美腿丝袜亚洲三区| 色综合久久中文字幕| 欧美一级片在线| 亚洲欧美激情视频在线观看一区二区三区 | 日本福利一区二区| 精品电影一区二区三区| 中文字幕一区二区三区在线不卡 | 欧美不卡123| 一区二区三区四区国产精品| 国产综合久久久久影院| 91久久国产最好的精华液| 精品国产凹凸成av人导航| 亚洲视频在线观看三级| 国产一区二区三区在线看麻豆| 一本久久精品一区二区| 久久精品视频免费观看| 亚洲国产日韩精品| 国产激情精品久久久第一区二区| 欧美综合久久久| 中文字幕高清一区| 极品美女销魂一区二区三区 | 日韩综合一区二区| 99久久精品国产麻豆演员表| 亚洲精品在线电影| 日韩电影在线观看一区| 99视频精品全部免费在线| 久久综合中文字幕| 丝袜美腿亚洲一区| 色拍拍在线精品视频8848| 国产欧美日韩精品一区| 久久99久久99小草精品免视看| 欧美午夜一区二区三区| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 日韩一区二区视频| 亚洲高清免费视频| 在线观看成人小视频| 亚洲精品午夜久久久| 9久草视频在线视频精品| 国产精品免费视频一区| 国产一区二区免费在线| 久久久亚洲欧洲日产国码αv| 久久精品99久久久| 日韩欧美国产系列| 韩国av一区二区三区在线观看| 精品少妇一区二区三区视频免付费 | 五月婷婷综合网| 欧美色视频在线观看| 亚洲国产日韩一级| 欧美精品一二三|