00001 /*========================================================================= 00002 00003 Module: $RCSfile: vtkKWColorPickerDialog.h,v $ 00004 00005 Copyright (c) Kitware, Inc. 00006 All rights reserved. 00007 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00008 00009 This software is distributed WITHOUT ANY WARRANTY; without even 00010 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00011 PURPOSE. See the above copyright notice for more information. 00012 00013 =========================================================================*/ 00014 // .NAME vtkKWColorPickerDialog - a color picker dialog. 00015 // .SECTION Description 00016 // A widget that can be used to pick a color. 00017 // This dialog is just a small standalone toplevel that embeds a 00018 // vtkKWColorPickerWidget. 00019 // .SECTION Thanks 00020 // This work is part of the National Alliance for Medical Image 00021 // Computing (NAMIC), funded by the National Institutes of Health 00022 // through the NIH Roadmap for Medical Research, Grant U54 EB005149. 00023 // Information on the National Centers for Biomedical Computing 00024 // can be obtained from http://nihroadmap.nih.gov/bioinformatics. 00025 // .SECTION See Also 00026 // vtkKWColorPickerWidget 00027 00028 #ifndef __vtkKWColorPickerDialog_h 00029 #define __vtkKWColorPickerDialog_h 00030 00031 #include "vtkKWDialog.h" 00032 00033 class vtkKWApplication; 00034 class vtkKWColorPickerWidget; 00035 class vtkKWPushButton; 00036 00037 class KWWidgets_EXPORT vtkKWColorPickerDialog : public vtkKWDialog 00038 { 00039 public: 00040 static vtkKWColorPickerDialog* New(); 00041 vtkTypeRevisionMacro(vtkKWColorPickerDialog,vtkKWDialog); 00042 void PrintSelf(ostream& os, vtkIndent indent); 00043 00044 // Description: 00045 // Get the internal color picker widget 00046 vtkGetObjectMacro(ColorPickerWidget, vtkKWColorPickerWidget); 00047 00048 // Description: 00049 // Callback. Confirm the action and close this dialog 00050 virtual void OK(); 00051 00052 // Description: 00053 // Display the dialog. 00054 virtual void Display(); 00055 00056 // Description: 00057 // Update the "enable" state of the object and its internal parts. 00058 virtual void UpdateEnableState(); 00059 00060 protected: 00061 vtkKWColorPickerDialog(); 00062 ~vtkKWColorPickerDialog(); 00063 00064 // Description: 00065 // Create the widget. 00066 virtual void CreateWidget(); 00067 00068 // Description: 00069 // Member variables 00070 vtkKWColorPickerWidget* ColorPickerWidget; 00071 vtkKWPushButton* OKButton; 00072 vtkKWPushButton* CancelButton; 00073 00074 // Description: 00075 // Processes the events that are passed through CallbackCommand (or others). 00076 // Subclasses can oberride this method to process their own events, but 00077 // should call the superclass too. 00078 virtual void ProcessCallbackCommandEvents( 00079 vtkObject *caller, unsigned long event, void *calldata); 00080 00081 // Description: 00082 // Update Size 00083 virtual void UpdateSize(); 00084 00085 private: 00086 vtkKWColorPickerDialog(const vtkKWColorPickerDialog&); // Not implemented 00087 void operator=(const vtkKWColorPickerDialog&); // Not implemented 00088 }; 00089 00090 #endif