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 >
C/C++ Source or Header  |  2000-11-29  |  3KB  |  139 lines

  1. #ifndef MWINDOWGUI_H
  2. #define MWINDOWGUI_H
  3.  
  4. #include "guicast.h"
  5. #include "mainmenu.inc"
  6. #include "mainwindow.inc"
  7. #include "mwindowgui.inc"
  8.  
  9. #define DEFAULTW  320
  10. #define DEFAULTH  70
  11. #define TIMEW 80
  12. #define SCROLLBAR_LENGTH 1000
  13.  
  14. class ErrorThread : public Thread
  15. {
  16. public:
  17.     ErrorThread(MWindowGUI *gui);
  18.     ~ErrorThread();
  19.  
  20.     int show_error(char *text);
  21.     void run();
  22.     Mutex startup_lock;
  23.     char text[BCTEXTLEN];
  24.     MWindowGUI *gui;
  25.     int x, y;
  26. };
  27.  
  28. class MWindowGUI : public BC_Window
  29. {
  30. public:
  31.     MWindowGUI(MainWindow *mwindow, int x, int y, int w, int h);
  32.     ~MWindowGUI();
  33.  
  34.     int create_objects();
  35.     int close_event();
  36. // Use size of canvas from loaded movie file.
  37.     int resize_canvas(int w, int h);
  38. // Use size of window from resize event.
  39.     int resize_event(int w, int h);
  40. // Fix size of scrollbar for movie length and position.
  41.     int resize_scrollbar();
  42. // Make scrollbar reflect current position
  43.     int update_position();
  44. // Initialize for playback
  45.     int start_playback();
  46.     int stop_playback();
  47.     int flash_frame(VFrame *frame);
  48.  
  49.     MainWindow *mwindow;
  50.     MWindowGUI *gui;
  51.     MainMenu *menu;
  52.     MainCanvas *canvas;
  53.     MainScrollbar *scrollbar;
  54.     PlayButton *playbutton;
  55.     FrameBackButton *backbutton;
  56.     FrameForwardButton *forwardbutton;
  57.     BC_Title *time_title;
  58.     int playback_colormodel;
  59.  
  60.     int resize_widgets();
  61.     BC_Bitmap *bitmap, *yuv_bitmap;
  62. };
  63.  
  64.  
  65. class MainCanvas : public BC_SubWindow
  66. {
  67. public:
  68.     MainCanvas(MainWindow *mwindow, int x, int y, int w, int h);
  69.     ~MainCanvas();
  70.  
  71.     MainWindow *mwindow;
  72. };
  73.  
  74. class MainScrollbar : public BC_PercentageSlider
  75. {
  76. public:
  77.     MainScrollbar(MainWindow *mwindow, int x, int y, int w);
  78.     ~MainScrollbar();
  79.     int handle_event();
  80.     MainWindow *mwindow;
  81. };
  82.  
  83. class PlayButton : public BC_Button
  84. {
  85. public:
  86.     PlayButton(MainWindow *mwindow, int x, int y);
  87.     ~PlayButton();
  88.     int handle_event();
  89.     int keypress_event();
  90.     int set_mode(int mode);
  91.  
  92.     MainWindow *mwindow;
  93.     int mode;
  94. };
  95.  
  96. class FrameBackButton : public BC_Button
  97. {
  98. public:
  99.     FrameBackButton(MainWindow *mwindow, int x, int y);
  100.     ~FrameBackButton();
  101.     int handle_event();
  102.     int keypress_event();
  103.     MainWindow *mwindow;
  104. };
  105.  
  106. class FrameForwardButton : public BC_Button
  107. {
  108. public:
  109.     FrameForwardButton(MainWindow *mwindow, int x, int y);
  110.     ~FrameForwardButton();
  111.     int handle_event();
  112.     int keypress_event();
  113.     MainWindow *mwindow;
  114. };
  115.  
  116. class PlaybackScroll : public Thread
  117. {
  118. public:
  119.     PlaybackScroll(MainWindow *mwindow);
  120.     ~PlaybackScroll();
  121.     
  122.     int start_playback();
  123.     int stop_playback();
  124.     int wait_for_startup();
  125.     int wait_for_completion();
  126.     void run();
  127.     
  128.     Mutex startup_lock;
  129.     MainWindow *mwindow;
  130.     int interrupt;
  131. };
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138. #endif
  139.