Back to index

Public Member Functions | Protected Member Functions | Private Attributes
CellEditableAccel Class Reference
Collaboration diagram for CellEditableAccel:
Collaboration graph

List of all members.

Public Member Functions

 CellEditableAccel (CellRendererTextish *parent_, const Glib::ustring &path_, Gtk::Widget &widget)

Protected Member Functions

virtual void start_editing_vfunc (GdkEvent *event)
bool on_key (GdkEventKey *event)
virtual void on_editing_done ()

Private Attributes

Glib::ustring path

Detailed Description

Definition at line 58 of file

Constructor & Destructor Documentation

CellEditableAccel::CellEditableAccel ( CellRendererTextish parent_,
const Glib::ustring &  path_,
Gtk::Widget &  widget 
) [inline]

Definition at line 62 of file

              parent(parent_), path(path_)
              WIDGET(Gtk::Label, label, _("Key combination..."));
              label.set_alignment(0.0, 0.5);
              modify_bg(Gtk::STATE_NORMAL, widget.get_style()->get_bg(Gtk::STATE_SELECTED));
              label.modify_fg(Gtk::STATE_NORMAL, widget.get_style()->get_fg(Gtk::STATE_SELECTED));

Member Function Documentation

virtual void CellEditableAccel::on_editing_done ( ) [inline, protected, virtual]

Definition at line 108 of file


Here is the call graph for this function:

bool CellEditableAccel::on_key ( GdkEventKey *  event) [inline, protected]

Definition at line 81 of file

              if (event->is_modifier)
                     return true;
              switch (event->keyval) {
                     case GDK_Super_L:
                     case GDK_Super_R:
                     case GDK_Hyper_L:
                     case GDK_Hyper_R:
                            return true;
              guint mods = event->state & gtk_accelerator_get_default_mod_mask();
              guint key;
              if (mods & ~GDK_SHIFT_MASK) {
                     key = XKeycodeToKeysym(dpy, event->hardware_keycode, 0);
              } else {
                     key = gdk_keyval_to_lower(event->keyval);
                     if (key == event->keyval)
                            mods = 0;


              parent->signal_key_edited().emit(path, key, (Gdk::ModifierType)mods, event->hardware_keycode);
              return true;

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void CellEditableAccel::start_editing_vfunc ( GdkEvent *  event) [inline, protected, virtual]

Definition at line 75 of file

              get_window()->keyboard_grab(false, gdk_event_get_time(event));
              signal_key_press_event().connect(sigc::mem_fun(*this, &CellEditableAccel::on_key));

Here is the call graph for this function:

Member Data Documentation

Definition at line 59 of file

Glib::ustring CellEditableAccel::path [private]

Definition at line 60 of file

The documentation for this class was generated from the following file: