// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
#pragma implementation "stctest.cpp"
#pragma interface "stctest.cpp"
#endif
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
- void OnStyleNeeded(wxStyledTextEvent& event);
private:
wxStyledTextCtrl* ed;
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU (ID_Quit, MyFrame::OnQuit)
EVT_MENU (ID_About, MyFrame::OnAbout)
- EVT_STC_STYLENEEDED (ID_ED, MyFrame::OnStyleNeeded)
END_EVENT_TABLE()
IMPLEMENT_APP(MyApp)
// event handlers
-void MyFrame::OnStyleNeeded(wxStyledTextEvent& event) {
- int currEndStyled = ed->GetEndStyled();
- ed->Colourise(currEndStyled, event.GetPosition());
-}
-
-
-
-
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
// TRUE is to force the frame to close