[Wgui-cvs] wgui/includes wg_range_control.h,1.4,1.5 wg_rect.h,1.30,1.31 wg_view.h,1.24,1.25 wg_windo
Status: Beta
Brought to you by:
greenwire
|
From: Rob W. <gre...@us...> - 2004-06-25 13:34:24
|
Update of /cvsroot/wgui/wgui/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21468/includes Modified Files: wg_range_control.h wg_rect.h wg_view.h wg_window.h Log Message: Draw architecture changes. Index: wg_rect.h =================================================================== RCS file: /cvsroot/wgui/wgui/includes/wg_rect.h,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** wg_rect.h 3 Jun 2004 19:10:52 -0000 1.30 --- wg_rect.h 25 Jun 2004 13:34:15 -0000 1.31 *************** *** 144,147 **** --- 144,151 ---- int Height(void) const { return abs(m_Bottom - m_Top + 1); } + //! Creates a CRect that has the same width and height of the rect, but has 0, 0 as it's top left coordinate + //! \return A CRect + CRect SizeRect(void) const { return CRect(0, 0, abs(m_Right - m_Left), abs(m_Bottom - m_Top)); } + //! Assignment operator will copy the values of the other rect CRect& operator=(const CRect& r); // assignment operator Index: wg_view.h =================================================================== RCS file: /cvsroot/wgui/wgui/includes/wg_view.h,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** wg_view.h 3 Jun 2004 19:10:52 -0000 1.24 --- wg_view.h 25 Jun 2004 13:34:15 -0000 1.25 *************** *** 110,113 **** --- 110,114 ---- CMenu* m_pMenu; //!< A pointer to the view's menu CWindow* m_pFloatingWindow; //!< A pointer to the current floating window. This will be drawn overtop of everything else. + SDL_Surface* m_pScreenSurface; //!< A pointer to the actual screen surface Index: wg_range_control.h =================================================================== RCS file: /cvsroot/wgui/wgui/includes/wg_range_control.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wg_range_control.h 3 Jun 2004 19:10:52 -0000 1.4 --- wg_range_control.h 25 Jun 2004 13:34:15 -0000 1.5 *************** *** 84,88 **** if (bRedraw) { ! StartDrawProc(); } } --- 84,88 ---- if (bRedraw) { ! Draw(); } } Index: wg_window.h =================================================================== RCS file: /cvsroot/wgui/wgui/includes/wg_window.h,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** wg_window.h 3 Jun 2004 19:10:52 -0000 1.36 --- wg_window.h 25 Jun 2004 13:34:15 -0000 1.37 *************** *** 124,131 **** --- 124,133 ---- //! Translate the given CRect into screen coordinates //! \param Rect A CRect in client coordinates + // TODO: fix virtual CRect ClientToScreen(const CRect& Rect) const { return Rect + GetClientRect().TopLeft(); } //! Translate the given CPoint into screen coordinates //! \param Point A CPoint in client coordinates + // TODO: fix virtual CPoint ClientToScreen(const CPoint& Point) const { return Point + GetClientRect().TopLeft(); } *************** *** 138,160 **** virtual std::string GetWindowText(void) { return m_sWindowText; } ! //! The rendering chain for windows ! //! DrawProc() is the primary draw method and calls the other draw methods ! virtual void DrawProc(void) const; ! ! //! Render the background for the control ! //! Draws the background as a filled CRect ! virtual void DrawBG(void) const; ! ! //! Render the control itself virtual void Draw(void) const; ! //! Call DrawProc() for any children of the current windows ! virtual void DrawChildren(void) const; ! ! //! The last chance to do any further drawing ! virtual void DrawPostChild(void) const; ! ! //! This calls DrawProc, then updates the relevant screen area ! virtual void StartDrawProc(void) const; //! Transfer the ownership of the window, so it has a new parent --- 140,150 ---- virtual std::string GetWindowText(void) { return m_sWindowText; } ! //! Render the window itself virtual void Draw(void) const; ! //! Blit the window to the given surface, using m_WindowRect as the offset into the surface ! //! \param Surface A reference to the surface that the window will be copied to ! //! \param Offset This is the current offset into the Surface that should be used as reference ! virtual void PaintToSurface(SDL_Surface& Surface, const CPoint& Offset) const; //! Transfer the ownership of the window, so it has a new parent *************** *** 199,203 **** std::string m_sWindowText; ! //! The area the control occupies CRect m_WindowRect; --- 189,193 ---- std::string m_sWindowText; ! //! The area the control occupies, these coordinates are in respect to the parent's client rect CRect m_WindowRect; *************** *** 214,223 **** std::list<CWindow*> m_ChildWindows; ! //! A pointer to the SDL surface that the window exists on, and should use for drawing itself SDL_Surface* m_pSDLSurface; ! //! If this is false, the control will not draw itself bool m_bVisible; private: void operator=(CWindow) { } //!< The assignment operator is not allowed for CWindow objects --- 204,216 ---- std::list<CWindow*> m_ChildWindows; ! //! A pointer to the SDL surface buffer that the window draws to SDL_Surface* m_pSDLSurface; ! //! If this is false, the control will not paint itself bool m_bVisible; + //! Indicates if the control has been drawn yet or not + mutable bool m_bDrawCompleted; + private: void operator=(CWindow) { } //!< The assignment operator is not allowed for CWindow objects |