source: golgotha/src/golg/cwin_man.hh @ 80

Last change on this file since 80 was 80, checked in by Sam Hocevar, 12 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.7 KB
RevLine 
[80]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 G1_CONTROLLER_WINDOW_MANAGER_HH
10#define G1_CONTROLLER_WINDOW_MANAGER_HH
11
12#include "device/device.hh"
13#include "palette/pal.hh"
14#include "time/time.hh"
15#include "math/num_type.hh"
16#include "math/pi.hh"
17#include "camera.hh"
18#include "window/window.hh"
19
20class i4_window_manager_class;
21class g1_map_class;
22class i4_parent_window_class;
23class i4_graphical_style_class;
24class r1_render_api_class;
25class g1_object_controller_class;
26class i4_image_class;
27class g1_map_class;
28class g1_border_frame_class;
29class g1_map_view_class;
30class i4_display_class;
31class g1_object_class;
32class g1_loader_class;
33class g1_saver_class;
34
35// this class manages the view(s) of the game
36// derived from it is the g1_editor_class that creates
37// views with editing behavior (derived from g1_object_controller_class)
38
39class g1_cwin_man_class : public i4_event_handler_class
40{
41private:
42  g1_view_state_class view_state;
43 
44protected:                           // for use by derived classes
45  i4_graphical_style_class   *style;
46  i4_parent_window_class     *parent;
47  i4_image_class             *root_image;
48
49
50  const i4_pal *pal;
51
52public:                             // called by main program
53  char *name() { return "g1_cwin_man_class"; }
54
55  virtual void create_views();
56  virtual void destroy_views();
57 
58  virtual void map_changed();     // called when a new map is loaded/created
59
60  virtual void init(i4_parent_window_class *_parent,
61                    i4_graphical_style_class *_style,
62                    i4_image_class *_root_image,
63                    i4_display_class *display,
64                    i4_window_manager_class *wm);
65 
66  virtual void uninit() { ; }
67
68  virtual void set_edit_mode(i4_bool yes_no) { ; }
69
70  virtual void save_views(g1_saver_class *fp);
71  virtual void load_views(g1_loader_class *fp);
72
73  virtual void receive_event(i4_event *ev);
74
75  g1_cwin_man_class();
76};
77
78
79// initial 0, but should be changed by global constructor if you want
80// this to have different behavior,  if still 0 by the time the game uses it
81// it will create a g1_cwin_man_class
82
83extern g1_cwin_man_class *g1_cwin_man;
84
85void g1_change_key_context(w8 view_mode);
86
87
88
89#endif
Note: See TracBrowser for help on using the repository browser.