fix compile against newer giflib
[rofl0r-obeditor.git] / src / levels__Ob_GObjects.h
blobbefe041623995a3d83a74200d441c8847bc136aa
1 #ifndef LEVELS__OB_GOBJECTS_H
2 #define LEVELS__OB_GOBJECTS_H
4 #include <wx/bitmap.h>
5 #include <wx/image.h>
6 #include <list>
8 #include "common__object_stage.h"
10 //*****************************************************************
11 class Ob_GObject;
12 //-----------------------------------------------------------------
13 enum
15 GATOM_AT,
16 GATOM_SHADOW,
17 GATOM_BODY,
18 GATOM_CURSOR,
19 GATOM_SCROLL_LINE,
20 GATOM_SPAWN_POINT,
21 GATOM_OTHER, // Wall Hole
24 class Ob_GAtom
26 public:
27 Ob_GAtom(int atom_id);
28 virtual ~Ob_GAtom(){};
29 wxString ToStr();
31 Ob_GObject* referer;
33 int id_atom;
34 wxString key;
35 wxSize coords;
36 wxSize size;
37 wxSize view_coords;
38 bool b_on_screen;
39 wxBitmap* theBitmap;
40 wxImage* lastImg;
41 wxBitmap* bitmap_Mini;
42 wxImage* img_Mini;
43 int Z;
44 int A;
48 //-----------------------------------------------------------------
49 class Ob_GObject
51 public:
52 static Ob_GObject* GuessAndConstruct( ob_stage_object* src );
54 public:
55 Ob_GObject( ob_stage_object* src ){obj = src;};
56 virtual ~Ob_GObject(){};
58 std::list<Ob_GAtom*>*
59 GetBitmaps(
60 wxSize view_coords ,
61 wxSize view_size ,
62 float zoom_factor,
63 int select_state,
64 int stage_w
67 // Return true if the TAB controls must be updated
68 virtual bool OnMouseEvent( Ob_GAtom* obAtom, wxSize _m_coords, wxMouseEvent& evt, bool multi_selection );
70 // Return true if the TAB controls must be updated
71 virtual bool OnKeyEvent( wxKeyEvent& evt, bool multi_selection );
73 // Return true if the TAB controls must be updated
74 virtual bool ApplyMove( wxSize& diffs, bool multi_selection ){return false;};
76 ob_stage_object* obj;
77 protected:
78 virtual std::list<Ob_GAtom*>* Get_GAtoms(
79 wxSize view_coords ,
80 wxSize view_size ,
81 float zoom_factor,
82 int select_state,
83 int stage_w
84 ) = 0;
85 int m_flag;
86 wxSize m_coords;
89 //-----------------------------------------------------------------
90 class Ob_GObject__Spawn : public Ob_GObject
92 public:
93 Ob_GObject__Spawn( ob_stage_object* src );
94 virtual ~Ob_GObject__Spawn();
96 virtual bool ApplyMove( wxSize& diffs, bool multi_selection );
98 protected:
99 std::list<Ob_GAtom*>* Get_GAtoms(
100 wxSize view_coords ,
101 wxSize view_size ,
102 float zoom_factor,
103 int select_state,
104 int stage_w
108 //-----------------------------------------------------------------
109 class Ob_GObject__AT : public Ob_GObject
111 public:
112 Ob_GObject__AT( ob_stage_object* src );
113 virtual ~Ob_GObject__AT();
115 virtual bool ApplyMove( wxSize& diffs, bool multi_selection );
117 protected:
118 wxColour barColour;
119 wxString barLabel;
120 int vert_truncate_up;
121 int vert_truncate_down;
122 int horiz_width_up;
123 int horiz_width_down;
124 std::list<Ob_GAtom*>* Get_GAtoms(
125 wxSize view_coords ,
126 wxSize view_size ,
127 float zoom_factor,
128 int select_state,
129 int stage_w
134 //-----------------------------------------------------------------
135 class Ob_GObject__ScrollZ : public Ob_GObject
137 public:
138 Ob_GObject__ScrollZ( ob_stage_object* src );
139 virtual ~Ob_GObject__ScrollZ();
141 virtual bool OnMouseEvent( Ob_GAtom* obAtom, wxSize _m_coords, wxMouseEvent& evt, bool multi_selection );
142 virtual bool ApplyMove( wxSize& diffs, bool multi_selection );
144 protected:
145 std::list<Ob_GAtom*>* Get_GAtoms(
146 wxSize view_coords ,
147 wxSize view_size ,
148 float zoom_factor,
149 int select_state,
150 int stage_w
155 //-----------------------------------------------------------------
156 class Ob_GObject__PlayerSpawn : public Ob_GObject
158 public:
159 Ob_GObject__PlayerSpawn( ob_stage_object* src );
160 virtual ~Ob_GObject__PlayerSpawn();
162 virtual bool ApplyMove( wxSize& diffs, bool multi_selection );
164 protected:
165 std::list<Ob_GAtom*>* Get_GAtoms(
166 wxSize view_coords ,
167 wxSize view_size ,
168 float zoom_factor,
169 int select_state,
170 int stage_w
176 //-----------------------------------------------------------------
177 class Ob_GObject__Wall : public Ob_GObject
179 public:
180 static wxColour theColor;
182 public:
183 Ob_GObject__Wall( ob_stage_object* src );
184 virtual ~Ob_GObject__Wall();
186 virtual bool OnMouseEvent( Ob_GAtom* obAtom, wxSize _m_coords, wxMouseEvent& evt, bool multi_selection );
187 virtual bool ApplyMove( wxSize& diffs, bool multi_selection );
189 protected:
190 std::list<Ob_GAtom*>* Get_GAtoms(
191 wxSize view_coords ,
192 wxSize view_size ,
193 float zoom_factor,
194 int select_state,
195 int stage_w
197 // Only the first 4 are draguables
198 wxSize pts[8];
199 wxSize pt_alt;
200 wxSize pt_depth;
201 wxString last_wall_state;
202 int min_x;
203 int max_x;
204 int spaces;
205 int total_h;
207 enum{
208 LL = 0,
209 LR = 1,
210 UL = 2,
211 UR = 3,
212 TLL = 4,
213 TLR = 5,
214 TUL = 6,
215 TUR = 7,
218 enum{
219 OBG_WALL,
220 OBG_HOLE,
222 m_type;
226 //-----------------------------------------------------------------
227 class Ob_GObject__Hole : public Ob_GObject
235 //-----------------------------------------------------------------
236 #endif //LEVELS__OB_GOBJECTS_H