]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stc/stc.h.in
added a check which should prevent the crash of bug 555111
[wxWidgets.git] / src / stc / stc.h.in
index 1f2a2ac2d2a8df80c4e6fe933aabc1f737579677..1243324bb94ffb534ac6997bf60a7be12cb29051 100644 (file)
 #include <wx/wx.h>
 #include <wx/dnd.h>
 
+//----------------------------------------------------------------------
+
+// Should a wxPopupWindow be used for the call tips and autocomplete windows?
+#ifndef wxSTC_USE_POPUP
+#define wxSTC_USE_POPUP 1
+#endif
+
 //----------------------------------------------------------------------
 // BEGIN generated section.  The following code is automatically generated
 //       by gen_iface.py.  Do not edit this file.  Edit stc.h.in instead
@@ -50,7 +57,7 @@ public:
     wxStyledTextCtrl(wxWindow *parent, wxWindowID id,
                      const wxPoint& pos = wxDefaultPosition,
                      const wxSize& size = wxDefaultSize, long style = 0,
-                     const char* name = "styledtext");
+                     const wxString& name = wxPySTCNameStr);
     %%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
 #else
@@ -149,6 +156,11 @@ public:
     // Set the horizontal scrollbar to use instead of the ont that's built-in.
     void SetHScrollBar(wxScrollBar* bar) { m_hScrollBar = bar; }
 
+    // Can be used to prevent the EVT_CHAR handler from adding the char
+    bool GetLastKeydownProcessed() { return m_lastKeyDownConsumed; }
+    void SetLastKeydownProcessed(bool val) { m_lastKeyDownConsumed = val; }
+
+
 //----------------------------------------------------------------------
 
 
@@ -369,6 +381,39 @@ typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
 #endif
 
 //----------------------------------------------------------------------
+// Utility functions used within wxSTC
+
+#ifndef SWIG
+
+inline wxString stc2wx(const char* str) {
+#if wxUSE_UNICODE
+    return wxString(str, wxConvUTF8);
+#else
+    return wxString(str);
+#endif
+}
+
+inline wxString stc2wx(const char* str, size_t len) {
+#if wxUSE_UNICODE
+    return wxString(str, wxConvUTF8, len);
+#else
+    return wxString(str, len);
+#endif
+}
+
+#if wxUSE_UNICODE
+inline const wxWX2MBbuf wx2stc(const wxString& str) {
+    return str.mb_str(wxConvUTF8);
+}
+#else
+inline const wxWX2MBbuf wx2stc(const wxString& str) {
+    return str.mbc_str();
+}
+#endif
+
+#endif
+
+
 //----------------------------------------------------------------------
 #endif