MuseScore/libmscore/textframe.h

52 lines
1.5 KiB
C
Raw Normal View History

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
/// 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-26 14:26:10 +02:00
public:
TBox(Score* score);
TBox(const TBox&);
2014-10-16 11:56:06 +02:00
~TBox();
virtual TBox* clone() const { return new TBox(*this); }
2017-01-18 14:16:33 +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;
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