亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
欧美一区二区高清| 激情五月激情综合网| 处破女av一区二区| 国产精品家庭影院| 色拍拍在线精品视频8848| 视频一区在线播放| 久久你懂得1024| 91精彩视频在线观看| 亚洲va欧美va天堂v国产综合| 欧美一个色资源| 国产一区激情在线| 一级做a爱片久久| 久久综合网色—综合色88| 91在线一区二区三区| 精品一区在线看| 亚洲大片精品永久免费| 亚洲国产高清aⅴ视频| 日韩精品一区二区三区蜜臀| 91免费在线看| 成人教育av在线| 国模套图日韩精品一区二区 | 欧美二区三区91| 99re热这里只有精品视频| 亚洲一区二区三区四区的| 91麻豆国产精品久久| 亚洲电影激情视频网站| 亚洲欧美日韩在线播放| 欧美国产视频在线| 欧美精品一区二区三区一线天视频 | 精品视频1区2区3区| 色88888久久久久久影院按摩| 国产白丝网站精品污在线入口| 玖玖九九国产精品| 国产美女在线精品| 国产69精品久久久久毛片| 国产成人免费视频一区| 国产sm精品调教视频网站| 国产一区二区三区| 成人黄动漫网站免费app| www.日韩av| 欧美丝袜第三区| 精品日韩欧美一区二区| 国产欧美一区视频| 亚洲视频在线观看三级| 日欧美一区二区| 国产激情精品久久久第一区二区| 国产精品伊人色| 日本道免费精品一区二区三区| 欧美少妇xxx| 久久久久久99久久久精品网站| 亚洲天堂av一区| 麻豆一区二区三区| 91视频免费观看| 欧美sm美女调教| 亚洲一区二区三区小说| 国产91色综合久久免费分享| 在线观看中文字幕不卡| 欧美不卡123| 婷婷综合另类小说色区| 成人一区二区三区中文字幕| 欧美日本国产一区| 一区二区三区**美女毛片| 国产精品99久久久| 欧美一区二区精品在线| 亚洲最色的网站| 色999日韩国产欧美一区二区| 久久丝袜美腿综合| 国产资源在线一区| 久久综合久久综合九色| 日日夜夜精品免费视频| 色狠狠综合天天综合综合| 1区2区3区欧美| 成人av在线播放网站| 亚洲欧洲在线观看av| 成人黄色在线看| 中文字幕在线一区二区三区| 国产精品香蕉一区二区三区| 久久精品在这里| 国产精品亚洲第一区在线暖暖韩国| xnxx国产精品| 99久久国产综合精品麻豆| 成人免费一区二区三区视频| 欧美最新大片在线看| 五月婷婷激情综合| 久久久一区二区三区| av一本久道久久综合久久鬼色| 亚洲美女区一区| 欧美电影免费观看高清完整版在线| 久久精品99久久久| 国产精品卡一卡二| 国产精品婷婷午夜在线观看| 亚洲韩国精品一区| 久久中文娱乐网| 色琪琪一区二区三区亚洲区| 国产一区不卡视频| 亚洲视频一区二区免费在线观看| 色综合久久久久综合体桃花网| 日韩电影在线一区二区三区| 欧美高清在线视频| 日韩欧美久久久| 欧美日韩在线一区二区| 不卡电影一区二区三区| 久久机这里只有精品| 亚洲一区在线视频| 中文字幕一区二区三区在线不卡| 欧美一级黄色片| 欧美人成免费网站| 在线免费视频一区二区| 国产91精品久久久久久久网曝门 | 91精品国产aⅴ一区二区| 99re8在线精品视频免费播放| 韩国av一区二区三区在线观看| 午夜视黄欧洲亚洲| 日韩av在线发布| 老司机一区二区| 久久99久久精品| 丁香五精品蜜臀久久久久99网站| 久久99国产精品尤物| 国产福利一区二区三区视频| 国产一区二区精品久久91| 国产又黄又大久久| www.一区二区| 欧美写真视频网站| 欧美白人最猛性xxxxx69交| 精品国内二区三区| 国产欧美一区二区精品婷婷| 中文字幕一区二区三区视频| 一区二区三区91| 久久91精品国产91久久小草| 波多野结衣的一区二区三区| 91国模大尺度私拍在线视频| 日韩一区二区在线观看| 椎名由奈av一区二区三区| 亚洲一线二线三线久久久| 免费人成在线不卡| 91美女在线视频| 国产夜色精品一区二区av| 亚洲国产精品麻豆| 韩国v欧美v日本v亚洲v| 欧美最新大片在线看| 久久久精品人体av艺术| 欧美高清在线视频| 婷婷一区二区三区| 99久久伊人精品| 国产欧美精品在线观看| 日韩av在线发布| 欧美日韩一区二区欧美激情| 亚洲日本丝袜连裤袜办公室| 国产精品中文字幕日韩精品| 制服丝袜国产精品| 日韩精品一二区| 777精品伊人久久久久大香线蕉| 亚洲日本一区二区三区| 成人激情黄色小说| 国产精品婷婷午夜在线观看| 国产91精品露脸国语对白| 欧美mv日韩mv| 国产高清精品久久久久| 欧美精品一区二区三区在线| 国产中文字幕精品| 国产精品无码永久免费888| 粉嫩在线一区二区三区视频| 久久精品免费在线观看| 不卡大黄网站免费看| 亚洲乱码国产乱码精品精98午夜 | 国产在线视视频有精品| 精品久久久久久久一区二区蜜臀| 亚洲一二三四区| 91精品国产91久久久久久一区二区| 日日欢夜夜爽一区| 久久久不卡网国产精品二区| 99久久综合精品| 美日韩一区二区三区| 日韩欧美不卡在线观看视频| 五月激情综合网| 国产视频视频一区| 欧美日韩精品一区二区天天拍小说| 久久 天天综合| 亚洲午夜免费福利视频| 国产亚洲精品资源在线26u| 在线观看日韩电影| 国产激情一区二区三区| 日韩电影在线免费看| 亚洲精品欧美在线| 久久综合色播五月| 日韩视频一区二区三区在线播放| 国产经典欧美精品| 蜜乳av一区二区| 亚洲成av人影院| 夜夜揉揉日日人人青青一国产精品| 精品免费99久久| 日韩午夜激情av| 欧美日韩视频在线第一区 | 久久精品视频在线免费观看| 欧美图区在线视频| 欧美在线视频日韩| 91免费观看在线| 99精品一区二区| 国产精品99久久久久久久vr| 国产精品一品二品|