ardour
Public Member Functions | Protected Attributes | List of all members
RubberbandSelectDrag Class Referenceabstract

#include <editor_drag.h>

Inheritance diagram for RubberbandSelectDrag:
Drag EditorRubberbandSelectDrag MidiRubberbandSelectDrag MidiVerticalSelectDrag

Public Member Functions

 RubberbandSelectDrag (Editor *, ArdourCanvas::Item *)
 
void start_grab (GdkEvent *, Gdk::Cursor *c=0)
 
void motion (GdkEvent *, bool)
 
void finished (GdkEvent *, bool)
 
void aborted (bool)
 
std::pair< ARDOUR::framecnt_t,
int > 
move_threshold () const
 
void do_select_things (GdkEvent *, bool)
 
virtual void select_things (int button_state, framepos_t x1, framepos_t x2, double y1, double y2, bool drag_in_progress)=0
 
virtual void deselect_things ()=0
 
- Public Member Functions inherited from Drag
 Drag (Editor *, ArdourCanvas::Item *, bool trackview_only=true)
 
virtual ~Drag ()
 
void set_manager (DragManager *m)
 
ArdourCanvas::Item * item () const
 
void swap_grab (ArdourCanvas::Item *, Gdk::Cursor *, uint32_t)
 
bool motion_handler (GdkEvent *, bool)
 
void abort ()
 
ARDOUR::framepos_t adjusted_frame (ARDOUR::framepos_t, GdkEvent const *, bool snap=true) const
 
ARDOUR::framepos_t adjusted_current_frame (GdkEvent const *, bool snap=true) const
 
bool was_double_click () const
 
void set_double_click (bool yn)
 
virtual bool end_grab (GdkEvent *)
 
virtual bool active (Editing::MouseMode m)
 
virtual bool allow_vertical_autoscroll () const
 
virtual bool x_movement_matters () const
 
virtual bool y_movement_matters () const
 
bool initially_vertical () const
 
virtual void setup_pointer_frame_offset ()
 

Protected Attributes

bool _vertical_only
 
- Protected Attributes inherited from Drag
Editor_editor
 our editor More...
 
DragManager_drags
 
ArdourCanvas::Item * _item
 our item More...
 
ARDOUR::framecnt_t _pointer_frame_offset
 
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...
 

Additional Inherited Members

- Protected Member Functions inherited from Drag
double grab_x () const
 
double grab_y () const
 
ARDOUR::framepos_t raw_grab_frame () const
 
ARDOUR::framepos_t grab_frame () const
 
double last_pointer_x () const
 
double last_pointer_y () const
 
double last_pointer_frame () const
 
double current_pointer_x () const
 
double current_pointer_y () const
 
boost::shared_ptr< ARDOUR::Regionadd_midi_region (MidiTimeAxisView *)
 
void show_verbose_cursor_time (framepos_t)
 
void show_verbose_cursor_duration (framepos_t, framepos_t, double xoffset=0)
 
void show_verbose_cursor_text (std::string const &)
 

Detailed Description

Dragging of a rubberband rectangle for selecting things

Definition at line 876 of file editor_drag.h.

Constructor & Destructor Documentation

RubberbandSelectDrag::RubberbandSelectDrag ( Editor e,
ArdourCanvas::Item *  i 
)

Definition at line 4250 of file editor_drag.cc.

Member Function Documentation

void RubberbandSelectDrag::aborted ( bool  m)
virtual

Called to abort a drag and return things to how they were before it started.

Parameters
mtrue if some movement occurred, otherwise false.

Implements Drag.

Definition at line 4419 of file editor_drag.cc.

virtual void RubberbandSelectDrag::deselect_things ( )
pure virtual
void RubberbandSelectDrag::do_select_things ( GdkEvent *  event,
bool  drag_in_progress 
)

Definition at line 4345 of file editor_drag.cc.

void RubberbandSelectDrag::finished ( GdkEvent *  e,
bool  m 
)
virtual

Called when a drag has finished.

Parameters
eEvent describing the finish.
mtrue if some movement occurred, otherwise false.

Implements Drag.

Definition at line 4380 of file editor_drag.cc.

void RubberbandSelectDrag::motion ( GdkEvent *  e,
bool  f 
)
virtual

Called when a drag motion has occurred.

Parameters
eEvent describing the motion.
ftrue if this is the first movement, otherwise false.

Implements Drag.

Definition at line 4265 of file editor_drag.cc.

std::pair<ARDOUR::framecnt_t, int> RubberbandSelectDrag::move_threshold ( ) const
inlinevirtual
Returns
minimum number of frames (in x) and pixels (in y) that should be considered a movement

Reimplemented from Drag.

Definition at line 886 of file editor_drag.h.

virtual void RubberbandSelectDrag::select_things ( int  button_state,
framepos_t  x1,
framepos_t  x2,
double  y1,
double  y2,
bool  drag_in_progress 
)
pure virtual

Select some things within a rectangle.

Parameters
button_stateThe button state from the GdkEvent.
x1The left-hand side of the rectangle in session frames.
x2The right-hand side of the rectangle in session frames.
y1The top of the rectangle in trackview coordinates.
y2The bottom of the rectangle in trackview coordinates.
drag_in_progresstrue if the drag is currently happening.

Implemented in MidiVerticalSelectDrag, MidiRubberbandSelectDrag, and EditorRubberbandSelectDrag.

void RubberbandSelectDrag::start_grab ( GdkEvent *  e,
Gdk::Cursor *  c = 0 
)
virtual

Called to start a grab of an item.

Parameters
eEvent that caused the grab to start.
cCursor to use, or 0.

Reimplemented from Drag.

Definition at line 4258 of file editor_drag.cc.

Member Data Documentation

bool RubberbandSelectDrag::_vertical_only
protected

Definition at line 905 of file editor_drag.h.


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