wgui-cvs Mailing List for wGui (Page 7)
Status: Beta
Brought to you by:
greenwire
You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
(47) |
May
(7) |
Jun
(29) |
Jul
(41) |
Aug
(5) |
Sep
(4) |
Oct
|
Nov
(5) |
Dec
(15) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(14) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(16) |
Oct
(1) |
Nov
|
Dec
(5) |
| 2006 |
Jan
(5) |
Feb
(10) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
|
From: Rob W. <gre...@us...> - 2004-06-03 18:41:01
|
Update of /cvsroot/wgui/wgui/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6848/includes Modified Files: wg_application.h wg_scrollbar.h wg_toolbar.h wutil_config_store.h wutil_log.h Log Message: Documentation fixes. Index: wutil_config_store.h =================================================================== RCS file: /cvsroot/wgui/wgui/includes/wutil_config_store.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** wutil_config_store.h 2 Apr 2004 17:26:14 -0000 1.5 --- wutil_config_store.h 3 Jun 2004 18:40:52 -0000 1.6 *************** *** 100,105 **** protected: ! typedef std::map<std::string, std::string> t_SettingsMap; ! t_SettingsMap m_SettingsMap; }; --- 100,105 ---- protected: ! typedef std::map<std::string, std::string> t_SettingsMap; //!< A map type definition for key strings to value strings ! t_SettingsMap m_SettingsMap; //!< The map of settings }; Index: wutil_log.h =================================================================== RCS file: /cvsroot/wgui/wgui/includes/wutil_log.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wutil_log.h 2 Apr 2004 17:26:14 -0000 1.4 --- wutil_log.h 3 Jun 2004 18:40:52 -0000 1.5 *************** *** 43,47 **** struct SLogEntry { ! SLogEntry(time_t TimeStamp, unsigned int iSeverity, const std::string& sMessage) : m_TimeStamp(TimeStamp), m_iSeverity(iSeverity), m_sMessage(sMessage) { } time_t m_TimeStamp; //!< The time the log entry was created --- 43,48 ---- struct SLogEntry { ! //! The constructor ! SLogEntry(time_t TimeStamp, unsigned int iSeverity, const std::string& sMessage) : m_TimeStamp(TimeStamp), m_iSeverity(iSeverity), m_sMessage(sMessage) { } time_t m_TimeStamp; //!< The time the log entry was created *************** *** 50,54 **** }; ! typedef std::list<SLogEntry> t_LogList; //! Add a log entry --- 51,55 ---- }; ! typedef std::list<SLogEntry> t_LogList; //!< A typedef for a list of log entries //! Add a log entry *************** *** 69,73 **** //! \return A list of the log entries t_LogList GetLogEntries(unsigned int iSeverity = 0) const; ! //! Get a list of the log entries that fit a severity range //! \param iHighSeverity The high end of the severity range (lower number) --- 70,74 ---- //! \return A list of the log entries t_LogList GetLogEntries(unsigned int iSeverity = 0) const; ! //! Get a list of the log entries that fit a severity range //! \param iHighSeverity The high end of the severity range (lower number) *************** *** 85,89 **** void Clear(void) { m_LogList.clear(); } ! protected: t_LogList m_LogList; //!< The list of log entries --- 86,90 ---- void Clear(void) { m_LogList.clear(); } ! protected: t_LogList m_LogList; //!< The list of log entries Index: wg_application.h =================================================================== RCS file: /cvsroot/wgui/wgui/includes/wg_application.h,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** wg_application.h 2 Apr 2004 21:50:34 -0000 1.34 --- wg_application.h 3 Jun 2004 18:40:51 -0000 1.35 *************** *** 73,91 **** --- 73,97 ---- virtual ~CApplication(void); + //! Gets the single instance of the CApplication object //! \return A pointer to the one instance of the Application static CApplication* Instance(void) { return m_pInstance; } + //! Gets the default font file name (which is set via the wgui.conf file) //! \return The default font virtual const std::string& GetDefaultFontFileName(void) const { return m_sFontFileName; } + //! Gets the current exit code of the application //! \return The exit code of the app virtual int ExitCode(void) const { return m_iExitCode; } + //! Indicates if the application is currently "running" or not //! \return true while the application is in it's message loop virtual bool IsRunning(void) const { return m_bRunning; } + //! Indicates if the application will be attempting to handle it's own exceptions (set in the CApplication constructor) //! \return true if wGui should handle it's own exceptions virtual bool HandleExceptions(void) const { return m_bHandleExceptionsInternally; } + //! Indicates if the CApplication object has been properly initialized //! \return true if Init() has been called virtual bool IsInitialized(void) const { return m_bInited; } *************** *** 96,99 **** --- 102,106 ---- virtual void SetKeyFocus(CWindow* pWindow); + //! Gets the current keyboard focus for the application //! \return A pointer to the window with keyboard focus virtual CWindow* GetKeyFocus(void) const { return m_pKeyFocusWindow; } *************** *** 105,108 **** --- 112,116 ---- virtual void SetMouseFocus(CWindow* pWindow); + //! Gets the current mouse focus for the application //! \return A pointer to the window with mouse focus ( grab ) virtual CWindow* GetMouseFocus(void) const { return m_pMouseFocusWindow; } *************** *** 132,144 **** --- 140,156 ---- virtual void SetDefaultFontEngine(CFontEngine* pFontEngine) { m_pDefaultFontEngine = pFontEngine; } + //! Gets the default font engine (set in the wgui.conf file) //! \return A pointer to the default font engine virtual CFontEngine* GetDefaultFontEngine(void) const { return m_pDefaultFontEngine; } + //! Gets the default background color (set in the wgui.conf file) //! \return Default background color virtual CRGBColor GetDefaultBGColor(void) const { return m_DefaultColorBG; } + //! Gets the default foreground color (set in the wgui.conf file) //! \return Default foreground color virtual CRGBColor GetDefaultFGColor(void) const { return m_DefaultColorFG; } + //! Gets the default selection color (set in the wgui.conf file) //! \return Default selection color virtual CRGBColor GetDefaultSelectionColor(void) const { return m_DefaultColorSelect; } *************** *** 208,213 **** CWindow* m_pMouseFocusWindow; //!< A pointer to the window with mouse focus ! typedef std::pair<std::string, unsigned char> t_FontEngineMapKey; ! typedef std::map<t_FontEngineMapKey, CFontEngine*> t_FontEngineMap; t_FontEngineMap m_FontEngines; //!< A map of font engine pointers CFontEngine* m_pDefaultFontEngine; //!< A pointer to the default font engine --- 220,225 ---- CWindow* m_pMouseFocusWindow; //!< A pointer to the window with mouse focus ! typedef std::pair<std::string, unsigned char> t_FontEngineMapKey; //!< A typedef of font name and size pairs ! typedef std::map<t_FontEngineMapKey, CFontEngine*> t_FontEngineMap; //!< A typedef of a map of font engine pointers t_FontEngineMap m_FontEngines; //!< A map of font engine pointers CFontEngine* m_pDefaultFontEngine; //!< A pointer to the default font engine *************** *** 215,219 **** CRGBColor m_DefaultColorBG; //!< Default background color CRGBColor m_DefaultColorFG; //!< Default foreground color ! CRGBColor m_DefaultColorSelect; //! < Default selection color bool m_bHandleExceptionsInternally; //!< If true, wGui will handle most exceptions itself --- 227,231 ---- CRGBColor m_DefaultColorBG; //!< Default background color CRGBColor m_DefaultColorFG; //!< Default foreground color ! CRGBColor m_DefaultColorSelect; //!< Default selection color bool m_bHandleExceptionsInternally; //!< If true, wGui will handle most exceptions itself Index: wg_toolbar.h =================================================================== RCS file: /cvsroot/wgui/wgui/includes/wg_toolbar.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** wg_toolbar.h 2 Apr 2004 17:26:14 -0000 1.12 --- wg_toolbar.h 3 Jun 2004 18:40:52 -0000 1.13 *************** *** 102,107 **** void RepositionButtons(void); ! typedef std::pair<CButton*, long int> t_ButtonIDPair; ! typedef std::vector<t_ButtonIDPair> t_ButtonVector; t_ButtonVector m_vpButtons; //!< A vector of pointers to the buttons and their IDs in the toolbar --- 102,107 ---- void RepositionButtons(void); ! typedef std::pair<CButton*, long int> t_ButtonIDPair; //!< A typedef of CButton pointer to ID pair ! typedef std::vector<t_ButtonIDPair> t_ButtonVector; //!< A typedef of a vector of Button ID pairs t_ButtonVector m_vpButtons; //!< A vector of pointers to the buttons and their IDs in the toolbar Index: wg_scrollbar.h =================================================================== RCS file: /cvsroot/wgui/wgui/includes/wg_scrollbar.h,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** wg_scrollbar.h 27 Apr 2004 18:13:50 -0000 1.22 --- wg_scrollbar.h 3 Jun 2004 18:40:52 -0000 1.23 *************** *** 65,69 **** // CRangeControl overrides //! Set the current value. ! //! \param value The new value for the control //! \param bRedraw indicates if the control should be redrawn (defaults to true) virtual void SetValue(int iValue, bool bRedraw = true); --- 65,69 ---- // CRangeControl overrides //! Set the current value. ! //! \param iValue The new value for the control //! \param bRedraw indicates if the control should be redrawn (defaults to true) virtual void SetValue(int iValue, bool bRedraw = true); *************** *** 103,107 **** int m_iJumpAmount; //!< The amount to jump when the area below or above the thumb is clicked CPictureButton* m_pBtnUpLeft; //!< A pointer to the Up or Left button ! CPictureButton* m_pBtnDownRight; //! A pointer to the Down or Right button CRect m_ThumbRect; //!< The thumb rect bool m_bDragging; //!< Indicates if the thumb is currently being dragged --- 103,107 ---- int m_iJumpAmount; //!< The amount to jump when the area below or above the thumb is clicked CPictureButton* m_pBtnUpLeft; //!< A pointer to the Up or Left button ! CPictureButton* m_pBtnDownRight; //!< A pointer to the Down or Right button CRect m_ThumbRect; //!< The thumb rect bool m_bDragging; //!< Indicates if the thumb is currently being dragged |
|
From: Rob W. <gre...@us...> - 2004-06-03 18:41:00
|
Update of /cvsroot/wgui/wgui/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6848/src Modified Files: wg_message_server.cpp Log Message: Documentation fixes. Index: wg_message_server.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_message_server.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** wg_message_server.cpp 2 Apr 2004 17:26:16 -0000 1.27 --- wg_message_server.cpp 3 Jun 2004 18:40:52 -0000 1.28 *************** *** 155,159 **** --- 155,164 ---- { public: + //! The functor constructor + //! \param pClient The destination of the message that is being checked Duplicate_APP_PAINT(const CMessageClient* pClient) : m_pClient(pClient) { } + //! Checks to see if the message is a duplicate of an existing APP_PAINT message + //! \param pMessage A pointer to the message that is being checked against + //! \return true of the message is a duplicate bool operator() (CMessage* pMessage) const { *************** *** 163,166 **** --- 168,172 ---- private: + //! The destination of the message that is being checked const CMessageClient* m_pClient; }; |
|
From: Rob W. <gre...@us...> - 2004-05-05 14:53:16
|
Update of /cvsroot/wgui/wgui/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv770/src Modified Files: wg_textbox.cpp Log Message: Fixed CTextBox highlighting bug. Index: wg_textbox.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_textbox.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wg_textbox.cpp 27 Apr 2004 18:13:51 -0000 1.18 --- wg_textbox.cpp 5 May 2004 14:52:35 -0000 1.19 *************** *** 94,101 **** delete m_pCursorTimer; delete m_pDblClickTimer; - - // This shouldn't be necessary, as these are children of the control and should be deleted automatically - // delete m_pHorizontalScrollBar; - // delete m_pVerticalScrollBar; } --- 94,97 ---- *************** *** 111,114 **** --- 107,111 ---- std::string CTextBox::GetSelText(void) const // virtual { + std::string sSelText = ""; if (m_SelLength != 0) { *************** *** 123,132 **** SelStartNorm = m_SelStart; } ! return m_sWindowText.substr(SelStartNorm, SelLenNorm); ! } ! else ! { ! return ""; } } --- 120,127 ---- SelStartNorm = m_SelStart; } ! sSelText = m_sWindowText.substr(SelStartNorm, SelLenNorm); } + + return sSelText; } *************** *** 169,172 **** --- 164,168 ---- if (CApplication::Instance()->GetKeyFocus() == dynamic_cast<const CWindow*>(this) && !m_bReadOnly) { + // first normalize the selection std::string::size_type SelStartNorm = 0; std::string::size_type SelLenNorm = abs(m_SelLength); *************** *** 182,185 **** --- 178,182 ---- CPoint SelEndPoint(RowColFromIndex(SelStartNorm + SelLenNorm)); + // now get the dimensions for each character std::vector<CPoint> vOffsets; std::vector<CPoint> vBoundingDimensions; *************** *** 222,226 **** } ! // Selection if (m_SelLength != 0 && SelEndPoint.YPos() >= m_pVerticalScrollBar->GetValue()) { --- 219,223 ---- } ! // draw the selection if (m_SelLength != 0 && SelEndPoint.YPos() >= m_pVerticalScrollBar->GetValue()) { *************** *** 242,248 **** } if (m_SelLength == 0 && SelStartPoint.YPos() >= m_pVerticalScrollBar->GetValue() && m_bDrawCursor) { - //RenderStringWithCursor if (CursorPos >= TextRect.Left() && CursorPos <= TextRect.Right()) { --- 239,245 ---- } + // draw the cursor if (m_SelLength == 0 && SelStartPoint.YPos() >= m_pVerticalScrollBar->GetValue() && m_bDrawCursor) { if (CursorPos >= TextRect.Left() && CursorPos <= TextRect.Right()) { *************** *** 253,256 **** --- 250,254 ---- } + // finally, draw the text CPoint LineOrigin = TextRect.TopLeft() - CPoint(m_pHorizontalScrollBar->GetValue() * 10, 0); for(std::vector<CRenderedString*>::const_iterator iter = m_vpRenderedString.begin() + m_pVerticalScrollBar->GetValue(); *************** *** 291,295 **** { bool fSkipCursorPositioning = false; ! //If we haven't initialized the double click timer, do so. if (!m_pDblClickTimer->IsRunning()) { --- 289,293 ---- { bool fSkipCursorPositioning = false; ! // If we haven't initialized the double click timer, do so. if (!m_pDblClickTimer->IsRunning()) { *************** *** 298,303 **** else { ! //Raise double click event ! //This message is being dispatched, but to where? CMessageServer::Instance().QueueMessage(new TIntMessage(CMessage::CTRL_DOUBLELCLICK, this, this, 0)); fSkipCursorPositioning = true; --- 296,300 ---- else { ! // Raise double click event CMessageServer::Instance().QueueMessage(new TIntMessage(CMessage::CTRL_DOUBLELCLICK, this, this, 0)); fSkipCursorPositioning = true; *************** *** 311,317 **** --- 308,316 ---- if (!fSkipCursorPositioning) { + // set the cursor std::vector<CPoint> vOffsets; std::vector<std::vector<CRect> > vCharRects; int iIndex = 0; + // get the dimensions of all the characters for (std::vector<CRenderedString*>::iterator iter = m_vpRenderedString.begin(); iter != m_vpRenderedString.end(); ++iter, ++iIndex) { *************** *** 323,332 **** } CRect TextRect(GetClientRect()); unsigned int iCurLine = (Point.YPos() - TextRect.Top()) / m_iRowHeight + m_pVerticalScrollBar->GetValue(); ! if (iCurLine > m_iLineCount) { iCurLine = m_iLineCount - 1; } int xDelta = abs(Point.XPos() - (vCharRects[iCurLine][0].Left() + vOffsets[iCurLine].XPos() + TextRect.Left())); m_SelStart = 0; --- 322,333 ---- } + // figure out which line was clicked on CRect TextRect(GetClientRect()); unsigned int iCurLine = (Point.YPos() - TextRect.Top()) / m_iRowHeight + m_pVerticalScrollBar->GetValue(); ! if (iCurLine >= m_iLineCount) { iCurLine = m_iLineCount - 1; } + // figure out which character was clicked on int xDelta = abs(Point.XPos() - (vCharRects[iCurLine][0].Left() + vOffsets[iCurLine].XPos() + TextRect.Left())); m_SelStart = 0; *************** *** 413,416 **** --- 414,418 ---- if (m_bMouseDown) { + // get the dimensions for all the characters std::vector<CPoint> vOffsets; std::vector<std::vector<CRect> > vCharRects; *************** *** 425,432 **** --- 427,439 ---- } + // figure out which line was clicked on unsigned int iCurLine = 0; if (GetClientRect().HitTest(pMouseMessage->Point) == CRect::RELPOS_INSIDE) { iCurLine = (pMouseMessage->Point.YPos() - TextRect.Top()) / m_iRowHeight + m_pVerticalScrollBar->GetValue(); + if (iCurLine >= m_iLineCount) + { + iCurLine = m_iLineCount - 1; + } } else if (GetClientRect().HitTest(pMouseMessage->Point) == CRect::RELPOS_BELOW) *************** *** 434,437 **** --- 441,446 ---- iCurLine = m_iLineCount - 1; } + + // figure out which character was clicked on int xDelta = abs(pMouseMessage->Point.XPos() - (vCharRects[iCurLine][0].Left() + vOffsets[iCurLine].XPos() + TextRect.Left())); std::string::size_type CursorPos = 0; *************** *** 449,452 **** --- 458,462 ---- } + // set the highlighting if (CursorPos < m_DragStart) { |
|
From: Rob W. <gre...@us...> - 2004-05-05 14:52:57
|
Update of /cvsroot/wgui/wgui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv770 Modified Files: CHANGES Log Message: Fixed CTextBox highlighting bug. Index: CHANGES =================================================================== RCS file: /cvsroot/wgui/wgui/CHANGES,v retrieving revision 1.139 retrieving revision 1.140 diff -C2 -d -r1.139 -r1.140 *** CHANGES 4 May 2004 16:11:12 -0000 1.139 --- CHANGES 5 May 2004 14:52:34 -0000 1.140 *************** *** 3,6 **** --- 3,7 ---- + Changed CProgressBar: CProgressBar now inherits from the CRangeControl class, so several methods have been renamed (primarily Get/SetProgress is now Get/SetValue) + Changed CScrollBar: CScrollBar now inherits from the CRangeControl class, so several methods have been renamed (primarily Get/SetPosition is now Get/SetValue) + + Bugfix CTextBox: CTextBox would crash when you tried highlighting past the last line of text. This has been fixed. |
|
From: Rob W. <gre...@us...> - 2004-05-04 16:12:27
|
Update of /cvsroot/wgui/wgui/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23997/src Modified Files: wg_progress.cpp Log Message: Converted CProgressBar to inherit from CRangeControl Index: wg_progress.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_progress.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** wg_progress.cpp 2 Apr 2004 17:26:16 -0000 1.12 --- wg_progress.cpp 4 May 2004 16:11:13 -0000 1.13 *************** *** 32,39 **** CProgress::CProgress(const CRect& WindowRect, CWindow* pParent, CRGBColor BarColor) : ! CWindow(WindowRect, pParent), ! m_iMin(0), ! m_iMax(100), ! m_iProgress(0), m_BarColor(BarColor) { --- 32,36 ---- CProgress::CProgress(const CRect& WindowRect, CWindow* pParent, CRGBColor BarColor) : ! CRangeControl<int>(WindowRect, pParent, 0, 100, 1, 0), m_BarColor(BarColor) { *************** *** 48,66 **** - void CProgress::SetLimits(int iMin, int iMax) - { - m_iMin = iMin; - m_iMax = iMax; - StartDrawProc(); - } - - - void CProgress::SetProgress(int iProgress) - { - m_iProgress = iProgress; - StartDrawProc(); - } - - void CProgress::Draw(void) const { --- 45,48 ---- *************** *** 75,84 **** Painter.DrawVLine(SubRect.Top(), SubRect.Bottom(), SubRect.Left(), COLOR_DARKGRAY); SubRect.Grow(-2); ! if (m_iProgress > m_iMin) { ! if (m_iProgress < m_iMax) { SubRect.SetRight(stdex::safe_static_cast<int>(SubRect.Left() + ! SubRect.Width() * (stdex::safe_static_cast<double>(m_iProgress - m_iMin) / (m_iMax - m_iMin)))); } Painter.DrawRect(SubRect, true, m_BarColor, m_BarColor); --- 57,66 ---- Painter.DrawVLine(SubRect.Top(), SubRect.Bottom(), SubRect.Left(), COLOR_DARKGRAY); SubRect.Grow(-2); ! if (m_Value > m_MinLimit) { ! if (m_Value < m_MaxLimit) { SubRect.SetRight(stdex::safe_static_cast<int>(SubRect.Left() + ! SubRect.Width() * (stdex::safe_static_cast<double>(m_Value - m_MinLimit) / (m_MaxLimit - m_MinLimit)))); } Painter.DrawRect(SubRect, true, m_BarColor, m_BarColor); |
|
From: Rob W. <gre...@us...> - 2004-05-04 16:11:57
|
Update of /cvsroot/wgui/wgui/includes/unit_tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23997/includes/unit_tests Modified Files: wg_progress_unittests.h Log Message: Converted CProgressBar to inherit from CRangeControl Index: wg_progress_unittests.h =================================================================== RCS file: /cvsroot/wgui/wgui/includes/unit_tests/wg_progress_unittests.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wg_progress_unittests.h 2 Apr 2004 17:26:15 -0000 1.3 --- wg_progress_unittests.h 4 May 2004 16:11:13 -0000 1.4 *************** *** 50,59 **** ensure_equals("CProgress - GetMinLimit", pProgress->GetMinLimit(), 0); ensure_equals("CProgress - GetMaxLimit", pProgress->GetMaxLimit(), 100); ! ensure_equals("CProgress - GetProgress", pProgress->GetProgress(), 0); ! pProgress->SetLimits(-5, 10); ! ensure_equals("CProgress - SetLimits", pProgress->GetMinLimit(), -5); ! ensure_equals("CProgress - SetLimits", pProgress->GetMaxLimit(), 10); ! pProgress->SetProgress(8); ! ensure_equals("CProgress - SetProgress", pProgress->GetProgress(), 8); pProgress->SetBarColor(wGui::COLOR_RED); ensure("CProgress - SetBarColor", pProgress->GetBarColor() == wGui::COLOR_RED); --- 50,60 ---- ensure_equals("CProgress - GetMinLimit", pProgress->GetMinLimit(), 0); ensure_equals("CProgress - GetMaxLimit", pProgress->GetMaxLimit(), 100); ! ensure_equals("CProgress - GetValue", pProgress->GetValue(), 0); ! pProgress->SetMinLimit(-5); ! pProgress->SetMaxLimit(10); ! ensure_equals("CProgress - SetMinLimit", pProgress->GetMinLimit(), -5); ! ensure_equals("CProgress - SetMaxLimit", pProgress->GetMaxLimit(), 10); ! pProgress->SetValue(8); ! ensure_equals("CProgress - SetValue", pProgress->GetValue(), 8); pProgress->SetBarColor(wGui::COLOR_RED); ensure("CProgress - SetBarColor", pProgress->GetBarColor() == wGui::COLOR_RED); |
|
From: Rob W. <gre...@us...> - 2004-05-04 16:11:55
|
Update of /cvsroot/wgui/wgui/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23997/includes Modified Files: wg_progress.h wg_range_control.h Log Message: Converted CProgressBar to inherit from CRangeControl Index: wg_range_control.h =================================================================== RCS file: /cvsroot/wgui/wgui/includes/wg_range_control.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wg_range_control.h 27 Apr 2004 18:13:50 -0000 1.2 --- wg_range_control.h 4 May 2004 16:11:13 -0000 1.3 *************** *** 27,30 **** --- 27,31 ---- #include "wg_window.h" + #include "wg_message_server.h" Index: wg_progress.h =================================================================== RCS file: /cvsroot/wgui/wgui/includes/wg_progress.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** wg_progress.h 2 Apr 2004 17:26:14 -0000 1.16 --- wg_progress.h 4 May 2004 16:11:13 -0000 1.17 *************** *** 26,30 **** #define _WG_PROGRESS_H_ ! #include "wg_window.h" #include "wg_painter.h" --- 26,30 ---- #define _WG_PROGRESS_H_ ! #include "wg_range_control.h" #include "wg_painter.h" *************** *** 35,39 **** //! A progress bar display ! class CProgress : public CWindow { public: --- 35,39 ---- //! A progress bar display ! class CProgress : public CRangeControl<int> { public: *************** *** 47,65 **** virtual ~CProgress(void); - //! Set the limits of the progress bar - void SetLimits(int Min, int Max); - - //! \return The minimum limit of the progress bar - int GetMinLimit(void) { return m_iMin; } - - //! \return The maximum limit of the progress bar - int GetMaxLimit(void) { return m_iMax; } - - //! Set the current progress value. - void SetProgress(int iProgress); - - //! \return The current progress value - int GetProgress(void) { return m_iProgress; } - //! \return The bar color CRGBColor GetBarColor(void) { return m_BarColor; } --- 47,50 ---- *************** *** 75,90 **** ! private: ! //! The minimum value of the progress bar ! int m_iMin; ! ! //! The maximum value of the progress bar ! int m_iMax; ! ! //! The current value of the progress bar ! int m_iProgress; ! ! //! The color of the progress bar ! CRGBColor m_BarColor; --- 60,65 ---- ! protected: ! CRGBColor m_BarColor; //!< The color of the progress bar |
|
From: Rob W. <gre...@us...> - 2004-05-04 16:11:28
|
Update of /cvsroot/wgui/wgui/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23997/tests Modified Files: TestView1.cpp Log Message: Converted CProgressBar to inherit from CRangeControl Index: TestView1.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/tests/TestView1.cpp,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** TestView1.cpp 2 Apr 2004 17:26:16 -0000 1.65 --- TestView1.cpp 4 May 2004 16:11:13 -0000 1.66 *************** *** 83,87 **** 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->SetLimits(0, 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"); --- 83,87 ---- 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"); *************** *** 248,252 **** sprintf(buffer, "Count: %i", m_iClickCount); m_pButton->SetWindowText(buffer); ! m_pProgressBar->SetProgress(m_iClickCount); bHandled = true; --- 248,252 ---- sprintf(buffer, "Count: %i", m_iClickCount); m_pButton->SetWindowText(buffer); ! m_pProgressBar->SetValue(m_iClickCount); bHandled = true; *************** *** 352,356 **** sprintf(buffer, "Count: %i", m_iClickCount); m_pButton->SetWindowText(buffer); ! m_pProgressBar->SetProgress(m_iClickCount); bHandled = true; } --- 352,356 ---- sprintf(buffer, "Count: %i", m_iClickCount); m_pButton->SetWindowText(buffer); ! m_pProgressBar->SetValue(m_iClickCount); bHandled = true; } |
|
From: Rob W. <gre...@us...> - 2004-05-04 16:11:26
|
Update of /cvsroot/wgui/wgui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23997 Modified Files: CHANGES Log Message: Converted CProgressBar to inherit from CRangeControl Index: CHANGES =================================================================== RCS file: /cvsroot/wgui/wgui/CHANGES,v retrieving revision 1.138 retrieving revision 1.139 diff -C2 -d -r1.138 -r1.139 *** CHANGES 27 Apr 2004 18:13:49 -0000 1.138 --- CHANGES 4 May 2004 16:11:12 -0000 1.139 *************** *** 1,4 **** --- 1,5 ---- 0.3.2 -> 0.3.3 + Added CRangeControl class: An abstraction of all controls that have a value that's constricted to a certain range (progress bar, scroll bar, etc) + + Changed CProgressBar: CProgressBar now inherits from the CRangeControl class, so several methods have been renamed (primarily Get/SetProgress is now Get/SetValue) + Changed CScrollBar: CScrollBar now inherits from the CRangeControl class, so several methods have been renamed (primarily Get/SetPosition is now Get/SetValue) |
|
From: Rob W. <gre...@us...> - 2004-04-28 15:41:56
|
Update of /cvsroot/wgui/wgui/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8502/src Modified Files: wg_application.cpp wg_renderedstring.cpp Log Message: More informative error messages. Index: wg_renderedstring.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_renderedstring.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** wg_renderedstring.cpp 2 Apr 2004 17:26:16 -0000 1.14 --- wg_renderedstring.cpp 28 Apr 2004 15:41:46 -0000 1.15 *************** *** 43,47 **** if (! m_pFontEngine) { ! throw(Wg_Ex_App("CRenderedString::CRenderedString : Bad pFontEngine pointer!")); } } --- 43,47 ---- if (! m_pFontEngine) { ! throw(Wg_Ex_App("CRenderedString::CRenderedString : Bad pFontEngine pointer! (This is usually the result of the wgui.conf file missing or misconfigured. See the Global Config section of the docs.)")); } } Index: wg_application.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_application.cpp,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** wg_application.cpp 14 Apr 2004 16:21:21 -0000 1.51 --- wg_application.cpp 28 Apr 2004 15:41:46 -0000 1.52 *************** *** 188,191 **** --- 188,192 ---- // <home directory> // <current directory> + bool bConfigLoaded = false; // global directory first *************** *** 193,196 **** --- 194,198 ---- { m_AppLog.AddLogEntry("wGui Application config read from Global directory.", APP_LOG_INFO); + bConfigLoaded = true; } *************** *** 199,202 **** --- 201,205 ---- { m_AppLog.AddLogEntry("wGui Application config read from User directory.", APP_LOG_INFO); + bConfigLoaded = true; } *************** *** 205,208 **** --- 208,217 ---- { m_AppLog.AddLogEntry("wGui Application config read from Local directory.", APP_LOG_INFO); + bConfigLoaded = true; + } + + if (!bConfigLoaded) + { + m_AppLog.AddLogEntry("wGui Application config was not found (see Global Config section of the docs).", APP_LOG_WARNING); } *************** *** 220,226 **** } if (m_GlobalConfig.EntryExists("BACKGROUNDCOLOR")) { ! m_DefaultColorBG = CRGBColor(m_GlobalConfig.GetStringEntry("BACKGROUNDCOLOR").second); } --- 229,240 ---- } + if (!m_pDefaultFontEngine) + { + m_AppLog.AddLogEntry("wGui Application was unable to load a default font from the global config. Check to see that the specified paths are correct.", APP_LOG_WARNING); + } + if (m_GlobalConfig.EntryExists("BACKGROUNDCOLOR")) { ! m_DefaultColorBG = CRGBColor(m_GlobalConfig.GetStringEntry("BACKGROUNDCOLOR").second); } *************** *** 388,392 **** throw; } - wUtil::Trace("CApplication::GetFontEngine - Exception thrown while creating Font Engine : " + e.std_what()); } } --- 402,405 ---- |
|
From: Rob W. <gre...@us...> - 2004-04-27 18:14:02
|
Update of /cvsroot/wgui/wgui/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29743/src Modified Files: Makefile.am wg_listbox.cpp wg_scrollbar.cpp wg_textbox.cpp Removed Files: wg_range_control.cpp Log Message: Changed CScrollBar so it inherits from CRangeControl Index: wg_scrollbar.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_scrollbar.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** wg_scrollbar.cpp 8 Apr 2004 22:02:19 -0000 1.31 --- wg_scrollbar.cpp 27 Apr 2004 18:13:51 -0000 1.32 *************** *** 36,44 **** CScrollBar::CScrollBar(const CRect& WindowRect, CWindow* pParent, EScrollBarType ScrollBarType) : ! CWindow(WindowRect, pParent), m_ScrollBarType(ScrollBarType), - m_iMin(0), - m_iMax(100), - m_iPosition(0), m_iJumpAmount(5), m_bDragging(false) --- 36,41 ---- CScrollBar::CScrollBar(const CRect& WindowRect, CWindow* pParent, EScrollBarType ScrollBarType) : ! CRangeControl<int>(WindowRect, pParent, 0, 100, 1, 0), m_ScrollBarType(ScrollBarType), m_iJumpAmount(5), m_bDragging(false) *************** *** 72,76 **** } m_ThumbRect = GetClientRect(); ! SetPosition(0); CMessageServer::Instance().RegisterMessageClient(this, CMessage::MOUSE_BUTTONUP); CMessageServer::Instance().RegisterMessageClient(this, CMessage::MOUSE_MOVE); --- 69,73 ---- } m_ThumbRect = GetClientRect(); ! RepositionThumb(); CMessageServer::Instance().RegisterMessageClient(this, CMessage::MOUSE_BUTTONUP); CMessageServer::Instance().RegisterMessageClient(this, CMessage::MOUSE_MOVE); *************** *** 85,139 **** ! void CScrollBar::SetLimits(int iMin, int iMax) ! { ! m_iMin = iMin; ! m_iMax = iMax; ! StartDrawProc(); ! } ! ! ! void CScrollBar::SetPosition(int iPosition) { ! m_iPosition = iPosition; ! if (m_iPosition < m_iMin) ! { ! m_iPosition = m_iMin; ! } ! if (m_iPosition > m_iMax) ! { ! m_iPosition = m_iMax; ! } ! if (m_iMin != m_iMax) { ! switch (m_ScrollBarType) ! { ! case VERTICAL: ! { ! int iThumbHeight = GetClientRect().Height() / (m_iMax - m_iMin + 1); ! if (iThumbHeight < 10) ! { ! iThumbHeight = 10; ! } ! m_ThumbRect.SetTop(GetClientRect().Top() + (GetClientRect().Height() - iThumbHeight) * (m_iPosition - m_iMin) / (m_iMax - m_iMin) - 1); ! m_ThumbRect.SetBottom(m_ThumbRect.Top() + iThumbHeight); ! break; ! } ! case HORIZONTAL: ! { ! int iThumbWidth = GetClientRect().Width() / (m_iMax - m_iMin + 1); ! if (iThumbWidth < 10) ! { ! iThumbWidth = 10; ! } ! m_ThumbRect.SetLeft(GetClientRect().Left() + (GetClientRect().Width() - iThumbWidth) * (m_iPosition - m_iMin) / (m_iMax - m_iMin) - 1); ! m_ThumbRect.SetRight(m_ThumbRect.Left() + iThumbWidth); ! break; ! } ! default: ! throw(Wg_Ex_App("CScrollBar::SetPosition: Unrecognized ScrollBar Type.")); ! break; ! } } - StartDrawProc(); } --- 82,93 ---- ! void CScrollBar::SetValue(int iValue, bool bRedraw) // virtual { ! CRangeControl<int>::SetValue(iValue, false); ! RepositionThumb(); ! if (bRedraw) { ! StartDrawProc(); } } *************** *** 144,148 **** CPainter Painter(m_pSDLSurface); ! if (m_iMin != m_iMax) { Painter.DrawRect(m_ThumbRect, false, COLOR_BLACK); --- 98,102 ---- CPainter Painter(m_pSDLSurface); ! if (m_MinLimit != m_MaxLimit) { Painter.DrawRect(m_ThumbRect, false, COLOR_BLACK); *************** *** 160,164 **** CWindow::SetWindowRect(WindowRect); // Resposition the thumb rect and the button controls ! SetPosition(m_iPosition); switch (m_ScrollBarType) { --- 114,118 ---- CWindow::SetWindowRect(WindowRect); // Resposition the thumb rect and the button controls ! SetValue(m_Value); switch (m_ScrollBarType) { *************** *** 209,220 **** if (Button == CMouseMessage::WHEELUP) { ! SetPosition(m_iPosition - 1); ! CMessageServer::Instance().QueueMessage(new TIntMessage(CMessage::CTRL_VALUECHANGE, m_pParentWindow, this, m_iPosition)); bResult = true; } else if (Button == CMouseMessage::WHEELDOWN) { ! SetPosition(m_iPosition + 1); ! CMessageServer::Instance().QueueMessage(new TIntMessage(CMessage::CTRL_VALUECHANGE, m_pParentWindow, this, m_iPosition)); bResult = true; } --- 163,172 ---- if (Button == CMouseMessage::WHEELUP) { ! Decrement(); bResult = true; } else if (Button == CMouseMessage::WHEELDOWN) { ! Increment(); bResult = true; } *************** *** 228,239 **** case CRect::RELPOS_ABOVE: case CRect::RELPOS_LEFT: ! SetPosition(m_iPosition - m_iJumpAmount); break; case CRect::RELPOS_BELOW: case CRect::RELPOS_RIGHT: ! SetPosition(m_iPosition + m_iJumpAmount); break; } - CMessageServer::Instance().QueueMessage(new TIntMessage(CMessage::CTRL_VALUECHANGE, m_pParentWindow, this, m_iPosition)); bResult = true; } --- 180,190 ---- case CRect::RELPOS_ABOVE: case CRect::RELPOS_LEFT: ! SetValue(m_Value - m_iJumpAmount); break; case CRect::RELPOS_BELOW: case CRect::RELPOS_RIGHT: ! SetValue(m_Value + m_iJumpAmount); break; } bResult = true; } *************** *** 258,262 **** { m_bDragging = false; ! CMessageServer::Instance().QueueMessage(new TIntMessage(CMessage::CTRL_VALUECHANGE, m_pParentWindow, this, m_iPosition)); bHandled = true; } --- 209,213 ---- { m_bDragging = false; ! CMessageServer::Instance().QueueMessage(new TIntMessage(CMessage::CTRL_VALUECHANGE, m_pParentWindow, this, m_Value)); bHandled = true; } *************** *** 269,280 **** if (pMouseMessage) { ! int iOldPosition = m_iPosition; switch (m_ScrollBarType) { case VERTICAL: ! SetPosition((pMouseMessage->Point.YPos() - GetClientRect().Top()) * (m_iMax - m_iMin) / GetClientRect().Height() + m_iMin); break; case HORIZONTAL: ! SetPosition((pMouseMessage->Point.XPos() - GetClientRect().Left()) * (m_iMax - m_iMin) / GetClientRect().Width() + m_iMin); break; default: --- 220,233 ---- if (pMouseMessage) { ! int iOldPosition = m_Value; switch (m_ScrollBarType) { case VERTICAL: ! m_Value = ConstrainValue((pMouseMessage->Point.YPos() - GetClientRect().Top()) * ! (m_MaxLimit - m_MinLimit) / GetClientRect().Height() + m_MinLimit); break; case HORIZONTAL: ! m_Value = ConstrainValue((pMouseMessage->Point.XPos() - GetClientRect().Left()) * ! (m_MaxLimit - m_MinLimit) / GetClientRect().Width() + m_MinLimit); break; default: *************** *** 282,288 **** break; } ! if (iOldPosition != m_iPosition) { ! CMessageServer::Instance().QueueMessage(new TIntMessage(CMessage::CTRL_VALUECHANGING, m_pParentWindow, this, m_iPosition)); } } --- 235,243 ---- break; } ! if (iOldPosition != m_Value) { ! CMessageServer::Instance().QueueMessage(new TIntMessage(CMessage::CTRL_VALUECHANGING, m_pParentWindow, this, m_Value)); ! RepositionThumb(); ! StartDrawProc(); } } *************** *** 295,307 **** if (pMessage->Source() == m_pBtnUpLeft) { ! SetPosition(m_iPosition - 1); bHandled = true; } else if (pMessage->Source() == m_pBtnDownRight) { ! SetPosition(m_iPosition + 1); bHandled = true; } - CMessageServer::Instance().QueueMessage(new TIntMessage(CMessage::CTRL_VALUECHANGE, m_pParentWindow, this, m_iPosition)); } break; --- 250,261 ---- if (pMessage->Source() == m_pBtnUpLeft) { ! Decrement(); bHandled = true; } else if (pMessage->Source() == m_pBtnDownRight) { ! Increment(); bHandled = true; } } break; *************** *** 316,319 **** --- 270,309 ---- } + + void CScrollBar::RepositionThumb(void) // virtual + { + if (m_MinLimit != m_MaxLimit) + { + switch (m_ScrollBarType) + { + case VERTICAL: + { + int iThumbHeight = GetClientRect().Height() / (m_MaxLimit - m_MinLimit + 1); + if (iThumbHeight < 10) + { + iThumbHeight = 10; + } + m_ThumbRect.SetTop(GetClientRect().Top() + (GetClientRect().Height() - iThumbHeight) * (m_Value - m_MinLimit) / (m_MaxLimit - m_MinLimit) - 1); + m_ThumbRect.SetBottom(m_ThumbRect.Top() + iThumbHeight); + break; + } + case HORIZONTAL: + { + int iThumbWidth = GetClientRect().Width() / (m_MaxLimit - m_MinLimit + 1); + if (iThumbWidth < 10) + { + iThumbWidth = 10; + } + m_ThumbRect.SetLeft(GetClientRect().Left() + (GetClientRect().Width() - iThumbWidth) * (m_Value - m_MinLimit) / (m_MaxLimit - m_MinLimit) - 1); + m_ThumbRect.SetRight(m_ThumbRect.Left() + iThumbWidth); + break; + } + default: + throw(Wg_Ex_App("CScrollBar::RepositionThumb: Unrecognized ScrollBar Type.")); + break; + } + } + } + } Index: wg_listbox.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_listbox.cpp,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** wg_listbox.cpp 14 Apr 2004 16:21:21 -0000 1.36 --- wg_listbox.cpp 27 Apr 2004 18:13:51 -0000 1.37 *************** *** 53,57 **** m_pVScrollbar = new CScrollBar( CRect(ScrollbarRect.Right() - 12, ScrollbarRect.Top(), ScrollbarRect.Right(), ScrollbarRect.Bottom()) , this, CScrollBar::VERTICAL), ! m_pVScrollbar->SetLimits(0, 0); m_ClientRect = CRect(2, 2, m_WindowRect.Width() - 16, m_WindowRect.Height() - 4); m_BGColor = COLOR_WHITE; --- 53,57 ---- m_pVScrollbar = new CScrollBar( CRect(ScrollbarRect.Right() - 12, ScrollbarRect.Top(), ScrollbarRect.Right(), ScrollbarRect.Bottom()) , this, CScrollBar::VERTICAL), ! m_pVScrollbar->SetMaxLimit(0); m_ClientRect = CRect(2, 2, m_WindowRect.Width() - 16, m_WindowRect.Height() - 4); m_BGColor = COLOR_WHITE; *************** *** 82,86 **** m_RenderedStrings.push_back(CRenderedString(m_pFontEngine, ListItem.sItemText, CRenderedString::VALIGN_TOP, CRenderedString::HALIGN_LEFT)); int iMax = (m_Items.size() - 1) < 0 ? 0 : stdex::safe_static_cast<int>(m_Items.size() - 1); ! m_pVScrollbar->SetLimits(0, iMax); StartDrawProc(); return stdex::safe_static_cast<int>(m_Items.size()); --- 82,86 ---- m_RenderedStrings.push_back(CRenderedString(m_pFontEngine, ListItem.sItemText, CRenderedString::VALIGN_TOP, CRenderedString::HALIGN_LEFT)); int iMax = (m_Items.size() - 1) < 0 ? 0 : stdex::safe_static_cast<int>(m_Items.size() - 1); ! m_pVScrollbar->SetMaxLimit(iMax); StartDrawProc(); return stdex::safe_static_cast<int>(m_Items.size()); *************** *** 95,99 **** m_SelectedItems.erase(m_SelectedItems.begin() + iItemIndex); int iMax = (m_Items.size() - 1) < 0 ? 0 : stdex::safe_static_cast<int>(m_Items.size() - 1); ! m_pVScrollbar->SetLimits(0, iMax); StartDrawProc(); } --- 95,99 ---- m_SelectedItems.erase(m_SelectedItems.begin() + iItemIndex); int iMax = (m_Items.size() - 1) < 0 ? 0 : stdex::safe_static_cast<int>(m_Items.size() - 1); ! m_pVScrollbar->SetMaxLimit(iMax); StartDrawProc(); } *************** *** 105,109 **** m_Items.clear(); m_SelectedItems.clear(); ! m_pVScrollbar->SetLimits(0, 0); StartDrawProc(); } --- 105,109 ---- m_Items.clear(); m_SelectedItems.clear(); ! m_pVScrollbar->SetMaxLimit(0); StartDrawProc(); } *************** *** 133,137 **** Painter.DrawRect(m_WindowRect, false, COLOR_BLACK); CRect ClientRect(GetClientRect()); ! int iStartIndex = m_pVScrollbar->GetPosition(); for (unsigned int i = iStartIndex; i < m_Items.size(); ++i) { --- 133,137 ---- Painter.DrawRect(m_WindowRect, false, COLOR_BLACK); CRect ClientRect(GetClientRect()); ! int iStartIndex = m_pVScrollbar->GetValue(); for (unsigned int i = iStartIndex; i < m_Items.size(); ++i) { *************** *** 185,189 **** { // Prep the new selection ! m_iFocusedItem = (Point.YPos() - ClientRect.Top()) / m_iItemHeight + m_pVScrollbar->GetPosition(); StartDrawProc(); } --- 185,189 ---- { // Prep the new selection ! m_iFocusedItem = (Point.YPos() - ClientRect.Top()) / m_iItemHeight + m_pVScrollbar->GetValue(); StartDrawProc(); } *************** *** 203,207 **** (Button == CMouseMessage::LEFT)) { ! if (m_iFocusedItem == stdex::safe_static_cast<int>((Point.YPos() - ClientRect.Top()) / m_iItemHeight + m_pVScrollbar->GetPosition())) { if (m_bSingleSelection) --- 203,207 ---- (Button == CMouseMessage::LEFT)) { ! if (m_iFocusedItem == stdex::safe_static_cast<int>((Point.YPos() - ClientRect.Top()) / m_iItemHeight + m_pVScrollbar->GetValue())) { if (m_bSingleSelection) *************** *** 245,253 **** { m_iFocusedItem++; ! int diff = m_iFocusedItem - m_pVScrollbar->GetPosition(); CRect ClientRect(GetClientRect()); ! if (m_iItemHeight * (m_pVScrollbar->GetPosition() + diff + 1) > (unsigned int) ClientRect.Height()) { ! m_pVScrollbar->SetPosition(m_pVScrollbar->GetPosition() + 1); } --- 245,253 ---- { m_iFocusedItem++; ! int diff = m_iFocusedItem - m_pVScrollbar->GetValue(); CRect ClientRect(GetClientRect()); ! if (m_iItemHeight * (m_pVScrollbar->GetValue() + diff + 1) > (unsigned int) ClientRect.Height()) { ! m_pVScrollbar->SetValue(m_pVScrollbar->GetValue() + 1); } *************** *** 262,268 **** { m_iFocusedItem--; ! if (m_iFocusedItem < m_pVScrollbar->GetPosition()) { ! m_pVScrollbar->SetPosition(m_pVScrollbar->GetPosition() - 1); } StartDrawProc(); --- 262,268 ---- { m_iFocusedItem--; ! if (m_iFocusedItem < m_pVScrollbar->GetValue()) { ! m_pVScrollbar->SetValue(m_pVScrollbar->GetValue() - 1); } StartDrawProc(); *************** *** 284,288 **** m_iFocusedItem = nSize; } ! m_pVScrollbar->SetPosition(m_iFocusedItem); StartDrawProc(); bHandled=true; --- 284,288 ---- m_iFocusedItem = nSize; } ! m_pVScrollbar->SetValue(m_iFocusedItem); StartDrawProc(); bHandled=true; *************** *** 301,305 **** m_iFocusedItem = 0; } ! m_pVScrollbar->SetPosition(m_iFocusedItem); StartDrawProc(); bHandled=true; --- 301,305 ---- m_iFocusedItem = 0; } ! m_pVScrollbar->SetValue(m_iFocusedItem); StartDrawProc(); bHandled=true; Index: wg_textbox.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_textbox.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** wg_textbox.cpp 23 Apr 2004 03:00:14 -0000 1.17 --- wg_textbox.cpp 27 Apr 2004 18:13:51 -0000 1.18 *************** *** 61,67 **** m_pFontEngine = CApplication::Instance()->GetDefaultFontEngine(); } ! m_pDblClickTimer = new CTimer(); ! m_pCursorTimer = new CTimer(this); CRect ScrollbarRect(m_WindowRect); ScrollbarRect.Grow(-1); --- 61,67 ---- m_pFontEngine = CApplication::Instance()->GetDefaultFontEngine(); } ! m_pDblClickTimer = new CTimer(); ! m_pCursorTimer = new CTimer(this); CRect ScrollbarRect(m_WindowRect); ScrollbarRect.Grow(-1); *************** *** 73,77 **** m_ScrollBarVisibilityMap[CScrollBar::HORIZONTAL] = SCROLLBAR_VIS_AUTO; PrepareWindowText(""); ! CMessageServer::Instance().RegisterMessageClient(this, CMessage::KEYBOARD_KEYDOWN); CMessageServer::Instance().RegisterMessageClient(this, CMessage::MOUSE_BUTTONUP); --- 73,77 ---- m_ScrollBarVisibilityMap[CScrollBar::HORIZONTAL] = SCROLLBAR_VIS_AUTO; PrepareWindowText(""); ! CMessageServer::Instance().RegisterMessageClient(this, CMessage::KEYBOARD_KEYDOWN); CMessageServer::Instance().RegisterMessageClient(this, CMessage::MOUSE_BUTTONUP); *************** *** 93,99 **** delete m_pCursorTimer; ! delete m_pDblClickTimer; ! // This shouldn't be necessary, as these are children of the control and should be deleted automatically // delete m_pHorizontalScrollBar; // delete m_pVerticalScrollBar; --- 93,99 ---- delete m_pCursorTimer; ! delete m_pDblClickTimer; ! // This shouldn't be necessary, as these are children of the control and should be deleted automatically // delete m_pHorizontalScrollBar; // delete m_pVerticalScrollBar; *************** *** 155,159 **** UpdateScrollBars(); } ! void CTextBox::Draw(void) const // virtual --- 155,159 ---- UpdateScrollBars(); } ! void CTextBox::Draw(void) const // virtual *************** *** 181,185 **** CPoint SelStartPoint(RowColFromIndex(SelStartNorm)); CPoint SelEndPoint(RowColFromIndex(SelStartNorm + SelLenNorm)); ! std::vector<CPoint> vOffsets; std::vector<CPoint> vBoundingDimensions; --- 181,185 ---- CPoint SelStartPoint(RowColFromIndex(SelStartNorm)); CPoint SelEndPoint(RowColFromIndex(SelStartNorm + SelLenNorm)); ! std::vector<CPoint> vOffsets; std::vector<CPoint> vBoundingDimensions; *************** *** 198,221 **** // move the cursor into view by scrolling if necessary ! int CursorPos = vCharRects[SelStartPoint.YPos()][SelStartPoint.XPos()].Left() + vOffsets[SelStartPoint.YPos()].XPos() + TextRect.Left() - m_pHorizontalScrollBar->GetPosition() * 10; if (m_bScrollToCursor) { if (CursorPos < TextRect.Left()) { ! m_pHorizontalScrollBar->SetPosition(m_pHorizontalScrollBar->GetPosition() - (TextRect.Left() - CursorPos) / 10 - 1); ! CursorPos = vCharRects[SelStartPoint.YPos()][SelStartPoint.XPos()].Left() + vOffsets[SelStartPoint.YPos()].XPos() + TextRect.Left() - m_pHorizontalScrollBar->GetPosition() * 10; } if (CursorPos > TextRect.Right()) { ! m_pHorizontalScrollBar->SetPosition(m_pHorizontalScrollBar->GetPosition() + (CursorPos - TextRect.Right()) / 10 + 1); ! CursorPos = vCharRects[SelStartPoint.YPos()][SelStartPoint.XPos()].Left() + vOffsets[SelStartPoint.YPos()].XPos() + TextRect.Left() - m_pHorizontalScrollBar->GetPosition() * 10; } ! if (SelStartPoint.YPos() < m_pVerticalScrollBar->GetPosition()) { ! m_pVerticalScrollBar->SetPosition(SelStartPoint.YPos()); } ! if (SelStartPoint.YPos() > stdex::safe_static_cast<int>(m_pVerticalScrollBar->GetPosition() + m_ClientRect.Height() / m_iRowHeight)) { ! m_pVerticalScrollBar->SetPosition(SelStartPoint.YPos() - m_ClientRect.Height() / m_iRowHeight); } m_bScrollToCursor = false; --- 198,221 ---- // move the cursor into view by scrolling if necessary ! int CursorPos = vCharRects[SelStartPoint.YPos()][SelStartPoint.XPos()].Left() + vOffsets[SelStartPoint.YPos()].XPos() + TextRect.Left() - m_pHorizontalScrollBar->GetValue() * 10; if (m_bScrollToCursor) { if (CursorPos < TextRect.Left()) { ! m_pHorizontalScrollBar->SetValue(m_pHorizontalScrollBar->GetValue() - (TextRect.Left() - CursorPos) / 10 - 1); ! CursorPos = vCharRects[SelStartPoint.YPos()][SelStartPoint.XPos()].Left() + vOffsets[SelStartPoint.YPos()].XPos() + TextRect.Left() - m_pHorizontalScrollBar->GetValue() * 10; } if (CursorPos > TextRect.Right()) { ! m_pHorizontalScrollBar->SetValue(m_pHorizontalScrollBar->GetValue() + (CursorPos - TextRect.Right()) / 10 + 1); ! CursorPos = vCharRects[SelStartPoint.YPos()][SelStartPoint.XPos()].Left() + vOffsets[SelStartPoint.YPos()].XPos() + TextRect.Left() - m_pHorizontalScrollBar->GetValue() * 10; } ! if (SelStartPoint.YPos() < m_pVerticalScrollBar->GetValue()) { ! m_pVerticalScrollBar->SetValue(SelStartPoint.YPos()); } ! if (SelStartPoint.YPos() > stdex::safe_static_cast<int>(m_pVerticalScrollBar->GetValue() + m_ClientRect.Height() / m_iRowHeight)) { ! m_pVerticalScrollBar->SetValue(SelStartPoint.YPos() - m_ClientRect.Height() / m_iRowHeight); } m_bScrollToCursor = false; *************** *** 223,239 **** // Selection ! if (m_SelLength != 0 && SelEndPoint.YPos() >= m_pVerticalScrollBar->GetPosition()) { for (int CurLine = SelStartPoint.YPos(); CurLine <= SelEndPoint.YPos(); ++CurLine) { ! CPoint TopLeft = TextRect.TopLeft() + CPoint(0, m_iRowHeight * (CurLine - m_pVerticalScrollBar->GetPosition())); CRect SelRect(TopLeft, TopLeft + CPoint(vBoundingDimensions[CurLine].XPos(), m_iRowHeight - 2)); if (CurLine == SelStartPoint.YPos()) { ! SelRect.SetLeft(vCharRects[CurLine][SelStartPoint.XPos()].Left() + vOffsets[CurLine].XPos() + TextRect.Left() - m_pHorizontalScrollBar->GetPosition() * 10); } if (CurLine == SelEndPoint.YPos()) { ! SelRect.SetRight(vCharRects[CurLine][SelEndPoint.XPos() - 1].Right() + vOffsets[CurLine].XPos() + TextRect.Left() - m_pHorizontalScrollBar->GetPosition() * 10); } SelRect.ClipTo(TextRect); --- 223,239 ---- // Selection ! if (m_SelLength != 0 && SelEndPoint.YPos() >= m_pVerticalScrollBar->GetValue()) { for (int CurLine = SelStartPoint.YPos(); CurLine <= SelEndPoint.YPos(); ++CurLine) { ! CPoint TopLeft = TextRect.TopLeft() + CPoint(0, m_iRowHeight * (CurLine - m_pVerticalScrollBar->GetValue())); CRect SelRect(TopLeft, TopLeft + CPoint(vBoundingDimensions[CurLine].XPos(), m_iRowHeight - 2)); if (CurLine == SelStartPoint.YPos()) { ! SelRect.SetLeft(vCharRects[CurLine][SelStartPoint.XPos()].Left() + vOffsets[CurLine].XPos() + TextRect.Left() - m_pHorizontalScrollBar->GetValue() * 10); } if (CurLine == SelEndPoint.YPos()) { ! SelRect.SetRight(vCharRects[CurLine][SelEndPoint.XPos() - 1].Right() + vOffsets[CurLine].XPos() + TextRect.Left() - m_pHorizontalScrollBar->GetValue() * 10); } SelRect.ClipTo(TextRect); *************** *** 242,258 **** } ! if (m_SelLength == 0 && SelStartPoint.YPos() >= m_pVerticalScrollBar->GetPosition() && m_bDrawCursor) { //RenderStringWithCursor if (CursorPos >= TextRect.Left() && CursorPos <= TextRect.Right()) { ! Painter.DrawVLine(TextRect.Top() + m_iRowHeight * (SelStartPoint.YPos() - m_pVerticalScrollBar->GetPosition()) - 1, ! TextRect.Top() + m_iRowHeight * (SelStartPoint.YPos() - m_pVerticalScrollBar->GetPosition() + 1) - 1, CursorPos, COLOR_BLACK); } } } ! CPoint LineOrigin = TextRect.TopLeft() - CPoint(m_pHorizontalScrollBar->GetPosition() * 10, 0); ! for(std::vector<CRenderedString*>::const_iterator iter = m_vpRenderedString.begin() + m_pVerticalScrollBar->GetPosition(); iter != m_vpRenderedString.end() && LineOrigin.YPos() < TextRect.Bottom(); ++iter) { (*iter)->Draw(m_pSDLSurface, TextRect, LineOrigin, FontColor); --- 242,258 ---- } ! if (m_SelLength == 0 && SelStartPoint.YPos() >= m_pVerticalScrollBar->GetValue() && m_bDrawCursor) { //RenderStringWithCursor if (CursorPos >= TextRect.Left() && CursorPos <= TextRect.Right()) { ! Painter.DrawVLine(TextRect.Top() + m_iRowHeight * (SelStartPoint.YPos() - m_pVerticalScrollBar->GetValue()) - 1, ! TextRect.Top() + m_iRowHeight * (SelStartPoint.YPos() - m_pVerticalScrollBar->GetValue() + 1) - 1, CursorPos, COLOR_BLACK); } } } ! CPoint LineOrigin = TextRect.TopLeft() - CPoint(m_pHorizontalScrollBar->GetValue() * 10, 0); ! for(std::vector<CRenderedString*>::const_iterator iter = m_vpRenderedString.begin() + m_pVerticalScrollBar->GetValue(); iter != m_vpRenderedString.end() && LineOrigin.YPos() < TextRect.Bottom(); ++iter) { (*iter)->Draw(m_pSDLSurface, TextRect, LineOrigin, FontColor); *************** *** 303,307 **** fSkipCursorPositioning = true; } ! if (CApplication::Instance()->GetKeyFocus() != this) { --- 303,307 ---- fSkipCursorPositioning = true; } ! if (CApplication::Instance()->GetKeyFocus() != this) { *************** *** 322,328 **** vCharRects.push_back(CharRects); } ! CRect TextRect(GetClientRect()); ! unsigned int iCurLine = (Point.YPos() - TextRect.Top()) / m_iRowHeight + m_pVerticalScrollBar->GetPosition(); if (iCurLine > m_iLineCount) { --- 322,328 ---- vCharRects.push_back(CharRects); } ! CRect TextRect(GetClientRect()); ! unsigned int iCurLine = (Point.YPos() - TextRect.Top()) / m_iRowHeight + m_pVerticalScrollBar->GetValue(); if (iCurLine > m_iLineCount) { *************** *** 333,339 **** for (unsigned int i = 0; i < vCharRects[iCurLine].size(); ++i) { ! if (abs(Point.XPos() - (vCharRects[iCurLine][i].Right() + vOffsets[iCurLine].XPos() + TextRect.Left() - m_pHorizontalScrollBar->GetPosition() * 10)) < xDelta) { ! xDelta = abs(Point.XPos() - (vCharRects[iCurLine][i].Right() + vOffsets[iCurLine].XPos() + TextRect.Left() - m_pHorizontalScrollBar->GetPosition() * 10)); m_SelStart = i + 1; } --- 333,339 ---- for (unsigned int i = 0; i < vCharRects[iCurLine].size(); ++i) { ! if (abs(Point.XPos() - (vCharRects[iCurLine][i].Right() + vOffsets[iCurLine].XPos() + TextRect.Left() - m_pHorizontalScrollBar->GetValue() * 10)) < xDelta) { ! xDelta = abs(Point.XPos() - (vCharRects[iCurLine][i].Right() + vOffsets[iCurLine].XPos() + TextRect.Left() - m_pHorizontalScrollBar->GetValue() * 10)); m_SelStart = i + 1; } *************** *** 344,348 **** } } ! m_DragStart = m_SelStart; m_SelLength = 0; --- 344,348 ---- } } ! m_DragStart = m_SelStart; m_SelLength = 0; *************** *** 353,362 **** if (Button == CMouseMessage::WHEELUP) { ! m_pVerticalScrollBar->SetPosition(m_pVerticalScrollBar->GetPosition() - 1); bResult = true; } else if (Button == CMouseMessage::WHEELDOWN) { ! m_pVerticalScrollBar->SetPosition(m_pVerticalScrollBar->GetPosition() + 1); bResult = true; } --- 353,362 ---- if (Button == CMouseMessage::WHEELUP) { ! m_pVerticalScrollBar->SetValue(m_pVerticalScrollBar->GetValue() - 1); bResult = true; } else if (Button == CMouseMessage::WHEELDOWN) { ! m_pVerticalScrollBar->SetValue(m_pVerticalScrollBar->GetValue() + 1); bResult = true; } *************** *** 385,389 **** bHandled = true; } ! break; case CMessage::MOUSE_BUTTONUP: m_bMouseDown = false; --- 385,389 ---- bHandled = true; } ! break; case CMessage::MOUSE_BUTTONUP: m_bMouseDown = false; *************** *** 428,432 **** if (GetClientRect().HitTest(pMouseMessage->Point) == CRect::RELPOS_INSIDE) { ! iCurLine = (pMouseMessage->Point.YPos() - TextRect.Top()) / m_iRowHeight + m_pVerticalScrollBar->GetPosition(); } else if (GetClientRect().HitTest(pMouseMessage->Point) == CRect::RELPOS_BELOW) --- 428,432 ---- if (GetClientRect().HitTest(pMouseMessage->Point) == CRect::RELPOS_INSIDE) { ! iCurLine = (pMouseMessage->Point.YPos() - TextRect.Top()) / m_iRowHeight + m_pVerticalScrollBar->GetValue(); } else if (GetClientRect().HitTest(pMouseMessage->Point) == CRect::RELPOS_BELOW) *************** *** 438,444 **** for (unsigned int i = 0; i < vCharRects[iCurLine].size(); ++i) { ! if (abs(pMouseMessage->Point.XPos() - (vCharRects[iCurLine][i].Right() + vOffsets[iCurLine].XPos() + TextRect.Left() - m_pHorizontalScrollBar->GetPosition() * 10)) < xDelta) { ! xDelta = abs(pMouseMessage->Point.XPos() - (vCharRects[iCurLine][i].Right() + vOffsets[iCurLine].XPos() + TextRect.Left() - m_pHorizontalScrollBar->GetPosition() * 10)); CursorPos = i + 1; } --- 438,444 ---- for (unsigned int i = 0; i < vCharRects[iCurLine].size(); ++i) { ! if (abs(pMouseMessage->Point.XPos() - (vCharRects[iCurLine][i].Right() + vOffsets[iCurLine].XPos() + TextRect.Left() - m_pHorizontalScrollBar->GetValue() * 10)) < xDelta) { ! xDelta = abs(pMouseMessage->Point.XPos() - (vCharRects[iCurLine][i].Right() + vOffsets[iCurLine].XPos() + TextRect.Left() - m_pHorizontalScrollBar->GetValue() * 10)); CursorPos = i + 1; } *************** *** 819,823 **** delete *iter; m_vpRenderedString.clear(); ! m_iLineCount = 0; std::string::size_type start = 0; --- 819,823 ---- delete *iter; m_vpRenderedString.clear(); ! m_iLineCount = 0; std::string::size_type start = 0; *************** *** 847,853 **** { m_ClientRect = CRect(3, 3, m_WindowRect.Width() - 5, m_WindowRect.Height() - 5); ! bool bVertVisible = m_ScrollBarVisibilityMap[CScrollBar::VERTICAL] == SCROLLBAR_VIS_ALWAYS || (m_ScrollBarVisibilityMap[CScrollBar::VERTICAL] == SCROLLBAR_VIS_AUTO && m_iLineCount > (m_ClientRect.Height() - 12) / m_iRowHeight); ! bool bHorzVisible = m_ScrollBarVisibilityMap[CScrollBar::HORIZONTAL] == SCROLLBAR_VIS_ALWAYS || (m_ScrollBarVisibilityMap[CScrollBar::HORIZONTAL] == SCROLLBAR_VIS_AUTO && stdex::safe_static_cast<int>(m_iMaxWidth) > (m_ClientRect.Width() - 12)); int iMaxHorzLimit = (stdex::safe_static_cast<int>(m_iMaxWidth) - (m_ClientRect.Width() - 12)) / 10; --- 847,853 ---- { m_ClientRect = CRect(3, 3, m_WindowRect.Width() - 5, m_WindowRect.Height() - 5); ! bool bVertVisible = m_ScrollBarVisibilityMap[CScrollBar::VERTICAL] == SCROLLBAR_VIS_ALWAYS || (m_ScrollBarVisibilityMap[CScrollBar::VERTICAL] == SCROLLBAR_VIS_AUTO && m_iLineCount > (m_ClientRect.Height() - 12) / m_iRowHeight); ! bool bHorzVisible = m_ScrollBarVisibilityMap[CScrollBar::HORIZONTAL] == SCROLLBAR_VIS_ALWAYS || (m_ScrollBarVisibilityMap[CScrollBar::HORIZONTAL] == SCROLLBAR_VIS_AUTO && stdex::safe_static_cast<int>(m_iMaxWidth) > (m_ClientRect.Width() - 12)); int iMaxHorzLimit = (stdex::safe_static_cast<int>(m_iMaxWidth) - (m_ClientRect.Width() - 12)) / 10; *************** *** 856,860 **** iMaxHorzLimit = 0; } ! m_pVerticalScrollBar->SetVisible(bVertVisible); m_pHorizontalScrollBar->SetVisible(bHorzVisible); --- 856,860 ---- iMaxHorzLimit = 0; } ! m_pVerticalScrollBar->SetVisible(bVertVisible); m_pHorizontalScrollBar->SetVisible(bHorzVisible); *************** *** 865,872 **** } m_ClientRect.SetRight(m_WindowRect.Width() - 17); ! m_pVerticalScrollBar->SetLimits(0, iLastLine); ! if (m_pVerticalScrollBar->GetPosition() > iLastLine) { ! m_pVerticalScrollBar->SetPosition(iLastLine); } int iBottom = m_WindowRect.Bottom() - 1; --- 865,872 ---- } m_ClientRect.SetRight(m_WindowRect.Width() - 17); ! m_pVerticalScrollBar->SetMaxLimit(iLastLine); ! if (m_pVerticalScrollBar->GetValue() > iLastLine) { ! m_pVerticalScrollBar->SetValue(iLastLine); } int iBottom = m_WindowRect.Bottom() - 1; *************** *** 877,884 **** m_pVerticalScrollBar->SetWindowRect(CRect(m_WindowRect.Right() - 13, m_WindowRect.Top() + 1, m_WindowRect.Right() - 1, iBottom)); m_ClientRect.SetBottom(m_WindowRect.Height() - 17); ! m_pHorizontalScrollBar->SetLimits(0, iMaxHorzLimit); ! if (m_pHorizontalScrollBar->GetPosition() > iMaxHorzLimit) { ! m_pHorizontalScrollBar->SetPosition(iMaxHorzLimit); } int iRight = m_WindowRect.Right() - 1; --- 877,884 ---- m_pVerticalScrollBar->SetWindowRect(CRect(m_WindowRect.Right() - 13, m_WindowRect.Top() + 1, m_WindowRect.Right() - 1, iBottom)); m_ClientRect.SetBottom(m_WindowRect.Height() - 17); ! m_pHorizontalScrollBar->SetMaxLimit(iMaxHorzLimit); ! if (m_pHorizontalScrollBar->GetValue() > iMaxHorzLimit) { ! m_pHorizontalScrollBar->SetValue(iMaxHorzLimit); } int iRight = m_WindowRect.Right() - 1; *************** *** 889,893 **** m_pHorizontalScrollBar->SetWindowRect(CRect(m_WindowRect.Left() + 1, m_WindowRect.Bottom() - 13, iRight, m_WindowRect.Bottom() - 1)); } ! CPoint CTextBox::RowColFromIndex(std::string::size_type Index) const --- 889,893 ---- m_pHorizontalScrollBar->SetWindowRect(CRect(m_WindowRect.Left() + 1, m_WindowRect.Bottom() - 13, iRight, m_WindowRect.Bottom() - 1)); } ! CPoint CTextBox::RowColFromIndex(std::string::size_type Index) const Index: Makefile.am =================================================================== RCS file: /cvsroot/wgui/wgui/src/Makefile.am,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Makefile.am 26 Apr 2004 22:38:00 -0000 1.11 --- Makefile.am 27 Apr 2004 18:13:51 -0000 1.12 *************** *** 30,34 **** wg_point.cpp \ wg_progress.cpp \ - wg_range_control.cpp \ wg_rect.cpp \ wg_renderedstring.cpp \ --- 30,33 ---- --- wg_range_control.cpp DELETED --- |
|
From: Rob W. <gre...@us...> - 2004-04-27 18:13:59
|
Update of /cvsroot/wgui/wgui/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29743/includes Modified Files: wg_range_control.h wg_scrollbar.h Log Message: Changed CScrollBar so it inherits from CRangeControl Index: wg_scrollbar.h =================================================================== RCS file: /cvsroot/wgui/wgui/includes/wg_scrollbar.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** wg_scrollbar.h 6 Apr 2004 20:47:43 -0000 1.21 --- wg_scrollbar.h 27 Apr 2004 18:13:50 -0000 1.22 *************** *** 26,30 **** #define _WG_SCROLLBAR_H_ ! #include "wg_window.h" #include "wg_painter.h" #include "wg_button.h" --- 26,30 ---- #define _WG_SCROLLBAR_H_ ! #include "wg_range_control.h" #include "wg_painter.h" #include "wg_button.h" *************** *** 36,40 **** //! A scroll bar ! class CScrollBar : public CWindow { public: --- 36,40 ---- //! A scroll bar ! class CScrollBar : public CRangeControl<int> { public: *************** *** 55,79 **** virtual ~CScrollBar(void); - //! Set the limits of the scroll bar - void SetLimits(int Min, int Max); - - //! \return The minimum limit of the scroll bar - int GetMinLimit(void) { return m_iMin; } - - //! \return The maximum limit of the scroll bar - int GetMaxLimit(void) { return m_iMax; } - - //! Set the current thumb position - void SetPosition(int iPosition); - - //! \return The current progress value - int GetPosition(void) { return m_iPosition; } - //! Set the amount to jump by when the area below or above the thumb is clicked (this is 5 by default) //! \param iJumpAmount The amount to step by ! void SetJumpAmount(int iJumpAmount) { m_iJumpAmount = iJumpAmount; } //! \return The amount the scrollbar jumps by when clicked above or below the thumb ! int GetJumpAmount(void) { return m_iJumpAmount; } --- 55,71 ---- virtual ~CScrollBar(void); //! Set the amount to jump by when the area below or above the thumb is clicked (this is 5 by default) //! \param iJumpAmount The amount to step by ! virtual void SetJumpAmount(int iJumpAmount) { m_iJumpAmount = iJumpAmount; } //! \return The amount the scrollbar jumps by when clicked above or below the thumb ! virtual int GetJumpAmount(void) const { return m_iJumpAmount; } ! ! ! // CRangeControl overrides ! //! Set the current value. ! //! \param value The new value for the control ! //! \param bRedraw indicates if the control should be redrawn (defaults to true) ! virtual void SetValue(int iValue, bool bRedraw = true); *************** *** 104,112 **** ! private: EScrollBarType m_ScrollBarType; //!< The type of scroll bar - int m_iMin; //!< The minimum value of the scroll bar - int m_iMax; //!< The maximum value of the scroll bar - int m_iPosition; //!< The current position of the scroll bar thumb int m_iJumpAmount; //!< The amount to jump when the area below or above the thumb is clicked CPictureButton* m_pBtnUpLeft; //!< A pointer to the Up or Left button --- 96,104 ---- ! protected: ! //! Repositions the thumb according to the value ! virtual void RepositionThumb(void); ! EScrollBarType m_ScrollBarType; //!< The type of scroll bar int m_iJumpAmount; //!< The amount to jump when the area below or above the thumb is clicked CPictureButton* m_pBtnUpLeft; //!< A pointer to the Up or Left button Index: wg_range_control.h =================================================================== RCS file: /cvsroot/wgui/wgui/includes/wg_range_control.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wg_range_control.h 26 Apr 2004 22:38:00 -0000 1.1 --- wg_range_control.h 27 Apr 2004 18:13:50 -0000 1.2 *************** *** 32,36 **** { ! //! An abstract class that handles all the basics of a control that uses a value that is constrained to a certain range //! Sends a CTRL_VALUECHANGE message whenever the value changes --- 32,36 ---- { ! //! A template class that handles all the basics of a control that uses a value that is constrained to a certain range //! Sends a CTRL_VALUECHANGE message whenever the value changes *************** *** 50,84 **** //! Set the lower limit for the control ! void SetMinLimit(T minLimit) { m_MinLimit = minLimit; } //! \return The minimum limit of the progress bar ! T GetMinLimit(void) const { return m_MinLimit; } //! Set the upper limit for the control ! void SetMaxLimit(T maxLimit) { m_MaxLimit = maxLimit; } //! \return The maximum limit of the progress bar ! T GetMaxLimit(void) const { return m_MaxLimit; } //! Set the current steo size. ! void SetStepSize(T stepSize); //! \return The current step size ! T GetStepSize(void) const { return m_StepSize; } //! Set the current value. ! void SetValue(T value); //! \return The current value ! T GetValue(void) const { return m_Value; } //! Increase the value by one step size ! void Increment(void); //! Decrease the value by one step size ! void Decrement(void); ! private: T m_MinLimit; //!< The minimum value of the control T m_MaxLimit; //!< The maximum value of the control --- 50,116 ---- //! Set the lower limit for the control ! //! \param minLimit The lower limit of the control ! virtual void SetMinLimit(T minLimit) { m_MinLimit = minLimit; } //! \return The minimum limit of the progress bar ! virtual T GetMinLimit(void) const { return m_MinLimit; } //! Set the upper limit for the control ! //! \param maxLimit The upper limit of the control ! virtual void SetMaxLimit(T maxLimit) { m_MaxLimit = maxLimit; } //! \return The maximum limit of the progress bar ! virtual T GetMaxLimit(void) const { return m_MaxLimit; } //! Set the current steo size. ! //! \param stepSize The amount to increment the value by for Increment() and Decrement() calls ! virtual void SetStepSize(T stepSize) { m_StepSize = stepSize; } //! \return The current step size ! virtual T GetStepSize(void) const { return m_StepSize; } //! Set the current value. ! //! \param value The new value for the control ! //! \param bRedraw indicates if the control should be redrawn (defaults to true) ! virtual void SetValue(T value, bool bRedraw = true) ! { ! m_Value = ConstrainValue(value); ! CMessageServer::Instance().QueueMessage(new CValueMessage<T>(CMessage::CTRL_VALUECHANGE, m_pParentWindow, this, m_Value)); ! ! if (bRedraw) ! { ! StartDrawProc(); ! } ! } //! \return The current value ! virtual T GetValue(void) const { return m_Value; } //! Increase the value by one step size ! //! \param bRedraw indicates if the control should be redrawn (defaults to true) ! virtual void Increment(bool bRedraw = true) { SetValue(m_Value + m_StepSize, bRedraw); } //! Decrease the value by one step size ! //! \param bRedraw indicates if the control should be redrawn (defaults to true) ! virtual void Decrement(bool bRedraw = true) { SetValue(m_Value - m_StepSize, bRedraw); } ! ! //! takes the value and makes sure it's in it's limits ! //! \param value The value to be checked ! //! \return The closest value that's within the limits ! virtual T ConstrainValue(T value) const ! { ! if (value < m_MinLimit) ! { ! value = m_MinLimit; ! } ! if (value > m_MaxLimit) ! { ! value = m_MaxLimit; ! } ! return value; ! } ! protected: T m_MinLimit; //!< The minimum value of the control T m_MaxLimit; //!< The maximum value of the control |
|
From: Rob W. <gre...@us...> - 2004-04-27 18:13:59
|
Update of /cvsroot/wgui/wgui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29743 Modified Files: CHANGES wGui-VS7.vcproj wGui-VS71.vcproj wgui.dsp Log Message: Changed CScrollBar so it inherits from CRangeControl Index: CHANGES =================================================================== RCS file: /cvsroot/wgui/wgui/CHANGES,v retrieving revision 1.137 retrieving revision 1.138 diff -C2 -d -r1.137 -r1.138 *** CHANGES 26 Apr 2004 22:38:00 -0000 1.137 --- CHANGES 27 Apr 2004 18:13:49 -0000 1.138 *************** *** 1,4 **** --- 1,5 ---- 0.3.2 -> 0.3.3 + Added CRangeControl class: An abstraction of all controls that have a value that's constricted to a certain range (progress bar, scroll bar, etc) + + Changed CScrollBar: CScrollBar now inherits from the CRangeControl class, so several methods have been renamed (primarily Get/SetPosition is now Get/SetValue) Index: wgui.dsp =================================================================== RCS file: /cvsroot/wgui/wgui/wgui.dsp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** wgui.dsp 26 Apr 2004 22:38:00 -0000 1.10 --- wgui.dsp 27 Apr 2004 18:13:49 -0000 1.11 *************** *** 172,179 **** # Begin Source File - SOURCE=src\wg_range_control.cpp - # End Source File - # Begin Source File - SOURCE=src\wg_rect.cpp # End Source File --- 172,175 ---- Index: wGui-VS7.vcproj =================================================================== RCS file: /cvsroot/wgui/wgui/wGui-VS7.vcproj,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wGui-VS7.vcproj 26 Apr 2004 22:38:00 -0000 1.18 --- wGui-VS7.vcproj 27 Apr 2004 18:13:49 -0000 1.19 *************** *** 162,168 **** </File> <File - RelativePath="src\wg_range_control.cpp"> - </File> - <File RelativePath="src\wg_rect.cpp"> </File> --- 162,165 ---- Index: wGui-VS71.vcproj =================================================================== RCS file: /cvsroot/wgui/wgui/wGui-VS71.vcproj,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wGui-VS71.vcproj 26 Apr 2004 22:38:00 -0000 1.4 --- wGui-VS71.vcproj 27 Apr 2004 18:13:49 -0000 1.5 *************** *** 176,182 **** </File> <File - RelativePath="src\wg_range_control.cpp"> - </File> - <File RelativePath="src\wg_rect.cpp"> </File> --- 176,179 ---- |
|
From: Rob W. <gre...@us...> - 2004-04-27 18:13:59
|
Update of /cvsroot/wgui/wgui/includes/unit_tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29743/includes/unit_tests Modified Files: wg_scrollbar_unittests.h Log Message: Changed CScrollBar so it inherits from CRangeControl Index: wg_scrollbar_unittests.h =================================================================== RCS file: /cvsroot/wgui/wgui/includes/unit_tests/wg_scrollbar_unittests.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wg_scrollbar_unittests.h 2 Apr 2004 17:26:15 -0000 1.4 --- wg_scrollbar_unittests.h 27 Apr 2004 18:13:50 -0000 1.5 *************** *** 49,58 **** ensure_equals("CScrollBar - GetMinLimit", pScrollBar->GetMinLimit(), 0); ensure_equals("CScrollBar - GetMaxLimit", pScrollBar->GetMaxLimit(), 100); ! ensure_equals("CScrollBar - GetPosition", pScrollBar->GetPosition(), 0); ! pScrollBar->SetLimits(-5, 10); ! ensure_equals("CScrollBar - SetLimits", pScrollBar->GetMinLimit(), -5); ! ensure_equals("CScrollBar - SetLimits", pScrollBar->GetMaxLimit(), 10); ! pScrollBar->SetPosition(8); ! ensure_equals("CScrollBar - SetPosition", pScrollBar->GetPosition(), 8); } --- 49,59 ---- ensure_equals("CScrollBar - GetMinLimit", pScrollBar->GetMinLimit(), 0); ensure_equals("CScrollBar - GetMaxLimit", pScrollBar->GetMaxLimit(), 100); ! ensure_equals("CScrollBar - GetValue", pScrollBar->GetValue(), 0); ! pScrollBar->SetMinLimit(-5); ! ensure_equals("CScrollBar - SetMinLimit", pScrollBar->GetMinLimit(), -5); ! pScrollBar->SetMaxLimit(10); ! ensure_equals("CScrollBar - SetMaxLimit", pScrollBar->GetMaxLimit(), 10); ! pScrollBar->SetValue(8); ! ensure_equals("CScrollBar - SetValue", pScrollBar->GetValue(), 8); } |
|
From: Rob W. <gre...@us...> - 2004-04-26 22:38:11
|
Update of /cvsroot/wgui/wgui/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2833/src Modified Files: Makefile.am Added Files: wg_range_control.cpp Log Message: Added CRangeControl. Index: Makefile.am =================================================================== RCS file: /cvsroot/wgui/wgui/src/Makefile.am,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Makefile.am 22 Apr 2004 16:39:53 -0000 1.10 --- Makefile.am 26 Apr 2004 22:38:00 -0000 1.11 *************** *** 30,33 **** --- 30,34 ---- wg_point.cpp \ wg_progress.cpp \ + wg_range_control.cpp \ wg_rect.cpp \ wg_renderedstring.cpp \ --- NEW FILE: wg_range_control.cpp --- // wg_range_control.cpp // // CRangeControl class implementation // // // Copyright (c) 2002-2004 Rob Wiskow // ro...@bo... // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // #include "wgui_include_config.h" #include "wg_range_control.h" #include "std_ex.h" namespace wGui { template<typename T> void CRangeControl<T>::SetValue(T value) { m_Value = value; CMessageServer::Instance().QueueMessage(new CValueMessage<T>(CMessage::CTRL_VALUECHANGE, m_pParentWindow, this, m_Value)); StartDrawProc(); } template<typename T> void CRangeControl<T>::Increment(void) { m_Value += m_StepSize; CMessageServer::Instance().QueueMessage(new CValueMessage<T>(CMessage::CTRL_VALUECHANGE, m_pParentWindow, this, m_Value)); StartDrawProc(); } template<typename T> void CRangeControl<T>::Decrement(void) { m_Value -= m_StepSize; CMessageServer::Instance().QueueMessage(new CValueMessage<T>(CMessage::CTRL_VALUECHANGE, m_pParentWindow, this, m_Value)); StartDrawProc(); } } |
|
From: Rob W. <gre...@us...> - 2004-04-26 22:38:10
|
Update of /cvsroot/wgui/wgui/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2833/includes Modified Files: Makefile.am wgui.h Added Files: wg_range_control.h Log Message: Added CRangeControl. --- NEW FILE: wg_range_control.h --- // wg_range_control.h // // CRangeControl interface // // // Copyright (c) 2002-2004 Rob Wiskow // ro...@bo... // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // #ifndef _WG_RANGE_CONTROL_H_ #define _WG_RANGE_CONTROL_H_ #include "wg_window.h" namespace wGui { //! An abstract class that handles all the basics of a control that uses a value that is constrained to a certain range //! Sends a CTRL_VALUECHANGE message whenever the value changes template<typename T> class CRangeControl : public CWindow { public: //! Constructs a range control //! \param WindowRect A CRect that defines the outer limits of the control //! \param pParent A pointer to the parent window //! \param minLimit The minimum limit for the control //! \param maxLimit The maximum limit for the control //! \param stepSize The amount to increase/decrease the value by for Increment and Decrement //! \param defaultValue The amount to initialize the value to CRangeControl(const CRect& WindowRect, CWindow* pParent, T minLimit, T maxLimit, T stepSize, T defaultValue) : CWindow(WindowRect, pParent), m_MinLimit(minLimit), m_MaxLimit(maxLimit), m_StepSize(stepSize), m_Value(defaultValue) { } //! Set the lower limit for the control void SetMinLimit(T minLimit) { m_MinLimit = minLimit; } //! \return The minimum limit of the progress bar T GetMinLimit(void) const { return m_MinLimit; } //! Set the upper limit for the control void SetMaxLimit(T maxLimit) { m_MaxLimit = maxLimit; } //! \return The maximum limit of the progress bar T GetMaxLimit(void) const { return m_MaxLimit; } //! Set the current steo size. void SetStepSize(T stepSize); //! \return The current step size T GetStepSize(void) const { return m_StepSize; } //! Set the current value. void SetValue(T value); //! \return The current value T GetValue(void) const { return m_Value; } //! Increase the value by one step size void Increment(void); //! Decrease the value by one step size void Decrement(void); private: T m_MinLimit; //!< The minimum value of the control T m_MaxLimit; //!< The maximum value of the control T m_StepSize; //!< The step size of the control T m_Value; //!< The current value of the control private: void operator=(CRangeControl) { } //!< The assignment operator is not allowed for CWindow derived objects }; } #endif // _WG_RANGE_CONTROL_H_ Index: Makefile.am =================================================================== RCS file: /cvsroot/wgui/wgui/includes/Makefile.am,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Makefile.am 31 Mar 2004 15:31:32 -0000 1.10 --- Makefile.am 26 Apr 2004 22:38:00 -0000 1.11 *************** *** 27,30 **** --- 27,31 ---- wg_point.h \ wg_progress.h \ + wg_range_control.h \ wg_rect.h \ wg_renderedstring.h \ Index: wgui.h =================================================================== RCS file: /cvsroot/wgui/wgui/includes/wgui.h,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** wgui.h 2 Apr 2004 17:26:14 -0000 1.32 --- wgui.h 26 Apr 2004 22:38:00 -0000 1.33 *************** *** 45,48 **** --- 45,49 ---- #include "wg_application.h" #include "wg_window.h" + #include "wg_range_control.h" #include "wg_view.h" #include "wg_frame.h" |
|
From: Rob W. <gre...@us...> - 2004-04-26 22:38:10
|
Update of /cvsroot/wgui/wgui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2833 Modified Files: CHANGES wGui-VS7.vcproj wGui-VS71.vcproj wgui.dsp Log Message: Added CRangeControl. Index: CHANGES =================================================================== RCS file: /cvsroot/wgui/wgui/CHANGES,v retrieving revision 1.136 retrieving revision 1.137 diff -C2 -d -r1.136 -r1.137 *** CHANGES 23 Apr 2004 03:45:42 -0000 1.136 --- CHANGES 26 Apr 2004 22:38:00 -0000 1.137 *************** *** 1,3 **** --- 1,4 ---- 0.3.2 -> 0.3.3 + + Added CRangeControl class: An abstraction of all controls that have a value that's constricted to a certain range (progress bar, scroll bar, etc) *************** *** 12,16 **** + Added CView: The view now has a "floating window" pointer, which is used to ensure that a floating window (menu or drop list) is drawn on top of everything + Added wUtil::CLog class: A logging utility ! + Added messages: CTRL_GAININKEYFOCUS, CTRL_LOSINGKEYFOCUS, CTRL_GAININGMOUSEFOCUS, CTRL_LOSINGMOUSEFOCUS which are sent to controls when they gain or lose mouse and keyboard focus + Added Bullseye Tutorial: A custom control (widget) tutorial --- 13,17 ---- + Added CView: The view now has a "floating window" pointer, which is used to ensure that a floating window (menu or drop list) is drawn on top of everything + Added wUtil::CLog class: A logging utility ! + Added messages: CTRL_GAININKEYFOCUS, CTRL_LOSINGKEYFOCUS, CTRL_GAININGMOUSEFOCUS, CTRL_LOSINGMOUSEFOCUS which are sent to controls when they gain or lose mouse and keyboard focus + Added Bullseye Tutorial: A custom control (widget) tutorial Index: wgui.dsp =================================================================== RCS file: /cvsroot/wgui/wgui/wgui.dsp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** wgui.dsp 31 Mar 2004 15:37:48 -0000 1.9 --- wgui.dsp 26 Apr 2004 22:38:00 -0000 1.10 *************** *** 8,24 **** !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run ! !MESSAGE !MESSAGE NMAKE /f "wgui.mak". ! !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE !MESSAGE NMAKE /f "wgui.mak" CFG="wgui - Win32 Debug" ! !MESSAGE !MESSAGE Possible choices for configuration are: ! !MESSAGE !MESSAGE "wgui - Win32 Release" (based on "Win32 (x86) Static Library") !MESSAGE "wgui - Win32 Debug" (based on "Win32 (x86) Static Library") ! !MESSAGE # Begin Project --- 8,24 ---- !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run ! !MESSAGE !MESSAGE NMAKE /f "wgui.mak". ! !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE !MESSAGE NMAKE /f "wgui.mak" CFG="wgui - Win32 Debug" ! !MESSAGE !MESSAGE Possible choices for configuration are: ! !MESSAGE !MESSAGE "wgui - Win32 Release" (based on "Win32 (x86) Static Library") !MESSAGE "wgui - Win32 Debug" (based on "Win32 (x86) Static Library") ! !MESSAGE # Begin Project *************** *** 77,81 **** # ADD LIB32 /nologo /out:"lib\wguid.lib" ! !ENDIF # Begin Target --- 77,81 ---- # ADD LIB32 /nologo /out:"lib\wguid.lib" ! !ENDIF # Begin Target *************** *** 172,175 **** --- 172,179 ---- # Begin Source File + SOURCE=src\wg_range_control.cpp + # End Source File + # Begin Source File + SOURCE=src\wg_rect.cpp # End Source File *************** *** 364,367 **** --- 368,375 ---- # Begin Source File + SOURCE=includes\wg_range_control.h + # End Source File + # Begin Source File + SOURCE=includes\wg_rect.h # End Source File Index: wGui-VS7.vcproj =================================================================== RCS file: /cvsroot/wgui/wgui/wGui-VS7.vcproj,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** wGui-VS7.vcproj 31 Mar 2004 15:37:48 -0000 1.17 --- wGui-VS7.vcproj 26 Apr 2004 22:38:00 -0000 1.18 *************** *** 162,165 **** --- 162,168 ---- </File> <File + RelativePath="src\wg_range_control.cpp"> + </File> + <File RelativePath="src\wg_rect.cpp"> </File> *************** *** 280,283 **** --- 283,289 ---- </File> <File + RelativePath="includes\wg_range_control.h"> + </File> + <File RelativePath="includes\wg_rect.h"> </File> Index: wGui-VS71.vcproj =================================================================== RCS file: /cvsroot/wgui/wgui/wGui-VS71.vcproj,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wGui-VS71.vcproj 31 Mar 2004 15:37:48 -0000 1.3 --- wGui-VS71.vcproj 26 Apr 2004 22:38:00 -0000 1.4 *************** *** 176,179 **** --- 176,182 ---- </File> <File + RelativePath="src\wg_range_control.cpp"> + </File> + <File RelativePath="src\wg_rect.cpp"> </File> *************** *** 291,294 **** --- 294,300 ---- </File> <File + RelativePath="includes\wg_range_control.h"> + </File> + <File RelativePath="includes\wg_rect.h"> </File> |
|
From: Rob W. <gre...@us...> - 2004-04-23 19:38:56
|
Update of /cvsroot/wgui/wgui/wgui_ex/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20009/wgui_ex/includes Modified Files: wgex_knob.h Log Message: wGui_ex clean up and minor stuff Index: wgex_knob.h =================================================================== RCS file: /cvsroot/wgui/wgui/wgui_ex/includes/wgex_knob.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wgex_knob.h 26 Feb 2004 17:00:35 -0000 1.3 --- wgex_knob.h 23 Apr 2004 19:38:47 -0000 1.4 *************** *** 1,8 **** // wgex_knob.h // - // // CKnob interface // // // Copyright (c) 2003 kRAkEn/gORe // kra...@li... --- 1,9 ---- // wgex_knob.h // // CKnob interface // // + // Copyright (c) 2004 Rob Wiskow + // ro...@bo... // Copyright (c) 2003 kRAkEn/gORe // kra...@li... *************** *** 31,40 **** #include "wg_application.h" #include "wg_window.h" - - #include "wgex_control.h" #include "wgex_painter.h" - // #include "wg_picture.h" - // #include "wg_menu.h" - --- 32,36 ---- *************** *** 44,51 **** //! A knob control ! class CKnob : public CControl { public: ! //! Constructs a new checkbox //! \param WindowRect A CRect that defines the outer limits of the control //! \param pParent A pointer to the parent window --- 40,47 ---- //! A knob control ! class CKnob : public CWindow { public: ! //! Constructs a new knob //! \param WindowRect A CRect that defines the outer limits of the control //! \param pParent A pointer to the parent window *************** *** 63,67 **** virtual bool HandleMessage( CMessage* pMessage ); ! //! This is called whenever the button is clicked on by the mouse //! Only the topmost window that bounds the point will be called by the system //! \param Point The point where the mouse clicked --- 59,63 ---- virtual bool HandleMessage( CMessage* pMessage ); ! //! This is called whenever the knob is clicked on by the mouse //! Only the topmost window that bounds the point will be called by the system //! \param Point The point where the mouse clicked *************** *** 70,74 **** virtual bool OnMouseButtonDown(CPoint Point, unsigned int Button); ! //! This is called whenever the a mouse button is released in the button //! Only the topmost window that bounds the point will be called by the system //! \param Point The point where the mouse clicked --- 66,70 ---- virtual bool OnMouseButtonDown(CPoint Point, unsigned int Button); ! //! This is called whenever the a mouse button is released in the knob //! Only the topmost window that bounds the point will be called by the system //! \param Point The point where the mouse clicked *************** *** 78,127 **** ! ! void ValueToPoint( int* iValueX, int* iValueY ) const ! { ! float fAlpha = (m_fValue - m_fCoefB) / m_fCoefA; ! *iValueX = (long)( m_fRadius + cosf(fAlpha) * (m_fRadius - m_iInsetPixels) + 0.5f); ! *iValueY = (long)( m_fRadius - sinf(fAlpha) * (m_fRadius - m_iInsetPixels) + 0.5f); ! } ! ! void SetStartAngle( float fAngle ) ! { ! m_fStartAngle = fAngle; ! ComputeCoeff(); ! } ! ! void SetRangeAngle( float fAngle ) ! { ! m_fRangeAngle = fAngle; ! ComputeCoeff(); ! } ! ! void ComputeCoeff() { ! m_fCoefA = 1.0f / m_fRangeAngle; ! m_fCoefB = - ( m_fCoefA * m_fStartAngle ); ! m_fHalfAngle = ( 2.0f * 3.141592f - fabsf(m_fRangeAngle) ) / 2.0f; } protected: - - CRGBColor m_CircleUpColor; CRGBColor m_CircleLoColor; - CRGBColor m_HandleUpColor; CRGBColor m_HandleLoColor; ! int m_iInsetPixels; ! ! float m_fRadius; ! float m_fStartAngle; ! float m_fRangeAngle; ! ! float m_fHalfAngle; ! float m_fCoefA; ! float m_fCoefB; --- 74,96 ---- ! void ValueToPoint(int* iValueX, int* iValueY) const { ! double dAlpha = (m_dValue - m_dCoefB) / m_dCoefA; ! *iValueX = (long)( m_dRadius + cosf(dAlpha) * (m_dRadius - m_iInsetPixels) + 0.5f); ! *iValueY = (long)( m_dRadius - sinf(dAlpha) * (m_dRadius - m_iInsetPixels) + 0.5f); } protected: CRGBColor m_CircleUpColor; CRGBColor m_CircleLoColor; CRGBColor m_HandleUpColor; CRGBColor m_HandleLoColor; ! double m_dValue; ! double m_dRadius; ! double m_dStartAngle; ! double m_dRangeAngle; ! unsigned int m_iMouseButton; //!< The current buttons pressed *************** *** 131,137 **** ! ! ! class CAnimKnob : public CKnob --- 100,104 ---- ! //! An animated knob class CAnimKnob : public CKnob *************** *** 141,151 **** //! \param WindowRect A CRect that defines the outer limits of the control //! \param pParent A pointer to the parent window ! CAnimKnob( ! const CRect& WindowRect, ! CWindow* pParent, ! const std::string& sPictureFile, ! int iSubpix, ! bool bVertical = 1 ! ); //! Standard destructor --- 108,115 ---- //! \param WindowRect A CRect that defines the outer limits of the control //! \param pParent A pointer to the parent window ! //! \param sPictureFile The filename of the bitmap to use as the source pictures ! //! \param iSubpix The count of the number of bitmaps in the picture file ! //! \param bVertical Indicates if the pictures are arranged vertically or horizontally ! CAnimKnob(const CRect& WindowRect, CWindow* pParent, const std::string& sPictureFile, int iSubpix, bool bVertical = true); //! Standard destructor *************** *** 153,172 **** // CWindow overrides ! //! Draws the checkbox virtual void Draw(void) const; - // CMessageClient overrides - //! CCheckBoxes handle MOUSE_BUTTONDOWN, MOUSE_BUTTONUP, and it's own CTRL_LCLICK messages - //! \param pMessage A pointer to the message - // virtual bool HandleMessage(CMessage* pMessage); - - protected: - CBitmapResourceHandle m_hBitmap; //!< A handle for the bitmap resource ! ! int m_iHeightOneImage; // height of one image ! int m_iNumSubpix; // number of pixmaps ! int m_bVerticalImages; --- 117,128 ---- // CWindow overrides ! //! Draws the knob virtual void Draw(void) const; protected: CBitmapResourceHandle m_hBitmap; //!< A handle for the bitmap resource ! int m_iHeightOneImage; //! height of one image ! int m_iNumSubpix; //! number of pixmaps ! int m_bVerticalImages; //! indicates if the pixmaps are arrange horizontally or vertically *************** *** 175,183 **** }; - } #endif // _WGUI_EX_KNOB_H_ - - --- 131,136 ---- |
|
From: Rob W. <gre...@us...> - 2004-04-23 19:38:56
|
Update of /cvsroot/wgui/wgui/wgui_ex/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20009/wgui_ex/src Modified Files: wgex_knob.cpp Log Message: wGui_ex clean up and minor stuff Index: wgex_knob.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/wgui_ex/src/wgex_knob.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wgex_knob.cpp 12 Nov 2003 18:35:21 -0000 1.2 --- wgex_knob.cpp 23 Apr 2004 19:38:47 -0000 1.3 *************** *** 1,9 **** // wgex_knob.cpp // - // // CKnob & CAnimKnob class implementations // // ! // No Copyright (nc) 2003 kRAkEn/gORe // kra...@li... // --- 1,10 ---- // wgex_knob.cpp // // CKnob & CAnimKnob class implementations // // ! // Copyright (c) 2004 Rob Wiskow ! // ro...@bo... ! // Copyright (c) 2003 kRAkEn/gORe // kra...@li... // *************** *** 33,48 **** //________________________________________________________________ ! CKnob::CKnob(const CRect& WindowRect, CWindow* pParent ) ! : CControl( WindowRect, pParent ), ! m_CircleUpColor(120, 220, 20), ! m_CircleLoColor(120, 220, 20), ! m_HandleUpColor(0,0,0), ! m_HandleLoColor(255,255,250) { ! m_fRadius = (float)(WindowRect.Right() - WindowRect.Left()) / 2.0f; ! m_iInsetPixels = 2; ! m_fRangeAngle = 1.f; ! SetStartAngle( (float)( 5.f * 3.141592f / 4.f ) ); ! SetRangeAngle( (float)( -3.f * 3.141592f / 2.f ) ); CMessageServer::Instance().RegisterMessageClient(this, CMessage::MOUSE_MOVE); --- 34,44 ---- //________________________________________________________________ ! CKnob::CKnob(const CRect& WindowRect, CWindow* pParent ) : ! CWindow(WindowRect, pParent), m_CircleUpColor(120, 220, 20), m_CircleLoColor(120, 220, 20), m_HandleUpColor(0, 0, 0), ! m_HandleLoColor(255, 255, 250), m_dRangeAngle(1.0) { ! m_dRadius = stdex::safe_static_cast<double>(WindowRect.Width()) / 2.0; ! m_dStartAngle = 3.92699; // 5 * pi / 4 ! m_dRangeAngle = -4.71239; // -3 * pi / 2 CMessageServer::Instance().RegisterMessageClient(this, CMessage::MOUSE_MOVE); *************** *** 59,78 **** void CKnob::Draw(void) const { ! CAdvancedPainter Painter( m_pSDLSurface ); ! ! int midx = m_WindowRect.Left() + m_WindowRect.Width() / 2; ! int midy = m_WindowRect.Top() + m_WindowRect.Height() / 2; ! // p.Rect( s.Left(), s.Top(), s.Right(), s.Bottom(), m_BGColor ); ! const CRGBColor* CircleColor = &m_CircleLoColor; ! const CRGBColor* HandleColor = &m_HandleLoColor; ! if( m_iMouseButton != CMouseMessage::NONE ) { ! CircleColor = &m_CircleUpColor; ! HandleColor = &m_HandleUpColor; } ! Painter.DrawAACircleAlpha( midx, midy, m_fRadius - m_iInsetPixels, *CircleColor, 255 ); ! Painter.DrawAACircleAlpha( midx, midy, m_fRadius - m_iInsetPixels - 1, *CircleColor, 255 ); int x, y; --- 55,71 ---- void CKnob::Draw(void) const { ! CAdvancedPainter Painter(m_pSDLSurface); ! CPoint Center = m_WindowRect.Center(); ! CRGBColor CircleColor = m_CircleLoColor; ! CRGBColor HandleColor = m_HandleLoColor; ! if(m_iMouseButton != CMouseMessage::NONE) { ! CircleColor = m_CircleUpColor; ! HandleColor = m_HandleUpColor; } ! Painter.DrawAACircleAlpha(Center.XPos(), Center.YPos(), m_dRadius - 2, CircleColor, 255); ! Painter.DrawAACircleAlpha(Center.XPos(), Center.YPos(), m_dRadius - 3, CircleColor, 255); int x, y; *************** *** 80,90 **** x += m_WindowRect.Left(); y += m_WindowRect.Top(); - - // p.AALine( midx, midy, x, y, *HandleColor ); - // p.AALine( midx, midy, x+2, y-2, *HandleColor ); - // p.AALine( midx, midy, x-2, y+2, *HandleColor ); - Painter.DrawFilledCircleAlpha( x, y, 2, *HandleColor, 255 ); - Painter.DrawFilledCircleAlpha( midx, midy, 3, *CircleColor, 255 ); } --- 73,79 ---- x += m_WindowRect.Left(); y += m_WindowRect.Top(); + Painter.DrawFilledCircleAlpha(x, y, 2, HandleColor, 255); + Painter.DrawFilledCircleAlpha(Center.XPos(), Center.YPos(), 3, CircleColor, 255); } *************** *** 95,134 **** bool bResult = false; ! if (! CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && (m_WindowRect.HitTest(Point) == CRect::RELPOS_INSIDE) ! && CApplication::Instance()->GetMouseFocus() == 0 ) { m_iMouseButton = Button; ! ! switch( m_iMouseButton ) { case CMouseMessage::LEFT: ! { ! CApplication::Instance()->SetMouseVisibility( 0 ); ! CApplication::Instance()->SetMouseFocus( this ); ! StartDrawProc(); ! bResult = true; ! break; ! } ! ! case CMouseMessage::MIDDLE: // random ! { ! break; ! } ! case CMouseMessage::RIGHT: ! { ! CApplication::Instance()->SetMouseVisibility( 0 ); ! CApplication::Instance()->SetMouseFocus( this ); StartDrawProc(); bResult = true; break; - } } ! ! } return bResult; } //________________________________________________________________ bool CKnob::OnMouseButtonUp(CPoint Point, unsigned int Button) --- 84,108 ---- bool bResult = false; ! if (!CWindow::OnMouseButtonDown(Point, Button) && m_bVisible && (m_WindowRect.HitTest(Point) == CRect::RELPOS_INSIDE) ! && CApplication::Instance()->GetMouseFocus() == 0) { m_iMouseButton = Button; ! switch(m_iMouseButton) { case CMouseMessage::LEFT: ! // do the same thing for left and right mouse clicks case CMouseMessage::RIGHT: ! CApplication::Instance()->SetMouseVisibility(0); ! CApplication::Instance()->SetMouseFocus(this); StartDrawProc(); bResult = true; break; } ! } return bResult; } + //________________________________________________________________ bool CKnob::OnMouseButtonUp(CPoint Point, unsigned int Button) *************** *** 136,151 **** bool bResult = false; ! if (! CWindow::OnMouseButtonUp(Point, Button) && m_bVisible /* && (m_WindowRect.HitTest(Point) == CRect::RELPOS_INSIDE) */ ! && (m_iMouseButton == Button) && CApplication::Instance()->GetMouseFocus() == this ) { ! switch( m_iMouseButton ) { case CMouseMessage::LEFT: ! // case CMouseMessage::MIDDLE: case CMouseMessage::RIGHT: { ! CApplication::Instance()->SetMousePosition( m_WindowRect.Center() ); ! CApplication::Instance()->SetMouseVisibility( 1 ); ! CApplication::Instance()->SetMouseFocus( 0 ); StartDrawProc(); --- 110,125 ---- bool bResult = false; ! if (!CWindow::OnMouseButtonUp(Point, Button) && m_bVisible ! && (m_iMouseButton == Button) && CApplication::Instance()->GetMouseFocus() == this) { ! switch(m_iMouseButton) { case CMouseMessage::LEFT: ! // do the same thing for left and right mouse clicks case CMouseMessage::RIGHT: { ! CApplication::Instance()->SetMousePosition(m_WindowRect.Center()); ! CApplication::Instance()->SetMouseVisibility(1); ! CApplication::Instance()->SetMouseFocus(0); StartDrawProc(); *************** *** 165,176 **** //________________________________________________________________ ! bool CKnob::HandleMessage( CMessage* pMessage ) { bool bHandled = false; ! switch( pMessage->MessageType() ) { - //-------------------------------------------------------------------------- case CMessage::MOUSE_MOVE: - //-------------------------------------------------------------------------- { CMouseMessage* pMouseMessage = dynamic_cast<CMouseMessage*>(pMessage); --- 139,148 ---- //________________________________________________________________ ! bool CKnob::HandleMessage(CMessage* pMessage) { bool bHandled = false; ! switch(pMessage->MessageType()) { case CMessage::MOUSE_MOVE: { CMouseMessage* pMouseMessage = dynamic_cast<CMouseMessage*>(pMessage); *************** *** 178,193 **** { // calculate value ! double dx = pMouseMessage->Relative.XPos() * m_fSmooth; ! double dy = pMouseMessage->Relative.YPos() * m_fSmooth; ! m_fValue += dx / (float)50*0.4f - dy / (float)50*0.3f ; ! if( m_fValue < 0.0f ) m_fValue = 0.0f; ! if( m_fValue > 1.0f ) m_fValue = 1.0f; CMessageServer::Instance().QueueMessage( ! new TFloatMessage(CMessage::CTRL_VALUECHANGE, m_pParentWindow, this, m_fValue) ); ! ! StartDrawProc(); bHandled = true; } --- 150,168 ---- { // calculate value ! m_dValue += pMouseMessage->Relative.XPos() * 0.005 - pMouseMessage->Relative.YPos() * 0.005; ! if(m_dValue < 0.0) ! { ! m_dValue = 0.0; ! } ! else if(m_dValue > 1.0) ! { ! m_dValue = 1.0; ! } CMessageServer::Instance().QueueMessage( ! new TDoubleMessage(CMessage::CTRL_VALUECHANGE, m_pParentWindow, this, m_dValue)); + StartDrawProc(); bHandled = true; } *************** *** 195,202 **** break; } - - //-------------------------------------------------------------------------- default : - //-------------------------------------------------------------------------- bHandled = CWindow::HandleMessage(pMessage); break; --- 170,174 ---- *************** *** 210,226 **** - - //________________________________________________________________ ! CAnimKnob::CAnimKnob( const CRect& WindowRect, CWindow* pParent, const std::string& sPictureFile, int iSubpix, bool bVertical ) : CKnob(WindowRect, pParent), ! m_hBitmap( CBitmapFileResourceHandle(sPictureFile) ), m_iNumSubpix(iSubpix), m_bVerticalImages(bVertical) { if( m_bVerticalImages ) m_iHeightOneImage = m_hBitmap.Bitmap()->h / m_iNumSubpix; else m_iHeightOneImage = m_hBitmap.Bitmap()->w / m_iNumSubpix; } --- 182,200 ---- //________________________________________________________________ ! CAnimKnob::CAnimKnob(const CRect& WindowRect, CWindow* pParent, const std::string& sPictureFile, int iSubpix, bool bVertical) : CKnob(WindowRect, pParent), ! m_hBitmap(CBitmapFileResourceHandle(sPictureFile)), m_iNumSubpix(iSubpix), m_bVerticalImages(bVertical) { if( m_bVerticalImages ) + { m_iHeightOneImage = m_hBitmap.Bitmap()->h / m_iNumSubpix; + } else + { m_iHeightOneImage = m_hBitmap.Bitmap()->w / m_iNumSubpix; + } } *************** *** 236,247 **** { CWindow::Draw(); - - int iPixelIndex = (int)( m_fValue * (float)( m_iNumSubpix - 1) ) * m_iHeightOneImage; CRect PictureRect = GetClientRect(); PictureRect.Grow(-1); SDL_Rect SourceRect = PictureRect.SDLRect(); ! if( m_bVerticalImages ) { SourceRect.x = 0; --- 210,220 ---- { CWindow::Draw(); + int iPixelIndex = stdex::safe_static_cast<int>(m_dValue * stdex::safe_static_cast<double>(m_iNumSubpix - 1) * m_iHeightOneImage); CRect PictureRect = GetClientRect(); PictureRect.Grow(-1); SDL_Rect SourceRect = PictureRect.SDLRect(); ! if(m_bVerticalImages) { SourceRect.x = 0; *************** *** 255,259 **** SDL_Rect DestRect = PictureRect.SDLRect(); ! SDL_BlitSurface( m_hBitmap.Bitmap(), &SourceRect, m_pSDLSurface, &DestRect ); } --- 228,232 ---- SDL_Rect DestRect = PictureRect.SDLRect(); ! SDL_BlitSurface(m_hBitmap.Bitmap(), &SourceRect, m_pSDLSurface, &DestRect); } |
|
From: Rob W. <gre...@us...> - 2004-04-23 19:38:55
|
Update of /cvsroot/wgui/wgui/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20009/src Modified Files: wg_view.cpp Log Message: wGui_ex clean up and minor stuff Index: wg_view.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_view.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** wg_view.cpp 13 Apr 2004 15:28:56 -0000 1.33 --- wg_view.cpp 23 Apr 2004 19:38:47 -0000 1.34 *************** *** 58,62 **** SetWindowRect( WindowRect ); SetWindowText( sTitle ); ! CApplication::Instance()->GetApplicationLog().AddLogEntry("Ceated new CView : " + sTitle, APP_LOG_INFO); } --- 58,62 ---- SetWindowRect( WindowRect ); SetWindowText( sTitle ); ! CApplication::Instance()->GetApplicationLog().AddLogEntry("Created new CView : " + sTitle, APP_LOG_INFO); } *************** *** 159,163 **** m_WindowRect.SetBottom(m_WindowRect.Top() + pResizeMessage->Value().YPos()); m_WindowRect.SetRight(m_WindowRect.Left() + pResizeMessage->Value().XPos()); ! m_ClientRect = CRect(m_ClientRect.Left(), m_ClientRect.Top(), m_WindowRect.Width(), m_WindowRect.Height()); m_ClientRect.ClipTo(m_WindowRect); --- 159,163 ---- m_WindowRect.SetBottom(m_WindowRect.Top() + pResizeMessage->Value().YPos()); m_WindowRect.SetRight(m_WindowRect.Left() + pResizeMessage->Value().XPos()); ! m_ClientRect = CRect(m_ClientRect.Left(), m_ClientRect.Top(), m_WindowRect.Width(), m_WindowRect.Height()); m_ClientRect.ClipTo(m_WindowRect); |
|
From: Rob W. <gre...@us...> - 2004-04-23 19:38:55
|
Update of /cvsroot/wgui/wgui/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20009/includes Modified Files: wg_message.h Log Message: wGui_ex clean up and minor stuff Index: wg_message.h =================================================================== RCS file: /cvsroot/wgui/wgui/includes/wg_message.h,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** wg_message.h 14 Apr 2004 16:21:21 -0000 1.28 --- wg_message.h 23 Apr 2004 19:38:47 -0000 1.29 *************** *** 118,122 **** //! \param SDLEvent The untranslated SDL event CSDLMessage(const EMessageType MessageType, const CMessageClient* pDestination, const CMessageClient* pSource, SDL_Event SDLEvent); ! SDL_Event SDLEvent; //!< The untranslated SDL event }; --- 118,122 ---- //! \param SDLEvent The untranslated SDL event CSDLMessage(const EMessageType MessageType, const CMessageClient* pDestination, const CMessageClient* pSource, SDL_Event SDLEvent); ! SDL_Event SDLEvent; //!< The untranslated SDL event }; *************** *** 221,224 **** --- 221,225 ---- typedef CValueMessage<int> TIntMessage; typedef CValueMessage<float> TFloatMessage; + typedef CValueMessage<double> TDoubleMessage; typedef CValueMessage<std::string> TStringMessage; typedef CValueMessage<CPoint> TPointMessage; |
|
From: Rob W. <gre...@us...> - 2004-04-23 03:46:25
|
Update of /cvsroot/wgui/wgui/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7405/includes Modified Files: wgui_win32_config.h Log Message: Version Bump. Index: wgui_win32_config.h =================================================================== RCS file: /cvsroot/wgui/wgui/includes/wgui_win32_config.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** wgui_win32_config.h 23 Mar 2004 15:14:24 -0000 1.8 --- wgui_win32_config.h 23 Apr 2004 03:45:43 -0000 1.9 *************** *** 3,6 **** /* Version number of package */ ! #define VERSION "0.3.2" --- 3,6 ---- /* Version number of package */ ! #define VERSION "0.3.3" |
|
From: Rob W. <gre...@us...> - 2004-04-23 03:45:56
|
Update of /cvsroot/wgui/wgui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7405 Modified Files: CHANGES Doxyfile NEWS README configure.in Log Message: Version Bump. Index: README =================================================================== RCS file: /cvsroot/wgui/wgui/README,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** README 14 Apr 2004 18:13:25 -0000 1.17 --- README 23 Apr 2004 03:45:43 -0000 1.18 *************** *** 1,3 **** ! 0.3.2 For this release we've added a pair of new classes: wUtil::CLog and CTextBox. --- 1,3 ---- ! 0.3.3 For this release we've added a pair of new classes: wUtil::CLog and CTextBox. Index: NEWS =================================================================== RCS file: /cvsroot/wgui/wgui/NEWS,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** NEWS 12 Mar 2004 02:09:40 -0000 1.7 --- NEWS 23 Apr 2004 03:45:43 -0000 1.8 *************** *** 1,4 **** --- 1,6 ---- For more current news, see Sourceforge at http://sourceforge.net/projects/wgui/ + 04/22/04 - Version 0.3.2 is released. + 03/11/04 - Version 0.3.1 is released. Index: Doxyfile =================================================================== RCS file: /cvsroot/wgui/wgui/Doxyfile,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Doxyfile 23 Mar 2004 15:14:22 -0000 1.14 --- Doxyfile 23 Apr 2004 03:45:43 -0000 1.15 *************** *** 24,28 **** # if some version control system is used. ! PROJECT_NUMBER = 0.3.2 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) --- 24,28 ---- # if some version control system is used. ! PROJECT_NUMBER = 0.3.3 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) Index: CHANGES =================================================================== RCS file: /cvsroot/wgui/wgui/CHANGES,v retrieving revision 1.135 retrieving revision 1.136 diff -C2 -d -r1.135 -r1.136 *** CHANGES 14 Apr 2004 16:21:17 -0000 1.135 --- CHANGES 23 Apr 2004 03:45:42 -0000 1.136 *************** *** 1,2 **** --- 1,5 ---- + 0.3.2 -> 0.3.3 + + 0.3.1 -> 0.3.2 + Added CTRL_DOUBLELCLICK, CTRL_DOUBLERCLICK, CTRL_DOUBLEMCLICK messages Index: configure.in =================================================================== RCS file: /cvsroot/wgui/wgui/configure.in,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** configure.in 22 Apr 2004 16:39:44 -0000 1.14 --- configure.in 23 Apr 2004 03:45:43 -0000 1.15 *************** *** 5,9 **** WGUI_VERSION_MAJOR=0 WGUI_VERSION_MINOR=3 ! WGUI_VERSION_REVISION=2 WGUI_VERSION=$WGUI_VERSION_MAJOR.$WGUI_VERSION_MINOR.$WGUI_VERSION_REVISION VERSION=$WGUI_VERSION --- 5,9 ---- WGUI_VERSION_MAJOR=0 WGUI_VERSION_MINOR=3 ! WGUI_VERSION_REVISION=3 WGUI_VERSION=$WGUI_VERSION_MAJOR.$WGUI_VERSION_MINOR.$WGUI_VERSION_REVISION VERSION=$WGUI_VERSION |
|
From: Rob W. <gre...@us...> - 2004-04-23 03:00:47
|
Update of /cvsroot/wgui/wgui/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv849/src Modified Files: wg_textbox.cpp Log Message: VC6 build fix Index: wg_textbox.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_textbox.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** wg_textbox.cpp 23 Apr 2004 02:28:39 -0000 1.16 --- wg_textbox.cpp 23 Apr 2004 03:00:14 -0000 1.17 *************** *** 339,345 **** } } ! for (unsigned int i = 0; i < iCurLine; ++i) { ! m_SelStart += vCharRects[i].size(); } } --- 339,345 ---- } } ! for (unsigned int iChar = 0; iChar < iCurLine; ++iChar) { ! m_SelStart += vCharRects[iChar].size(); } } *************** *** 444,450 **** } } ! for (unsigned int i = 0; i < iCurLine; ++i) { ! CursorPos += vCharRects[i].size(); } --- 444,450 ---- } } ! for (unsigned int iChar = 0; iChar < iCurLine; ++iChar) { ! CursorPos += vCharRects[iChar].size(); } |
|
From: Rob W. <gre...@us...> - 2004-04-23 03:00:39
|
Update of /cvsroot/wgui/wgui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv849 Modified Files: wgui.dsw Log Message: VC6 build fix Index: wgui.dsw =================================================================== RCS file: /cvsroot/wgui/wgui/wgui.dsw,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** wgui.dsw 27 Jan 2004 21:40:07 -0000 1.5 --- wgui.dsw 23 Apr 2004 03:00:15 -0000 1.6 *************** *** 15,18 **** --- 15,21 ---- Project_Dep_Name wgui End Project Dependency + Begin Project Dependency + Project_Dep_Name UnitTests + End Project Dependency }}} *************** *** 27,30 **** --- 30,39 ---- Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name UnitTests + End Project Dependency + Begin Project Dependency + Project_Dep_Name wgui + End Project Dependency }}} *************** *** 39,47 **** Package=<4> {{{ }}} ############################################################################### ! Project: "TestApp1"=".\tests\UnitTests.dsp" - Package Owner=<4> Package=<5> --- 48,62 ---- Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name UnitTests + End Project Dependency + Begin Project Dependency + Project_Dep_Name wgui + End Project Dependency }}} ############################################################################### ! Project: "Notepad"=".\tests\Notepad.dsp" - Package Owner=<4> Package=<5> *************** *** 52,55 **** --- 67,73 ---- {{{ Begin Project Dependency + Project_Dep_Name UnitTests + End Project Dependency + Begin Project Dependency Project_Dep_Name wgui End Project Dependency *************** *** 69,72 **** --- 87,93 ---- Project_Dep_Name wgui End Project Dependency + Begin Project Dependency + Project_Dep_Name UnitTests + End Project Dependency }}} *************** *** 84,87 **** --- 105,126 ---- Project_Dep_Name wgui End Project Dependency + Begin Project Dependency + Project_Dep_Name UnitTests + End Project Dependency + }}} + + ############################################################################### + + Project: "UnitTests"=".\tests\UnitTests.dsp" - Package Owner=<4> + + Package=<5> + {{{ + }}} + + Package=<4> + {{{ + Begin Project Dependency + Project_Dep_Name wgui + End Project Dependency }}} |