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

entrycompletion.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_ENTRY_COMPLETION_HH 00025 #define GFC_GTK_ENTRY_COMPLETION_HH 00026 00027 #ifndef GFC_G_OBJECT_HH 00028 #include <gfc/glib/object.hh> 00029 #endif 00030 00031 #ifndef GFC_GTK_CELL_LAYOUT_HH 00032 #include <gfc/gtk/celllayout.hh> 00033 #endif 00034 00035 #ifndef GFC_GTK_ENTRY_HH 00036 #include <gfc/gtk/entry.hh> 00037 #endif 00038 00039 #ifndef __GTK_ENTRY_COMPLETION_H__ 00040 #include <gtk/gtkentrycompletion.h> 00041 #endif 00042 00043 namespace GFC { 00044 00045 namespace Gtk { 00046 00047 class TreeIter; 00048 class TreeModel; 00049 00074 00075 class EntryCompletion : public G::Object, public CellLayout 00076 { 00077 friend class G::Object; 00078 00079 EntryCompletion(const EntryCompletion&); 00080 EntryCompletion& operator=(const EntryCompletion&); 00081 00082 protected: 00085 00086 explicit EntryCompletion(GtkEntryCompletion *completion, bool owns_reference = true); 00093 00097 00098 typedef G::Signal<bool, const TreeModel&, const TreeIter&> MatchSelectedSignalType; 00099 typedef G::SignalProxy<TypeInstance, MatchSelectedSignalType> MatchSelectedSignalProxy; 00100 static const MatchSelectedSignalType match_selected_signal; 00108 00109 typedef G::Signal<void, int> ActionActivatedSignalType; 00110 typedef G::SignalProxy<TypeInstance, ActionActivatedSignalType> ActionActivatedSignalProxy; 00111 static const ActionActivatedSignalType action_activated_signal; 00117 00119 00120 public: 00121 typedef sigc::slot<bool, const String&, const TreeIter&> MatchSlot; 00132 00135 00136 EntryCompletion(); 00138 00139 virtual ~EntryCompletion(); 00141 00145 00146 GtkEntryCompletion* gtk_entry_completion() const; 00148 00149 operator GtkEntryCompletion* () const; 00151 00152 Entry* get_entry() const; 00155 00156 TreeModel* get_model() const; 00159 00160 int get_minimum_key_length() const; 00163 00167 00168 void set_model(TreeModel& model); 00174 00175 void set_match_func(const MatchSlot& slot); 00181 00182 void set_minimum_key_length(int length); 00188 00189 void complete(); 00193 00194 void insert_action_text(int index, const char *text); 00195 void insert_action_text(int index, const String& text); 00202 00203 void insert_action_markup(int index, const char *markup); 00204 void insert_action_markup(int index, const String& markup); 00209 00210 void delete_action(int index); 00213 00214 void set_text_column(int column); 00223 00227 00228 const MatchSelectedSignalProxy sig_match_selected(); 00230 00231 const ActionActivatedSignalProxy sig_action_activated(); 00233 00235 }; 00236 00237 } // namespace Gtk 00238 00239 } // namespace GFC 00240 00241 #include <gfc/gtk/inline/entrycompletion.inl> 00242 00243 #endif // GFC_GTK_ENTRY_COMPLETION_HH 00244

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