#include <ctype.h>
-#include "wx/stc/stc.h"
-#include "ScintillaWX.h"
+#define Point macPoint // These names are also defined by some mac headers so
+#define Style macStyle // change their names, and then undef before we need them
#include <wx/wx.h>
#include <wx/tokenzr.h>
#include <wx/image.h>
#include <wx/file.h>
+#undef Point
+#undef Style
+
+#include "wx/stc/stc.h"
+#include "ScintillaWX.h"
//----------------------------------------------------------------------
#endif
SetBestFittingSize(size);
+
+ // Reduces flicker on GTK+/X11
+ SetBackgroundStyle(wxBG_STYLE_CUSTOM);
}
SendMsg(2446, bytes, 0);
}
+// Find the position of a column on a line taking into account tabs and
+// multi-byte characters. If beyond end of line, return line end position.
+int wxStyledTextCtrl::FindColumn(int line, int column) {
+ return SendMsg(2456, line, column);
+}
+
// Start notifying the container of all key presses and commands.
void wxStyledTextCtrl::StartRecord() {
SendMsg(3001, 0, 0);
// be a function key or etc., the platforms appear to always give us a
// small value in this case) then fallback to the ascii key code but
// don't do anything for function keys or etc.
- if (key <= 255) {
+ if (key <= 127) {
key = evt.GetKeyCode();
- keyOk = (key <= 255);
+ keyOk = (key <= 127);
}
if (keyOk) {
m_swx->DoAddChar(key);