Patch #809286 and a couple other minor changes to the stc sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@23716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -159,7 +159,6 @@ Edit::Edit (wxWindow *parent, wxWindowID id,
|
|||||||
SetMarginWidth (m_LineNrID,
|
SetMarginWidth (m_LineNrID,
|
||||||
g_CommonPrefs.lineNumberEnable? m_LineNrMargin: 0);
|
g_CommonPrefs.lineNumberEnable? m_LineNrMargin: 0);
|
||||||
CmdKeyClear (wxSTC_KEY_TAB, 0); // this is done by the menu accelerator key
|
CmdKeyClear (wxSTC_KEY_TAB, 0); // this is done by the menu accelerator key
|
||||||
UsePopUp (0);
|
|
||||||
SetLayoutCache (wxSTC_CACHE_PAGE);
|
SetLayoutCache (wxSTC_CACHE_PAGE);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -361,7 +360,7 @@ void Edit::OnCharAdded (wxStyledTextEvent &event) {
|
|||||||
// private functions
|
// private functions
|
||||||
wxString Edit::DeterminePrefs (const wxString &filename) {
|
wxString Edit::DeterminePrefs (const wxString &filename) {
|
||||||
|
|
||||||
LanguageInfo const* curInfo = NULL;
|
LanguageInfo const* curInfo;
|
||||||
|
|
||||||
// determine language from filepatterns
|
// determine language from filepatterns
|
||||||
int languageNr;
|
int languageNr;
|
||||||
|
@@ -54,7 +54,7 @@
|
|||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#define APP_NAME _T("STC-Test")
|
#define APP_NAME _T("STC-Test")
|
||||||
#define APP_DESCR _("See http://wxguide.sourceforge.net/indexedit.html")
|
#define APP_DESCR _("See http://wxguide.sourceforge.net/")
|
||||||
|
|
||||||
#define APP_MAINT _T("Otto Wyss")
|
#define APP_MAINT _T("Otto Wyss")
|
||||||
#define APP_VENDOR _T("wxWindows")
|
#define APP_VENDOR _T("wxWindows")
|
||||||
@@ -289,7 +289,7 @@ BEGIN_EVENT_TABLE (AppFrame, wxFrame)
|
|||||||
END_EVENT_TABLE ()
|
END_EVENT_TABLE ()
|
||||||
|
|
||||||
AppFrame::AppFrame (const wxString &title)
|
AppFrame::AppFrame (const wxString &title)
|
||||||
: wxFrame ((wxFrame *)NULL, -1, title, wxDefaultPosition, wxSize(600,400),
|
: wxFrame ((wxFrame *)NULL, -1, title, wxDefaultPosition, wxDefaultSize,
|
||||||
wxDEFAULT_FRAME_STYLE | wxNO_FULL_REPAINT_ON_RESIZE) {
|
wxDEFAULT_FRAME_STYLE | wxNO_FULL_REPAINT_ON_RESIZE) {
|
||||||
|
|
||||||
// intitialize important variables
|
// intitialize important variables
|
||||||
@@ -311,6 +311,7 @@ AppFrame::AppFrame (const wxString &title)
|
|||||||
m_edit = new Edit (this, -1);
|
m_edit = new Edit (this, -1);
|
||||||
m_edit->SetFocus();
|
m_edit->SetFocus();
|
||||||
|
|
||||||
|
FileOpen (_T("stctest.cpp"));
|
||||||
}
|
}
|
||||||
|
|
||||||
AppFrame::~AppFrame () {
|
AppFrame::~AppFrame () {
|
||||||
@@ -377,6 +378,7 @@ void AppFrame::OnFileClose (wxCommandEvent &WXUNUSED(event)) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -675,6 +675,7 @@ void Window::SetCursor(Cursor curs) {
|
|||||||
break;
|
break;
|
||||||
case cursorHand:
|
case cursorHand:
|
||||||
cursorId = wxCURSOR_HAND;
|
cursorId = wxCURSOR_HAND;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
cursorId = wxCURSOR_ARROW;
|
cursorId = wxCURSOR_ARROW;
|
||||||
break;
|
break;
|
||||||
@@ -888,7 +889,7 @@ PRectangle ListBoxImpl::GetDesiredRect() {
|
|||||||
// wxListCtrl doesn't have a DoGetBestSize, so instead we kept track of
|
// wxListCtrl doesn't have a DoGetBestSize, so instead we kept track of
|
||||||
// the max size in Append and calculate it here...
|
// the max size in Append and calculate it here...
|
||||||
int maxw = maxStrWidth;
|
int maxw = maxStrWidth;
|
||||||
int maxh = 0;
|
int maxh ;
|
||||||
|
|
||||||
// give it a default if there are no lines, and/or add a bit more
|
// give it a default if there are no lines, and/or add a bit more
|
||||||
if (maxw == 0) maxw = 100;
|
if (maxw == 0) maxw = 100;
|
||||||
|
@@ -409,7 +409,7 @@ void ScintillaWX::AddToPopUp(const char *label, int cmd, bool enabled) {
|
|||||||
if (!label[0])
|
if (!label[0])
|
||||||
((wxMenu*)popup.GetID())->AppendSeparator();
|
((wxMenu*)popup.GetID())->AppendSeparator();
|
||||||
else
|
else
|
||||||
((wxMenu*)popup.GetID())->Append(cmd, stc2wx(label));
|
((wxMenu*)popup.GetID())->Append(cmd, wxGetTranslation(stc2wx(label)));
|
||||||
|
|
||||||
if (!enabled)
|
if (!enabled)
|
||||||
((wxMenu*)popup.GetID())->Enable(cmd, enabled);
|
((wxMenu*)popup.GetID())->Enable(cmd, enabled);
|
||||||
|
Reference in New Issue
Block a user