#ifndef GROB_HH
#define GROB_HH
-#include "parray.hh"
#include "virtual-methods.hh"
-#include "lily-guile.hh"
-#include "lily-proto.hh"
-#include "smobs.hh"
#include "dimension-cache.hh"
#include "grob-interface.hh"
+#include "object-key.hh"
/**
- for administration of what was done already
- */
+ for administration of what was done already
+*/
enum Grob_status {
- ORPHAN=0, // not yet added to Paper_score
+ ORPHAN = 0, // not yet added to Paper_score
PRECALCING,
PRECALCED, // calcs before spacing done
POSTCALCING, // busy calculating. This is used to trap cyclic deps.
private:
DECLARE_SMOBS (Grob, foo);
void init ();
-
protected:
+ Object_key const * key_;
SCM immutable_property_alist_;
SCM mutable_property_alist_;
+
+ /* BARF */
friend class Spanner;
+ friend SCM ly_grob_properties (SCM);
+ friend SCM ly_grob_basic_properties (SCM);
void substitute_mutable_properties (SCM, SCM);
char status_;
public:
+ Object_key const *get_key () const;
+
Grob *original_;
/* TODO: junk this member. */
Dimension_cache dim_cache_[NO_AXES];
- Grob (SCM basic_props);
- Grob (Grob const&);
- VIRTUAL_COPY_CONSTRUCTOR (Grob, Grob);
+ Grob (SCM basic_props, Object_key const *);
+ Grob (Grob const&, int copy_count);
+
+ virtual Grob *clone (int count) const;
DECLARE_SCHEME_CALLBACK (stencil_extent, (SCM smob, SCM axis));
String name () const;
-
-
/*
Properties
*/
void warning (String) const;
void programming_error (String) const;
- Output_def *get_paper () const;
+ Output_def *get_layout () const;
void add_dependency (Grob*);
virtual System *get_system () const;
void set_parent (Grob* e, Axis);
// URG
- Grob *get_parent (Axis a) const
- {
- return dim_cache_[a].parent_;
- }
-
+ Grob *get_parent (Axis a) const;
DECLARE_SCHEME_CALLBACK (fixup_refpoint, (SCM));
};
Link_array<Grob> ly_scm2grobs (SCM ell);
SCM ly_grobs2scm (Link_array<Grob> a);
-#endif /* GROB_HH */
+Interval robust_relative_extent (Grob*, Grob*, Axis);
+#endif /* GROB_HH */