VIA - Volumetric Image Analysis
VImageView.h
1 /*
2  * $Id: VImageView.h 726 2004-03-08 13:12:45Z lohmann $
3  *
4  * This file defines the public interface to the VImageView widget.
5  */
6 
7 #ifndef V_VImageView_h
8 #define V_VImageView_h 1
9 
10 /*
11  * Copyright 1993, 1994 University of British Columbia
12  *
13  * Permission to use, copy, modify, distribute, and sell this software and its
14  * documentation for any purpose is hereby granted without fee, provided that
15  * the above copyright notice appears in all copies and that both that
16  * copyright notice and this permission notice appear in supporting
17  * documentation. UBC makes no representations about the suitability of this
18  * software for any purpose. It is provided "as is" without express or
19  * implied warranty.
20  *
21  * Authors: Arthur Pope, Daniel Ko, Dan Razzell,
22  * UBC Laboratory for Computational Intelligence
23  */
24 
25 /* From the Vista library: */
26 #include "viaio/Vlib.h"
27 #include "viaio/VImage.h"
28 
29 /* From Xt: */
30 #include <X11/Intrinsic.h>
31 
32 /* For portability: */
33 #include <X11/Xfuncproto.h>
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 /* Resources:
40 
41  Name Class RepType Default Value
42  ---- ----- ------- -------------
43  (from Object)
44  destroyCallback Callback Pointer NULL
45 
46  (from RectObj)
47  ancestorSensitive Sensitive Boolean True
48  borderWidth BorderWidth Dimension 1
49  height Height Dimension 0
50  sensitive Sensitive Boolean True
51  width Width Dimension 0
52  x Position Position 0
53  y Position Position 0
54 
55  (from Core)
56  accelerators Accelerators AcceleratorTabl NULL
57  background Background Pixel White
58  backgroundPixmap Pixmap Pixmap XtUnspecifiedPixmap
59  borderColor BorderColor Pixel XtDefaultForeground
60  colormap Colormap Colormap CopyFromParent
61  depth Depth Int CopyFromParent
62  mappedWhenManaged MappedWhenManaged Boolean True
63  screen Screen Screen XtCopyScreen
64  translations Translations TranslationTabl
65 
66  (from VImageView)
67  absolute Absolute Boolean TRUE
68  band Band Int 0
69  columnCenter ColumnCenter Int 0
70  cursor Cursor Cursor None
71  exposeCallback Callback Pointer NULL
72  image Image Pointer NULL
73  inputCallback Callback Pointer NULL
74  moveZoomCenterCallback Callback Pointer NULL
75  proportion Proportion Boolean True
76  resize Resize Boolean False
77  rowCenter RowCenter Int 0
78  usePixmap UsePixmap Boolean TRUE
79  vColormap VColormap VColormap NULL
80  zoomInCallback Callback Pointer NULL
81  zoomLevel ZoomLevel Int 100
82  zoomOutCallback Callback Pointer NULL
83 */
84 
85 /* Resource names specific to VImageView: */
86 #define VxNabsolute "absolute"
87 #define VxNband "band"
88 #define VxNcolumnCenter "columnCenter"
89 #define VxNcursor "cursor"
90 #define VxNexposeCallback "exposeCallback"
91 #define VxNforeground "foreground"
92 #define VxNimage "image"
93 #define VxNinputCallback "inputCallback"
94 #define VxNmoveZoomCenterCallback "moveZoomCenterCallback"
95 #define VxNproportion "proportion"
96 #define VxNresize "resize"
97 #define VxNrowCenter "rowCenter"
98 #define VxNusePixmap "usePixmap"
99 #define VxNvColormap "vColormap"
100 #define VxNzoomInCallback "zoomInCallback"
101 #define VxNzoomOutCallback "zoomOutCallback"
102 #define VxNzoomLevel "zoomLevel"
103 
104 /* Class names specific to VImageView: */
105 #define VxCAbsolute "Absolute"
106 #define VxCBand "Band"
107 #define VxCCallback "Callback"
108 #define VxCColumnCenter "ColumnCenter"
109 #define VxCCursor "Cursor"
110 #define VxCImage "Image"
111 #define VxCProportion "Proportion"
112 #define VxCResize "Resize"
113 #define VxCRowCenter "RowCenter"
114 #define VxCUsePixmap "UsePixmap"
115 #define VxCVColormap "VColormap"
116 #define VxCZoomLevel "ZoomLevel"
117 
118 /* Specific VImageViewWidget class and instance datatypes: */
119 typedef struct V_ImageViewClassRec *VImageViewWidgetClass;
120 typedef struct V_ImageViewRec *VImageViewWidget;
121 
122 /* The class constant: */
123 extern WidgetClass vImageViewWidgetClass;
124 
125 /* Convenience routines: */
126 extern VBoolean VImageViewWindowToImage (
127 #if NeedFunctionPrototypes
128  Widget /* w */,
129  int /* x */,
130  int /* y */,
131  double * /* rowp */,
132  double * /* columnp */
133 #endif
134 );
135 
136 extern VBoolean VImageViewClipToImage (
137 #if NeedFunctionPrototypes
138  Widget /* w */,
139  int /* x */,
140  int /* y */,
141  double * /* rowp */,
142  double * /* columnp */
143 #endif
144 );
145 
146 extern VBoolean VImageViewImageToWindow (
147 #if NeedFunctionPrototypes
148  Widget /* w */,
149  double /* row */,
150  double /* column */,
151  int * /* xp */,
152  int * /* yp */
153 #endif
154 );
155 
156 extern VBoolean VImageViewPixelSize (
157 #if NeedFunctionPrototypes
158  Widget /* w */,
159  double * /* width */,
160  double * /* height */
161 #endif
162 );
163 
164 extern void VImageViewRedraw (
165 #if NeedFunctionPrototypes
166  Widget /* w */
167 #endif
168 );
169 
170 #ifdef __cplusplus
171 }
172 #endif
173 
174 #endif /* V_VImageView_h */