ocglyph.h

Go to the documentation of this file.
00001 #ifndef ocglyph_h
00002 #define ocglyph_h
00003 
00004 #include <InterViews/monoglyph.h>
00005 #include <ivstream.h>
00006 class PrintableWindow;
00007 class Dialog;
00008 
00009 /* 
00010    A glyph that can be saved and restored using oc classes.
00011    Can be mapped in its own window or be part of a tray.
00012 */
00013 
00014 class OcGlyph : public MonoGlyph {
00015 public:
00016    OcGlyph(Glyph* body=nil);
00017    virtual ~OcGlyph();
00018 
00019    virtual void save(ostream&);
00020    virtual boolean has_window();
00021    virtual PrintableWindow* window();
00022    virtual void window(PrintableWindow*);
00023    virtual PrintableWindow*  make_window(Coord left = -1, Coord bottom = -1,
00024       Coord width = -1, Coord height = -1);
00025 
00026    virtual void no_parents();
00027    void parents(boolean);
00028 
00029    virtual boolean dialog(const char* label,
00030       const char* accept, const char* cancel);
00031    boolean dialog_dismiss(boolean b);
00032    virtual void def_size(Coord& w, Coord& h)const;
00033    int session_priority() { return session_priority_; }
00034    void session_priority(int i) { session_priority_ = i; }
00035 private:
00036    PrintableWindow* w_; 
00037    int parents_;
00038    Coord def_w_, def_h_;
00039    Dialog* d_;
00040    int session_priority_;
00041 };
00042 
00043 class OcGlyphContainer : public OcGlyph {
00044 public:
00045    OcGlyphContainer();
00046    virtual void intercept(boolean);
00047    virtual void box_append(OcGlyph*) = 0;
00048    virtual void request(Requisition&) const;
00049 private:
00050    OcGlyphContainer* parent_;
00051    boolean recurse_;
00052 };
00053 
00054 #endif
Generated on Mon Jun 13 08:10:24 2011 for NEURON by  doxygen 1.6.3