📄 classwgui_1_1ctoolbar.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::CToolBar 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::CToolBar Class Reference</h1>A Toolbar control that groups and organizes buttons Toolbars support <a class="el" href="classwGui_1_1CButton.html">CButton</a> derived controls. <a href="#_details">More...</a><p><code>#include <<a class="el" href="wg__toolbar_8h-source.html">wg_toolbar.h</a>></code><p><p>Inheritance diagram for wGui::CToolBar:<p><center><img src="classwGui_1_1CToolBar.png" usemap="#wGui::CToolBar_map" border="0" alt=""></center><map name="wGui::CToolBar_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_1CToolBar.html#a0">CToolBar</a> (const <a class="el" href="classwGui_1_1CRect.html">CRect</a> &WindowRect, <a class="el" href="classwGui_1_1CWindow.html">CWindow</a> *pParent)<li><a name="a1" doxytag="wGui::CToolBar::~CToolBar"></a>virtual <a class="el" href="classwGui_1_1CToolBar.html#a1">~CToolBar</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_1CToolBar.html#a2">InsertButton</a> (<a class="el" href="classwGui_1_1CButton.html">CButton</a> *pButton, long int iButtonID=0, int iPosition=-1)<li>void <a class="el" href="classwGui_1_1CToolBar.html#a3">RemoveButton</a> (int iPosition)<li><a name="a4" doxytag="wGui::CToolBar::ButtonCount"></a>int <a class="el" href="classwGui_1_1CToolBar.html#a4">ButtonCount</a> (void)<dl class="el"><dd><font size=-1><em><dl compact><dt><b>Returns: </b></dt><dd>The number of buttons in the toolbar</dl><br><br></em></font></dl><li>long int <a class="el" href="classwGui_1_1CToolBar.html#a5">GetButtonID</a> (int iPosition)<li>int <a class="el" href="classwGui_1_1CToolBar.html#a6">GetButtonPosition</a> (long int iButtonID)<li>virtual void <a class="el" href="classwGui_1_1CToolBar.html#a7">SetWindowRect</a> (const <a class="el" href="classwGui_1_1CRect.html">CRect</a> &WindowRect)<li>virtual bool <a class="el" href="classwGui_1_1CToolBar.html#a8">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::CToolBar::RepositionButtons"></a>void <a class="el" href="classwGui_1_1CToolBar.html#b0">RepositionButtons</a> (void)<dl class="el"><dd><font size=-1><em>Reposition all the buttons in the toolbar.<br><br></em></font></dl></ul><h2>Protected Attributes</h2><ul><li><a name="n0" doxytag="wGui::CToolBar::m_vpButtons"></a>t_ButtonVector <a class="el" href="classwGui_1_1CToolBar.html#n0">m_vpButtons</a><dl class="el"><dd><font size=-1><em>A vector of pointers to the buttons and their IDs in the toolbar.<br><br></em></font></dl></ul><hr><a name="_details"></a><h2>Detailed Description</h2>A Toolbar control that groups and organizes buttons Toolbars support <a class="el" href="classwGui_1_1CButton.html">CButton</a> derived controls.<p><p>Definition at line <a class="el" href="wg__toolbar_8h-source.html#l00040">40</a> of file <a class="el" href="wg__toolbar_8h-source.html">wg_toolbar.h</a>.<hr><h2>Constructor & Destructor Documentation</h2><a name="a0" doxytag="wGui::CToolBar::CToolBar"></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::CToolBar::CToolBar </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 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 ToolBar <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></table></dl><p>Definition at line <a class="el" href="wg__toolbar_8cpp-source.html#l00034">34</a> of file <a class="el" href="wg__toolbar_8cpp-source.html">wg_toolbar.cpp</a>.<p>References <a class="el" href="wg__window_8h-source.html#l00194">wGui::CWindow::m_BGColor</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="a5" doxytag="wGui::CToolBar::GetButtonID"></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"> long int wGui::CToolBar::GetButtonID </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">int </td> <td class="mdname1" valign="top" nowrap> <em>iPosition</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [inline]</code></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>iPosition</em> </td><td>The position of the button to get the ID for </td></tr></table></dl><dl compact><dt><b>Returns: </b></dt><dd>The ButtonID of the button at the given position (spacers always return 0) </dl><p>Definition at line <a class="el" href="wg__toolbar_8h-source.html#l00070">70</a> of file <a class="el" href="wg__toolbar_8h-source.html">wg_toolbar.h</a>.<p>References <a class="el" href="wg__toolbar_8h-source.html#l00095">m_vpButtons</a>. </td> </tr></table><a name="a6" doxytag="wGui::CToolBar::GetButtonPosition"></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"> int wGui::CToolBar::GetButtonPosition </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">long int </td> <td class="mdname1" valign="top" nowrap> <em>iButtonID</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><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>iButtonID</em> </td><td>The ID of the button to get the position for </td></tr></table></dl><dl compact><dt><b>Returns: </b></dt><dd>The position of the button, or -1 if it can't find the ButtonID </dl><p>Definition at line <a class="el" href="wg__toolbar_8cpp-source.html#l00081">81</a> of file <a class="el" href="wg__toolbar_8cpp-source.html">wg_toolbar.cpp</a>.<p>References <a class="el" href="wg__toolbar_8h-source.html#l00095">m_vpButtons</a>. </td> </tr></table><a name="a8" doxytag="wGui::CToolBar::HandleMessage"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -