]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/textcmn.cpp
Fix wxDocManager::GetLastDirectory() when there is no history.
[wxWidgets.git] / src / common / textcmn.cpp
index 6a806b2d777ceebed81b0732503243af0d189c03..d620dff1b97d80e24e801b3f1d46ffa34f315872 100644 (file)
 
 IMPLEMENT_DYNAMIC_CLASS(wxTextUrlEvent, wxCommandEvent)
 
-wxDEFINE_EVENT( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEvent )
-wxDEFINE_EVENT( wxEVT_COMMAND_TEXT_ENTER, wxCommandEvent )
-wxDEFINE_EVENT( wxEVT_COMMAND_TEXT_URL, wxTextUrlEvent )
-wxDEFINE_EVENT( wxEVT_COMMAND_TEXT_MAXLEN, wxCommandEvent )
+wxDEFINE_EVENT( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEvent );
+wxDEFINE_EVENT( wxEVT_COMMAND_TEXT_ENTER, wxCommandEvent );
+wxDEFINE_EVENT( wxEVT_COMMAND_TEXT_URL, wxTextUrlEvent );
+wxDEFINE_EVENT( wxEVT_COMMAND_TEXT_MAXLEN, wxCommandEvent );
 
 IMPLEMENT_ABSTRACT_CLASS(wxTextCtrlBase, wxControl)
 
@@ -85,8 +85,8 @@ void wxTextAttr::Init()
     m_rightIndent = 0;
 
     m_fontSize = 12;
-    m_fontStyle = wxNORMAL;
-    m_fontWeight = wxNORMAL;
+    m_fontStyle = wxFONTSTYLE_NORMAL;
+    m_fontWeight = wxFONTWEIGHT_NORMAL;
     m_fontUnderlined = false;
     m_fontEncoding = wxFONTENCODING_DEFAULT;
     m_fontFamily = wxFONTFAMILY_DEFAULT;
@@ -338,9 +338,6 @@ wxFont wxTextAttr::GetFont() const
         fontFamily = GetFontFamily();
 
     wxFont font(fontSize, fontFamily, fontStyle, fontWeight, underlined, fontFaceName, encoding);
-#ifdef __WXMAC__
-    font.SetNoAntiAliasing(true);
-#endif
     return font;
 }
 
@@ -781,7 +778,7 @@ bool wxTextAreaBase::SaveFile(const wxString& filename, int fileType)
 bool wxTextCtrlBase::DoSaveFile(const wxString& filename, int WXUNUSED(fileType))
 {
 #if wxUSE_FFILE
-    wxFFile file(filename, _T("w"));
+    wxFFile file(filename, wxT("w"));
     if ( file.IsOpened() && file.Write(GetValue()) )
     {
         // if it worked, save for future calls
@@ -862,32 +859,32 @@ bool wxTextCtrlBase::EmulateKeyPress(const wxKeyEvent& event)
         case WXK_NUMPAD7:
         case WXK_NUMPAD8:
         case WXK_NUMPAD9:
-            ch = (wxChar)(_T('0') + keycode - WXK_NUMPAD0);
+            ch = (wxChar)(wxT('0') + keycode - WXK_NUMPAD0);
             break;
 
         case WXK_MULTIPLY:
         case WXK_NUMPAD_MULTIPLY:
-            ch = _T('*');
+            ch = wxT('*');
             break;
 
         case WXK_ADD:
         case WXK_NUMPAD_ADD:
-            ch = _T('+');
+            ch = wxT('+');
             break;
 
         case WXK_SUBTRACT:
         case WXK_NUMPAD_SUBTRACT:
-            ch = _T('-');
+            ch = wxT('-');
             break;
 
         case WXK_DECIMAL:
         case WXK_NUMPAD_DECIMAL:
-            ch = _T('.');
+            ch = wxT('.');
             break;
 
         case WXK_DIVIDE:
         case WXK_NUMPAD_DIVIDE:
-            ch = _T('/');
+            ch = wxT('/');
             break;
 
         case WXK_DELETE:
@@ -929,7 +926,7 @@ bool wxTextCtrlBase::EmulateKeyPress(const wxKeyEvent& event)
             }
             else
             {
-                ch = _T('\0');
+                ch = wxT('\0');
             }
     }
 
@@ -1014,6 +1011,6 @@ bool wxTextCtrlBase::SendTextUpdatedEvent(wxWindow *win)
 // define this one even if !wxUSE_TEXTCTRL because it is also used by other
 // controls (wxComboBox and wxSpinCtrl)
 
-wxDEFINE_EVENT( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEvent )
+wxDEFINE_EVENT( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEvent );
 
 #endif // wxUSE_TEXTCTRL/!wxUSE_TEXTCTRL