[Wgui-cvs] wgui/src wg_button.cpp,1.32,1.33 wg_checkbox.cpp,1.19,1.20 wg_dropdown.cpp,1.20,1.21 wg_e
Status: Beta
Brought to you by:
greenwire
|
From: Rob W. <gre...@us...> - 2004-06-25 19:38:04
|
Update of /cvsroot/wgui/wgui/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8505/src Modified Files: wg_button.cpp wg_checkbox.cpp wg_dropdown.cpp wg_editbox.cpp wg_frame.cpp wg_groupbox.cpp wg_label.cpp wg_listbox.cpp wg_menu.cpp wg_picture.cpp wg_progress.cpp wg_scrollbar.cpp wg_textbox.cpp wg_toolbar.cpp wg_view.cpp wg_window.cpp Log Message: Draw architecture changes. Index: wg_view.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_view.cpp,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** wg_view.cpp 25 Jun 2004 13:34:15 -0000 1.35 --- wg_view.cpp 25 Jun 2004 19:37:51 -0000 1.36 *************** *** 59,62 **** --- 59,63 ---- SetWindowText( sTitle ); CApplication::Instance()->GetApplicationLog().AddLogEntry("Created new CView : " + sTitle, APP_LOG_INFO); + Draw(); } Index: wg_editbox.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_editbox.cpp,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** wg_editbox.cpp 25 Jun 2004 13:34:15 -0000 1.85 --- wg_editbox.cpp 25 Jun 2004 19:37:51 -0000 1.86 *************** *** 70,73 **** --- 70,74 ---- CMessageServer::Instance().RegisterMessageClient(this, CMessage::CTRL_GAININGKEYFOCUS); CMessageServer::Instance().RegisterMessageClient(this, CMessage::CTRL_LOSINGKEYFOCUS); + Draw(); } *************** *** 257,262 **** bool bResult = false; ! if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && (m_WindowRect.HitTest(Point) == CRect::RELPOS_INSIDE) && ! (Button == CMouseMessage::LEFT) && !m_bReadOnly) { bool fSkipCursorPositioning = false; --- 258,263 ---- bool bResult = false; ! if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && (Button == CMouseMessage::LEFT) && !m_bReadOnly && ! (m_WindowRect.SizeRect().HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { bool fSkipCursorPositioning = false; Index: wg_checkbox.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_checkbox.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** wg_checkbox.cpp 25 Jun 2004 13:34:15 -0000 1.19 --- wg_checkbox.cpp 25 Jun 2004 19:37:51 -0000 1.20 *************** *** 39,42 **** --- 39,43 ---- CMessageServer::Instance().RegisterMessageClient(this, CMessage::MOUSE_BUTTONUP); CMessageServer::Instance().RegisterMessageClient(this, CMessage::CTRL_LCLICK); + Draw(); } *************** *** 85,90 **** bool bResult = false; ! if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && (m_WindowRect.HitTest(Point) == CRect::RELPOS_INSIDE) && ! (m_eCheckBoxState != DISABLED)) { m_MouseButton = Button; --- 86,91 ---- bool bResult = false; ! if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && (m_eCheckBoxState != DISABLED) && ! (m_WindowRect.SizeRect().HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { m_MouseButton = Button; *************** *** 100,105 **** bool bResult = false; ! if (! CWindow::OnMouseButtonUp(Point, Button) && m_bVisible && (m_WindowRect.HitTest(Point) == CRect::RELPOS_INSIDE) && ! (m_eCheckBoxState != DISABLED) && (m_MouseButton == Button)) { CMessage::EMessageType MessageType = CMessage::UNKNOWN; --- 101,106 ---- bool bResult = false; ! 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; Index: wg_button.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_button.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** wg_button.cpp 25 Jun 2004 13:34:15 -0000 1.32 --- wg_button.cpp 25 Jun 2004 19:37:51 -0000 1.33 *************** *** 120,125 **** bool bResult = false; ! if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && (m_WindowRect.HitTest(Point) == CRect::RELPOS_INSIDE) && ! (m_eButtonState != DISABLED)) { SetButtonState(DOWN); --- 120,126 ---- bool bResult = false; ! ! if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && (m_eButtonState == UP) && ! (m_MouseButton == Button) && (m_WindowRect.SizeRect().HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { SetButtonState(DOWN); *************** *** 136,141 **** bool bResult = false; ! if (! CWindow::OnMouseButtonUp(Point, Button) && m_bVisible && (m_WindowRect.HitTest(Point) == CRect::RELPOS_INSIDE) && ! (m_eButtonState == DOWN) && (m_MouseButton == Button)) { SetButtonState(UP); --- 137,142 ---- bool bResult = false; ! if (! CWindow::OnMouseButtonUp(Point, Button) && m_bVisible && (m_eButtonState == DOWN) && ! (m_MouseButton == Button) && (m_WindowRect.SizeRect().HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { SetButtonState(UP); Index: wg_progress.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_progress.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** wg_progress.cpp 4 May 2004 16:11:13 -0000 1.13 --- wg_progress.cpp 25 Jun 2004 19:37:51 -0000 1.14 *************** *** 36,39 **** --- 36,40 ---- { m_BGColor = DEFAULT_FG_COLOR; + Draw(); } Index: wg_groupbox.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_groupbox.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** wg_groupbox.cpp 25 Jun 2004 13:34:15 -0000 1.14 --- wg_groupbox.cpp 25 Jun 2004 19:37:51 -0000 1.15 *************** *** 50,53 **** --- 50,54 ---- m_pRenderedString = pRenderedString; m_BGColor = CApplication::Instance()->GetDefaultBGColor(); + Draw(); } Index: wg_dropdown.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_dropdown.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** wg_dropdown.cpp 25 Jun 2004 13:34:15 -0000 1.20 --- wg_dropdown.cpp 25 Jun 2004 19:37:51 -0000 1.21 *************** *** 58,61 **** --- 58,62 ---- CMessageServer::Instance().RegisterMessageClient(this, CMessage::CTRL_LCLICK); CMessageServer::Instance().RegisterMessageClient(this, CMessage::CTRL_VALUECHANGE); + Draw(); } Index: wg_scrollbar.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_scrollbar.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** wg_scrollbar.cpp 25 Jun 2004 13:34:15 -0000 1.33 --- wg_scrollbar.cpp 25 Jun 2004 19:37:51 -0000 1.34 *************** *** 45,53 **** { case VERTICAL: ! m_pBtnUpLeft = new CPictureButton( ! CRect(WindowRect.TopLeft(), CPoint(WindowRect.Right(), WindowRect.Top() + WindowRect.Width())), this, CwgBitmapResourceHandle(WGRES_UP_ARROW_BITMAP)); m_pBtnDownRight = new CPictureButton( ! CRect(CPoint(WindowRect.Left(), WindowRect.Bottom() - WindowRect.Width()), WindowRect.BottomRight()), this, CwgBitmapResourceHandle(WGRES_DOWN_ARROW_BITMAP)); m_ClientRect = CRect(0, m_pBtnUpLeft->GetWindowRect().Height() + 1, --- 45,52 ---- { case VERTICAL: ! m_pBtnUpLeft = new CPictureButton(CRect(0, 0, WindowRect.Width() - 1, WindowRect.Width() - 1), this, CwgBitmapResourceHandle(WGRES_UP_ARROW_BITMAP)); m_pBtnDownRight = new CPictureButton( ! CRect(CPoint(0, WindowRect.Height() - WindowRect.Width()), WindowRect.SizeRect().BottomRight()), this, CwgBitmapResourceHandle(WGRES_DOWN_ARROW_BITMAP)); m_ClientRect = CRect(0, m_pBtnUpLeft->GetWindowRect().Height() + 1, *************** *** 55,63 **** break; case HORIZONTAL: ! m_pBtnUpLeft = new CPictureButton( ! CRect(WindowRect.TopLeft(), CPoint(WindowRect.Left() + WindowRect.Height(), WindowRect.Bottom())), this, CwgBitmapResourceHandle(WGRES_LEFT_ARROW_BITMAP)); m_pBtnDownRight = new CPictureButton( ! CRect(CPoint(WindowRect.Right() - WindowRect.Height(), WindowRect.Top()), WindowRect.BottomRight()), this, CwgBitmapResourceHandle(WGRES_RIGHT_ARROW_BITMAP)); m_ClientRect = CRect(m_pBtnUpLeft->GetWindowRect().Width() + 1, 0, --- 54,61 ---- break; case HORIZONTAL: ! m_pBtnUpLeft = new CPictureButton(CRect(0, 0, WindowRect.Height() - 1, WindowRect.Height() - 1), this, CwgBitmapResourceHandle(WGRES_LEFT_ARROW_BITMAP)); m_pBtnDownRight = new CPictureButton( ! CRect(CPoint(WindowRect.Width() - WindowRect.Height(), 0), WindowRect.SizeRect().BottomRight()), this, CwgBitmapResourceHandle(WGRES_RIGHT_ARROW_BITMAP)); m_ClientRect = CRect(m_pBtnUpLeft->GetWindowRect().Width() + 1, 0, *************** *** 73,76 **** --- 71,75 ---- CMessageServer::Instance().RegisterMessageClient(this, CMessage::MOUSE_MOVE); CMessageServer::Instance().RegisterMessageClient(this, CMessage::CTRL_LCLICK); + Draw(); } *************** *** 119,128 **** case VERTICAL: { ! m_ThumbRect.SetLeft(m_WindowRect.Left()); ! m_ThumbRect.SetRight(m_WindowRect.Right()); ! m_pBtnUpLeft->SetWindowRect(CRect(m_WindowRect.TopLeft(), ! CPoint(m_WindowRect.Right(), m_WindowRect.Top() + m_WindowRect.Width()))); m_pBtnDownRight->SetWindowRect(CRect( ! CPoint(m_WindowRect.Left(), m_WindowRect.Bottom() - m_WindowRect.Width()), m_WindowRect.BottomRight())); m_ClientRect.SetTop(m_pBtnUpLeft->GetWindowRect().Height() + 1); m_ClientRect.SetBottom(m_WindowRect.Height() - m_pBtnUpLeft->GetWindowRect().Height() - 1); --- 118,124 ---- case VERTICAL: { ! m_pBtnUpLeft->SetWindowRect(CRect(0, 0, m_WindowRect.Width() - 1, m_WindowRect.Width() - 1)); m_pBtnDownRight->SetWindowRect(CRect( ! CPoint(0, m_WindowRect.Height() - m_WindowRect.Width()), m_WindowRect.SizeRect().BottomRight())); m_ClientRect.SetTop(m_pBtnUpLeft->GetWindowRect().Height() + 1); m_ClientRect.SetBottom(m_WindowRect.Height() - m_pBtnUpLeft->GetWindowRect().Height() - 1); *************** *** 131,140 **** case HORIZONTAL: { ! m_ThumbRect.SetTop(m_WindowRect.Top()); ! m_ThumbRect.SetBottom(m_WindowRect.Bottom()); ! m_pBtnUpLeft->SetWindowRect(CRect(m_WindowRect.TopLeft(), ! CPoint(m_WindowRect.Left() + m_WindowRect.Height(), m_WindowRect.Bottom()))); m_pBtnDownRight->SetWindowRect(CRect( ! CPoint(m_WindowRect.Right() - m_WindowRect.Height(), m_WindowRect.Top()), m_WindowRect.BottomRight())); m_ClientRect.SetLeft(m_pBtnUpLeft->GetWindowRect().Width() + 1); m_ClientRect.SetRight(m_WindowRect.Width() - m_pBtnUpLeft->GetWindowRect().Width() - 1); --- 127,133 ---- case HORIZONTAL: { ! m_pBtnUpLeft->SetWindowRect(CRect(0, 0, m_WindowRect.Height() - 1, m_WindowRect.Height() - 1)); m_pBtnDownRight->SetWindowRect(CRect( ! CPoint(m_WindowRect.Width() - m_WindowRect.Height(), 0), m_WindowRect.SizeRect().BottomRight())); m_ClientRect.SetLeft(m_pBtnUpLeft->GetWindowRect().Width() + 1); m_ClientRect.SetRight(m_WindowRect.Width() - m_pBtnUpLeft->GetWindowRect().Width() - 1); *************** *** 159,163 **** bool bResult = false; ! if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && m_WindowRect.HitTest(Point) == CRect::RELPOS_INSIDE) { if (Button == CMouseMessage::WHEELUP) --- 152,157 ---- bool bResult = false; ! if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && ! m_WindowRect.SizeRect().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.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** wg_menu.cpp 25 Jun 2004 13:34:15 -0000 1.46 --- wg_menu.cpp 25 Jun 2004 19:37:51 -0000 1.47 *************** *** 206,209 **** --- 206,210 ---- { CMessageServer::Instance().RegisterMessageClient(this, CMessage::MOUSE_MOVE); + Draw(); } *************** *** 256,261 **** bool bResult = false; ! if (! CMenuBase::OnMouseButtonDown(Point, Button) && m_bVisible && (m_WindowRect.HitTest(Point) == CRect::RELPOS_INSIDE) && ! (Button == CMouseMessage::LEFT)) { UpdateCachedRects(); --- 257,262 ---- bool bResult = false; ! if (! CMenuBase::OnMouseButtonDown(Point, Button) && m_bVisible && (Button == CMouseMessage::LEFT) && ! (m_WindowRect.SizeRect().HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { UpdateCachedRects(); *************** *** 374,377 **** --- 375,379 ---- m_bVisible = false; CMessageServer::Instance().RegisterMessageClient(this, CMessage::MOUSE_BUTTONDOWN); + Draw(); } *************** *** 476,480 **** bool CPopupMenu::IsInsideChild(const CPoint& Point) const { ! if (m_WindowRect.HitTest(Point) == CRect::RELPOS_INSIDE) { return true; --- 478,482 ---- bool CPopupMenu::IsInsideChild(const CPoint& Point) const { ! if (m_WindowRect.SizeRect().HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE) { return true; *************** *** 538,542 **** bool bResult = false; ! if (! CMenuBase::OnMouseButtonDown(Point, Button) && m_bVisible && (m_WindowRect.HitTest(Point) == CRect::RELPOS_INSIDE)) { UpdateCachedRects(); --- 540,545 ---- bool bResult = false; ! if (! CMenuBase::OnMouseButtonDown(Point, Button) && m_bVisible && ! (m_WindowRect.SizeRect().HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { UpdateCachedRects(); Index: wg_window.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_window.cpp,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** wg_window.cpp 25 Jun 2004 13:34:15 -0000 1.42 --- wg_window.cpp 25 Jun 2004 19:37:51 -0000 1.43 *************** *** 41,49 **** m_sWindowText(""), m_BGColor(DEFAULT_BG_COLOR), ! m_ClientRect(0, 0, WindowRect.Width() - 1, WindowRect.Height() - 1), m_pParentWindow(0), m_pSDLSurface(0), ! m_bVisible(true), ! m_bDrawCompleted(false) { if (!CApplication::Instance()) --- 41,48 ---- m_sWindowText(""), m_BGColor(DEFAULT_BG_COLOR), ! m_ClientRect(WindowRect.SizeRect()), m_pParentWindow(0), m_pSDLSurface(0), ! m_bVisible(true) { if (!CApplication::Instance()) *************** *** 97,101 **** CRect CWindow::GetClientRect(void) const { ! CRect ClientRect(m_ClientRect + m_WindowRect.TopLeft()); ClientRect.ClipTo(m_WindowRect); return ClientRect; --- 96,100 ---- CRect CWindow::GetClientRect(void) const { ! CRect ClientRect(m_ClientRect); ClientRect.ClipTo(m_WindowRect); return ClientRect; *************** *** 171,174 **** --- 170,217 ---- + CRect CWindow::ClientToView(const CRect& Rect) const + { + CRect ScreenRect(Rect + m_ClientRect.TopLeft() + m_WindowRect.TopLeft()); + if (m_pParentWindow) + { + ScreenRect = m_pParentWindow->ClientToView(ScreenRect); + } + return ScreenRect; + } + + + CPoint CWindow::ClientToView(const CPoint& Point) const + { + CPoint ScreenPoint(Point + m_ClientRect.TopLeft() + m_WindowRect.TopLeft()); + if (m_pParentWindow) + { + ScreenPoint = m_pParentWindow->ClientToView(ScreenPoint); + } + return ScreenPoint; + } + + + CRect CWindow::ViewToWindow(const CRect& Rect) const + { + CRect WindowRect(Rect - m_WindowRect.TopLeft()); + if (m_pParentWindow) + { + WindowRect = m_pParentWindow->ViewToWindow(WindowRect); + } + return WindowRect; + } + + + CPoint CWindow::ViewToWindow(const CPoint& Point) const + { + CPoint WindowPoint(Point - m_WindowRect.TopLeft()); + if (m_pParentWindow) + { + WindowPoint = m_pParentWindow->ViewToWindow(WindowPoint); + } + return WindowPoint; + } + + void CWindow::SetWindowText(const std::string& sText) { *************** *** 183,187 **** Painter.DrawRect(m_WindowRect.SizeRect(), true, m_BGColor, m_BGColor); CMessageServer::Instance().QueueMessage(new CMessage(CMessage::APP_PAINT, 0, this)); - m_bDrawCompleted = true; } --- 226,229 ---- *************** *** 189,196 **** void CWindow::PaintToSurface(SDL_Surface& Surface, const CPoint& Offset) const { - if (!m_bDrawCompleted) - { - Draw(); - } if (m_bVisible) { --- 231,234 ---- *************** *** 225,229 **** bool bResult = false; ! if (m_bVisible && (m_WindowRect.HitTest(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(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { for (std::list<CWindow*>::reverse_iterator iter = m_ChildWindows.rbegin(); iter != m_ChildWindows.rend(); ++iter) *************** *** 245,249 **** bool bResult = false; ! if (m_bVisible && (m_WindowRect.HitTest(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) Index: wg_label.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_label.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wg_label.cpp 25 Jun 2004 13:34:15 -0000 1.18 --- wg_label.cpp 25 Jun 2004 19:37:51 -0000 1.19 *************** *** 47,50 **** --- 47,51 ---- m_pRenderedString = pRenderedString; m_BGColor = CApplication::Instance()->GetDefaultBGColor(); + Draw(); } Index: wg_toolbar.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_toolbar.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** wg_toolbar.cpp 2 Apr 2004 17:26:16 -0000 1.12 --- wg_toolbar.cpp 25 Jun 2004 19:37:51 -0000 1.13 *************** *** 37,40 **** --- 37,41 ---- m_BGColor = COLOR_LIGHTGRAY; CMessageServer::Instance().RegisterMessageClient(this, CMessage::CTRL_LCLICK); + Draw(); } Index: wg_listbox.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_listbox.cpp,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** wg_listbox.cpp 25 Jun 2004 13:34:15 -0000 1.38 --- wg_listbox.cpp 25 Jun 2004 19:37:51 -0000 1.39 *************** *** 59,62 **** --- 59,63 ---- CMessageServer::Instance().RegisterMessageClient(this, CMessage::CTRL_VALUECHANGE); CMessageServer::Instance().RegisterMessageClient(this, CMessage::CTRL_VALUECHANGING); + Draw(); } *************** *** 173,178 **** bool bResult = false; ! if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && (m_WindowRect.HitTest(Point) == CRect::RELPOS_INSIDE) && ! (Button == CMouseMessage::LEFT)) { if (CApplication::Instance()->GetKeyFocus() != this) --- 174,179 ---- bool bResult = false; ! if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && (Button == CMouseMessage::LEFT) && ! (m_WindowRect.SizeRect().HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { if (CApplication::Instance()->GetKeyFocus() != this) Index: wg_textbox.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_textbox.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** wg_textbox.cpp 25 Jun 2004 13:34:15 -0000 1.20 --- wg_textbox.cpp 25 Jun 2004 19:37:51 -0000 1.21 *************** *** 83,86 **** --- 83,87 ---- CMessageServer::Instance().RegisterMessageClient(this, CMessage::CTRL_GAININGKEYFOCUS); CMessageServer::Instance().RegisterMessageClient(this, CMessage::CTRL_LOSINGKEYFOCUS); + Draw(); } Index: wg_picture.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_picture.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** wg_picture.cpp 2 Apr 2004 17:26:16 -0000 1.12 --- wg_picture.cpp 25 Jun 2004 19:37:51 -0000 1.13 *************** *** 41,44 **** --- 41,45 ---- m_ClientRect.Grow(-1); } + Draw(); } *************** *** 55,58 **** --- 56,60 ---- m_ClientRect.Grow(-1); } + Draw(); } *************** *** 68,76 **** CWindow::Draw(); ! CRect PictureRect = GetClientRect(); ! SDL_Rect SourceRect = PictureRect.SDLRect(); ! SourceRect.x = 0; ! SourceRect.y = 0; ! SDL_Rect DestRect = PictureRect.SDLRect(); SDL_BlitSurface(m_hBitmap.Bitmap(), &SourceRect, m_pSDLSurface, &DestRect); --- 70,75 ---- CWindow::Draw(); ! SDL_Rect SourceRect = m_ClientRect.SizeRect().SDLRect(); ! SDL_Rect DestRect = m_ClientRect.SDLRect(); SDL_BlitSurface(m_hBitmap.Bitmap(), &SourceRect, m_pSDLSurface, &DestRect); *************** *** 78,82 **** if (m_bDrawBorder) { ! Painter.DrawRect(m_WindowRect, false, m_BorderColor); } } --- 77,81 ---- if (m_bDrawBorder) { ! Painter.DrawRect(m_WindowRect.SizeRect(), false, m_BorderColor); } } *************** *** 86,90 **** { CWindow::SetWindowRect(WindowRect); ! m_ClientRect = m_WindowRect; m_ClientRect.Grow(-1); } --- 85,89 ---- { CWindow::SetWindowRect(WindowRect); ! m_ClientRect = m_WindowRect.SizeRect(); m_ClientRect.Grow(-1); } Index: wg_frame.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_frame.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** wg_frame.cpp 14 Apr 2004 16:21:21 -0000 1.21 --- wg_frame.cpp 25 Jun 2004 19:37:51 -0000 1.22 *************** *** 141,145 **** bool bResult = false; ! if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && (m_WindowRect.HitTest(Point) == CRect::RELPOS_INSIDE)) { if (m_TitleBarRect.HitTest(Point) == CRect::RELPOS_INSIDE) --- 141,146 ---- bool bResult = false; ! if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && ! (m_WindowRect.SizeRect().HitTest(ViewToWindow(Point)) == CRect::RELPOS_INSIDE)) { if (m_TitleBarRect.HitTest(Point) == CRect::RELPOS_INSIDE) |