Reference Manual
Inti Logo
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

Inti::Gtk::AccelGroup Class Reference

A GtkAccelGroup C++ wrapper class. More...

#include <inti/gtk/accelgroup.h>

Inheritance diagram for Inti::Gtk::AccelGroup:

Inti::G::Object Inti::G::TypeInstance Inti::MemoryHandler Inti::ReferencedBase List of all members.

Public Member Functions

Constructors
Accessors
Methods
Signal Proxies

Static Public Member Functions

Protected Member Functions

Constructors
Signal Handlers

Detailed Description

A GtkAccelGroup C++ wrapper class.

AccelGroup represents a group of keyboard accelerators, typically attached to a toplevel Gtk::Window (with Gtk::Window::add_accel_group()). Usually you won't need to create an AccelGroup directly; instead, when using Gtk::ItemFactory and Gtk::Menu, GTK+ automatically sets up the accelerators for your menus in the default accelerator group.

Note that accelerators are different from mnemonics. Accelerators are shortcuts for activating a menu item; they appear alongside the menu item they're a shortcut for. For example "Ctrl+Q" might appear alongside the "Quit" menu item. Mnemonics are shortcuts for GUI elements such as text entries or buttons; they appear as underlined characters. Menu items can have both accelerators and mnemonics, of course.


Constructor & Destructor Documentation

Inti::Gtk::AccelGroup::AccelGroup GtkAccelGroup *  group,
bool  reference = true
[explicit, protected]
 

Construct a new AccelGroup from an existing GtkAccelGroup.

Parameters:
group A pointer to a GtkAccelGroup.
reference Set false if the initial reference count is floating, set true if it's not.

The group can be a newly created GtkAccelGroup or an existing GtkAccelGroup. (see G::Object::Object).


Member Function Documentation

void Inti::Gtk::AccelGroup::connect const char *  accel_path,
GClosure *  closure
 

Installs an accelerator in this group, using an accelerator path to look up the appropriate key and modifiers (see Gtk::AccelMap::add_entry()).

Parameters:
accel_path The path used for determining the accelerator key value and modifiers.
closure Closure to be executed upon accelerator activation.

When the accelerator group is being activated in response to a call to activate(), closure will be invoked if the accelerator key value and modifiers from activate() match the key and modifiers for the path.

void Inti::Gtk::AccelGroup::connect const AccelKey accel_key,
GClosure *  closure
 

Installs an accelerator in the group.

Parameters:
accel_key An AccelKey specifying the accelerator key value, modifiers and flags.
closure Closure to be executed upon accelerator activation.

When the accelerator group is being activated in response to a call to activate(), closure will be invoked if the accelerator key value and modifiers from activate() match those of this connection.

Note that, due to implementation details, a single closure can only be connected to one accelerator group.

bool Inti::Gtk::AccelGroup::disconnect const AccelKey accel_key  ) 
 

Removes an accelerator previously installed through connect().

Parameters:
accel_key An AccelKey specifying the accelerator key value and modifiers.
Returns:
true if there was an accelerator which could be removed, fakse otherwise.

bool Inti::Gtk::AccelGroup::disconnect GClosure *  closure  ) 
 

Removes an accelerator previously installed through connect().

Parameters:
closure The closure to remove from this accelerator group.
Returns:
true if the closure was found and got disconnected.

AccelGroup* Inti::Gtk::AccelGroup::from_accel_closure GClosure *  closure  )  [static]
 

Finds the AccelGroup to which closure is connected; (see connect()).

Parameters:
closure A closure.
Returns:
The AccelGroup to which closure is connected, or null.

void Inti::Gtk::AccelGroup::lock  ) 
 

Locks the given accelerator group.

Locking an accelerator group prevents the accelerators contained within it being changed during runtime. Refer to Gtk::AccelMap::change_entry() about runtime accelerator changes. If called more than once, the accelerator group remains locked until unlock() has been called an equivalent number of times.

virtual void Inti::Gtk::AccelGroup::on_accel_changed const AccelKey accel_key,
GClosure *  accel_closure
[protected, virtual]
 

Called when an accelerator key is changed.

Parameters:
accel_key An AccelKey specifying the accelerator key value and modifiers.
accel_closure Closure to be executed upon accelerator activation.


The documentation for this class was generated from the following file: Main Page - Footer


Generated on Sun Sep 14 20:08:13 2003 for Inti by doxygen 1.3.2 written by Dimitri van Heesch, © 1997-2002