]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/prob.hh
feabb4cf784b47d6a4a25fc00c94b0dc7e1a82e3
[lilypond.git] / lily / include / prob.hh
1 /*
2   property-object.hh -- declare Property_object
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 2004--2007  Jan Nieuwenhuizen <janneke@gnu.org>
7 */
8
9 #ifndef PROPERTY_OBJECT_HH
10 #define PROPERTY_OBJECT_HH
11
12 #include "stencil.hh"
13 #include "virtual-methods.hh"
14
15
16 /*
17   A formatted "system" (A block of titling also is a Property_object)
18
19   To save memory, we don't keep around the System grobs, but put the
20   formatted content of the grob is put into a
21   Property_object. Page-breaking handles Property_object objects.
22 */
23
24 class Prob
25 {
26   DECLARE_SMOBS (Prob);
27   DECLARE_CLASSNAME(Prob);
28
29   void init_vars ();
30 protected:
31   SCM mutable_property_alist_;
32   SCM immutable_property_alist_;
33   SCM type_;
34   
35   virtual void derived_mark () const;
36   virtual SCM copy_mutable_properties () const;
37   virtual void type_check_assignment (SCM,SCM) const;
38   
39 public:
40   Prob (SCM, SCM);
41   Prob (Prob const &);
42   virtual string name () const;
43   SCM type () const { return type_; }
44   SCM get_property_alist (bool _mutable) const;
45   SCM internal_get_property (SCM sym) const;
46   void instrumented_set_property (SCM, SCM, const char*, int, const char*);
47   void internal_set_property (SCM sym, SCM val);
48 };
49
50 DECLARE_UNSMOB(Prob,prob);
51
52 SCM ly_prob_set_property_x (SCM system, SCM sym, SCM value);
53 SCM ly_prob_property (SCM system, SCM sym, SCM dfault);
54
55 SCM ly_prob_type_p (SCM obj, SCM sym);
56   
57 #endif /* PROPERTY_OBJECT_HH */