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*);
23  virtual PrintableWindow* make_window(Coord left = -1, Coord bottom = -1,
24  Coord width = -1, Coord height = -1);
25 
26  virtual void no_parents();
27  void parents(bool);
28 
29  virtual bool dialog(const char* label,
30  const char* accept, const char* cancel);
31  bool dialog_dismiss(bool b);
32  virtual void def_size(Coord& w, Coord& h)const;
35 private:
37  int parents_;
41 };
42 
43 class OcGlyphContainer : public OcGlyph {
44 public:
46  virtual void intercept(bool);
47  virtual void box_append(OcGlyph*) = 0;
48  virtual void request(Requisition&) const;
49 private:
51  bool recurse_;
52 };
53 
54 #endif
virtual bool has_window()
Coord def_w_
Definition: ocglyph.h:38
virtual PrintableWindow * make_window(Coord left=-1, Coord bottom=-1, Coord width=-1, Coord height=-1)
#define Glyph
Definition: _defines.h:132
#define Coord
Definition: _defines.h:19
void session_priority(int i)
Definition: ocglyph.h:34
int session_priority()
Definition: ocglyph.h:33
virtual void no_parents()
int parents_
Definition: ocglyph.h:37
OcGlyphContainer * parent_
Definition: ocglyph.h:50
virtual void save(std::ostream &)
#define Dialog
Definition: _defines.h:94
PrintableWindow * w_
Definition: ocglyph.h:36
virtual PrintableWindow * window()
static double intercept(void *v)
Definition: ocbox.cpp:162
int session_priority_
Definition: ocglyph.h:40
#define left
Definition: rbtqueue.cpp:45
Coord def_h_
Definition: ocglyph.h:38
bool dialog_dismiss(bool b)
OcGlyph(Glyph *body=NULL)
#define i
Definition: md1redef.h:12
void parents(bool)
#define MonoGlyph
Definition: _defines.h:181
virtual ~OcGlyph()
virtual void def_size(Coord &w, Coord &h) const
return NULL
Definition: cabcode.cpp:461
Dialog * d_
Definition: ocglyph.h:39
virtual bool dialog(const char *label, const char *accept, const char *cancel)