Add API to control OS X wxTextCtrl’s smart behavior
Allow the user to customize smart quotes and dashes substutions on OS X and also provide the OSXDisableAllSmartSubstitutions() method for disabling them all at once.
This commit is contained in:
@@ -139,6 +139,22 @@ void wxTextCtrl::MacCheckSpelling(bool check)
|
||||
GetTextPeer()->CheckSpelling(check);
|
||||
}
|
||||
|
||||
void wxTextCtrl::OSXEnableAutomaticQuoteSubstitution(bool enable)
|
||||
{
|
||||
GetTextPeer()->EnableAutomaticQuoteSubstitution(enable);
|
||||
}
|
||||
|
||||
void wxTextCtrl::OSXEnableAutomaticDashSubstitution(bool enable)
|
||||
{
|
||||
GetTextPeer()->EnableAutomaticDashSubstitution(enable);
|
||||
}
|
||||
|
||||
void wxTextCtrl::OSXDisableAllSmartSubstitutions()
|
||||
{
|
||||
OSXEnableAutomaticDashSubstitution(false);
|
||||
OSXEnableAutomaticQuoteSubstitution(false);
|
||||
}
|
||||
|
||||
bool wxTextCtrl::SetFont( const wxFont& font )
|
||||
{
|
||||
if ( !wxTextCtrlBase::SetFont( font ) )
|
||||
|
Reference in New Issue
Block a user