📄 classwgui_1_1cpicture.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>wGui::CPicture class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> </center><hr><h1>wGui::CPicture Class Reference</h1>A picture control. <a href="#_details">More...</a><p><code>#include <<a class="el" href="wg__picture_8h-source.html">wg_picture.h</a>></code><p><p>Inheritance diagram for wGui::CPicture:<p><center><img src="classwGui_1_1CPicture.png" usemap="#wGui::CPicture_map" border="0" alt=""></center><map name="wGui::CPicture_map"><area href="classwGui_1_1CWindow.html" alt="wGui::CWindow" shape="rect" coords="0,56,138,80"><area href="classwGui_1_1CMessageClient.html" alt="wGui::CMessageClient" shape="rect" coords="0,0,138,24"></map><h2>Public Methods</h2><ul><li><a class="el" href="classwGui_1_1CPicture.html#a0">CPicture</a> (const <a class="el" href="classwGui_1_1CRect.html">CRect</a> &WindowRect, <a class="el" href="classwGui_1_1CWindow.html">CWindow</a> *pParent, const std::string &sPictureFile, bool bDrawBorder=false, const <a class="el" href="classwGui_1_1CRGBColor.html">CRGBColor</a> &BorderColor=DEFAULT_LINE_COLOR)<li><a class="el" href="classwGui_1_1CPicture.html#a1">CPicture</a> (const <a class="el" href="classwGui_1_1CRect.html">CRect</a> &WindowRect, <a class="el" href="classwGui_1_1CWindow.html">CWindow</a> *pParent, const <a class="el" href="classwGui_1_1CBitmapResourceHandle.html">CBitmapResourceHandle</a> &hBitmap, bool bDrawBorder=false, const <a class="el" href="classwGui_1_1CRGBColor.html">CRGBColor</a> &BorderColor=DEFAULT_LINE_COLOR)<li><a name="a2" doxytag="wGui::CPicture::~CPicture"></a>virtual <a class="el" href="classwGui_1_1CPicture.html#a2">~CPicture</a> (void)<dl class="el"><dd><font size=-1><em>Standard destructor.<br><br></em></font></dl><li><a name="a3" doxytag="wGui::CPicture::Draw"></a>virtual void <a class="el" href="classwGui_1_1CPicture.html#a3">Draw</a> (void) const<dl class="el"><dd><font size=-1><em>Draws the button and renders the button label.<br><br></em></font></dl><li>virtual void <a class="el" href="classwGui_1_1CPicture.html#a4">SetWindowRect</a> (const <a class="el" href="classwGui_1_1CRect.html">CRect</a> &WindowRect)</ul><h2>Protected Attributes</h2><ul><li><a name="n0" doxytag="wGui::CPicture::m_bDrawBorder"></a>bool <a class="el" href="classwGui_1_1CPicture.html#n0">m_bDrawBorder</a><dl class="el"><dd><font size=-1><em>The color to use when drawing the border.<br><br></em></font></dl><li><a name="n1" doxytag="wGui::CPicture::m_BorderColor"></a><a class="el" href="classwGui_1_1CRGBColor.html">CRGBColor</a> <a class="el" href="classwGui_1_1CPicture.html#n1">m_BorderColor</a><dl class="el"><dd><font size=-1><em>The color to use when drawing the border.<br><br></em></font></dl><li><a name="n2" doxytag="wGui::CPicture::m_hBitmap"></a><a class="el" href="classwGui_1_1CBitmapResourceHandle.html">CBitmapResourceHandle</a> <a class="el" href="classwGui_1_1CPicture.html#n2">m_hBitmap</a><dl class="el"><dd><font size=-1><em>A handle for the bitmap resource.<br><br></em></font></dl></ul><hr><a name="_details"></a><h2>Detailed Description</h2>A picture control.<p>Will take a picture file and display it The <a class="el" href="classwGui_1_1CPicture.html">CPicture</a> control does not do any sort of resizing, but it will clip the picture to the client rect <p><p>Definition at line <a class="el" href="wg__picture_8h-source.html#l00041">41</a> of file <a class="el" href="wg__picture_8h-source.html">wg_picture.h</a>.<hr><h2>Constructor & Destructor Documentation</h2><a name="a0" doxytag="wGui::CPicture::CPicture"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> wGui::CPicture::CPicture </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classwGui_1_1CRect.html">CRect</a> & </td> <td class="mdname" nowrap> <em>WindowRect</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="classwGui_1_1CWindow.html">CWindow</a> * </td> <td class="mdname" nowrap> <em>pParent</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const std::string & </td> <td class="mdname" nowrap> <em>sPictureFile</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>bool </td> <td class="mdname" nowrap> <em>bDrawBorder</em> = false, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const <a class="el" href="classwGui_1_1CRGBColor.html">CRGBColor</a> & </td> <td class="mdname" nowrap> <em>BorderColor</em> = DEFAULT_LINE_COLOR</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Constructs a new picture control <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>WindowRect</em> </td><td>A <a class="el" href="classwGui_1_1CRect.html">CRect</a> that defines the outer limits of the control </td></tr><tr><td valign=top><em>pParent</em> </td><td>A pointer to the parent window </td></tr><tr><td valign=top><em>sPictureFile</em> </td><td>The picture resource, must be a bitmap (.bmp) </td></tr><tr><td valign=top><em>bDrawBorder</em> </td><td>If true, it will draw a border around the picture, defaults to false </td></tr><tr><td valign=top><em>BorderColor</em> </td><td>The color to use when drawing the border </td></tr></table></dl><p>Definition at line <a class="el" href="wg__picture_8cpp-source.html#l00032">32</a> of file <a class="el" href="wg__picture_8cpp-source.html">wg_picture.cpp</a>.<p>References <a class="el" href="wg__rect_8cpp-source.html#l00090">wGui::CRect::Grow()</a>, <a class="el" href="wg__window_8h-source.html#l00197">wGui::CWindow::m_ClientRect</a>, and <a class="el" href="wg__window_8h-source.html#l00212">wGui::CWindow::m_sClassName</a>. </td> </tr></table><a name="a1" doxytag="wGui::CPicture::CPicture"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> wGui::CPicture::CPicture </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classwGui_1_1CRect.html">CRect</a> & </td> <td class="mdname" nowrap> <em>WindowRect</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="classwGui_1_1CWindow.html">CWindow</a> * </td> <td class="mdname" nowrap> <em>pParent</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const <a class="el" href="classwGui_1_1CBitmapResourceHandle.html">CBitmapResourceHandle</a> & </td> <td class="mdname" nowrap> <em>hBitmap</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>bool </td> <td class="mdname" nowrap> <em>bDrawBorder</em> = false, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const <a class="el" href="classwGui_1_1CRGBColor.html">CRGBColor</a> & </td> <td class="mdname" nowrap> <em>BorderColor</em> = DEFAULT_LINE_COLOR</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Constructs a new picture control <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>WindowRect</em> </td><td>A <a class="el" href="classwGui_1_1CRect.html">CRect</a> that defines the outer limits of the control </td></tr><tr><td valign=top><em>pParent</em> </td><td>A pointer to the parent window </td></tr><tr><td valign=top><em>hBitmap</em> </td><td>A handle for the bitmap resource </td></tr><tr><td valign=top><em>bDrawBorder</em> </td><td>If true, it will draw a border around the picture, defaults to false </td></tr><tr><td valign=top><em>BorderColor</em> </td><td>The color to use when drawing the border </td></tr></table></dl><p>Definition at line <a class="el" href="wg__picture_8cpp-source.html#l00047">47</a> of file <a class="el" href="wg__picture_8cpp-source.html">wg_picture.cpp</a>.<p>References <a class="el" href="wg__rect_8cpp-source.html#l00090">wGui::CRect::Grow()</a>, <a class="el" href="wg__window_8h-source.html#l00197">wGui::CWindow::m_ClientRect</a>, and <a class="el" href="wg__window_8h-source.html#l00212">wGui::CWindow::m_sClassName</a>. </td> </tr></table><hr><h2>Member Function Documentation</h2><a name="a4" doxytag="wGui::CPicture::SetWindowRect"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void wGui::CPicture::SetWindowRect </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classwGui_1_1CRect.html">CRect</a> & </td> <td class="mdname1" valign="top" nowrap> <em>WindowRect</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Giving a control a new WindowRect will move and resize the control <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>WindowRect</em> </td><td>A <a class="el" href="classwGui_1_1CRect.html">CRect</a> that defines the outer limits of the control </td></tr></table></dl><p>Reimplemented from <a class="el" href="classwGui_1_1CWindow.html#a2">wGui::CWindow</a>.<p>Definition at line <a class="el" href="wg__picture_8cpp-source.html#l00087">87</a> of file <a class="el" href="wg__picture_8cpp-source.html">wg_picture.cpp</a>.<p>References <a class="el" href="wg__rect_8cpp-source.html#l00090">wGui::CRect::Grow()</a>, <a class="el" href="wg__window_8h-source.html#l00197">wGui::CWindow::m_ClientRect</a>, and <a class="el" href="wg__window_8h-source.html#l00191">wGui::CWindow::m_WindowRect</a>. </td> </tr></table><hr>The documentation for this class was generated from the following files:<ul><li><a class="el" href="wg__picture_8h-source.html">wg_picture.h</a><li><a class="el" href="wg__picture_8cpp-source.html">wg_picture.cpp</a></ul><hr><address style="align: right;"><small>Generated on Sat Oct 25 12:43:28 2003 for wGui by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -