gtk3/docs/reference/gtk/html/GtkCellAreaContext.html
2019-09-04 16:25:11 +01:00

781 lines
46 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkCellAreaContext: GTK+ 3 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
<link rel="up" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets">
<link rel="prev" href="GtkCellAreaBox.html" title="GtkCellAreaBox">
<link rel="next" href="GtkCellRenderer.html" title="GtkCellRenderer">
<meta name="generator" content="GTK-Doc V1.29 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</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="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
<a href="#GtkCellAreaContext.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
<a href="#GtkCellAreaContext.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
<a href="#GtkCellAreaContext.properties" class="shortcut">Properties</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="TreeWidgetObjects.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GtkCellAreaBox.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GtkCellRenderer.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GtkCellAreaContext"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GtkCellAreaContext.top_of_page"></a>GtkCellAreaContext</span></h2>
<p>GtkCellAreaContext — Stores geometrical information for a series of rows in a GtkCellArea</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GtkCellAreaContext.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="returnvalue">GtkCellArea</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkCellAreaContext.html#gtk-cell-area-context-get-area" title="gtk_cell_area_context_get_area ()">gtk_cell_area_context_get_area</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkCellAreaContext.html#gtk-cell-area-context-allocate" title="gtk_cell_area_context_allocate ()">gtk_cell_area_context_allocate</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkCellAreaContext.html#gtk-cell-area-context-reset" title="gtk_cell_area_context_reset ()">gtk_cell_area_context_reset</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkCellAreaContext.html#gtk-cell-area-context-get-preferred-width" title="gtk_cell_area_context_get_preferred_width ()">gtk_cell_area_context_get_preferred_width</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkCellAreaContext.html#gtk-cell-area-context-get-preferred-height" title="gtk_cell_area_context_get_preferred_height ()">gtk_cell_area_context_get_preferred_height</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkCellAreaContext.html#gtk-cell-area-context-get-preferred-height-for-width" title="gtk_cell_area_context_get_preferred_height_for_width ()">gtk_cell_area_context_get_preferred_height_for_width</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkCellAreaContext.html#gtk-cell-area-context-get-preferred-width-for-height" title="gtk_cell_area_context_get_preferred_width_for_height ()">gtk_cell_area_context_get_preferred_width_for_height</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkCellAreaContext.html#gtk-cell-area-context-get-allocation" title="gtk_cell_area_context_get_allocation ()">gtk_cell_area_context_get_allocation</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkCellAreaContext.html#gtk-cell-area-context-push-preferred-width" title="gtk_cell_area_context_push_preferred_width ()">gtk_cell_area_context_push_preferred_width</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkCellAreaContext.html#gtk-cell-area-context-push-preferred-height" title="gtk_cell_area_context_push_preferred_height ()">gtk_cell_area_context_push_preferred_height</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkCellAreaContext.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type">
<a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a> *</td>
<td class="property_name"><a class="link" href="GtkCellAreaContext.html#GtkCellAreaContext--area" title="The “area” property">area</a></td>
<td class="property_flags">Read / Write / Construct Only</td>
</tr>
<tr>
<td class="property_type"><span class="type">gint</span></td>
<td class="property_name"><a class="link" href="GtkCellAreaContext.html#GtkCellAreaContext--minimum-height" title="The “minimum-height” property">minimum-height</a></td>
<td class="property_flags">Read</td>
</tr>
<tr>
<td class="property_type"><span class="type">gint</span></td>
<td class="property_name"><a class="link" href="GtkCellAreaContext.html#GtkCellAreaContext--minimum-width" title="The “minimum-width” property">minimum-width</a></td>
<td class="property_flags">Read</td>
</tr>
<tr>
<td class="property_type"><span class="type">gint</span></td>
<td class="property_name"><a class="link" href="GtkCellAreaContext.html#GtkCellAreaContext--natural-height" title="The “natural-height” property">natural-height</a></td>
<td class="property_flags">Read</td>
</tr>
<tr>
<td class="property_type"><span class="type">gint</span></td>
<td class="property_name"><a class="link" href="GtkCellAreaContext.html#GtkCellAreaContext--natural-width" title="The “natural-width” property">natural-width</a></td>
<td class="property_flags">Read</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkCellAreaContext.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GtkCellAreaContext.html#GtkCellAreaContextClass" title="struct GtkCellAreaContextClass">GtkCellAreaContextClass</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="GtkCellAreaContext.html#GtkCellAreaContext-struct" title="GtkCellAreaContext">GtkCellAreaContext</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkCellAreaContext.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> GObject
<span class="lineart">╰──</span> GtkCellAreaContext
</pre>
</div>
<div class="refsect1">
<a name="GtkCellAreaContext.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gtk/gtk.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GtkCellAreaContext.description"></a><h2>Description</h2>
<p>The <a class="link" href="GtkCellAreaContext.html" title="GtkCellAreaContext"><span class="type">GtkCellAreaContext</span></a> object is created by a given <a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a>
implementation via its <a class="link" href="GtkCellArea.html#GtkCellAreaClass.create-context"><code class="function">GtkCellAreaClass.create_context()</code></a> virtual
method and is used to store cell sizes and alignments for a series of
<a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> rows that are requested and rendered in the same context.</p>
<p><a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a> widgets can create any number of contexts in which to
request and render groups of data rows. However, its important that the
same context which was used to request sizes for a given <a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a>
row also be used for the same row when calling other <a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a> APIs
such as <a class="link" href="GtkCellArea.html#gtk-cell-area-render" title="gtk_cell_area_render ()"><code class="function">gtk_cell_area_render()</code></a> and <a class="link" href="GtkCellArea.html#gtk-cell-area-event" title="gtk_cell_area_event ()"><code class="function">gtk_cell_area_event()</code></a>.</p>
</div>
<div class="refsect1">
<a name="GtkCellAreaContext.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gtk-cell-area-context-get-area"></a><h3>gtk_cell_area_context_get_area ()</h3>
<pre class="programlisting"><a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="returnvalue">GtkCellArea</span></a> *
gtk_cell_area_context_get_area (<em class="parameter"><code><a class="link" href="GtkCellAreaContext.html" title="GtkCellAreaContext"><span class="type">GtkCellAreaContext</span></a> *context</code></em>);</pre>
<p>Fetches the <a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a> this <em class="parameter"><code>context</code></em>
was created by.</p>
<p>This is generally unneeded by layouting widgets; however,
it is important for the context implementation itself to
fetch information about the area it is being used for.</p>
<p>For instance at <a class="link" href="GtkCellAreaContext.html#GtkCellAreaContextClass.allocate"><code class="function">GtkCellAreaContextClass.allocate()</code></a> time
its important to know details about any cell spacing
that the <a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a> is configured with in order to
compute a proper allocation.</p>
<div class="refsect3">
<a name="gtk-cell-area-context-get-area.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>context</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCellAreaContext.html" title="GtkCellAreaContext"><span class="type">GtkCellAreaContext</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-cell-area-context-get-area.returns"></a><h4>Returns</h4>
<p>the <a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a> this context was created by. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-cell-area-context-allocate"></a><h3>gtk_cell_area_context_allocate ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_cell_area_context_allocate (<em class="parameter"><code><a class="link" href="GtkCellAreaContext.html" title="GtkCellAreaContext"><span class="type">GtkCellAreaContext</span></a> *context</code></em>,
<em class="parameter"><code><span class="type">gint</span> width</code></em>,
<em class="parameter"><code><span class="type">gint</span> height</code></em>);</pre>
<p>Allocates a width and/or a height for all rows which are to be
rendered with <em class="parameter"><code>context</code></em>
.</p>
<p>Usually allocation is performed only horizontally or sometimes
vertically since a group of rows are usually rendered side by
side vertically or horizontally and share either the same width
or the same height. Sometimes they are allocated in both horizontal
and vertical orientations producing a homogeneous effect of the
rows. This is generally the case for <a class="link" href="GtkTreeView.html" title="GtkTreeView"><span class="type">GtkTreeView</span></a> when
<a class="link" href="GtkTreeView.html#GtkTreeView--fixed-height-mode" title="The “fixed-height-mode” property"><span class="type">“fixed-height-mode”</span></a> is enabled.</p>
<p>Since 3.0</p>
<div class="refsect3">
<a name="gtk-cell-area-context-allocate.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>context</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCellAreaContext.html" title="GtkCellAreaContext"><span class="type">GtkCellAreaContext</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>width</p></td>
<td class="parameter_description"><p>the allocated width for all <a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> rows rendered
with <em class="parameter"><code>context</code></em>
, or -1.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>height</p></td>
<td class="parameter_description"><p>the allocated height for all <a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> rows rendered
with <em class="parameter"><code>context</code></em>
, or -1.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-cell-area-context-reset"></a><h3>gtk_cell_area_context_reset ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_cell_area_context_reset (<em class="parameter"><code><a class="link" href="GtkCellAreaContext.html" title="GtkCellAreaContext"><span class="type">GtkCellAreaContext</span></a> *context</code></em>);</pre>
<p>Resets any previously cached request and allocation
data.</p>
<p>When underlying <a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> data changes its
important to reset the context if the content
size is allowed to shrink. If the content size
is only allowed to grow (this is usually an option
for views rendering large data stores as a measure
of optimization), then only the row that changed
or was inserted needs to be (re)requested with
<a class="link" href="GtkCellArea.html#gtk-cell-area-get-preferred-width" title="gtk_cell_area_get_preferred_width ()"><code class="function">gtk_cell_area_get_preferred_width()</code></a>.</p>
<p>When the new overall size of the context requires
that the allocated size changes (or whenever this
allocation changes at all), the variable row
sizes need to be re-requested for every row.</p>
<p>For instance, if the rows are displayed all with
the same width from top to bottom then a change
in the allocated width necessitates a recalculation
of all the displayed row heights using
<a class="link" href="GtkCellArea.html#gtk-cell-area-get-preferred-height-for-width" title="gtk_cell_area_get_preferred_height_for_width ()"><code class="function">gtk_cell_area_get_preferred_height_for_width()</code></a>.</p>
<p>Since 3.0</p>
<div class="refsect3">
<a name="gtk-cell-area-context-reset.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>context</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCellAreaContext.html" title="GtkCellAreaContext"><span class="type">GtkCellAreaContext</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-cell-area-context-get-preferred-width"></a><h3>gtk_cell_area_context_get_preferred_width ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_cell_area_context_get_preferred_width
(<em class="parameter"><code><a class="link" href="GtkCellAreaContext.html" title="GtkCellAreaContext"><span class="type">GtkCellAreaContext</span></a> *context</code></em>,
<em class="parameter"><code><span class="type">gint</span> *minimum_width</code></em>,
<em class="parameter"><code><span class="type">gint</span> *natural_width</code></em>);</pre>
<p>Gets the accumulative preferred width for all rows which have been
requested with this context.</p>
<p>After <a class="link" href="GtkCellAreaContext.html#gtk-cell-area-context-reset" title="gtk_cell_area_context_reset ()"><code class="function">gtk_cell_area_context_reset()</code></a> is called and/or before ever
requesting the size of a <a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a>, the returned values are 0.</p>
<div class="refsect3">
<a name="gtk-cell-area-context-get-preferred-width.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>context</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCellAreaContext.html" title="GtkCellAreaContext"><span class="type">GtkCellAreaContext</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>minimum_width</p></td>
<td class="parameter_description"><p>location to store the minimum width,
or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>natural_width</p></td>
<td class="parameter_description"><p>location to store the natural width,
or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-cell-area-context-get-preferred-height"></a><h3>gtk_cell_area_context_get_preferred_height ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_cell_area_context_get_preferred_height
(<em class="parameter"><code><a class="link" href="GtkCellAreaContext.html" title="GtkCellAreaContext"><span class="type">GtkCellAreaContext</span></a> *context</code></em>,
<em class="parameter"><code><span class="type">gint</span> *minimum_height</code></em>,
<em class="parameter"><code><span class="type">gint</span> *natural_height</code></em>);</pre>
<p>Gets the accumulative preferred height for all rows which have been
requested with this context.</p>
<p>After <a class="link" href="GtkCellAreaContext.html#gtk-cell-area-context-reset" title="gtk_cell_area_context_reset ()"><code class="function">gtk_cell_area_context_reset()</code></a> is called and/or before ever
requesting the size of a <a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a>, the returned values are 0.</p>
<div class="refsect3">
<a name="gtk-cell-area-context-get-preferred-height.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>context</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCellAreaContext.html" title="GtkCellAreaContext"><span class="type">GtkCellAreaContext</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>minimum_height</p></td>
<td class="parameter_description"><p>location to store the minimum height,
or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>natural_height</p></td>
<td class="parameter_description"><p>location to store the natural height,
or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-cell-area-context-get-preferred-height-for-width"></a><h3>gtk_cell_area_context_get_preferred_height_for_width ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_cell_area_context_get_preferred_height_for_width
(<em class="parameter"><code><a class="link" href="GtkCellAreaContext.html" title="GtkCellAreaContext"><span class="type">GtkCellAreaContext</span></a> *context</code></em>,
<em class="parameter"><code><span class="type">gint</span> width</code></em>,
<em class="parameter"><code><span class="type">gint</span> *minimum_height</code></em>,
<em class="parameter"><code><span class="type">gint</span> *natural_height</code></em>);</pre>
<p>Gets the accumulative preferred height for <em class="parameter"><code>width</code></em>
for all rows
which have been requested for the same said <em class="parameter"><code>width</code></em>
with this context.</p>
<p>After <a class="link" href="GtkCellAreaContext.html#gtk-cell-area-context-reset" title="gtk_cell_area_context_reset ()"><code class="function">gtk_cell_area_context_reset()</code></a> is called and/or before ever
requesting the size of a <a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a>, the returned values are -1.</p>
<div class="refsect3">
<a name="gtk-cell-area-context-get-preferred-height-for-width.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>context</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCellAreaContext.html" title="GtkCellAreaContext"><span class="type">GtkCellAreaContext</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>width</p></td>
<td class="parameter_description"><p>a proposed width for allocation</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>minimum_height</p></td>
<td class="parameter_description"><p>location to store the minimum height,
or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>natural_height</p></td>
<td class="parameter_description"><p>location to store the natural height,
or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-cell-area-context-get-preferred-width-for-height"></a><h3>gtk_cell_area_context_get_preferred_width_for_height ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_cell_area_context_get_preferred_width_for_height
(<em class="parameter"><code><a class="link" href="GtkCellAreaContext.html" title="GtkCellAreaContext"><span class="type">GtkCellAreaContext</span></a> *context</code></em>,
<em class="parameter"><code><span class="type">gint</span> height</code></em>,
<em class="parameter"><code><span class="type">gint</span> *minimum_width</code></em>,
<em class="parameter"><code><span class="type">gint</span> *natural_width</code></em>);</pre>
<p>Gets the accumulative preferred width for <em class="parameter"><code>height</code></em>
for all rows which
have been requested for the same said <em class="parameter"><code>height</code></em>
with this context.</p>
<p>After <a class="link" href="GtkCellAreaContext.html#gtk-cell-area-context-reset" title="gtk_cell_area_context_reset ()"><code class="function">gtk_cell_area_context_reset()</code></a> is called and/or before ever
requesting the size of a <a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a>, the returned values are -1.</p>
<div class="refsect3">
<a name="gtk-cell-area-context-get-preferred-width-for-height.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>context</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCellAreaContext.html" title="GtkCellAreaContext"><span class="type">GtkCellAreaContext</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>height</p></td>
<td class="parameter_description"><p>a proposed height for allocation</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>minimum_width</p></td>
<td class="parameter_description"><p>location to store the minimum width,
or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>natural_width</p></td>
<td class="parameter_description"><p>location to store the natural width,
or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-cell-area-context-get-allocation"></a><h3>gtk_cell_area_context_get_allocation ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_cell_area_context_get_allocation (<em class="parameter"><code><a class="link" href="GtkCellAreaContext.html" title="GtkCellAreaContext"><span class="type">GtkCellAreaContext</span></a> *context</code></em>,
<em class="parameter"><code><span class="type">gint</span> *width</code></em>,
<em class="parameter"><code><span class="type">gint</span> *height</code></em>);</pre>
<p>Fetches the current allocation size for <em class="parameter"><code>context</code></em>
.</p>
<p>If the context was not allocated in width or height, or if the
context was recently reset with <a class="link" href="GtkCellAreaContext.html#gtk-cell-area-context-reset" title="gtk_cell_area_context_reset ()"><code class="function">gtk_cell_area_context_reset()</code></a>,
the returned value will be -1.</p>
<div class="refsect3">
<a name="gtk-cell-area-context-get-allocation.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>context</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCellAreaContext.html" title="GtkCellAreaContext"><span class="type">GtkCellAreaContext</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>width</p></td>
<td class="parameter_description"><p>location to store the allocated width, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>height</p></td>
<td class="parameter_description"><p>location to store the allocated height, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-cell-area-context-push-preferred-width"></a><h3>gtk_cell_area_context_push_preferred_width ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_cell_area_context_push_preferred_width
(<em class="parameter"><code><a class="link" href="GtkCellAreaContext.html" title="GtkCellAreaContext"><span class="type">GtkCellAreaContext</span></a> *context</code></em>,
<em class="parameter"><code><span class="type">gint</span> minimum_width</code></em>,
<em class="parameter"><code><span class="type">gint</span> natural_width</code></em>);</pre>
<p>Causes the minimum and/or natural width to grow if the new
proposed sizes exceed the current minimum and natural width.</p>
<p>This is used by <a class="link" href="GtkCellAreaContext.html" title="GtkCellAreaContext"><span class="type">GtkCellAreaContext</span></a> implementations during
the request process over a series of <a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> rows to
progressively push the requested width over a series of
<a class="link" href="GtkCellArea.html#gtk-cell-area-get-preferred-width" title="gtk_cell_area_get_preferred_width ()"><code class="function">gtk_cell_area_get_preferred_width()</code></a> requests.</p>
<div class="refsect3">
<a name="gtk-cell-area-context-push-preferred-width.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>context</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCellAreaContext.html" title="GtkCellAreaContext"><span class="type">GtkCellAreaContext</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>minimum_width</p></td>
<td class="parameter_description"><p>the proposed new minimum width for <em class="parameter"><code>context</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>natural_width</p></td>
<td class="parameter_description"><p>the proposed new natural width for <em class="parameter"><code>context</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-cell-area-context-push-preferred-height"></a><h3>gtk_cell_area_context_push_preferred_height ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_cell_area_context_push_preferred_height
(<em class="parameter"><code><a class="link" href="GtkCellAreaContext.html" title="GtkCellAreaContext"><span class="type">GtkCellAreaContext</span></a> *context</code></em>,
<em class="parameter"><code><span class="type">gint</span> minimum_height</code></em>,
<em class="parameter"><code><span class="type">gint</span> natural_height</code></em>);</pre>
<p>Causes the minimum and/or natural height to grow if the new
proposed sizes exceed the current minimum and natural height.</p>
<p>This is used by <a class="link" href="GtkCellAreaContext.html" title="GtkCellAreaContext"><span class="type">GtkCellAreaContext</span></a> implementations during
the request process over a series of <a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> rows to
progressively push the requested height over a series of
<a class="link" href="GtkCellArea.html#gtk-cell-area-get-preferred-height" title="gtk_cell_area_get_preferred_height ()"><code class="function">gtk_cell_area_get_preferred_height()</code></a> requests.</p>
<div class="refsect3">
<a name="gtk-cell-area-context-push-preferred-height.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>context</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCellAreaContext.html" title="GtkCellAreaContext"><span class="type">GtkCellAreaContext</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>minimum_height</p></td>
<td class="parameter_description"><p>the proposed new minimum height for <em class="parameter"><code>context</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>natural_height</p></td>
<td class="parameter_description"><p>the proposed new natural height for <em class="parameter"><code>context</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
</div>
<div class="refsect1">
<a name="GtkCellAreaContext.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GtkCellAreaContextClass"></a><h3>struct GtkCellAreaContextClass</h3>
<pre class="programlisting">struct GtkCellAreaContextClass {
void (* allocate) (GtkCellAreaContext *context,
gint width,
gint height);
void (* reset) (GtkCellAreaContext *context);
void (* get_preferred_height_for_width) (GtkCellAreaContext *context,
gint width,
gint *minimum_height,
gint *natural_height);
void (* get_preferred_width_for_height) (GtkCellAreaContext *context,
gint height,
gint *minimum_width,
gint *natural_width);
};
</pre>
<div class="refsect3">
<a name="GtkCellAreaContextClass.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GtkCellAreaContextClass.allocate"></a>allocate</code></em> ()</p></td>
<td class="struct_member_description"><p>This tells the context that an allocation width or height
(or both) have been decided for a group of rows. The context should
store any allocations for internally aligned cells at this point so
that they dont need to be recalculated at <a class="link" href="GtkCellArea.html#gtk-cell-area-render" title="gtk_cell_area_render ()"><code class="function">gtk_cell_area_render()</code></a> time.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GtkCellAreaContextClass.reset"></a>reset</code></em> ()</p></td>
<td class="struct_member_description"><p>Clear any previously stored information about requested and
allocated sizes for the context.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GtkCellAreaContextClass.get-preferred-height-for-width"></a>get_preferred_height_for_width</code></em> ()</p></td>
<td class="struct_member_description"><p>Returns the aligned height for the given
width that context must store while collecting sizes for its rows.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GtkCellAreaContextClass.get-preferred-width-for-height"></a>get_preferred_width_for_height</code></em> ()</p></td>
<td class="struct_member_description"><p>Returns the aligned width for the given
height that context must store while collecting sizes for its rows.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GtkCellAreaContext-struct"></a><h3>GtkCellAreaContext</h3>
<pre class="programlisting">typedef struct _GtkCellAreaContext GtkCellAreaContext;</pre>
</div>
</div>
<div class="refsect1">
<a name="GtkCellAreaContext.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GtkCellAreaContext--area"></a><h3>The <code class="literal">“area”</code> property</h3>
<pre class="programlisting"> “area” <a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a> *</pre>
<p>The <a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a> this context was created by</p>
<p>Flags: Read / Write / Construct Only</p>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GtkCellAreaContext--minimum-height"></a><h3>The <code class="literal">“minimum-height”</code> property</h3>
<pre class="programlisting"> “minimum-height” <span class="type">gint</span></pre>
<p>The minimum height for the <a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a> in this context
for all <a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> rows that this context was requested
for using <a class="link" href="GtkCellArea.html#gtk-cell-area-get-preferred-height" title="gtk_cell_area_get_preferred_height ()"><code class="function">gtk_cell_area_get_preferred_height()</code></a>.</p>
<p>Flags: Read</p>
<p>Allowed values: &gt;= -1</p>
<p>Default value: -1</p>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GtkCellAreaContext--minimum-width"></a><h3>The <code class="literal">“minimum-width”</code> property</h3>
<pre class="programlisting"> “minimum-width” <span class="type">gint</span></pre>
<p>The minimum width for the <a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a> in this context
for all <a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> rows that this context was requested
for using <a class="link" href="GtkCellArea.html#gtk-cell-area-get-preferred-width" title="gtk_cell_area_get_preferred_width ()"><code class="function">gtk_cell_area_get_preferred_width()</code></a>.</p>
<p>Flags: Read</p>
<p>Allowed values: &gt;= -1</p>
<p>Default value: -1</p>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GtkCellAreaContext--natural-height"></a><h3>The <code class="literal">“natural-height”</code> property</h3>
<pre class="programlisting"> “natural-height” <span class="type">gint</span></pre>
<p>The natural height for the <a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a> in this context
for all <a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> rows that this context was requested
for using <a class="link" href="GtkCellArea.html#gtk-cell-area-get-preferred-height" title="gtk_cell_area_get_preferred_height ()"><code class="function">gtk_cell_area_get_preferred_height()</code></a>.</p>
<p>Flags: Read</p>
<p>Allowed values: &gt;= -1</p>
<p>Default value: -1</p>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GtkCellAreaContext--natural-width"></a><h3>The <code class="literal">“natural-width”</code> property</h3>
<pre class="programlisting"> “natural-width” <span class="type">gint</span></pre>
<p>The natural width for the <a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a> in this context
for all <a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> rows that this context was requested
for using <a class="link" href="GtkCellArea.html#gtk-cell-area-get-preferred-width" title="gtk_cell_area_get_preferred_width ()"><code class="function">gtk_cell_area_get_preferred_width()</code></a>.</p>
<p>Flags: Read</p>
<p>Allowed values: &gt;= -1</p>
<p>Default value: -1</p>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.29</div>
</body>
</html>