void Text::setTextStyle(TextStyleType idx) { _textStyle = idx; bool isStyled; if (_textStyle != TEXT_STYLE_INVALID) { isStyled = true; _localStyle = score()->textStyle(_textStyle); setText(getText()); // init style } else isStyled = false; setStyled(isStyled); }
// =========================================================================== // method definitions // =========================================================================== GUIMessageWindow::GUIMessageWindow(FXComposite* parent) : FXText(parent, 0, 0, 0, 0, 0, 0, 50), myStyles(0), myErrorRetriever(0), myMessageRetriever(0), myWarningRetriever(0) { setStyled(true); setEditable(false); myStyles = new FXHiliteStyle[4]; // set separator style myStyles[0].normalForeColor = FXRGB(0x00, 0x00, 0x88); myStyles[0].normalBackColor = FXRGB(0xff, 0xff, 0xff); myStyles[0].selectForeColor = FXRGB(0xff, 0xff, 0xff); myStyles[0].selectBackColor = FXRGB(0x00, 0x00, 0x88); myStyles[0].hiliteForeColor = FXRGB(0x00, 0x00, 0x88); myStyles[0].hiliteBackColor = FXRGB(0xff, 0xff, 0xff); myStyles[0].activeBackColor = FXRGB(0xff, 0xff, 0xff); myStyles[0].style = 0; // set message text style myStyles[1].normalForeColor = FXRGB(0x00, 0x88, 0x00); myStyles[1].normalBackColor = FXRGB(0xff, 0xff, 0xff); myStyles[1].selectForeColor = FXRGB(0xff, 0xff, 0xff); myStyles[1].selectBackColor = FXRGB(0x00, 0x88, 0x00); myStyles[1].hiliteForeColor = FXRGB(0x00, 0x88, 0x00); myStyles[1].hiliteBackColor = FXRGB(0xff, 0xff, 0xff); myStyles[1].activeBackColor = FXRGB(0xff, 0xff, 0xff); myStyles[1].style = 0; // set error text style myStyles[2].normalForeColor = FXRGB(0x88, 0x00, 0x00); myStyles[2].normalBackColor = FXRGB(0xff, 0xff, 0xff); myStyles[2].selectForeColor = FXRGB(0xff, 0xff, 0xff); myStyles[2].selectBackColor = FXRGB(0x88, 0x00, 0x00); myStyles[2].hiliteForeColor = FXRGB(0x88, 0x00, 0x00); myStyles[2].hiliteBackColor = FXRGB(0xff, 0xff, 0xff); myStyles[2].activeBackColor = FXRGB(0xff, 0xff, 0xff); myStyles[2].style = 0; // set warning text style myStyles[3].normalForeColor = FXRGB(0xe6, 0x98, 0x00); myStyles[3].normalBackColor = FXRGB(0xff, 0xff, 0xff); myStyles[3].selectForeColor = FXRGB(0xff, 0xff, 0xff); myStyles[3].selectBackColor = FXRGB(0xe6, 0x98, 0x00); myStyles[3].hiliteForeColor = FXRGB(0xe6, 0x98, 0x00); myStyles[3].hiliteBackColor = FXRGB(0xff, 0xff, 0xff); myStyles[3].activeBackColor = FXRGB(0xff, 0xff, 0xff); myStyles[3].style = 0; // setHiliteStyles(myStyles); }
void Dynamic::read(XmlReader* r) { int i; while (r->readElement()) { if (r->readInt("velocity", &_velocity)) ; else if (r->readInt("dynType", &i)) _dynType = DynamicType(i); else if (!Text::readProperties(r)) r->unknown(); } setSubtype(subtype()); if (score()->mscVersion() < 118) { setTextStyle(TEXT_STYLE_DYNAMICS); setStyled(true); } }
void TempoText::read(QDomElement e) { for (e = e.firstChildElement(); !e.isNull(); e = e.nextSiblingElement()) { QString tag(e.tagName()); if (tag == "tempo") _tempo = e.text().toDouble(); else if (tag == "followText") _followText = e.text().toInt(); else if (!Text::readProperties(e)) domError(e); } if (score()->mscVersion() < 119) { // // Reset text in old version to // style. // if (_textStyle != TEXT_STYLE_INVALID) { setStyled(true); styleChanged(); } } }