📄 classwgui_1_1cmenu.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::CMenu 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::CMenu Class Reference</h1>A standard application level menu. <a href="#_details">More...</a><p><code>#include <<a class="el" href="wg__menu_8h-source.html">wg_menu.h</a>></code><p><p>Inheritance diagram for wGui::CMenu:<p><center><img src="classwGui_1_1CMenu.png" usemap="#wGui::CMenu_map" border="0" alt=""></center><map name="wGui::CMenu_map"><area href="classwGui_1_1CMenuBase.html" alt="wGui::CMenuBase" shape="rect" coords="0,112,138,136"><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_1CMenu.html#a0">CMenu</a> (const <a class="el" href="classwGui_1_1CRect.html">CRect</a> &WindowRect, <a class="el" href="classwGui_1_1CWindow.html">CWindow</a> *pParent, <a class="el" href="classwGui_1_1CFontEngine.html">CFontEngine</a> *pFontEngine=0)<li><a name="a1" doxytag="wGui::CMenu::~CMenu"></a>virtual <a class="el" href="classwGui_1_1CMenu.html#a1">~CMenu</a> (void)<dl class="el"><dd><font size=-1><em>Standard destructor.<br><br></em></font></dl><li>virtual void <a class="el" href="classwGui_1_1CMenu.html#a2">InsertMenuItem</a> (const <a class="el" href="structwGui_1_1SMenuItem.html">SMenuItem</a> &MenuItem, int iPosition=-1)<li>virtual void <a class="el" href="classwGui_1_1CMenu.html#a3">Draw</a> (void) const<li>virtual bool <a class="el" href="classwGui_1_1CMenu.html#a4">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_1CMenu.html#a5">HandleMessage</a> (<a class="el" href="classwGui_1_1CMessage.html">CMessage</a> *pMessage)</ul><h2>Protected Methods</h2><ul><li><a name="b0" doxytag="wGui::CMenu::UpdateCachedRects"></a>virtual void <a class="el" href="classwGui_1_1CMenu.html#b0">UpdateCachedRects</a> (void) const<dl class="el"><dd><font size=-1><em>This updates the cached item rects if they are marked as invalid.<br><br></em></font></dl><li>virtual void <a class="el" href="classwGui_1_1CMenu.html#b1">ShowActivePopup</a> (const <a class="el" href="classwGui_1_1CRect.html">CRect</a> &ParentRect, const <a class="el" href="classwGui_1_1CRect.html">CRect</a> &BoundingRect)</ul><hr><a name="_details"></a><h2>Detailed Description</h2>A standard application level menu.<p><p>Definition at line <a class="el" href="wg__menu_8h-source.html#l00149">149</a> of file <a class="el" href="wg__menu_8h-source.html">wg_menu.h</a>.<hr><h2>Constructor & Destructor Documentation</h2><a name="a0" doxytag="wGui::CMenu::CMenu"></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::CMenu::CMenu </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><a class="el" href="classwGui_1_1CFontEngine.html">CFontEngine</a> * </td> <td class="mdname" nowrap> <em>pFontEngine</em> = 0</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 Menu <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>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></table></dl><p>Definition at line <a class="el" href="wg__menu_8cpp-source.html#l00201">201</a> of file <a class="el" href="wg__menu_8cpp-source.html">wg_menu.cpp</a>.<p>References <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="a3" doxytag="wGui::CMenu::Draw"></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::CMenu::Draw </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const<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_1CWindow.html">CWindow</a> overrides Draws the menu <p>Implements <a class="el" href="classwGui_1_1CMenuBase.html#a7">wGui::CMenuBase</a>.<p>Definition at line <a class="el" href="wg__menu_8cpp-source.html#l00227">227</a> of file <a class="el" href="wg__menu_8cpp-source.html">wg_menu.cpp</a>.<p>References <a class="el" href="wg__rect_8h-source.html#l00091">wGui::CRect::Bottom()</a>, <a class="el" href="wg__painter_8cpp-source.html#l00122">wGui::CPainter::DrawRect()</a>, <a class="el" href="wg__painter_8cpp-source.html#l00094">wGui::CPainter::DrawVLine()</a>, <a class="el" href="wg__rect_8cpp-source.html#l00090">wGui::CRect::Grow()</a>, <a class="el" href="wg__rect_8h-source.html#l00085">wGui::CRect::Left()</a>, <a class="el" href="wg__menu_8h-source.html#l00138">wGui::CMenuBase::m_HighlightColor</a>, <a class="el" href="wg__menu_8h-source.html#l00133">wGui::CMenuBase::m_MenuItems</a>, <a class="el" href="wg__menu_8h-source.html#l00134">wGui::CMenuBase::m_pHighlightedItem</a>, <a class="el" href="wg__window_8h-source.html#l00206">wGui::CWindow::m_pSDLSurface</a>, <a class="el" href="wg__rect_8h-source.html#l00088">wGui::CRect::Right()</a>, <a class="el" href="wg__rect_8h-source.html#l00082">wGui::CRect::Top()</a>, and <a class="el" href="wg__menu_8cpp-source.html#l00310">UpdateCachedRects()</a>. </td> </tr></table><a name="a5" doxytag="wGui::CMenu::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::CMenu::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>CMenus handle MOUSE_BUTTONDOWN and MOUSE_BUTTONUP messages <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_1CMenuBase.html#a9">wGui::CMenuBase</a>.<p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -