r663: This commit was generated by cvs2svn to compensate for changes in r662,
[cinelerra_cv.git] / cinelerra / zoompanel.h
blob8b9e1e024efd075d6d8a78553f8d701609c8de53
1 #ifndef ZOOMPANEL_H
2 #define ZOOMPANEL_H
5 #include "guicast.h"
6 #include "mwindow.inc"
8 class ZoomPopup;
9 class ZoomTumbler;
11 #define ZOOM_PERCENTAGE 0
12 #define ZOOM_FLOAT 1
13 #define ZOOM_TIME 2
14 #define ZOOM_LONG 3
16 class ZoomHash
18 public:
19 ZoomHash(double value, char *text);
20 ~ZoomHash();
22 double value;
23 char *text;
24 } ;
26 class ZoomPanel
28 public:
29 ZoomPanel(MWindow *mwindow,
30 BC_WindowBase *subwindow,
31 double value,
32 int x,
33 int y,
34 int w,
35 double min = 1,
36 double max = 131072,
37 int zoom_type = ZOOM_PERCENTAGE);
38 ZoomPanel(MWindow *mwindow,
39 BC_WindowBase *subwindow,
40 double value,
41 int x,
42 int y,
43 int w,
44 double *user_table,
45 int user_size,
46 int zoom_type = ZOOM_PERCENTAGE);
47 ~ZoomPanel();
49 virtual int handle_event() { return 1; };
50 int get_w();
51 void calculate_menu();
52 void update_menu();
53 int create_objects();
54 double get_value();
55 char* get_text();
56 void set_text(char *text);
57 char* value_to_text(double value, int use_table = 1);
58 double text_to_zoom(char *text, int use_table = 1);
59 void update(double value);
60 void update(char *value);
61 void reposition_window(int x, int y);
62 // Set images to be used
63 void set_menu_images(VFrame **data);
64 void set_tumbler_images(VFrame **data);
66 MWindow *mwindow;
67 BC_WindowBase *subwindow;
68 int x;
69 int y;
70 int w;
71 double value;
73 ZoomPopup *zoom_text;
74 ZoomTumbler *zoom_tumbler;
75 char string[BCTEXTLEN];
76 double min, max;
77 double *user_table;
78 int user_size;
79 int zoom_type;
80 ArrayList<ZoomHash*> zoom_table;
81 VFrame **menu_images;
82 VFrame **tumbler_images;
85 class ZoomPopup : public BC_PopupMenu
87 public:
88 ZoomPopup(MWindow *mwindow, ZoomPanel *panel, int x, int y);
89 ~ZoomPopup();
91 int handle_event();
93 ZoomPanel *panel;
94 MWindow *mwindow;
97 class ZoomTumbler : public BC_Tumbler
99 public:
100 ZoomTumbler(MWindow *mwindow, ZoomPanel *panel, int x, int y);
101 ~ZoomTumbler();
103 int handle_up_event();
104 int handle_down_event();
106 ZoomPanel *panel;
107 MWindow *mwindow;
110 #endif