/usr/include/DrawServ/grid.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 | /*
* Copyright (c) 2004 Scott E. Johnston
*
* 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.
*
*/
/*
* GraphicId - object to encapsulate 2-way link with remote drawserv
*/
#ifndef grid_h
#define grid_h
#include <Unidraw/globals.h>
class DrawLink;
class GraphicComp;
class GraphicIdList;
//: object to encapsulate unique graphic id
class GraphicId {
public:
GraphicId(unsigned int sessionid=0);
virtual ~GraphicId();
unsigned int id() { return _id|_sid; }
// get associated unique composite integer id
void id(unsigned int id);
// set associated unique composite integer id
unsigned int grid() { return _id; }
// return graphic id portion of composite id
// unique only to this process
unsigned int sessionid() { return _sid; }
// return session id portion of composite id
virtual int is_list() { return 0; }
// return true if can be cast to GraphicIds
virtual GraphicIdList* sublist() { return nil; }
// returns pointer to sublist of GraphicId's, if any
void grcomp(GraphicComp* comp);
// set pointer to associated GraphicComp
GraphicComp* grcomp() { return _comp; }
// get pointer to associated GraphicComp
void selector(unsigned int sid) { _selector = sid; }
// set session id of current selector
unsigned int selector() { return _selector; }
// get session id of current selector
void selected(int state) { _selected = state; }
// set selected state
int selected() { return _selected; }
// get selected state
protected:
unsigned int _id;
unsigned int _sid;
unsigned int _selector;
int _selected;
GraphicComp* _comp;
};
//: object to encapsulate a set of graphic ids
class GraphicIds : public GraphicId {
public:
GraphicIds(unsigned int sessionid, GraphicId* subids, int nsubids);
GraphicIds(unsigned int sessionid, GraphicIdList* sublist=nil);
virtual ~GraphicIds();
virtual int is_list() { return 1; }
// return true if can be cast to GraphicIds
virtual GraphicIdList* sublist() { return _sublist; }
// returns pointer to sublist of GraphicId's, if any
protected:
GraphicIdList* _sublist;
};
#endif
|