| @@ -20,10 +20,9 @@ | |||||
| #pragma once | #pragma once | ||||
| #include <FL/Fl_Group.H> | #include <FL/Fl_Group.H> | ||||
| #include <FL/Fl.H> | |||||
| #include "Region.H" | #include "Region.H" | ||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <list> | #include <list> | ||||
| @@ -41,13 +40,13 @@ class Track : public Fl_Group | |||||
| public: | public: | ||||
| Track ( int X, int Y, int W, int H ) : Fl_Group( X, Y, W, H ) | Track ( int X, int Y, int W, int H ) : Fl_Group( X, Y, W, H ) | ||||
| { | |||||
| _next = _prev = NULL; | |||||
| _name = NULL; | |||||
| { | |||||
| _next = _prev = NULL; | |||||
| _name = NULL; | |||||
| box( FL_DOWN_BOX ); | |||||
| color( fl_darker( FL_GRAY ) ); | |||||
| } | |||||
| box( FL_DOWN_BOX ); | |||||
| color( fl_darker( FL_GRAY ) ); | |||||
| } | |||||
| Track *next ( void ) { return _next; } | Track *next ( void ) { return _next; } | ||||
| Track *prev ( void ) { return _prev; } | Track *prev ( void ) { return _prev; } | ||||
| @@ -80,4 +79,33 @@ public: | |||||
| r->position( r->x(), y() ); | r->position( r->x(), y() ); | ||||
| r->redraw(); | r->redraw(); | ||||
| } | } | ||||
| int handle ( int m ) | |||||
| { | |||||
| switch ( m ) | |||||
| { | |||||
| case FL_DND_DRAG: | |||||
| case FL_DND_RELEASE: | |||||
| case FL_DND_ENTER: | |||||
| case FL_DND_LEAVE: | |||||
| case FL_ENTER: | |||||
| return 1; | |||||
| case FL_PASTE: | |||||
| { | |||||
| const char *file, *text = Fl::event_text(); | |||||
| if ( ! strncmp( text, "file://", 7 ) ) | |||||
| file = text + 7; | |||||
| else | |||||
| // error? | |||||
| file = text; | |||||
| printf( "pasted file \"%s\"\n", file ); | |||||
| return 1; | |||||
| } | |||||
| default: | |||||
| return Fl_Group::handle( m ); | |||||
| } | |||||
| } | |||||
| }; | }; | ||||