Source cleaning: whitespaces, tabs, TRUE/true, FALSE/false, -1/wxID_ANY/wxDefaultCoord/wxNOT_FOUND.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29494 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-09-28 15:13:27 +00:00
parent 8a68e8dbbe
commit 7e126a0784
16 changed files with 338 additions and 344 deletions

View File

@@ -3077,31 +3077,31 @@ END_DECLARE_EVENT_TYPES()
#ifndef SWIG
typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
#define EVT_STC_CHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_STYLENEEDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_STYLENEEDED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_CHARADDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHARADDED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_SAVEPOINTREACHED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTREACHED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_SAVEPOINTLEFT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTLEFT, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_ROMODIFYATTEMPT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_KEY(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_DOUBLECLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_UPDATEUI(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_MODIFIED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_MACRORECORD(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_MARGINCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_NEEDSHOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_PAINTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_PAINTED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_USERLISTSELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_USERLISTSELECTION, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_URIDROPPED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_URIDROPPED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_DWELLSTART(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLSTART, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_DWELLEND(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLEND, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_ZOOM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ZOOM, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_HOTSPOT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_HOTSPOT_DCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_DCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_CALLTIP_CLICK(id, fn)) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CALLTIP_CLICK id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_CHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHANGE, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_STYLENEEDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_STYLENEEDED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_CHARADDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHARADDED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_SAVEPOINTREACHED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTREACHED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_SAVEPOINTLEFT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTLEFT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_ROMODIFYATTEMPT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ROMODIFYATTEMPT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_KEY(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_DOUBLECLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DOUBLECLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_UPDATEUI(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_MODIFIED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MODIFIED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_MACRORECORD(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MACRORECORD, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_MARGINCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MARGINCLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_NEEDSHOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_NEEDSHOWN, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_PAINTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_PAINTED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_USERLISTSELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_USERLISTSELECTION, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_URIDROPPED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_URIDROPPED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_DWELLSTART(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLSTART, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_DWELLEND(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLEND, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_ZOOM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ZOOM, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_HOTSPOT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_CLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_HOTSPOT_DCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_DCLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_CALLTIP_CLICK(id, fn)) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CALLTIP_CLICK id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#endif

View File

