NEURON
ocglyph.h
Go to the documentation of this file.
1 #ifndef ocglyph_h
2 #define ocglyph_h
3 
4 #include <InterViews/monoglyph.h>
5 #include <ivstream.h>
6 class PrintableWindow;
7 class Dialog;
8 
9 /*
10  A glyph that can be saved and restored using oc classes.
11  Can be mapped in its own window or be part of a tray.
12 */
13 
14 class OcGlyph: public MonoGlyph {
15  public:
16  OcGlyph(Glyph* body = NULL);
17  virtual ~OcGlyph();
18 
19  virtual void save(std::ostream&);
20  virtual bool has_window();
21  virtual PrintableWindow* window();
22  virtual void window(PrintableWindow*);
24  Coord bottom = -1,
25  Coord width = -1,
26  Coord height = -1);
27 
28  virtual void no_parents();
29  void parents(bool);
30 
31  virtual bool dialog(const char* label, const char* accept, const char* cancel);
32  bool dialog_dismiss(bool b);
33  virtual void def_size(Coord& w, Coord& h) const;
35  return session_priority_;
36  }
37  void session_priority(int i) {
39  }
40 
41  private:
43  int parents_;
47 };
48 
49 class OcGlyphContainer: public OcGlyph {
50  public:
52  virtual void intercept(bool);
53  virtual void box_append(OcGlyph*) = 0;
54  virtual void request(Requisition&) const;
55 
56  private:
58  bool recurse_;
59 };
60 
61 #endif
#define Coord
Definition: _defines.h:19
#define Dialog
Definition: _defines.h:94
#define MonoGlyph
Definition: _defines.h:181
#define Glyph
Definition: _defines.h:132
virtual void box_append(OcGlyph *)=0
virtual void intercept(bool)
OcGlyphContainer * parent_
Definition: ocglyph.h:57
virtual void request(Requisition &) const
Coord def_w_
Definition: ocglyph.h:44
int parents_
Definition: ocglyph.h:43
virtual bool dialog(const char *label, const char *accept, const char *cancel)
bool dialog_dismiss(bool b)
virtual void save(std::ostream &)
virtual void window(PrintableWindow *)
virtual ~OcGlyph()
PrintableWindow * w_
Definition: ocglyph.h:42
Dialog * d_
Definition: ocglyph.h:45
void parents(bool)
virtual PrintableWindow * make_window(Coord left=-1, Coord bottom=-1, Coord width=-1, Coord height=-1)
Coord def_h_
Definition: ocglyph.h:44
virtual PrintableWindow * window()
int session_priority()
Definition: ocglyph.h:34
OcGlyph(Glyph *body=NULL)
int session_priority_
Definition: ocglyph.h:46
virtual bool has_window()
virtual void no_parents()
void session_priority(int i)
Definition: ocglyph.h:37
virtual void def_size(Coord &w, Coord &h) const
#define i
Definition: md1redef.h:12
#define left
Definition: rbtqueue.cpp:45
#define NULL
Definition: sptree.h:16