source: golgotha/src/golg/editor/mode/e_camera.hh @ 80

Last change on this file since 80 was 80, checked in by Sam Hocevar, 14 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
File size: 2.1 KB
Line 
1/********************************************************************** <BR>
2  This file is part of Crack dot Com's free source code release of
3  Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
4  information about compiling & licensing issues visit this URL</a>
5  <PRE> If that doesn't help, contact Jonathan Clark at
6  golgotha_source@usa.net (Subject should have "GOLG" in it)
7***********************************************************************/
8
9#ifndef CAMERA_HANDLER_HH
10#define CAMERA_HANDLER_HH
11
12
13#include "editor/e_state.hh"
14#include "editor/mode/e_mode.hh"
15
16class g1_camera_mode : public g1_mode_handler
17{
18public:
19
20  virtual state current_state();
21  void mouse_down();
22
23  virtual i4_bool select_object(sw32 mx, sw32 my,
24                                i4_float &ox, i4_float &oy, i4_float &oz,
25                                select_modifier add_modifier);
26
27  virtual void select_objects_in_area(sw32 x1, sw32 y1, sw32 x2, sw32 y2,
28                                      select_modifier add_modifier);
29
30  virtual void move_selected(i4_float xc, i4_float yc, i4_float zc,
31                             sw32 mouse_x, sw32 mouse_y);
32
33  virtual void post_draw(i4_draw_context_class &context);
34 
35  virtual void delete_selected();
36
37  virtual void edit_selected();
38
39  g1_camera_mode(g1_controller_edit_class *c) : g1_mode_handler(c) {}
40};
41
42
43
44class g1_camera_params : public g1_mode_creator
45{
46public:
47  char *name() { return "CAMERA"; }
48  g1_camera_params();
49
50  enum
51  {
52    ROTATE,
53    ZOOM,
54    ADD_CAMERA,
55    ADD_TARGET,
56    ADD_OBJECT,
57    MOVE,
58    SELECT
59  };
60
61  void create_buttons(i4_parent_window_class *containter);
62  i4_event_handler_reference_class<i4_parent_window_class> edit_win;
63
64
65  i4_bool should_show_frames() { return i4_F; }
66
67  void cleanup();
68  void set_edit_window(i4_parent_window_class *p, sw32 x, sw32 y);
69
70  g1_mode_handler *create_mode_handler(g1_controller_edit_class *c)
71  { return new g1_camera_mode(c); }
72
73
74} ;
75
76extern g1_camera_params g1_e_camera;
77
78
79
80#endif
81
82
Note: See TracBrowser for help on using the repository browser.