[Wgui-cvs] wgui/tests Notepad.cpp,1.3,1.4 TestFrame2.cpp,1.5,1.6 TestView1.cpp,1.66,1.67
Status: Beta
Brought to you by:
greenwire
|
From: Rob W. <gre...@us...> - 2004-06-25 13:34:28
|
Update of /cvsroot/wgui/wgui/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21468/tests Modified Files: Notepad.cpp TestFrame2.cpp TestView1.cpp Log Message: Draw architecture changes. Index: TestView1.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/tests/TestView1.cpp,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** TestView1.cpp 4 May 2004 16:11:13 -0000 1.66 --- TestView1.cpp 25 Jun 2004 13:34:16 -0000 1.67 *************** *** 46,50 **** wGui::CPainter Painter(m_pSDLSurface); Painter.DrawRect(m_WindowRect, false, wGui::COLOR_WHITE); ! Painter.DrawRect(GetClientRect(), false, wGui::COLOR_RED); } --- 46,50 ---- wGui::CPainter Painter(m_pSDLSurface); Painter.DrawRect(m_WindowRect, false, wGui::COLOR_WHITE); ! Painter.DrawRect(m_ClientRect, false, wGui::COLOR_RED); } *************** *** 364,372 **** { CView::HandleMessage(pMessage); ! wGui::CRect NewRect = GetClientRect(); NewRect.SetLeft(NewRect.Right() - 12); NewRect.SetBottom(NewRect.Bottom() - 12); m_pVScrollBar->SetWindowRect(NewRect); ! NewRect = GetClientRect(); NewRect.SetTop(NewRect.Bottom() - 12); NewRect.SetRight(NewRect.Right() - 12); --- 364,372 ---- { CView::HandleMessage(pMessage); ! wGui::CRect NewRect = m_ClientRect; NewRect.SetLeft(NewRect.Right() - 12); NewRect.SetBottom(NewRect.Bottom() - 12); m_pVScrollBar->SetWindowRect(NewRect); ! NewRect = m_ClientRect; NewRect.SetTop(NewRect.Bottom() - 12); NewRect.SetRight(NewRect.Right() - 12); Index: TestFrame2.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/tests/TestFrame2.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TestFrame2.cpp 2 Apr 2004 17:26:16 -0000 1.5 --- TestFrame2.cpp 25 Jun 2004 13:34:16 -0000 1.6 *************** *** 53,57 **** wGui::CPainter Painter(m_pSDLSurface); Painter.DrawRect(m_WindowRect, false, wGui::COLOR_WHITE); ! Painter.DrawRect(GetClientRect(), false, wGui::COLOR_RED); } --- 53,57 ---- wGui::CPainter Painter(m_pSDLSurface); Painter.DrawRect(m_WindowRect, false, wGui::COLOR_WHITE); ! Painter.DrawRect(m_ClientRect, false, wGui::COLOR_RED); } Index: Notepad.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/tests/Notepad.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Notepad.cpp 13 Apr 2004 19:15:26 -0000 1.3 --- Notepad.cpp 25 Jun 2004 13:34:16 -0000 1.4 *************** *** 105,109 **** GetMenu()->InsertMenuItem(SMenuItem("Format", 0, pContextSubmenu)); ! m_pTextBox = new CTextBox(GetClientRect(), this); m_pTextBox->SetScrollBarVisibility(CScrollBar::VERTICAL, CTextBox::SCROLLBAR_VIS_ALWAYS); m_pTextBox->SetWindowText("This is a sample notepad application.\nLoad and Save doesn't work here yet, since the UI for that requires some sort of dialog type thing, which we don't really have yet (see the CFrame class)."); --- 105,109 ---- GetMenu()->InsertMenuItem(SMenuItem("Format", 0, pContextSubmenu)); ! m_pTextBox = new CTextBox(m_ClientRect, this); m_pTextBox->SetScrollBarVisibility(CScrollBar::VERTICAL, CTextBox::SCROLLBAR_VIS_ALWAYS); m_pTextBox->SetWindowText("This is a sample notepad application.\nLoad and Save doesn't work here yet, since the UI for that requires some sort of dialog type thing, which we don't really have yet (see the CFrame class)."); *************** *** 134,138 **** case CUT_TEXT: App()->m_sClipboard = m_pTextBox->GetSelText(); ! m_pTextBox->SetWindowText(m_pTextBox->GetWindowText().substr(0, m_pTextBox->GetSelectionStart()) + m_pTextBox->GetWindowText().substr(m_pTextBox->GetSelectionStart() + m_pTextBox->GetSelectionLength())); break; --- 134,138 ---- case CUT_TEXT: App()->m_sClipboard = m_pTextBox->GetSelText(); ! m_pTextBox->SetWindowText(m_pTextBox->GetWindowText().substr(0, m_pTextBox->GetSelectionStart()) + m_pTextBox->GetWindowText().substr(m_pTextBox->GetSelectionStart() + m_pTextBox->GetSelectionLength())); break; *************** *** 157,162 **** { CView::HandleMessage(pMessage); ! m_pTextBox->SetWindowRect(GetClientRect()); ! StartDrawProc(); } break; --- 157,162 ---- { CView::HandleMessage(pMessage); ! m_pTextBox->SetWindowRect(m_ClientRect); ! Draw(); } break; |