/usr/include/FrameUnidraw/framecmds.h is in ivtools-dev 1.2.11a1-11.
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 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 | /*
* Copyright (c) 2009 Scott E. Johnston
* Copyright (c) 1994, 1995, 1999 Vectaport Inc.
*
* 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.
*
*/
#ifndef framecmds_h
#define framecmds_h
#include <OverlayUnidraw/ovcmds.h>
#include <Unidraw/Commands/command.h>
#include <Unidraw/Commands/datas.h>
#include <Unidraw/Commands/edit.h>
#include <Unidraw/Commands/macro.h>
#include <Unidraw/Commands/struct.h>
#include <InterViews/action.h>
//: command to create a frame.
// commmand to create a frame, before or after the current frame.
class CreateFrameCmd : public Command {
public:
CreateFrameCmd(ControlInfo*, boolean after = true);
CreateFrameCmd(Editor* =nil, boolean after = true);
boolean After() { return _after; }
virtual void Execute();
virtual void Unexecute();
virtual boolean Reversible();
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
virtual Command* Copy();
protected:
boolean _after;
};
//: data object for DeleteFrameCmd.
class DeleteFrameData : public VoidData {
public:
DeleteFrameData(void*, boolean restore_after);
boolean RestoreAfter() { return _after; }
protected:
boolean _after;
};
//: command to delete a frame.
class DeleteFrameCmd : public Command {
public:
DeleteFrameCmd(ControlInfo*);
DeleteFrameCmd(Editor* = nil);
virtual void Execute();
virtual void Unexecute();
virtual boolean Reversible();
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
virtual Command* Copy();
};
//: command to change current frame.
class MoveFrameCmd : public Command {
public:
MoveFrameCmd(ControlInfo*, int motion = +1, boolean allowbg = true);
MoveFrameCmd(Editor* =nil, int motion = +1, boolean allowbg = true);
void init(int motion, boolean allowbg);
void wraparound(boolean flag) { _wraparound = flag; }
// set flag to indicate forward wraparound during replay.
boolean wraparound() { return _wraparound; }
// get flag to indicate forward wraparound during replay.
virtual void Execute();
virtual void Unexecute();
virtual boolean Reversible();
virtual void Log();
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
virtual Command* Copy();
boolean AllowBg() { return _allowbg; }
// get flag that indicates whether to allow a background frame.
void AllowBg(boolean abg) { _allowbg = abg; }
// set flag that indicates whether to allow a background frame.
static const char* MoveFuncFormat();
// return format string for generating interpreted move command.
static const char* AbsMoveFuncFormat();
// return format string for generating interpreted move command with
// absolute frame arguments.
static void FuncEnable(const char* movefunc=nil, const char* absmovefunc=nil);
// enable execution of an interpreter command on each move.
static void FuncDisable() { _func_on=false; }
// disable execution of an interpreter command on each move.
int requestmotion() { return _requestmotion; }
// requested motion in frames, negative means backward.
int plannedmotion() { return _plannedmotion; }
// planned motion in frames, negative means backward.
int actualmotion() { return _actualmotion; }
// actual motion in frames, negative means backward.
void set_wraparound();
// set forward wraparound flag.
void clr_wraparound();
// clear forward wraparound flag.
static MoveFrameCmd* default_instance() { return _default; }
// return a default instance of the MoveFrameCmd.
static void default_instance(MoveFrameCmd* cmd)
{ _default = cmd; }
// set a default instance of the MoveFrameCmd.
protected:
int _requestmotion, _actualmotion, _plannedmotion;
boolean _allowbg;
boolean _wraparound;
static boolean _func_on;
static char* _move_func;
static char* _absmove_func;
static MoveFrameCmd* _default;
friend class MoveFrameFunc;
};
declareActionCallback(MoveFrameCmd)
//: command to move to the first frame.
class FrameBeginCmd : public MoveFrameCmd {
public:
FrameBeginCmd(ControlInfo*);
FrameBeginCmd(Editor* =nil);
virtual void Execute();
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
virtual Command* Copy();
};
//: command to move to the last frame.
class FrameEndCmd : public MoveFrameCmd {
public:
FrameEndCmd(ControlInfo*);
FrameEndCmd(Editor* =nil);
virtual void Execute();
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
virtual Command* Copy();
};
//: command to create a frame and move to it.
class CreateMoveFrameCmd : public MacroCmd {
public:
CreateMoveFrameCmd(ControlInfo*, boolean after = true);
CreateMoveFrameCmd(Editor* = nil, boolean after = true);
boolean After() { return _after; }
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
virtual Command* Copy();
CreateFrameCmd* createframecmd();
MoveFrameCmd* moveframecmd();
protected:
boolean _after;
};
//: command to copy contents of current frame to create a new frame.
class CopyMoveFrameCmd : public MacroCmd {
public:
CopyMoveFrameCmd(ControlInfo*, boolean after = true);
CopyMoveFrameCmd(Editor* = nil, boolean after = true);
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
virtual Command* Copy();
virtual void Execute();
protected:
boolean _after;
};
//: OvGroupCmd specialized for FrameUnidraw use.
class FrameGroupCmd : public OvGroupCmd {
public:
FrameGroupCmd(ControlInfo*, OverlayComp* dest = nil);
FrameGroupCmd(Editor* = nil, OverlayComp* dest = nil);
virtual void Execute ();
virtual OverlaysComp* MakeOverlaysComp();
virtual Command* Copy();
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
};
//: UngroupCmd specialized for FrameUnidraw use.
class FrameUngroupCmd : public UngroupCmd {
public:
FrameUngroupCmd(ControlInfo*);
FrameUngroupCmd(Editor* = nil);
virtual ~FrameUngroupCmd();
virtual void Execute();
virtual Command* Copy();
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
};
//: FrontCmd specialized for FrameUnidraw use.
class FrameFrontCmd : public FrontCmd {
public:
FrameFrontCmd(ControlInfo*);
FrameFrontCmd(Editor* = nil);
virtual void Execute();
virtual Command* Copy();
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
};
//: BackCmd specialized for FrameUnidraw use.
class FrameBackCmd : public BackCmd {
public:
FrameBackCmd(ControlInfo*);
FrameBackCmd(Editor* = nil);
virtual void Execute();
virtual Command* Copy();
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
};
//: CopyCmd specialized for FrameUnidraw use.
class FrameCopyCmd : public CopyCmd {
public:
FrameCopyCmd(ControlInfo*, Clipboard* = nil);
FrameCopyCmd(Editor* = nil, Clipboard* = nil);
virtual void Execute();
virtual Command* Copy();
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
};
//: OvNewViewCmd specialized for FrameUnidraw use.
class FrameNewViewCmd : public OvNewViewCmd {
public:
FrameNewViewCmd(ControlInfo*);
FrameNewViewCmd(Editor* = nil);
virtual void Execute();
virtual Command* Copy();
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
};
//: command to enable/disable display of previous frame
class ShowOtherFrameCmd : public Command {
public:
ShowOtherFrameCmd(ControlInfo*, int offset = -1);
ShowOtherFrameCmd(Editor* =nil, int offset = -1);
virtual void Execute();
virtual void Unexecute();
virtual boolean Reversible();
virtual void Log();
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
virtual Command* Copy();
protected:
int _offset;
int _old_offset;
};
//: command to enable/disable auto-new-frame on import.
class AutoNewFrameCmd : public MacroCmd {
public:
AutoNewFrameCmd(ControlInfo*);
AutoNewFrameCmd(Editor* = nil);
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
virtual Command* Copy();
virtual void Execute();
virtual void Unexecute();
virtual void Log();
virtual boolean Reversible();
static AutoNewFrameCmd* default_instance() { return _default; }
static void default_instance(AutoNewFrameCmd* cmd)
{ _default = cmd; }
protected:
static AutoNewFrameCmd* _default;
};
declareActionCallback(AutoNewFrameCmd)
#endif
|