Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
vtkMRMLAnnotationTextDisplayableManager.h
Go to the documentation of this file.
1 /*=auto=========================================================================
2 
3  Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
4 
5  See COPYRIGHT.txt
6  or http://www.slicer.org/copyright/copyright.txt for details.
7 
8  Program: 3D Slicer
9 
10  Module: $RCSfile: vtkMRMLAnnotationTextDisplayableManager.h,v $
11  Date: $Date: 2010/07/26 04:48:05 $
12  Version: $Revision: 1.5 $
13 
14  =========================================================================auto=*/
15 
16 #ifndef __vtkMRMLAnnotationTextDisplayableManager_h
17 #define __vtkMRMLAnnotationTextDisplayableManager_h
18 
19 // Annotation includes
21 #include "vtkSlicerAnnotationsModuleMRMLDisplayableManagerExport.h"
22 
24 class vtkSlicerViewerWidget;
28 class vtkTextWidget;
29 
31 class VTK_SLICER_ANNOTATIONS_MODULE_MRMLDISPLAYABLEMANAGER_EXPORT
34 {
35 public:
36 
39  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
40 
41 protected:
42 
43  vtkMRMLAnnotationTextDisplayableManager(){this->m_Focus="vtkMRMLAnnotationTextNode";}
45 
47  virtual void OnClickInRenderWindow(double x, double y, const char *associatedNodeID) VTK_OVERRIDE;
49  virtual vtkAbstractWidget * CreateWidget(vtkMRMLAnnotationNode* node) VTK_OVERRIDE;
50 
52  virtual void OnWidgetCreated(vtkAbstractWidget * widget, vtkMRMLAnnotationNode * node) VTK_OVERRIDE;
53 
55  virtual void PropagateMRMLToWidget(vtkMRMLAnnotationNode* node, vtkAbstractWidget * widget) VTK_OVERRIDE;
57  virtual void PropagateWidgetToMRML(vtkAbstractWidget * widget, vtkMRMLAnnotationNode* node) VTK_OVERRIDE;
58  // update just the position, called from PropagateMRMLToWidget and in
59  // response to slice node modified events
60  virtual void UpdatePosition(vtkAbstractWidget *widget, vtkMRMLNode *node) VTK_OVERRIDE;
61 
64  void BestGuessForNewCaptionCoordinates(double bestGuess[2]);
65 private:
66 
68  void operator=(const vtkMRMLAnnotationTextDisplayableManager&);
69 
70 };
71 
72 #endif
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
virtual void OnWidgetCreated(vtkAbstractWidget *widget, vtkMRMLAnnotationNode *node)
Gets called when widget was created.
virtual void PropagateWidgetToMRML(vtkAbstractWidget *widget, vtkMRMLAnnotationNode *node)
Propagate properties of widget to MRML node.
virtual vtkAbstractWidget * CreateWidget(vtkMRMLAnnotationNode *node)
Create a widget.
virtual void PropagateMRMLToWidget(vtkMRMLAnnotationNode *node, vtkAbstractWidget *widget)
Propagate properties of MRML node to widget.
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:135
virtual void OnClickInRenderWindow(double x, double y, const char *associatedNodeID=NULL)
Callback for click in RenderWindow.
virtual void UpdatePosition(vtkAbstractWidget *vtkNotUsed(widget), vtkMRMLNode *vtkNotUsed(node))
Update just the position for the widget, implemented by subclasses.
static vtkMRMLAnnotationDisplayableManager * New()