#endif
// for all others, include the necessary headers (this file is usually all you
-// need because it includes almost all 'standard' wxWindows headers)
+// need because it includes almost all 'standard' wxWidgets headers)
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif
-//! wxWindows headers
+//! wxWidgets headers
#include <wx/file.h> // raw file io support
#include <wx/filename.h> // filename support
wxSTC_WRAP_WORD: wxSTC_WRAP_NONE);
wxFont font (10, wxMODERN, wxNORMAL, wxNORMAL);
StyleSetFont (wxSTC_STYLE_DEFAULT, font);
- StyleSetForeground (wxSTC_STYLE_DEFAULT, wxColour ("BLACK"));
- StyleSetBackground (wxSTC_STYLE_DEFAULT, wxColour ("WHITE"));
- StyleSetForeground (wxSTC_STYLE_LINENUMBER, wxColour ("DARK GREY"));
- StyleSetBackground (wxSTC_STYLE_LINENUMBER, wxColour ("WHITE"));
- StyleSetForeground(wxSTC_STYLE_INDENTGUIDE, wxColour ("DARK GREY"));
+ StyleSetForeground (wxSTC_STYLE_DEFAULT, wxColour (_T("BLACK")));
+ StyleSetBackground (wxSTC_STYLE_DEFAULT, wxColour (_T("WHITE")));
+ StyleSetForeground (wxSTC_STYLE_LINENUMBER, wxColour (_T("DARK GREY")));
+ StyleSetBackground (wxSTC_STYLE_LINENUMBER, wxColour (_T("WHITE")));
+ StyleSetForeground(wxSTC_STYLE_INDENTGUIDE, wxColour (_T("DARK GREY")));
InitializePrefs (DEFAULT_LANGUAGE);
// set visibility
SetYCaretPolicy (wxSTC_CARET_EVEN|wxSTC_VISIBLE_STRICT|wxSTC_CARET_SLOP, 1);
// markers
- MarkerDefine (wxSTC_MARKNUM_FOLDER, wxSTC_MARK_DOTDOTDOT, "BLACK", "BLACK");
- MarkerDefine (wxSTC_MARKNUM_FOLDEROPEN, wxSTC_MARK_ARROWDOWN, "BLACK", "BLACK");
- MarkerDefine (wxSTC_MARKNUM_FOLDERSUB, wxSTC_MARK_EMPTY, "BLACK", "BLACK");
- MarkerDefine (wxSTC_MARKNUM_FOLDEREND, wxSTC_MARK_DOTDOTDOT, "BLACK", "WHITE");
- MarkerDefine (wxSTC_MARKNUM_FOLDEROPENMID, wxSTC_MARK_ARROWDOWN, "BLACK", "WHITE");
- MarkerDefine (wxSTC_MARKNUM_FOLDERMIDTAIL, wxSTC_MARK_EMPTY, "BLACK", "BLACK");
- MarkerDefine (wxSTC_MARKNUM_FOLDERTAIL, wxSTC_MARK_EMPTY, "BLACK", "BLACK");
+ MarkerDefine (wxSTC_MARKNUM_FOLDER, wxSTC_MARK_DOTDOTDOT, _T("BLACK"), _T("BLACK"));
+ MarkerDefine (wxSTC_MARKNUM_FOLDEROPEN, wxSTC_MARK_ARROWDOWN, _T("BLACK"), _T("BLACK"));
+ MarkerDefine (wxSTC_MARKNUM_FOLDERSUB, wxSTC_MARK_EMPTY, _T("BLACK"), _T("BLACK"));
+ MarkerDefine (wxSTC_MARKNUM_FOLDEREND, wxSTC_MARK_DOTDOTDOT, _T("BLACK"), _T("WHITE"));
+ MarkerDefine (wxSTC_MARKNUM_FOLDEROPENMID, wxSTC_MARK_ARROWDOWN, _T("BLACK"), _T("WHITE"));
+ MarkerDefine (wxSTC_MARKNUM_FOLDERMIDTAIL, wxSTC_MARK_EMPTY, _T("BLACK"), _T("BLACK"));
+ MarkerDefine (wxSTC_MARKNUM_FOLDERTAIL, wxSTC_MARK_EMPTY, _T("BLACK"), _T("BLACK"));
// miscelaneous
m_LineNrMargin = TextWidth (wxSTC_STYLE_LINENUMBER, _T("_999999"));
m_FoldingMargin = 16;
- SetMarginWidth (m_LineNrID,
- g_CommonPrefs.lineNumberEnable? m_LineNrMargin: 0);
CmdKeyClear (wxSTC_KEY_TAB, 0); // this is done by the menu accelerator key
- UsePopUp (0);
SetLayoutCache (wxSTC_CACHE_PAGE);
}
void Edit::OnGoto (wxCommandEvent &WXUNUSED(event)) {
}
-void Edit::OnEditIndentInc (wxCommandEvent &event) {
+void Edit::OnEditIndentInc (wxCommandEvent &WXUNUSED(event)) {
CmdKeyExecute (wxSTC_CMD_TAB);
}
-void Edit::OnEditIndentRed (wxCommandEvent &event) {
+void Edit::OnEditIndentRed (wxCommandEvent &WXUNUSED(event)) {
CmdKeyExecute (wxSTC_CMD_DELETEBACK);
}
// private functions
wxString Edit::DeterminePrefs (const wxString &filename) {
- LanguageInfo const* curInfo = NULL;
+ LanguageInfo const* curInfo;
// determine language from filepatterns
int languageNr;
// set margin for line numbers
SetMarginType (m_LineNrID, wxSTC_MARGIN_NUMBER);
- StyleSetForeground (wxSTC_STYLE_LINENUMBER, wxColour ("DARK GREY"));
- StyleSetBackground (wxSTC_STYLE_LINENUMBER, wxColour ("WHITE"));
- SetMarginWidth (m_LineNrID,
- g_CommonPrefs.lineNumberEnable? m_LineNrMargin: 0);
+ StyleSetForeground (wxSTC_STYLE_LINENUMBER, wxColour (_T("DARK GREY")));
+ StyleSetBackground (wxSTC_STYLE_LINENUMBER, wxColour (_T("WHITE")));
+ SetMarginWidth (m_LineNrID, 0); // start out not visible
// default fonts for all styles!
int Nr;
}
// set common styles
- StyleSetForeground (wxSTC_STYLE_DEFAULT, wxColour ("DARK GREY"));
- StyleSetForeground (wxSTC_STYLE_INDENTGUIDE, wxColour ("DARK GREY"));
+ StyleSetForeground (wxSTC_STYLE_DEFAULT, wxColour (_T("DARK GREY")));
+ StyleSetForeground (wxSTC_STYLE_INDENTGUIDE, wxColour (_T("DARK GREY")));
// initialize settings
if (g_CommonPrefs.syntaxEnable) {
// folding
SetMarginType (m_FoldingID, wxSTC_MARGIN_SYMBOL);
SetMarginMask (m_FoldingID, wxSTC_MASK_FOLDERS);
- StyleSetBackground (m_FoldingID, wxColour ("WHITE"));
+ StyleSetBackground (m_FoldingID, wxColour (_T("WHITE")));
SetMarginWidth (m_FoldingID, 0);
SetMarginSensitive (m_FoldingID, false);
if (g_CommonPrefs.foldEnable) {
long style)
: wxDialog (edit, -1, wxEmptyString,
wxDefaultPosition, wxDefaultSize,
- wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) {
+ style | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) {
// sets the application title
SetTitle (_("Properties"));
*selPageTo = *maxPage;
}
-bool EditPrint::HasPage (int page) {
+bool EditPrint::HasPage (int WXUNUSED(page)) {
return (m_printed < m_edit->GetLength());
}