X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fwidget_timeslider.h;h=925d2b152c5fc8232748b1da246897f111e3db15;hb=c3ad95144d148602f672e95ddda1f18fc35502f8;hp=0138bcfcd706a2029781280ac1054c8666417deb;hpb=3a3c4bca3a17137bec5d7960560934b91ef4146e;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/widget_timeslider.h b/synfig-studio/trunk/src/gtkmm/widget_timeslider.h index 0138bcf..925d2b1 100644 --- a/synfig-studio/trunk/src/gtkmm/widget_timeslider.h +++ b/synfig-studio/trunk/src/gtkmm/widget_timeslider.h @@ -1,34 +1,35 @@ -/* === S I N F G =========================================================== */ +/* === S Y N F I G ========================================================= */ /*! \file widget_timeslider.h ** \brief Time Slider Widget Header ** -** $Id: widget_timeslider.h,v 1.1.1.1 2005/01/07 03:34:37 darco Exp $ +** $Id$ ** ** \legal ** Copyright (c) 2004 Adrian Bentley ** -** This software and associated documentation -** are CONFIDENTIAL and PROPRIETARY property of -** the above-mentioned copyright holder. +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. ** -** You may not copy, print, publish, or in any -** other way distribute this software without -** a prior written agreement with -** the copyright holder. +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. ** \endlegal */ /* ========================================================================= */ /* === S T A R T =========================================================== */ -#ifndef __SINFG_WIDGET_TIMESLIDER_H -#define __SINFG_WIDGET_TIMESLIDER_H +#ifndef __SYNFIG_WIDGET_TIMESLIDER_H +#define __SYNFIG_WIDGET_TIMESLIDER_H /* === H E A D E R S ======================================================= */ #include #include -#include +#include #include "canvasview.h" /* === M A C R O S ========================================================= */ @@ -39,13 +40,13 @@ namespace studio { -void render_time_point_to_window(const Glib::RefPtr& window,const Gdk::Rectangle& ca,const sinfg::TimePoint &tp,bool selected=false); +void render_time_point_to_window(const Glib::RefPtr& window,const Gdk::Rectangle& ca,const synfig::TimePoint &tp,bool selected=false); + - /* Design for the timeslider... Concept: Scalable ruler - Ticks are done every so often (30 s, 10 frames, 5 frames, etc.) + Ticks are done every so often (30 s, 10 frames, 5 frames, etc.) Print out frame numbers next to the big ticks Show blue pills in separate area (above or below) */ @@ -60,52 +61,52 @@ protected: //implementation that other interfaces can see //HACK - I should not have to see this... Gtk::Adjustment *adj_bounds; - + //Statistics used for drawing stuff (and making sure we don't if we don't need to) /*double start,end; double current; - + bool invalidated;*/ - + guint32 last_event_time; float fps; - + sigc::connection time_value_change; sigc::connection time_other_change; - + //TODO: fill out blue pill stuff - + //input functions - + virtual bool on_motion_notify_event(GdkEventMotion* event); //for dragging virtual bool on_scroll_event(GdkEventScroll* event); //for zooming virtual bool on_button_press_event(GdkEventButton *event); //for clicking virtual bool on_button_release_event(GdkEventButton *event); //for clicking - - virtual bool on_expose_event(GdkEventExpose *event) {redraw(); return true;}//for drawing - + + virtual bool on_expose_event(GdkEventExpose */*event*/) {redraw(); return true;}//for drawing + virtual bool redraw(bool doublebuffer = false); - + //void update_times(); - + void zoom_in(bool centerontime = false); void zoom_out(bool centerontime = false); - + //Drag the Frame bool dragscroll; - + /*NOTE: if we can set the mouse position to the original position this would only have to be set once (and it would be good otherwise too) */ double lastx; //last mouse position for dragging - + public: //structors Widget_Timeslider(); ~Widget_Timeslider(); public: //Normal Interface - + void draw() {redraw();} virtual void refresh(); //reget bluepills, time values and queue_draw if need be @@ -116,14 +117,14 @@ public: //Time Interface void set_global_fps(float d); //accessors for the time adjustment - Gtk::Adjustment &get_time_adjustment() const {return *adj_timescale;} + Gtk::Adjustment &get_time_adjustment() const {return *adj_timescale;} void set_time_adjustment(Gtk::Adjustment *x); - + //HACK - I should not have to see these bounds (should be boundless) - Gtk::Adjustment &get_bounds_adjustment() const {return *adj_bounds;} + Gtk::Adjustment &get_bounds_adjustment() const {return *adj_bounds;} void set_bounds_adjustment(Gtk::Adjustment *x) {adj_bounds = x;} }; - + }; // END of namespace studio /* === E N D =============================================================== */