home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek 6
/
Geek-006.iso
/
linux
/
video
/
xmovie-1.5.3.tar.gz
/
xmovie-1.5.3.tar
/
xmovie-1.5.3
/
xmovie
/
mwindowgui.h
< prev
next >
Wrap
C/C++ Source or Header
|
2000-11-29
|
3KB
|
139 lines
#ifndef MWINDOWGUI_H
#define MWINDOWGUI_H
#include "guicast.h"
#include "mainmenu.inc"
#include "mainwindow.inc"
#include "mwindowgui.inc"
#define DEFAULTW 320
#define DEFAULTH 70
#define TIMEW 80
#define SCROLLBAR_LENGTH 1000
class ErrorThread : public Thread
{
public:
ErrorThread(MWindowGUI *gui);
~ErrorThread();
int show_error(char *text);
void run();
Mutex startup_lock;
char text[BCTEXTLEN];
MWindowGUI *gui;
int x, y;
};
class MWindowGUI : public BC_Window
{
public:
MWindowGUI(MainWindow *mwindow, int x, int y, int w, int h);
~MWindowGUI();
int create_objects();
int close_event();
// Use size of canvas from loaded movie file.
int resize_canvas(int w, int h);
// Use size of window from resize event.
int resize_event(int w, int h);
// Fix size of scrollbar for movie length and position.
int resize_scrollbar();
// Make scrollbar reflect current position
int update_position();
// Initialize for playback
int start_playback();
int stop_playback();
int flash_frame(VFrame *frame);
MainWindow *mwindow;
MWindowGUI *gui;
MainMenu *menu;
MainCanvas *canvas;
MainScrollbar *scrollbar;
PlayButton *playbutton;
FrameBackButton *backbutton;
FrameForwardButton *forwardbutton;
BC_Title *time_title;
int playback_colormodel;
int resize_widgets();
BC_Bitmap *bitmap, *yuv_bitmap;
};
class MainCanvas : public BC_SubWindow
{
public:
MainCanvas(MainWindow *mwindow, int x, int y, int w, int h);
~MainCanvas();
MainWindow *mwindow;
};
class MainScrollbar : public BC_PercentageSlider
{
public:
MainScrollbar(MainWindow *mwindow, int x, int y, int w);
~MainScrollbar();
int handle_event();
MainWindow *mwindow;
};
class PlayButton : public BC_Button
{
public:
PlayButton(MainWindow *mwindow, int x, int y);
~PlayButton();
int handle_event();
int keypress_event();
int set_mode(int mode);
MainWindow *mwindow;
int mode;
};
class FrameBackButton : public BC_Button
{
public:
FrameBackButton(MainWindow *mwindow, int x, int y);
~FrameBackButton();
int handle_event();
int keypress_event();
MainWindow *mwindow;
};
class FrameForwardButton : public BC_Button
{
public:
FrameForwardButton(MainWindow *mwindow, int x, int y);
~FrameForwardButton();
int handle_event();
int keypress_event();
MainWindow *mwindow;
};
class PlaybackScroll : public Thread
{
public:
PlaybackScroll(MainWindow *mwindow);
~PlaybackScroll();
int start_playback();
int stop_playback();
int wait_for_startup();
int wait_for_completion();
void run();
Mutex startup_lock;
MainWindow *mwindow;
int interrupt;
};
#endif