source: golgotha/src/i4/gui/browse_tree.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.6 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 I4_BROWSE_TREE_HH
10#define I4_BROWSE_TREE_HH
11
12
13#include "window/window.hh"
14#include "menu/menuitem.hh"
15#include "error/error.hh"
16
17class i4_graphical_style_class;
18
19class i4_browse_window_class : public i4_parent_window_class
20{
21public:
22  char *name() { return "browse_window"; }
23
24  i4_bool expanded;
25  i4_parent_window_class *title_area;
26  i4_window_class *child_object, *toggle_button;
27
28  i4_graphical_style_class *style;
29
30  i4_browse_window_class(i4_graphical_style_class *style,
31                         i4_window_class *title_object,
32                         i4_window_class *child_object,
33                         i4_bool show_plus_minus,
34                         i4_bool expanded);
35
36
37  virtual void compress();
38  virtual void expand();
39
40
41  void add_arranged_child(i4_window_class *child);
42  virtual void replace_object(i4_window_class *object);
43  virtual sw32 x_start();
44  virtual void receive_event(i4_event *ev);
45  virtual void parent_draw(i4_draw_context_class &context);
46};
47
48
49class i4_vertical_compact_window_class : public i4_parent_window_class
50{
51  i4_color color;
52  i4_bool center;
53public:
54  char *name() { return "vertical_compact"; }
55
56  virtual void receive_event(i4_event *ev);
57  virtual void parent_draw(i4_draw_context_class &context);
58  void compact();
59  i4_vertical_compact_window_class(i4_color color, i4_bool center=i4_F)
60    : i4_parent_window_class(0,0), color(color), center(center) {}
61  virtual void remove_child(i4_window_class *child)
62  {
63    i4_parent_window_class::remove_child(child);
64    compact();
65  }
66};
67
68class i4_horizontal_compact_window_class : public i4_parent_window_class
69{
70  i4_color color;
71  i4_bool center;
72public:
73  char *name() { return "vertical_compact"; }
74
75  virtual void receive_event(i4_event *ev);
76  virtual void parent_draw(i4_draw_context_class &context);
77  void compact();
78  i4_horizontal_compact_window_class(i4_color color, i4_bool center=i4_F)
79    : i4_parent_window_class(0,0), color(color), center(center) {}
80  virtual void remove_child(i4_window_class *child)
81  {
82    i4_parent_window_class::remove_child(child);
83    compact();
84  }
85};
86
87#endif
88
89
90
91
92
93
94
95
96
Note: See TracBrowser for help on using the repository browser.