]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/stc/stc.cpp.in
Warning fixes, source cleaning.
[wxWidgets.git] / contrib / src / stc / stc.cpp.in
index a52798705e5e8a8a8d66dfc1a80e626d71e4631a..6e626e3bef272310d862558d85eb17b73586f12b 100644 (file)
@@ -168,6 +168,8 @@ void wxStyledTextCtrl::Create(wxWindow *parent,
     // Put Scintilla into unicode (UTF-8) mode
     SetCodePage(wxSTC_CP_UTF8);
 #endif
+
+    SetBestFittingSize(size);
 }
 
 
@@ -529,10 +531,7 @@ void wxStyledTextCtrl::OnKeyDown(wxKeyEvent& evt) {
 
 
 void wxStyledTextCtrl::OnLoseFocus(wxFocusEvent& evt) {
-#ifdef __WXMAC__
-    if (! (IsBeingDeleted() || GetParent()->IsBeingDeleted()))
-#endif
-        m_swx->DoLoseFocus();
+    m_swx->DoLoseFocus();
     evt.Skip();
 }
 
@@ -569,6 +568,14 @@ void wxStyledTextCtrl::OnIdle(wxIdleEvent& evt) {
 }
 
 
+wxSize wxStyledTextCtrl::DoGetBestSize() const
+{
+    // What would be the best size for a wxSTC?
+    // Just give a reasonable minimum until something else can be figured out.
+    return wxSize(200,100);
+}
+
+
 //----------------------------------------------------------------------
 // Turn notifications from Scintilla into events