Ardour
9.0-pre0-822-g12e3bc5c20
|
#include <editor_drag.h>
Public Member Functions | |
RubberbandSelectDrag (EditingContext &, ArdourCanvas::Item *, std::function< bool(GdkEvent *, Temporal::timepos_t const &)> click_functor) | |
void | start_grab (GdkEvent *, Gdk::Cursor *c=0) |
void | motion (GdkEvent *, bool) |
void | finished (GdkEvent *, bool) |
void | aborted (bool) |
std::pair< Temporal::timecnt_t, int > | move_threshold () const |
void | do_select_things (GdkEvent *, bool) |
virtual void | select_things (int button_state, Temporal::timepos_t const &x1, Temporal::timepos_t const &x2, double y1, double y2, bool drag_in_progress) |
virtual void | deselect_things () |
Public Member Functions inherited from Drag | |
Drag (EditingContext &, ArdourCanvas::Item *, Temporal::TimeDomain td, ArdourCanvas::Item const *bounding_item, bool hide_snapped_cursor=true) | |
virtual | ~Drag () |
void | set_manager (DragManager *m) |
void | set_bounding_item (ArdourCanvas::Item const *i) |
ArdourCanvas::Item * | item () const |
Temporal::TimeDomain | time_domain () const |
void | set_time_domain (Temporal::TimeDomain) |
void | swap_grab (ArdourCanvas::Item *, Gdk::Cursor *, uint32_t) |
bool | motion_handler (GdkEvent *, bool) |
void | abort () |
Temporal::timepos_t | adjusted_time (Temporal::timepos_t const &, GdkEvent const *, bool snap=true) const |
Temporal::timepos_t | adjusted_current_time (GdkEvent const *, bool snap=true) const |
bool | was_double_click () const |
void | set_double_click (bool yn) |
void | set_grab_button_anyway (GdkEvent *) |
virtual bool | end_grab (GdkEvent *) |
virtual bool | active (Editing::MouseMode m) |
bool | preview_video () const |
std::pair< Temporal::timecnt_t, int > | move_threshold () const |
virtual bool | allow_vertical_autoscroll () const |
virtual bool | allow_horizontal_autoscroll () const |
virtual bool | x_movement_matters () const |
virtual bool | y_movement_matters () const |
virtual bool | mid_drag_key_event (GdkEventKey *) |
bool | initially_vertical () const |
virtual void | setup_pointer_offset () |
virtual void | setup_video_offset () |
int | grab_button () const |
Protected Attributes | |
bool | _vertical_only |
std::function< bool(GdkEvent *, Temporal::timepos_t const &)> | click_functor |
Protected Attributes inherited from Drag | |
EditingContext & | editing_context |
DragManager * | _drags |
ArdourCanvas::Item * | _item |
our item More... | |
ArdourCanvas::Item const * | _bounding_item |
our coordinate reference (normally null) More... | |
Temporal::timecnt_t | _pointer_offset |
Temporal::timecnt_t | _video_offset |
bool | _preview_video |
bool | _x_constrained |
true if x motion is constrained, otherwise false More... | |
bool | _y_constrained |
true if y motion is constrained, otherwise false More... | |
bool | _was_rolling |
true if the session was rolling before the drag started, otherwise false More... | |
ARDOUR::timepos_t | _earliest_time_limit |
time we cannot drag before (defaults to 0, indicating no such limit) More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Drag | |
double | grab_x () const |
double | grab_y () const |
Temporal::timepos_t | pixel_duration_to_time (double x) const |
Temporal::timepos_t | raw_grab_time () const |
ARDOUR::samplepos_t | grab_sample () const |
Temporal::timepos_t | grab_time () const |
double | last_pointer_x () const |
double | last_pointer_y () const |
ARDOUR::samplepos_t | last_pointer_sample () const |
Temporal::timepos_t | last_pointer_time () const |
Temporal::timecnt_t | snap_delta (guint const) const |
double | current_pointer_x () const |
double | current_pointer_y () const |
void | setup_snap_delta (Temporal::timepos_t const &pos) |
std::shared_ptr< ARDOUR::Region > | add_midi_region (MidiTimeAxisView *, bool commit) |
void | show_verbose_cursor_time (Temporal::timepos_t const &) |
void | show_verbose_cursor_duration (Temporal::timepos_t const &, Temporal::timepos_t const &, double xoffset=0) |
void | show_verbose_cursor_text (std::string const &) |
void | show_view_preview (Temporal::timepos_t const &) |
Dragging of a rubberband rectangle for selecting things
Definition at line 1286 of file editor_drag.h.
RubberbandSelectDrag::RubberbandSelectDrag | ( | EditingContext & | , |
ArdourCanvas::Item * | , | ||
std::function< bool(GdkEvent *, Temporal::timepos_t const &)> | click_functor | ||
) |
|
virtual |
Called to abort a drag and return things to how they were before it started.
m | true if some movement occurred, otherwise false. |
Implements Drag.
|
virtual |
Reimplemented in MidiVerticalSelectDrag, and MidiRubberbandSelectDrag.
void RubberbandSelectDrag::do_select_things | ( | GdkEvent * | , |
bool | |||
) |
|
virtual |
Called when a drag has finished.
e | Event describing the finish. |
m | true if some movement occurred, otherwise false. |
Implements Drag.
|
virtual |
Called when a drag motion has occurred.
e | Event describing the motion. |
f | true if this is the first movement, otherwise false. |
Implements Drag.
|
inline |
Definition at line 1296 of file editor_drag.h.
|
virtual |
Select some things within a rectangle.
button_state | The button state from the GdkEvent. |
x1 | The left-hand side of the rectangle as a timepos_t |
x2 | The right-hand side of the rectangle as a timepos_t. |
y1 | The top of the rectangle in trackview coordinates. |
y2 | The bottom of the rectangle in trackview coordinates. |
drag_in_progress | true if the drag is currently happening. |
Reimplemented in MidiVerticalSelectDrag, and MidiRubberbandSelectDrag.
|
virtual |
Called to start a grab of an item.
e | Event that caused the grab to start. |
c | Cursor to use, or 0. |
Reimplemented from Drag.
|
protected |
Definition at line 1314 of file editor_drag.h.
|
protected |
Definition at line 1315 of file editor_drag.h.