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

accelmap.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_ACCEL_MAP_HH 00023 #define GFC_GTK_ACCEL_MAP_HH 00024 00025 #ifndef GFC_G_OBJECT_HH 00026 #include <gfc/glib/object.hh> 00027 #endif 00028 00029 #ifndef GFC_GTK_ACCEL_KEY_HH 00030 #include <gfc/gtk/accelkey.hh> 00031 #endif 00032 00033 #ifndef __GTK_ACCEL_MAP_H__ 00034 #include <gtk/gtkaccelmap.h> 00035 #endif 00036 00037 namespace GFC { 00038 00039 namespace G { 00040 class Scanner; 00041 } 00042 00043 namespace Gtk { 00044 00047 00048 class AccelMap : public G::Object 00049 { 00050 friend class G::Object; 00051 00052 AccelMap(const AccelMap&); 00053 AccelMap& operator=(const AccelMap&); 00054 00055 protected: 00058 00059 explicit AccelMap(GtkAccelMap *map, bool owns_reference = true); 00066 00070 00071 typedef G::Signal<void, const String&, const AccelKey&> ChangedSignalType; 00072 typedef G::SignalProxy<TypeInstance, ChangedSignalType> ChangedSignalProxy; 00073 static const ChangedSignalType changed_signal; 00081 00083 00084 public: 00085 typedef sigc::slot<void, const String&, const AccelKey&, bool> ForeachSlot; 00095 00098 00099 virtual ~AccelMap(); 00101 00105 00106 GtkAccelMap* gtk_accel_map() const; 00108 00109 operator GtkAccelMap* () const; 00111 00113 00114 static AccelMap* get(); 00120 00121 static bool lookup_entry(const char *accel_path, AccelKey *accel_key = 0); 00122 static bool lookup_entry(const String& accel_path, AccelKey *accel_key = 0); 00127 00128 static void add_entry(const char *accel_path, const AccelKey& accel_key); 00129 static void add_entry(const String& accel_path, const AccelKey& accel_key); 00145 00146 static bool change_entry(const char *accel_path, const AccelKey& accel_key, bool replace); 00147 static bool change_entry(const String& accel_path, const AccelKey& accel_key, bool replace); 00159 00160 static void load(const char *filename); 00161 static void load(const String& filename); 00165 00166 static void load(int file_descriptor); 00171 00172 static void load(G::Scanner& scanner); 00175 00176 static void save(const char *filename); 00177 static void save(const String& filename); 00182 00183 static void save(int file_descriptor); 00186 00187 static void foreach(const ForeachSlot& slot); 00195 00196 static void lock_path(const char *accel_path); 00197 static void lock_path(const String& accel_path); 00212 00213 static void unlock_path(const char *accel_path); 00214 static void unlock_path(const String& accel_path); 00217 00220 00221 const ChangedSignalProxy sig_changed(const char *accel_path = 0); 00222 const ChangedSignalProxy sig_changed(const String& accel_path); 00230 00232 }; 00233 00234 } // namespace Gtk 00235 00236 } // namespace GFC 00237 00238 #include <gfc/gtk/inline/accelmap.inl> 00239 00240 #endif // GFC_GTK_ACCEL_MAP_HH 00241

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