Lumiera  0.pre.03
»edityourfreedom«
Tool Class Referenceabstract

#include "gui/widget/timeline/timeline-tool.hpp"

Description

The base class of all timeline tools.

Definition at line 66 of file timeline-tool.hpp.

Public Member Functions

virtual ~Tool ()
 
bool apply_cursor ()
 Re-applies the cursor for the current tool at the current moment. More...
 
virtual ToolType get_type () const =0
 this is an ABC More...
 
virtual void on_button_press_event (GdkEventButton *event)
 The event handler for button press events. More...
 
virtual void on_button_release_event (GdkEventButton *event)
 The event handler for button release events. More...
 
virtual void on_motion_notify_event (GdkEventMotion *event)
 The event handler for mouse move events. More...
 

Protected Member Functions

 Tool (TimelineBody &owner)
 
Gdk::Rectangle get_body_rectangle () const
 Helper function which retrieves the rectangle of the timeline body. More...
 
virtual Glib::RefPtr< Gdk::Cursor > get_cursor () const =0
 Gets the cursor to display for this tool at this moment. More...
 
shared_ptr< TimelineStateget_state () const
 A helper function to get the state. More...
 
gui::widget::TimelineWidgetget_timeline_widget () const
 Helper function which retrieves the pointer to owner timeline widget object, which is the owner of the timeline body. More...
 
TimelineViewWindowview_window () const
 A helper function to get the view window. More...
 

Protected Attributes

bool isDragging
 
Gdk::Point mousePoint
 
TimelineBodytimelineBody
 

Constructor & Destructor Documentation

◆ Tool()

Tool ( TimelineBody owner)
protected

Definition at line 43 of file timeline-tool.cpp.

◆ ~Tool()

virtual ~Tool ( )
inlinevirtual

Definition at line 73 of file timeline-tool.hpp.

References Tool::apply_cursor(), Tool::get_body_rectangle(), Tool::get_cursor(), Tool::get_state(), Tool::get_timeline_widget(), Tool::get_type(), Tool::on_button_press_event(), Tool::on_button_release_event(), Tool::on_motion_notify_event(), and Tool::view_window().

+ Here is the call graph for this function:

Member Function Documentation

◆ get_type()

virtual ToolType get_type ( ) const
pure virtual

this is an ABC

Gets the type of tool represented by this class.

Remarks
This must be implemented by all timeline tool classes.

Implemented in IBeamTool, and ArrowTool.

Referenced by Tool::~Tool().

+ Here is the caller graph for this function:

◆ apply_cursor()

bool apply_cursor ( )

Re-applies the cursor for the current tool at the current moment.

Definition at line 51 of file timeline-tool.cpp.

References Tool::timelineBody.

Referenced by IBeamTool::on_button_release_event(), IBeamTool::on_motion_notify_event(), and Tool::~Tool().

+ Here is the caller graph for this function:

◆ on_button_press_event()

void on_button_press_event ( GdkEventButton *  event)
virtual

The event handler for button press events.

Remarks
This can be overridden by the derived classes, but Tool::on_button_press_event must be called at the start of the derived class's override.

Reimplemented in IBeamTool, and ArrowTool.

Definition at line 64 of file timeline-tool.cpp.

References Tool::isDragging, and NULL.

Referenced by ArrowTool::on_button_press_event(), IBeamTool::on_button_press_event(), and Tool::~Tool().

+ Here is the caller graph for this function:

◆ on_button_release_event()

void on_button_release_event ( GdkEventButton *  event)
virtual

The event handler for button release events.

Remarks
This can be overridden by the derived classes, but Tool::on_button_release_event must be called at the end of the derived class's override.

Reimplemented in IBeamTool, and ArrowTool.

Definition at line 74 of file timeline-tool.cpp.

References Tool::isDragging, and NULL.

Referenced by ArrowTool::on_button_release_event(), IBeamTool::on_button_release_event(), and Tool::~Tool().

+ Here is the caller graph for this function:

◆ on_motion_notify_event()

void on_motion_notify_event ( GdkEventMotion *  event)
virtual

The event handler for mouse move events.

Remarks
This can be overridden by the derived classes, but Tool::on_motion_notify_event must be called at the start of the derived class's override.

Reimplemented in IBeamTool, and ArrowTool.

Definition at line 84 of file timeline-tool.cpp.

References Tool::mousePoint, and NULL.

Referenced by ArrowTool::on_motion_notify_event(), IBeamTool::on_motion_notify_event(), and Tool::~Tool().

+ Here is the caller graph for this function:

◆ get_cursor()

virtual Glib::RefPtr<Gdk::Cursor> get_cursor ( ) const
protectedpure virtual

Gets the cursor to display for this tool at this moment.

Remarks
This must be implemented by all timeline tool classes.

Implemented in ArrowTool, and IBeamTool.

Referenced by Tool::~Tool().

+ Here is the caller graph for this function:

◆ get_timeline_widget()

gui::widget::TimelineWidget & get_timeline_widget ( ) const
protected

Helper function which retrieves the pointer to owner timeline widget object, which is the owner of the timeline body.

Definition at line 93 of file timeline-tool.cpp.

References Tool::timelineBody, and TimelineBody::timelineWidget.

Referenced by Tool::get_state(), and Tool::~Tool().

+ Here is the caller graph for this function:

◆ get_body_rectangle()

Gdk::Rectangle get_body_rectangle ( ) const
protected

Helper function which retrieves the rectangle of the timeline body.

Definition at line 102 of file timeline-tool.cpp.

References Tool::timelineBody.

Referenced by IBeamTool::on_motion_notify_event(), IBeamTool::on_scroll_slide_timer(), and Tool::~Tool().

+ Here is the caller graph for this function:

◆ get_state()

shared_ptr< TimelineState > get_state ( ) const
protected

A helper function to get the state.

Definition at line 109 of file timeline-tool.cpp.

References TimelineWidget::get_state(), and Tool::get_timeline_widget().

Referenced by IBeamTool::IBeamTool(), IBeamTool::is_mouse_in_end_drag_zone(), IBeamTool::is_mouse_in_start_drag_zone(), IBeamTool::on_button_press_event(), IBeamTool::set_leading_x(), Tool::view_window(), and Tool::~Tool().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ view_window()

TimelineViewWindow & view_window ( ) const
protected

A helper function to get the view window.

Definition at line 119 of file timeline-tool.cpp.

References Tool::get_state().

Referenced by IBeamTool::is_mouse_in_end_drag_zone(), IBeamTool::is_mouse_in_start_drag_zone(), IBeamTool::on_scroll_slide_timer(), and Tool::~Tool().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ timelineBody

◆ isDragging

◆ mousePoint

+ Inheritance diagram for Tool:
+ Collaboration diagram for Tool:

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