/* * * Copyright (c) 1995 * Knowledge Science Institute, University of Calgary * * 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. The Knowledge Science Institute makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * */ #ifndef CMAP_H #define CMAP_H #ifndef MPLATFORM_H #include #endif /* CMAP_CLASS is used to contain the compile declaration attributes of classes and functions: VAL FOR compiled-in _export DLL compilation _import DLL use */ #ifndef CMAP_CLASS #define CMAP_CLASS GRAPHIC_CLASS #endif #ifndef GRAPHIC_H #include #endif #ifndef LIST_H #include #endif #ifndef MOBJECT_H #include #endif #ifndef MERROR_H #include #endif /* #define GraphicRefClass 9820 class PUBLIC_ATTR GraphicRef : public ObjectCounter { MDEBUG_DECL(GraphicRef) public: GraphicRef(Graphic &g); GraphicRef(const GraphicRef& r); GraphicRef(); ~GraphicRef(); Graphic* operator->() const {return G;} virtual int operator< (const GraphicRef& g) const; virtual int operator==(const GraphicRef& g) const {return g.G==G;} operator Graphic&(); private: Graphic *G; }; */ #define CMapClass 6402 class CMAP_CLASS CMap : public SRGraphic { MDEBUG_DECL(CMap) public: CMap(GraphicContainer* Parent=NULL); CMap(const CMap& g, GraphicContainer* parent=NULL /*g's parent*/) : SRGraphic(g,parent),BehaviouralGraphic(g,parent) {} override CMap* clone() const {return new CMap(*this);} ~CMap(); override int paint(DEVICE,RECTANGLE*); override VisualGraphic* getVisual() {if (!Visual) Visual=new RectangleShape((CMap*)this); return Visual;} override ERRORCODE setVisual(const char* visualClassName) {return -1;}//don't allow anything but rectangle override void doRButtonDown(unsigned int modKeys, POINT& p); override int execute(Command*); override int undo(Command*); virtual Command* getNewNodeCommand(Node* node); virtual Command* getNewArcCommand(SMaplet* arc); override int handleCommand(Command*); protected: virtual MENU doMakeMenu(); virtual Command* doGenerateCommand(WORD command, POINT *p, char* cmdName); }; #endif