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