[Wgui-cvs] wgui/tests ConfigEditor.cpp,1.4,1.5 MessagingTest.cpp,1.4,1.5 TestFrame2.cpp,1.6,1.7 Test
Status: Beta
Brought to you by:
greenwire
|
From: Rob W. <gre...@us...> - 2004-06-25 19:38:03
|
Update of /cvsroot/wgui/wgui/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8505/tests Modified Files: ConfigEditor.cpp MessagingTest.cpp TestFrame2.cpp TestView1.cpp TestView1.h TestView2.cpp Log Message: Draw architecture changes. Index: ConfigEditor.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/tests/ConfigEditor.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ConfigEditor.cpp 2 Apr 2004 17:26:16 -0000 1.4 --- ConfigEditor.cpp 25 Jun 2004 19:37:51 -0000 1.5 *************** *** 114,119 **** { m_pConfigStore = new wUtil::CConfigStore(); ! ! new CLabel(ClientToScreen(CRect(5, 10, 80, 25)), this, "Config Level:"); m_pConfigLevel = new CDropDown(CRect(85, 10, 200, 30), this, 0, 15); m_pConfigLevel->AddItem(wGui::SListItem("Global", 0, wGui::COLOR_GREEN)); --- 114,119 ---- { m_pConfigStore = new wUtil::CConfigStore(); ! ! new CLabel(ClientToView(CRect(5, 10, 80, 25)), this, "Config Level:"); m_pConfigLevel = new CDropDown(CRect(85, 10, 200, 30), this, 0, 15); m_pConfigLevel->AddItem(wGui::SListItem("Global", 0, wGui::COLOR_GREEN)); *************** *** 121,142 **** m_pConfigLevel->AddItem(wGui::SListItem("Local")); ! new CLabel(ClientToScreen(CRect(5, 40, 80, 55)), this, "Font Path:"); ! m_pFontPath = new CEditBox(ClientToScreen(CRect(85, 40, 200, 60)), this); ! ! new CLabel(ClientToScreen(CRect(5, 70, 80, 85)), this, "Font Name:"); ! m_pFontName = new CEditBox(ClientToScreen(CRect(85, 70, 200, 90)), this); ! ! new CLabel(ClientToScreen(CRect(5, 100, 80, 115)), this, "Font Size:"); ! m_pFontSize = new CEditBox(ClientToScreen(CRect(85, 100, 200, 120)), this); ! m_pExitButton = new CButton(ClientToScreen(CRect(220, 10, 290, 30)), this, "Exit"); ! m_pLoadButton = new CButton(ClientToScreen(CRect(220, 35, 290, 55)), this, "Load"); ! m_pSaveButton = new CButton(ClientToScreen(CRect(220, 60, 290, 80)), this, "Save"); m_pStatusLabel = new CLabel(CRect(5, 325, 290, 345), this, "Status: Select a configuration level to edit."); ! CMessageServer::Instance().RegisterMessageClient(this, CMessage::CTRL_LCLICK); CMessageServer::Instance().RegisterMessageClient(this, CMessage::CTRL_VALUECHANGE); ! } --- 121,142 ---- m_pConfigLevel->AddItem(wGui::SListItem("Local")); ! new CLabel(ClientToView(CRect(5, 40, 80, 55)), this, "Font Path:"); ! m_pFontPath = new CEditBox(ClientToView(CRect(85, 40, 200, 60)), this); ! new CLabel(ClientToView(CRect(5, 70, 80, 85)), this, "Font Name:"); ! m_pFontName = new CEditBox(ClientToView(CRect(85, 70, 200, 90)), this); ! ! new CLabel(ClientToView(CRect(5, 100, 80, 115)), this, "Font Size:"); ! m_pFontSize = new CEditBox(ClientToView(CRect(85, 100, 200, 120)), this); ! ! m_pExitButton = new CButton(ClientToView(CRect(220, 10, 290, 30)), this, "Exit"); ! m_pLoadButton = new CButton(ClientToView(CRect(220, 35, 290, 55)), this, "Load"); ! m_pSaveButton = new CButton(ClientToView(CRect(220, 60, 290, 80)), this, "Save"); m_pStatusLabel = new CLabel(CRect(5, 325, 290, 345), this, "Status: Select a configuration level to edit."); ! CMessageServer::Instance().RegisterMessageClient(this, CMessage::CTRL_LCLICK); CMessageServer::Instance().RegisterMessageClient(this, CMessage::CTRL_VALUECHANGE); ! } *************** *** 200,204 **** m_pConfigStore->SetStringEntry("FONTPATH", m_pFontPath->GetWindowText()); m_pConfigStore->SetStringEntry("DEFAULTFONTSIZE", m_pFontSize->GetWindowText()); ! if ( m_pConfigLevel->GetWindowText() == "Global" ) { --- 200,204 ---- m_pConfigStore->SetStringEntry("FONTPATH", m_pFontPath->GetWindowText()); m_pConfigStore->SetStringEntry("DEFAULTFONTSIZE", m_pFontSize->GetWindowText()); ! if ( m_pConfigLevel->GetWindowText() == "Global" ) { *************** *** 213,217 **** m_pConfigStore->StoreToFile("wgui.conf"); } ! m_pStatusLabel->SetWindowText("Status: Configuration data saved succesfully!"); bHandled = true; --- 213,217 ---- m_pConfigStore->StoreToFile("wgui.conf"); } ! m_pStatusLabel->SetWindowText("Status: Configuration data saved succesfully!"); bHandled = true; *************** *** 252,256 **** m_pStatusLabel->SetWindowText("Status: Configuration data loaded succesfully!"); } ! else { m_pStatusLabel->SetWindowText("Status: Failed to load configuration data!"); --- 252,256 ---- m_pStatusLabel->SetWindowText("Status: Configuration data loaded succesfully!"); } ! else { m_pStatusLabel->SetWindowText("Status: Failed to load configuration data!"); Index: TestFrame2.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/tests/TestFrame2.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TestFrame2.cpp 25 Jun 2004 13:34:16 -0000 1.6 --- TestFrame2.cpp 25 Jun 2004 19:37:51 -0000 1.7 *************** *** 36,40 **** wGui::CFrame(wGui::CRect(0, 0, 140, 80) + Location, pParent, pFontEngine, "Simple Frame", false) { ! m_pButton = new wGui::CButton(ClientToScreen(wGui::CRect(20, 20, 150, 40)), this, "Test Button"); } --- 36,40 ---- wGui::CFrame(wGui::CRect(0, 0, 140, 80) + Location, pParent, pFontEngine, "Simple Frame", false) { ! m_pButton = new wGui::CButton(ClientToView(wGui::CRect(20, 20, 150, 40)), this, "Test Button"); } Index: MessagingTest.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/tests/MessagingTest.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MessagingTest.cpp 2 Apr 2004 17:26:16 -0000 1.4 --- MessagingTest.cpp 25 Jun 2004 19:37:51 -0000 1.5 *************** *** 103,112 **** SetWindowText(std::string("Messaging Test - wGui version ") + CwgStringResourceHandle(WGRES_VERSION_STRING).String()); ! m_pExitButton = new CButton(ClientToScreen(CRect(320, 20, 380, 40)), this, "Exit"); ! new CLabel(ClientToScreen(CRect(20, 20, 300, 40)), this, "Numbers should increment from left to right."); for (int iLeft = 20; iLeft < 340; iLeft += 60) { ! new CTestLabel(ClientToScreen(CRect(iLeft, 50, iLeft + 40, 70)), this); } --- 103,112 ---- SetWindowText(std::string("Messaging Test - wGui version ") + CwgStringResourceHandle(WGRES_VERSION_STRING).String()); ! m_pExitButton = new CButton(ClientToView(CRect(320, 20, 380, 40)), this, "Exit"); ! new CLabel(ClientToView(CRect(20, 20, 300, 40)), this, "Numbers should increment from left to right."); for (int iLeft = 20; iLeft < 340; iLeft += 60) { ! new CTestLabel(ClientToView(CRect(iLeft, 50, iLeft + 40, 70)), this); } Index: TestView2.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/tests/TestView2.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** TestView2.cpp 2 Apr 2004 17:26:16 -0000 1.8 --- TestView2.cpp 25 Jun 2004 19:37:51 -0000 1.9 *************** *** 31,36 **** SetWindowText(std::string("Test App 2 - wGui version ") + wGui::CwgStringResourceHandle(wGui::WGRES_VERSION_STRING).String()); ! m_pCreateFrameButton = new wGui::CButton(ClientToScreen(wGui::CRect(20, 20, 140, 40)), this, "Create Frame"); ! m_pExitButton = new wGui::CButton(ClientToScreen(wGui::CRect(20, 50, 140, 70)), this, "Exit"); wGui::CMessageServer::Instance().RegisterMessageClient(this, wGui::CMessage::CTRL_LCLICK); --- 31,36 ---- SetWindowText(std::string("Test App 2 - wGui version ") + wGui::CwgStringResourceHandle(wGui::WGRES_VERSION_STRING).String()); ! m_pCreateFrameButton = new wGui::CButton(ClientToView(wGui::CRect(20, 20, 140, 40)), this, "Create Frame"); ! m_pExitButton = new wGui::CButton(ClientToView(wGui::CRect(20, 50, 140, 70)), this, "Exit"); wGui::CMessageServer::Instance().RegisterMessageClient(this, wGui::CMessage::CTRL_LCLICK); Index: TestView1.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/tests/TestView1.cpp,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** TestView1.cpp 25 Jun 2004 13:34:16 -0000 1.67 --- TestView1.cpp 25 Jun 2004 19:37:51 -0000 1.68 *************** *** 37,40 **** --- 37,41 ---- { m_ClientRect.Grow(-1); + Draw(); } *************** *** 45,50 **** wGui::CPainter Painter(m_pSDLSurface); ! Painter.DrawRect(m_WindowRect, false, wGui::COLOR_WHITE); Painter.DrawRect(m_ClientRect, false, wGui::COLOR_RED); } --- 46,55 ---- wGui::CPainter Painter(m_pSDLSurface); ! Painter.DrawRect(m_WindowRect.SizeRect(), false, wGui::COLOR_WHITE); Painter.DrawRect(m_ClientRect, false, wGui::COLOR_RED); + Painter.DrawLine(wGui::CPoint(10, 70), wGui::CPoint(60, 70)); + Painter.DrawLine(wGui::CPoint(20, 30), wGui::CPoint(60, 50), wGui::COLOR_GREEN); + Painter.DrawLine(wGui::CPoint(60, 30), wGui::CPoint(70, 100), wGui::COLOR_RED); + Painter.DrawLine(wGui::CPoint(20, 30), wGui::CPoint(20, 100), wGui::COLOR_BLUE); } *************** *** 77,123 **** GetMenu()->InsertMenuItem(wGui::SMenuItem("Help", 0, pContextSubmenu)); ! m_pButton = new wGui::CButton(ClientToScreen(wGui::CRect(20, 40, 100, 60)), this, "Test Button"); ! m_pButton2 = new wGui::CButton(ClientToScreen(wGui::CRect(130, 40, 210, 60)), this, "Disabled"); m_pButton2->SetButtonState(wGui::CButton::DISABLED); ! m_pBtnPass = new wGui::CButton(ClientToScreen(wGui::CRect(330, 280, 400, 300)), this, "Show Pass"); ! m_pButtonCopyText = new wGui::CButton(ClientToScreen(wGui::CRect(30, 180, 160, 200)), this, "Copy Selected Text"); ! m_pProgressBar = new wGui::CProgress(ClientToScreen(wGui::CRect(20, 70, 210, 90)), this); m_pProgressBar->SetMaxLimit(50); ! m_pBtnQuit = new wGui::CButton(ClientToScreen(wGui::CRect(525, 10, 600, 30)), this, "Quit"); ! m_pBtnWaitCursor = new wGui::CButton(ClientToScreen(wGui::CRect(500, 50, 600, 70)), this, "Wait Cursor"); ! m_pBtnPointerCursor = new wGui::CButton(ClientToScreen(wGui::CRect(500, 80, 600, 100)), this, "Pointer Cursor"); ! m_pBtnDefaultCursor = new wGui::CButton(ClientToScreen(wGui::CRect(500, 110, 600, 130)), this, "Default Cursor"); ! new wGui::CLabel(ClientToScreen(wGui::CRect(20, 95, 90, 110)), this, "Test Label"); ! m_pEditBox = new wGui::CEditBox(ClientToScreen(wGui::CRect(20, 120, 200, 140)), this); m_pEditBox->SetWindowText("Edit This is a really long message to see what happens when there is a long message in an editbox."); ! m_pEditBox2 = new wGui::CEditBox(ClientToScreen(wGui::CRect(20, 150, 200, 170)), this); m_pEditBox2->SetWindowText("Edit2"); ! m_pEditBox3 = new wGui::CEditBox(ClientToScreen(wGui::CRect(20, 210, 200, 230)), this); m_pEditBox3->SetWindowText("ReadOnly Edit Box"); m_pEditBox3->SetReadOnly(true); ! m_pPassBox = new wGui::CEditBox(ClientToScreen(wGui::CRect(225, 280, 325, 300)), this); m_pPassBox->SetUsePasswordMask(true); ! m_pPassShow = new wGui::CEditBox(ClientToScreen(wGui::CRect(225, 305, 325, 325)), this); ! m_pTextBox = new wGui::CTextBox(ClientToScreen(wGui::CRect(225, 330, 470, 450)), this); m_pTextBox->SetWindowText("This is a multiline text box.\nThis should be the second line.\nThe third goes here.\nAnd this is a really long line that should extend beyond the right border.\nNow we follow with a bunch of newlines.\n\n\n\n\n\nThe End."); ! m_pGroupBox = new wGui::CGroupBox(ClientToScreen(wGui::CRect(225, 160, 470, 260)), this, "GroupBox"); ! m_pBigassEditBox = new wGui::CEditBox(ClientToScreen(wGui::CRect(240, 175, 460, 210)), m_pGroupBox, wGui::CApplication::Instance()->GetFontEngine("Vera.ttf", 25)); m_pBigassEditBox->SetWindowText("Big box to test stuff"); new wGui::CToolTip(m_pBigassEditBox, "This is a Big Ass Editbox"); ! m_pTimerButton = new wGui::CButton(ClientToScreen(wGui::CRect(20, 250, 120, 270)), this, "Timer Stopped"); ! m_pTimerLabel = new wGui::CLabel(ClientToScreen(wGui::CRect(140, 250, 210, 270)), this, "Count: 0"); ! m_pCheckBox = new wGui::CCheckBox(ClientToScreen(wGui::CRect(224, 124, 236, 136)), this); ! new wGui::CLabel(ClientToScreen(wGui::CRect(245, 120, 380, 140)), this, "Read-Only EditBox2"); ! m_pVScrollBar = new wGui::CScrollBar( ! wGui::CRect(m_ClientRect.Right() - 12, m_ClientRect.Top(), m_ClientRect.Right(), m_ClientRect.Bottom() - 12), this, wGui::CScrollBar::VERTICAL); ! m_pHScrollBar = new wGui::CScrollBar( ! wGui::CRect(m_ClientRect.Left(), m_ClientRect.Bottom() - 12, m_ClientRect.Right() - 12, m_ClientRect.Bottom()), this, wGui::CScrollBar::HORIZONTAL); ! m_pTestWindow = new CTestWindow(ClientToScreen(wGui::CRect(240, 10, 340, 110)), this); new wGui::CToolTip(m_pTestWindow, "A line drawing test"); try { ! m_pPicture = new wGui::CPicture(ClientToScreen(wGui::CRect(370, 10, 470, 110)), this, "testpic.bmp", true); new wGui::CToolTip(m_pPicture, "A bitmap loading test"); } --- 82,126 ---- GetMenu()->InsertMenuItem(wGui::SMenuItem("Help", 0, pContextSubmenu)); ! m_pButton = new wGui::CButton(wGui::CRect(20, 40, 100, 60), this, "Test Button"); ! m_pButton2 = new wGui::CButton(wGui::CRect(130, 40, 210, 60), this, "Disabled"); m_pButton2->SetButtonState(wGui::CButton::DISABLED); ! m_pBtnPass = new wGui::CButton(wGui::CRect(330, 280, 400, 300), this, "Show Pass"); ! m_pButtonCopyText = new wGui::CButton(wGui::CRect(30, 180, 160, 200), this, "Copy Selected Text"); ! m_pProgressBar = new wGui::CProgress(wGui::CRect(20, 70, 210, 90), this); m_pProgressBar->SetMaxLimit(50); ! m_pBtnQuit = new wGui::CButton(wGui::CRect(525, 10, 600, 30), this, "Quit"); ! m_pBtnWaitCursor = new wGui::CButton(wGui::CRect(500, 50, 600, 70), this, "Wait Cursor"); ! m_pBtnPointerCursor = new wGui::CButton(wGui::CRect(500, 80, 600, 100), this, "Pointer Cursor"); ! m_pBtnDefaultCursor = new wGui::CButton(wGui::CRect(500, 110, 600, 130), this, "Default Cursor"); ! new wGui::CLabel(wGui::CRect(20, 95, 90, 110), this, "Test Label"); ! m_pEditBox = new wGui::CEditBox(wGui::CRect(20, 120, 200, 140), this); m_pEditBox->SetWindowText("Edit This is a really long message to see what happens when there is a long message in an editbox."); ! m_pEditBox2 = new wGui::CEditBox(wGui::CRect(20, 150, 200, 170), this); m_pEditBox2->SetWindowText("Edit2"); ! m_pEditBox3 = new wGui::CEditBox(wGui::CRect(20, 210, 200, 230), this); m_pEditBox3->SetWindowText("ReadOnly Edit Box"); m_pEditBox3->SetReadOnly(true); ! m_pPassBox = new wGui::CEditBox(wGui::CRect(225, 280, 325, 300), this); m_pPassBox->SetUsePasswordMask(true); ! m_pPassShow = new wGui::CEditBox(wGui::CRect(225, 305, 325, 325), this); ! m_pTextBox = new wGui::CTextBox(wGui::CRect(225, 330, 470, 450), this); m_pTextBox->SetWindowText("This is a multiline text box.\nThis should be the second line.\nThe third goes here.\nAnd this is a really long line that should extend beyond the right border.\nNow we follow with a bunch of newlines.\n\n\n\n\n\nThe End."); ! m_pGroupBox = new wGui::CGroupBox(wGui::CRect(225, 160, 470, 260), this, "GroupBox"); ! m_pBigassEditBox = new wGui::CEditBox(wGui::CRect(15, 15, 220, 65), m_pGroupBox, wGui::CApplication::Instance()->GetFontEngine("Vera.ttf", 25)); m_pBigassEditBox->SetWindowText("Big box to test stuff"); new wGui::CToolTip(m_pBigassEditBox, "This is a Big Ass Editbox"); ! m_pTimerButton = new wGui::CButton(wGui::CRect(20, 250, 120, 270), this, "Timer Stopped"); ! m_pTimerLabel = new wGui::CLabel(wGui::CRect(140, 250, 210, 270), this, "Count: 0"); ! m_pCheckBox = new wGui::CCheckBox(wGui::CRect(224, 124, 236, 136), this); ! new wGui::CLabel(wGui::CRect(245, 120, 380, 140), this, "Read-Only EditBox2"); ! m_pVScrollBar = new wGui::CScrollBar(wGui::CRect(m_ClientRect.Width() - 12, 0, m_ClientRect.Width(), m_ClientRect.Height() - 12), this, wGui::CScrollBar::VERTICAL); ! m_pHScrollBar = new wGui::CScrollBar(wGui::CRect(0, m_ClientRect.Height() - 12, m_ClientRect.Width() - 12, m_ClientRect.Height()), this, wGui::CScrollBar::HORIZONTAL); ! m_pTestWindow = new CTestWindow(wGui::CRect(240, 10, 340, 110), this); new wGui::CToolTip(m_pTestWindow, "A line drawing test"); try { ! m_pPicture = new wGui::CPicture(wGui::CRect(370, 10, 470, 110), this, "testpic.bmp", true); new wGui::CToolTip(m_pPicture, "A bitmap loading test"); } *************** *** 128,132 **** } ! m_pToolBar = new wGui::CToolBar(ClientToScreen(wGui::CRect(0, 0, 170, 24)), this); wGui::CButton* pButton = new wGui::CPictureButton(wGui::CRect(0, 0, 20, 20), this, wGui::CwgBitmapResourceHandle(wGui::WGRES_UP_ARROW_BITMAP)); new wGui::CToolTip(pButton, "Clear Edit Box 1"); --- 131,135 ---- } ! m_pToolBar = new wGui::CToolBar(wGui::CRect(0, 0, 170, 24), this); wGui::CButton* pButton = new wGui::CPictureButton(wGui::CRect(0, 0, 20, 20), this, wGui::CwgBitmapResourceHandle(wGui::WGRES_UP_ARROW_BITMAP)); new wGui::CToolTip(pButton, "Clear Edit Box 1"); *************** *** 172,181 **** pContextSubmenu3->InsertMenuItem(wGui::SMenuItem("Empty submenu", 0, pContextSubmenu4)); ! m_pDropDown = new wGui::CDropDown(ClientToScreen(wGui::CRect(240, 230, 430, 248)), m_pGroupBox); m_pDropDown->AddItem(wGui::SListItem("Item1")); m_pDropDown->AddItem(wGui::SListItem("Item2", 0, wGui::COLOR_BLUE)); m_pDropDown->AddItem(wGui::SListItem("Item3", 0, wGui::COLOR_RED)); m_pDropDown->AddItem(wGui::SListItem("Item4")); ! m_pListBox = new wGui::CListBox(ClientToScreen(wGui::CRect(20, 290, 200, 360)), this); m_pListBox->AddItem(wGui::SListItem("Item1")); m_pListBox->AddItem(wGui::SListItem("Item2", 0, wGui::COLOR_BLUE)); --- 175,184 ---- pContextSubmenu3->InsertMenuItem(wGui::SMenuItem("Empty submenu", 0, pContextSubmenu4)); ! m_pDropDown = new wGui::CDropDown(wGui::CRect(15, 70, 205, 88), m_pGroupBox); m_pDropDown->AddItem(wGui::SListItem("Item1")); m_pDropDown->AddItem(wGui::SListItem("Item2", 0, wGui::COLOR_BLUE)); m_pDropDown->AddItem(wGui::SListItem("Item3", 0, wGui::COLOR_RED)); m_pDropDown->AddItem(wGui::SListItem("Item4")); ! m_pListBox = new wGui::CListBox(wGui::CRect(20, 290, 200, 360), this); m_pListBox->AddItem(wGui::SListItem("Item1")); m_pListBox->AddItem(wGui::SListItem("Item2", 0, wGui::COLOR_BLUE)); *************** *** 194,215 **** - void CTestView::Draw(void) const - { - CView::Draw(); - - wGui::CPainter Painter(m_pSDLSurface); - Painter.DrawLine(ClientToScreen(wGui::CPoint(250, 80)), ClientToScreen(wGui::CPoint(320, 80))); - Painter.DrawLine(ClientToScreen(wGui::CPoint(260, 40)), ClientToScreen(wGui::CPoint(320, 60)), wGui::COLOR_GREEN); - Painter.DrawLine(ClientToScreen(wGui::CPoint(320, 40)), ClientToScreen(wGui::CPoint(310, 110)), wGui::COLOR_RED); - Painter.DrawLine(ClientToScreen(wGui::CPoint(260, 40)), ClientToScreen(wGui::CPoint(260, 110)), wGui::COLOR_BLUE); - } - - bool CTestView::OnMouseButtonDown(wGui::CPoint Point, unsigned int Button) { bool bResult = false; ! if (! CView::OnMouseButtonDown(Point, Button) && m_bVisible && (m_WindowRect.HitTest(Point) == wGui::CRect::RELPOS_INSIDE) && ! (Button == wGui::CMouseMessage::RIGHT)) { m_pContextMenu->Show(Point); --- 197,206 ---- bool CTestView::OnMouseButtonDown(wGui::CPoint Point, unsigned int Button) { bool bResult = false; ! if (! CView::OnMouseButtonDown(Point, Button) && m_bVisible && (Button == wGui::CMouseMessage::RIGHT) && ! (m_WindowRect.SizeRect().HitTest(ViewToWindow(Point)) == wGui::CRect::RELPOS_INSIDE)) { m_pContextMenu->Show(Point); Index: TestView1.h =================================================================== RCS file: /cvsroot/wgui/wgui/tests/TestView1.h,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** TestView1.h 2 Apr 2004 17:26:16 -0000 1.24 --- TestView1.h 25 Jun 2004 19:37:51 -0000 1.25 *************** *** 43,47 **** public: CTestView(void); - virtual void Draw(void) const; virtual bool OnMouseButtonDown(wGui::CPoint Point, unsigned int Button); virtual bool HandleMessage(wGui::CMessage* pMessage); --- 43,46 ---- |