📄 wg_progress.h
字号:
// wg_progress.h//// CProgress interface////// Copyright (c) 2002 Rob Wiskow// rob-dev@boxedchaos.com//// 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_PROGRESS_H_#define _WG_PROGRESS_H_#include "wg_window.h"#include "wg_painter.h"namespace wGui{//! A progress bar displayclass CProgress : public CWindow{public: //! Constructs a progress bar, initilizes the limits to 0, and 100 with the progress at 0 //! \param WindowRect A CRect that defines the outer limits of the control //! \param pParent A pointer to the parent window //! \param BarColor The color of the progress bar, defaults to Blue CProgress(const CRect& WindowRect, CWindow* pParent, CRGBColor BarColor = COLOR_BLUE); //! Standard destructor 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; } // CWindow overrides //! Draws the progress bar virtual void Draw(void) const;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;private: void operator=(CProgress) { } //!< The assignment operator is not allowed for CWindow derived objects};}#endif // _WG_PROGRESS_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -