[Wgui-cvs] wgui/src wg_button.cpp,1.42,1.43 wg_checkbox.cpp,1.26,1.27 wg_editbox.cpp,1.97,1.98 wg_fr
Status: Beta
Brought to you by:
greenwire
Update of /cvsroot/wgui/wgui/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19172/src Modified Files: wg_button.cpp wg_checkbox.cpp wg_editbox.cpp wg_frame.cpp wg_listbox.cpp wg_menu.cpp wg_scrollbar.cpp wg_textbox.cpp Log Message: Fixed OnMouseButtonDown and OnMouseButtonUp Index: wg_editbox.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_editbox.cpp,v retrieving revision 1.97 retrieving revision 1.98 diff -C2 -d -r1.97 -r1.98 *** wg_editbox.cpp 22 Sep 2005 20:51:48 -0000 1.97 --- wg_editbox.cpp 26 Sep 2005 18:37:48 -0000 1.98 *************** *** 300,307 **** bool CEditBox::OnMouseButtonDown(CPoint Point, unsigned int Button) { ! bool bResult = false; CPoint WindowPoint(ViewToWindow(Point)); ! if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && (Button == CMouseMessage::LEFT) && !m_bReadOnly && (m_ClientRect.HitTest(WindowPoint) == CRect::RELPOS_INSIDE)) { --- 300,307 ---- bool CEditBox::OnMouseButtonDown(CPoint Point, unsigned int Button) { ! bool bResult = CWindow::OnMouseButtonDown(Point, Button); CPoint WindowPoint(ViewToWindow(Point)); ! if (!bResult && m_bVisible && (Button == CMouseMessage::LEFT) && !m_bReadOnly && (m_ClientRect.HitTest(WindowPoint) == CRect::RELPOS_INSIDE)) { Index: wg_checkbox.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_checkbox.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** wg_checkbox.cpp 22 Sep 2005 20:51:48 -0000 1.26 --- wg_checkbox.cpp 26 Sep 2005 18:37:48 -0000 1.27 *************** *** 87,93 **** bool CCheckBox::OnMouseButtonDown(CPoint Point, unsigned int Button) { ! bool bResult = false; ! if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && (m_eCheckBoxState != DISABLED) && (m_ClientRect.HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { --- 87,93 ---- bool CCheckBox::OnMouseButtonDown(CPoint Point, unsigned int Button) { ! bool bResult = CWindow::OnMouseButtonDown(Point, Button); ! if (!bResult && m_bVisible && (m_eCheckBoxState != DISABLED) && (m_ClientRect.HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { *************** *** 102,108 **** bool CCheckBox::OnMouseButtonUp(CPoint Point, unsigned int Button) { ! bool bResult = false; ! if (! CWindow::OnMouseButtonUp(Point, Button) && m_bVisible && (m_eCheckBoxState != DISABLED) && (m_MouseButton == Button) && (m_ClientRect.HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { --- 102,108 ---- bool CCheckBox::OnMouseButtonUp(CPoint Point, unsigned int Button) { ! bool bResult = CWindow::OnMouseButtonUp(Point, Button); ! if (!bResult && m_bVisible && (m_eCheckBoxState != DISABLED) && (m_MouseButton == Button) && (m_ClientRect.HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { Index: wg_button.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_button.cpp,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** wg_button.cpp 22 Sep 2005 20:51:48 -0000 1.42 --- wg_button.cpp 26 Sep 2005 18:37:48 -0000 1.43 *************** *** 125,132 **** bool CButton::OnMouseButtonDown(CPoint Point, unsigned int Button) { ! bool bResult = false; ! if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && (m_eButtonState == UP) && ! (m_ClientRect.HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { SetButtonState(DOWN); --- 125,131 ---- bool CButton::OnMouseButtonDown(CPoint Point, unsigned int Button) { ! bool bResult = CWindow::OnMouseButtonDown(Point, Button); ! if (!bResult && m_bVisible && (m_eButtonState == UP) && (m_ClientRect.HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { SetButtonState(DOWN); *************** *** 141,147 **** bool CButton::OnMouseButtonUp(CPoint Point, unsigned int Button) { ! bool bResult = false; ! if (! CWindow::OnMouseButtonUp(Point, Button) && m_bVisible && (m_eButtonState == DOWN) && (m_MouseButton == Button) && (m_ClientRect.HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { --- 140,146 ---- bool CButton::OnMouseButtonUp(CPoint Point, unsigned int Button) { ! bool bResult = CWindow::OnMouseButtonUp(Point, Button); ! if (!bResult && m_bVisible && (m_eButtonState == DOWN) && (m_MouseButton == Button) && (m_ClientRect.HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { Index: wg_scrollbar.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_scrollbar.cpp,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** wg_scrollbar.cpp 22 Sep 2005 20:51:48 -0000 1.46 --- wg_scrollbar.cpp 26 Sep 2005 18:37:48 -0000 1.47 *************** *** 147,154 **** bool CScrollBar::OnMouseButtonDown(CPoint Point, unsigned int Button) { ! bool bResult = false; ! if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && ! m_ClientRect.HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE) { if (Button == CMouseMessage::WHEELUP) --- 147,153 ---- bool CScrollBar::OnMouseButtonDown(CPoint Point, unsigned int Button) { ! bool bResult = CWindow::OnMouseButtonDown(Point, Button); ! if (!bResult && m_bVisible && m_ClientRect.HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE) { if (Button == CMouseMessage::WHEELUP) Index: wg_menu.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_menu.cpp,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** wg_menu.cpp 22 Sep 2005 20:51:48 -0000 1.57 --- wg_menu.cpp 26 Sep 2005 18:37:48 -0000 1.58 *************** *** 260,266 **** bool CMenu::OnMouseButtonDown(CPoint Point, unsigned int Button) { ! bool bResult = false; ! if (! CMenuBase::OnMouseButtonDown(Point, Button) && m_bVisible && (Button == CMouseMessage::LEFT) && (m_WindowRect.SizeRect().HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { --- 260,266 ---- bool CMenu::OnMouseButtonDown(CPoint Point, unsigned int Button) { ! bool bResult = CMenuBase::OnMouseButtonDown(Point, Button); ! if (!bResult && m_bVisible && (Button == CMouseMessage::LEFT) && (m_WindowRect.SizeRect().HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { *************** *** 589,597 **** bool CPopupMenu::OnMouseButtonDown(CPoint Point, unsigned int Button) { ! bool bResult = false; CPoint WindowPoint(ViewToWindow(Point)); ! if (! CMenuBase::OnMouseButtonDown(Point, Button) && m_bVisible && ! (m_WindowRect.SizeRect().HitTest(WindowPoint) == CRect::RELPOS_INSIDE)) { UpdateCachedRects(); --- 589,596 ---- bool CPopupMenu::OnMouseButtonDown(CPoint Point, unsigned int Button) { ! bool bResult = CMenuBase::OnMouseButtonDown(Point, Button); CPoint WindowPoint(ViewToWindow(Point)); ! if (!bResult && m_bVisible && (m_WindowRect.SizeRect().HitTest(WindowPoint) == CRect::RELPOS_INSIDE)) { UpdateCachedRects(); Index: wg_listbox.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_listbox.cpp,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** wg_listbox.cpp 22 Sep 2005 20:51:48 -0000 1.48 --- wg_listbox.cpp 26 Sep 2005 18:37:48 -0000 1.49 *************** *** 198,204 **** bool CListBox::OnMouseButtonDown(CPoint Point, unsigned int Button) { - bool bResult = false; CPoint WindowPoint(ViewToWindow(Point)); ! if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && (Button == CMouseMessage::LEFT) && (m_WindowRect.SizeRect().HitTest(WindowPoint) == CRect::RELPOS_INSIDE)) { --- 198,204 ---- bool CListBox::OnMouseButtonDown(CPoint Point, unsigned int Button) { CPoint WindowPoint(ViewToWindow(Point)); ! bool bResult = CWindow::OnMouseButtonDown(Point, Button); ! if (!bResult && m_bVisible && (Button == CMouseMessage::LEFT) && (m_WindowRect.SizeRect().HitTest(WindowPoint) == CRect::RELPOS_INSIDE)) { *************** *** 223,231 **** bool CListBox::OnMouseButtonUp(CPoint Point, unsigned int Button) { ! bool bResult = false; CPoint WindowPoint(ViewToWindow(Point)); ! if (! CWindow::OnMouseButtonUp(Point, Button) && m_bVisible && (Button == CMouseMessage::LEFT) && ! (m_ClientRect.HitTest(WindowPoint) == CRect::RELPOS_INSIDE)) { if (m_iFocusedItem == stdex::safe_static_cast<int>((WindowPoint.YPos() - m_ClientRect.Top()) / m_iItemHeight + m_pVScrollbar->GetValue())) --- 223,230 ---- bool CListBox::OnMouseButtonUp(CPoint Point, unsigned int Button) { ! bool bResult = CWindow::OnMouseButtonUp(Point, Button); CPoint WindowPoint(ViewToWindow(Point)); ! if (!bResult && m_bVisible && (Button == CMouseMessage::LEFT) && (m_ClientRect.HitTest(WindowPoint) == CRect::RELPOS_INSIDE)) { if (m_iFocusedItem == stdex::safe_static_cast<int>((WindowPoint.YPos() - m_ClientRect.Top()) / m_iItemHeight + m_pVScrollbar->GetValue())) Index: wg_textbox.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_textbox.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** wg_textbox.cpp 22 Sep 2005 20:51:48 -0000 1.33 --- wg_textbox.cpp 26 Sep 2005 18:37:48 -0000 1.34 *************** *** 288,295 **** bool CTextBox::OnMouseButtonDown(CPoint Point, unsigned int Button) // virtual { ! bool bResult = false; CPoint WindowPoint(ViewToWindow(Point)); ! if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && (m_ClientRect.HitTest(WindowPoint) == CRect::RELPOS_INSIDE)) { if (Button == CMouseMessage::LEFT && !m_bReadOnly) --- 288,295 ---- bool CTextBox::OnMouseButtonDown(CPoint Point, unsigned int Button) // virtual { ! bool bResult = CWindow::OnMouseButtonDown(Point, Button); CPoint WindowPoint(ViewToWindow(Point)); ! if (!bResult && m_bVisible && (m_ClientRect.HitTest(WindowPoint) == CRect::RELPOS_INSIDE)) { if (Button == CMouseMessage::LEFT && !m_bReadOnly) Index: wg_frame.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_frame.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** wg_frame.cpp 22 Sep 2005 20:51:48 -0000 1.30 --- wg_frame.cpp 26 Sep 2005 18:37:48 -0000 1.31 *************** *** 185,192 **** bool CFrame::OnMouseButtonDown(CPoint Point, unsigned int Button) // virtual { ! bool bResult = false; ! if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && ! (m_WindowRect.SizeRect().HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { if (m_TitleBarRect.HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE) --- 185,191 ---- bool CFrame::OnMouseButtonDown(CPoint Point, unsigned int Button) // virtual { ! bool bResult = CWindow::OnMouseButtonDown(Point, Button); ! if (!bResult && m_bVisible && (m_WindowRect.SizeRect().HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { if (m_TitleBarRect.HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE) |