00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00023 #ifndef __vtkKWIcon_h
00024 #define __vtkKWIcon_h
00025
00026 #include "vtkObject.h"
00027 #include "vtkKWWidgets.h"
00028
00029 class vtkKWApplication;
00030 class vtkKWIcon;
00031
00032 class KWWIDGETS_EXPORT vtkKWIcon : public vtkObject
00033 {
00034 public:
00035 static vtkKWIcon* New();
00036 vtkTypeRevisionMacro(vtkKWIcon,vtkObject);
00037 void PrintSelf(ostream& os, vtkIndent indent);
00038
00039
00041
00044 enum {
00045 IconNoIcon = 0,
00046 IconBoundingBox = 13,
00047 IconColorBarAnnotation = 12,
00048 IconConnection = 1,
00049 IconCornerAnnotation = 11,
00050 IconDocument = 9,
00051 IconEmpty16x16 = 6,
00052 IconEmpty1x1 = 10,
00053 IconError = 2,
00054 IconErrorMini = 3,
00055 IconErrorRedMini = 4,
00056 IconExpand = 5,
00057 IconFileOpen = 8,
00058 IconFloppy = 7,
00059 IconFolder = 20,
00060 IconFolderOpen = 21,
00061 IconGridLinear = 40,
00062 IconGridLog = 41,
00063 IconHeaderAnnotation = 50,
00064 IconHelpBubble = 60,
00065 IconInfoMini = 61,
00066 IconLock = 62,
00067 IconMagGlass = 63,
00068 IconMinus = 64,
00069 IconMove = 80,
00070 IconMoveH = 81,
00071 IconMoveV = 82,
00072 IconOrientationCubeAnnotation = 83,
00073 IconPanHand = 99,
00074 IconPlus = 100,
00075 IconPointFinger = 90,
00076 IconPresetAdd = 94,
00077 IconPresetApply = 95,
00078 IconPresetDelete = 96,
00079 IconPresetUpdate = 97,
00080 IconQuestion = 101,
00081 IconReload = 102,
00082 IconRotate = 105,
00083 IconScaleBarAnnotation = 106,
00084 IconSideAnnotation = 110,
00085 IconShrink = 103,
00086 IconStopwatch = 104,
00087 IconTransportBeginning = 120,
00088 IconTransportEnd = 121,
00089 IconTransportFastForward = 122,
00090 IconTransportFastForwardToKey = 123,
00091 IconTransportLoop = 124,
00092 IconTransportPause = 125,
00093 IconTransportPlay = 126,
00094 IconTransportPlayToKey = 127,
00095 IconTransportRewind = 128,
00096 IconTransportRewindToKey = 129,
00097 IconTransportStop = 130,
00098 IconTrashcan = 131,
00099 IconTreeClose = 150,
00100 IconTreeOpen = 151,
00101 IconWarning = 170,
00102 IconWarningMini = 171,
00103 IconWindowLevel = 172,
00104 LastIcon
00105 };
00106
00108
00110 void SetImage(int image);
00111
00113 void SetImage(vtkKWIcon*);
00114
00116
00121 enum
00122 {
00123 ImageOptionFlipVertical = 1
00124 };
00125
00126 void SetImage(const unsigned char* data,
00127 int width, int height,
00128 int pixel_size,
00129 unsigned long buffer_length = 0,
00130 int options = 0);
00132
00134 const unsigned char* GetData();
00135
00137
00138 vtkGetMacro(Width, int);
00140
00142
00143 vtkGetMacro(Height, int);
00145
00147
00148 vtkGetMacro(PixelSize, int);
00150
00153 virtual void Fade(double factor);
00154
00158 virtual void Flatten(double r, double g, double b);
00159
00160 protected:
00161 vtkKWIcon();
00162 ~vtkKWIcon();
00163
00165
00166 void SetData(const unsigned char* data,
00167 int width, int height,
00168 int pixel_size,
00169 int options = 0);
00171
00172 unsigned char* Data;
00173 int Width;
00174 int Height;
00175 int PixelSize;
00176
00177 private:
00178 vtkKWIcon(const vtkKWIcon&);
00179 void operator=(const vtkKWIcon&);
00180 };
00181
00182 #endif
00183
00184
00185