camera zoom fix, upgrade giflib, configure.ac ix86 probe tweaks, any python
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / mtimebar.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 1997-2014 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 MTIMEBAR_H
23 #define MTIMEBAR_H
24
25
26 #include "mwindowgui.inc"
27 #include "timebar.h"
28 #include "timelinepane.h"
29
30
31 class TimeBarPopup;
32
33 class TimeBarPopupItem : public BC_MenuItem
34 {
35 public:
36         TimeBarPopupItem(MWindow *mwindow,
37                 TimeBarPopup *menu,
38                 const char *text,
39                 int value);
40         int handle_event();
41
42         int value;
43         MWindow *mwindow;
44         TimeBarPopup *menu;
45 };
46
47 class TimeBarPopup : public BC_PopupMenu
48 {
49 public:
50         TimeBarPopup(MWindow *mwindow);
51         ~TimeBarPopup();
52
53         void create_objects();
54         void update();
55
56         TimeBarPopupItem *items[TOTAL_TIMEFORMATS];
57         MWindow *mwindow;
58 };
59
60
61
62 class MTimeBar : public TimeBar
63 {
64 public:
65         MTimeBar(MWindow *mwindow,
66                 MWindowGUI *gui,
67                 int x,
68                 int y,
69                 int w,
70                 int h);
71         MTimeBar(MWindow *mwindow,
72                 TimelinePane *pane,
73                 int x,
74                 int y,
75                 int w,
76                 int h);
77
78         void create_objects();
79         void draw_time();
80         void draw_range();
81         void stop_transport();
82         int resize_event();
83         int resize_event(int x, int y, int w, int h);
84         int button_press_event();
85 //      int test_preview(int buttonpress);
86         int64_t position_to_pixel(double position);
87         void select_label(double position);
88         double pixel_to_position(int pixel);
89         void handle_mwindow_drag();
90         void update(int flush);
91         void update_cursor();
92         void update_clock(double position);
93         double test_highlight();
94         int repeat_event(int64_t duration);
95         void activate_timeline();
96
97         TimeBarPopup *menu;
98         MWindowGUI *gui;
99 };
100
101
102
103 #endif