📄 classwgui_1_1cframe.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::CFrame 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::CFrame Class Reference</h1>NOTE - This class is not yet fully functional! Frames are windows within a view that have their own window management controls. <a href="#_details">More...</a><p><code>#include <<a class="el" href="wg__frame_8h-source.html">wg_frame.h</a>></code><p><p>Inheritance diagram for wGui::CFrame:<p><center><img src="classwGui_1_1CFrame.png" usemap="#wGui::CFrame_map" border="0" alt=""></center><map name="wGui::CFrame_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_1CFrame.html#a0">CFrame</a> (const <a class="el" href="classwGui_1_1CRect.html">CRect</a> &WindowRect, <a class="el" href="classwGui_1_1CView.html">CView</a> *pParent, <a class="el" href="classwGui_1_1CFontEngine.html">CFontEngine</a> *pFontEngine, std::string sTitle, bool bResizable=true)<li><a name="a1" doxytag="wGui::CFrame::~CFrame"></a>virtual <a class="el" href="classwGui_1_1CFrame.html#a1">~CFrame</a> (void)<dl class="el"><dd><font size=-1><em>Standard destructor.<br><br></em></font></dl><li>void <a class="el" href="classwGui_1_1CFrame.html#a2">SetTitleBarColor</a> (<a class="el" href="classwGui_1_1CRGBColor.html">CRGBColor</a> &TitleBarColor)<li>void <a class="el" href="classwGui_1_1CFrame.html#a3">SetTitleBarTextColor</a> (<a class="el" href="classwGui_1_1CRGBColor.html">CRGBColor</a> &TitleBarTextColor)<li>void <a class="el" href="classwGui_1_1CFrame.html#a4">SetTitleBarHeight</a> (int iTitleBarHeight)<li><a name="a5" doxytag="wGui::CFrame::IsResizable"></a>bool <a class="el" href="classwGui_1_1CFrame.html#a5">IsResizable</a> (void)<dl class="el"><dd><font size=-1><em><dl compact><dt><b>Returns: </b></dt><dd>true if the frame is resizable</dl><br><br></em></font></dl><li>void <a class="el" href="classwGui_1_1CFrame.html#a6">AttachMenu</a> (<a class="el" href="classwGui_1_1CMenu.html">CMenu</a> *pMenu)<li><a name="a7" doxytag="wGui::CFrame::GetMenu"></a><a class="el" href="classwGui_1_1CMenu.html">CMenu</a> * <a class="el" href="classwGui_1_1CFrame.html#a7">GetMenu</a> (void)<dl class="el"><dd><font size=-1><em><dl compact><dt><b>Returns: </b></dt><dd>A pointer to the frame's menu, 0 if the view doesn't have a menu</dl><br><br></em></font></dl><li><a name="a8" doxytag="wGui::CFrame::Draw"></a>virtual void <a class="el" href="classwGui_1_1CFrame.html#a8">Draw</a> (void) const<dl class="el"><dd><font size=-1><em>Draws the frame and renders the title bar.<br><br></em></font></dl><li>virtual void <a class="el" href="classwGui_1_1CFrame.html#a9">SetWindowRect</a> (const <a class="el" href="classwGui_1_1CRect.html">CRect</a> &WindowRect)<li>virtual void <a class="el" href="classwGui_1_1CFrame.html#a10">MoveWindow</a> (const <a class="el" href="classwGui_1_1CPoint.html">CPoint</a> &MoveDistance)<li>virtual void <a class="el" href="classwGui_1_1CFrame.html#a11">SetWindowText</a> (const std::string &sText)<li>virtual bool <a class="el" href="classwGui_1_1CFrame.html#a12">OnMouseButtonDown</a> (<a class="el" href="classwGui_1_1CPoint.html">CPoint</a> Point, unsigned int Button)<li>virtual bool <a class="el" href="classwGui_1_1CFrame.html#a13">HandleMessage</a> (<a class="el" href="classwGui_1_1CMessage.html">CMessage</a> *pMessage)</ul><h2>Protected Attributes</h2><ul><li><a name="n0" doxytag="wGui::CFrame::m_pFrameCloseButton"></a><a class="el" href="classwGui_1_1CPictureButton.html">CPictureButton</a> * <a class="el" href="classwGui_1_1CFrame.html#n0">m_pFrameCloseButton</a><dl class="el"><dd><font size=-1><em>The close button for the frame.<br><br></em></font></dl><li><a name="n1" doxytag="wGui::CFrame::m_TitleBarColor"></a><a class="el" href="classwGui_1_1CRGBColor.html">CRGBColor</a> <a class="el" href="classwGui_1_1CFrame.html#n1">m_TitleBarColor</a><dl class="el"><dd><font size=-1><em>The title bar color, defaults to blue.<br><br></em></font></dl><li><a name="n2" doxytag="wGui::CFrame::m_TitleBarTextColor"></a><a class="el" href="classwGui_1_1CRGBColor.html">CRGBColor</a> <a class="el" href="classwGui_1_1CFrame.html#n2">m_TitleBarTextColor</a><dl class="el"><dd><font size=-1><em>The title bar text color, defaults to the default line color.<br><br></em></font></dl><li><a name="n3" doxytag="wGui::CFrame::m_iTitleBarHeight"></a>int <a class="el" href="classwGui_1_1CFrame.html#n3">m_iTitleBarHeight</a><dl class="el"><dd><font size=-1><em>The height of the title bar, defaults to 12.<br><br></em></font></dl><li><a name="n4" doxytag="wGui::CFrame::m_pFontEngine"></a><a class="el" href="classwGui_1_1CFontEngine.html">CFontEngine</a> * <a class="el" href="classwGui_1_1CFrame.html#n4">m_pFontEngine</a><dl class="el"><dd><font size=-1><em>A pointer to the font engine to use to render the text.<br><br></em></font></dl><li><a name="n5" doxytag="wGui::CFrame::m_pRenderedString"></a>std::auto_ptr< <a class="el" href="classwGui_1_1CRenderedString.html">CRenderedString</a> > <a class="el" href="classwGui_1_1CFrame.html#n5">m_pRenderedString</a><dl class="el"><dd><font size=-1><em>An autopointer to the rendered version of the string.<br><br></em></font></dl><li><a name="n6" doxytag="wGui::CFrame::m_bResizable"></a>bool <a class="el" href="classwGui_1_1CFrame.html#n6">m_bResizable</a><dl class="el"><dd><font size=-1><em>Indicates if the view is resizable.<br><br></em></font></dl><li><a name="n7" doxytag="wGui::CFrame::m_pMenu"></a><a class="el" href="classwGui_1_1CMenu.html">CMenu</a> * <a class="el" href="classwGui_1_1CFrame.html#n7">m_pMenu</a><dl class="el"><dd><font size=-1><em>A pointer to the view's menu.<br><br></em></font></dl></ul><hr><a name="_details"></a><h2>Detailed Description</h2>NOTE - This class is not yet fully functional! Frames are windows within a view that have their own window management controls.<p>The <a class="el" href="classwGui_1_1CFrame.html">CFrame</a> class allows the user to create multiple windows within the view. Unfortunately they're still bounded by the view but it's a slight workaround for the SDL limitation of only 1 SDL view per app <p><p>Definition at line <a class="el" href="wg__frame_8h-source.html#l00043">43</a> of file <a class="el" href="wg__frame_8h-source.html">wg_frame.h</a>.<hr><h2>Constructor & Destructor Documentation</h2><a name="a0" doxytag="wGui::CFrame::CFrame"></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::CFrame::CFrame </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_1CView.html">CView</a> * </td> <td class="mdname" nowrap> <em>pParent</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="classwGui_1_1CFontEngine.html">CFontEngine</a> * </td> <td class="mdname" nowrap> <em>pFontEngine</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>std::string </td> <td class="mdname" nowrap> <em>sTitle</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>bool </td> <td class="mdname" nowrap> <em>bResizable</em> = true</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><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 view </td></tr><tr><td valign=top><em>pFontEngine</em> </td><td>A pointer to the font engine to use when drawing the control If this is left out (or set to 0) it will use the default font engine specified by the <a class="el" href="classwGui_1_1CApplication.html">CApplication</a> (which must be set before instantiating this object) </td></tr><tr><td valign=top><em>sTitle</em> </td><td>The window title, which will appear in the title bar of the view </td></tr><tr><td valign=top><em>bResizable</em> </td><td>If true, the window will be resizable </td></tr></table></dl><p>Definition at line <a class="el" href="wg__frame_8cpp-source.html#l00032">32</a> of file <a class="el" href="wg__frame_8cpp-source.html">wg_frame.cpp</a>.<p>References <a class="el" href="wg__frame_8h-source.html#l00114">m_pFontEngine</a>, <a class="el" href="wg__frame_8h-source.html#l00110">m_pFrameCloseButton</a>, <a class="el" href="wg__frame_8h-source.html#l00115">m_pRenderedString</a>, <a class="el" href="wg__window_8h-source.html#l00212">wGui::CWindow::m_sClassName</a>, <a class="el" href="wg__window_8h-source.html#l00188">wGui::CWindow::m_sWindowText</a>, and <a class="el" href="wg__frame_8cpp-source.html#l00119">SetWindowRect()</a>. </td> </tr></table><hr><h2>Member Function Documentation</h2><a name="a6" doxytag="wGui::CFrame::AttachMenu"></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::CFrame::AttachMenu </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classwGui_1_1CMenu.html">CMenu</a> * </td> <td class="mdname1" valign="top" nowrap> <em>pMenu</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Attaches a standard menu to the frame, if the frame already has a menu, the old menu will be deleted <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>pMenu</em> </td><td>A pointer to the menu, the <a class="el" href="classwGui_1_1CFrame.html">CFrame</a> is then responsible for cleaning it up, passing in 0 will delete the current menu </td></tr></table></dl><p>Definition at line <a class="el" href="wg__frame_8cpp-source.html#l00102">102</a> of file <a class="el" href="wg__frame_8cpp-source.html">wg_frame.cpp</a>.<p>References <a class="el" href="wg__rect_8cpp-source.html#l00129">wGui::CRect::ClipTo()</a>, <a class="el" href="wg__window_8h-source.html#l00062">wGui::CWindow::GetWindowRect()</a>, <a class="el" href="wg__rect_8h-source.html#l00130">wGui::CRect::Height()</a>, <a class="el" href="wg__window_8h-source.html#l00197">wGui::CWindow::m_ClientRect</a>, <a class="el" href="wg__frame_8h-source.html#l00117">m_pMenu</a>, <a class="el" href="wg__window_8h-source.html#l00191">wGui::CWindow::m_WindowRect</a>, <a class="el" href="wg__rect_8h-source.html#l00067">wGui::CRect::SetTop()</a>, <a class="el" href="wg__window_8cpp-source.html#l00077">wGui::CWindow::SetWindowRect()</a>, and <a class="el" href="wg__rect_8h-source.html#l00127">wGui::CRect::Width()</a>. </td> </tr></table><a name="a13" doxytag="wGui::CFrame::HandleMessage"></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"> bool wGui::CFrame::HandleMessage </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classwGui_1_1CMessage.html">CMessage</a> * </td> <td class="mdname1" valign="top" nowrap> <em>pMessage</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><a class="el" href="classwGui_1_1CFrame.html">CFrame</a> handles no messages at the moment <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>pMessage</em> </td><td>A pointer to the message </td></tr></table></dl><p>Reimplemented from <a class="el" href="classwGui_1_1CWindow.html#a27">wGui::CWindow</a>.<p>Definition at line <a class="el" href="wg__frame_8cpp-source.html#l00163">163</a> of file <a class="el" href="wg__frame_8cpp-source.html">wg_frame.cpp</a>.<p>References <a class="el" href="wg__rect_8h-source.html#l00091">wGui::CRect::Bottom()</a>, <a class="el" href="wg__message_8h-source.html#l00081">wGui::CMessage::Destination()</a>, <a class="el" href="wg__painter_8cpp-source.html#l00122">wGui::CPainter::DrawRect()</a>, <a class="el" href="wg__window_8cpp-source.html#l00096">wGui::CWindow::GetClientRect()</a>, <a class="el" href="wg__rect_8h-source.html#l00130">wGui::CRect::Height()</a>, <a class="el" href="wg__rect_8h-source.html#l00085">wGui::CRect::Left()</a>, <a class="el" href="wg__frame_8h-source.html#l00110">m_pFrameCloseButton</a>, <a class="el" href="wg__window_8h-source.html#l00200">wGui::CWindow::m_pParentWindow</a>, <a class="el" href="wg__window_8h-source.html#l00206">wGui::CWindow::m_pSDLSurface</a>, <a class="el" href="wg__window_8h-source.html#l00191">wGui::CWindow::m_WindowRect</a>, <a class="el" href="wg__message_8h-source.html#l00078">wGui::CMessage::MessageType()</a>, <a class="el" href="wg__frame_8cpp-source.html#l00128">MoveWindow()</a>, <a class="el" href="wg__message_8h-source.html#l00156">wGui::CMouseMessage::Point</a>, <a class="el" href="wg__rect_8h-source.html#l00088">wGui::CRect::Right()</a>, <a class="el" href="wg__rect_8cpp-source.html#l00038">wGui::CRect::SDLRect()</a>, <a class="el" href="wg__window_8cpp-source.html#l00223">wGui::CWindow::SetNewParent()</a>, <a class="el" href="wg__point_8h-source.html#l00057">wGui::CPoint::SetX()</a>, <a class="el" href="wg__point_8h-source.html#l00061">wGui::CPoint::SetY()</a>, <a class="el" href="wg__message_8h-source.html#l00084">wGui::CMessage::Source()</a>, <a class="el" href="wg__rect_8h-source.html#l00082">wGui::CRect::Top()</a>, <a class="el" href="wg__rect_8h-source.html#l00127">wGui::CRect::Width()</a>, <a class="el" href="wg__point_8h-source.html#l00064">wGui::CPoint::XPos()</a>, and <a class="el" href="wg__point_8h-source.html#l00067">wGui::CPoint::YPos()</a>. </td> </tr></table><a name="a10" doxytag="wGui::CFrame::MoveWindow"></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::CFrame::MoveWindow </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classwGui_1_1CPoint.html">CPoint</a> & </td> <td class="mdname1" valign="top" nowrap> <em>MoveDistance</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>Move the window and any child windows <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>MoveDistance</em> </td><td>The relative distance to move the window </td></tr></table></dl><p>Reimplemented from <a class="el" href="classwGui_1_1CWindow.html#a4">wGui::CWindow</a>.<p>Definition at line <a class="el" href="wg__frame_8cpp-source.html#l00128">128</a> of file <a class="el" href="wg__frame_8cpp-source.html">wg_frame.cpp</a>.<p>Referenced by <a class="el" href="wg__frame_8cpp-source.html#l00163">HandleMessage()</a>. </td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -