synfig-studio
1.0.3
|
#include <widget_keyframe_list.h>
Public Member Functions | |
Widget_Keyframe_List () | |
Default constructor. | |
~Widget_Keyframe_List () | |
Destructror. | |
void | set_kf_list (synfig::KeyframeList *x) |
Loads a new keyframe list on the widget. | |
synfig::KeyframeList * | get_kf_list () const |
Member for private data. | |
void | set_editable (bool x=true) |
Member for private data. | |
bool | get_editable () const |
Member for private data. | |
void | set_selected_keyframe (const synfig::Keyframe &x) |
Store the selected keyframe value and fired keyframe selected signal. | |
const synfig::Keyframe & | get_selected_keyframe () |
Returns the selected keyframe. | |
void | set_time_adjustment (const Glib::RefPtr< Gtk::Adjustment > &x) |
Set the time adjustment and proper connects its change signals. | |
void | set_fps (float x) |
Affect the global frames per second. | |
void | set_canvas_interface (etl::loose_handle< synfigapp::CanvasInterface > h) |
Set the canvas interface, it's the place where signals are connected. | |
bool | perform_move_kf (bool delta) |
bool | on_draw (const Cairo::RefPtr< Cairo::Context > &cr) |
bool | on_event (GdkEvent *event) |
Gtk Widget main loop event, catch the Mouse events. | |
void | on_keyframe_selected (synfig::Keyframe keyframe, void *emitter) |
Signal handler for the selected keyframe from the canvas interface. |
Static Public Member Functions | |
static void | draw_arrow (const Cairo::RefPtr< Cairo::Context > &cr, double x, double y, double width, double height, bool fill, const synfig::Color &color) |
Widget_Keyframe_List::Widget_Keyframe_List | ( | ) |
Default constructor.
The widget respond to mouse button press and release and to left button motion
Create the window of the moving tooltip
References set_time_adjustment(), and WIDGET_KEYFRAME_LIST_DEFAULT_FPS.
Widget_Keyframe_List::~Widget_Keyframe_List | ( | ) |
Destructror.
void Widget_Keyframe_List::set_kf_list | ( | synfig::KeyframeList * | x | ) |
Loads a new keyframe list on the widget.
References set_selected_keyframe().
Referenced by set_canvas_interface().
|
inline |
Member for private data.
|
inline |
Member for private data.
|
inline |
Member for private data.
void Widget_Keyframe_List::set_selected_keyframe | ( | const synfig::Keyframe & | x | ) |
Store the selected keyframe value and fired keyframe selected signal.
Referenced by on_event(), and set_kf_list().
|
inline |
Returns the selected keyframe.
void Widget_Keyframe_List::set_time_adjustment | ( | const Glib::RefPtr< Gtk::Adjustment > & | x | ) |
Set the time adjustment and proper connects its change signals.
Referenced by studio::Dock_Timetrack::changed_canvas_view_vfunc(), and Widget_Keyframe_List().
void Widget_Keyframe_List::set_fps | ( | float | x | ) |
Affect the global frames per second.
Referenced by set_canvas_interface().
void Widget_Keyframe_List::set_canvas_interface | ( | etl::loose_handle< synfigapp::CanvasInterface > | h | ) |
Set the canvas interface, it's the place where signals are connected.
References on_keyframe_selected(), set_fps(), and set_kf_list().
Referenced by studio::Dock_Timetrack::changed_canvas_view_vfunc().
bool Widget_Keyframe_List::perform_move_kf | ( | bool | delta = false | ) |
Performs the keyframe movement. Returns true if it was sucessful
[in] | delta | If false permorm normal move. If true perform delta movement. |
References _, and synfigapp::Action::create().
Referenced by on_event().
|
static |
Referenced by on_draw().
bool Widget_Keyframe_List::on_draw | ( | const Cairo::RefPtr< Cairo::Context > & | cr | ) |
Check if the window we want draw is ready
Boundaries of the drawing area in time units.
The style of the widget.
Colors
Draw a background
Returns if there are not keyframes to draw.
Loop all the keyframes
References draw_arrow().
bool Widget_Keyframe_List::on_event | ( | GdkEvent * | event | ) |
Gtk Widget main loop event, catch the Mouse events.
Boundaries of the drawing area in time units.
pos is the [0,1] relative horizontal place on the widget
The time where the event x is
here the guts of the event
Moving tooltip displaying the dragging time
Show the tooltip and fix his y coordinate (up to the widget)
Move the tooltip to a nice position
References _, studio::App::get_time_format(), perform_move_kf(), set_selected_keyframe(), and studio::App::ui_manager().
void Widget_Keyframe_List::on_keyframe_selected | ( | synfig::Keyframe | keyframe, |
void * | emitter | ||
) |
Signal handler for the selected keyframe from the canvas interface.
Referenced by set_canvas_interface().