@@ -100,8 +100,8 @@ BEGIN_EVENT_TABLE (Edit, wxStyledTextCtrl)
EVT_MENU (myID_CONVERTCRLF, Edit::OnConvertEOL)
EVT_MENU (myID_CONVERTLF, Edit::OnConvertEOL)
// stc
EVT_STC_MARGINCLICK (-1, Edit::OnMarginClick)
EVT_STC_CHARADDED (-1, Edit::OnCharAdded)
EVT_STC_MARGINCLICK (wxID_ANY, Edit::OnMarginClick)
EVT_STC_CHARADDED (wxID_ANY, Edit::OnCharAdded)
END_EVENT_TABLE()
Edit::Edit (wxWindow *parent, wxWindowID id,
@@ -595,7 +595,7 @@ bool Edit::Modified () {
EditProperties::EditProperties (Edit *edit,
long style)
: wxDialog (edit, -1, wxEmptyString,
: wxDialog (edit, wxID_ANY, wxEmptyString,
wxDefaultPosition, wxDefaultSize,
style | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) {
@@ -606,24 +606,24 @@ EditProperties::EditProperties (Edit *edit,
// fullname
wxBoxSizer *fullname = new wxBoxSizer (wxHORIZONTAL);
fullname->Add (10, 0);
fullname->Add (new wxStaticText (this, -1, _("Full filename"),
wxDefaultPosition, wxSize(80, -1)),
fullname->Add (new wxStaticText (this, wxID_ANY, _("Full filename"),
wxDefaultPosition, wxSize(80, wxDefaultCoord)),
0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL);
fullname->Add (new wxStaticText (this, -1, edit->GetFilename()),
fullname->Add (new wxStaticText (this, wxID_ANY, edit->GetFilename()),
0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL);
// text info
wxGridSizer *textinfo = new wxGridSizer (4, 0, 2);
textinfo->Add (new wxStaticText (this, -1, _("Language"),
wxDefaultPosition, wxSize(80, -1)),
textinfo->Add (new wxStaticText (this, wxID_ANY, _("Language"),
wxDefaultPosition, wxSize(80, wxDefaultCoord)),
0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, 4);
textinfo->Add (new wxStaticText (this, -1, edit->m_language->name),
textinfo->Add (new wxStaticText (this, wxID_ANY, edit->m_language->name),
0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 4);
textinfo->Add (new wxStaticText (this, -1, _("Lexer-ID: "),
wxDefaultPosition, wxSize(80, -1)),
textinfo->Add (new wxStaticText (this, wxID_ANY, _("Lexer-ID: "),
wxDefaultPosition, wxSize(80, wxDefaultCoord)),
0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, 4);
text = wxString::Format (_T("%d"), edit->GetLexer());
textinfo->Add (new wxStaticText (this, -1, text),
textinfo->Add (new wxStaticText (this, wxID_ANY, text),
0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 4);
wxString EOLtype = _T("");
switch (edit->GetEOLMode()) {
@@ -631,49 +631,49 @@ EditProperties::EditProperties (Edit *edit,
case wxSTC_EOL_CRLF: {EOLtype = _T("CRLF (Windows)"); break; }
case wxSTC_EOL_LF: {EOLtype = _T("CR (Macintosh)"); break; }
}
textinfo->Add (new wxStaticText (this, -1, _("Line endings"),
wxDefaultPosition, wxSize(80, -1)),
textinfo->Add (new wxStaticText (this, wxID_ANY, _("Line endings"),
wxDefaultPosition, wxSize(80, wxDefaultCoord)),
0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, 4);
textinfo->Add (new wxStaticText (this, -1, EOLtype),
textinfo->Add (new wxStaticText (this, wxID_ANY, EOLtype),
0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 4);
// text info box
wxStaticBoxSizer *textinfos = new wxStaticBoxSizer (
new wxStaticBox (this, -1, _("Informations")),
new wxStaticBox (this, wxID_ANY, _("Informations")),
wxVERTICAL);
textinfos->Add (textinfo, 0, wxEXPAND);
textinfos->Add (0, 6);
// statistic
wxGridSizer *statistic = new wxGridSizer (4, 0, 2);
statistic->Add (new wxStaticText (this, -1, _("Total lines"),
wxDefaultPosition, wxSize(80, -1)),
statistic->Add (new wxStaticText (this, wxID_ANY, _("Total lines"),
wxDefaultPosition, wxSize(80, wxDefaultCoord)),
0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, 4);
text = wxString::Format (_T("%d"), edit->GetLineCount());
statistic->Add (new wxStaticText (this, -1, text),
statistic->Add (new wxStaticText (this, wxID_ANY, text),
0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 4);
statistic->Add (new wxStaticText (this, -1, _("Total chars"),
wxDefaultPosition, wxSize(80, -1)),
statistic->Add (new wxStaticText (this, wxID_ANY, _("Total chars"),
wxDefaultPosition, wxSize(80, wxDefaultCoord)),
0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, 4);
text = wxString::Format (_T("%d"), edit->GetTextLength());
statistic->Add (new wxStaticText (this, -1, text),
statistic->Add (new wxStaticText (this, wxID_ANY, text),
0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 4);
statistic->Add (new wxStaticText (this, -1, _("Current line"),
wxDefaultPosition, wxSize(80, -1)),
statistic->Add (new wxStaticText (this, wxID_ANY, _("Current line"),
wxDefaultPosition, wxSize(80, wxDefaultCoord)),
0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, 4);
text = wxString::Format (_T("%d"), edit->GetCurrentLine());
statistic->Add (new wxStaticText (this, -1, text),
statistic->Add (new wxStaticText (this, wxID_ANY, text),
0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 4);
statistic->Add (new wxStaticText (this, -1, _("Current pos"),
wxDefaultPosition, wxSize(80, -1)),
statistic->Add (new wxStaticText (this, wxID_ANY, _("Current pos"),
wxDefaultPosition, wxSize(80, wxDefaultCoord)),
0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, 4);
text = wxString::Format (_T("%d"), edit->GetCurrentPos());
statistic->Add (new wxStaticText (this, -1, text),
statistic->Add (new wxStaticText (this, wxID_ANY, text),
0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 4);
// char/line statistics
wxStaticBoxSizer *statistics = new wxStaticBoxSizer (
new wxStaticBox (this, -1, _("Statistics")),
new wxStaticBox (this, wxID_ANY, _("Statistics")),
wxVERTICAL);
statistics->Add (statistic, 0, wxEXPAND);
statistics->Add (0, 6);

View File

@@ -45,7 +45,7 @@ class Edit: public wxStyledTextCtrl {
public:
//! constructor
Edit (wxWindow *parent, wxWindowID id = -1,
Edit (wxWindow *parent, wxWindowID id = wxID_ANY,
const wxPoint &pos = wxDefaultPosition,
const wxSize &size = wxDefaultSize,
long style = wxSUNKEN_BORDER|wxVSCROLL

View File

@@ -289,7 +289,7 @@ BEGIN_EVENT_TABLE (AppFrame, wxFrame)
END_EVENT_TABLE ()
AppFrame::AppFrame (const wxString &title)
: wxFrame ((wxFrame *)NULL, -1, title, wxDefaultPosition, wxSize(750,550),
: wxFrame ((wxFrame *)NULL, wxID_ANY, title, wxDefaultPosition, wxSize(750,550),
wxDEFAULT_FRAME_STYLE | wxNO_FULL_REPAINT_ON_RESIZE) {
// intitialize important variables
@@ -308,7 +308,7 @@ AppFrame::AppFrame (const wxString &title)
CreateMenu ();
// open first page
m_edit = new Edit (this, -1);
m_edit = new Edit (this, wxID_ANY);
m_edit->SetFocus();
FileOpen (_T("stctest.cpp"));
@@ -586,7 +586,7 @@ END_EVENT_TABLE ()
AppAbout::AppAbout (wxWindow *parent,
int milliseconds,
long style)
: wxDialog (parent, -1, wxEmptyString,
: wxDialog (parent, wxID_ANY, wxEmptyString,
wxDefaultPosition, wxDefaultSize,
style | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) {
@@ -602,27 +602,27 @@ AppAbout::AppAbout (wxWindow *parent,
// about info
wxGridSizer *aboutinfo = new wxGridSizer (2, 0, 2);
aboutinfo->Add (new wxStaticText(this, -1, _("Written by: ")),
aboutinfo->Add (new wxStaticText(this, wxID_ANY, _("Written by: ")),
0, wxALIGN_LEFT);
aboutinfo->Add (new wxStaticText(this, -1, APP_MAINT),
aboutinfo->Add (new wxStaticText(this, wxID_ANY, APP_MAINT),
1, wxEXPAND | wxALIGN_LEFT);
aboutinfo->Add (new wxStaticText(this, -1, _("Version: ")),
aboutinfo->Add (new wxStaticText(this, wxID_ANY, _("Version: ")),
0, wxALIGN_LEFT);
aboutinfo->Add (new wxStaticText(this, -1, APP_VERSION),
aboutinfo->Add (new wxStaticText(this, wxID_ANY, APP_VERSION),
1, wxEXPAND | wxALIGN_LEFT);
aboutinfo->Add (new wxStaticText(this, -1, _("Licence type: ")),
aboutinfo->Add (new wxStaticText(this, wxID_ANY, _("Licence type: ")),
0, wxALIGN_LEFT);
aboutinfo->Add (new wxStaticText(this, -1, APP_LICENCE),
aboutinfo->Add (new wxStaticText(this, wxID_ANY, APP_LICENCE),
1, wxEXPAND | wxALIGN_LEFT);
aboutinfo->Add (new wxStaticText(this, -1, _("Copyright: ")),
aboutinfo->Add (new wxStaticText(this, wxID_ANY, _("Copyright: ")),
0, wxALIGN_LEFT);
aboutinfo->Add (new wxStaticText(this, -1, APP_COPYRIGTH),
aboutinfo->Add (new wxStaticText(this, wxID_ANY, APP_COPYRIGTH),
1, wxEXPAND | wxALIGN_LEFT);
// about icontitle//info
wxBoxSizer *aboutpane = new wxBoxSizer (wxHORIZONTAL);
wxBitmap bitmap = wxBitmap(wxICON (mondrian));
aboutpane->Add (new wxStaticBitmap (this, -1, bitmap),
aboutpane->Add (new wxStaticBitmap (this, wxID_ANY, bitmap),
0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 20);
aboutpane->Add (aboutinfo, 1, wxEXPAND);
aboutpane->Add (60, 0);
@@ -630,12 +630,12 @@ AppAbout::AppAbout (wxWindow *parent,
// about complete
wxBoxSizer *totalpane = new wxBoxSizer (wxVERTICAL);
totalpane->Add (0, 20);
wxStaticText *appname = new wxStaticText(this, -1, *g_appname);
wxStaticText *appname = new wxStaticText(this, wxID_ANY, *g_appname);
appname->SetFont (wxFont (24, wxDEFAULT, wxNORMAL, wxBOLD));
totalpane->Add (appname, 0, wxALIGN_CENTER | wxLEFT | wxRIGHT, 40);
totalpane->Add (0, 10);
totalpane->Add (aboutpane, 0, wxEXPAND | wxALL, 4);
totalpane->Add (new wxStaticText(this, -1, APP_DESCR),
totalpane->Add (new wxStaticText(this, wxID_ANY, APP_DESCR),
0, wxALIGN_CENTER | wxALL, 10);
wxButton *okButton = new wxButton (this, wxID_OK, _("OK"));
okButton->SetDefault();

View File

@@ -574,7 +574,7 @@ Window::~Window() {
void Window::Destroy() {
if (id) {
Show(FALSE);
Show(false);
GETWIN(id)->Destroy();
}
id = 0;
@@ -767,7 +767,7 @@ public:
#endif
if ( !wxPendingDelete.Member(this) )
wxPendingDelete.Append(this);
return TRUE;
return true;
}
@@ -818,7 +818,7 @@ private:
BEGIN_EVENT_TABLE(wxSTCListBoxWin, wxWindow)
EVT_SET_FOCUS ( wxSTCListBoxWin::OnFocus)
EVT_SIZE ( wxSTCListBoxWin::OnSize)
EVT_LIST_ITEM_ACTIVATED(-1, wxSTCListBoxWin::OnActivate)
EVT_LIST_ITEM_ACTIVATED(wxID_ANY, wxSTCListBoxWin::OnActivate)
END_EVENT_TABLE()
@@ -981,10 +981,10 @@ int ListBoxImpl::Length() {
void ListBoxImpl::Select(int n) {
bool select = TRUE;
bool select = true;
if (n == -1) {
n = 0;
select = FALSE;
select = false;
}
GETLB(id)->Focus(n);
GETLB(id)->Select(n, select);
@@ -998,7 +998,7 @@ int ListBoxImpl::GetSelection() {
int ListBoxImpl::Find(const char *WXUNUSED(prefix)) {
// No longer used
return -1;
return wxNOT_FOUND;
}
@@ -1019,7 +1019,7 @@ void ListBoxImpl::RegisterImage(int type, const char *xpm_data) {
if (! imgList) {
// assumes all images are the same size
imgList = new wxImageList(bmp.GetWidth(), bmp.GetHeight(), TRUE);
imgList = new wxImageList(bmp.GetWidth(), bmp.GetHeight(), true);
imgTypeMap = new wxArrayInt;
}
@@ -1121,7 +1121,7 @@ unsigned int Platform::DoubleClickTime() {
}
bool Platform::MouseButtonBounce() {
return FALSE;
return false;
}
void Platform::DebugDisplay(const char *s) {
wxLogDebug(stc2wx(s));

View File

@@ -73,7 +73,7 @@ class wxSTCCallTip : public wxSTCCallTipBase {
public:
wxSTCCallTip(wxWindow* parent, CallTip* ct, ScintillaWX* swx)
: wxSTCCallTipBase(parent, param2),
m_ct(ct), m_swx(swx), m_cx(-1), m_cy(-1)
m_ct(ct), m_swx(swx), m_cx(wxDefaultCoord), m_cy(wxDefaultCoord)
{
}
@@ -86,7 +86,7 @@ public:
#endif
}
bool AcceptsFocus() const { return FALSE; }
bool AcceptsFocus() const { return false; }
void OnPaint(wxPaintEvent& WXUNUSED(evt)) {
wxBufferedPaintDC dc(this);
@@ -113,11 +113,11 @@ public:
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO) {
if (x != -1) {
if (x != wxDefaultCoord) {
m_cx = x;
GetParent()->ClientToScreen(&x, NULL);
}
if (y != -1) {
if (y != wxDefaultCoord) {
m_cy = y;
GetParent()->ClientToScreen(NULL, &y);
}
@@ -222,7 +222,7 @@ void ScintillaWX::StartDrag() {
wxStyledTextEvent evt(wxEVT_STC_START_DRAG, stc->GetId());
evt.SetEventObject(stc);
evt.SetDragText(dragText);
evt.SetDragAllowMove(TRUE);
evt.SetDragAllowMove(true);
evt.SetPosition(wxMin(stc->GetSelectionStart(),
stc->GetSelectionEnd()));
stc->GetEventHandler()->ProcessEvent(evt);
@@ -234,11 +234,11 @@ void ScintillaWX::StartDrag() {
wxDragResult result;
source.SetData(data);
dropWentOutside = TRUE;
dropWentOutside = true;
result = source.DoDragDrop(evt.GetDragAllowMove());
if (result == wxDragMove && dropWentOutside)
ClearSelection();
inDragDrop = FALSE;
inDragDrop = false;
SetDragPosition(invalidPosition);
}
#endif
@@ -249,10 +249,10 @@ bool ScintillaWX::SetIdle(bool on) {
if (idler.state != on) {
// connect or disconnect the EVT_IDLE handler
if (on)
stc->Connect(-1, wxEVT_IDLE,
stc->Connect(wxID_ANY, wxEVT_IDLE,
(wxObjectEventFunction) (wxEventFunction) (wxIdleEventFunction) &wxStyledTextCtrl::OnIdle);
else
stc->Disconnect(-1, wxEVT_IDLE,
stc->Disconnect(wxID_ANY, wxEVT_IDLE,
(wxObjectEventFunction) (wxEventFunction) (wxIdleEventFunction) &wxStyledTextCtrl::OnIdle);
idler.state = on;
}
@@ -425,10 +425,10 @@ void ScintillaWX::Paste() {
ClearSelection();
wxTextDataObject data;
bool gotData = FALSE;
bool gotData = false;
if (wxTheClipboard->Open()) {
wxTheClipboard->UsePrimarySelection(FALSE);
wxTheClipboard->UsePrimarySelection(false);
gotData = wxTheClipboard->GetData(data);
wxTheClipboard->Close();
}
@@ -449,7 +449,7 @@ void ScintillaWX::Paste() {
void ScintillaWX::CopyToClipboard(const SelectionText& st) {
if (wxTheClipboard->Open()) {
wxTheClipboard->UsePrimarySelection(FALSE);
wxTheClipboard->UsePrimarySelection(false);
wxString text = wxTextBuffer::Translate(stc2wx(st.s, st.len));
wxTheClipboard->SetData(new wxTextDataObject(text));
wxTheClipboard->Close();
@@ -458,7 +458,7 @@ void ScintillaWX::CopyToClipboard(const SelectionText& st) {
bool ScintillaWX::CanPaste() {
bool canPaste = FALSE;
bool canPaste = false;
bool didOpen;
if (Editor::CanPaste()) {
@@ -467,7 +467,7 @@ bool ScintillaWX::CanPaste() {
wxTheClipboard->Open();
if (wxTheClipboard->IsOpened()) {
wxTheClipboard->UsePrimarySelection(FALSE);
wxTheClipboard->UsePrimarySelection(false);
canPaste = wxTheClipboard->IsSupported(wxUSE_UNICODE ? wxDF_UNICODETEXT : wxDF_TEXT);
if (didOpen)
wxTheClipboard->Close();
@@ -508,10 +508,10 @@ void ScintillaWX::ClaimSelection() {
SelectionText st;
CopySelectionRange(&st);
if (wxTheClipboard->Open()) {
wxTheClipboard->UsePrimarySelection(TRUE);
wxTheClipboard->UsePrimarySelection(true);
wxString text = stc2wx(st.s, st.len);
wxTheClipboard->SetData(new wxTextDataObject(text));
wxTheClipboard->UsePrimarySelection(FALSE);
wxTheClipboard->UsePrimarySelection(false);
wxTheClipboard->Close();
}
}
@@ -679,9 +679,6 @@ void ScintillaWX::DoMouseWheel(int rotation, int delta,
void ScintillaWX::DoSize(int WXUNUSED(width), int WXUNUSED(height)) {
// PRectangle rcClient(0,0,width,height);
// SetScrollBarsTo(rcClient);
// DropGraphics();
ChangeSize();
}
@@ -722,11 +719,11 @@ void ScintillaWX::DoMiddleButtonUp(Point pt) {
pdoc->BeginUndoAction();
wxTextDataObject data;
bool gotData = FALSE;
bool gotData = false;
if (wxTheClipboard->Open()) {
wxTheClipboard->UsePrimarySelection(TRUE);
wxTheClipboard->UsePrimarySelection(true);
gotData = wxTheClipboard->GetData(data);
wxTheClipboard->UsePrimarySelection(FALSE);
wxTheClipboard->UsePrimarySelection(false);
wxTheClipboard->Close();
}
if (gotData) {
@@ -876,10 +873,10 @@ bool ScintillaWX::DoDropText(long x, long y, const wxString& data) {
DropAt(evt.GetPosition(),
wx2stc(evt.GetDragText()),
dragResult == wxDragMove,
FALSE); // TODO: rectangular?
return TRUE;
false); // TODO: rectangular?
return true;
}
return FALSE;
return false;
}

View File

@@ -120,7 +120,7 @@ BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
EVT_SYS_COLOUR_CHANGED (wxStyledTextCtrl::OnSysColourChanged)
EVT_ERASE_BACKGROUND (wxStyledTextCtrl::OnEraseBackground)
EVT_MENU_RANGE (10, 16, wxStyledTextCtrl::OnMenu)
EVT_LISTBOX_DCLICK (-1, wxStyledTextCtrl::OnListBox)
EVT_LISTBOX_DCLICK (wxID_ANY, wxStyledTextCtrl::OnListBox)
END_EVENT_TABLE()
@@ -166,7 +166,7 @@ void wxStyledTextCtrl::Create(wxWindow *parent,
#endif
m_swx = new ScintillaWX(this);
m_stopWatch.Start();
m_lastKeyDownConsumed = FALSE;
m_lastKeyDownConsumed = false;
m_vScrollBar = NULL;
m_hScrollBar = NULL;
#if wxUSE_UNICODE
@@ -2566,7 +2566,7 @@ bool wxStyledTextCtrl::SaveFile(const wxString& filename)
wxFile file(filename, wxFile::write);
if (!file.IsOpened())
return FALSE;
return false;
bool success = file.Write(GetText(), *wxConvCurrent);
@@ -2584,7 +2584,7 @@ bool wxStyledTextCtrl::LoadFile(const wxString& filename)
if (file.IsOpened())
{
wxString contents;
off_t len = file.Length();
size_t len = file.Length();
if (len > 0)
{
#if wxUSE_UNICODE
@@ -2982,7 +2982,7 @@ wxStyledTextEvent::wxStyledTextEvent(wxEventType commandType, int id)
m_listType = 0;
m_x = 0;
m_y = 0;
m_dragAllowMove = FALSE;
m_dragAllowMove = false;
#if wxUSE_DRAG_AND_DROP
m_dragResult = wxDragNone;
#endif

View File

@@ -3077,31 +3077,31 @@ END_DECLARE_EVENT_TYPES()
#ifndef SWIG
typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
#define EVT_STC_CHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_STYLENEEDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_STYLENEEDED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_CHARADDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHARADDED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_SAVEPOINTREACHED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTREACHED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_SAVEPOINTLEFT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTLEFT, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_ROMODIFYATTEMPT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_KEY(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_DOUBLECLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_UPDATEUI(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_MODIFIED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_MACRORECORD(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_MARGINCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_NEEDSHOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_PAINTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_PAINTED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_USERLISTSELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_USERLISTSELECTION, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_URIDROPPED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_URIDROPPED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_DWELLSTART(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLSTART, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_DWELLEND(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLEND, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_ZOOM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ZOOM, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_HOTSPOT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_HOTSPOT_DCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_DCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_CALLTIP_CLICK(id, fn)) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CALLTIP_CLICK id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_CHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHANGE, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_STYLENEEDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_STYLENEEDED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_CHARADDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHARADDED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_SAVEPOINTREACHED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTREACHED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_SAVEPOINTLEFT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTLEFT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_ROMODIFYATTEMPT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ROMODIFYATTEMPT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_KEY(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_DOUBLECLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DOUBLECLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_UPDATEUI(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_MODIFIED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MODIFIED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_MACRORECORD(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MACRORECORD, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_MARGINCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MARGINCLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_NEEDSHOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_NEEDSHOWN, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_PAINTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_PAINTED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_USERLISTSELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_USERLISTSELECTION, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_URIDROPPED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_URIDROPPED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_DWELLSTART(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLSTART, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_DWELLEND(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLEND, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_ZOOM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ZOOM, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_HOTSPOT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_CLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_HOTSPOT_DCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_DCLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_STC_CALLTIP_CLICK(id, fn)) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CALLTIP_CLICK id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
#endif

View File

@@ -100,8 +100,8 @@ BEGIN_EVENT_TABLE (Edit, wxStyledTextCtrl)
EVT_MENU (myID_CONVERTCRLF, Edit::OnConvertEOL)
EVT_MENU (myID_CONVERTLF, Edit::OnConvertEOL)
// stc
EVT_STC_MARGINCLICK (-1, Edit::OnMarginClick)
EVT_STC_CHARADDED (-1, Edit::OnCharAdded)
EVT_STC_MARGINCLICK (wxID_ANY, Edit::OnMarginClick)
EVT_STC_CHARADDED (wxID_ANY, Edit::OnCharAdded)
END_EVENT_TABLE()
Edit::Edit (wxWindow *parent, wxWindowID id,
@@ -595,7 +595,7 @@ bool Edit::Modified () {
EditProperties::EditProperties (Edit *edit,
long style)
: wxDialog (edit, -1, wxEmptyString,
: wxDialog (edit, wxID_ANY, wxEmptyString,
wxDefaultPosition, wxDefaultSize,
style | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) {
@@ -606,24 +606,24 @@ EditProperties::EditProperties (Edit *edit,
// fullname
wxBoxSizer *fullname = new wxBoxSizer (wxHORIZONTAL);
fullname->Add (10, 0);
fullname->Add (new wxStaticText (this, -1, _("Full filename"),
wxDefaultPosition, wxSize(80, -1)),
fullname->Add (new wxStaticText (this, wxID_ANY, _("Full filename"),
wxDefaultPosition, wxSize(80, wxDefaultCoord)),
0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL);
fullname->Add (new wxStaticText (this, -1, edit->GetFilename()),
fullname->Add (new wxStaticText (this, wxID_ANY, edit->GetFilename()),
0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL);
// text info
wxGridSizer *textinfo = new wxGridSizer (4, 0, 2);
textinfo->Add (new wxStaticText (this, -1, _("Language"),
wxDefaultPosition, wxSize(80, -1)),
textinfo->Add (new wxStaticText (this, wxID_ANY, _("Language"),
wxDefaultPosition, wxSize(80, wxDefaultCoord)),
0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, 4);
textinfo->Add (new wxStaticText (this, -1, edit->m_language->name),
textinfo->Add (new wxStaticText (this, wxID_ANY, edit->m_language->name),
0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 4);
textinfo->Add (new wxStaticText (this, -1, _("Lexer-ID: "),
wxDefaultPosition, wxSize(80, -1)),
textinfo->Add (new wxStaticText (this, wxID_ANY, _("Lexer-ID: "),
wxDefaultPosition, wxSize(80, wxDefaultCoord)),
0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, 4);
text = wxString::Format (_T("%d"), edit->GetLexer());
textinfo->Add (new wxStaticText (this, -1, text),
textinfo->Add (new wxStaticText (this, wxID_ANY, text),
0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 4);
wxString EOLtype = _T("");
switch (edit->GetEOLMode()) {
@@ -631,49 +631,49 @@ EditProperties::EditProperties (Edit *edit,
case wxSTC_EOL_CRLF: {EOLtype = _T("CRLF (Windows)"); break; }
case wxSTC_EOL_LF: {EOLtype = _T("CR (Macintosh)"); break; }
}
textinfo->Add (new wxStaticText (this, -1, _("Line endings"),
wxDefaultPosition, wxSize(80, -1)),
textinfo->Add (new wxStaticText (this, wxID_ANY, _("Line endings"),
wxDefaultPosition, wxSize(80, wxDefaultCoord)),
0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, 4);
textinfo->Add (new wxStaticText (this, -1, EOLtype),
textinfo->Add (new wxStaticText (this, wxID_ANY, EOLtype),
0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 4);
// text info box
wxStaticBoxSizer *textinfos = new wxStaticBoxSizer (
new wxStaticBox (this, -1, _("Informations")),
new wxStaticBox (this, wxID_ANY, _("Informations")),
wxVERTICAL);
textinfos->Add (textinfo, 0, wxEXPAND);
textinfos->Add (0, 6);
// statistic
wxGridSizer *statistic = new wxGridSizer (4, 0, 2);
statistic->Add (new wxStaticText (this, -1, _("Total lines"),
wxDefaultPosition, wxSize(80, -1)),
statistic->Add (new wxStaticText (this, wxID_ANY, _("Total lines"),
wxDefaultPosition, wxSize(80, wxDefaultCoord)),
0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, 4);
text = wxString::Format (_T("%d"), edit->GetLineCount());
statistic->Add (new wxStaticText (this, -1, text),
statistic->Add (new wxStaticText (this, wxID_ANY, text),
0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 4);
statistic->Add (new wxStaticText (this, -1, _("Total chars"),
wxDefaultPosition, wxSize(80, -1)),
statistic->Add (new wxStaticText (this, wxID_ANY, _("Total chars"),
wxDefaultPosition, wxSize(80, wxDefaultCoord)),
0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, 4);
text = wxString::Format (_T("%d"), edit->GetTextLength());
statistic->Add (new wxStaticText (this, -1, text),
statistic->Add (new wxStaticText (this, wxID_ANY, text),
0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 4);
statistic->Add (new wxStaticText (this, -1, _("Current line"),
wxDefaultPosition, wxSize(80, -1)),
statistic->Add (new wxStaticText (this, wxID_ANY, _("Current line"),
wxDefaultPosition, wxSize(80, wxDefaultCoord)),
0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, 4);
text = wxString::Format (_T("%d"), edit->GetCurrentLine());
statistic->Add (new wxStaticText (this, -1, text),
statistic->Add (new wxStaticText (this, wxID_ANY, text),
0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 4);
statistic->Add (new wxStaticText (this, -1, _("Current pos"),
wxDefaultPosition, wxSize(80, -1)),
statistic->Add (new wxStaticText (this, wxID_ANY, _("Current pos"),
wxDefaultPosition, wxSize(80, wxDefaultCoord)),
0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, 4);
text = wxString::Format (_T("%d"), edit->GetCurrentPos());
statistic->Add (new wxStaticText (this, -1, text),
statistic->Add (new wxStaticText (this, wxID_ANY, text),
0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 4);
// char/line statistics
wxStaticBoxSizer *statistics = new wxStaticBoxSizer (
new wxStaticBox (this, -1, _("Statistics")),
new wxStaticBox (this, wxID_ANY, _("Statistics")),
wxVERTICAL);
statistics->Add (statistic, 0, wxEXPAND);
statistics->Add (0, 6);

View File

@@ -45,7 +45,7 @@ class Edit: public wxStyledTextCtrl {
public:
//! constructor
Edit (wxWindow *parent, wxWindowID id = -1,
Edit (wxWindow *parent, wxWindowID id = wxID_ANY,
const wxPoint &pos = wxDefaultPosition,
const wxSize &size = wxDefaultSize,
long style = wxSUNKEN_BORDER|wxVSCROLL

View File

@@ -289,7 +289,7 @@ BEGIN_EVENT_TABLE (AppFrame, wxFrame)
END_EVENT_TABLE ()
AppFrame::AppFrame (const wxString &title)
: wxFrame ((wxFrame *)NULL, -1, title, wxDefaultPosition, wxSize(750,550),
: wxFrame ((wxFrame *)NULL, wxID_ANY, title, wxDefaultPosition, wxSize(750,550),
wxDEFAULT_FRAME_STYLE | wxNO_FULL_REPAINT_ON_RESIZE) {
// intitialize important variables
@@ -308,7 +308,7 @@ AppFrame::AppFrame (const wxString &title)
CreateMenu ();
// open first page
m_edit = new Edit (this, -1);
m_edit = new Edit (this, wxID_ANY);
m_edit->SetFocus();
FileOpen (_T("stctest.cpp"));
@@ -586,7 +586,7 @@ END_EVENT_TABLE ()
AppAbout::AppAbout (wxWindow *parent,
int milliseconds,
long style)
: wxDialog (parent, -1, wxEmptyString,
: wxDialog (parent, wxID_ANY, wxEmptyString,
wxDefaultPosition, wxDefaultSize,
style | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) {
@@ -602,27 +602,27 @@ AppAbout::AppAbout (wxWindow *parent,
// about info
wxGridSizer *aboutinfo = new wxGridSizer (2, 0, 2);
aboutinfo->Add (new wxStaticText(this, -1, _("Written by: ")),
aboutinfo->Add (new wxStaticText(this, wxID_ANY, _("Written by: ")),
0, wxALIGN_LEFT);
aboutinfo->Add (new wxStaticText(this, -1, APP_MAINT),
aboutinfo->Add (new wxStaticText(this, wxID_ANY, APP_MAINT),
1, wxEXPAND | wxALIGN_LEFT);
aboutinfo->Add (new wxStaticText(this, -1, _("Version: ")),
aboutinfo->Add (new wxStaticText(this, wxID_ANY, _("Version: ")),
0, wxALIGN_LEFT);
aboutinfo->Add (new wxStaticText(this, -1, APP_VERSION),
aboutinfo->Add (new wxStaticText(this, wxID_ANY, APP_VERSION),
1, wxEXPAND | wxALIGN_LEFT);
aboutinfo->Add (new wxStaticText(this, -1, _("Licence type: ")),
aboutinfo->Add (new wxStaticText(this, wxID_ANY, _("Licence type: ")),
0, wxALIGN_LEFT);
aboutinfo->Add (new wxStaticText(this, -1, APP_LICENCE),
aboutinfo->Add (new wxStaticText(this, wxID_ANY, APP_LICENCE),
1, wxEXPAND | wxALIGN_LEFT);
aboutinfo->Add (new wxStaticText(this, -1, _("Copyright: ")),
aboutinfo->Add (new wxStaticText(this, wxID_ANY, _("Copyright: ")),
0, wxALIGN_LEFT);
aboutinfo->Add (new wxStaticText(this, -1, APP_COPYRIGTH),
aboutinfo->Add (new wxStaticText(this, wxID_ANY, APP_COPYRIGTH),
1, wxEXPAND | wxALIGN_LEFT);
// about icontitle//info
wxBoxSizer *aboutpane = new wxBoxSizer (wxHORIZONTAL);
wxBitmap bitmap = wxBitmap(wxICON (mondrian));
aboutpane->Add (new wxStaticBitmap (this, -1, bitmap),
aboutpane->Add (new wxStaticBitmap (this, wxID_ANY, bitmap),
0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 20);
aboutpane->Add (aboutinfo, 1, wxEXPAND);
aboutpane->Add (60, 0);
@@ -630,12 +630,12 @@ AppAbout::AppAbout (wxWindow *parent,
// about complete
wxBoxSizer *totalpane = new wxBoxSizer (wxVERTICAL);
totalpane->Add (0, 20);
wxStaticText *appname = new wxStaticText(this, -1, *g_appname);
wxStaticText *appname = new wxStaticText(this, wxID_ANY, *g_appname);
appname->SetFont (wxFont (24, wxDEFAULT, wxNORMAL, wxBOLD));
totalpane->Add (appname, 0, wxALIGN_CENTER | wxLEFT | wxRIGHT, 40);
totalpane->Add (0, 10);
totalpane->Add (aboutpane, 0, wxEXPAND | wxALL, 4);
totalpane->Add (new wxStaticText(this, -1, APP_DESCR),
totalpane->Add (new wxStaticText(this, wxID_ANY, APP_DESCR),
0, wxALIGN_CENTER | wxALL, 10);
wxButton *okButton = new wxButton (this, wxID_OK, _("OK"));
okButton->SetDefault();

View File

@@ -574,7 +574,7 @@ Window::~Window() {
void Window::Destroy() {
if (id) {
Show(FALSE);
Show(false);
GETWIN(id)->Destroy();
}
id = 0;
@@ -767,7 +767,7 @@ public:
#endif
if ( !wxPendingDelete.Member(this) )
wxPendingDelete.Append(this);
return TRUE;
return true;
}
@@ -818,7 +818,7 @@ private:
BEGIN_EVENT_TABLE(wxSTCListBoxWin, wxWindow)
EVT_SET_FOCUS ( wxSTCListBoxWin::OnFocus)
EVT_SIZE ( wxSTCListBoxWin::OnSize)
EVT_LIST_ITEM_ACTIVATED(-1, wxSTCListBoxWin::OnActivate)
EVT_LIST_ITEM_ACTIVATED(wxID_ANY, wxSTCListBoxWin::OnActivate)
END_EVENT_TABLE()
@@ -981,10 +981,10 @@ int ListBoxImpl::Length() {
void ListBoxImpl::Select(int n) {
bool select = TRUE;
bool select = true;
if (n == -1) {
n = 0;
select = FALSE;
select = false;
}
GETLB(id)->Focus(n);
GETLB(id)->Select(n, select);
@@ -998,7 +998,7 @@ int ListBoxImpl::GetSelection() {
int ListBoxImpl::Find(const char *WXUNUSED(prefix)) {
// No longer used
return -1;
return wxNOT_FOUND;
}
@@ -1019,7 +1019,7 @@ void ListBoxImpl::RegisterImage(int type, const char *xpm_data) {
if (! imgList) {
// assumes all images are the same size
imgList = new wxImageList(bmp.GetWidth(), bmp.GetHeight(), TRUE);
imgList = new wxImageList(bmp.GetWidth(), bmp.GetHeight(), true);
imgTypeMap = new wxArrayInt;
}
@@ -1121,7 +1121,7 @@ unsigned int Platform::DoubleClickTime() {
}
bool Platform::MouseButtonBounce() {
return FALSE;
return false;
}
void Platform::DebugDisplay(const char *s) {
wxLogDebug(stc2wx(s));

View File

@@ -73,7 +73,7 @@ class wxSTCCallTip : public wxSTCCallTipBase {
public:
wxSTCCallTip(wxWindow* parent, CallTip* ct, ScintillaWX* swx)
: wxSTCCallTipBase(parent, param2),
m_ct(ct), m_swx(swx), m_cx(-1), m_cy(-1)
m_ct(ct), m_swx(swx), m_cx(wxDefaultCoord), m_cy(wxDefaultCoord)
{
}
@@ -86,7 +86,7 @@ public:
#endif
}
bool AcceptsFocus() const { return FALSE; }
bool AcceptsFocus() const { return false; }
void OnPaint(wxPaintEvent& WXUNUSED(evt)) {
wxBufferedPaintDC dc(this);
@@ -113,11 +113,11 @@ public:
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO) {
if (x != -1) {
if (x != wxDefaultCoord) {
m_cx = x;
GetParent()->ClientToScreen(&x, NULL);
}
if (y != -1) {
if (y != wxDefaultCoord) {
m_cy = y;
GetParent()->ClientToScreen(NULL, &y);
}
@@ -222,7 +222,7 @@ void ScintillaWX::StartDrag() {
wxStyledTextEvent evt(wxEVT_STC_START_DRAG, stc->GetId());
evt.SetEventObject(stc);
evt.SetDragText(dragText);
evt.SetDragAllowMove(TRUE);
evt.SetDragAllowMove(true);
evt.SetPosition(wxMin(stc->GetSelectionStart(),
stc->GetSelectionEnd()));
stc->GetEventHandler()->ProcessEvent(evt);
@@ -234,11 +234,11 @@ void ScintillaWX::StartDrag() {
wxDragResult result;
source.SetData(data);
dropWentOutside = TRUE;
dropWentOutside = true;
result = source.DoDragDrop(evt.GetDragAllowMove());
if (result == wxDragMove && dropWentOutside)
ClearSelection();
inDragDrop = FALSE;
inDragDrop = false;
SetDragPosition(invalidPosition);
}
#endif
@@ -249,10 +249,10 @@ bool ScintillaWX::SetIdle(bool on) {
if (idler.state != on) {
// connect or disconnect the EVT_IDLE handler
if (on)
stc->Connect(-1, wxEVT_IDLE,
stc->Connect(wxID_ANY, wxEVT_IDLE,
(wxObjectEventFunction) (wxEventFunction) (wxIdleEventFunction) &wxStyledTextCtrl::OnIdle);
else
stc->Disconnect(-1, wxEVT_IDLE,
stc->Disconnect(wxID_ANY, wxEVT_IDLE,
(wxObjectEventFunction) (wxEventFunction) (wxIdleEventFunction) &wxStyledTextCtrl::OnIdle);
idler.state = on;
}
@@ -425,10 +425,10 @@ void ScintillaWX::Paste() {
ClearSelection();
wxTextDataObject data;
bool gotData = FALSE;
bool gotData = false;
if (wxTheClipboard->Open()) {
wxTheClipboard->UsePrimarySelection(FALSE);
wxTheClipboard->UsePrimarySelection(false);
gotData = wxTheClipboard->GetData(data);
wxTheClipboard->Close();
}
@@ -449,7 +449,7 @@ void ScintillaWX::Paste() {
void ScintillaWX::CopyToClipboard(const SelectionText& st) {
if (wxTheClipboard->Open()) {
wxTheClipboard->UsePrimarySelection(FALSE);
wxTheClipboard->UsePrimarySelection(false);
wxString text = wxTextBuffer::Translate(stc2wx(st.s, st.len));
wxTheClipboard->SetData(new wxTextDataObject(text));
wxTheClipboard->Close();
@@ -458,7 +458,7 @@ void ScintillaWX::CopyToClipboard(const SelectionText& st) {
bool ScintillaWX::CanPaste() {
bool canPaste = FALSE;
bool canPaste = false;
bool didOpen;
if (Editor::CanPaste()) {
@@ -467,7 +467,7 @@ bool ScintillaWX::CanPaste() {
wxTheClipboard->Open();
if (wxTheClipboard->IsOpened()) {
wxTheClipboard->UsePrimarySelection(FALSE);
wxTheClipboard->UsePrimarySelection(false);
canPaste = wxTheClipboard->IsSupported(wxUSE_UNICODE ? wxDF_UNICODETEXT : wxDF_TEXT);
if (didOpen)
wxTheClipboard->Close();
@@ -508,10 +508,10 @@ void ScintillaWX::ClaimSelection() {
SelectionText st;
CopySelectionRange(&st);
if (wxTheClipboard->Open()) {
wxTheClipboard->UsePrimarySelection(TRUE);
wxTheClipboard->UsePrimarySelection(true);
wxString text = stc2wx(st.s, st.len);
wxTheClipboard->SetData(new wxTextDataObject(text));
wxTheClipboard->UsePrimarySelection(FALSE);
wxTheClipboard->UsePrimarySelection(false);
wxTheClipboard->Close();
}
}
@@ -679,9 +679,6 @@ void ScintillaWX::DoMouseWheel(int rotation, int delta,
void ScintillaWX::DoSize(int WXUNUSED(width), int WXUNUSED(height)) {
// PRectangle rcClient(0,0,width,height);
// SetScrollBarsTo(rcClient);
// DropGraphics();
ChangeSize();
}
@@ -722,11 +719,11 @@ void ScintillaWX::DoMiddleButtonUp(Point pt) {
pdoc->BeginUndoAction();
wxTextDataObject data;
bool gotData = FALSE;
bool gotData = false;
if (wxTheClipboard->Open()) {
wxTheClipboard->UsePrimarySelection(TRUE);
wxTheClipboard->UsePrimarySelection(true);
gotData = wxTheClipboard->GetData(data);
wxTheClipboard->UsePrimarySelection(FALSE);
wxTheClipboard->UsePrimarySelection(false);
wxTheClipboard->Close();
}
if (gotData) {
@@ -876,10 +873,10 @@ bool ScintillaWX::DoDropText(long x, long y, const wxString& data) {
DropAt(evt.GetPosition(),
wx2stc(evt.GetDragText()),
dragResult == wxDragMove,
FALSE); // TODO: rectangular?
return TRUE;
false); // TODO: rectangular?
return true;
}
return FALSE;
return false;
}

View File

@@ -120,7 +120,7 @@ BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
EVT_SYS_COLOUR_CHANGED (wxStyledTextCtrl::OnSysColourChanged)
EVT_ERASE_BACKGROUND (wxStyledTextCtrl::OnEraseBackground)
EVT_MENU_RANGE (10, 16, wxStyledTextCtrl::OnMenu)
EVT_LISTBOX_DCLICK (-1, wxStyledTextCtrl::OnListBox)
EVT_LISTBOX_DCLICK (wxID_ANY, wxStyledTextCtrl::OnListBox)
END_EVENT_TABLE()
@@ -166,7 +166,7 @@ void wxStyledTextCtrl::Create(wxWindow *parent,
#endif
m_swx = new ScintillaWX(this);
m_stopWatch.Start();
m_lastKeyDownConsumed = FALSE;
m_lastKeyDownConsumed = false;
m_vScrollBar = NULL;
m_hScrollBar = NULL;
#if wxUSE_UNICODE
@@ -2566,7 +2566,7 @@ bool wxStyledTextCtrl::SaveFile(const wxString& filename)
wxFile file(filename, wxFile::write);
if (!file.IsOpened())
return FALSE;
return false;
bool success = file.Write(GetText(), *wxConvCurrent);
@@ -2584,7 +2584,7 @@ bool wxStyledTextCtrl::LoadFile(const wxString& filename)
if (file.IsOpened())
{
wxString contents;
off_t len = file.Length();
size_t len = file.Length();
if (len > 0)
{
#if wxUSE_UNICODE
@@ -2982,7 +2982,7 @@ wxStyledTextEvent::wxStyledTextEvent(wxEventType commandType, int id)
m_listType = 0;
m_x = 0;
m_y = 0;
m_dragAllowMove = FALSE;
m_dragAllowMove = false;
#if wxUSE_DRAG_AND_DROP
m_dragResult = wxDragNone;
#endif