<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
<!ENTITY pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<refentry id="GtkColorChooserWidget">
<refmeta>
<refentrytitle role="top_of_page" id="GtkColorChooserWidget.top_of_page">GtkColorChooserWidget</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkColorChooserWidget</refname>
<refpurpose>A widget for choosing colors</refpurpose>
</refnamediv>

<refsect1 id="GtkColorChooserWidget.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-color-chooser-widget-new">gtk_color_chooser_widget_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkColorChooserWidget.properties" role="properties">
<title role="properties.title">Properties</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="properties_type" colwidth="150px"/>
<colspec colname="properties_name" colwidth="300px"/>
<colspec colname="properties_flags" colwidth="200px"/>
<tbody>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkColorChooserWidget--show-editor">show-editor</link></entry><entry role="property_flags">Read / Write</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkColorChooserWidget.actions" role="actions">
<title role="actions.title">Actions</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="actions_none" colwidth="150px"/>
<colspec colname="actions_name" colwidth="300px"/>
<colspec colname="actions_param" colwidth="200px"/>
<tbody>
<row><entry></entry><entry role="action_name"><link linkend="GtkColorChooserWidget|color.customize">color.customize</link></entry><entry role="parameter_type">(dddd)</entry></row>
<row><entry></entry><entry role="action_name"><link linkend="GtkColorChooserWidget|color.select">color.select</link></entry><entry role="parameter_type">(dddd)</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkColorChooserWidget.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GtkColorChooserWidget-struct">GtkColorChooserWidget</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkColorChooserWidget.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
        <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkWidget">GtkWidget</link>
            <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkColorChooserWidget
</screen>
</refsect1>
<refsect1 id="GtkColorChooserWidget.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GtkColorChooserWidget implements
 <link linkend="AtkImplementorIface">AtkImplementorIface</link>,  <link linkend="GtkBuildable">GtkBuildable</link>,  <link linkend="GtkConstraintTarget">GtkConstraintTarget</link> and  <link linkend="GtkColorChooser">GtkColorChooser</link>.</para>

</refsect1>

<refsect1 id="GtkColorChooserWidget.includes"><title>Includes</title><synopsis>#include &lt;gtk/gtk.h&gt;
</synopsis></refsect1>

<refsect1 id="GtkColorChooserWidget.description" role="desc">
<title role="desc.title">Description</title>
<para>The <link linkend="GtkColorChooserWidget"><type>GtkColorChooserWidget</type></link> widget lets the user select a
color. By default, the chooser presents a predefined palette
of colors, plus a small number of settable custom colors.
It is also possible to select a different color with the
single-color editor. To enter the single-color editing mode,
use the context menu of any color of the palette, or use the
'+' button to add a new custom color.</para>
<para>The chooser automatically remembers the last selection, as well
as custom colors.</para>
<para>To change the initially selected color, use <link linkend="gtk-color-chooser-set-rgba"><function>gtk_color_chooser_set_rgba()</function></link>.
To get the selected color use <link linkend="gtk-color-chooser-get-rgba"><function>gtk_color_chooser_get_rgba()</function></link>.</para>
<para>The <link linkend="GtkColorChooserWidget"><type>GtkColorChooserWidget</type></link> is used in the <link linkend="GtkColorChooserDialog"><type>GtkColorChooserDialog</type></link>
to provide a dialog for selecting colors.</para>
<refsect2><title>CSS names</title><para>GtkColorChooserWidget has a single CSS node with name colorchooser.</para>
</refsect2>

</refsect1>
<refsect1 id="GtkColorChooserWidget.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-color-chooser-widget-new" role="function">
<title>gtk_color_chooser_widget_new&#160;()</title>
<indexterm zone="gtk-color-chooser-widget-new"><primary>gtk_color_chooser_widget_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_color_chooser_widget_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new <link linkend="GtkColorChooserWidget"><type>GtkColorChooserWidget</type></link>.</para>
<refsect3 id="gtk-color-chooser-widget-new.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkColorChooserWidget"><type>GtkColorChooserWidget</type></link></para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkColorChooserWidget.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkColorChooserWidget-struct" role="struct">
<title>GtkColorChooserWidget</title>
<indexterm zone="GtkColorChooserWidget-struct"><primary>GtkColorChooserWidget</primary></indexterm>
<programlisting language="C">typedef struct _GtkColorChooserWidget GtkColorChooserWidget;</programlisting>
</refsect2>

</refsect1>
<refsect1 id="GtkColorChooserWidget.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkColorChooserWidget--show-editor" role="property"><title>The <literal>“show-editor”</literal> property</title>
<indexterm zone="GtkColorChooserWidget--show-editor"><primary>GtkColorChooserWidget:show-editor</primary></indexterm>
<programlisting>  “show-editor”              <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>The ::show-editor property is <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> when the color chooser
is showing the single-color editor. It can be set to switch
the color chooser into single-color editing mode.</para>
<para>Owner: GtkColorChooserWidget</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>

</refsect1>
<refsect1 id="GtkColorChooserWidget.action-details" role="action_details">
<title role="action_details.title">Action Details</title>
<refsect2 id="GtkColorChooserWidget|color.customize" role="action"><title>The <literal>“color.customize”</literal> action</title>
<indexterm zone="GtkColorChooserWidget|color.customize"><primary>GtkColorChooserWidget|color.customize</primary></indexterm>
<para>Activates the color editor for the given color.</para>
<para>Parameter type: (dddd)</para>
<refsect3 id="GtkColorChooserWidget|color.customize.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>red</para></entry>
<entry role="parameter_description"><para>the red value, between 0 and 1</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>green</para></entry>
<entry role="parameter_description"><para>the green value, between 0 and 1</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>blue</para></entry>
<entry role="parameter_description"><para>the blue value, between 0 and 1</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>alpha</para></entry>
<entry role="parameter_description"><para>the alpha value, between 0 and 1</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="GtkColorChooserWidget|color.select" role="action"><title>The <literal>“color.select”</literal> action</title>
<indexterm zone="GtkColorChooserWidget|color.select"><primary>GtkColorChooserWidget|color.select</primary></indexterm>
<para>Emits the <link linkend="GtkColorChooser-color-activated"><type>“color-activated”</type></link> signal for
the given color.</para>
<para>Parameter type: (dddd)</para>
<refsect3 id="GtkColorChooserWidget|color.select.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>red</para></entry>
<entry role="parameter_description"><para>the red value, between 0 and 1</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>green</para></entry>
<entry role="parameter_description"><para>the green value, between 0 and 1</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>blue</para></entry>
<entry role="parameter_description"><para>the blue value, between 0 and 1</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>alpha</para></entry>
<entry role="parameter_description"><para>the alpha value, between 0 and 1</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkColorChooserWidget.see-also">
<title>See Also</title>
<para><link linkend="GtkColorChooserDialog"><type>GtkColorChooserDialog</type></link></para>

</refsect1>

</refentry>
