1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
|
/*=========================================================================
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.kitware.com/VolViewCopyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkVVWidgetInterface - a user interface panel.
// .SECTION Description
// A concrete implementation of a user interface panel.
// See vtkKWUserInterfacePanel for a more detailed description.
// .SECTION See Also
// vtkKWUserInterfacePanel vtkKWUserInterfaceManager
#ifndef __vtkVVWidgetInterface_h
#define __vtkVVWidgetInterface_h
#include "vtkVVUserInterfacePanel.h"
class vtkKWFrameWithLabel;
class vtkKWMultiColumnListWithScrollbars;
class vtkVVInteractorWidgetSelector;
class vtkVVSelectionFrame;
class vtkKWEntryWithLabel;
class vtkKWMenuButtonWithSpinButtons;
class vtkContourSegmentationFrame;
class vtkVVPaintbrushWidgetEditor;
class vtkAbstractWidget;
class VTK_EXPORT vtkVVWidgetInterface : public vtkVVUserInterfacePanel
{
public:
static vtkVVWidgetInterface* New();
vtkTypeRevisionMacro(vtkVVWidgetInterface,vtkVVUserInterfacePanel);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Create the interface objects.
virtual void Create();
// Description:
// Get the id of the page in this user interface
vtkGetMacro(PageId, int);
// Description:
// Refresh the interface given the current value of the Window and its
// views/composites/widgets.
virtual void Update();
// Description:
// Update the "enable" state of the object and its internal parts.
// Depending on different Ivars (this->Enabled, the application's
// Limited Edition Mode, etc.), the "enable" state of the object is updated
// and propagated to its internal parts/subwidgets. This will, for example,
// enable/disable parts of the widget UI, enable/disable the visibility
// of 3D widgets, etc.
virtual void UpdateEnableState();
// Description:
// Retrieve internal objects
vtkGetObjectMacro(InteractorWidgetSelector, vtkVVInteractorWidgetSelector);
vtkGetObjectMacro(PaintbrushWidgetEditor, vtkVVPaintbrushWidgetEditor);
vtkGetObjectMacro(InteractorWidgetFrame, vtkKWFrameWithLabel);
// Description:
// Callbacks.
virtual void InteractorWidgetAddDefaultInteractorCallback(int type);
virtual int InteractorWidgetDefaultInteractorIsSupportedCallback(int type);
virtual int InteractorWidgetRemoveCallback(int id);
virtual void InteractorWidgetHasChangedCallback(int id);
virtual void InteractorWidgetPropertiesUpdatedCallback(int id);
protected:
vtkVVWidgetInterface();
~vtkVVWidgetInterface();
int PageId;
// Description:
// Rebuild the presets
virtual void PopulateInteractorWidgets();
// Description:
// This method is called from InteractorWidgetRemoveCallback. It removes an
// interactor widget from its selection frame.
virtual int InteractorWidgetRemoveCallbackInternal(
vtkAbstractWidget *interactor, vtkVVSelectionFrame *sel_frame);
// Measurements
vtkKWFrameWithLabel *InteractorWidgetFrame;
vtkVVInteractorWidgetSelector *InteractorWidgetSelector;
// Description:
// Update contour segmentation frame
vtkContourSegmentationFrame *SegmentationFrame;
virtual void UpdateContourSegmentationFrame(int id);
// Description:
// Update painbrush editor widget
vtkVVPaintbrushWidgetEditor *PaintbrushWidgetEditor;
virtual void UpdatePaintbrushWidgetEditor(int id);
// Description:
// Processes the events that are passed through CallbackCommand (or others).
// Subclasses can oberride this method to process their own events, but
// should call the superclass too.
virtual void ProcessCallbackCommandEvents(
vtkObject *caller, unsigned long event, void *calldata);
private:
vtkVVWidgetInterface(const vtkVVWidgetInterface&); // Not implemented
void operator=(const vtkVVWidgetInterface&); // Not Implemented
};
#endif
|