24 #ifndef DOXYGEN_NOTFOR_DEVEL
26 #include <tulip/Plugin.h>
27 #include <tulip/Size.h>
28 #include <tulip/Coord.h>
29 #include <tulip/BoundingBox.h>
30 #include <tulip/PluginContext.h>
34 static const std::string GLYPH_CATEGORY =
"Node shape";
38 class GlGraphInputData;
40 class GlyphContext :
public PluginContext {
42 GlGraphInputData *glGraphInputData;
44 GlyphContext(Graph ** =NULL, GlGraphInputData *glGraphInputData=NULL,
int =5,
int =5):
45 glGraphInputData(glGraphInputData) {
54 std::string category()
const {
55 return GLYPH_CATEGORY;
57 std::string icon()
const {
58 return ":/tulip/gui/icons/32/plugin_glyph.png";
64 virtual std::string getGroup()
const {
68 virtual void getIncludeBoundingBox(BoundingBox &boundingBox,node) {
69 boundingBox[0] = Coord(-0.5,-0.5,-0.5);
70 boundingBox[1] = Coord(0.5,0.5,0.5);
73 virtual void getTextBoundingBox(BoundingBox &boundingBox,node n) {
74 getIncludeBoundingBox(boundingBox,n);
77 virtual void draw(node,
float)=0;
83 virtual Coord getAnchor(
const Coord &nodeCenter,
const Coord &from,
84 const Size &scale,
const double zRotation)
const;
89 virtual bool renderLabel() {
93 GlGraphInputData *glGraphInputData;
104 virtual Coord getAnchor(
const Coord &vector)
const;
109 #define GLYPHINFORMATIONS(NAME, AUTHOR, DATE, INFO, RELEASE, ID) \
110 PLUGININFORMATIONS(NAME, AUTHOR, DATE, INFO, RELEASE, "")\
111 int id() const { return ID; }
113 #endif // DOXYGEN_NOTFOR_DEVEL