m_baseStyle = def.m_baseStyle;
m_style = def.m_style;
m_description = def.m_description;
+ m_properties = def.m_properties;
}
bool wxRichTextStyleDefinition::Eq(const wxRichTextStyleDefinition& def) const
{
- return (m_name == def.m_name && m_baseStyle == def.m_baseStyle && m_style == def.m_style);
+ return (m_name == def.m_name && m_baseStyle == def.m_baseStyle && m_style == def.m_style && m_properties == def.m_properties);
}
/// Gets the style combined with the base style
if (m_baseStyle.IsEmpty())
return m_style;
- bool isParaStyle = IsKindOf(CLASSINFO(wxRichTextParagraphStyleDefinition));
- bool isCharStyle = IsKindOf(CLASSINFO(wxRichTextCharacterStyleDefinition));
- bool isListStyle = IsKindOf(CLASSINFO(wxRichTextListStyleDefinition));
- bool isBoxStyle = IsKindOf(CLASSINFO(wxRichTextBoxStyleDefinition));
+ bool isParaStyle = IsKindOf(wxCLASSINFO(wxRichTextParagraphStyleDefinition));
+ bool isCharStyle = IsKindOf(wxCLASSINFO(wxRichTextCharacterStyleDefinition));
+ bool isListStyle = IsKindOf(wxCLASSINFO(wxRichTextListStyleDefinition));
+ bool isBoxStyle = IsKindOf(wxCLASSINFO(wxRichTextBoxStyleDefinition));
// Collect the styles, detecting loops
wxArrayString styleNames;
SetName(sheet.GetName());
SetDescription(sheet.GetDescription());
+ m_properties = sheet.m_properties;
}
/// Equality
SendSelectedEvent();
}
}
+ else
+ {
+ m_styleNames.Clear();
+ SetSelection(wxNOT_FOUND);
+ SetItemCount(0);
+ Refresh();
+ }
}
// Get index for style name
{
int i = GetIndexForStyle(name);
if (i > -1)
+ {
SetSelection(i);
+ if (!IsVisible(i))
+ ScrollToRow(i);
+ }
return i;
}
name.Find(wxT("default")) != wxNOT_FOUND || name.Find(defaultTranslated) != wxNOT_FOUND)
{
wxRichTextAttr attr2(d->GetStyleMergedWithBase(GetStyleSheet()));
- if (attr2.HasFontSize())
+ if (attr2.HasFontPointSize())
{
stdFontSize = attr2.GetFontSize();
break;
if (d)
{
wxRichTextAttr attr2(d->GetStyleMergedWithBase(GetStyleSheet()));
- if (attr2.HasFontSize())
+ if (attr2.HasFontPointSize())
{
if (attr2.GetFontSize() <= (int) maxSize)
sizes[attr2.GetFontSize()] ++;
if (stdFontSize == 0)
stdFontSize = 12;
- int thisFontSize = ((attr.GetFlags() & wxTEXT_ATTR_FONT_SIZE) != 0) ? attr.GetFontSize() : stdFontSize;
+ int thisFontSize = attr.HasFontPointSize() ? attr.GetFontSize() : stdFontSize;
if (thisFontSize < stdFontSize)
size --;
bool hasItalic = false;
bool hasUnderline = false;
- if (attr.GetFontWeight() == wxBOLD)
+ if (attr.GetFontWeight() == wxFONTWEIGHT_BOLD)
hasBold = true;
- if (attr.GetFontStyle() == wxITALIC)
+ if (attr.GetFontStyle() == wxFONTSTYLE_ITALIC)
hasItalic = true;
if (attr.GetFontUnderlined())
hasUnderline = true;