Back to index

easystroke  0.5.5.1
Public Member Functions | Protected Member Functions | Private Attributes
CellEditableAccel Class Reference
Collaboration diagram for CellEditableAccel:
Collaboration graph
[legend]

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

CellRendererTextishparent
Glib::ustring path

Detailed Description

Definition at line 58 of file actions.cc.


Constructor & Destructor Documentation

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

Definition at line 62 of file actions.cc.

                                                                                                    :
              Glib::ObjectBase(typeid(CellEditableAccel)),
              parent(parent_), path(path_)
       {
              WIDGET(Gtk::Label, label, _("Key combination..."));
              label.set_alignment(0.0, 0.5);
              add(label);
              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));
              show_all();
       }

Member Function Documentation

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

Definition at line 108 of file actions.cc.

                                      {
              remove_modal_grab();
              get_window()->keyboard_ungrab(CurrentTime);
              Gtk::CellEditable::on_editing_done();
       }

Here is the call graph for this function:

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

Definition at line 81 of file actions.cc.

                                       {
              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;
              }

              editing_done();
              remove_widget();

              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 actions.cc.

                                                         {
              add_modal_grab();
              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 actions.cc.

Glib::ustring CellEditableAccel::path [private]

Definition at line 60 of file actions.cc.


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