diff --git a/contrib/include/wx/stc/stc.h b/contrib/include/wx/stc/stc.h index 72044be5af..b4e6266ed7 100644 --- a/contrib/include/wx/stc/stc.h +++ b/contrib/include/wx/stc/stc.h @@ -2832,11 +2832,11 @@ public: // Set the vertical scrollbar to use instead of the ont that's built-in. - void SetVScrollBar(wxScrollBar* bar) { m_vScrollBar = bar; } + void SetVScrollBar(wxScrollBar* bar); // Set the horizontal scrollbar to use instead of the ont that's built-in. - void SetHScrollBar(wxScrollBar* bar) { m_hScrollBar = bar; } + void SetHScrollBar(wxScrollBar* bar); // Can be used to prevent the EVT_CHAR handler from adding the char bool GetLastKeydownProcessed() { return m_lastKeyDownConsumed; } diff --git a/contrib/src/stc/stc.cpp b/contrib/src/stc/stc.cpp index ddcf710d03..845ccb41f9 100644 --- a/contrib/src/stc/stc.cpp +++ b/contrib/src/stc/stc.cpp @@ -190,7 +190,26 @@ long wxStyledTextCtrl::SendMsg(int msg, long wp, long lp) { return m_swx->WndProc(msg, wp, lp); } +//---------------------------------------------------------------------- +// Set the vertical scrollbar to use instead of the ont that's built-in. +void wxStyledTextCtrl::SetVScrollBar(wxScrollBar* bar) { + m_vScrollBar = bar; + if (bar != NULL) { + // ensure that the built-in scrollbar is not visible + SetScrollbar(wxVERTICAL, 0, 0, 0); + } +} + + +// Set the horizontal scrollbar to use instead of the ont that's built-in. +void wxStyledTextCtrl::SetHScrollBar(wxScrollBar* bar) { + m_hScrollBar = bar; + if (bar != NULL) { + // ensure that the built-in scrollbar is not visible + SetScrollbar(wxHORIZONTAL, 0, 0, 0); + } +} //---------------------------------------------------------------------- // BEGIN generated section. The following code is automatically generated @@ -2590,7 +2609,7 @@ bool wxStyledTextCtrl::LoadFile(const wxString& filename) #if wxUSE_UNICODE wxMemoryBuffer buffer(len+1); success = (file.Read(buffer.GetData(), len) == len); - if (success) { + if (success) { ((char*)buffer.GetData())[len] = 0; contents = wxString(buffer, *wxConvCurrent, len); } diff --git a/contrib/src/stc/stc.cpp.in b/contrib/src/stc/stc.cpp.in index 37b1f972e8..91641689aa 100644 --- a/contrib/src/stc/stc.cpp.in +++ b/contrib/src/stc/stc.cpp.in @@ -190,7 +190,26 @@ long wxStyledTextCtrl::SendMsg(int msg, long wp, long lp) { return m_swx->WndProc(msg, wp, lp); } +//---------------------------------------------------------------------- +// Set the vertical scrollbar to use instead of the ont that's built-in. +void wxStyledTextCtrl::SetVScrollBar(wxScrollBar* bar) { + m_vScrollBar = bar; + if (bar != NULL) { + // ensure that the built-in scrollbar is not visible + SetScrollbar(wxVERTICAL, 0, 0, 0); + } +} + + +// Set the horizontal scrollbar to use instead of the ont that's built-in. +void wxStyledTextCtrl::SetHScrollBar(wxScrollBar* bar) { + m_hScrollBar = bar; + if (bar != NULL) { + // ensure that the built-in scrollbar is not visible + SetScrollbar(wxHORIZONTAL, 0, 0, 0); + } +} //---------------------------------------------------------------------- // BEGIN generated section. The following code is automatically generated diff --git a/contrib/src/stc/stc.h.in b/contrib/src/stc/stc.h.in index e48912f1c4..fe3f32e90f 100644 --- a/contrib/src/stc/stc.h.in +++ b/contrib/src/stc/stc.h.in @@ -186,11 +186,11 @@ public: // Set the vertical scrollbar to use instead of the ont that's built-in. - void SetVScrollBar(wxScrollBar* bar) { m_vScrollBar = bar; } + void SetVScrollBar(wxScrollBar* bar); // Set the horizontal scrollbar to use instead of the ont that's built-in. - void SetHScrollBar(wxScrollBar* bar) { m_hScrollBar = bar; } + void SetHScrollBar(wxScrollBar* bar); // Can be used to prevent the EVT_CHAR handler from adding the char bool GetLastKeydownProcessed() { return m_lastKeyDownConsumed; } diff --git a/include/wx/stc/stc.h b/include/wx/stc/stc.h index 72044be5af..b4e6266ed7 100644 --- a/include/wx/stc/stc.h +++ b/include/wx/stc/stc.h @@ -2832,11 +2832,11 @@ public: // Set the vertical scrollbar to use instead of the ont that's built-in. - void SetVScrollBar(wxScrollBar* bar) { m_vScrollBar = bar; } + void SetVScrollBar(wxScrollBar* bar); // Set the horizontal scrollbar to use instead of the ont that's built-in. - void SetHScrollBar(wxScrollBar* bar) { m_hScrollBar = bar; } + void SetHScrollBar(wxScrollBar* bar); // Can be used to prevent the EVT_CHAR handler from adding the char bool GetLastKeydownProcessed() { return m_lastKeyDownConsumed; } diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index ddcf710d03..845ccb41f9 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -190,7 +190,26 @@ long wxStyledTextCtrl::SendMsg(int msg, long wp, long lp) { return m_swx->WndProc(msg, wp, lp); } +//---------------------------------------------------------------------- +// Set the vertical scrollbar to use instead of the ont that's built-in. +void wxStyledTextCtrl::SetVScrollBar(wxScrollBar* bar) { + m_vScrollBar = bar; + if (bar != NULL) { + // ensure that the built-in scrollbar is not visible + SetScrollbar(wxVERTICAL, 0, 0, 0); + } +} + + +// Set the horizontal scrollbar to use instead of the ont that's built-in. +void wxStyledTextCtrl::SetHScrollBar(wxScrollBar* bar) { + m_hScrollBar = bar; + if (bar != NULL) { + // ensure that the built-in scrollbar is not visible + SetScrollbar(wxHORIZONTAL, 0, 0, 0); + } +} //---------------------------------------------------------------------- // BEGIN generated section. The following code is automatically generated @@ -2590,7 +2609,7 @@ bool wxStyledTextCtrl::LoadFile(const wxString& filename) #if wxUSE_UNICODE wxMemoryBuffer buffer(len+1); success = (file.Read(buffer.GetData(), len) == len); - if (success) { + if (success) { ((char*)buffer.GetData())[len] = 0; contents = wxString(buffer, *wxConvCurrent, len); } diff --git a/src/stc/stc.cpp.in b/src/stc/stc.cpp.in index 37b1f972e8..91641689aa 100644 --- a/src/stc/stc.cpp.in +++ b/src/stc/stc.cpp.in @@ -190,7 +190,26 @@ long wxStyledTextCtrl::SendMsg(int msg, long wp, long lp) { return m_swx->WndProc(msg, wp, lp); } +//---------------------------------------------------------------------- +// Set the vertical scrollbar to use instead of the ont that's built-in. +void wxStyledTextCtrl::SetVScrollBar(wxScrollBar* bar) { + m_vScrollBar = bar; + if (bar != NULL) { + // ensure that the built-in scrollbar is not visible + SetScrollbar(wxVERTICAL, 0, 0, 0); + } +} + + +// Set the horizontal scrollbar to use instead of the ont that's built-in. +void wxStyledTextCtrl::SetHScrollBar(wxScrollBar* bar) { + m_hScrollBar = bar; + if (bar != NULL) { + // ensure that the built-in scrollbar is not visible + SetScrollbar(wxHORIZONTAL, 0, 0, 0); + } +} //---------------------------------------------------------------------- // BEGIN generated section. The following code is automatically generated diff --git a/src/stc/stc.h.in b/src/stc/stc.h.in index e48912f1c4..fe3f32e90f 100644 --- a/src/stc/stc.h.in +++ b/src/stc/stc.h.in @@ -186,11 +186,11 @@ public: // Set the vertical scrollbar to use instead of the ont that's built-in. - void SetVScrollBar(wxScrollBar* bar) { m_vScrollBar = bar; } + void SetVScrollBar(wxScrollBar* bar); // Set the horizontal scrollbar to use instead of the ont that's built-in. - void SetHScrollBar(wxScrollBar* bar) { m_hScrollBar = bar; } + void SetHScrollBar(wxScrollBar* bar); // Can be used to prevent the EVT_CHAR handler from adding the char bool GetLastKeydownProcessed() { return m_lastKeyDownConsumed; }