⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wg_picture.h

📁 一个小巧的嵌入式图形系统wGUI, 可以用VC编译
💻 H
字号:
// wg_picture.h//// CPicture 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_PICTURE_H_#define _WG_PICTURE_H_#include "wg_window.h"#include "wg_painter.h"#include "wg_resource_handle.h"namespace wGui{//! A picture control//! Will take a picture file and display it//! The CPicture control does not do any sort of resizing, but it will clip the picture to the client rectclass CPicture : public CWindow{public:	//! Constructs a new picture control  	//! \param WindowRect A CRect that defines the outer limits of the control	//! \param pParent A pointer to the parent window	//! \param sPictureFile The picture resource, must be a bitmap (.bmp)	//! \param bDrawBorder If true, it will draw a border around the picture, defaults to false	//! \param BorderColor The color to use when drawing the border	CPicture(const CRect& WindowRect, CWindow* pParent, const std::string& sPictureFile,		bool bDrawBorder = false, const CRGBColor& BorderColor = DEFAULT_LINE_COLOR);	//! Constructs a new picture control  	//! \param WindowRect A CRect that defines the outer limits of the control	//! \param pParent A pointer to the parent window	//! \param hBitmap A handle for the bitmap resource	//! \param bDrawBorder If true, it will draw a border around the picture, defaults to false	//! \param BorderColor The color to use when drawing the border	CPicture(const CRect& WindowRect, CWindow* pParent, const CBitmapResourceHandle& hBitmap,		bool bDrawBorder = false, const CRGBColor& BorderColor = DEFAULT_LINE_COLOR);	//! Standard destructor	virtual ~CPicture(void);	// CWindow overrides	//! Draws the button and renders the button label	virtual void Draw(void) const;	//! Giving a control a new WindowRect will move and resize the control	//! \param WindowRect A CRect that defines the outer limits of the control	virtual void SetWindowRect(const CRect& WindowRect);protected:	bool m_bDrawBorder;  //!< The color to use when drawing the border	CRGBColor m_BorderColor;  //!< The color to use when drawing the border	CBitmapResourceHandle m_hBitmap;  //!< A handle for the bitmap resourceprivate:	void operator=(CPicture) { }  //!< The assignment operator is not allowed for CWindow derived objects};}#endif // _WG_PICTURE_H_

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -