⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sec-dialogs-convenience.html

📁 gtk_text program sample&eg
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html>  <head>    <title>      Convenience Routines    </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="Special Dialog Types" href=     "cha-dialogs-special.html">    <link rel="NEXT" title="Gnome Application Checklist" href=     "cha-checklist.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-special.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="cha-checklist.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-DIALOGS-CONVENIENCE">Convenience Routines</a>      </h1>      <p>        Since message boxes almost always have the same button (a        single "OK"), there are convenience routines covering that        case. Each routine has a <span class="STRUCTNAME">        _parented()</span> variant which calls <tt class=        "FUNCTION">gnome_dialog_set_parent()</tt>. The three        function pairs in <a href=         "sec-dialogs-convenience.html#FL-CONVENIENCEDIALOGS">Figure        11</a> display an info box, a warning box, and an error        box, respectively; they create and show the widget, so you        can ignore the return value if you like.      </p>      <p>        The only purpose of these functions is to save you typing.        They are pure syntactic sugar. I find it much easier to        remember them than to use <tt class="FUNCTION">        gnome_message_box_new()</tt>, though; I always forget the        order of the arguments to <tt class="FUNCTION">        gnome_message_box_new()</tt>.      </p>      <div class="FIGURE">        <a name="FL-CONVENIENCEDIALOGS"></a>        <div class="FUNCSYNOPSIS">          <a name="FL-CONVENIENCEDIALOGS.SYNOPSIS"></a>          <table border="0" bgcolor="#E0E0E0" width="100%">            <tr>              <td><pre class="FUNCSYNOPSISINFO">     #include &lt;libgnomeui/gnome-dialog-util.h&gt;    </pre>              </td>            </tr>          </table>          <p>            <code><code class="FUNCDEF">GtkWidget* <tt class=             "FUNCTION">gnome_ok_dialog</tt></code>(const gchar* <tt            class="PARAMETER"><i>message</i></tt>);</code>          </p>          <p>            <code><code class="FUNCDEF">GtkWidget* <tt class=             "FUNCTION">gnome_ok_dialog_parented</tt></code>(const            gchar* <tt class="PARAMETER"><i>message</i></tt>,            GtkWindow* <tt class="PARAMETER"><i>            parent</i></tt>);</code>          </p>          <p>            <code><code class="FUNCDEF">GtkWidget* <tt class=             "FUNCTION">gnome_warning_dialog</tt></code>(const            gchar* <tt class="PARAMETER"><i>            warning</i></tt>);</code>          </p>          <p>            <code><code class="FUNCDEF">GtkWidget* <tt class=             "FUNCTION">            gnome_warning_dialog_parented</tt></code>(const gchar*            <tt class="PARAMETER"><i>warning</i></tt>, GtkWindow*            <tt class="PARAMETER"><i>parent</i></tt>);</code>          </p>          <p>            <code><code class="FUNCDEF">GtkWidget* <tt class=             "FUNCTION">gnome_error_dialog</tt></code>(const gchar*            <tt class="PARAMETER"><i>error</i></tt>);</code>          </p>          <p>            <code><code class="FUNCDEF">GtkWidget* <tt class=             "FUNCTION">            gnome_error_dialog_parented</tt></code>(const gchar*            <tt class="PARAMETER"><i>error</i></tt>, GtkWindow* <tt            class="PARAMETER"><i>parent</i></tt>);</code>          </p>        </div>        <p>          <b>Figure 11. Convenience Dialogs</b>        </p>      </div>    </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-special.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="cha-checklist.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>Special Dialog            Types</b></font>          </td>          <td colspan="2" align="right">            <font color="#000000" size="2"><b>Gnome Application            Checklist</b></font>          </td>        </tr>      </table>    </div>  </body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -