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 / mainmenu.h < prev    next >
C/C++ Source or Header  |  2000-11-29  |  3KB  |  172 lines

  1. #ifndef MAINMENU_H
  2. #define MAINMENU_H
  3.  
  4. #include "defaults.h"
  5. #include "guicast.h"
  6. #include "load.inc"
  7. #include "loaddvd.inc"
  8. #include "mainwindow.inc"
  9. #include "settings.inc"
  10.  
  11. #define TOTAL_LOADS 5
  12.  
  13. class Load;
  14. class LoadPrevious;
  15. class StreamMenuItem;
  16.  
  17. class MainMenu : public BC_MenuBar
  18. {
  19. public:
  20.     MainMenu(MainWindow *mwindow, int w);
  21.     ~MainMenu();
  22.  
  23.     int create_objects();
  24.     int update_list_menu(BC_Menu *menu, 
  25.             int total, 
  26.             int do_audio, 
  27.             int do_video,
  28.             int &total_streams,
  29.             StreamMenuItem **array);
  30.     int update_audio_streams(int total_streams);
  31.     int update_video_streams(int total_streams);
  32.  
  33. // most recent loads
  34.     int add_load(char *path);
  35.     int init_loads(Defaults *defaults);
  36.     int save_loads(Defaults *defaults);
  37.  
  38. // for previous document loader
  39.     Load *load_file;
  40.     LoadPrevious *load_previous[TOTAL_LOADS];
  41.     BC_Menu *filemenu, *videomenu, *audiomenu;
  42.     StreamMenuItem *astreams[256], *vstreams[256];
  43.     int total_astreams, total_vstreams;
  44.     MainWindow *mwindow;
  45.     int total_loads;
  46. };
  47.  
  48. class Quit : public BC_MenuItem
  49. {
  50. public:
  51.     Quit(MainWindow *mwindow);
  52.     ~Quit();
  53.     int handle_event();
  54.     MainWindow *mwindow;
  55. };
  56.  
  57. class Load : public BC_MenuItem
  58. {
  59. public:
  60.     Load(MainWindow *mwindow);
  61.     ~Load();
  62.     int handle_event();
  63.     MainWindow *mwindow;
  64.     LoadThread *thread;
  65. };
  66.  
  67. class LoadDVD : public BC_MenuItem
  68. {
  69. public:
  70.     LoadDVD(MainWindow *mwindow);
  71.     ~LoadDVD();
  72.     int handle_event();
  73.     MainWindow *mwindow;
  74.     LoadDVDThread *thread;
  75. };
  76.  
  77. class SoftwareSync : public BC_MenuItem
  78. {
  79. public:
  80.     SoftwareSync(MainWindow *mwindow);
  81.     ~SoftwareSync();
  82.     int handle_event();
  83.     MainWindow *mwindow;
  84. };
  85.  
  86. class OriginalSize : public BC_MenuItem
  87. {
  88. public:
  89.     OriginalSize(MainWindow *mwindow);
  90.     ~OriginalSize();
  91.     int handle_event();
  92.     MainWindow *mwindow;
  93. };
  94.  
  95. class HalfSize : public BC_MenuItem
  96. {
  97. public:
  98.     HalfSize(MainWindow *mwindow);
  99.     ~HalfSize();
  100.     int handle_event();
  101.     MainWindow *mwindow;
  102. };
  103.  
  104. class DoubleSize : public BC_MenuItem
  105. {
  106. public:
  107.     DoubleSize(MainWindow *mwindow);
  108.     ~DoubleSize();
  109.     int handle_event();
  110.     MainWindow *mwindow;
  111. };
  112.  
  113. class SettingsMenu : public BC_MenuItem
  114. {
  115. public:
  116.     SettingsMenu(MainWindow *mwindow);
  117.     ~SettingsMenu();
  118.     int handle_event();
  119.     MainWindow *mwindow;
  120.     SettingsThread *thread;
  121. };
  122.  
  123. class EveryFrame : public BC_MenuItem
  124. {
  125. public:
  126.     EveryFrame(MainWindow *mwindow);
  127.     ~EveryFrame();
  128.     int handle_event();
  129.     MainWindow *mwindow;
  130. };
  131.  
  132. class LoadPrevious : public BC_MenuItem
  133. {
  134. public:
  135.     LoadPrevious(Load *loadfile);
  136.     int handle_event();
  137.     void run();
  138.  
  139.     int set_path(char *path);
  140.  
  141.     Load *loadfile;
  142.     char path[1024];
  143. };
  144.  
  145. class StreamMenuItem : public BC_MenuItem
  146. {
  147. public:
  148.     StreamMenuItem(MainWindow *mwindow, 
  149.         int stream_number, 
  150.         char *text,
  151.         int do_audio, 
  152.         int do_video);
  153.     ~StreamMenuItem();
  154.     int handle_event();
  155.     MainWindow *mwindow;
  156.     int stream_number;
  157.     int do_audio;
  158.     int do_video;
  159. };
  160.  
  161. class Close : public BC_MenuItem
  162. {
  163. public:
  164.     Close(MainWindow *mwindow);
  165.     ~Close();
  166.     int handle_event();
  167.     MainWindow *mwindow;
  168. };
  169.  
  170.  
  171. #endif
  172.