From: fred Date: Sun, 24 Mar 2002 20:07:26 +0000 (+0000) Subject: lilypond-0.1.52 X-Git-Tag: release/1.5.59~3342 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6464d4e9f3b9cd1469e164d65df46d7f07dde396;p=lilypond.git lilypond-0.1.52 --- diff --git a/lily/axis-group-element.cc b/lily/axis-group-element.cc index 8ef35c0bea..b97b94cf61 100644 --- a/lily/axis-group-element.cc +++ b/lily/axis-group-element.cc @@ -57,3 +57,5 @@ Axis_group_element::Axis_group_element() transparent_b_ = true; } + +IMPLEMENT_IS_TYPE_B1(Axis_group_element, Score_elem); diff --git a/lily/horizontal-group-elem.cc b/lily/horizontal-group-elem.cc new file mode 100644 index 0000000000..85ca745509 --- /dev/null +++ b/lily/horizontal-group-elem.cc @@ -0,0 +1,34 @@ + +#include "horizontal-group-elem.hh" +#include "interval.hh" +#include "item.hh" +#include "debug.hh" + + +IMPLEMENT_IS_TYPE_B1(Horizontal_group_element, Axis_group_element); + +void +Horizontal_group_element::remove_all() +{ + axis_admin_.remove_all (X_AXIS,X_AXIS); +} + +void +Horizontal_group_element::add_element (Graphical_element*e) +{ + axis_admin_.add_element (e,this, X_AXIS,X_AXIS); +} + +void +Horizontal_group_element::remove_element (Graphical_element*e) +{ + axis_admin_.remove_element (e,X_AXIS,X_AXIS); +} + + +Interval +Horizontal_group_element::do_width() const +{ + return axis_admin_.extent (X_AXIS); +} + diff --git a/lily/horizontal-vertical-group-elem.cc b/lily/horizontal-vertical-group-elem.cc new file mode 100644 index 0000000000..6b5ddd79b6 --- /dev/null +++ b/lily/horizontal-vertical-group-elem.cc @@ -0,0 +1,26 @@ + +#include "horizontal-vertical-group-elem.hh" +#include "interval.hh" +#include "item.hh" +#include "debug.hh" + +void +Horizontal_vertical_group_element::remove_all() +{ + axis_admin_.remove_all (X_AXIS,Y_AXIS); +} +void +Horizontal_vertical_group_element::add_element (Graphical_element *e) +{ + axis_admin_.add_element (e, this, X_AXIS, Y_AXIS); +} + +void +Horizontal_vertical_group_element::remove_element (Graphical_element*e) +{ + axis_admin_.remove_element (e, X_AXIS, Y_AXIS); +} + + + +IMPLEMENT_IS_TYPE_B2(Horizontal_vertical_group_element, Horizontal_group_element, Vertical_group_element); diff --git a/lily/include/elem-group.hh b/lily/include/elem-group.hh index 82ab4cc787..59bb03cdf0 100644 --- a/lily/include/elem-group.hh +++ b/lily/include/elem-group.hh @@ -15,49 +15,6 @@ -/** - Treat a group of elements a unity in horizontal sense . - A column is a typical Vertical_group. - */ -class Horizontal_group_element : public virtual Axis_group_element { -protected: - virtual void remove_all(); - virtual Interval do_width() const; - -public: - DECLARE_MY_RUNTIME_TYPEINFO; - virtual void add_element (Graphical_element*); - virtual void remove_element (Graphical_element*); - -}; -/** - Like Horizontal_group_element, but in X direction - */ -class Vertical_group_element : public virtual Axis_group_element { -protected: - virtual Interval do_height() const; - virtual void remove_all(); - -public: - virtual void add_element (Graphical_element*); - virtual void remove_element (Graphical_element*); - DECLARE_MY_RUNTIME_TYPEINFO; -}; - -/** A class to treat a group of elements as a single entity. The - dimensions are the unions of the dimensions of what it contains. - Translation means translating the contents. - */ -class Horizontal_vertical_group_element : public Vertical_group_element, - public Horizontal_group_element -{ -protected: - virtual void remove_all(); -public: - virtual void add_element (Graphical_element*); - virtual void remove_element (Graphical_element*); - - DECLARE_MY_RUNTIME_TYPEINFO; -}; +#error #endif // ELEM_GROUP_HH diff --git a/lily/include/horizontal-align-item.hh b/lily/include/horizontal-align-item.hh index f223e07be1..7ae19db88b 100644 --- a/lily/include/horizontal-align-item.hh +++ b/lily/include/horizontal-align-item.hh @@ -9,7 +9,7 @@ #ifndef HORIZONTAL_ALIGN_ITEM_HH #define HORIZONTAL_ALIGN_ITEM_HH -#include "elem-group.hh" + #include "item.hh" /** diff --git a/lily/include/horizontal-group-elem.hh b/lily/include/horizontal-group-elem.hh new file mode 100644 index 0000000000..8d3adfb48a --- /dev/null +++ b/lily/include/horizontal-group-elem.hh @@ -0,0 +1,33 @@ +/* + horizontal-group-elem.hh -- declare + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys + + */ + +#ifndef HORIZONTAL_GROUP_ELEM_HH +#define HORIZONTAL_GROUP_ELEM_HH + +#include "axis-group-element.hh" + +/** + Treat a group of elements a unity in horizontal sense . + A column is a typical Vertical_group. + */ +class Horizontal_group_element : public virtual Axis_group_element { +protected: + virtual void remove_all(); + virtual Interval do_width() const; + +public: + DECLARE_MY_RUNTIME_TYPEINFO; + virtual void add_element (Graphical_element*); + virtual void remove_element (Graphical_element*); + +}; + + +#endif /* HORIZONTAL_GROUP_ELEM_HH */ + diff --git a/lily/include/horizontal-group-item.hh b/lily/include/horizontal-group-item.hh index 10d8106b1d..568c257c64 100644 --- a/lily/include/horizontal-group-item.hh +++ b/lily/include/horizontal-group-item.hh @@ -10,7 +10,7 @@ #ifndef HORIZONTAL_GROUP_ITEM_HH #define HORIZONTAL_GROUP_ITEM_HH -#include "elem-group.hh" +#include "horizontal-group-elem.hh" #include "axis-group-item.hh" /** diff --git a/lily/include/horizontal-vertical-group-elem.hh b/lily/include/horizontal-vertical-group-elem.hh new file mode 100644 index 0000000000..9080872395 --- /dev/null +++ b/lily/include/horizontal-vertical-group-elem.hh @@ -0,0 +1,35 @@ +/* + horizontal-vertical-group-elem.hh -- declare + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys + + */ + +#ifndef HORIZONTAL_VERTICAL_GROUP_ELEM_HH +#define HORIZONTAL_VERTICAL_GROUP_ELEM_HH + +#include "vertical-group-elem.hh" +#include "horizontal-group-elem.hh" + +/** A class to treat a group of elements as a single entity. The + dimensions are the unions of the dimensions of what it contains. + Translation means translating the contents. + */ +class Horizontal_vertical_group_element : public Vertical_group_element, + public Horizontal_group_element +{ +protected: + virtual void remove_all(); +public: + virtual void add_element (Graphical_element*); + virtual void remove_element (Graphical_element*); + + DECLARE_MY_RUNTIME_TYPEINFO; +}; + + +#endif /* HORIZONTAL_VERTICAL_GROUP_ELEM_HH */ + + diff --git a/lily/include/horizontal-vertical-group-item.hh b/lily/include/horizontal-vertical-group-item.hh index 733ff639bd..1aa8c8b82c 100644 --- a/lily/include/horizontal-vertical-group-item.hh +++ b/lily/include/horizontal-vertical-group-item.hh @@ -11,7 +11,7 @@ #define HORIZONTAL_VERTICAL_GROUP_ITEM_HH #include "axis-group-item.hh" -#include "elem-group.hh" +#include "horizontal-vertical-group-elem.hh" /** diff --git a/lily/include/vertical-align-elem.hh b/lily/include/vertical-align-elem.hh index bb6b7ed48f..a01e2c5164 100644 --- a/lily/include/vertical-align-elem.hh +++ b/lily/include/vertical-align-elem.hh @@ -10,7 +10,7 @@ #ifndef VERTICAL_ALIGN_ITEM_HH #define VERTICAL_ALIGN_ITEM_HH -#include "elem-group.hh" +#include "score-elem.hh" /** Order elements top to bottom. diff --git a/lily/include/vertical-group-elem.hh b/lily/include/vertical-group-elem.hh new file mode 100644 index 0000000000..5e46c66fd5 --- /dev/null +++ b/lily/include/vertical-group-elem.hh @@ -0,0 +1,29 @@ +/* + vertical-group-elem.hh -- declare + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys + + */ + +#ifndef VERTICAL_GROUP_ELEM_HH +#define VERTICAL_GROUP_ELEM_HH + +#include "axis-group-element.hh" +/** + Like Horizontal_group_element, but in X direction + */ +class Vertical_group_element : public virtual Axis_group_element { +protected: + virtual Interval do_height() const; + virtual void remove_all(); + +public: + virtual void add_element (Graphical_element*); + virtual void remove_element (Graphical_element*); + DECLARE_MY_RUNTIME_TYPEINFO; +}; + +#endif /* VERTICAL_GROUP_ELEM_HH */ + diff --git a/lily/vertical-align-grav.cc b/lily/vertical-align-grav.cc index 94f5d05204..fe773a9375 100644 --- a/lily/vertical-align-grav.cc +++ b/lily/vertical-align-grav.cc @@ -9,6 +9,7 @@ #include "p-col.hh" #include "vertical-align-grav.hh" #include "vertical-align-spanner.hh" +#include "vertical-group-elem.hh" Vertical_align_engraver::Vertical_align_engraver() {