r1009: Move the dependencies to newer package names
[cinelerra_cv/mob.git] / cinelerra / timeentry.h
blob6f842ab43a3f42ef768da843e281a398652c1bd4
1 #ifndef TIMEENTRY_H
2 #define TIMEENTRY_H
4 class DayText;
5 class DayTumbler;
6 class TimeTextBox;
7 #define TOTAL_DAYS 8
9 #include "guicast.h"
11 // 3 part entry widget.
12 // part 1: day of the week
13 // part 2: day tumbler
14 // part 3: time of day
15 // Used by the Record GUI, Batch Rendering.
17 class TimeEntry
19 public:
20 TimeEntry(BC_WindowBase *gui,
21 int x,
22 int y,
23 int *output_day,
24 double *output_time,
25 int time_format);
26 ~TimeEntry();
28 void create_objects();
29 void time_to_hours(char *result, double time);
30 void time_to_minutes(char *result, double time);
31 void time_to_seconds(char *result, double time);
32 virtual int handle_event();
33 static int day_to_int(char *day);
34 void update(int *day, double *time);
35 void reposition_window(int x, int y);
36 int get_h();
37 int get_w();
39 BC_WindowBase *gui;
40 int x, y;
41 DayText *day_text;
42 DayTumbler *day_tumbler;
43 TimeTextBox *time_text;
44 double *output;
45 static char *day_table[TOTAL_DAYS];
46 int *output_day;
47 double *output_time;
48 int time_format;
51 class DayText : public BC_TextBox
53 public:
54 DayText(TimeEntry *timeentry,
55 int x,
56 int y,
57 int w,
58 char **table,
59 int table_items,
60 char *text);
61 int handle_event();
63 char **table;
64 TimeEntry *timeentry;
65 int table_items;
66 int current_item;
69 class DayTumbler : public BC_Tumbler
71 public:
72 DayTumbler(TimeEntry *timeentry,
73 DayText *text,
74 int x,
75 int y);
77 int handle_up_event();
78 int handle_down_event();
80 TimeEntry *timeentry;
81 DayText *text;
84 class TimeTextBox : public BC_TextBox
86 public:
87 TimeTextBox(TimeEntry *timeentry,
88 int x,
89 int y,
90 int w,
91 char *default_text);
92 int handle_event();
93 TimeEntry *timeentry;
97 #endif