[Wgui-cvs] wgui/src wg_button.cpp,1.34,1.35 wg_checkbox.cpp,1.20,1.21 wg_editbox.cpp,1.86,1.87 wg_fr
Status: Beta
Brought to you by:
greenwire
Update of /cvsroot/wgui/wgui/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11393/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_window.cpp Log Message: Draw architecture changes. Index: wg_button.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_button.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** wg_button.cpp 28 Jun 2004 23:03:35 -0000 1.34 --- wg_button.cpp 29 Jun 2004 18:03:40 -0000 1.35 *************** *** 121,128 **** bool bResult = false; ! // wUtil::Trace(std::string("[Button - ") + m_sWindowText + "] Mouse Click at: " + stdex::itoa(ViewToWindow(Point).XPos()) + ", " + stdex::itoa(ViewToWindow(Point).YPos())); if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && (m_eButtonState == UP) && ! (m_WindowRect.SizeRect().HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { SetButtonState(DOWN); --- 121,128 ---- bool bResult = false; ! // wUtil::Trace(std::string("[Button - ") + m_sWindowText + "] Mouse Click at: " + stdex::itoa(ViewToClient(Point).XPos()) + ", " + stdex::itoa(ViewToClient(Point).YPos())); if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && (m_eButtonState == UP) && ! (m_WindowRect.SizeRect().HitTest(ViewToClient(Point)) == CRect::RELPOS_INSIDE)) { SetButtonState(DOWN); *************** *** 140,144 **** if (! CWindow::OnMouseButtonUp(Point, Button) && m_bVisible && (m_eButtonState == DOWN) && ! (m_MouseButton == Button) && (m_WindowRect.SizeRect().HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { SetButtonState(UP); --- 140,144 ---- if (! CWindow::OnMouseButtonUp(Point, Button) && m_bVisible && (m_eButtonState == DOWN) && ! (m_MouseButton == Button) && (m_WindowRect.SizeRect().HitTest(ViewToClient(Point)) == CRect::RELPOS_INSIDE)) { SetButtonState(UP); Index: wg_scrollbar.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_scrollbar.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** wg_scrollbar.cpp 25 Jun 2004 19:37:51 -0000 1.34 --- wg_scrollbar.cpp 29 Jun 2004 18:03:40 -0000 1.35 *************** *** 153,157 **** if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && ! m_WindowRect.SizeRect().HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE) { if (Button == CMouseMessage::WHEELUP) --- 153,157 ---- if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && ! m_WindowRect.SizeRect().HitTest(ViewToClient(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.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** wg_menu.cpp 25 Jun 2004 19:37:51 -0000 1.47 --- wg_menu.cpp 29 Jun 2004 18:03:40 -0000 1.48 *************** *** 258,262 **** if (! CMenuBase::OnMouseButtonDown(Point, Button) && m_bVisible && (Button == CMouseMessage::LEFT) && ! (m_WindowRect.SizeRect().HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { UpdateCachedRects(); --- 258,262 ---- if (! CMenuBase::OnMouseButtonDown(Point, Button) && m_bVisible && (Button == CMouseMessage::LEFT) && ! (m_WindowRect.SizeRect().HitTest(ViewToClient(Point)) == CRect::RELPOS_INSIDE)) { UpdateCachedRects(); *************** *** 478,482 **** bool CPopupMenu::IsInsideChild(const CPoint& Point) const { ! if (m_WindowRect.SizeRect().HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE) { return true; --- 478,482 ---- bool CPopupMenu::IsInsideChild(const CPoint& Point) const { ! if (m_WindowRect.SizeRect().HitTest(ViewToClient(Point)) == CRect::RELPOS_INSIDE) { return true; *************** *** 541,545 **** if (! CMenuBase::OnMouseButtonDown(Point, Button) && m_bVisible && ! (m_WindowRect.SizeRect().HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { UpdateCachedRects(); --- 541,545 ---- if (! CMenuBase::OnMouseButtonDown(Point, Button) && m_bVisible && ! (m_WindowRect.SizeRect().HitTest(ViewToClient(Point)) == CRect::RELPOS_INSIDE)) { UpdateCachedRects(); Index: wg_editbox.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_editbox.cpp,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** wg_editbox.cpp 25 Jun 2004 19:37:51 -0000 1.86 --- wg_editbox.cpp 29 Jun 2004 18:03:40 -0000 1.87 *************** *** 259,263 **** if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && (Button == CMouseMessage::LEFT) && !m_bReadOnly && ! (m_WindowRect.SizeRect().HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { bool fSkipCursorPositioning = false; --- 259,263 ---- if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && (Button == CMouseMessage::LEFT) && !m_bReadOnly && ! (m_WindowRect.SizeRect().HitTest(ViewToClient(Point)) == CRect::RELPOS_INSIDE)) { bool fSkipCursorPositioning = false; Index: wg_checkbox.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_checkbox.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** wg_checkbox.cpp 25 Jun 2004 19:37:51 -0000 1.20 --- wg_checkbox.cpp 29 Jun 2004 18:03:40 -0000 1.21 *************** *** 87,91 **** if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && (m_eCheckBoxState != DISABLED) && ! (m_WindowRect.SizeRect().HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { m_MouseButton = Button; --- 87,91 ---- if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && (m_eCheckBoxState != DISABLED) && ! (m_WindowRect.SizeRect().HitTest(ViewToClient(Point)) == CRect::RELPOS_INSIDE)) { m_MouseButton = Button; *************** *** 102,106 **** if (! CWindow::OnMouseButtonUp(Point, Button) && m_bVisible && (m_eCheckBoxState != DISABLED) && (m_MouseButton == Button) && ! (m_WindowRect.SizeRect().HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { CMessage::EMessageType MessageType = CMessage::UNKNOWN; --- 102,106 ---- if (! CWindow::OnMouseButtonUp(Point, Button) && m_bVisible && (m_eCheckBoxState != DISABLED) && (m_MouseButton == Button) && ! (m_WindowRect.SizeRect().HitTest(ViewToClient(Point)) == CRect::RELPOS_INSIDE)) { CMessage::EMessageType MessageType = CMessage::UNKNOWN; Index: wg_window.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_window.cpp,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** wg_window.cpp 25 Jun 2004 19:37:51 -0000 1.43 --- wg_window.cpp 29 Jun 2004 18:03:41 -0000 1.44 *************** *** 192,201 **** ! CRect CWindow::ViewToWindow(const CRect& Rect) const { ! CRect WindowRect(Rect - m_WindowRect.TopLeft()); if (m_pParentWindow) { ! WindowRect = m_pParentWindow->ViewToWindow(WindowRect); } return WindowRect; --- 192,201 ---- ! CRect CWindow::ViewToClient(const CRect& Rect) const { ! CRect WindowRect(Rect - m_WindowRect.TopLeft() - m_ClientRect.TopLeft()); if (m_pParentWindow) { ! WindowRect = m_pParentWindow->ViewToClient(WindowRect); } return WindowRect; *************** *** 203,212 **** ! CPoint CWindow::ViewToWindow(const CPoint& Point) const { ! CPoint WindowPoint(Point - m_WindowRect.TopLeft()); if (m_pParentWindow) { ! WindowPoint = m_pParentWindow->ViewToWindow(WindowPoint); } return WindowPoint; --- 203,212 ---- ! CPoint CWindow::ViewToClient(const CPoint& Point) const { ! CPoint WindowPoint(Point - m_WindowRect.TopLeft() - m_ClientRect.TopLeft()); if (m_pParentWindow) { ! WindowPoint = m_pParentWindow->ViewToClient(WindowPoint); } return WindowPoint; *************** *** 263,267 **** bool bResult = false; ! if (m_bVisible && (m_WindowRect.SizeRect().HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { for (std::list<CWindow*>::reverse_iterator iter = m_ChildWindows.rbegin(); iter != m_ChildWindows.rend(); ++iter) --- 263,267 ---- bool bResult = false; ! if (m_bVisible && (m_WindowRect.SizeRect().HitTest(ViewToClient(Point)) == CRect::RELPOS_INSIDE)) { for (std::list<CWindow*>::reverse_iterator iter = m_ChildWindows.rbegin(); iter != m_ChildWindows.rend(); ++iter) *************** *** 283,287 **** bool bResult = false; ! if (m_bVisible && (m_WindowRect.SizeRect().HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { for (std::list<CWindow*>::reverse_iterator iter = m_ChildWindows.rbegin(); iter != m_ChildWindows.rend(); ++iter) --- 283,287 ---- bool bResult = false; ! if (m_bVisible && (m_WindowRect.SizeRect().HitTest(ViewToClient(Point)) == CRect::RELPOS_INSIDE)) { for (std::list<CWindow*>::reverse_iterator iter = m_ChildWindows.rbegin(); iter != m_ChildWindows.rend(); ++iter) Index: wg_listbox.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_listbox.cpp,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** wg_listbox.cpp 25 Jun 2004 19:37:51 -0000 1.39 --- wg_listbox.cpp 29 Jun 2004 18:03:40 -0000 1.40 *************** *** 175,179 **** if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && (Button == CMouseMessage::LEFT) && ! (m_WindowRect.SizeRect().HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { if (CApplication::Instance()->GetKeyFocus() != this) --- 175,179 ---- if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && (Button == CMouseMessage::LEFT) && ! (m_WindowRect.SizeRect().HitTest(ViewToClient(Point)) == CRect::RELPOS_INSIDE)) { if (CApplication::Instance()->GetKeyFocus() != this) Index: wg_frame.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_frame.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** wg_frame.cpp 25 Jun 2004 19:37:51 -0000 1.22 --- wg_frame.cpp 29 Jun 2004 18:03:40 -0000 1.23 *************** *** 142,146 **** if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && ! (m_WindowRect.SizeRect().HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { if (m_TitleBarRect.HitTest(Point) == CRect::RELPOS_INSIDE) --- 142,146 ---- if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && ! (m_WindowRect.SizeRect().HitTest(ViewToClient(Point)) == CRect::RELPOS_INSIDE)) { if (m_TitleBarRect.HitTest(Point) == CRect::RELPOS_INSIDE) |