r602: Fix baver's code... don't insert timecode when show_tc is not set
[cinelerra_cv/mob.git] / cinelerra / zoompanel.h
blob19e1f8da5e68a38bcc2f5c328cb2c31e8298577a
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();
40 virtual int handle_event() { return 1; };
41 int get_w();
42 void calculate_menu();
43 void update_menu();
44 int create_objects();
45 double get_value();
46 char* get_text();
47 void set_text(char *text);
48 char* value_to_text(double value, int use_table = 1);
49 double text_to_zoom(char *text, int use_table = 1);
50 void update(double value);
51 void update(char *value);
52 void reposition_window(int x, int y);
54 MWindow *mwindow;
55 BC_WindowBase *subwindow;
56 int x;
57 int y;
58 int w;
59 double value;
61 ZoomPopup *zoom_text;
62 ZoomTumbler *zoom_tumbler;
63 char string[BCTEXTLEN];
64 double min, max;
65 int zoom_type;
66 ArrayList<ZoomHash*> zoom_table;
69 class ZoomPopup : public BC_PopupMenu
71 public:
72 ZoomPopup(MWindow *mwindow, ZoomPanel *panel, int x, int y);
73 ~ZoomPopup();
75 int handle_event();
77 ZoomPanel *panel;
78 MWindow *mwindow;
81 class ZoomTumbler : public BC_Tumbler
83 public:
84 ZoomTumbler(MWindow *mwindow, ZoomPanel *panel, int x, int y);
85 ~ZoomTumbler();
87 int handle_up_event();
88 int handle_down_event();
90 ZoomPanel *panel;
91 MWindow *mwindow;
94 #endif