/usr/include/OverlayUnidraw/ovarrow.h is in ivtools-dev 1.2.11a1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 | /*
* Copyright (c) 1994-1999 Vectaport Inc.
* Copyright (c) 1990, 1991 Stanford University
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided
* that the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the names of the copyright holders not be used in
* advertising or publicity pertaining to distribution of the software
* without specific, written prior permission. The copyright holders make
* no representations about the suitability of this software for any purpose.
* It is provided "as is" without express or implied warranty.
*
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
* IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL,
* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
/*
* ArrowLineOvComp, ArrowMultiLineOvComp, ArrowSplineOvComp and related
* classes for components with arrowheads.
*/
#ifndef ovarrow_h
#define ovarrow_h
#include <OverlayUnidraw/ovline.h>
#include <OverlayUnidraw/ovspline.h>
class ArrowLine;
class ArrowMultiLine;
class ArrowOpenBSpline;
class ParamList;
//: clone of ArrowLineComp derived from OverlayComp.
class ArrowLineOvComp : public LineOvComp {
public:
ArrowLineOvComp(ArrowLine* = nil);
ArrowLineOvComp(istream&, OverlayComp* parent = nil);
ArrowLine* GetArrowLine();
// return pointer to graphic.
virtual void Interpret(Command*);
// interpret ArrowCmd, PatternCmd, or pass to base class method.
virtual void Uninterpret(Command*);
// uninterpret ArrowCmd or pass to base class method.
virtual Component* Copy();
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
virtual boolean operator == (OverlayComp&);
protected:
ParamList* GetParamList(); // used by istream constructor.
void GrowParamList(ParamList*);
static ParamList* _ovarrow_line_params;
friend class OverlaysScript;
CLASS_SYMID2("ArrowLineComp", OVARROWLINE_COMP);
};
//: graphical view of ArrowLineOvComp.
class ArrowLineOvView : public LineOvView {
public:
ArrowLineOvView(ArrowLineOvComp* = nil);
virtual Command* InterpretManipulator(Manipulator*);
// create or reshape arrow line, or pass to base class method.
virtual void Update();
// update view from component.
ArrowLineOvComp* GetArrowLineOvComp();
// return pointer to component.
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
};
//: "PostScript" view of ArrowLineOvComp.
class ArrowLinePS : public LinePS {
public:
ArrowLinePS(OverlayComp* = nil);
virtual boolean Definition(ostream&);
// output PostScript fragment for rendering ArrowLine.
virtual void Brush(ostream&);
// output PostScript fragment for brush definition,
// for compatibility with older versions of idraw.
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
};
//: serialized view of ArrowLineOvComp.
class ArrowLineScript : public LineScript {
public:
ArrowLineScript(ArrowLineOvComp* = nil);
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
boolean Definition(ostream& out);
// output variable-length ASCII record that defines the component.
static int ReadOriginal(istream&, void*, void*, void*, void*);
// read x0,y0,x1,y1 and construct ArrowLine graphic.
static int ReadScale(istream&, void*, void*, void*, void*);
// read arrow scale.
static int ReadHead(istream&, void*, void*, void*, void*);
// read arrow head flag.
static int ReadTail(istream&, void*, void*, void*, void*);
// read arrow tail flag.
};
//: clone of ArrowMultiLineComp derived from OverlayComp.
class ArrowMultiLineOvComp : public MultiLineOvComp {
public:
ArrowMultiLineOvComp(ArrowMultiLine* = nil);
ArrowMultiLineOvComp(istream&, OverlayComp* parent = nil);
ArrowMultiLine* GetArrowMultiLine();
// return pointer to graphic.
virtual void Interpret(Command*);
// interpret ArrowCmd, PatternCmd, or pass to base class method.
virtual void Uninterpret(Command*);
// uninterpret ArrowCmd or pass to base class method.
virtual Component* Copy();
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
virtual boolean operator == (OverlayComp&);
protected:
ParamList* GetParamList(); // used by istream constructor.
void GrowParamList(ParamList*);
static ParamList* _ovarrow_multiline_params;
friend class OverlaysScript;
CLASS_SYMID2("ArrowMultiLineComp", OVARROWMULTILINE_COMP);
};
//: graphical view of ArrowMultiLineOvComp.
class ArrowMultiLineOvView : public MultiLineOvView {
public:
ArrowMultiLineOvView(ArrowMultiLineOvComp* = nil);
virtual Command* InterpretManipulator(Manipulator*);
// create or reshape arrow line, or pass to base class method.
virtual void Update();
// update view from component.
ArrowMultiLineOvComp* GetArrowMultiLineOvComp();
// return pointer to component.
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
};
//: "PostScript" view of ArrowMultiLineOvComp.
class ArrowMultiLinePS : public MultiLinePS {
public:
ArrowMultiLinePS(OverlayComp* = nil);
virtual boolean Definition(ostream&);
// output PostScript fragment for ArrowMultiLine.
virtual void Brush(ostream&);
// output PostScript fragment for brush definition,
// for compatibility with older versions of idraw.
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
};
//: serialized view of ArrowMultiLineOvComp.
class ArrowMultiLineScript : public MultiLineScript {
public:
ArrowMultiLineScript(ArrowMultiLineOvComp* = nil);
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
boolean Definition(ostream&);
// output variable-length ASCII record that defines the component.
static int ReadPoints(istream&, void*, void*, void*, void*);
// read point list and construct ArrowMultiLine graphic.
static int ReadScale(istream&, void*, void*, void*, void*);
// read arrow scale.
static int ReadHead(istream&, void*, void*, void*, void*);
// read arrow head flag.
static int ReadTail(istream&, void*, void*, void*, void*);
// read arrow tail flag.
protected:
virtual const char* Name();
// name used for script output.
};
//: clone of ArrowSplineComp derived from OverlayComp.
class ArrowSplineOvComp : public SplineOvComp {
public:
ArrowSplineOvComp(ArrowOpenBSpline* = nil);
ArrowSplineOvComp(istream&, OverlayComp* parent = nil);
ArrowOpenBSpline* GetArrowOpenBSpline();
// return pointer to graphic.
virtual void Interpret(Command*);
// interpret ArrowCmd, PatternCmd, or pass to base class method.
virtual void Uninterpret(Command*);
// uninterpret ArrowCmd or pass to base class method.
virtual Component* Copy();
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
virtual boolean operator == (OverlayComp&);
protected:
ParamList* GetParamList(); // used by istream constructor.
void GrowParamList(ParamList*);
static ParamList* _ovarrow_spline_params;
friend class OverlaysScript;
CLASS_SYMID2("ArrowSplineComp", OVARROWSPLINE_COMP);
};
//: graphical view of ArrowSplineOvComp.
class ArrowSplineOvView : public SplineOvView {
public:
ArrowSplineOvView(ArrowSplineOvComp* = nil);
virtual Command* InterpretManipulator(Manipulator*);
// create or reshape arrow line, or pass to base class method.
virtual void Update();
// update view from component.
ArrowSplineOvComp* GetArrowSplineOvComp();
// return pointer to component.
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
};
//: "PostScript" view of ArrowSplineOvComp.
class ArrowSplinePS : public SplinePS {
public:
ArrowSplinePS(OverlayComp* = nil);
virtual boolean Definition(ostream&);
// output PostScript fragment for ArrowSpline.
virtual void Brush(ostream&);
// output PostScript fragment for brush definition,
// for compatibility with older versions of idraw.
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
};
//: serialized view of ArrowSplineOvComp.
class ArrowSplineScript : public SplineScript {
public:
ArrowSplineScript(ArrowSplineOvComp* = nil);
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
boolean Definition(ostream&);
// output variable-length ASCII record that defines the component.
static int ReadPoints(istream&, void*, void*, void*, void*);
// read point list and construct ArrowSpline graphic.
static int ReadScale(istream&, void*, void*, void*, void*);
// read arrow scale.
static int ReadHead(istream&, void*, void*, void*, void*);
// read arrow head flag.
static int ReadTail(istream&, void*, void*, void*, void*);
// read arrow tail flag.
protected:
virtual const char* Name();
// name used for script output.
};
#endif
|