EVT_SET_FOCUS (wxStyledTextCtrl::OnGainFocus)
EVT_SYS_COLOUR_CHANGED (wxStyledTextCtrl::OnSysColourChanged)
EVT_ERASE_BACKGROUND (wxStyledTextCtrl::OnEraseBackground)
- EVT_MENU_RANGE (-1, -1, wxStyledTextCtrl::OnMenu)
+ EVT_MENU_RANGE (10, 16, wxStyledTextCtrl::OnMenu)
EVT_LISTBOX_DCLICK (-1, wxStyledTextCtrl::OnListBox)
END_EVENT_TABLE()
// Returns the character byte at the position
int wxStyledTextCtrl::GetCharAt(int pos) {
- return SendMsg(2007, pos, 0);
+ return (unsigned char)SendMsg(2007, pos, 0);
}
// Returns the position of the caret
// Returns the style byte at the position
int wxStyledTextCtrl::GetStyleAt(int pos) {
- return SendMsg(2010, pos, 0);
+ return (unsigned char)SendMsg(2010, pos, 0);
}
// Redoes the next action on the undo history
// Find some text in the document.
int wxStyledTextCtrl::FindText(int minPos, int maxPos,
- const wxString& text,
- bool caseSensitive, bool wholeWord) {
+ const wxString& text,
+ int flags) {
TextToFind ft;
- int flags = 0;
-
- flags |= caseSensitive ? SCFIND_MATCHCASE : 0;
- flags |= wholeWord ? SCFIND_WHOLEWORD : 0;
ft.chrg.cpMin = minPos;
ft.chrg.cpMax = maxPos;
- ft.lpstrText = (char*)(const char*)wx2stc(text);
+ wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text);
+ ft.lpstrText = (char*)(const char*)buf;
return SendMsg(2150, flags, (long)&ft);
}
// Extend life of document.
void wxStyledTextCtrl::AddRefDocument(void* docPointer) {
- SendMsg(2376, (long)docPointer);
+ SendMsg(2376, 0, (long)docPointer);
}
// Release a reference to the document, deleting document if it fades to black.
void wxStyledTextCtrl::ReleaseDocument(void* docPointer) {
- SendMsg(2377, (long)docPointer);
+ SendMsg(2377, 0, (long)docPointer);
}
// Get which document modification events are sent to the container.
}
void wxStyledTextCtrl::OnMouseLeftDown(wxMouseEvent& evt) {
+ SetFocus();
wxPoint pt = evt.GetPosition();
m_swx->DoButtonDown(Point(pt.x, pt.y), m_stopWatch.Time(),
evt.ShiftDown(), evt.ControlDown(), evt.AltDown());
m_swx->DoMouseWheel(evt.GetWheelRotation(),
evt.GetWheelDelta(),
evt.GetLinesPerAction(),
- evt.ControlDown());
+ evt.ControlDown(),
+ evt.IsPageScroll());
}