// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _GTKMM_COMBOBOXTEXT_H
#define _GTKMM_COMBOBOXTEXT_H


#include <glibmm.h>

/* comboboxtext.h
 *
 * Copyright (C) 2010 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., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <gtkmm/combobox.h>


#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GtkComboBoxText GtkComboBoxText;
typedef struct _GtkComboBoxTextClass GtkComboBoxTextClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */


namespace Gtk
{ class ComboBoxText_Class; } // namespace Gtk
namespace Gtk
{

/** This is a simple variant of ComboBox that hides the model-view complexity for simple text-only use cases.
 * You can add items to a ComboBoxText with append(), insert() or prepend() and remove items with remove_text().
 *
 * If the ComboBoxText contains an entry (via the 'has_entry' property), its contents can be retrieved using 
 * get_active_text(). The entry itself can be accessed by calling ComboBox::get_entry() or ComboBox::get_entry_text().
 *
 * You should not call set_model() or attempt to pack more cells into this combo box via its CellLayout base class.
 *
 * @ingroup Widgets
 */

class ComboBoxText
: public ComboBox
{
  public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
  typedef ComboBoxText CppObjectType;
  typedef ComboBoxText_Class CppClassType;
  typedef GtkComboBoxText BaseObjectType;
  typedef GtkComboBoxTextClass BaseClassType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */

  virtual ~ComboBoxText();

#ifndef DOXYGEN_SHOULD_SKIP_THIS

private:
  friend class ComboBoxText_Class;
  static CppClassType comboboxtext_class_;

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

protected:
  explicit ComboBoxText(const Glib::ConstructParams& construct_params);
  explicit ComboBoxText(GtkComboBoxText* castitem);

#endif /* DOXYGEN_SHOULD_SKIP_THIS */

public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
  static GType get_type()      G_GNUC_CONST;


  static GType get_base_type() G_GNUC_CONST;
#endif

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

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


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

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

  //Default Signal Handlers::


private:

public:

  /** Creates a new empty ComboBoxText, optionally with an entry.
   * @param has_entry If this is true then this will have an Entry widget.
   */
  explicit ComboBoxText(bool has_entry = false);
  

  void append(const Glib::ustring& text);
  
  void append(const Glib::ustring& id, const Glib::ustring& text);
  
  void insert(int position, const Glib::ustring& text);
  
  void insert(int position, const Glib::ustring& id, const Glib::ustring& text);
  
  void prepend(const Glib::ustring& text);
  
  void prepend(const Glib::ustring& id, const Glib::ustring& text);

  
  void remove_text(int position);
  
  Glib::ustring get_active_text() const;

  
  void remove_all();

  //TODO: Add a C function
  void set_active_text(const Glib::ustring& text);


};


} // 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::ComboBoxText
   */
  Gtk::ComboBoxText* wrap(GtkComboBoxText* object, bool take_copy = false);
} //namespace Glib


#endif /* _GTKMM_COMBOBOXTEXT_H */

