Back to index

easystroke  0.5.5.1
Public Member Functions | Public Attributes | Private Member Functions | Friends
ButtonInfo Class Reference

#include <prefdb.h>

List of all members.

Public Member Functions

bool operator< (const ButtonInfo &bi) const
bool operator== (const ButtonInfo &bi) const
void press ()
Glib::ustring get_button_text () const
bool overlap (const ButtonInfo &bi) const
 ButtonInfo (guint button_)
 ButtonInfo ()

Public Attributes

guint button
guint state
bool instant
bool click_hold

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)

Friends

class boost::serialization::access

Detailed Description

Definition at line 31 of file prefdb.h.


Constructor & Destructor Documentation

ButtonInfo::ButtonInfo ( guint  button_) [inline]

Definition at line 60 of file prefdb.h.

: button(button_), state(0), instant(false), click_hold(false) {}
ButtonInfo::ButtonInfo ( ) [inline]

Definition at line 61 of file prefdb.h.

: button(0), state(0), instant(false), click_hold(false) {}

Member Function Documentation

Glib::ustring ButtonInfo::get_button_text ( ) const

Definition at line 1012 of file actions.cc.

                                              {
       Glib::ustring str;
       if (instant)
              str += _("(Instantly) ");
       if (click_hold)
              str += _("(Click & Hold) ");
       if (state == AnyModifier)
              str += Glib::ustring() + "(" + _("Any Modifier") + " +) ";
       else
              str += Gtk::AccelGroup::get_label(0, (Gdk::ModifierType)state);
       return str + Glib::ustring::compose(_("Button %1"), button);
}

Here is the caller graph for this function:

bool ButtonInfo::operator< ( const ButtonInfo bi) const [inline]

Definition at line 53 of file prefdb.h.

{ return button < bi.button; }
bool ButtonInfo::operator== ( const ButtonInfo bi) const [inline]

Definition at line 54 of file prefdb.h.

                                                   {
              return button == bi.button && state == bi.state && !instant == !bi.instant && !click_hold == !bi.click_hold;
       }
bool ButtonInfo::overlap ( const ButtonInfo bi) const

Definition at line 164 of file prefdb.cc.

                                                   {
       if (button != bi.button)
              return false;
       if (state == AnyModifier || bi.state == AnyModifier)
              return true;
       return !((state ^ bi.state) & ~LockMask & ~Mod2Mask);
}
template<class Archive >
void ButtonInfo::serialize ( Archive &  ar,
const unsigned int  version 
) [inline, private]

Definition at line 33 of file prefdb.h.

                                                                                        {
              ar & button;
              ar & state;
              if (version == 1) {
                     int special;
                     ar & special;
                     return;
              }
              if (version < 3)
                     return;
              ar & instant;
              if (version < 4)
                     return;
              ar & click_hold;
       }

Friends And Related Function Documentation

friend class boost::serialization::access [friend]

Definition at line 32 of file prefdb.h.


Member Data Documentation

Definition at line 49 of file prefdb.h.

Definition at line 52 of file prefdb.h.

Definition at line 51 of file prefdb.h.

Definition at line 50 of file prefdb.h.


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