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

📄 classwgui_1_1ceditbox.html

📁 一个小巧的嵌入式图形系统wGUI, 可以用VC编译
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!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::CEditBox 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> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; </center><hr><h1>wGui::CEditBox Class Reference</h1>A simple edit box control The <a class="el" href="classwGui_1_1CEditBox.html">CEditBox</a> will generate CTRL_VALUECHANGE messages every time the text changes. <a href="#_details">More...</a><p><code>#include &lt;<a class="el" href="wg__editbox_8h-source.html">wg_editbox.h</a>&gt;</code><p><p>Inheritance diagram for wGui::CEditBox:<p><center><img src="classwGui_1_1CEditBox.png" usemap="#wGui::CEditBox_map" border="0" alt=""></center><map name="wGui::CEditBox_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_1CEditBox.html#a0">CEditBox</a> (const <a class="el" href="classwGui_1_1CRect.html">CRect</a> &amp;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::CEditBox::~CEditBox"></a>virtual <a class="el" href="classwGui_1_1CEditBox.html#a1">~CEditBox</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_1CEditBox.html#a2">SetUsePasswordMask</a> (bool bUseMask)<li><a name="a3" doxytag="wGui::CEditBox::UsingPasswordMask"></a>bool <a class="el" href="classwGui_1_1CEditBox.html#a3">UsingPasswordMask</a> (void)<dl class="el"><dd><font size=-1><em><dl compact><dt><b>Returns: </b></dt><dd>true if the control is a password box</dl><br><br></em></font></dl><li>void <a class="el" href="classwGui_1_1CEditBox.html#a4">SetReadOnly</a> (bool bReadOnly)<li><a name="a5" doxytag="wGui::CEditBox::IsReadOnly"></a>bool <a class="el" href="classwGui_1_1CEditBox.html#a5">IsReadOnly</a> (void)<dl class="el"><dd><font size=-1><em><dl compact><dt><b>Returns: </b></dt><dd>true if the control is read-only</dl><br><br></em></font></dl><li><a name="a6" doxytag="wGui::CEditBox::GetSelText"></a>std::string <a class="el" href="classwGui_1_1CEditBox.html#a6">GetSelText</a> (void) const<dl class="el"><dd><font size=-1><em><dl compact><dt><b>Returns: </b></dt><dd>The currently selected text in the edit box</dl><br><br></em></font></dl><li><a name="a7" doxytag="wGui::CEditBox::Draw"></a>virtual void <a class="el" href="classwGui_1_1CEditBox.html#a7">Draw</a> (void) const<dl class="el"><dd><font size=-1><em>Renders the text contents of a control, and the cursor.<br><br></em></font></dl><li>virtual void <a class="el" href="classwGui_1_1CEditBox.html#a8">SetWindowText</a> (const std::string &amp;sText)<li>virtual bool <a class="el" href="classwGui_1_1CEditBox.html#a9">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_1CEditBox.html#a10">HandleMessage</a> (<a class="el" href="classwGui_1_1CMessage.html">CMessage</a> *pMessage)</ul><h2>Protected Methods</h2><ul><li>void <a class="el" href="classwGui_1_1CEditBox.html#b0">SelDelete</a> (std::string *psString)</ul><h2>Protected Attributes</h2><ul><li><a name="n0" doxytag="wGui::CEditBox::m_pFontEngine"></a><a class="el" href="classwGui_1_1CFontEngine.html">CFontEngine</a> * <a class="el" href="classwGui_1_1CEditBox.html#n0">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="n1" doxytag="wGui::CEditBox::m_pRenderedString"></a>std::auto_ptr&lt; <a class="el" href="classwGui_1_1CRenderedString.html">CRenderedString</a> &gt; <a class="el" href="classwGui_1_1CEditBox.html#n1">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="n2" doxytag="wGui::CEditBox::m_FontSize"></a>unsigned char <a class="el" href="classwGui_1_1CEditBox.html#n2">m_FontSize</a><dl class="el"><dd><font size=-1><em>The font size (in points).<br><br></em></font></dl><li><a name="n3" doxytag="wGui::CEditBox::m_SelStart"></a>unsigned int <a class="el" href="classwGui_1_1CEditBox.html#n3">m_SelStart</a><dl class="el"><dd><font size=-1><em>Selection start point, in charachters.<br><br></em></font></dl><li><a name="n4" doxytag="wGui::CEditBox::m_SelLength"></a>int <a class="el" href="classwGui_1_1CEditBox.html#n4">m_SelLength</a><dl class="el"><dd><font size=-1><em>Selection length, in charachters.<br><br></em></font></dl><li><a name="n5" doxytag="wGui::CEditBox::m_DragStart"></a>unsigned int <a class="el" href="classwGui_1_1CEditBox.html#n5">m_DragStart</a><dl class="el"><dd><font size=-1><em>The position where the draw started.<br><br></em></font></dl><li><a name="n6" doxytag="wGui::CEditBox::m_ScrollOffset"></a>int <a class="el" href="classwGui_1_1CEditBox.html#n6">m_ScrollOffset</a><dl class="el"><dd><font size=-1><em>The offset of the left side of the string, used for scrolling in the edit box.<br><br></em></font></dl><li><a name="n7" doxytag="wGui::CEditBox::m_bReadOnly"></a>bool <a class="el" href="classwGui_1_1CEditBox.html#n7">m_bReadOnly</a><dl class="el"><dd><font size=-1><em>If true, the text of the control cannot be changed.<br><br></em></font></dl><li><a name="n8" doxytag="wGui::CEditBox::m_bMouseDown"></a>bool <a class="el" href="classwGui_1_1CEditBox.html#n8">m_bMouseDown</a><dl class="el"><dd><font size=-1><em>Set to true when the mouse button goes down.<br><br></em></font></dl><li><a name="n9" doxytag="wGui::CEditBox::m_bUseMask"></a>bool <a class="el" href="classwGui_1_1CEditBox.html#n9">m_bUseMask</a><dl class="el"><dd><font size=-1><em>Set to true if you want the edit box to act as a password box and have a mask of astrisks.<br><br></em></font></dl><li><a name="n10" doxytag="wGui::CEditBox::m_bLastMouseMoveInside"></a>bool <a class="el" href="classwGui_1_1CEditBox.html#n10">m_bLastMouseMoveInside</a><dl class="el"><dd><font size=-1><em>True if the cursor was inside the control on the last MOUSE_MOVE message.<br><br></em></font></dl></ul><hr><a name="_details"></a><h2>Detailed Description</h2>A simple edit box control The <a class="el" href="classwGui_1_1CEditBox.html">CEditBox</a> will generate CTRL_VALUECHANGE messages every time the text changes.<p><p>Definition at line <a class="el" href="wg__editbox_8h-source.html#l00042">42</a> of file <a class="el" href="wg__editbox_8h-source.html">wg_editbox.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2><a name="a0" doxytag="wGui::CEditBox::CEditBox"></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::CEditBox::CEditBox </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="classwGui_1_1CRect.html">CRect</a> &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>WindowRect</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap><a class="el" href="classwGui_1_1CWindow.html">CWindow</a> *&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>pParent</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap><a class="el" href="classwGui_1_1CFontEngine.html">CFontEngine</a> *&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>pFontEngine</em> = 0</td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Construct a new Edit control <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>WindowRect</em>&nbsp;</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>&nbsp;</td><td>A pointer to the parent window </td></tr><tr><td valign=top><em>pFontEngine</em>&nbsp;</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__editbox_8cpp-source.html#l00036">36</a> of file <a class="el" href="wg__editbox_8cpp-source.html">wg_editbox.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#l00194">wGui::CWindow::m_BGColor</a>, <a class="el" href="wg__window_8h-source.html#l00197">wGui::CWindow::m_ClientRect</a>, <a class="el" href="wg__editbox_8h-source.html#l00101">m_pFontEngine</a>, <a class="el" href="wg__editbox_8h-source.html#l00102">m_pRenderedString</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="a10" doxytag="wGui::CEditBox::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::CEditBox::HandleMessage </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="classwGui_1_1CMessage.html">CMessage</a> *&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>pMessage</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p><a class="el" href="classwGui_1_1CEditBox.html">CEditBox</a> will handle MOUSE_BUTTONDOWN and KEYBOARD_KEYDOWN messages <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>pMessage</em>&nbsp;</td><td>A pointer to the message that needs to be handled </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__editbox_8cpp-source.html#l00271">271</a> of file <a class="el" href="wg__editbox_8cpp-source.html">wg_editbox.cpp</a>.<p>References <a class="el" href="wg__message_8h-source.html#l00081">wGui::CMessage::Destination()</a>, <a class="el" href="wg__rect_8cpp-source.html#l00090">wGui::CRect::Grow()</a>, <a class="el" href="wg__rect_8cpp-source.html#l00167">wGui::CRect::HitTest()</a>, <a class="el" href="wg__message_8h-source.html#l00119">wGui::CKeyboardMessage::Key</a>, <a class="el" href="wg__rect_8h-source.html#l00085">wGui::CRect::Left()</a>, <a class="el" href="wg__editbox_8h-source.html#l00111">m_bLastMouseMoveInside</a>, <a class="el" href="wg__editbox_8h-source.html#l00109">m_bMouseDown</a>, <a class="el" href="wg__editbox_8h-source.html#l00108">m_bReadOnly</a>, <a class="el" href="wg__window_8h-source.html#l00209">wGui::CWindow::m_bVisible</a>, <a class="el" href="wg__editbox_8h-source.html#l00106">m_DragStart</a>, <a class="el" href="wg__editbox_8h-source.html#l00101">m_pFontEngine</a>, <a class="el" href="wg__window_8h-source.html#l00200">wGui::CWindow::m_pParentWindow</a>, <a class="el" href="wg__editbox_8h-source.html#l00102">m_pRenderedString</a>, <a class="el" href="wg__editbox_8h-source.html#l00107">m_ScrollOffset</a>, <a class="el" href="wg__editbox_8h-source.html#l00105">m_SelLength</a>, <a class="el" href="wg__editbox_8h-source.html#l00104">m_SelStart</a>, <a class="el" href="wg__window_8h-source.html#l00188">wGui::CWindow::m_sWindowText</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__message_8h-source.html#l00118">wGui::CKeyboardMessage::Modifiers</a>, <a class="el" href="wg__message_8h-source.html#l00156">wGui::CMouseMessage::Point</a>, <a class="el" href="wg__editbox_8cpp-source.html#l00552">SelDelete()</a>, <a class="el" href="wg__window_8cpp-source.html#l00213">wGui::CWindow::StartDrawProc()</a>, <a class="el" href="wg__message_8h-source.html#l00120">wGui::CKeyboardMessage::Unicode</a>, and <a class="el" href="wg__point_8h-source.html#l00064">wGui::CPoint::XPos()</a>.    </td>  </tr></table><a name="a9" doxytag="wGui::CEditBox::OnMouseButtonDown"></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::CEditBox::OnMouseButtonDown </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="classwGui_1_1CPoint.html">CPoint</a>&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>Point</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>unsigned int&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>Button</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [virtual]</code></td>

⌨️ 快捷键说明

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