24 #ifndef DOXYGEN_NOTFOR_DEVEL
27 #include <tulip/Plugin.h>
28 #include <tulip/Size.h>
29 #include <tulip/Coord.h>
30 #include <tulip/Color.h>
31 #include <tulip/BoundingBox.h>
32 #include <tulip/TlpTools.h>
33 #include <tulip/PluginLister.h>
35 #include <tulip/GlGraphInputData.h>
36 #include <tulip/Plugin.h>
41 static const std::string GLYPH_CATEGORY = QObject::trUtf8(
"Node shape").toStdString();
46 class GlyphContext :
public PluginContext {
48 GlGraphInputData *glGraphInputData;
50 GlyphContext(Graph ** =NULL, GlGraphInputData *glGraphInputData=NULL,
int =5,
int =5):
51 glGraphInputData(glGraphInputData) {
60 std::string category()
const {
61 return GLYPH_CATEGORY;
63 std::string icon()
const {
64 return ":/tulip/gui/icons/32/plugin_glyph.png";
70 virtual std::string getGroup()
const {
74 virtual void getIncludeBoundingBox(BoundingBox &boundingBox,node) {
75 boundingBox[0] = Coord(-0.5,-0.5,-0.5);
76 boundingBox[1] = Coord(0.5,0.5,0.5);
79 virtual void getTextBoundingBox(BoundingBox &boundingBox,node n) {
80 getIncludeBoundingBox(boundingBox,n);
83 virtual void draw(node,
float)=0;
89 virtual Coord getAnchor(
const Coord &nodeCenter,
const Coord &from,
90 const Size &scale,
const double zRotation)
const;
95 virtual bool renderLabel() {
99 GlGraphInputData *glGraphInputData;
110 virtual Coord getAnchor(
const Coord &vector)
const;
115 #define GLYPHINFORMATIONS(NAME, AUTHOR, DATE, INFO, RELEASE, ID) \
116 PLUGININFORMATIONS(NAME, AUTHOR, DATE, INFO, RELEASE, "")\
117 int id() const { return ID; }
119 #endif // DOXYGEN_NOTFOR_DEVEL