camera zoom fix, upgrade giflib, configure.ac ix86 probe tweaks, any python
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / tipwindow.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 TIPWINDOW_H
23 #define TIPWINDOW_H
24
25 #include "bcdialog.h"
26 #include "cstrdup.h"
27 #include "guicast.h"
28 #include "mwindow.inc"
29 #include "tipwindow.inc"
30
31
32 class Tips : public ArrayList<const char *> {
33 public:
34         Tips() { set_array_delete(); }
35         ~Tips() { remove_all_objects(); }
36         void add(const char *tip) { append(cstrdup(tip)); }
37 };
38
39 // Tip of the day to be run at initialization
40
41
42 class TipWindow : public BC_DialogThread
43 {
44 public:
45         TipWindow(MWindow *mwindow);
46         ~TipWindow();
47         void handle_close_event(int result);
48
49         BC_Window* new_gui();
50         static void load_tips(const char *lang);
51         const char* get_current_tip(int n);
52         void next_tip();
53         void prev_tip();
54
55         MWindow *mwindow;
56         TipWindowGUI *gui;
57 };
58
59
60 class TipWindowGUI : public BC_Window
61 {
62 public:
63         TipWindowGUI(MWindow *mwindow,
64                 TipWindow *thread,
65                 int x,
66                 int y);
67         void create_objects();
68         int keypress_event();
69         MWindow *mwindow;
70         TipWindow *thread;
71         BC_Title *tip_text;
72 };
73
74 class TipDisable : public BC_CheckBox
75 {
76 public:
77         TipDisable(MWindow *mwindow, TipWindowGUI *gui, int x, int y);
78         int handle_event();
79         TipWindowGUI *gui;
80         MWindow *mwindow;
81 };
82
83 class TipNext : public BC_Button
84 {
85 public:
86         TipNext(MWindow *mwindow, TipWindowGUI *gui, int x, int y);
87         int handle_event();
88         static int calculate_w(MWindow *mwindow);
89         TipWindowGUI *gui;
90         MWindow *mwindow;
91 };
92
93 class TipPrev : public BC_Button
94 {
95 public:
96         TipPrev(MWindow *mwindow, TipWindowGUI *gui, int x, int y);
97         int handle_event();
98         static int calculate_w(MWindow *mwindow);
99         TipWindowGUI *gui;
100         MWindow *mwindow;
101 };
102
103 class TipClose : public BC_Button
104 {
105 public:
106         TipClose(MWindow *mwindow, TipWindowGUI *gui, int x, int y);
107         int handle_event();
108         static int calculate_w(MWindow *mwindow);
109         static int calculate_h(MWindow *mwindow);
110         TipWindowGUI *gui;
111         MWindow *mwindow;
112 };
113
114
115
116 #endif