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

entry.hh

Go to the documentation of this file.
00001 /* GFC-UI: GTK+ Foundation Classes (User Interface Library) 00002 * Copyright (C) 2002-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_HH 00025 #define GFC_GTK_ENTRY_HH 00026 00027 #ifndef GFC_GTK_WIDGET_HH 00028 #include <gfc/gtk/widget.hh> 00029 #endif 00030 00031 #ifndef GFC_GTK_EDITABLE_HH 00032 #include <gfc/gtk/editable.hh> 00033 #endif 00034 00035 #ifndef GFC_GTK_CELL_EDITABLE_HH 00036 #include <gfc/gtk/celleditable.hh> 00037 #endif 00038 00039 #ifndef __GTK_ENTRY_H__ 00040 #include <gtk/gtkentry.h> 00041 #endif 00042 00043 namespace GFC { 00044 00045 namespace G { 00046 class Unichar; 00047 } 00048 00049 namespace Pango { 00050 class Layout; 00051 } 00052 00053 namespace Gtk { 00054 00055 class EntryCompletion; 00056 class Menu; 00057 00065 00066 class Entry : public Widget, public Editable, public CellEditable 00067 { 00068 friend class G::Object; 00069 00070 Entry(const Entry&); 00071 Entry& operator=(const Entry&); 00072 00073 protected: 00076 00077 explicit Entry(GtkEntry *entry, bool owns_reference = false); 00084 00088 00089 typedef G::Signal<void, Menu&> PopulatePopupSignalType; 00090 typedef G::SignalProxy<TypeInstance, PopulatePopupSignalType> PopulatePopupSignalProxy; 00091 static const PopulatePopupSignalType populate_popup_signal; 00097 00098 typedef G::Signal<void> ActviateSignalType; 00099 typedef G::SignalProxy<TypeInstance, ActviateSignalType> ActviateSignalProxy; 00100 static const ActviateSignalType activate_signal; 00105 00106 typedef G::Signal<void, const String&> InsertAtCursorSignalType; 00107 typedef G::SignalProxy<TypeInstance, InsertAtCursorSignalType> InsertAtCursorSignalProxy; 00108 static const InsertAtCursorSignalType insert_at_cursor_signal; 00114 00116 00117 public: 00120 00121 Entry(); 00123 00124 explicit Entry(int max_length); 00129 00130 virtual ~Entry(); 00132 00136 00137 GtkEntry* gtk_entry() const; 00139 00140 operator GtkEntry* () const; 00142 00143 String get_text() const; 00146 00147 bool get_visibility() const; 00149 00150 G::Unichar get_invisible_char() const; 00154 00155 bool get_has_frame() const; 00157 00158 bool get_activates_default() const; 00160 00161 int get_width_chars() const; 00163 00164 int get_max_length() const; 00167 00168 Pango::Layout* get_layout() const; 00175 00176 void get_layout_offsets(int *x, int *y) const; 00186 00187 float get_alignment() const; 00190 00191 EntryCompletion* get_completion() const; 00194 00198 00199 void set_visibility(bool visible); 00207 00208 void set_invisible_char(G::Unichar ch); 00217 00218 void set_has_frame(bool setting); 00221 00222 void set_max_length(int max); 00228 00229 void set_text(const char *text); 00230 void set_text(const String& text); 00233 00234 void set_alignment(float xalign); 00240 00241 void set_completion(EntryCompletion *completion); 00247 00248 void set_activates_default(bool setting); 00255 00256 void set_width_chars(int n_chars); 00263 00267 00268 const PopulatePopupSignalProxy sig_populate_popup(); 00270 00271 const ActviateSignalProxy sig_activate(); 00273 00274 const InsertAtCursorSignalProxy sig_insert_at_cursor(); 00277 00279 }; 00280 00281 } // namespace Gtk 00282 00283 } // namespace GFC 00284 00285 #include <gfc/gtk/inline/entry.inl> 00286 00287 #endif // GFC_GTK_ENTRY_HH 00288

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