X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9efe0302c3b89c6b8ff7e4a30d98478edfe84433..0d1f53ca16a9a794a7660561a5c5b4632f8675e0:/src/stc/stc.cpp.in diff --git a/src/stc/stc.cpp.in b/src/stc/stc.cpp.in index a859ec1a47..6e626e3bef 100644 --- a/src/stc/stc.cpp.in +++ b/src/stc/stc.cpp.in @@ -1,6 +1,6 @@ //////////////////////////////////////////////////////////////////////////// // Name: stc.cpp -// Purpose: A wxWindows implementation of Scintilla. This class is the +// Purpose: A wxWidgets implementation of Scintilla. This class is the // one meant to be used directly by wx applications. It does not // derive directly from the Scintilla classes, but instead // delegates most things to the real Scintilla class. @@ -76,7 +76,6 @@ DEFINE_EVENT_TYPE( wxEVT_STC_MODIFIED ) DEFINE_EVENT_TYPE( wxEVT_STC_MACRORECORD ) DEFINE_EVENT_TYPE( wxEVT_STC_MARGINCLICK ) DEFINE_EVENT_TYPE( wxEVT_STC_NEEDSHOWN ) -DEFINE_EVENT_TYPE( wxEVT_STC_POSCHANGED ) DEFINE_EVENT_TYPE( wxEVT_STC_PAINTED ) DEFINE_EVENT_TYPE( wxEVT_STC_USERLISTSELECTION ) DEFINE_EVENT_TYPE( wxEVT_STC_URIDROPPED ) @@ -169,6 +168,8 @@ void wxStyledTextCtrl::Create(wxWindow *parent, // Put Scintilla into unicode (UTF-8) mode SetCodePage(wxSTC_CP_UTF8); #endif + + SetBestFittingSize(size); } @@ -567,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