Back to index

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

List of all members.

Public Member Functions

 ScrollHandler (RModifiers mods_)
virtual void raw_motion (RTriple e, bool abs_x, bool abs_y)
virtual void press_master (guint b, Time t)
virtual void release (guint b, RTriple e)
virtual void proximity_out ()
virtual std::string name ()
virtual Grabber::State grab_mode ()
Handlertop ()
virtual void motion (RTriple e)
virtual void press (guint b, RTriple e)
virtual void pressure ()
virtual void pong ()
void replace_child (Handler *c)
virtual void init ()

Static Public Member Functions

static bool idle ()

Public Attributes

Handlerparent

Protected Member Functions

virtual void fake_wheel (int b1, int n1, int b2, int n2)
void move_back ()

Static Protected Member Functions

static float curve (float v)

Protected Attributes

Handlerchild

Private Attributes

RModifiers mods
std::map< guint, guint > map
int orig_x
int orig_y

Detailed Description

Definition at line 461 of file main.cc.


Constructor & Destructor Documentation

Definition at line 466 of file main.cc.

                                       : mods(mods_) {
              // If you want to use buttons > 9, you're on your own..
              map[1] = 0; map[2] = 0; map[3] = 0; map[8] = 0; map[9] = 0;
       }

Member Function Documentation

static float AbstractScrollHandler::curve ( float  v) [inline, static, protected, inherited]

Definition at line 395 of file main.cc.

                                   {
              return v * exp(log(abs(v))/3);
       }

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void AbstractScrollHandler::fake_wheel ( int  b1,
int  n1,
int  b2,
int  n2 
) [inline, protected, virtual, inherited]

Reimplemented in ScrollAdvancedHandler.

Definition at line 389 of file main.cc.

                                                               {
              for (int i = 0; i<n1; i++)
                     fake_click(b1);
              for (int i = 0; i<n2; i++)
                     fake_click(b2);
       }

Here is the call graph for this function:

Here is the caller graph for this function:

virtual Grabber::State ScrollHandler::grab_mode ( ) [inline, virtual]

Implements Handler.

Definition at line 488 of file main.cc.

{ return Grabber::RAW; }
static bool Handler::idle ( ) [inline, static, inherited]

Definition at line 135 of file main.cc.

{ return !handler->child; }

Here is the caller graph for this function:

virtual void Handler::init ( ) [inline, virtual, inherited]

Reimplemented in IdleHandler, StrokeHandler, and AdvancedHandler.

Definition at line 167 of file main.cc.

{}

Here is the caller graph for this function:

virtual void Handler::motion ( RTriple  e) [inline, virtual, inherited]

Reimplemented in StrokeHandler, AdvancedHandler, ButtonHandler, and IgnoreHandler.

Definition at line 137 of file main.cc.

{}
void AbstractScrollHandler::move_back ( ) [inline, protected, inherited]

Definition at line 399 of file main.cc.

                        {
              if (!prefs.move_back.get() || current_dev->absolute)
                     return;
              XTestFakeMotionEvent(dpy, DefaultScreen(dpy), orig_x, orig_y, 0);
       }

Here is the call graph for this function:

Here is the caller graph for this function:

virtual std::string ScrollHandler::name ( ) [inline, virtual]

Implements Handler.

Definition at line 487 of file main.cc.

{ return "Scroll"; }
virtual void Handler::pong ( ) [inline, virtual, inherited]

Reimplemented in WaitForPongHandler.

Definition at line 144 of file main.cc.

{}
virtual void Handler::press ( guint  b,
RTriple  e 
) [inline, virtual, inherited]

Reimplemented in IdleHandler, StrokeHandler, AdvancedHandler, AdvancedStrokeActionHandler, ScrollAdvancedHandler, ButtonHandler, and IgnoreHandler.

Definition at line 139 of file main.cc.

{}

Here is the caller graph for this function:

virtual void ScrollHandler::press_master ( guint  b,
Time  t 
) [inline, virtual]

Reimplemented from Handler.

Definition at line 474 of file main.cc.

                                                  {
              fake_core_button(b, false);
       }

Here is the call graph for this function:

virtual void Handler::pressure ( ) [inline, virtual, inherited]

Reimplemented in StrokeHandler.

Definition at line 142 of file main.cc.

{}
virtual void ScrollHandler::proximity_out ( ) [inline, virtual]

Reimplemented from Handler.

Definition at line 483 of file main.cc.

Here is the call graph for this function:

virtual void ScrollHandler::raw_motion ( RTriple  e,
bool  abs_x,
bool  abs_y 
) [inline, virtual]

Reimplemented from AbstractScrollHandler.

Definition at line 470 of file main.cc.

                                                                  {
              if (xinput_pressed.size())
                     AbstractScrollHandler::raw_motion(e, abs_x, abs_y);
       }

Here is the call graph for this function:

virtual void ScrollHandler::release ( guint  b,
RTriple  e 
) [inline, virtual]

Reimplemented from Handler.

Definition at line 477 of file main.cc.

                                                {
              if (in_proximity || xinput_pressed.size())
                     return;
              parent->replace_child(0);
              move_back();
       }

Here is the call graph for this function:

void Handler::replace_child ( Handler c) [inline, inherited]

Definition at line 145 of file main.cc.

                                      {
              if (child)
                     delete child;
              child = c;
              if (child)
                     child->parent = this;
              if (verbosity >= 2) {
                     std::string stack;
                     for (Handler *h = child ? child : this; h; h=h->parent) {
                            stack = h->name() + " " + stack;
                     }
                     printf("New event handling stack: %s\n", stack.c_str());
              }
              Handler *new_handler = child ? child : this;
              grabber->grab(new_handler->grab_mode());
              if (child)
                     child->init();
              while (queued.size() && Handler::idle()) {
                     (*queued.begin())();
                     queued.pop_front();
              }
       }

Here is the call graph for this function:

Here is the caller graph for this function:

Handler* Handler::top ( ) [inline, inherited]

Definition at line 129 of file main.cc.

                      {
              if (child)
                     return child->top();
              else
                     return this;
       }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Handler* Handler::child [protected, inherited]

Definition at line 125 of file main.cc.

std::map<guint, guint> ScrollHandler::map [private]

Definition at line 463 of file main.cc.

Definition at line 462 of file main.cc.

int ScrollHandler::orig_x [private]

Reimplemented from AbstractScrollHandler.

Definition at line 464 of file main.cc.

int ScrollHandler::orig_y [private]

Reimplemented from AbstractScrollHandler.

Definition at line 464 of file main.cc.

Handler* Handler::parent [inherited]

Definition at line 127 of file main.cc.


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