friend class Spanner;
friend SCM ly_grob_properties (SCM);
friend SCM ly_grob_basic_properties (SCM);
- friend void check_interfaces_for_property (Grob const *, SCM);
void substitute_object_links (SCM, SCM);
DECLARE_CLASSNAME(Grob);
Real get_offset (Axis a) const;
-public:
- DECLARE_SCHEME_CALLBACK(x_parent_positioning, (SCM));
- DECLARE_SCHEME_CALLBACK(y_parent_positioning, (SCM));
-
- Object_key const *get_key () const;
+ Output_def *layout_;
+ Dimension_cache dim_cache_[NO_AXES];
Grob *original_;
- /* TODO: junk this member. */
- Paper_score *pscore_;
+ SCM try_callback (SCM, SCM);
+public:
+ DECLARE_SCHEME_CALLBACK(x_parent_positioning, (SCM));
+ DECLARE_SCHEME_CALLBACK(y_parent_positioning, (SCM));
+ DECLARE_SCHEME_CALLBACK (stencil_height, (SCM smob));
+ DECLARE_SCHEME_CALLBACK (stencil_width, (SCM smob));
- Dimension_cache dim_cache_[NO_AXES];
+ /* R/O access */
+ Output_def *layout () const { return layout_; }
+ Grob *original () const { return original_; }
+ SCM interfaces () const { return interfaces_; }
+ Object_key const *key () const { return key_; }
+ /* life & death */
Grob (SCM basic_props, Object_key const *);
Grob (Grob const &, int copy_count);
-
virtual Grob *clone (int count) const;
- static SCM stencil_extent (Grob*, Axis);
- DECLARE_SCHEME_CALLBACK (stencil_height, (SCM smob));
- DECLARE_SCHEME_CALLBACK (stencil_width, (SCM smob));
-
-
+
+ /* forced death */
+ void suicide ();
+ bool is_live () const;
+
+ /* naming. */
String name () const;
- /*
- Properties
- */
+
+ /* Properties */
+ SCM get_property_alist_chain (SCM) const;
SCM internal_get_property (SCM symbol) const;
SCM get_property_data (SCM symbol) const;
SCM internal_get_object (SCM symbol) const;
-
void del_property (SCM symbol);
void internal_set_property (SCM sym, SCM val);
void internal_set_object (SCM sym, SCM val);
- SCM try_callback (SCM, SCM);
-
- SCM get_property_alist_chain (SCM) const;
- static SCM ly_grob_set_property (SCM, SCM, SCM);
- static SCM ly_grob_property (SCM, SCM);
-
+ /* messages */
void warning (String) const;
void programming_error (String) const;
- Output_def *get_layout () const;
+
+ /* class hierarchy */
virtual System *get_system () const;
virtual void do_break_processing ();
virtual Grob *find_broken_piece (System *) const;
virtual void discretionary_processing ();
virtual void derived_mark () const;
+ virtual void handle_broken_dependencies ();
+ virtual void handle_prebroken_dependencies ();
+ /* printing */
Stencil *get_stencil () const;
Stencil get_print_stencil () const;
- void suicide ();
- bool is_live () const;
-
+ /* interfaces */
bool internal_has_interface (SCM intf);
static bool has_interface (Grob *me);
- SCM get_interfaces () const;
-
- virtual void handle_broken_dependencies ();
- virtual void handle_prebroken_dependencies ();
-
- Interval extent (Grob *refpoint, Axis) const;
+ /* offsets */
void translate_axis (Real, Axis);
Real relative_coordinate (Grob const *refp, Axis) const;
- Grob *common_refpoint (Grob const *s, Axis a) const;
+ /* extents */
+ Interval extent (Grob *refpoint, Axis) const;
void flush_extent_cache (Axis);
+ /* refpoints */
+ Grob *common_refpoint (Grob const *s, Axis a) const;
void set_parent (Grob *e, Axis);
-
- // URG
Grob *get_parent (Axis a) const;
void fixup_refpoint ();
};
Spanner *unsmob_spanner (SCM);
Item *unsmob_item (SCM);
+/* refpoints */
Grob *common_refpoint_of_list (SCM elt_list, Grob *, Axis a);
Grob *common_refpoint_of_array (Link_array<Grob> const &, Grob *, Axis a);
+System *get_root_system (Grob *me);
-void set_break_subsititution (SCM criterion);
-SCM substitute_object_alist (SCM alist, SCM dest);
-
-Link_array<Grob> ly_scm2grobs (SCM ell);
-SCM ly_grobs2scm (Link_array<Grob> a);
-
+/* extents */
Interval robust_relative_extent (Grob *, Grob *, Axis);
-
-SCM axis_offset_symbol (Axis a);
-SCM axis_self_offset_symbol (Axis a);
-SCM axis_parent_positioning (Axis a);
+/* offset/extent callbacks. */
void add_offset_callback (Grob *g, SCM proc, Axis a);
void chain_offset_callback (Grob *g, SCM proc, Axis a);
+SCM axis_offset_symbol (Axis a);
+SCM axis_parent_positioning (Axis a);
#endif /* GROB_HH */