campo-sirio/wxPG/propgrid/docs/html/classwxFileProperty.htm
mtollari a3ed46f2c3 Spostamento cartelle da extlib
git-svn-id: svn://10.65.10.50/branches/R_10_00@23289 c028cbd2-c16b-5b4b-a496-9718f37d4682
2016-09-14 21:14:51 +00:00

301 lines
20 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: wxFileProperty 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>wxFileProperty Class Reference</h1><!-- doxytag: class="wxFileProperty" --><!-- doxytag: inherits="wxPGProperty" -->
<p>Like <a class="el" href="classwxLongStringProperty.htm" title="Like wxStringProperty, but has a button that triggers a small text editor dialog...">wxLongStringProperty</a>, but the button triggers file selector instead.
<a href="#_details">More...</a></p>
<p><code>#include &lt;props.h&gt;</code></p>
<div class="dynheader">
Inheritance diagram for wxFileProperty:</div>
<div class="dynsection">
<div class="center">
<img src="classwxFileProperty.png" usemap="#wxFileProperty_map" alt=""/>
<map id="wxFileProperty_map" name="wxFileProperty_map">
<area href="classwxPGProperty.htm" alt="wxPGProperty" shape="rect" coords="0,0,130,24"/>
<area href="classwxImageFileProperty.htm" alt="wxImageFileProperty" shape="rect" coords="0,112,130,136"/>
</map>
</div>
</div>
<p><a href="classwxFileProperty-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="classwxFileProperty.htm#af94217ba1252e5072af7a5ff58ab7c90">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="#af94217ba1252e5072af7a5ff58ab7c90"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classwxPGEditorDialogAdapter.htm">wxPGEditorDialogAdapter</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwxFileProperty.htm#a6006eea1f990fc7b1f825a96b2985198">GetEditorDialog</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns instance of a new <a class="el" href="classwxPGEditorDialogAdapter.htm" title="Derive a class from this to adapt an existing editor dialog or function to be used...">wxPGEditorDialogAdapter</a> instance, which is used when user presses the (optional) button next to the editor control;. <a href="#a6006eea1f990fc7b1f825a96b2985198"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual wxString&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwxFileProperty.htm#ac5d74ec31b9f790d6cc8dcf06f5bd98d">GetValueAsString</a> (int argFlags) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns text representation of property's value. <a href="#ac5d74ec31b9f790d6cc8dcf06f5bd98d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwxFileProperty.htm#a7fa1939a2201238c3acf57620b28bb35">OnSetValue</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This virtual function is called after m_value has been set. <a href="#a7fa1939a2201238c3acf57620b28bb35"></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="classwxFileProperty.htm#a5caeb2678cbce00494e30329bf7e16b6">StringToValue</a> (wxVariant &amp;variant, const wxString &amp;text, int argFlags=0) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Converts 'text' into proper value 'variant'. <a href="#a5caeb2678cbce00494e30329bf7e16b6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3836fd56388628115e94350f85ca29ac"></a><!-- doxytag: member="wxFileProperty::wxFileProperty" ref="a3836fd56388628115e94350f85ca29ac" args="(const wxString &amp;label=wxPG_LABEL, const wxString &amp;name=wxPG_LABEL, const wxString &amp;value=wxEmptyString)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><b>wxFileProperty</b> (const wxString &amp;label=wxPG_LABEL, const wxString &amp;name=wxPG_LABEL, const wxString &amp;value=wxEmptyString)</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="aa5527eeddefed22d4da8619715d6ef57"></a><!-- doxytag: member="wxFileProperty::GetClassValidator" ref="aa5527eeddefed22d4da8619715d6ef57" args="()" -->
static wxValidator *&nbsp;</td><td class="memItemRight" valign="bottom"><b>GetClassValidator</b> ()</td></tr>
<tr><td colspan="2"><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af65765510065024a3c41691910e3b0fb"></a><!-- doxytag: member="wxFileProperty::m_basePath" ref="af65765510065024a3c41691910e3b0fb" args="" -->
wxString&nbsp;</td><td class="memItemRight" valign="bottom"><b>m_basePath</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0b33db20a8fe3b00e2172ac97a7e00d1"></a><!-- doxytag: member="wxFileProperty::m_dlgTitle" ref="a0b33db20a8fe3b00e2172ac97a7e00d1" args="" -->
wxString&nbsp;</td><td class="memItemRight" valign="bottom"><b>m_dlgTitle</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa5d29d4558cfe7fd5c6851bd112090ca"></a><!-- doxytag: member="wxFileProperty::m_filename" ref="aa5d29d4558cfe7fd5c6851bd112090ca" args="" -->
wxFileName&nbsp;</td><td class="memItemRight" valign="bottom"><b>m_filename</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4bea68b4f99bf32a4c346144ba407b4c"></a><!-- doxytag: member="wxFileProperty::m_indFilter" ref="a4bea68b4f99bf32a4c346144ba407b4c" args="" -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><b>m_indFilter</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4c0c278504ac7de301c889f5e5974f3c"></a><!-- doxytag: member="wxFileProperty::m_initialPath" ref="a4c0c278504ac7de301c889f5e5974f3c" args="" -->
wxString&nbsp;</td><td class="memItemRight" valign="bottom"><b>m_initialPath</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa47c1083c3ef6ca9304134c62a9c2194"></a><!-- doxytag: member="wxFileProperty::m_wildcard" ref="aa47c1083c3ef6ca9304134c62a9c2194" args="" -->
wxString&nbsp;</td><td class="memItemRight" valign="bottom"><b>m_wildcard</b></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Like <a class="el" href="classwxLongStringProperty.htm" title="Like wxStringProperty, but has a button that triggers a small text editor dialog...">wxLongStringProperty</a>, but the button triggers file selector instead. </p>
<p><b>Supported special attributes:</b></p>
<ul>
<li>"Wildcard": Sets wildcard (see wxFileDialog for format details), "All files..." is default.</li>
<li>"ShowFullPath": Default 1. When 0, only the file name is shown (i.e. drive and directory are hidden).</li>
<li>"ShowRelativePath": If set, then the filename is shown relative to the given path string.</li>
<li>"InitialPath": Sets the initial path of where to look for files.</li>
<li>"DialogTitle": Sets a specific title for the dir dialog. </li>
</ul>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="af94217ba1252e5072af7a5ff58ab7c90"></a><!-- doxytag: member="wxFileProperty::DoGetValidator" ref="af94217ba1252e5072af7a5ff58ab7c90" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual wxValidator* wxFileProperty::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="classwxFileProperty.htm#af94217ba1252e5072af7a5ff58ab7c90" 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="a6006eea1f990fc7b1f825a96b2985198"></a><!-- doxytag: member="wxFileProperty::GetEditorDialog" ref="a6006eea1f990fc7b1f825a96b2985198" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classwxPGEditorDialogAdapter.htm">wxPGEditorDialogAdapter</a>* wxFileProperty::GetEditorDialog </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 instance of a new <a class="el" href="classwxPGEditorDialogAdapter.htm" title="Derive a class from this to adapt an existing editor dialog or function to be used...">wxPGEditorDialogAdapter</a> instance, which is used when user presses the (optional) button next to the editor control;. </p>
<p>Default implementation returns NULL (ie. no action is generated when button is pressed). </p>
<p>Reimplemented from <a class="el" href="classwxPGProperty.htm#a874654d10c66572f2a4c4c41c843f557">wxPGProperty</a>.</p>
</div>
</div>
<a class="anchor" id="ac5d74ec31b9f790d6cc8dcf06f5bd98d"></a><!-- doxytag: member="wxFileProperty::GetValueAsString" ref="ac5d74ec31b9f790d6cc8dcf06f5bd98d" args="(int argFlags) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual wxString wxFileProperty::GetValueAsString </td>
<td>(</td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>argFlags</em></td>
<td>&nbsp;)&nbsp;</td>
<td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns text representation of property's value. </p>
<p>Generally this function should not be called from the application code. Instead, call <a class="el" href="classwxPGProperty.htm#a9133d43d6e539e2814ed28d2f37d953e" title="Same as GetValueAsString, except takes common value into account.">GetValueString()</a>.</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 string value instead of displayable. If wxPG_EDITABLE_VALUE is set, returns string value that must be editable in textctrl. If wxPG_COMPOSITE_FRAGMENT is set, returns text that is appropriate to display as a part of composite property string value.</td></tr>
</table>
</dd>
</dl>
<dl class="remark"><dt><b>Remarks:</b></dt><dd><ul>
<li>Default implementation returns string composed from text representations of child properties.</li>
<li>Implementations are never called with m_value being null variant (ie. unspecified value), so you don't need to check for that. Naturally this means that unspecified value is always displayed as an empty string.</li>
</ul>
</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classwxPGProperty.htm#a9133d43d6e539e2814ed28d2f37d953e" title="Same as GetValueAsString, except takes common value into account.">GetValueString()</a> </dd></dl>
<p>Reimplemented from <a class="el" href="classwxPGProperty.htm#a29f70a60e4844efbebc140270e1a4358">wxPGProperty</a>.</p>
</div>
</div>
<a class="anchor" id="a7fa1939a2201238c3acf57620b28bb35"></a><!-- doxytag: member="wxFileProperty::OnSetValue" ref="a7fa1939a2201238c3acf57620b28bb35" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void wxFileProperty::OnSetValue </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>This virtual function is called after m_value has been set. </p>
<dl class="remark"><dt><b>Remarks:</b></dt><dd><ul>
<li>If m_value was set to Null variant (ie. unspecified value), <a class="el" href="classwxFileProperty.htm#a7fa1939a2201238c3acf57620b28bb35" title="This virtual function is called after m_value has been set.">OnSetValue()</a> will not be called.</li>
<li>m_value may be of any variant type. Typically properties internally support only one variant type, and as such <a class="el" href="classwxFileProperty.htm#a7fa1939a2201238c3acf57620b28bb35" title="This virtual function is called after m_value has been set.">OnSetValue()</a> provides a good opportunity to convert supported values into internal type.</li>
<li>Default implementation does nothing. </li>
</ul>
</dd></dl>
<p>Reimplemented from <a class="el" href="classwxPGProperty.htm#ae5c4f47d3ff609d19346b994a9a25acb">wxPGProperty</a>.</p>
<p>Reimplemented in <a class="el" href="classwxImageFileProperty.htm#a42428291b8abba3e237d05f57c351ae5">wxImageFileProperty</a>.</p>
</div>
</div>
<a class="anchor" id="a5caeb2678cbce00494e30329bf7e16b6"></a><!-- doxytag: member="wxFileProperty::StringToValue" ref="a5caeb2678cbce00494e30329bf7e16b6" args="(wxVariant &amp;variant, const wxString &amp;text, int argFlags=0) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual bool wxFileProperty::StringToValue </td>
<td>(</td>
<td class="paramtype">wxVariant &amp;&nbsp;</td>
<td class="paramname"> <em>variant</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const wxString &amp;&nbsp;</td>
<td class="paramname"> <em>text</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 'text' into proper value 'variant'. </p>
<p>Returns true if new (different than m_value) value could be interpreted from the text. </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 one (they may be different). If wxPG_COMPOSITE_FRAGMENT is set, text is interpreted as a part of composite property string value (as generated by <a class="el" href="classwxFileProperty.htm#ac5d74ec31b9f790d6cc8dcf06f5bd98d" title="Returns text representation of property&#39;s value.">GetValueAsString()</a> called with this same flag).</td></tr>
</table>
</dd>
</dl>
<dl class="remark"><dt><b>Remarks:</b></dt><dd><ul>
<li>Default implementation converts semicolon delimited tokens into child values. Only works for properties with children.</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#a974a9b01c1f88cf4db630b6895453db8">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>