campo-sirio/libraries/wxPG/propgrid/docs/html/classwxIntProperty.htm
mtollari 4db94043cb Patch level : 12.0 no-patch
Files correlati     : 
Commento            : Spostamento in libraries delle librerie esterne di Campo per una maggiore pulizia e organizzazione

git-svn-id: svn://10.65.10.50/branches/R_10_00@24150 c028cbd2-c16b-5b4b-a496-9718f37d4682
2017-10-26 09:11:15 +00:00

251 lines
15 KiB
HTML

<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>wxPropertyGrid: wxIntProperty Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.htm"><span>Main&nbsp;Page</span></a></li>
<li><a href="pages.htm"><span>Related&nbsp;Pages</span></a></li>
<li><a href="modules.htm"><span>Modules</span></a></li>
<li class="current"><a href="annotated.htm"><span>Classes</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<img id="MSearchSelect" src="search/search.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</div>
</li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.htm"><span>Class&nbsp;List</span></a></li>
<li><a href="classes.htm"><span>Class&nbsp;Index</span></a></li>
<li><a href="hierarchy.htm"><span>Class&nbsp;Hierarchy</span></a></li>
<li><a href="functions.htm"><span>Class&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>wxIntProperty Class Reference</h1><!-- doxytag: class="wxIntProperty" --><!-- doxytag: inherits="wxPGProperty" -->
<p>Basic property with integer value.
<a href="#_details">More...</a></p>
<p><code>#include &lt;props.h&gt;</code></p>
<div class="dynheader">
Inheritance diagram for wxIntProperty:</div>
<div class="dynsection">
<div class="center">
<img src="classwxIntProperty.png" usemap="#wxIntProperty_map" alt=""/>
<map id="wxIntProperty_map" name="wxIntProperty_map">
<area href="classwxPGProperty.htm" alt="wxPGProperty" shape="rect" coords="0,0,93,24"/>
</map>
</div>
</div>
<p><a href="classwxIntProperty-members.htm">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual wxValidator *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwxIntProperty.htm#a89f118bbe8c81592ab3a48c298282323">DoGetValidator</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns pointer to the wxValidator that should be used with the editor of this property (NULL for no validator). <a href="#a89f118bbe8c81592ab3a48c298282323"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwxIntProperty.htm#af62719bfea82128eb68ec4506d297de4">IntToValue</a> (wxVariant &amp;variant, int number, int argFlags=0) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Converts 'number' (including choice selection) into proper value 'variant'. <a href="#af62719bfea82128eb68ec4506d297de4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwxIntProperty.htm#a642930118b1851d28c4e80dd07dc6548">ValidateValue</a> (wxVariant &amp;value, <a class="el" href="structwxPGValidationInfo.htm">wxPGValidationInfo</a> &amp;validationInfo) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Implement this function in derived class to check the value. <a href="#a642930118b1851d28c4e80dd07dc6548"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a044a3655587391092523526371c79a07"></a><!-- doxytag: member="wxIntProperty::wxIntProperty" ref="a044a3655587391092523526371c79a07" args="(const wxString &amp;label, const wxString &amp;name, const wxLongLong &amp;value)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><b>wxIntProperty</b> (const wxString &amp;label, const wxString &amp;name, const wxLongLong &amp;value)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa6f3e4e2e2b231aa0ad185ded4a0c581"></a><!-- doxytag: member="wxIntProperty::wxIntProperty" ref="aa6f3e4e2e2b231aa0ad185ded4a0c581" args="(const wxString &amp;label=wxPG_LABEL, const wxString &amp;name=wxPG_LABEL, long value=0)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><b>wxIntProperty</b> (const wxString &amp;label=wxPG_LABEL, const wxString &amp;name=wxPG_LABEL, long value=0)</td></tr>
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac00bcc721e5cec5b40b5cc84e5c71e76"></a><!-- doxytag: member="wxIntProperty::DoValidation" ref="ac00bcc721e5cec5b40b5cc84e5c71e76" args="(const wxPGProperty *property, wxLongLong_t &amp;value, wxPGValidationInfo *pValidationInfo, int mode=wxPG_PROPERTY_VALIDATION_ERROR_MESSAGE)" -->
static bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwxIntProperty.htm#ac00bcc721e5cec5b40b5cc84e5c71e76">DoValidation</a> (const <a class="el" href="classwxPGProperty.htm">wxPGProperty</a> *property, wxLongLong_t &amp;value, <a class="el" href="structwxPGValidationInfo.htm">wxPGValidationInfo</a> *pValidationInfo, int mode=wxPG_PROPERTY_VALIDATION_ERROR_MESSAGE)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Validation helper. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a654925f70b332e2e2a4c6f582190aef6"></a><!-- doxytag: member="wxIntProperty::GetClassValidator" ref="a654925f70b332e2e2a4c6f582190aef6" args="()" -->
static wxValidator *&nbsp;</td><td class="memItemRight" valign="bottom"><b>GetClassValidator</b> ()</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Basic property with integer value. </p>
<p>Seamlessly supports 64-bit integer (wxLongLong) on overflow.</p>
<p><b>Example how to use seamless 64-bit integer support</b></p>
<p>Getting value:</p>
<div class="fragment"><pre class="fragment"> wxLongLong_t value = pg-&gt;GetPropertyValueAsLongLong();
</pre></div><p>or</p>
<div class="fragment"><pre class="fragment"> wxLongLong_t value;
wxVariant variant = <span class="keyword">property</span>-&gt;GetValue();
<span class="keywordflow">if</span> ( variant.GetType() == wxT(<span class="stringliteral">&quot;wxLongLong&quot;</span>) )
value = wxLongLongFromVariant(variant);
<span class="keywordflow">else</span>
value = variant.GetLong();
</pre></div><p>Setting value:</p>
<div class="fragment"><pre class="fragment"> pg-&gt;<a class="code" href="classwxPropertyGridInterface.htm#aa652e127ce0c9d4e80821cbdcfe4983c" title="Sets value (long integer) of a property.">SetPropertyValue</a>(longLongVal);
</pre></div><p>or</p>
<div class="fragment"><pre class="fragment"> <span class="keyword">property</span>-&gt;SetValue(WXVARIANT(longLongVal));
</pre></div><p><b>Supported special attributes:</b></p>
<ul>
<li>"Min", "Max": Specify acceptable value range. </li>
</ul>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a89f118bbe8c81592ab3a48c298282323"></a><!-- doxytag: member="wxIntProperty::DoGetValidator" ref="a89f118bbe8c81592ab3a48c298282323" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual wxValidator* wxIntProperty::DoGetValidator </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns pointer to the wxValidator that should be used with the editor of this property (NULL for no validator). </p>
<p>Setting validator explicitly via SetPropertyValidator will override this.</p>
<p>In most situations, code like this should work well (macros are used to maintain one actual validator instance, so on the second call the function exits within the first macro):</p>
<div class="fragment"><pre class="fragment"> wxValidator* <a class="code" href="classwxIntProperty.htm#a89f118bbe8c81592ab3a48c298282323" title="Returns pointer to the wxValidator that should be used with the editor of this property...">wxMyPropertyClass::DoGetValidator</a> ()<span class="keyword"> const</span>
<span class="keyword"> </span>{
WX_PG_DOGETVALIDATOR_ENTRY()
wxMyValidator* validator = new wxMyValidator(...);
... prepare validator...
WX_PG_DOGETVALIDATOR_EXIT(validator)
}
</pre></div><dl class="remark"><dt><b>Remarks:</b></dt><dd>You can get common filename validator by returning wxFileProperty::GetClassValidator(). <a class="el" href="classwxDirProperty.htm" title="Like wxLongStringProperty, but the button triggers dir selector instead.">wxDirProperty</a>, for example, uses it. </dd></dl>
<p>Reimplemented from <a class="el" href="classwxPGProperty.htm#af1b9f11eab24b1c1331f3f4a663ff98e">wxPGProperty</a>.</p>
</div>
</div>
<a class="anchor" id="af62719bfea82128eb68ec4506d297de4"></a><!-- doxytag: member="wxIntProperty::IntToValue" ref="af62719bfea82128eb68ec4506d297de4" args="(wxVariant &amp;variant, int number, int argFlags=0) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual bool wxIntProperty::IntToValue </td>
<td>(</td>
<td class="paramtype">wxVariant &amp;&nbsp;</td>
<td class="paramname"> <em>value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>number</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>argFlags</em> = <code>0</code></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Converts 'number' (including choice selection) into proper value 'variant'. </p>
<p>Returns true if new (different than m_value) value could be interpreted from the integer. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>argFlags</em>&nbsp;</td><td>If wxPG_FULL_VALUE is set, returns complete, storable value instead of displayable</td></tr>
</table>
</dd>
</dl>
<dl class="remark"><dt><b>Remarks:</b></dt><dd><ul>
<li>Default implementation may work correctly if used value type is int.</li>
<li>If property is not supposed to use choice or spinctrl or other editor with int-based value, it is not necessary to implement this method.</li>
<li>If property uses choice control, and displays a dialog on some choice items, then it is preferred to display that dialog in IntToValue instead of OnEvent.</li>
<li>You might want to take into account that m_value is Null variant if property value is unspecified (which is usually only case if you explicitly enabled that sort behavior). </li>
</ul>
</dd></dl>
<p>Reimplemented from <a class="el" href="classwxPGProperty.htm#ad0a8e61a356e1366170967d56af66231">wxPGProperty</a>.</p>
</div>
</div>
<a class="anchor" id="a642930118b1851d28c4e80dd07dc6548"></a><!-- doxytag: member="wxIntProperty::ValidateValue" ref="a642930118b1851d28c4e80dd07dc6548" args="(wxVariant &amp;value, wxPGValidationInfo &amp;validationInfo) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual bool wxIntProperty::ValidateValue </td>
<td>(</td>
<td class="paramtype">wxVariant &amp;&nbsp;</td>
<td class="paramname"> <em>value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structwxPGValidationInfo.htm">wxPGValidationInfo</a> &amp;&nbsp;</td>
<td class="paramname"> <em>validationInfo</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Implement this function in derived class to check the value. </p>
<p>Return true if it is ok. Returning false prevents property change events from occurring.</p>
<dl class="remark"><dt><b>Remarks:</b></dt><dd><ul>
<li>Default implementation always returns true. </li>
</ul>
</dd></dl>
<p>Reimplemented from <a class="el" href="classwxPGProperty.htm#a2e0c041aa3e19a5934a02c65b53f9f7d">wxPGProperty</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>props.h</li>
</ul>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Enumerator</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Sun Aug 22 12:42:14 2010 for wxPropertyGrid by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>