2012-05-26 14:26:10 +02:00
|
|
|
//=============================================================================
|
|
|
|
// MuseScore
|
|
|
|
// Music Composition & Notation
|
|
|
|
//
|
|
|
|
// Copyright (C) 2010-2011 Werner Schweer
|
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License version 2
|
|
|
|
// as published by the Free Software Foundation and appearing in
|
|
|
|
// the file LICENCE.GPL
|
|
|
|
//=============================================================================
|
|
|
|
|
|
|
|
#ifndef __TEXTFRAME_H__
|
|
|
|
#define __TEXTFRAME_H__
|
|
|
|
|
|
|
|
#include "box.h"
|
|
|
|
|
2013-05-13 18:49:17 +02:00
|
|
|
namespace Ms {
|
|
|
|
|
2016-03-02 13:20:19 +01:00
|
|
|
class Text;
|
|
|
|
|
2012-05-26 14:26:10 +02:00
|
|
|
//---------------------------------------------------------
|
2012-07-25 11:49:34 +02:00
|
|
|
// @@ TBox
|
2014-05-16 13:44:32 +02:00
|
|
|
/// Text frame.
|
2012-05-26 14:26:10 +02:00
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
class TBox : public VBox {
|
2014-10-16 11:56:06 +02:00
|
|
|
Text* _text;
|
2012-05-28 11:29:21 +02:00
|
|
|
|
2012-05-26 14:26:10 +02:00
|
|
|
public:
|
|
|
|
TBox(Score* score);
|
2016-04-11 10:30:27 +02:00
|
|
|
TBox(const TBox&);
|
2014-10-16 11:56:06 +02:00
|
|
|
~TBox();
|
2014-06-24 18:36:02 +02:00
|
|
|
virtual TBox* clone() const { return new TBox(*this); }
|
2017-12-21 14:03:45 +01:00
|
|
|
virtual ElementType type() const { return ElementType::TBOX; }
|
2016-11-19 11:51:21 +01:00
|
|
|
virtual void write(XmlWriter&) const override;
|
2016-07-04 13:21:33 +02:00
|
|
|
using VBox::write;
|
2014-10-16 11:56:06 +02:00
|
|
|
virtual void read(XmlReader&) override;
|
2017-03-31 13:03:15 +02:00
|
|
|
virtual Element* drop(EditData&) override;
|
2015-06-25 00:29:53 +02:00
|
|
|
virtual void add(Element* e) override;
|
|
|
|
virtual void remove(Element* el) override;
|
2012-05-26 14:26:10 +02:00
|
|
|
|
|
|
|
virtual void layout();
|
2014-10-16 11:56:06 +02:00
|
|
|
virtual void scanElements(void* data, void (*func)(void*, Element*), bool all=true);
|
|
|
|
Text* text() { return _text; }
|
2012-05-26 14:26:10 +02:00
|
|
|
};
|
|
|
|
|
2013-05-13 18:49:17 +02:00
|
|
|
|
|
|
|
} // namespace Ms
|
2012-05-26 14:26:10 +02:00
|
|
|
#endif
|
|
|
|
|