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

accelgroup.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_ACCEL_GROUP_HH 00025 #define GFC_GTK_ACCEL_GROUP_HH 00026 00027 #ifndef GFC_G_OBJECT_HH 00028 #include <gfc/glib/object.hh> 00029 #endif 00030 00031 #ifndef GFC_GTK_ACCEL_KEY_HH 00032 #include <gfc/gtk/accelkey.hh> 00033 #endif 00034 00035 namespace GFC { 00036 00037 namespace Gtk { 00038 00041 00042 bool accel_groups_activate(G::Object& object, const AccelKey& accel_key); 00048 00049 Gdk::ModifierTypeField accelerator_get_default_mod_mask(); 00052 00053 void accelerator_set_default_mod_mask(Gdk::ModifierTypeField default_mod_mask); 00064 00065 bool accelerator_valid(const AccelKey& accel_key); 00073 00074 AccelKey accelerator_parse(const char *accelerator, AccelFlagsField accel_flags = Gtk::ACCEL_VISIBLE); 00075 AccelKey accelerator_parse(const String& accelerator, AccelFlagsField accel_flags = Gtk::ACCEL_VISIBLE); 00085 00086 String accelerator_name(const AccelKey& accel_key); 00093 00095 00110 00111 class AccelGroup : public G::Object 00112 { 00113 friend class G::Object; 00114 00115 AccelGroup(const AccelGroup&); 00116 AccelGroup& operator=(const AccelGroup&); 00117 00118 protected: 00121 00122 explicit AccelGroup(GtkAccelGroup *group, bool owns_reference = true); 00129 00133 00134 typedef G::Signal<void, const AccelKey&, GClosure*> AccelChangedSignalType; 00135 typedef G::SignalProxy<TypeInstance, AccelChangedSignalType> AccelChangedSignalProxy; 00136 static const AccelChangedSignalType accel_changed_signal; 00143 00145 00146 public: 00149 00150 AccelGroup(); 00152 00153 virtual ~AccelGroup(); 00155 00159 00160 GtkAccelGroup* gtk_accel_group() const; 00162 00163 operator GtkAccelGroup* () const; 00165 00167 00168 static AccelGroup* from_accel_closure(GClosure *closure); 00172 00175 00176 void lock(); 00182 00183 void unlock(); 00185 00186 void connect(const AccelKey& accel_key, GClosure *closure); 00197 00198 void connect(const char *accel_path, GClosure *closure); 00199 void connect(const String& accel_path, GClosure *closure); 00208 00209 bool disconnect(GClosure *closure); 00213 00214 bool disconnect(const AccelKey& accel_key); 00218 00222 00223 const AccelChangedSignalProxy sig_accel_changed(); 00225 00227 }; 00228 00229 } // namespace Gtk 00230 00231 } // namespace GFC 00232 00233 #include <gfc/gtk/inline/accelgroup.inl> 00234 00235 #endif // GFC_GTK_ACCEL_GROUP_HH 00236

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