configure.ac add with-cuda/nv, update cakewalk theme, add cuda/plugins=mandel+nbody...
[goodguy/cinelerra.git] / cinelerra-5.1 / plugins / nbodycuda / nbodywindow.h
1 /*
2  * CINELERRA
3  * Copyright (C) 2008-2014 Adam Williams <broadcast at earthling dot net>
4  * 
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  * 
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  * 
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18  * 
19  */
20
21 #ifndef NBODYCUDAWINDOW_H
22 #define NBODYCUDAWINDOW_H
23
24
25 #include "guicast.h"
26 #include "nbody.h"
27
28 class N_BodyDrag;
29 class N_BodyReset;
30 class NBodyModeItems;
31 class N_BodySetMode;
32 class NBodyDemoItems;
33 class N_BodySetDemo;
34 class NBodyNumBodyItems;
35 class N_BodyNumBodies;
36 class N_BodyWindow;
37
38 class N_BodyDrag : public BC_CheckBox
39 {
40 public:
41         N_BodyDrag(N_BodyWindow *gui, int x, int y);
42
43         int handle_event();
44         N_BodyWindow *gui;
45 };
46
47 class N_BodyReset : public BC_GenericButton
48 {
49 public:
50         N_BodyReset(N_BodyWindow *gui, int x, int y);
51         ~N_BodyReset();
52         int handle_event();
53
54         N_BodyWindow *gui;
55 };
56
57 class NBodyModeItems : public ArrayList<BC_ListBoxItem*>
58 {
59 public:
60         NBodyModeItems() {} 
61         ~NBodyModeItems() { remove_all_objects(); }
62 };
63
64 class N_BodySetMode : public BC_PopupTextBox
65 {
66 public:
67         N_BodySetMode(N_BodyWindow *gui, int x, int y, const char *text);
68         void create_objects();
69         int handle_event();
70
71         N_BodyWindow *gui;
72         NBodyModeItems mode_items;
73 };
74
75 class NBodyDemoItems : public ArrayList<BC_ListBoxItem*>
76 {
77 public:
78         NBodyDemoItems() {} 
79         ~NBodyDemoItems() { remove_all_objects(); }
80 };
81
82 class N_BodySetDemo : public BC_PopupTextBox
83 {
84 public:
85         N_BodySetDemo(N_BodyWindow *gui, int x, int y, const char *text);
86         void create_objects();
87         int handle_event();
88
89         N_BodyWindow *gui;
90         NBodyDemoItems demo_items;
91 };
92
93 class NBodyNumBodyItems : public ArrayList<BC_ListBoxItem*>
94 {
95 public:
96         NBodyNumBodyItems() {} 
97         ~NBodyNumBodyItems() { remove_all_objects(); }
98 };
99
100 class N_BodyNumBodies : public BC_PopupTextBox
101 {
102 public:
103         N_BodyNumBodies(N_BodyWindow *gui, int x, int y, const char *text);
104         void create_objects();
105         int handle_event();
106
107         N_BodyWindow *gui;
108         NBodyNumBodyItems num_body_items;
109 };
110
111
112 class N_BodyWindow : public PluginClientWindow
113 {
114 public:
115         N_BodyWindow(N_BodyMain *plugin);
116         ~N_BodyWindow();
117
118         void create_objects();
119         void update_gui();
120
121         int grab_event(XEvent *event);
122         int do_grab_event(XEvent *event);
123         void done_event(int result);
124         void send_configure_change();
125
126         N_BodyMain *plugin;
127         N_BodySetMode *set_mode;
128         N_BodySetDemo *set_demo;
129         N_BodyNumBodies *num_bodies;
130         N_BodyDrag *drag;
131         N_BodyReset *reset;
132
133         int press_x, press_y;
134         int button_no, pending_config;
135 };
136
137 #endif