1 ////////////////////////////////////////////////////////////////////////// 2 // 3 // pgAdmin III - PostgreSQL Tools 4 // 5 // Copyright (C) 2002 - 2016, The pgAdmin Development Team 6 // This software is released under the PostgreSQL Licence 7 // 8 // hdLocatorConnector.h - class that puts connects at locator position 9 // 10 ////////////////////////////////////////////////////////////////////////// 11 12 #ifndef HDLOCATORCONNECTOR_H 13 #define HDLOCATORCONNECTOR_H 14 15 #include "hotdraw/main/hdObject.h" 16 #include "hotdraw/figures/hdLineConnection.h" 17 #include "hotdraw/utilities/hdPoint.h" 18 #include "hotdraw/utilities/hdRect.h" 19 #include "hotdraw/locators/hdILocator.h" 20 21 class hdLocatorConnector : public hdIConnector 22 { 23 public: 24 hdLocatorConnector(hdIFigure *owner, hdILocator *locator); 25 ~hdLocatorConnector(); 26 virtual hdPoint findStart(int posIdx, hdLineConnection *connection); 27 virtual hdPoint findEnd(int posIdx, hdLineConnection *connection); 28 virtual bool containsPoint(int posIdx, int x, int y); 29 virtual void draw(wxBufferedDC &context); 30 virtual hdPoint locate(int posIdx); 31 virtual hdRect &getDisplayBox(int posIdx); 32 protected: 33 int size; //standard size connector 34 hdRect displayBox; 35 private: 36 hdILocator *figureLocator; 37 hdIFigure *figureOwner; 38 39 }; 40 #endif 41