24 #ifndef DOXYGEN_NOTFOR_DEVEL
26 #include <tulip/Plugin.h>
27 #include <tulip/Size.h>
28 #include <tulip/Coord.h>
29 #include <tulip/PluginContext.h>
33 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);
69 virtual void getTextBoundingBox(BoundingBox &boundingBox, node n);
71 virtual void draw(node,
float) = 0;
77 virtual Coord getAnchor(
const Coord &nodeCenter,
const Coord &from,
const Size &scale,
78 const double zRotation)
const;
84 virtual bool renderLabel() {
91 virtual bool shaderSupported()
const {
98 static void drawRectInScreenPlane(GlRect &rect,
const Size &size,
bool disableMasks);
100 GlGraphInputData *glGraphInputData;
111 virtual Coord getAnchor(
const Coord &vector)
const;
114 class TLP_GL_SCOPE NoShaderGlyph :
public Glyph {
117 bool shaderSupported()
const override {
123 #define GLYPHINFORMATION(NAME, AUTHOR, DATE, INFO, RELEASE, ID) \
124 PLUGININFORMATION(NAME, AUTHOR, DATE, INFO, RELEASE, "") \
125 int id() const override { \
Contains runtime parameters for a plugin.
Top-level interface for plug-ins.