dc.SetPen( *wxRED_PEN );
dc.SetBrush( *wxTRANSPARENT_BRUSH );
dc.DrawRectangle( 0,0,92,97 );
dc.SetPen( *wxRED_PEN );
dc.SetBrush( *wxTRANSPARENT_BRUSH );
dc.DrawRectangle( 0,0,92,97 );
void OnMouseLeftDown(wxMouseEvent& event);
void OnMouseLeftUp(wxMouseEvent& event);
void OnMouseMove(wxMouseEvent& event);
void OnMouseLeftDown(wxMouseEvent& event);
void OnMouseLeftUp(wxMouseEvent& event);
void OnMouseMove(wxMouseEvent& event);
- : wxScrolledWindow( parent, -1, wxDefaultPosition, wxDefaultSize,
+ : wxScrolledWindow( parent, -1, wxDefaultPosition, wxDefaultSize,
m_button->SetSizeHints( SMALL_BUTTON.GetWidth(), SMALL_BUTTON.GetHeight() );
innersizer->Add( m_button,
0,
m_button->SetSizeHints( SMALL_BUTTON.GetWidth(), SMALL_BUTTON.GetHeight() );
innersizer->Add( m_button,
0,
20 );
innersizer->Add( new wxStaticText( this, wxID_ANY, _T("This is just") ),
20 );
innersizer->Add( new wxStaticText( this, wxID_ANY, _T("This is just") ),
CalcScrolledPosition(0, y, NULL, &yPhys);
dc.DrawText(wxString::Format(_T("Line %u (logical %d, physical %d)"),
CalcScrolledPosition(0, y, NULL, &yPhys);
dc.DrawText(wxString::Format(_T("Line %u (logical %d, physical %d)"),
- line, y, yPhys), 0, y);
+ unsigned(line), y, yPhys), 0, y);
CalcScrolledPosition(0, y, NULL, &yPhys);
dc.DrawText(wxString::Format(_T("Line %u (logical %d, physical %d)"),
CalcScrolledPosition(0, y, NULL, &yPhys);
dc.DrawText(wxString::Format(_T("Line %u (logical %d, physical %d)"),
- line, y, yPhys), 0, y);
+ unsigned(line), y, yPhys), 0, y);
EVT_LEFT_DOWN(MyAutoTimedScrollingWindow::OnMouseLeftDown)
EVT_LEFT_UP(MyAutoTimedScrollingWindow::OnMouseLeftUp)
EVT_MOTION(MyAutoTimedScrollingWindow::OnMouseMove)
EVT_LEFT_DOWN(MyAutoTimedScrollingWindow::OnMouseLeftDown)
EVT_LEFT_UP(MyAutoTimedScrollingWindow::OnMouseLeftUp)
EVT_MOTION(MyAutoTimedScrollingWindow::OnMouseMove)
for (int chY = updRectInGChars.y
; chY <= updRectInGChars.y + updRectInGChars.height; ++chY) {
// 3. for each character in the row
for (int chY = updRectInGChars.y
; chY <= updRectInGChars.y + updRectInGChars.height; ++chY) {
// 3. for each character in the row
- dc.DrawText(str.Mid(charIndex,1),
- charPos.x, charPos.y);
+ if (isFirstX)
+ {
+ str_i = str.begin() + charIndex;
+ isFirstX = false;
+ }
+ dc.DrawText(*str_i, charPos.x, charPos.y);
+ ++str_i;
void MyAutoTimedScrollingWindow::OnScroll(wxScrollWinEvent& event)
{
// need to move the cursor when autoscrolling
void MyAutoTimedScrollingWindow::OnScroll(wxScrollWinEvent& event)
{
// need to move the cursor when autoscrolling