Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 60f1dc962abad0f3b492991a4fbef9be > files > 5442

vtk-doc-5.4.2-5mdv2010.0.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>VTK: dox/Widgets/vtkAbstractWidget.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="classes.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
<h1>dox/Widgets/vtkAbstractWidget.h</h1><a href="a03650.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*=========================================================================</span>
<a name="l00002"></a>00002 <span class="comment"></span>
<a name="l00003"></a>00003 <span class="comment">  Program:   Visualization Toolkit</span>
<a name="l00004"></a>00004 <span class="comment">  Module:    vtkAbstractWidget.h,v</span>
<a name="l00005"></a>00005 <span class="comment"></span>
<a name="l00006"></a>00006 <span class="comment">  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen</span>
<a name="l00007"></a>00007 <span class="comment">  All rights reserved.</span>
<a name="l00008"></a>00008 <span class="comment">  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.</span>
<a name="l00009"></a>00009 <span class="comment"></span>
<a name="l00010"></a>00010 <span class="comment">     This software is distributed WITHOUT ANY WARRANTY; without even</span>
<a name="l00011"></a>00011 <span class="comment">     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR</span>
<a name="l00012"></a>00012 <span class="comment">     PURPOSE.  See the above copyright notice for more information.</span>
<a name="l00013"></a>00013 <span class="comment"></span>
<a name="l00014"></a>00014 <span class="comment">=========================================================================*/</span>
<a name="l00054"></a>00054 <span class="preprocessor">#ifndef __vtkAbstractWidget_h</span>
<a name="l00055"></a>00055 <span class="preprocessor"></span><span class="preprocessor">#define __vtkAbstractWidget_h</span>
<a name="l00056"></a>00056 <span class="preprocessor"></span>
<a name="l00057"></a>00057 <span class="preprocessor">#include "<a class="code" href="a03423.html">vtkInteractorObserver.h</a>"</span>
<a name="l00058"></a>00058 
<a name="l00059"></a>00059 <span class="keyword">class </span><a class="code" href="a01876.html" title="map VTK events into widget events">vtkWidgetEventTranslator</a>;
<a name="l00060"></a>00060 <span class="keyword">class </span><a class="code" href="a01874.html" title="map widget events into callbacks">vtkWidgetCallbackMapper</a>;
<a name="l00061"></a>00061 <span class="keyword">class </span><a class="code" href="a01877.html" title="abstract class defines interface between the widget and widget representation classes...">vtkWidgetRepresentation</a>;
<a name="l00062"></a>00062 
<a name="l00063"></a>00063 
<a name="l00064"></a><a class="code" href="a00091.html">00064</a> <span class="keyword">class </span><a class="code" href="a02170.html#09e5ba6764f54642494e26907662d55f">VTK_WIDGETS_EXPORT</a> <a class="code" href="a00091.html" title="define the API for widget / widget representation">vtkAbstractWidget</a> : <span class="keyword">public</span> <a class="code" href="a00902.html" title="an abstract superclass for classes observing events invoked by vtkRenderWindowInteractor...">vtkInteractorObserver</a>
<a name="l00065"></a>00065 {
<a name="l00066"></a>00066 <span class="keyword">public</span>:
<a name="l00068"></a>00068 
<a name="l00069"></a><a class="code" href="a00091.html#5dfb7cfb6ea2ca3477c64da4d523f122">00069</a>   vtkTypeRevisionMacro(<a class="code" href="a00091.html" title="define the API for widget / widget representation">vtkAbstractWidget</a>,<a class="code" href="a00902.html" title="an abstract superclass for classes observing events invoked by vtkRenderWindowInteractor...">vtkInteractorObserver</a>);
<a name="l00070"></a>00070   <span class="keywordtype">void</span> <a class="code" href="a00902.html#a6e7066703c2d629dbb9e7cfa7035fde">PrintSelf</a>(ostream&amp; os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent);
<a name="l00072"></a>00072 
<a name="l00078"></a>00078   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00902.html#b43191e675e294441a76efa7e4f884d9">SetEnabled</a>(<span class="keywordtype">int</span>);
<a name="l00079"></a>00079 
<a name="l00081"></a>00081 
<a name="l00085"></a>00085   vtkSetClampMacro(ProcessEvents, <span class="keywordtype">int</span>, 0, 1);
<a name="l00086"></a>00086   vtkGetMacro(ProcessEvents, <span class="keywordtype">int</span>);
<a name="l00087"></a>00087   vtkBooleanMacro(ProcessEvents, <span class="keywordtype">int</span>);
<a name="l00089"></a>00089 
<a name="l00091"></a>00091 
<a name="l00093"></a><a class="code" href="a00091.html#fb5a5eaccb80aaeee8c49d45d29f02cd">00093</a>   <a class="code" href="a01876.html" title="map VTK events into widget events">vtkWidgetEventTranslator</a> *GetEventTranslator()
<a name="l00094"></a>00094     {<span class="keywordflow">return</span> this-&gt;EventTranslator;}
<a name="l00096"></a>00096   
<a name="l00101"></a>00101   <span class="keyword">virtual</span> <span class="keywordtype">void</span> CreateDefaultRepresentation() = 0;
<a name="l00102"></a>00102 
<a name="l00107"></a>00107   <span class="keywordtype">void</span> Render();
<a name="l00108"></a>00108 
<a name="l00110"></a>00110 
<a name="l00114"></a><a class="code" href="a00091.html#025192c916b885b3c38b8a75f52e94b1">00114</a>   <span class="keywordtype">void</span> SetParent(<a class="code" href="a00091.html" title="define the API for widget / widget representation">vtkAbstractWidget</a> *parent) {this-&gt;Parent = parent;}
<a name="l00115"></a>00115   vtkGetObjectMacro(Parent,<a class="code" href="a00091.html" title="define the API for widget / widget representation">vtkAbstractWidget</a>);
<a name="l00117"></a>00117 
<a name="l00119"></a>00119 
<a name="l00123"></a><a class="code" href="a00091.html#4cd5641f593f78c4b04622fdd6c8904f">00123</a>   <a class="code" href="a01877.html" title="abstract class defines interface between the widget and widget representation classes...">vtkWidgetRepresentation</a> *GetRepresentation()
<a name="l00124"></a>00124     {
<a name="l00125"></a>00125       this-&gt;CreateDefaultRepresentation();
<a name="l00126"></a>00126       <span class="keywordflow">return</span> this-&gt;WidgetRep;
<a name="l00127"></a>00127     }
<a name="l00129"></a>00129   
<a name="l00131"></a>00131 
<a name="l00135"></a>00135   vtkSetMacro(ManagesCursor,<span class="keywordtype">int</span>);
<a name="l00136"></a>00136   vtkGetMacro(ManagesCursor,<span class="keywordtype">int</span>);
<a name="l00137"></a>00137   vtkBooleanMacro(ManagesCursor,<span class="keywordtype">int</span>);
<a name="l00139"></a>00139 
<a name="l00143"></a>00143   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00902.html#c74314c01a30124ecea81b35eb133772">SetPriority</a>( <span class="keywordtype">float</span> );
<a name="l00144"></a>00144 
<a name="l00145"></a>00145 <span class="keyword">protected</span>:
<a name="l00146"></a>00146   <a class="code" href="a00091.html" title="define the API for widget / widget representation">vtkAbstractWidget</a>();
<a name="l00147"></a>00147   ~<a class="code" href="a00091.html" title="define the API for widget / widget representation">vtkAbstractWidget</a>();
<a name="l00148"></a>00148 
<a name="l00149"></a>00149   <span class="comment">// Handles the events; centralized here for all widgets.</span>
<a name="l00150"></a>00150   <span class="keyword">static</span> <span class="keywordtype">void</span> ProcessEventsHandler(<a class="code" href="a01084.html" title="abstract base class for most VTK objects">vtkObject</a>* <span class="keywordtype">object</span>, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> event,
<a name="l00151"></a>00151                             <span class="keywordtype">void</span>* clientdata, <span class="keywordtype">void</span>* calldata);
<a name="l00152"></a>00152 
<a name="l00153"></a>00153   <span class="comment">// The representation for the widget. This is typically called by the</span>
<a name="l00154"></a>00154   <span class="comment">// SetRepresentation() methods particular to each widget (i.e. subclasses</span>
<a name="l00155"></a>00155   <span class="comment">// of this class). This method does the actual work; the SetRepresentation()</span>
<a name="l00156"></a>00156   <span class="comment">// methods constrain the type that can be set.</span>
<a name="l00157"></a>00157   <span class="keywordtype">void</span> SetWidgetRepresentation(<a class="code" href="a01877.html" title="abstract class defines interface between the widget and widget representation classes...">vtkWidgetRepresentation</a> *r);
<a name="l00158"></a><a class="code" href="a00091.html#5379b0d816b49f553f06afe127f0d8d4">00158</a>   <a class="code" href="a01877.html" title="abstract class defines interface between the widget and widget representation classes...">vtkWidgetRepresentation</a> *WidgetRep;
<a name="l00159"></a>00159 
<a name="l00160"></a>00160   <span class="comment">// helper methods for cursor management</span>
<a name="l00161"></a><a class="code" href="a00091.html#a8d93968f78ee06444503845e42df355">00161</a>   <span class="keywordtype">int</span> ManagesCursor;
<a name="l00162"></a><a class="code" href="a00091.html#d887bbfda005d2a1ea0f63f9c2119709">00162</a>   <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetCursor(<span class="keywordtype">int</span> vtkNotUsed(state)) {}
<a name="l00163"></a>00163 
<a name="l00164"></a>00164   <span class="comment">// For translating and invoking events</span>
<a name="l00165"></a><a class="code" href="a00091.html#451908e316cc66c8c0b53764b64f9f98">00165</a>   <a class="code" href="a01876.html" title="map VTK events into widget events">vtkWidgetEventTranslator</a> *EventTranslator;
<a name="l00166"></a><a class="code" href="a00091.html#872fa9c87b5d935a1f62019d0b829040">00166</a>   <a class="code" href="a01874.html" title="map widget events into callbacks">vtkWidgetCallbackMapper</a>  *CallbackMapper;
<a name="l00167"></a>00167 
<a name="l00168"></a>00168   <span class="comment">// The parent, if any, for this widget</span>
<a name="l00169"></a><a class="code" href="a00091.html#d29dcf12d16b27737fb91e6b467f535b">00169</a>   <a class="code" href="a00091.html" title="define the API for widget / widget representation">vtkAbstractWidget</a> *Parent;
<a name="l00170"></a>00170 
<a name="l00171"></a>00171   <span class="comment">// Call data which can be retrieved by the widget. This data is set</span>
<a name="l00172"></a>00172   <span class="comment">// by ProcessEvents() if call data is provided during a callback</span>
<a name="l00173"></a>00173   <span class="comment">// sequence.</span>
<a name="l00174"></a><a class="code" href="a00091.html#63f5db831186fedf681c76cb4321dfc2">00174</a>   <span class="keywordtype">void</span> *CallData;
<a name="l00175"></a>00175 
<a name="l00176"></a>00176   <span class="comment">// Flag indicating if the widget should handle interaction events.</span>
<a name="l00177"></a>00177   <span class="comment">// On by default.</span>
<a name="l00178"></a><a class="code" href="a00091.html#0c1835e05a00ce8e7db4e8f68462a889">00178</a>   <span class="keywordtype">int</span> ProcessEvents;
<a name="l00179"></a>00179 
<a name="l00180"></a>00180 <span class="keyword">private</span>:
<a name="l00181"></a>00181   <a class="code" href="a00091.html" title="define the API for widget / widget representation">vtkAbstractWidget</a>(<span class="keyword">const</span> <a class="code" href="a00091.html" title="define the API for widget / widget representation">vtkAbstractWidget</a>&amp;);  <span class="comment">//Not implemented</span>
<a name="l00182"></a>00182   <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a00091.html" title="define the API for widget / widget representation">vtkAbstractWidget</a>&amp;);  <span class="comment">//Not implemented</span>
<a name="l00183"></a>00183 };
<a name="l00184"></a>00184 
<a name="l00185"></a>00185 <span class="preprocessor">#endif</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:51 2009 for VTK by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>