GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

combobox.hh

Go to the documentation of this file.
00001 /* GFC-UI: GTK+ Foundation Classes (User Interface Library) 00002 * Copyright (C) 2004 The GFC Development Team. 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU Library General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Library General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 */ 00018 00023 00024 #ifndef GFC_GTK_COMBO_BOX_HH 00025 #define GFC_GTK_COMBO_BOX_HH 00026 00027 #ifndef GFC_GTK_BIN_HH 00028 #include <gfc/gtk/bin.hh> 00029 #endif 00030 00031 #ifndef GFC_GTK_CELL_LAYOUT_HH 00032 #include <gfc/gtk/celllayout.hh> 00033 #endif 00034 00035 #ifndef __GTK_COMBO_BOX_H__ 00036 #include <gtk/gtkcombobox.h> 00037 #endif 00038 00039 namespace GFC { 00040 00041 namespace Gtk { 00042 00047 00048 class ComboBox : public Bin, public CellLayout 00049 { 00050 friend class G::Object; 00051 00052 ComboBox(const ComboBox&); 00053 ComboBox& operator=(const ComboBox&); 00054 00055 protected: 00058 00059 explicit ComboBox(GtkComboBox *combo_box, bool owns_reference = false); 00066 00070 00071 typedef G::Signal<void> ChangedSignalType; 00072 typedef G::SignalProxy<TypeInstance, ChangedSignalType> ChangedSignalProxy; 00073 static const ChangedSignalType changed_signal; 00078 00080 00081 public: 00084 00085 ComboBox(); 00087 00088 ComboBox(TreeModel& model); 00091 00092 virtual ~ComboBox(); 00094 00098 00099 GtkComboBox* gtk_combo_box() const; 00101 00102 operator GtkComboBox* () const; 00104 00105 int get_active() const; 00108 00109 bool get_active_iter(TreeIter& iter) const; 00113 00114 TreeModel* get_model() const; 00117 00121 00122 void set_wrap_width(int width); 00128 00129 void set_row_span_column(int row_span); 00134 00135 void set_column_span_column(int column_span); 00140 00141 void set_active(int index); 00144 00145 void set_active_iter(const TreeIter& iter); 00150 00151 void set_model(TreeModel& model); 00156 00157 void append_text(const char *text); 00158 void append_text(const String& text); 00163 00164 void prepend_text(const char *text); 00165 void prepend_text(const String& text); 00170 00171 void insert_text(int position, const char *text); 00172 void insert_text(int position, const String& text); 00178 00179 void remove_text(int position); 00184 00185 void popup(); 00188 00189 void popdown(); 00192 00196 00197 const ChangedSignalProxy sig_changed(); 00199 00201 }; 00202 00210 00211 class ComboBoxText : public ComboBox 00212 { 00213 ComboBoxText(const ComboBoxText&); 00214 ComboBoxText& operator=(const ComboBoxText&); 00215 00216 public: 00219 00220 ComboBoxText(); 00222 00223 virtual ~ComboBoxText(); 00225 00227 }; 00228 00229 } // namespace Gtk 00230 00231 } // namespace GFC 00232 00233 #include <gfc/gtk/inline/combobox.inl> 00234 00235 #endif // GFC_GTK_COMBO_BOX_HH 00236

Generated on Tue Aug 24 00:34:30 2004 for GFC-UI by doxygen 1.3.8