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

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

?? sec-widgetindetail.html

?? gtk_text program sample&eg
?? HTML
?? 第 1 頁 / 共 4 頁
字號:
        <p>          As you might expect, the <span class="STRUCTNAME">          unrealize</span> method reverses a widget's realization,          freeing the resources created in <span class=          "STRUCTNAME">realize</span>. The default unrealize method          is appropriate for all widgets; it does the following:        </p>        <ul>          <li>            <p>              Unmaps the widget if the widget is mapped; remember              the GTK+ invariant that all mapped widgets are              realized.            </p>          </li>          <li>            <p>              Unrealizes all child widgets, if the widget is a              container; this maintains the invariant that widgets              cannot be realized unless their parents are also              realized.            </p>          </li>          <li>            <p>              Unreferences <span class="STRUCTNAME">              widget-&gt;style</span>.            </p>          </li>          <li>            <p>              Destroys <span class="STRUCTNAME">              widget-&gt;window</span> (windowless widgets only              unreference it).            </p>          </li>          <li>            <p>              Unsets the <span class="STRUCTNAME">              GTK_REALIZED</span> flag.            </p>          </li>        </ul>        <p>          Widgets are required to chain up if they override their          base class's unrealize method. This ensures that all          resources are freed. Overriding the default method may be          necessary if a widget has more than one <span class=           "STRUCTNAME">GdkWindow</span> or other special needs. All          windows should be destroyed just as <tt class=          "CLASSNAME">GtkEv</tt> destroys its <span class=           "STRUCTNAME">event_window</span>, that is, the window's          user data field should be set to <span class=          "STRUCTNAME">NULL</span> before destruction:        </p>        <table border="0" bgcolor="#E0E0E0" width="100%">          <tr>            <td><pre class="PROGRAMLISTING">&#13;      gdk_window_set_user_data(ev-&gt;event_window, NULL);      gdk_window_destroy(ev-&gt;event_window);      ev-&gt;event_window = NULL;      </pre>            </td>          </tr>        </table>        <p>          This keeps GTK+ from sending a useless <span class=           "STRUCTNAME">GDK_DESTROY</span> event for the window.        </p>        <p>          The <span class="SYMBOL">"unrealize"</span> signal is          emitted via <tt class="FUNCTION">          gtk_widget_unrealize()</tt>. <tt class="FUNCTION">          gtk_widget_unrealize()</tt> does some internal          bookkeeping which is important but not very interesting;          just be careful to use this function rather than emitting          the signal directly.        </p>      </div>      <div class="SECT2">        <h2 class="SECT2">          <a name="Z157">Drawing</a>        </h2>        <p>          The relationship between <span class="STRUCTNAME">          draw</span>, <span class="STRUCTNAME">draw_focus</span>,          <span class="STRUCTNAME">draw_default</span>, and <span          class="STRUCTNAME">expose_event</span> was discussed in          <a href="z147.html#SEC-GTKEVDRAWING">the section called          <i>Drawing</i></a>. All four class functions are          registered as default handlers for a signal of the same          name. The <span class="SYMBOL">"draw"</span> signal          redraws a portion of the widget; it is emitted by GTK+ or          by widget implementations.        </p>        <p>          Widget implementations should emit the <span class=          "SYMBOL">"draw_focus"</span> signal themselves, generally          in response to focus events; the signal draws or undraws          a frame indicating that the widget is focused. <tt class=           "FUNCTION">gtk_window_set_default()</tt> emits the <span          class="SYMBOL">"draw_default"</span> signal for both the          widget losing default status and the widget gaining it.          (<tt class="FUNCTION">gtk_widget_grab_default()</tt>          calls <tt class="FUNCTION">          gtk_window_set_default()</tt>.) Only widgets with the          <span class="STRUCTNAME">GTK_CAN_FOCUS</span> or <span          class="STRUCTNAME">GTK_CAN_DEFAULT</span> flag set need          to worry about the <span class="STRUCTNAME">          draw_focus</span> and <span class="STRUCTNAME">          draw_default</span> methods. These flags should be set in          a widget's instance initialization function.        </p>        <p>          Only the draw method has a default implementation in <tt          class="CLASSNAME">GtkWidget</tt>; the default          implementation synthesizes an expose event covering the          widget's entire allocation. This allows you to write an          expose event handler that also handles the draw signal.        </p>        <p>          GTK+ normally emits the <span class="SYMBOL">          "draw"</span> signal in an idle function. That is, it          keeps a list of widgets (and regions of them) that need          to be redrawn; when no events are pending, the GTK+ main          loop runs an idle function that traverses the list and          emits the <span class="SYMBOL">"draw"</span> signal for          each widget. Redraw areas are merged as much as possible          to avoid multiple redraws, and the idle function is          removed after it runs once. This arrangement minimizes          the number of redraws and reduces flicker.        </p>      </div>      <div class="SECT2">        <h2 class="SECT2">          <a name="SEC-SIZENEG">Size Negotiation</a>        </h2>        <p>          The size negotiation process has already been described          in <a href="sec-containers.html#SEC-SIZENEGOTIATION">the          section called <i>Size Allocation</i> in the chapter          called <i>GTK+ Basics</i></a> and <a href=           "z147.html#SEC-GTKEVSIZENEG">the section called <i>Size          Negotiation</i></a>. The two signals/methods involved are          <span class="STRUCTNAME">size_request</span> and <span          class="STRUCTNAME">size_allocate</span>. <tt class=           "CLASSNAME">GtkWidget</tt> provides default          implementations of each.        </p>        <p>          Here is the default <span class="STRUCTNAME">          size_request</span> method:        </p>        <table border="0" bgcolor="#E0E0E0" width="100%">          <tr>            <td><pre class="PROGRAMLISTING">&#13;static voidgtk_widget_real_size_request (GtkWidget         *widget,                              GtkRequisition    *requisition){  g_return_if_fail (widget != NULL);  g_return_if_fail (GTK_IS_WIDGET (widget));  requisition-&gt;width = widget-&gt;requisition.width;  requisition-&gt;height = widget-&gt;requisition.height;}      </pre>            </td>          </tr>        </table>        <p>          This implementation is appropriate for widgets that          always request the same size; <tt class="CLASSNAME">          GtkArrow</tt> and <tt class="CLASSNAME">          GtkDrawingArea</tt>, for example, use this default.          Widgets using the default must initialize <span class=           "STRUCTNAME">widget-&gt;requisition</span> with their          fixed request; <span class="STRUCTNAME">GtkArrow</span>          does this in <tt class="FUNCTION">gtk_arrow_init()</tt>.          <tt class="CLASSNAME">GtkDrawingArea</tt> begins with a          default size, but allows users to change the request with          <tt class="FUNCTION">gtk_drawing_area_set_size()</tt>.        </p>        <p>          Widgets whose request depends on their children, or the          amount of text they contain, or some other factor, should          override the default size request method with a method          that calculates the size they want.        </p>        <p>          Size allocation is mildly more complicated; here is its          default implementation:        </p>        <table border="0" bgcolor="#E0E0E0" width="100%">          <tr>            <td><pre class="PROGRAMLISTING">&#13;static voidgtk_widget_real_size_allocate (GtkWidget     *widget,                               GtkAllocation *allocation){  g_return_if_fail (widget != NULL);  g_return_if_fail (GTK_IS_WIDGET (widget));  widget-&gt;allocation = *allocation;    if (GTK_WIDGET_REALIZED (widget) &amp;&amp;      !GTK_WIDGET_NO_WINDOW (widget))     {        gdk_window_move_resize (widget-&gt;window,                                allocation-&gt;x, allocation-&gt;y,                                allocation-&gt;width, allocation-&gt;height);     }}      </pre>            </td>          </tr>        </table>        <p>          This should suffice for most simple widgets. Widgets like          <tt class="CLASSNAME">GtkEv</tt>, or any container, need          to update internal data structures or distribute the          allocation they receive among child widgets; these          widgets will override <span class="STRUCTNAME">          size_allocate</span>. It is possible but not required to          chain up to the default implementation.        </p>        <p>          The wrapper function which emits the <span class=          "SYMBOL">"size_allocate"</span> signal is significantly          more involved than the signal handlers. <tt class=           "FUNCTION">gtk_widget_size_allocate()</tt> takes into          account <tt class="FUNCTION">gtk_widget_set_usize()</tt>          and ensures widgets are redrawn if their size changes.          (Unsurprisingly, <tt class="FUNCTION">          gtk_widget_size_request()</tt> also exists and should be          used instead of emitting <span class="SYMBOL">          "size_request"</span> directly.)        </p>      </div>      <div class="SECT2">        <h2 class="SECT2">          <a name="Z158"><tt class="CLASSNAME">          GtkContainer</tt></a>        </h2>        <p>          <tt class="CLASSNAME">GtkContainer</tt> is the base class          for all widgets that contain one or more other widgets.          <tt class="CLASSNAME">GtkBin</tt> is a subclass of <tt          class="CLASSNAME">GtkContainer</tt>, and is the base          class for widgets with a single child.        </p>        <div class="SECT3">          <h3 class="SECT3">            <a name="Z159">The <tt class="CLASSNAME">            GtkContainer</tt> Instance Struct</a>          </h3>          <p>            Here is <tt class="CLASSNAME">GtkContainer</tt>:          </p>          <table border="0" bgcolor="#E0E0E0" width="100%">            <tr>              <td><pre class="PROGRAMLISTING">&#13;typedef struct _GtkContainer       GtkContainer;struct _GtkContainer{  GtkWidget widget;    GtkWidget *focus_child;    guint border_width : 16;  guint need_resize : 1;  guint resize_mode : 2;    GSList *resize_widgets;};    </pre>              </td>            </tr>          </table>          <p>            The <span class="STRUCTNAME">focus_child</span> member            is the child in the container with the keyboard focus;            it can be <span class="STRUCTNAME">NULL</span> if no            child has the focus. The <tt class="CLASSNAME">            GtkContainer</tt> implementation handles setting and            unsetting this field. The <span class="STRUCTNAME">            border_width</span> member is a width in pixels to add            to the container's size request on all sides; the            container will also subtract this value from its            allocation. (In other words, the <span class=            "STRUCTNAME">border_width</span> is a blank space            around the container.) Library users set the <span            class="STRUCTNAME">border_width</span> field with <tt            class="FUNCTION">gtk_container_set_border_width()</tt>;            <tt class="CLASSNAME">GtkContainer</tt> subclasses must            honor its value in their <span class="STRUCTNAME">            size_request</span> and <span class="STRUCTNAME">            size_allocate</span> implementations.          </p>          <p>            The <span class="STRUCTNAME">need_resize</span>, <span            class="STRUCTNAME">resize_mode</span>, and <span class=             "STRUCTNAME">resize_widgets</span> fields are            implementation details that subclasses should not have            to read or modify. These fields are used to implement            <tt class="FUNCTION">gtk_widget_queue_resize()</tt>;            when a resize is queued for a widget, the <tt class=             "CLASSNAME">GtkContainer</tt> implementation ensures            that the size negotiation process            (requisition/allocation) will take place a in a            one-shot idle handler. Subclasses of <tt class=             "CLASSNAME">GtkContainer</tt> simply implement <span            class="STRUCTNAME">size_request</span> and <span class=             "STRUCTNAME">size_allocate</span>, and everything            works.          </p>        </div>        <div class="SECT3">          <h3 class="SECT3">            <a name="Z160">The <tt class="CLASSNAME">            GtkContainer</tt> Class Struct</a>          </h3>          <table border="0" bgcolor="#E0E0E0" width="100%">            <tr>              <td><pre class="PROGRAMLISTING">

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品亚洲国产奇米99| 91蜜桃在线免费视频| 欧美一区二区视频在线观看2020| 国产精品少妇自拍| 成人免费的视频| 亚洲男人天堂av网| 欧日韩精品视频| 日本欧美一区二区三区乱码| 欧美高清你懂得| 国产一区二区主播在线| 国产欧美一区二区精品仙草咪| 成人国产在线观看| 亚洲精品日韩专区silk| 欧美图区在线视频| 精品一区二区在线观看| 国产日韩欧美不卡在线| 91蜜桃在线免费视频| 五月天中文字幕一区二区| 精品日产卡一卡二卡麻豆| 国产69精品久久久久毛片| 亚洲欧美色综合| 日韩一区二区视频| 国产夫妻精品视频| 夜夜揉揉日日人人青青一国产精品| 欧美日韩dvd在线观看| 国产精品综合二区| 一区二区三区四区不卡视频| 欧美成人vps| 色综合久久综合| 国产综合久久久久久鬼色| 亚洲卡通欧美制服中文| 日韩欧美一区电影| 91浏览器在线视频| 国产精品一线二线三线| 亚洲一区二区三区四区在线免费观看| 日韩精品一区二区三区中文不卡 | 日韩一级完整毛片| 国产成人在线视频网站| 天堂久久一区二区三区| 国产精品久久久久一区二区三区共| 欧美日韩国产高清一区| 福利一区二区在线观看| 美女视频网站久久| 亚洲一区视频在线观看视频| 亚洲欧美另类图片小说| 26uuu国产电影一区二区| 色综合色综合色综合色综合色综合| 精品无人区卡一卡二卡三乱码免费卡| 亚洲精品一卡二卡| 国产欧美精品一区二区色综合| 欧美日韩一区二区三区不卡| 成人av在线资源网| 精品一区精品二区高清| 性做久久久久久久免费看| 亚洲国产精品精华液2区45| 欧美一区二区三区日韩视频| 色噜噜狠狠一区二区三区果冻| 国产精品一品二品| 蜜乳av一区二区| 午夜精品久久久久久| 亚洲乱码一区二区三区在线观看| 中文子幕无线码一区tr| 精品国产一区二区在线观看| 欧美精品久久99久久在免费线 | 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 一本久久精品一区二区| 成人理论电影网| 成人综合在线观看| 国产一区二区三区四区五区入口| 蜜臀久久99精品久久久久宅男 | 韩国v欧美v日本v亚洲v| 男男视频亚洲欧美| 视频一区在线视频| 午夜久久久影院| 午夜不卡av免费| 天涯成人国产亚洲精品一区av| 亚洲制服欧美中文字幕中文字幕| 日韩美女视频19| 亚洲裸体xxx| 亚洲午夜av在线| 日韩黄色片在线观看| 日本少妇一区二区| 蜜臀a∨国产成人精品| 久久99精品一区二区三区| 精品一二三四区| 国产a视频精品免费观看| 国产精品一区二区男女羞羞无遮挡| 狠狠狠色丁香婷婷综合激情| 国内久久精品视频| 国产乱码字幕精品高清av| 粉嫩久久99精品久久久久久夜| 成人一区二区在线观看| 一本大道久久精品懂色aⅴ| 色999日韩国产欧美一区二区| 欧美性xxxxxxxx| 欧美久久久久久久久久| 日韩欧美一级二级| 国产午夜精品一区二区| 亚洲色图另类专区| 午夜av电影一区| 韩国女主播一区| 99久久精品免费精品国产| 欧美日韩专区在线| 欧美电影免费提供在线观看| 男人操女人的视频在线观看欧美| 狠狠色狠狠色合久久伊人| 成人黄色在线看| 欧美色欧美亚洲另类二区| 日韩精品一区二区三区在线观看 | 免费观看成人鲁鲁鲁鲁鲁视频| 国产专区综合网| 色综合久久综合网97色综合| 777a∨成人精品桃花网| 国产人成亚洲第一网站在线播放 | 一本大道av伊人久久综合| 欧美日韩免费不卡视频一区二区三区| 日韩亚洲国产中文字幕欧美| 国产精品嫩草影院com| 性欧美疯狂xxxxbbbb| 国产麻豆成人精品| 欧美日韩国产成人在线91| 国产天堂亚洲国产碰碰| 图片区小说区区亚洲影院| 国产a视频精品免费观看| 欧美精品三级日韩久久| 日本一区二区视频在线观看| 亚洲二区视频在线| 国产精品白丝jk黑袜喷水| 欧美日韩视频第一区| 中文字幕国产一区| 麻豆免费看一区二区三区| 一本一道综合狠狠老| 久久久国产一区二区三区四区小说 | 日韩在线播放一区二区| 成人精品免费视频| 精品久久久久久久久久久久久久久久久 | 欧美激情一区在线| 天天色综合天天| 91香蕉视频mp4| 精品国产91乱码一区二区三区| 一区二区三区四区乱视频| 国产成人自拍网| 26uuu亚洲婷婷狠狠天堂| 午夜久久电影网| 91丨九色丨国产丨porny| 国产日本亚洲高清| 国产在线视频不卡二| 欧美精选一区二区| 一区二区三区免费看视频| 成人av资源下载| 国产性色一区二区| 国产一区二区成人久久免费影院 | 久久综合五月天婷婷伊人| 亚洲国产色一区| 色综合久久综合| 亚洲视频一区在线| 成人黄色av电影| 国产欧美一区二区精品秋霞影院| 日本一区中文字幕| 欧美美女网站色| 亚洲第一福利一区| 国产精品久久久久天堂| 久久99精品视频| 欧美成人官网二区| 精品午夜一区二区三区在线观看| 欧美一区二区免费视频| 日本中文在线一区| 欧美福利一区二区| 麻豆免费精品视频| 日韩三级高清在线| 麻豆精品在线视频| xnxx国产精品| 国产乱妇无码大片在线观看| 久久久久国产精品麻豆| 国产精品1024| 国产精品视频你懂的| 本田岬高潮一区二区三区| 亚洲天堂网中文字| 91极品美女在线| 亚洲电影一级片| 日韩美女视频一区二区在线观看| 毛片av中文字幕一区二区| 精品成a人在线观看| 国产激情91久久精品导航| 中文字幕一区二区三区精华液| 色婷婷综合久久久中文一区二区| 亚洲午夜在线观看视频在线| 在线播放91灌醉迷j高跟美女| 捆绑调教美女网站视频一区| 26uuu另类欧美| 93久久精品日日躁夜夜躁欧美| 亚洲国产日韩在线一区模特 | 国产亚洲一区二区三区| 成人三级伦理片| 亚洲精品国产精华液| 91精品国产aⅴ一区二区| 国产精品综合网| 亚洲在线成人精品| 日韩三级高清在线| 91首页免费视频|