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

editable.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 00021 00022 #ifndef GFC_GTK_EDITABLE_HH 00023 #define GFC_GTK_EDITABLE_HH 00024 00025 #ifndef GFC_G_TYPE_HH 00026 #include <gfc/glib/type.hh> 00027 #endif 00028 00029 #ifndef __GTK_EDITABLE_H__ 00030 #include <gtk/gtkeditable.h> 00031 #endif 00032 00033 namespace GFC { 00034 00035 namespace Gtk { 00036 00103 00104 class Editable : public virtual G::TypeInterface 00105 { 00106 protected: 00109 00110 Editable(); 00112 00113 virtual ~Editable() = 0; 00115 00119 00120 typedef G::Signal<void, const String&, int*> InsertTextSignalType; 00121 typedef G::SignalProxy<TypeInstance, InsertTextSignalType> InsertTextSignalProxy; 00122 static const InsertTextSignalType insert_text_signal; 00129 00130 typedef G::Signal<void, int, int> DeleteTextSignalType; 00131 typedef G::SignalProxy<TypeInstance, DeleteTextSignalType> DeleteTextSignalProxy; 00132 static const DeleteTextSignalType delete_text_signal; 00139 00140 typedef G::Signal<void> ChangedSignalType; 00141 typedef G::SignalProxy<TypeInstance, ChangedSignalType> ChangedSignalProxy; 00142 static const ChangedSignalType changed_signal; 00147 00149 00150 public: 00153 00154 GtkEditable* gtk_editable() const; 00156 00157 operator GtkEditable* () const; 00159 00160 bool get_selection_bounds(int *start, int *end) const; 00165 00166 String get_chars(int start_pos, int end_pos) const; 00175 00176 int get_position() const; 00183 00184 bool get_editable() const; 00187 00191 00192 void select_region(int start, int end); 00200 00201 void insert_text(const char *new_text, int& position); 00202 void insert_text(const String& new_text, int& position); 00209 00210 void delete_text(int start_pos, int end_pos); 00218 00219 void cut_clipboard(); 00222 00223 void copy_clipboard(); 00225 00226 void paste_clipboard(); 00229 00230 void delete_selection(); 00232 00233 void set_position(int position); 00241 00242 void set_editable(bool is_editable); 00245 00249 00250 const InsertTextSignalProxy sig_insert_text(); 00256 00257 const DeleteTextSignalProxy sig_delete_text(); 00264 00265 const ChangedSignalProxy sig_changed(); 00267 00269 }; 00270 00271 } // namespace Gtk 00272 00273 } // namespace GFC 00274 00275 #include <gfc/gtk/inline/editable.inl> 00276 00277 #endif // GFC_GTK_EDITABLE_HH 00278

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