Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::UI::Widget::Rotateable Class Reference

Widget adjustable by dragging it to rotate away from a zero-change axis. More...

#include <rotateable.h>

Inheritance diagram for Inkscape::UI::Widget::Rotateable:
Inkscape::UI::Widget::RotateableStrokeWidth Inkscape::UI::Widget::RotateableSwatch

Public Member Functions

 Rotateable ()
 
 ~Rotateable () override
 

Public Attributes

double axis
 
double current_axis
 
double maxdecl
 
bool scrolling
 

Private Member Functions

Gtk::EventSequenceState on_click (Gtk::GestureClick const &click, int n_press, double x, double y)
 
Gtk::EventSequenceState on_release (Gtk::GestureClick const &click, int n_press, double x, double y)
 
void on_motion (Gtk::EventControllerMotion const &motion, double x, double y)
 
bool on_scroll (Gtk::EventControllerScroll const &scroll, double dx, double dy)
 
virtual void do_motion (double, unsigned)
 
virtual void do_release (double, unsigned)
 
virtual void do_scroll (double, unsigned)
 

Static Private Member Functions

static unsigned get_single_modifier (unsigned old, unsigned state)
 

Private Attributes

double drag_started_x
 
double drag_started_y
 
unsigned modifier
 
bool dragging
 
bool working
 

Detailed Description

Widget adjustable by dragging it to rotate away from a zero-change axis.

Definition at line 29 of file rotateable.h.

Constructor & Destructor Documentation

◆ Rotateable()

Inkscape::UI::Widget::Rotateable::Rotateable ( )

◆ ~Rotateable()

Inkscape::UI::Widget::Rotateable::~Rotateable ( )
overridedefault

Member Function Documentation

◆ do_motion()

virtual void Inkscape::UI::Widget::Rotateable::do_motion ( double  ,
unsigned   
)
inlineprivatevirtual

Definition at line 56 of file rotateable.h.

Referenced by on_motion().

◆ do_release()

virtual void Inkscape::UI::Widget::Rotateable::do_release ( double  ,
unsigned   
)
inlineprivatevirtual

Definition at line 57 of file rotateable.h.

Referenced by on_motion(), and on_release().

◆ do_scroll()

virtual void Inkscape::UI::Widget::Rotateable::do_scroll ( double  ,
unsigned   
)
inlineprivatevirtual

Definition at line 58 of file rotateable.h.

Referenced by on_scroll().

◆ get_single_modifier()

unsigned Inkscape::UI::Widget::Rotateable::get_single_modifier ( unsigned  old,
unsigned  state 
)
staticprivate

Definition at line 61 of file rotateable.cpp.

Referenced by on_click(), on_motion(), and on_scroll().

◆ on_click()

Gtk::EventSequenceState Inkscape::UI::Widget::Rotateable::on_click ( Gtk::GestureClick const &  click,
int  n_press,
double  x,
double  y 
)
private

Definition at line 48 of file rotateable.cpp.

References axis, current_axis, drag_started_x, drag_started_y, dragging, get_single_modifier(), modifier, and working.

Referenced by Rotateable().

◆ on_motion()

void Inkscape::UI::Widget::Rotateable::on_motion ( Gtk::EventControllerMotion const &  motion,
double  x,
double  y 
)
private

◆ on_release()

Gtk::EventSequenceState Inkscape::UI::Widget::Rotateable::on_release ( Gtk::GestureClick const &  click,
int  n_press,
double  x,
double  y 
)
private

Definition at line 131 of file rotateable.cpp.

References axis, current_axis, do_release(), drag_started_x, drag_started_y, dragging, maxdecl, modifier, and working.

Referenced by Rotateable().

◆ on_scroll()

bool Inkscape::UI::Widget::Rotateable::on_scroll ( Gtk::EventControllerScroll const &  scroll,
double  dx,
double  dy 
)
private

Member Data Documentation

◆ axis

double Inkscape::UI::Widget::Rotateable::axis

Definition at line 35 of file rotateable.h.

Referenced by on_click(), on_release(), and on_scroll().

◆ current_axis

double Inkscape::UI::Widget::Rotateable::current_axis

Definition at line 36 of file rotateable.h.

Referenced by on_click(), on_motion(), on_release(), and on_scroll().

◆ drag_started_x

double Inkscape::UI::Widget::Rotateable::drag_started_x
private

Definition at line 41 of file rotateable.h.

Referenced by on_click(), on_motion(), on_release(), and on_scroll().

◆ drag_started_y

double Inkscape::UI::Widget::Rotateable::drag_started_y
private

Definition at line 42 of file rotateable.h.

Referenced by on_click(), on_motion(), on_release(), and on_scroll().

◆ dragging

bool Inkscape::UI::Widget::Rotateable::dragging
private

Definition at line 44 of file rotateable.h.

Referenced by on_click(), on_motion(), on_release(), and on_scroll().

◆ maxdecl

double Inkscape::UI::Widget::Rotateable::maxdecl

Definition at line 37 of file rotateable.h.

Referenced by on_motion(), and on_release().

◆ modifier

◆ scrolling

bool Inkscape::UI::Widget::Rotateable::scrolling

Definition at line 38 of file rotateable.h.

Referenced by Inkscape::UI::Widget::RotateableSwatch::do_motion(), and on_scroll().

◆ working

bool Inkscape::UI::Widget::Rotateable::working
private

Definition at line 45 of file rotateable.h.

Referenced by on_click(), on_motion(), on_release(), and on_scroll().


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