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

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

?? sec-modaldialogs.html

?? gtk_text program sample&eg
?? HTML
字號:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html>  <head>    <title>      Modal Dialogs    </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="User Communication: Dialogs" href=     "cha-dialogs.html">    <link rel="PREVIOUS" title="User Communication: Dialogs" href=     "cha-dialogs.html">    <link rel="NEXT" title="A Dialog Example" href="z101.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-dialogs.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="z101.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-MODALDIALOGS">Modal Dialogs</a>      </h1>      <p>        Sometimes you need to prevent interaction with the rest of        your application while the user manipulates a dialog.        Dialogs that freeze the rest of the application in this way        are called <i class="FIRSTTERM">modal</i> dialogs.      </p>      <p>        There is a lot of debate about when to use modal dialogs;        some users hate them passionately, but there are times when        they are necessary. Unfortunately, it is a little bit        easier to write code using modal dialogs, because you can        stop in the middle of a function, wait for a user response,        then continue. With nonmodal dialogs, you have to return        the flow of control to the main application, and arrange        callbacks to pick up where you left off when the user        finally deals with the dialog. With a complex sequence of        dialogs, the result is ugly spaghetti code. This tempts        many programmers to use modal dialogs all the time, or at        least a little too often. Avoid the temptation, and your        users will thank you.      </p>      <p>        Avoid modal dialogs if users might want to refer back to        information in the main application as they use the dialog,        or if they might want to cut-and-paste between the        application and the dialog. "Properties" dialogs should        usually be nonmodal; because users will want to experiment        with the effects of the changes they make, without having        to close the dialog. And there's no reason to make trivial        message boxes modal, since clicking on them has no effect        on the rest of the application.      </p>      <p>        Do not be afraid to use a modal dialog if it makes sense,        however. For example, I wrote a frontend for the Debian        package manager, called <tt class="APPLICATION">        gnome-apt</tt>. The main application allows the user to        select software packages for installation and removal; then        there are a series of dialogs which ask for confirmation        and perform the requested changes. These dialogs are modal,        because it would make no sense to change a request in the        middle of performing it. Changing the request should imply        restarting the request-fulfillment process and asking for        confirmation a second time. Another example: the "File        Properties" dialog for the Gnome file manager is modal,        because otherwise the user could delete the file while its        properties were being edited---a strange situation. There        are no hard and fast rules; you'll have to use your        judgment on a dialog-by-dialog basis.      </p>      <p>        All that said, it is very easy to create a modal dialog. In        GTK+, any window can be made modal with <tt class=        "FUNCTION">gtk_window_set_modal()</tt> (<a href=         "sec-modaldialogs.html#FL-SETMODAL">Figure 5</a>).      </p>      <div class="FIGURE">        <a name="FL-SETMODAL"></a>        <div class="FUNCSYNOPSIS">          <a name="FL-SETMODAL.SYNOPSIS"></a>          <table border="0" bgcolor="#E0E0E0" width="100%">            <tr>              <td><pre class="FUNCSYNOPSISINFO">     #include &lt;gtk/gtkwindow.h&gt;    </pre>              </td>            </tr>          </table>          <p>            <code><code class="FUNCDEF"><tt class="FUNCTION">            gtk_window_set_modal</tt></code>(GtkWindow* <tt class=             "PARAMETER"><i>window</i></tt>, gboolean <tt class=             "PARAMETER"><i>modality</i></tt>);</code>          </p>        </div>        <p>          <b>Figure 5. Modal Windows</b>        </p>      </div>      <p>        Since <tt class="CLASSNAME">GnomeDialog</tt> is a <tt        class="CLASSNAME">GtkWindow</tt> subclass, this function        works fine. It simply blocks all interaction with windows        other than the modal one.      </p>      <p>        Typically you want to go a step further, and wait for the        user to click one of the dialog buttons without setting up        a lot of callbacks. In GTK+ this is done by running a        second instance of <tt class="FUNCTION">gtk_main()</tt>,        entering another, nested event loop. When the second loop        exits, the flow of control returns to just after your <tt        class="FUNCTION">gtk_main()</tt> call. However there are a        host of complications and race conditions, due to the large        number of ways to close a dialog; the resulting code is        somewhat unpleasant and error-prone. The two functions in        <a href="sec-modaldialogs.html#FL-DIALOGRUN">Figure 6</a>        are provided to save your from the mess.      </p>      <div class="FIGURE">        <a name="FL-DIALOGRUN"></a>        <div class="FUNCSYNOPSIS">          <a name="FL-DIALOGRUN.SYNOPSIS"></a>          <table border="0" bgcolor="#E0E0E0" width="100%">            <tr>              <td><pre class="FUNCSYNOPSISINFO">     #include &lt;libgnomeui/gnome-dialog.h&gt;    </pre>              </td>            </tr>          </table>          <p>            <code><code class="FUNCDEF">gint <tt class="FUNCTION">            gnome_dialog_run</tt></code>(GnomeDialog* <tt class=             "PARAMETER"><i>dialog</i></tt>);</code>          </p>          <p>            <code><code class="FUNCDEF">gint <tt class="FUNCTION">            gnome_dialog_run_and_close</tt></code>(GnomeDialog* <tt            class="PARAMETER"><i>dialog</i></tt>);</code>          </p>        </div>        <p>          <b>Figure 6. "Running" a Dialog</b>        </p>      </div>      <p>        These two functions block until the user clicks a dialog        button, clicks the window manager's close decoration, or        does the equivalent with a key shortcut. If a button was        clicked, they return that button's number; recall that <tt        class="CLASSNAME">GnomeDialog</tt> buttons are numbered        from left to right starting with <span class="STRUCTNAME">        0</span>. If no button was clicked (the dialog was closed        via window manager), they return <span class="STRUCTNAME">        -1</span> instead.      </p>      <p>        The dialog is automatically made modal for the duration of        the call; otherwise chaos would reign. (For example,        calling <tt class="FUNCTION">gtk_main_quit()</tt> from your        main application code would quit the nested <tt class=         "FUNCTION">gtk_main()</tt> rather than the primary one.)        However, if you plan to leave the dialog open after <tt        class="FUNCTION">gnome_dialog_run()</tt> returns, and you        want it to be modal, you should manually make it modal; <tt        class="FUNCTION">gnome_dialog_run()</tt> will only change        the dialog's modality temporarily.      </p>      <p>        It is your responsibility to figure out how the dialog will        be closed or destroyed before you call <tt class=        "FUNCTION">gnome_dialog_run()</tt>. You can set the dialog        up so that no user actions destroy it, then destroy it        yourself after <tt class="FUNCTION">gnome_dialog_run()</tt>        returns. Or you can set the dialog up so that all user        actions destroy it, then forget about it after <tt class=         "FUNCTION">gnome_dialog_run()</tt> returns. You could also        write a loop, calling <tt class="FUNCTION">        gnome_dialog_run()</tt> repeatedly until the user gives        valid input, and closing the dialog only after the loop        ends. If you write a loop, be careful to manually make the        dialog modal; otherwise there will be short intervals where        it is not.      </p>      <p>        <tt class="FUNCTION">gnome_dialog_run_and_close()</tt>        monitors the dialog's <span class="SYMBOL">"close"</span>        and <span class="SYMBOL">"destroy"</span> signals, and        closes the dialog if and only if it does not close        "naturally" in response to user clicks or keystrokes. Using        this function guarantees that <tt class="FUNCTION">        gnome_dialog_close()</tt> will be called exactly once        before it returns, unless you connect truly malicious        callbacks to sabotage the process. <tt class="FUNCTION">        gnome_dialog_run_and_close()</tt> is not very useful in my        opinion; it is little more than a way to avoid thinking        about how the dialog will be closed.      </p>    </div>    <div class="NAVFOOTER">      <br>      <br>      <table width="100%" border="0" bgcolor="#ffffff" cellpadding=       "1" cellspacing="0">        <tr>          <td width="25%" bgcolor="#ffffff" align="left">            <a href="cha-dialogs.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="z101.html"><font color="#0000ff" size="2"><b>            Next &gt;&gt;&gt;</b></font></a>          </td>        </tr>        <tr>          <td colspan="2" align="left">            <font color="#000000" size="2"><b>User Communication:            Dialogs</b></font>          </td>          <td colspan="2" align="right">            <font color="#000000" size="2"><b>A Dialog            Example</b></font>          </td>        </tr>      </table>    </div>  </body></html>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久97超碰国产精品超碰| 51精品视频一区二区三区| 欧美日韩在线播放三区四区| 日韩欧美国产高清| 亚洲欧美在线aaa| 国内欧美视频一区二区| 欧美色视频在线观看| 亚洲精品视频观看| 国内不卡的二区三区中文字幕 | 91精品啪在线观看国产60岁| 亚洲欧洲成人自拍| 美女性感视频久久| 欧美男女性生活在线直播观看| 中文字幕精品一区二区精品绿巨人 | 精品国产伦一区二区三区免费| 一区二区三区精品| www.在线欧美| 亚洲国产精品ⅴa在线观看| 久久99热这里只有精品| 在线播放日韩导航| 精品国产一区二区三区久久影院| 在线播放日韩导航| 亚洲欧洲制服丝袜| 波多野结衣精品在线| 国产亚洲综合色| 国产福利一区二区三区视频在线| 日韩欧美国产午夜精品| 日韩电影网1区2区| 日韩免费成人网| 精品系列免费在线观看| 精品理论电影在线观看| 久久99国内精品| 久久久久久夜精品精品免费| 国产美女精品人人做人人爽| 久久亚洲二区三区| 国产成人av电影在线观看| 国产欧美日韩中文久久| 欧美性色aⅴ视频一区日韩精品| 欧美一区二区成人6969| 99久久久免费精品国产一区二区| 久久久国产午夜精品| 成人午夜视频在线观看| 日韩毛片视频在线看| 91麻豆免费视频| 亚洲超丰满肉感bbw| 91精品国产麻豆国产自产在线| 美洲天堂一区二卡三卡四卡视频 | 另类人妖一区二区av| 日韩视频免费观看高清在线视频| 精品一区二区三区免费毛片爱| 久久久噜噜噜久久人人看| 成人av小说网| 亚洲成人动漫一区| 欧美精品一区二区三区蜜桃| kk眼镜猥琐国模调教系列一区二区| 自拍偷拍亚洲欧美日韩| 欧美高清视频在线高清观看mv色露露十八| 亚洲va欧美va人人爽午夜| 日韩欧美国产一区二区在线播放| 大尺度一区二区| 亚洲午夜一二三区视频| 日韩一区二区三区高清免费看看| 高清在线观看日韩| 亚洲成av人片在线观看| 久久女同精品一区二区| 色婷婷综合五月| 久久国产精品99久久人人澡| 国产精品福利一区二区| 日韩欧美国产午夜精品| 99久久99久久综合| 极品美女销魂一区二区三区| 亚洲欧洲日韩综合一区二区| 欧美电影在哪看比较好| 成人夜色视频网站在线观看| 亚洲国产精品久久久男人的天堂| 久久久久亚洲蜜桃| 欧美精品v日韩精品v韩国精品v| 国产.欧美.日韩| 青青草国产成人av片免费 | 欧美经典一区二区| 欧美精品久久一区二区三区| 99久久精品免费看国产免费软件| 亚洲1区2区3区4区| 亚洲精选免费视频| 欧美激情中文字幕一区二区| 日韩欧美资源站| 欧美图片一区二区三区| 95精品视频在线| 国产在线麻豆精品观看| 亚洲不卡av一区二区三区| 最新国产成人在线观看| 久久免费午夜影院| 日韩欧美一区二区视频| 欧美日韩一本到| 在线观看av一区| 91视频免费播放| 国产白丝网站精品污在线入口| 青青草原综合久久大伊人精品优势| 一区二区三区四区在线免费观看 | 色综合色狠狠天天综合色| 国产精品一区久久久久| 精品一区二区三区香蕉蜜桃| 日本中文一区二区三区| 午夜精品久久一牛影视| 亚洲愉拍自拍另类高清精品| 最新日韩av在线| 亚洲欧美偷拍另类a∨色屁股| 中文字幕欧美日本乱码一线二线| 精品国产乱码久久久久久1区2区| 欧美高清视频www夜色资源网| 欧美中文字幕不卡| 欧美午夜精品电影| 欧美日韩一区三区四区| 欧美三级视频在线观看 | 亚洲一区二区三区精品在线| 亚洲国产高清aⅴ视频| 久久久久久久久蜜桃| 欧美成人艳星乳罩| 精品日韩一区二区| 精品播放一区二区| 国产亚洲1区2区3区| 久久久www成人免费无遮挡大片 | 一区二区三区在线播| 亚洲高清视频在线| 男男gaygay亚洲| 国产高清成人在线| 不卡影院免费观看| 日本韩国欧美在线| 欧美日韩中文精品| 日韩免费看的电影| 欧美激情资源网| 亚洲女人****多毛耸耸8| 午夜亚洲福利老司机| 九九国产精品视频| 成人性视频网站| 欧美在线免费视屏| 日韩午夜精品视频| 国产精品亲子伦对白| 夜夜爽夜夜爽精品视频| 国产一区二区看久久| 亚洲一级二级在线| 日韩影院精彩在线| 国产精品乡下勾搭老头1| 白白色 亚洲乱淫| 9191久久久久久久久久久| 精品国产91洋老外米糕| 国产精品视频免费| 一区二区高清在线| 国模无码大尺度一区二区三区| 成人毛片在线观看| 91精品国产综合久久精品性色| 精品国产伦一区二区三区观看体验 | 色综合天天综合网国产成人综合天| 欧美色欧美亚洲另类二区| 亚洲摸摸操操av| 日韩经典中文字幕一区| 国产成人精品www牛牛影视| 欧美三电影在线| 国产精品国产三级国产aⅴ入口| 一区二区三区日韩精品视频| 亚洲成人av福利| 国产一区91精品张津瑜| 欧美优质美女网站| 国产网站一区二区| 首页综合国产亚洲丝袜| 99在线精品免费| 久久日一线二线三线suv| 亚洲mv在线观看| 一本久道久久综合中文字幕| 欧美大片一区二区| 性欧美疯狂xxxxbbbb| yourporn久久国产精品| 国产网站一区二区| 国内精品嫩模私拍在线| 欧美人妇做爰xxxⅹ性高电影| 国产精品毛片久久久久久久| 九一久久久久久| 欧美一区二区三区不卡| 亚洲资源在线观看| 美女视频网站久久| 亚洲女性喷水在线观看一区| 国产一区二区三区四区五区美女 | 欧美激情一区二区在线| 久久99国内精品| 91精品麻豆日日躁夜夜躁| 亚洲综合视频在线| 在线免费观看视频一区| 综合色中文字幕| 成人一区二区三区| 国产精品全国免费观看高清 | 日韩电影免费在线看| 欧美在线观看视频在线| 一区二区三区高清| 色婷婷综合久久久中文字幕| 亚洲免费电影在线| 色8久久精品久久久久久蜜| 亚洲情趣在线观看| 色哟哟国产精品免费观看| 亚洲色图清纯唯美| 欧美天堂一区二区三区|