00001 #ifndef PLAYTRANSPORT_H
00002 #define PLAYTRANSPORT_H
00003
00004 #include "edl.inc"
00005 #include "guicast.h"
00006 #include "mwindow.inc"
00007 #include "playbackengine.inc"
00008 #include "playtransport.inc"
00009
00010 #define PLAY_MODE 0
00011 #define PAUSE_MODE 1
00012 #define PAUSEDOWN_MODE 2
00013
00014 class PlayTransport
00015 {
00016 public:
00017 PlayTransport(MWindow *mwindow, BC_WindowBase *subwindow, int x, int y);
00018 ~PlayTransport();
00019
00020 int create_objects();
00021 void reposition_buttons(int x, int y);
00022
00023 virtual void goto_start();
00024 virtual void goto_end();
00025
00026 void set_slider(BC_Slider *slider);
00027
00028 void set_engine(PlaybackEngine *engine);
00029 static int get_transport_width(MWindow *mwindow);
00030 int flip_vertical(int vertical, int &x, int &y);
00031 int keypress_event();
00032
00033
00034
00035
00036
00037
00038
00039 void handle_transport(int command,
00040 int wait_tracking = 0,
00041 int use_inout = 0,
00042 int update_refresh = 1);
00043
00044 int pause_transport();
00045 int reset_transport();
00046 int get_w();
00047
00048 virtual EDL* get_edl();
00049
00050
00051 int reverse;
00052 float speed;
00053
00054 PTransportButton *active_button;
00055 PlayButton *forward_play;
00056 FramePlayButton *frame_forward_play;
00057 ReverseButton *reverse_play;
00058 FrameReverseButton *frame_reverse_play;
00059 FastReverseButton *fast_reverse;
00060 FastPlayButton *fast_play;
00061 RewindButton *rewind_button;
00062 StopButton *stop_button;
00063 EndButton *end_button;
00064 MWindow *mwindow;
00065 BC_WindowBase *subwindow;
00066 BC_Slider *slider;
00067 PlaybackEngine *engine;
00068 int status;
00069 int x, y;
00070 };
00071
00072
00073
00074 class PTransportButton : public BC_Button
00075 {
00076 public:
00077 PTransportButton(MWindow *mwindow, PlayTransport *transport, int x, int y, VFrame **data);
00078 virtual ~PTransportButton();
00079 virtual int set_mode(int mode);
00080
00081 int mode;
00082 MWindow *mwindow;
00083 PlayTransport *transport;
00084 };
00085
00086 class RewindButton : public PTransportButton
00087 {
00088 public:
00089 RewindButton(MWindow *mwindow, PlayTransport *transport, int x, int y);
00090 int handle_event();
00091 };
00092
00093 class FastReverseButton : public PTransportButton
00094 {
00095 public:
00096 FastReverseButton(MWindow *mwindow, PlayTransport *transport, int x, int y);
00097 int handle_event();
00098 };
00099
00100 class ReverseButton : public PTransportButton
00101 {
00102 public:
00103 ReverseButton(MWindow *mwindow, PlayTransport *transport, int x, int y);
00104 int handle_event();
00105 };
00106
00107 class FrameReverseButton : public PTransportButton
00108 {
00109 public:
00110 FrameReverseButton(MWindow *mwindow, PlayTransport *transport, int x, int y);
00111 int handle_event();
00112 };
00113
00114 class PlayButton : public PTransportButton
00115 {
00116 public:
00117 PlayButton(MWindow *mwindow, PlayTransport *transport, int x, int y);
00118 int handle_event();
00119 };
00120
00121 class FramePlayButton : public PTransportButton
00122 {
00123 public:
00124 FramePlayButton(MWindow *mwindow, PlayTransport *transport, int x, int y);
00125 int handle_event();
00126 };
00127
00128 class FastPlayButton : public PTransportButton
00129 {
00130 public:
00131 FastPlayButton(MWindow *mwindow, PlayTransport *transport, int x, int y);
00132 int handle_event();
00133 };
00134
00135
00136
00137 class EndButton : public PTransportButton
00138 {
00139 public:
00140 EndButton(MWindow *mwindow, PlayTransport *transport, int x, int y);
00141 int handle_event();
00142 };
00143
00144 class StopButton : public PTransportButton
00145 {
00146 public:
00147 StopButton(MWindow *mwindow, PlayTransport *transport, int x, int y);
00148 int handle_event();
00149 };
00150
00151 #endif