1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256
|
<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="class-gtkmisc">
<refnamediv>
<refname>gtk.Misc</refname>
<refpurpose>a base class for widgets with alignments and
padding.</refpurpose>
</refnamediv>
<refsect1>
<title>Synopsis</title>
<classsynopsis language="python">
<ooclass><classname>gtk.Misc</classname></ooclass>
<ooclass><classname><link
linkend="class-gtkwidget">gtk.Widget</link></classname></ooclass>
<methodsynopsis language="python">
<methodname><link
linkend="method-gtkmisc--set-alignment">set_alignment</link></methodname>
<methodparam><parameter
role="keyword">xalign</parameter></methodparam>
<methodparam><parameter
role="keyword">yalign</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gtkmisc--get-alignment">get_alignment</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gtkmisc--set-padding">set_padding</link></methodname>
<methodparam><parameter
role="keyword">xpad</parameter></methodparam>
<methodparam><parameter
role="keyword">ypad</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gtkmisc--get-padding">get_padding</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
</classsynopsis>
</refsect1>
<refsect1>
<title>Ancestry</title>
<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+-- <link linkend="class-gtkobject">gtk.Object</link>
+-- <link linkend="class-gtkwidget">gtk.Widget</link>
+-- <link linkend="class-gtkmisc">gtk.Misc</link>
</synopsis>
</refsect1>
<refsect1>
<title>Implemented Interfaces</title>
<para>
<link linkend="class-gtkmisc"><classname>gtk.Misc</classname></link>
implements
<link linkend="class-gtkbuildable"><classname>gtk.Buildable</classname></link>
</para>
</refsect1>
<refsect1 id="properties-gtkmisc">
<title>gtk.Misc Properties</title>
<para><link linkend="properties-gtkobject">gtk.Object Properties</link></para>
<para><link linkend="properties-gtkwidget">gtk.Widget Properties</link></para>
<blockquote role="properties">
<informaltable pgwide="1" frame="none">
<tgroup cols="3">
<colspec column="1" colwidth="1in"/>
<colspec column="2" colwidth="1in"/>
<colspec column="3" colwidth="4in"/>
<tbody>
<row valign="top">
<entry>"xalign"</entry>
<entry>Read-Write</entry>
<entry>The horizontal alignment, from 0.0 to 1.0</entry>
</row>
<row valign="top">
<entry>"xpad"</entry>
<entry>Read-Write</entry>
<entry>The amount of space to add on the left and right of the
widget, in pixels</entry>
</row>
<row valign="top">
<entry>"yalign"</entry>
<entry>Read-Write</entry>
<entry>The vertical alignment, from 0.0 to 1.0</entry>
</row>
<row valign="top">
<entry>"ypad"</entry>
<entry>Read-Write</entry>
<entry>The amount of space to add above and below the widget,
in pixels</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</blockquote>
</refsect1>
<refsect1 id="style-properties-gtkmisc">
<title>gtk.Misc Style Properties</title>
<para><link linkend="style-properties-gtkwidget">gtk.Widget Style Properties</link></para>
</refsect1>
<refsect1 id="signal-prototypes-gtkmisc">
<title>gtk.Misc Signal Prototypes</title>
<para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
<para><link linkend="signal-prototypes-gtkobject">gtk.Object Signal Prototypes</link></para>
<para><link linkend="signal-prototypes-gtkwidget">gtk.Widget Signal Prototypes</link></para>
</refsect1>
<refsect1>
<title>Description</title>
<para>The <link
linkend="class-gtkmisc"><classname>gtk.Misc</classname></link> widget is an
abstract widget used to derive subclasses which have alignment and padding
attributes. The horizontal and vertical padding attributes allow extra space
to be added around the widget. The horizontal and vertical alignment
attributes enable the widget to be positioned within its allocated area. The
alignment values represent the fraction of available free space (allocation
minus the widget size) to place to the left or above the widget for x and y
alignment respectively. Note that if the widget is added to a container in
such a way that it expands automatically to fill its allocated area, the
alignment settings will have no effect.</para>
</refsect1>
<refsect1>
<title>Methods</title>
<refsect2 id="method-gtkmisc--set-alignment">
<title>gtk.Misc.set_alignment</title>
<programlisting><methodsynopsis language="python">
<methodname>set_alignment</methodname>
<methodparam><parameter
role="keyword">xalign</parameter></methodparam>
<methodparam><parameter
role="keyword">yalign</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">xalign</parameter> :</term>
<listitem><simpara>the horizontal alignment</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">yalign</parameter> :</term>
<listitem><simpara>the vertical alignment</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>set_alignment</methodname>() method sets the
alignment of the widget in its allocated space. <parameter>xalign</parameter>
sets the fraction (0.0-1.0) of free space (horizontal allocation minus
widget width) to place to the left of the widget.
<parameter>yalign</parameter> sets the fraction (0.0-1.0) of free space
(vertical allocation minus widget height) to place above the widget.</para>
</refsect2>
<refsect2 id="method-gtkmisc--get-alignment">
<title>gtk.Misc.get_alignment</title>
<programlisting><methodsynopsis language="python">
<methodname>get_alignment</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>a tuple containing the X and Y alignments of the
widget</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>get_alignment</methodname>() method returns a
tuple containing the X and Y alignments of the widget within its allocation.
See <link
linkend="method-gtkmisc--set-alignment"><methodname>set_alignment</methodname>()</link>.</para>
</refsect2>
<refsect2 id="method-gtkmisc--set-padding">
<title>gtk.Misc.set_padding</title>
<programlisting><methodsynopsis language="python">
<methodname>set_padding</methodname>
<methodparam><parameter
role="keyword">xpad</parameter></methodparam>
<methodparam><parameter
role="keyword">ypad</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">xpad</parameter> :</term>
<listitem><simpara>the amount of space to add on the left and
right of the widget, in pixels.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">ypad</parameter> :</term>
<listitem><simpara>the amount of space to add on the top and
bottom of the widget, in pixels.</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>set_padding</methodname>() method sets the
amount of space to add around the widget. The <parameter>xpad</parameter>
value specifies the number of pixels of padding to add to the left and right
of the widget. The <parameter>yalign</parameter> value specifies the number
of pixels to add above and below the widget.</para>
</refsect2>
<refsect2 id="method-gtkmisc--get-padding">
<title>gtk.Misc.get_padding</title>
<programlisting><methodsynopsis language="python">
<methodname>get_padding</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>a tuple containing the horizontal and vertical
padding in pixels for the widget.</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>get_padding</methodname>() method returns a
tuple containing the padding in the horizontal and vertical directions of
the widget. See <link
linkend="method-gtkmisc--set-padding"><methodname>set_padding</methodname>()</link>.</para>
</refsect2>
</refsect1>
</refentry>
|