DEFINE_EVENT_TYPE( wxEVT_STC_START_DRAG )
DEFINE_EVENT_TYPE( wxEVT_STC_DRAG_OVER )
DEFINE_EVENT_TYPE( wxEVT_STC_DO_DROP )
+DEFINE_EVENT_TYPE( wxEVT_STC_ZOOM )
BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
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()
IMPLEMENT_CLASS(wxStyledTextCtrl, wxControl)
IMPLEMENT_DYNAMIC_CLASS(wxStyledTextEvent, wxCommandEvent)
+#ifdef LINK_LEXERS
// forces the linking of the lexer modules
int Scintilla_LinkLexers();
+#endif
//----------------------------------------------------------------------
// Constructor and Destructor
style | wxVSCROLL | wxHSCROLL | wxWANTS_CHARS | wxCLIP_CHILDREN,
wxDefaultValidator, name)
{
+#ifdef LINK_LEXERS
Scintilla_LinkLexers();
+#endif
m_swx = new ScintillaWX(this);
m_stopWatch.Start();
m_lastKeyDownConsumed = FALSE;
void wxStyledTextCtrl::OnSize(wxSizeEvent& evt) {
wxSize sz = GetClientSize();
m_swx->DoSize(sz.x, sz.y);
- Refresh(FALSE);
}
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());
}
evt.SetY(scn.y);
break;
+ case SCN_ZOOM:
+ evt.SetEventType(wxEVT_STC_ZOOM);
+ break;
+
default:
return;
}