// -*- c++ -*-
// Generated by gmmproc 2.44.0 -- DO NOT MODIFY!
#ifndef _GTKMM_COLORCHOOSER_H
#define _GTKMM_COLORCHOOSER_H


#include <glibmm/ustring.h>
#include <sigc++/sigc++.h>

/* Copyright (C) 2012 The gtkmm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

#include <glibmm/interface.h>
#include <gtkmm/enums.h> //For Orientation.
#include <gdkmm/rgba.h>


#ifndef DOXYGEN_SHOULD_SKIP_THIS
extern "C"
{
typedef struct _GtkColorChooserInterface GtkColorChooserInterface;
}
#endif /* DOXYGEN_SHOULD_SKIP_THIS */

#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GtkColorChooser GtkColorChooser;
typedef struct _GtkColorChooserClass GtkColorChooserClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */


#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace Gtk
{ class ColorChooser_Class; } // namespace Gtk
#endif // DOXYGEN_SHOULD_SKIP_THIS

namespace Gtk
{

/** This interface can be implemented by widgets which allow the user to choose
 * a color. Depending on the situation, colors may be
 * allowed to have alpha (translucency).
 * The main widgets that implement this interface are ColorChooserWidget, ColorChooserDialog
 * and ColorChooserButton.
 *
 * @newin{3,4}
 */

class ColorChooser : public Glib::Interface
{
  
#ifndef DOXYGEN_SHOULD_SKIP_THIS

public:
  typedef ColorChooser CppObjectType;
  typedef ColorChooser_Class CppClassType;
  typedef GtkColorChooser BaseObjectType;
  typedef GtkColorChooserInterface BaseClassType;

private:
  friend class ColorChooser_Class;
  static CppClassType colorchooser_class_;

  // noncopyable
  ColorChooser(const ColorChooser&);
  ColorChooser& operator=(const ColorChooser&);

#endif /* DOXYGEN_SHOULD_SKIP_THIS */
protected:
  /**
   * You should derive from this class to use it.
   */
  ColorChooser();

#ifndef DOXYGEN_SHOULD_SKIP_THIS
  /** Called by constructors of derived classes. Provide the result of 
   * the Class init() function to ensure that it is properly 
   * initialized.
   * 
   * @param interface_class The Class object for the derived type.
   */
  explicit ColorChooser(const Glib::Interface_Class& interface_class);

public:
  // This is public so that C++ wrapper instances can be
  // created for C instances of unwrapped types.
  // For instance, if an unexpected C type implements the C interface. 
  explicit ColorChooser(GtkColorChooser* castitem);

protected:
#endif /* DOXYGEN_SHOULD_SKIP_THIS */

public:
  virtual ~ColorChooser();

  static void add_interface(GType gtype_implementer);

  /** Get the GType for this class, for use with the underlying GObject type system.
   */
  static GType get_type()      G_GNUC_CONST;

#ifndef DOXYGEN_SHOULD_SKIP_THIS
  static GType get_base_type() G_GNUC_CONST;
#endif

  ///Provides access to the underlying C GObject.
  GtkColorChooser*       gobj()       { return reinterpret_cast<GtkColorChooser*>(gobject_); }

  ///Provides access to the underlying C GObject.
  const GtkColorChooser* gobj() const { return reinterpret_cast<GtkColorChooser*>(gobject_); }

private:


public:
  /** Gets the currently selected color.
   * @return The currently selected color.
   * @newin{3,4}
   */
  Gdk::RGBA get_rgba() const;
  

  /** Sets the color.
   * 
   * @newin{3,4}
   * 
   * @param color The new color.
   */
  void set_rgba(const Gdk::RGBA& color);
  
  /** Returns whether the color chooser shows the alpha channel.
   * 
   * @newin{3,4}
   * 
   * @return <tt>true</tt> if the color chooser uses the alpha channel,
   * <tt>false</tt> if not.
   */
  bool get_use_alpha() const;
  
  /** Sets whether or not the color chooser should use the alpha channel.
   * 
   * @newin{3,4}
   * 
   * @param use_alpha <tt>true</tt> if color chooser should use alpha channel, <tt>false</tt> if not.
   */
  void set_use_alpha(bool use_alpha =  true);

 /** Adds a palette to the color chooser. If @a orientation is horizontal,
  * the colors are grouped in rows, with @a colors_per_line colors
  * in each row. If @a orientation is vertical, the colors are grouped
  * in columns instead.
  *
  * The default color palette of ColorChooserWidget has
  * 27 colors, organized in columns of 3 colors. The default gray
  * palette has 9 grays in a single row.
  *
  * The layout of the color chooser widget works best when the
  * palettes have 9-10 columns.
  *
  * Calling this function for the first time has the
  * side effect of removing the default color and gray palettes
  * from the color chooser.
  *
  * @param orientation ORIENTATION_HORIZONTAL if the palette should be displayed in rows, or ORIENTATION_VERTICAL for columns
  * @param colors_per_line The number of colors to show in each row/column.
  * @param colors The colors of the palette.
  *
  * @newin{3,4}
  */
  void add_palette(Orientation orientation, int colors_per_line, const std::vector<Gdk::RGBA>& colors);
  

//#m4 __CONVERSION(`const Gdk::RGBA&',`const GdkRGBA*',`const_cast<GdkRGBA*>(($3).gobj())')
  
  /**
   * @par Slot Prototype:
   * <tt>void on_my_%color_activated(const Gdk::RGBA& color)</tt>
   *
   * Emitted when a color is activated from the color chooser.
   * This usually happens when the user clicks a color swatch,
   * or a color is selected and the user presses one of the keys
   * Space, Shift+Space, Return or Enter.
   * 
   * @newin{3,4}
   * 
   * @param color The color.
   */

  Glib::SignalProxy1< void,const Gdk::RGBA& > signal_color_activated();


  /** Current color, as a GdkRGBA.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the value of the property,
   * or receive notification when the value of the property changes.
   */
  Glib::PropertyProxy< Gdk::RGBA > property_rgba() ;

/** Current color, as a GdkRGBA.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
   * or receive notification when the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly< Gdk::RGBA > property_rgba() const;

  /** Whether alpha should be shown.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the value of the property,
   * or receive notification when the value of the property changes.
   */
  Glib::PropertyProxy< bool > property_use_alpha() ;

/** Whether alpha should be shown.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
   * or receive notification when the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly< bool > property_use_alpha() const;


public:

public:
  //C++ methods used to invoke GTK+ virtual functions:

protected:
  //GTK+ Virtual Functions (override these to change behaviour):

  //Default Signal Handlers::
  /// This is a default handler for the signal signal_color_activated().
  virtual void on_color_activated(const Gdk::RGBA& color);


};

} // namespace Gtk


namespace Glib
{
  /** A Glib::wrap() method for this object.
   * 
   * @param object The C instance.
   * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
   * @result A C++ instance that wraps this C instance.
   *
   * @relates Gtk::ColorChooser
   */
  Glib::RefPtr<Gtk::ColorChooser> wrap(GtkColorChooser* object, bool take_copy = false);

} // namespace Glib


#endif /* _GTKMM_COLORCHOOSER_H */

