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;
41 class GlyphContext :
public PluginContext {
43 GlGraphInputData *glGraphInputData;
45 GlyphContext(Graph ** =
nullptr, GlGraphInputData *glGraphInputData =
nullptr,
int = 5,
int = 5)
46 : glGraphInputData(glGraphInputData) {}
48 ~GlyphContext()
override {}
53 std::string category()
const override {
54 return GLYPH_CATEGORY;
56 std::string icon()
const override {
57 return ":/tulip/gui/icons/32/plugin_glyph.png";
63 virtual std::string getGroup()
const {
67 virtual void getIncludeBoundingBox(BoundingBox &boundingBox, node) {
68 boundingBox[0] = Coord(-0.5, -0.5, -0.5);
69 boundingBox[1] = Coord(0.5, 0.5, 0.5);
72 virtual void getTextBoundingBox(BoundingBox &boundingBox, node n) {
73 getIncludeBoundingBox(boundingBox, n);
76 virtual void draw(node,
float) = 0;
82 virtual Coord getAnchor(
const Coord &nodeCenter,
const Coord &from,
const Size &scale,
83 const double zRotation)
const;
89 virtual bool renderLabel() {
96 virtual bool shaderSupported()
const {
103 static void drawRectInScreenPlane(GlRect &rect,
const Size &size,
bool disableMasks);
105 GlGraphInputData *glGraphInputData;
116 virtual Coord getAnchor(
const Coord &vector)
const;
119 class TLP_GL_SCOPE NoShaderGlyph :
public Glyph {
122 bool shaderSupported()
const override {
128 #define GLYPHINFORMATION(NAME, AUTHOR, DATE, INFO, RELEASE, ID) \ 129 PLUGININFORMATION(NAME, AUTHOR, DATE, INFO, RELEASE, "") \ 130 int id() const override { \ 134 #endif // DOXYGEN_NOTFOR_DEVEL
Contains runtime parameters for a plugin.
Top-level interface for plug-ins.