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

📄 gtkpaned.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"><title>GtkPaned</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="GTK+ Reference Manual"><link rel="up" href="AbstractObjects.html" title="Abstract Base Classes"><link rel="prev" href="GtkObject.html" title="GtkObject"><link rel="next" href="GtkRange.html" title="GtkRange"><meta name="generator" content="GTK-Doc V1.9 (XML mode)"><link rel="stylesheet" href="style.css" type="text/css"><link rel="part" href="gtk.html" title="Part&#160;I.&#160;GTK+ Overview"><link rel="part" href="gtkbase.html" title="Part&#160;II.&#160;GTK+ Core Reference"><link rel="part" href="gtkobjects.html" title="Part&#160;III.&#160;GTK+ Widgets and Objects"><link rel="chapter" href="ch01.html" title="Object Hierarchy"><link rel="chapter" href="ch02.html" title="Widget Gallery"><link rel="chapter" href="WindowWidgets.html" title="Windows"><link rel="chapter" href="DisplayWidgets.html" title="Display Widgets"><link rel="chapter" href="ButtonWidgets.html" title="Buttons and Toggles"><link rel="chapter" href="NumericEntry.html" title="Numeric/Text Data Entry"><link rel="chapter" href="TextWidgetObjects.html" title="Multiline Text Editor"><link rel="chapter" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets"><link rel="chapter" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar"><link rel="chapter" href="Actions.html" title="Action-based menus and toolbars"><link rel="chapter" href="SelectorWidgets.html" title="Selectors (File/Font/Color/Input Devices)"><link rel="chapter" href="LayoutContainers.html" title="Layout Containers"><link rel="chapter" href="Ornaments.html" title="Ornaments"><link rel="chapter" href="ScrollingWidgets.html" title="Scrolling"><link rel="chapter" href="Printing.html" title="Printing"><link rel="chapter" href="MiscObjects.html" title="Miscellaneous"><link rel="chapter" href="AbstractObjects.html" title="Abstract Base Classes"><link rel="chapter" href="PlugSocket.html" title="Cross-process Embedding"><link rel="chapter" href="SpecialObjects.html" title="Special-purpose features"><link rel="chapter" href="RecentDocuments.html" title="Recently Used Documents"><link rel="chapter" href="Builder.html" title="Interface builder"><link rel="chapter" href="DeprecatedObjects.html" title="Deprecated"><link rel="part" href="migrating.html" title="Part&#160;IV.&#160;Migrating from Previous Versions of GTK+"><link rel="chapter" href="gtk-migrating-checklist.html" title="Migration Checklist"><link rel="chapter" href="gtk-migrating-GtkFileChooser.html" title="Migrating from GtkFileSelection to GtkFileChooser"><link rel="chapter" href="gtk-migrating-GtkAction.html" title="Migrating from old menu and toolbar systems to GtkAction"><link rel="chapter" href="gtk-migrating-GtkComboBox.html" title="Migrating from GtkOptionMenu and GtkCombo to GtkComboBox and GtkComboBoxEntry"><link rel="chapter" href="gtk-migrating-GtkIconView.html" title="Migrating from GnomeIconList to GtkIconView"><link rel="chapter" href="gtk-migrating-GtkAboutDialog.html" title="Migrating from GnomeAbout to GtkAboutDialog"><link rel="chapter" href="gtk-migrating-GtkColorButton.html" title="Migrating from GnomeColorPicker to GtkColorButton"><link rel="chapter" href="gtk-migrating-GtkAssistant.html" title="Migrating from GnomeDruid to GtkAssistant"><link rel="chapter" href="gtk-migrating-GtkRecentChooser.html" title="Migrating from EggRecent to GtkRecentChooser"><link rel="chapter" href="gtk-migrating-GtkLinkButton.html" title="Migrating from GnomeHRef to GtkLinkButton"><link rel="chapter" href="gtk-migrating-GtkBuilder.html" title="Migrating from libglade to GtkBuilder"><link rel="chapter" href="gtk-migrating-tooltips.html" title="Migrating from GtkTooltips to GtkTooltip"><link rel="part" href="pt05.html" title="Part&#160;V.&#160;GTK+ Tools"><link rel="glossary" href="glossary.html" title="Glossary"><link rel="index" href="ix01.html" title="Index"><link rel="index" href="ix02.html" title="Index of deprecated symbols"><link rel="index" href="ix03.html" title="Index of new symbols in 2.2"><link rel="index" href="ix04.html" title="Index of new symbols in 2.4"><link rel="index" href="ix05.html" title="Index of new symbols in 2.6"><link rel="index" href="ix06.html" title="Index of new symbols in 2.8"><link rel="index" href="ix07.html" title="Index of new symbols in 2.10"><link rel="index" href="ix08.html" title="Index of new symbols in 2.12"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="GtkObject.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="AbstractObjects.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">GTK+ Reference Manual</th><td><a accesskey="n" href="GtkRange.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr><tr><td colspan="5" class="shortcuts"><nobr><a href="#id4287149" class="shortcut">Top</a>                  &#160;|&#160;                  <a href="#id4287794" class="shortcut">Description</a>                  &#160;|&#160;                  <a href="#id4287443" class="shortcut">Object Hierarchy</a>                  &#160;|&#160;                  <a href="#id4287512" class="shortcut">Implemented Interfaces</a>                  &#160;|&#160;                  <a href="#id4287542" class="shortcut">Properties</a>                  &#160;|&#160;                  <a href="#id4287627" class="shortcut">Child Properties</a>                  &#160;|&#160;                  <a href="#id4287678" class="shortcut">Style Properties</a>                  &#160;|&#160;                  <a href="#id4287712" class="shortcut">Signals</a></nobr></td></tr></table><div class="refentry" lang="en"><a name="GtkPaned"></a><div class="titlepage"></div><div class="refnamediv"><table width="100%"><tr><td valign="top"><h2><a name="id4287149"></a><span class="refentrytitle">GtkPaned</span></h2><p>GtkPaned &#8212; Base class for widgets with two adjustable panes</p></td><td valign="top" align="right"><img src="panes.png"></td></tr></table></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">#include &lt;gtk/gtk.h&gt;                    <a class="link" href="GtkPaned.html#GtkPaned-struct">GtkPaned</a>;void                <a class="link" href="GtkPaned.html#gtk-paned-add1">gtk_paned_add1</a>                      (<a class="link" href="GtkPaned.html" title="GtkPaned">GtkPaned</a> *paned,                                                         <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *child);void                <a class="link" href="GtkPaned.html#gtk-paned-add2">gtk_paned_add2</a>                      (<a class="link" href="GtkPaned.html" title="GtkPaned">GtkPaned</a> *paned,                                                         <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *child);#define             <a class="link" href="GtkPaned.html#gtk-paned-gutter-size">gtk_paned_gutter_size</a>               (p,s)void                <a class="link" href="GtkPaned.html#gtk-paned-pack1">gtk_paned_pack1</a>                     (<a class="link" href="GtkPaned.html" title="GtkPaned">GtkPaned</a> *paned,                                                         <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *child,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> resize,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> shrink);void                <a class="link" href="GtkPaned.html#gtk-paned-pack2">gtk_paned_pack2</a>                     (<a class="link" href="GtkPaned.html" title="GtkPaned">GtkPaned</a> *paned,                                                         <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *child,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> resize,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> shrink);<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*          <a class="link" href="GtkPaned.html#gtk-paned-get-child1">gtk_paned_get_child1</a>                (<a class="link" href="GtkPaned.html" title="GtkPaned">GtkPaned</a> *paned);<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*          <a class="link" href="GtkPaned.html#gtk-paned-get-child2">gtk_paned_get_child2</a>                (<a class="link" href="GtkPaned.html" title="GtkPaned">GtkPaned</a> *paned);#define             <a class="link" href="GtkPaned.html#gtk-paned-set-gutter-size">gtk_paned_set_gutter_size</a>           (p,s)void                <a class="link" href="GtkPaned.html#gtk-paned-set-position">gtk_paned_set_position</a>              (<a class="link" href="GtkPaned.html" title="GtkPaned">GtkPaned</a> *paned,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> position);<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a>                <a class="link" href="GtkPaned.html#gtk-paned-get-position">gtk_paned_get_position</a>              (<a class="link" href="GtkPaned.html" title="GtkPaned">GtkPaned</a> *paned);</pre></div><div class="refsect1" lang="en"><a name="id4287443"></a><h2>Object Hierarchy</h2><pre class="synopsis">  <ahref="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>   +----<ahref="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>         +----<a class="link" href="GtkObject.html" title="GtkObject">GtkObject</a>               +----<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>                     +----<a class="link" href="GtkContainer.html" title="GtkContainer">GtkContainer</a>                           +----GtkPaned                                 +----<a class="link" href="GtkHPaned.html" title="GtkHPaned">GtkHPaned</a>                                 +----<a class="link" href="GtkVPaned.html" title="GtkVPaned">GtkVPaned</a></pre></div><div class="refsect1" lang="en"><a name="id4287512"></a><h2>Implemented Interfaces</h2><p>GtkPaned implements AtkImplementorIface and  <a class="link" href="gtk-gtkbuildable.html#GtkBuildable">GtkBuildable</a>.</p></div><div class="refsect1" lang="en"><a name="id4287542"></a><h2>Properties</h2><pre class="synopsis">  "<a class="link" href="GtkPaned.html#GtkPaned--max-position">max-position</a>"             <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a>                  : Read  "<a class="link" href="GtkPaned.html#GtkPaned--min-position">min-position</a>"             <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a>                  : Read  "<a class="link" href="GtkPaned.html#GtkPaned--position">position</a>"                 <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a>                  : Read / Write  "<a class="link" href="GtkPaned.html#GtkPaned--position-set">position-set</a>"             <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>              : Read / Write</pre></div><div class="refsect1" lang="en"><a name="id4287627"></a><h2>Child Properties</h2><pre class="synopsis">  "<a class="link" href="GtkPaned.html#GtkPaned--resize">resize</a>"                   <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>              : Read / Write  "<a class="link" href="GtkPaned.html#GtkPaned--shrink">shrink</a>"                   <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>              : Read / Write</pre></div><div class="refsect1" lang="en"><a name="id4287678"></a><h2>Style Properties</h2><pre class="synopsis">  "<a class="link" href="GtkPaned.html#GtkPaned--handle-size">handle-size</a>"              <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a>                  : Read</pre></div><div class="refsect1" lang="en"><a name="id4287712"></a><h2>Signals</h2><pre class="synopsis">  "<a class="link" href="GtkPaned.html#GtkPaned-accept-position">accept-position</a>"                                : Run Last / Action  "<a class="link" href="GtkPaned.html#GtkPaned-cancel-position">cancel-position</a>"                                : Run Last / Action  "<a class="link" href="GtkPaned.html#GtkPaned-cycle-child-focus">cycle-child-focus</a>"                              : Run Last / Action  "<a class="link" href="GtkPaned.html#GtkPaned-cycle-handle-focus">cycle-handle-focus</a>"                             : Run Last / Action  "<a class="link" href="GtkPaned.html#GtkPaned-move-handle">move-handle</a>"                                    : Run Last / Action  "<a class="link" href="GtkPaned.html#GtkPaned-toggle-handle-focus">toggle-handle-focus</a>"                            : Run Last / Action</pre></div><div class="refsect1" lang="en"><a name="id4287794"></a><h2>Description</h2><p><a class="link" href="GtkPaned.html" title="GtkPaned"><span class="type">GtkPaned</span></a> is the base class for widgets with two panes,arranged either horizontally (<a class="link" href="GtkHPaned.html" title="GtkHPaned"><span class="type">GtkHPaned</span></a>) orvertically (<a class="link" href="GtkVPaned.html" title="GtkVPaned"><span class="type">GtkVPaned</span></a>). Child widgets are added to the panes of the widget with<a class="link" href="GtkPaned.html#gtk-paned-pack1"><code class="function">gtk_paned_pack1()</code></a> and <a class="link" href="GtkPaned.html#gtk-paned-pack2"><code class="function">gtk_paned_pack2()</code></a>. The divisionbeween the two children is set by default from thesize requests of the children, but it can be adjustedby the user.</p><p>A paned widget draws a separator between the twochild widgets and a small handle that the usercan drag to adjust the division. It does notdraw any relief around the children or aroundthe separator. (The space in which the separatoris called the gutter.) Often, it is usefulto put each child inside a <a class="link" href="GtkFrame.html" title="GtkFrame"><span class="type">GtkFrame</span></a> with theshadow type set to <a class="link" href="gtk-Standard-Enumerations.html#GTK-SHADOW-IN:CAPS"><code class="literal">GTK_SHADOW_IN</code></a> so that thegutter appears as a ridge. No separator is drawnif one of the children is missing.</p><p>Each child has two options that can be set, <em class="parameter"><code>resize</code></em> and <em class="parameter"><code>shrink</code></em>. If <em class="parameter"><code>resize</code></em> is true, then when the<a class="link" href="GtkPaned.html" title="GtkPaned"><span class="type">GtkPaned</span></a> is resized, that child will expandor shrink along with the paned widget. If <em class="parameter"><code>shrink</code></em>is true, then when that child can be made smallerthan its requisition by the user. Setting <em class="parameter"><code>shrink</code></em>to <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> allows the application to set a minimumsize. If <em class="parameter"><code>resize</code></em> is false for both children, thenthis is treated as if <em class="parameter"><code>resize</code></em> is true for bothchildren.</p><p>The application can set the position of the slideras if it were set by the user, by calling<a class="link" href="GtkPaned.html#gtk-paned-set-position"><code class="function">gtk_paned_set_position()</code></a>.</p><div class="example"><a name="id4287971"></a><p class="title"><b>Example&#160;46.&#160;Creating a paned widget with minimum sizes.</b></p><div class="example-contents"><pre class="programlisting">GtkWidget *hpaned = gtk_hpaned_new ();GtkWidget *frame1 = gtk_frame_new (NULL);GtkWidget *frame2 = gtk_frame_new (NULL);gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_IN);gtk_frame_set_shadow_type (GTK_FRAME (frame2), GTK_SHADOW_IN);gtk_widget_set_size_request (hpaned, 200 + GTK_PANED (hpaned)-&gt;gutter_size, -1);gtk_paned_pack1 (GTK_PANED (hpaned), frame1, TRUE, FALSE);gtk_widget_set_size_request (frame1, 50, -1);gtk_paned_pack2 (GTK_PANED (hpaned), frame2, FALSE, FALSE);gtk_widget_set_size_request (frame2, 50, -1);</pre></div></div><br class="example-break"></div><div class="refsect1" lang="en"><a name="id4287997"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id4288007"></a><h3><a name="GtkPaned-struct"></a>GtkPaned</h3><a class="indexterm" name="id4288021"></a><pre class="programlisting">typedef struct _GtkPaned GtkPaned;</pre><p></p></div><hr><div class="refsect2" lang="en"><a name="id4288035"></a><h3><a name="gtk-paned-add1"></a>gtk_paned_add1 ()</h3><a class="indexterm" name="id4288048"></a><pre class="programlisting">void                gtk_paned_add1                      (<a class="link" href="GtkPaned.html" title="GtkPaned">GtkPaned</a> *paned,                                                         <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *child);</pre><p>Adds a child to the top or left pane withdefault parameters. This is equivalentto <code class="literal">gtk_paned_pack1 (paned, child, FALSE, TRUE)</code>.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>paned</code></em>&#160;:</span></p></td><td>a paned widget</td></tr><tr><td><p><span class="term"><em class="parameter"><code>child</code></em>&#160;:</span></p></td><td>the child to add</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4288124"></a><h3><a name="gtk-paned-add2"></a>gtk_paned_add2 ()</h3><a class="indexterm" name="id4288137"></a><pre class="programlisting">void                gtk_paned_add2                      (<a class="link" href="GtkPaned.html" title="GtkPaned">GtkPaned</a> *paned,                                                         <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *child);</pre><p>Adds a child to the bottom or right pane with defaultparameters. This is equivalent to <code class="literal">gtk_paned_pack2 (paned, child, TRUE, TRUE)</code>.</p>

⌨️ 快捷键说明

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