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

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

?? z147.html

?? gtk_text program sample&eg
?? HTML
?? 第 1 頁 / 共 4 頁
字號:
          Once a widget's parent container decides how much space          is actually available, the widget receives a size          allocation. The size allocation method should do the          following:        </p>        <ul>          <li>            <p>              Assign the new allocation to <span class=              "STRUCTNAME">widget-&gt;allocation</span>; this does              <i class="EMPHASIS">not</i> happen automatically, as              it does for <span class="STRUCTNAME">              widget-&gt;requisition</span>.            </p>          </li>          <li>            <p>              Divide the allocation among any child widgets.            </p>          </li>          <li>            <p>              Resize any <span class="STRUCTNAME">              GdkWindow</span>s, if the widget is realized.            </p>          </li>          <li>            <p>              Perform any widget-specific tasks; for example, <tt              class="CLASSNAME">GtkEv</tt> updates the two <span              class="STRUCTNAME">GdkRectangle</span>s representing              its internal layout.            </p>          </li>        </ul>        <p>          Here is the <tt class="CLASSNAME">GtkEv</tt> size          allocation method; it should be self-explanatory:        </p>        <table border="0" bgcolor="#E0E0E0" width="100%">          <tr>            <td><pre class="PROGRAMLISTING">&#13;static void gtk_ev_size_allocate  (GtkWidget        *widget,                       GtkAllocation    *allocation){  static const gint spacing = 10;   GtkEv* ev;  g_return_if_fail(widget != NULL);  g_return_if_fail(GTK_IS_EV(widget));    ev = GTK_EV(widget);  widget-&gt;allocation = *allocation;  ev-&gt;event_window_rect.width =     MAX(allocation-&gt;width - spacing*2, 0);  ev-&gt;event_window_rect.height =     MAX(allocation-&gt;height / 5 - spacing / 2, 0);  ev-&gt;event_window_rect.x =     (allocation-&gt;width - ev-&gt;event_window_rect.width)/2;  ev-&gt;event_window_rect.y =     MIN(spacing, allocation-&gt;height);  ev-&gt;description_rect.x = ev-&gt;event_window_rect.x;  ev-&gt;description_rect.y =     ev-&gt;event_window_rect.y + ev-&gt;event_window_rect.height + spacing;  ev-&gt;description_rect.width =     ev-&gt;event_window_rect.width;  ev-&gt;description_rect.height =     MAX((allocation-&gt;height - ev-&gt;event_window_rect.height - spacing*3), 0);  if (GTK_WIDGET_REALIZED (widget))    {      gdk_window_move_resize (widget-&gt;window,                              allocation-&gt;x,                               allocation-&gt;y,                              allocation-&gt;width,                               allocation-&gt;height);      gdk_window_move_resize (ev-&gt;event_window,                              ev-&gt;event_window_rect.x,                               ev-&gt;event_window_rect.y,                              ev-&gt;event_window_rect.width,                              ev-&gt;event_window_rect.height);          }}      </pre>            </td>          </tr>        </table>      </div>      <div class="SECT2">        <h2 class="SECT2">          <a name="SEC-GTKEVDRAWING">Drawing</a>        </h2>        <p>          There are three common situations that require a widget          to redraw all or part of itself:        </p>        <ol type="1">          <li>            <p>              Expose events signal that all or part of a widget's              <span class="STRUCTNAME">GdkWindow</span> has just              become visible on the screen and needs repainting              (see <a href="sec-gdkevent.html#SEC-EXPOSEEVENTS">the              section called <i>Expose Events</i> in the chapter              called <i>GDK Basics</i></a>). A widget's <span              class="STRUCTNAME">expose_event</span> method              performs these redraws.            </p>          </li>          <li>            <p>              GTK+ sometimes determines that a widget should be              redrawn. This might happen when a widget receives a              new size allocation different from its previous size              allocation, or when a new theme is loaded. A widget's              <span class="STRUCTNAME">draw</span> method, usually              invoked via <tt class="FUNCTION">              gtk_widget_queue_draw()</tt> or <tt class="FUNCTION">              gtk_widget_queue_clear()</tt>, handles this case.            </p>          </li>          <li>            <p>              Widgets sometimes decide to redraw themselves. For              example, if you change the text of a <tt class=               "CLASSNAME">GtkLabel</tt>, the label will redraw              itself to reflect the new text. Widget              implementations are free to handle this case however              they like, but most will use the <span class=               "STRUCTNAME">draw</span> method.            </p>          </li>        </ol>        <p>          There are two special cases of the second situation. The          first occurs when a widget receives or loses the keyboard          focus; the second occurs when the widget becomes (or          unbecomes) the "default" widget. Widgets should indicate          these states visually, but they can often do so without a          complete redraw. Thus, there are special <span class=           "STRUCTNAME">draw_focus</span> and <span class=          "STRUCTNAME">draw_default</span> signals to handle them.          These signals only have to be implemented if a widget can          meaningfully receive the focus or default.        </p>        <p>          Because there is typically little difference between a          widget's draw and expose methods, a common convention is          to write a static function to handle both of them. This          function is standardly called <tt class="FUNCTION">          gtk_whatever_paint()</tt>. It's also possible to avoid          implementing the draw method, because the default draw          method synthesizes an expose event covering the widget's          entire allocation and invokes the expose method.          (Remember that a synthetic expose event will have its          <span class="STRUCTNAME">send_event</span> flag set to          <span class="STRUCTNAME">TRUE</span>; you can use this to          distinguish synthetic events.)        </p>        <p>          The primary reason for distinguishing expose events from          other draws is that expose events are marked with the          window they occurred on; for widgets with multiple          windows such as <tt class="CLASSNAME">GtkEv</tt>, this          can increase efficiency. <tt class="CLASSNAME">GtkEv</tt>          implements two private functions, <tt class="CLASSNAME">          gtk_ev_paint()</tt> and <tt class="CLASSNAME">          gtk_ev_paint_event_window()</tt>, which it uses to          implement the expose and draw methods.        </p>        <p>          Here is the draw method:        </p>        <table border="0" bgcolor="#E0E0E0" width="100%">          <tr>            <td><pre class="PROGRAMLISTING">&#13;static void gtk_ev_draw           (GtkWidget        *widget,                       GdkRectangle     *area){  GdkRectangle event_window_area;  GdkRectangle intersection;  GtkEv* ev;  g_return_if_fail(widget != NULL);  g_return_if_fail(GTK_IS_EV(widget));  ev = GTK_EV(widget);  gtk_ev_paint(ev, area);  event_window_area = *area;  if (gdk_rectangle_intersect(area, &amp;ev-&gt;event_window_rect, &amp;intersection))    {      /* Make the intersection relative to the event window */      intersection.x -= ev-&gt;event_window_rect.x;      intersection.y -= ev-&gt;event_window_rect.y;            gtk_ev_paint_event_window(ev, &amp;intersection);    }}      </pre>            </td>          </tr>        </table>        <p>          And the expose method:        </p>        <table border="0" bgcolor="#E0E0E0" width="100%">          <tr>            <td><pre class="PROGRAMLISTING">&#13;static gint gtk_ev_expose         (GtkWidget        *widget,                       GdkEventExpose   *event){    if (event-&gt;window == widget-&gt;window)    gtk_ev_paint(GTK_EV(widget), &amp;event-&gt;area);  else if (event-&gt;window == GTK_EV(widget)-&gt;event_window)    gtk_ev_paint_event_window(GTK_EV(widget), &amp;event-&gt;area);  else    g_assert_not_reached();  return TRUE;}      </pre>            </td>          </tr>        </table>        <p>          Both the draw and expose methods should be          self-explanatory. All the work is done in the two paint          functions. Here is <tt class="FUNCTION">          gtk_ev_paint()</tt>, which renders the main widget          window:        </p>        <table border="0" bgcolor="#E0E0E0" width="100%">          <tr>            <td><pre class="PROGRAMLISTING">&#13;static void gtk_ev_paint          (GtkEv            *ev,                       GdkRectangle     *area){  GtkWidget* widget;  g_return_if_fail(ev != NULL);  g_return_if_fail(GTK_IS_EV(ev));  widget = GTK_WIDGET(ev);  if (!GTK_WIDGET_DRAWABLE (widget))    return;  gdk_window_clear_area (widget-&gt;window,                         area-&gt;x,                          area-&gt;y,                         area-&gt;width,                          area-&gt;height);  gdk_gc_set_clip_rectangle(widget-&gt;style-&gt;black_gc, area);  /* Draw a black rectangle around the event window */  gdk_draw_rectangle(widget-&gt;window,                     widget-&gt;style-&gt;black_gc,                     FALSE,                     ev-&gt;event_window_rect.x - 1,                      ev-&gt;event_window_rect.y - 1,                     ev-&gt;event_window_rect.width + 2,                     ev-&gt;event_window_rect.height + 2);  gdk_gc_set_clip_rectangle(widget-&gt;style-&gt;black_gc, NULL);  /* Draw text in the description area, if applicable */  if (ev-&gt;buffer)    {      GdkRectangle intersection;      if (gdk_rectangle_intersect(area,                                  &amp;ev-&gt;description_rect,                                  &amp;intersection))        {          static const gint space = 2;          gint line;          gint step;          gint first_baseline;                    GList* tmp;                step  = widget-&gt;style-&gt;font-&gt;ascent +             widget-&gt;style-&gt;font-&gt;descent + space;                first_baseline = ev-&gt;description_rect.y +             widget-&gt;style-&gt;font-&gt;ascent + space;                line = 0;                tmp = ev-&gt;buffer;                while (tmp != NULL)            {              gchar** this_event = tmp-&gt;data;              gint i = 0;              while (this_event[i])                {                  gtk_paint_string (widget-&gt;style,                                     widget-&gt;window,                                     widget-&gt;state,                                    &amp;intersection, widget, "ev",                                     ev-&gt;description_rect.x,                                    first_baseline + line*step,                                    this_event[i]);                  ++i;                  ++line;                }                        /* Bail out if we're off the bottom; the "- 2*step" is               *  needed because the next baseline may be outside the               *  redraw area but we are interested in the whole row of                *  text, not the baseline. The 2* is because line is one                *  larger than we've actually drawn.               */              if ((first_baseline + line*step - 2*step) &gt;                   (intersection.y + intersection.height))                break;                        tmp = g_list_next(tmp);            }        }    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区中文字幕| 91福利视频在线| 国产人成亚洲第一网站在线播放 | 亚洲欧美aⅴ...| 精品免费一区二区三区| 色综合久久中文字幕综合网| 麻豆国产91在线播放| 一区av在线播放| 国产日韩亚洲欧美综合| 91精品免费在线观看| 在线国产电影不卡| 成人国产精品免费观看| 国产尤物一区二区在线| 午夜精品视频一区| 一区二区三区不卡视频在线观看| 国产日韩欧美亚洲| 26uuu亚洲综合色欧美| 日韩一区二区中文字幕| 欧美日韩在线播| 一本大道久久a久久精二百| 国产suv精品一区二区883| 看电视剧不卡顿的网站| 日韩精品乱码免费| 亚洲一区二三区| 亚洲欧美日韩久久精品| 国产精品传媒入口麻豆| 中文一区二区完整视频在线观看| 欧美不卡123| 26uuu精品一区二区| 亚洲精品一线二线三线无人区| 91精品国产综合久久精品图片| 欧美性猛片aaaaaaa做受| 欧洲精品一区二区| 欧美视频在线观看一区| 在线观看区一区二| 欧美三级在线看| 9191久久久久久久久久久| 欧美日韩国产小视频| 欧美做爰猛烈大尺度电影无法无天| 色综合久久久久网| 色欲综合视频天天天| 欧美亚洲国产一区二区三区va| 色久优优欧美色久优优| 在线观看视频91| 欧美色精品天天在线观看视频| 欧美日韩视频不卡| 欧美一区欧美二区| 精品捆绑美女sm三区| 久久久噜噜噜久噜久久综合| 日本一区二区高清| 亚洲天堂精品在线观看| 亚洲国产精品人人做人人爽| 亚洲成人久久影院| 久久精品国产第一区二区三区| 麻豆免费精品视频| 国产精品一二三四| 色综合天天综合狠狠| 欧美日韩国产三级| 精品电影一区二区三区| 欧美国产丝袜视频| 亚洲精品中文在线观看| 午夜精品爽啪视频| 国精品**一区二区三区在线蜜桃| 国产精品资源在线| 一本久道久久综合中文字幕| 欧美久久久久久久久| 精品国免费一区二区三区| 久久久精品免费观看| 国产校园另类小说区| 亚洲国产精品成人综合| 亚洲三级理论片| 日韩高清中文字幕一区| 激情欧美一区二区| va亚洲va日韩不卡在线观看| 欧美日韩亚洲综合在线| www亚洲一区| 亚洲一二三区不卡| 国产乱国产乱300精品| 一本大道久久精品懂色aⅴ | 国产精品成人一区二区艾草 | 奇米色一区二区三区四区| 国产呦萝稀缺另类资源| 91丨porny丨户外露出| 日韩你懂的在线播放| 亚洲欧洲成人自拍| 美女视频第一区二区三区免费观看网站| 国产不卡一区视频| 欧美老女人第四色| 亚洲天堂精品在线观看| 国模少妇一区二区三区| 精品视频1区2区| 国产婷婷色一区二区三区在线| 午夜日韩在线观看| 99麻豆久久久国产精品免费| 欧美tickle裸体挠脚心vk| 亚洲人成7777| 国产盗摄女厕一区二区三区| 欧美另类一区二区三区| 亚洲免费观看高清完整| 国内精品免费在线观看| 这里只有精品99re| 亚洲另类中文字| 国产成人精品三级麻豆| 欧美一级黄色片| 一区av在线播放| va亚洲va日韩不卡在线观看| 精品福利二区三区| 免费人成精品欧美精品| 在线观看av一区| 亚洲欧洲精品天堂一级| 国产成人精品影视| 久久综合狠狠综合久久综合88| 图片区小说区区亚洲影院| 色视频欧美一区二区三区| 国产精品女主播av| 国产一区二区福利视频| 日韩亚洲欧美一区二区三区| 亚洲成人动漫一区| 欧美日韩精品免费| 亚洲国产日韩a在线播放| 91麻豆高清视频| 国产精品久久影院| www.亚洲国产| 亚洲欧洲日本在线| 99国产精品久| 亚洲视频一二三| 色美美综合视频| 亚洲天堂a在线| 91麻豆精品一区二区三区| 中文字幕一区二区三| 成人av集中营| 亚洲三级电影网站| 99精品欧美一区二区蜜桃免费| 国产精品女同一区二区三区| 99综合影院在线| 亚洲男人的天堂在线aⅴ视频| 99久免费精品视频在线观看| 亚洲婷婷在线视频| 欧美性生交片4| 日韩在线一二三区| 欧美一区午夜精品| 极品少妇xxxx偷拍精品少妇| 久久综合视频网| 国产不卡一区视频| 亚洲色图在线播放| 欧洲国内综合视频| 免费高清成人在线| 国产亚洲精品aa| 成人国产精品免费观看| 亚洲欧美视频一区| 欧美亚洲另类激情小说| 日本女人一区二区三区| 精品少妇一区二区三区日产乱码 | 欧美精品在线观看一区二区| 亚洲.国产.中文慕字在线| 欧美一级精品大片| 国产成人综合自拍| 综合分类小说区另类春色亚洲小说欧美| 97久久久精品综合88久久| 亚洲成人1区2区| 精品美女在线观看| 欧美电影免费观看完整版| 久久精品国产在热久久| 日本一区二区三区在线不卡| 精品美女被调教视频大全网站| 国产亚洲综合av| 国产成人欧美日韩在线电影| 日韩理论片一区二区| 欧美视频一区二区三区在线观看| 五月婷婷综合网| 欧美精品一区男女天堂| 成人一区二区三区视频在线观看 | 亚洲va欧美va天堂v国产综合| 欧美日韩国产影片| 国产福利视频一区二区三区| 综合精品久久久| 日韩欧美精品三级| 97se狠狠狠综合亚洲狠狠| 亚洲成a人片在线不卡一二三区 | 一区二区三区在线免费播放| 欧美精品乱码久久久久久| 国产成人午夜电影网| 亚洲国产va精品久久久不卡综合 | 欧美一区二区三区视频免费播放| 国产又粗又猛又爽又黄91精品| 亚洲青青青在线视频| 日韩一区二区三| 91一区一区三区| 久久精品国产一区二区三区免费看| 国产精品欧美一级免费| 日韩欧美久久久| 欧美伊人久久久久久久久影院| 国产一区二区三区四区五区入口| 亚洲一区自拍偷拍| 中文一区二区完整视频在线观看| 正在播放亚洲一区| 日本高清不卡视频| 国产v综合v亚洲欧| 久草在线在线精品观看| 亚洲国产综合91精品麻豆|