EVT_CHECKBOX( ID_RICHTEXTFONTPAGE_CAPSCTRL, wxRichTextFontPage::OnCapsctrlClick )
+ EVT_CHECKBOX( ID_RICHTEXTFONTPAGE_SMALLCAPSCTRL, wxRichTextFontPage::OnCapsctrlClick )
+
EVT_CHECKBOX( ID_RICHTEXTFONTPAGE_SUPERSCRIPT, wxRichTextFontPage::OnRichtextfontpageSuperscriptClick )
EVT_CHECKBOX( ID_RICHTEXTFONTPAGE_SUBSCRIPT, wxRichTextFontPage::OnRichtextfontpageSubscriptClick )
m_bgColourCtrl = NULL;
m_strikethroughCtrl = NULL;
m_capitalsCtrl = NULL;
+ m_smallCapitalsCtrl = NULL;
m_superscriptCtrl = NULL;
m_subscriptCtrl = NULL;
m_previewCtrl = NULL;
m_capitalsCtrl->SetToolTip(_("Check to show the text in capitals."));
itemBoxSizer34->Add(m_capitalsCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+ m_smallCapitalsCtrl = new wxCheckBox( itemRichTextDialogPage1, ID_RICHTEXTFONTPAGE_SMALLCAPSCTRL, _("Small C&apitals"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER );
+ m_smallCapitalsCtrl->SetValue(false);
+ m_smallCapitalsCtrl->SetHelpText(_("Check to show the text in small capitals."));
+ if (wxRichTextFontPage::ShowToolTips())
+ m_smallCapitalsCtrl->SetToolTip(_("Check to show the text in small capitals."));
+ itemBoxSizer34->Add(m_smallCapitalsCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
m_superscriptCtrl = new wxCheckBox( itemRichTextDialogPage1, ID_RICHTEXTFONTPAGE_SUPERSCRIPT, _("Supe&rscript"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER );
m_superscriptCtrl->SetValue(false);
m_superscriptCtrl->SetHelpText(_("Check to show the text in superscript."));
attr->SetTextEffects(attr->GetTextEffects() & ~wxTEXT_ATTR_EFFECT_CAPITALS);
}
+ if (m_smallCapitalsCtrl->Get3StateValue() != wxCHK_UNDETERMINED)
+ {
+ attr->SetTextEffectFlags(attr->GetTextEffectFlags() | wxTEXT_ATTR_EFFECT_SMALL_CAPITALS);
+
+ if (m_smallCapitalsCtrl->Get3StateValue() == wxCHK_CHECKED)
+ attr->SetTextEffects(attr->GetTextEffects() | wxTEXT_ATTR_EFFECT_SMALL_CAPITALS);
+ else
+ attr->SetTextEffects(attr->GetTextEffects() & ~wxTEXT_ATTR_EFFECT_SMALL_CAPITALS);
+ }
+ else
+ {
+ attr->SetTextEffectFlags(attr->GetTextEffectFlags() & ~wxTEXT_ATTR_EFFECT_SMALL_CAPITALS);
+ attr->SetTextEffects(attr->GetTextEffects() & ~wxTEXT_ATTR_EFFECT_SMALL_CAPITALS);
+ }
+
if (m_superscriptCtrl->Get3StateValue() == wxCHK_CHECKED)
{
attr->SetTextEffectFlags(attr->GetTextEffectFlags() | wxTEXT_ATTR_EFFECT_SUPERSCRIPT);
else
m_capitalsCtrl->Set3StateValue(wxCHK_UNDETERMINED);
+ if (attr->GetTextEffectFlags() & wxTEXT_ATTR_EFFECT_SMALL_CAPITALS)
+ {
+ if (attr->GetTextEffects() & wxTEXT_ATTR_EFFECT_SMALL_CAPITALS)
+ m_smallCapitalsCtrl->Set3StateValue(wxCHK_CHECKED);
+ else
+ m_smallCapitalsCtrl->Set3StateValue(wxCHK_UNCHECKED);
+ }
+ else
+ m_capitalsCtrl->Set3StateValue(wxCHK_UNDETERMINED);
+
if ( attr->GetTextEffectFlags() & (wxTEXT_ATTR_EFFECT_SUPERSCRIPT | wxTEXT_ATTR_EFFECT_SUBSCRIPT) )
{
if (attr->GetTextEffects() & wxTEXT_ATTR_EFFECT_SUPERSCRIPT)
{
m_strikethroughCtrl->Set3StateValue(wxCHK_UNDETERMINED);
m_capitalsCtrl->Set3StateValue(wxCHK_UNDETERMINED);
+ m_smallCapitalsCtrl->Set3StateValue(wxCHK_UNDETERMINED);
m_superscriptCtrl->Set3StateValue(wxCHK_UNDETERMINED);
m_subscriptCtrl->Set3StateValue(wxCHK_UNDETERMINED);
}
textEffects |= wxTEXT_ATTR_EFFECT_CAPITALS;
}
+ if (m_smallCapitalsCtrl->Get3StateValue() == wxCHK_CHECKED)
+ {
+ textEffects |= wxTEXT_ATTR_EFFECT_SMALL_CAPITALS;
+ }
+
if ( m_superscriptCtrl->Get3StateValue() == wxCHK_CHECKED )
textEffects |= wxTEXT_ATTR_EFFECT_SUPERSCRIPT;
else if ( m_subscriptCtrl->Get3StateValue() == wxCHK_CHECKED )