pull/3/head
Jonathan Moore Liles 2008-05-18 00:09:18 -05:00
parent 0d9fe2b9b8
commit 3e1a32c8be
9 changed files with 50 additions and 31 deletions

View File

@ -19,6 +19,7 @@
#include <FL/Fl_Tooltip.H>
#include <FL/fl_ask.H>
#include <FL/fl_draw.H>
#include "Annotation_Region.H"

View File

@ -19,6 +19,8 @@
#include "Control_Point.H"
#include <FL/fl_draw.H>
Control_Point::Control_Point ( Sequence *t, nframes_t when, float y )
{
_sequence = t;

View File

@ -44,6 +44,10 @@
#include "Transport.H" // for .recording
#include <list>
#include <algorithm>
using std::min;
using std::max;
/* whether to cache peaks at multiple resolutions on disk to
* drastically improve performance */

View File

@ -19,6 +19,8 @@
#include "Sequence_Point.H"
#include <FL/fl_draw.H>
void
Sequence_Point::get ( Log_Entry &e ) const
{

View File

@ -17,16 +17,10 @@
/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*******************************************************************************/
/* TODO:
What if we solve the continuous-modification/sync issue by making a
copy of the 'pushed' widget, and operating on that instead (hiding
the original), then when the widget is released, copy its data into
the original?
*/
#include "Sequence_Widget.H"
#include <FL/fl_draw.H>
list <Sequence_Widget *> Sequence_Widget::_selection;
Sequence_Widget * Sequence_Widget::_current = NULL;
Sequence_Widget * Sequence_Widget::_pushed = NULL;
@ -188,6 +182,19 @@ Sequence_Widget::dispatch ( int m )
return handle( m );
}
void
Sequence_Widget::draw ( void )
{
draw_box();
}
void
Sequence_Widget::draw_box ( void )
{
fl_draw_box( box(), x(), y(), w(), h(), selected() ? FL_MAGENTA : _box_color );
}
/* base hanlde just does basic dragging */
int
Sequence_Widget::handle ( int m )

View File

@ -24,7 +24,8 @@
#include "Timeline.H"
#include <list>
#include <algorithm>
using namespace std;
using std::min;
using std::max;
class Sequence_Widget;
@ -113,7 +114,7 @@ struct position_info
class Sequence_Widget : public Loggable
{
static list <Sequence_Widget *> _selection; /* all the widgets making up the selection */
static std::list <Sequence_Widget *> _selection; /* all the widgets making up the selection */
/* FIXME: is this not the same as /pushed/? */
static Sequence_Widget * _current; /* the widget initiating events that affect the selection */
@ -355,18 +356,8 @@ public:
_sequence->damage( FL_DAMAGE_EXPOSE, x(), y(), w(), h() );
}
/* just draw a simple box */
virtual void
draw_box ( void )
{
fl_draw_box( box(), x(), y(), w(), h(), selected() ? FL_MAGENTA : _box_color );
}
virtual void
draw ( void )
{
draw_box();
}
virtual void draw_box ( void );
virtual void draw ( void );
bool
operator< ( const Sequence_Widget & rhs ) const

View File

@ -17,6 +17,14 @@
/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*******************************************************************************/
#include <FL/Fl_Scroll.H>
#include <FL/Fl_Pack.H>
#include <FL/Fl_Scrollbar.H>
#include <FL/Fl_Widget.H>
#include <FL/fl_draw.H>
#include "Timeline.H"
#include "Tempo_Sequence.H"
#include "Time_Sequence.H"
@ -24,6 +32,7 @@
#include "Control_Sequence.H"
#include <FL/Fl_Scrollbar.H>
#include "Scalebar.H"
#include "Sequence.H"
#include "Annotation_Sequence.H"
// #include <FL/Fl_Image.H>

View File

@ -19,13 +19,6 @@
#pragma once
#include <FL/Fl_Scroll.H>
#include <FL/Fl_Pack.H>
#include <FL/Fl_Scrollbar.H>
#include <FL/Fl_Widget.H>
#include <FL/fl_draw.H>
#include "Scalebar.H"
/* FIXME: this class needs a lot of cleaning up. Too many public
* members etc. */
@ -36,17 +29,24 @@
#include <math.h>
#include <assert.h>
#include <list>
class Fl_Scroll;
class Fl_Pack;
class Fl_Scrollbar;
class Fl_Widget;
class Timeline;
extern Timeline *timeline;
#include "Sequence.H"
struct BBT;
class Tempo_Sequence;
class Time_Sequence;
class Annotation_Sequence;
class Track;
class Scalebar;
class Sequence;
class Sequence_Widget;
// disables double-buffering to make unnecessary redrawing more apparent
// #define DEBUG_TIMELINE_DRAWING

View File

@ -29,6 +29,9 @@
#include <math.h>
#include <algorithm>
using std::min;
using std::max;
bool Waveform::fill = true;
bool Waveform::outline = true;