initial commit
[goodguy/history.git] / cinelerra-5.0 / cinelerra / loadmode.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  * 
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  * 
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  * 
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  * 
20  */
21
22 #ifndef LOADMODE_H
23 #define LOADMODE_H
24
25 #include "guicast.h"
26 #include "loadmode.inc"
27 #include "mwindow.inc"
28 #include "theme.inc"
29
30 class LoadModeListBox;
31
32 class LoadModeItem : public BC_ListBoxItem
33 {
34 public:
35         LoadModeItem(char *text, int value);
36         int value;
37 };
38
39 class LoadModeToggle : public BC_Toggle
40 {
41 public:
42         LoadModeToggle(int x, 
43                 int y, 
44                 LoadMode *window, 
45                 int value, 
46                 const char *images,
47                 const char *tooltip);
48         int handle_event();
49         LoadMode *window;
50         int value;
51 };
52
53
54
55 class LoadMode
56 {
57 public:
58         LoadMode(MWindow *mwindow,
59                 BC_WindowBase *window, 
60                 int x, 
61                 int y, 
62                 int *output,
63                 int use_nothing,
64                 int use_nested);
65         ~LoadMode();
66         
67         void create_objects();
68         int reposition_window(int x, int y);
69         static int calculate_h(BC_WindowBase *gui, Theme *theme);
70         static int calculate_w(BC_WindowBase *gui, 
71                 Theme *theme, 
72                 int use_none, 
73                 int use_nested);
74         int get_h();
75         int get_x();
76         int get_y();
77
78         char* mode_to_text();
79         void update();
80
81         BC_Title *title;
82         MWindow *mwindow;
83         BC_WindowBase *window;
84         int x;
85         int y;
86         int *output;
87         int use_nothing;
88         int use_nested;
89         LoadModeToggle *mode[TOTAL_LOADMODES];
90 //      BC_TextBox *textbox;
91 //      ArrayList<LoadModeItem*> load_modes;
92 //      LoadModeListBox *listbox;
93 };
94
95 class LoadModeListBox : public BC_ListBox
96 {
97 public:
98         LoadModeListBox(BC_WindowBase *window, LoadMode *loadmode, int x, int y);
99         ~LoadModeListBox();
100
101         int handle_event();
102
103         BC_WindowBase *window;
104         LoadMode *loadmode;
105 };
106
107 #endif