MuseScore  3.4
Music composition and notation
textframe.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Music Composition & Notation
4 //
5 // Copyright (C) 2010-2011 Werner Schweer
6 //
7 // This program is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License version 2
9 // as published by the Free Software Foundation and appearing in
10 // the file LICENCE.GPL
11 //=============================================================================
12 
13 #ifndef __TEXTFRAME_H__
14 #define __TEXTFRAME_H__
15 
16 #include "box.h"
17 
18 namespace Ms {
19 
20 class Text;
21 
22 //---------------------------------------------------------
23 // @@ TBox
25 //---------------------------------------------------------
26 
27 class TBox : public VBox {
29 
30  public:
31  TBox(Score* score);
32  TBox(const TBox&);
33  ~TBox();
34  virtual TBox* clone() const { return new TBox(*this); }
35  virtual ElementType type() const { return ElementType::TBOX; }
36  virtual void write(XmlWriter&) const override;
37  using VBox::write;
38  virtual void read(XmlReader&) override;
39  virtual Element* drop(EditData&) override;
40  virtual void add(Element* e) override;
41  virtual void remove(Element* el) override;
42 
43  virtual void layout();
44  virtual void scanElements(void* data, void (*func)(void*, Element*), bool all=true);
45  virtual QString accessibleExtraInfo() const override;
46  Text* text() { return _text; }
47 
49  };
50 
51 
52 } // namespace Ms
53 #endif
54 
virtual Element * drop(EditData &) override
Handle a dropped element at canvas relative pos of given element type and subtype.
Definition: textframe.cpp:131
virtual QString accessibleExtraInfo() const override
Definition: box.cpp:783
Text * text()
Definition: textframe.h:46
virtual ElementType type() const
Definition: textframe.h:35
virtual void write(XmlWriter &) const override
Definition: box.cpp:191
Definition: xml.h:67
Text frame.
Definition: textframe.h:27
virtual void scanElements(void *data, void(*func)(void *, Element *), bool all=true)
Definition: textframe.cpp:121
ElementList & el()
Definition: measurebase.h:102
virtual void write(XmlWriter &) const override
Definition: textframe.cpp:92
Base class of score layout elements.
Definition: element.h:158
Definition: score.h:391
~TBox()
Definition: textframe.cpp:48
virtual void layout()
The text box layout() adjusts the frame height to text height.
Definition: textframe.cpp:59
Score * score() const
Definition: scoreElement.h:189
Definition of HBox and VBox classes.
EditBehavior normalModeEditBehavior() const override
Definition: textframe.h:48
TBox(Score *score)
Definition: textframe.cpp:33
virtual void add(Element *e) override
Add new Element el to TBox.
Definition: textframe.cpp:149
virtual TBox * clone() const
Definition: textframe.h:34
Definition: aeolus.cpp:26
Definition: xml.h:218
Definition: element.h:111
ElementType
Definition: types.h:34
virtual void read(XmlReader &) override
Definition: textframe.cpp:104
vertical frame
Definition: box.h:137
Definition: text.h:24
EditBehavior
Definition: element.h:173
Text * _text
Definition: textframe.h:28