summaryrefslogtreecommitdiff
path: root/graphics/pgf/base/source/RandomPlacer_script.h
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /graphics/pgf/base/source/RandomPlacer_script.h
Initial commit
Diffstat (limited to 'graphics/pgf/base/source/RandomPlacer_script.h')
-rw-r--r--graphics/pgf/base/source/RandomPlacer_script.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/graphics/pgf/base/source/RandomPlacer_script.h b/graphics/pgf/base/source/RandomPlacer_script.h
new file mode 100644
index 0000000000..a92873ff47
--- /dev/null
+++ b/graphics/pgf/base/source/RandomPlacer_script.h
@@ -0,0 +1,32 @@
+#include <pgf/gd/ogdf/c/InterfaceFromOGDF.h>
+#include <ogdf/energybased/multilevelmixer/RandomPlacer.h>
+
+struct RandomPlacer_script :
+ scripting::declarations,
+ scripting::factory<ogdf::RandomPlacer>
+{
+ ogdf::RandomPlacer* make (scripting::run_parameters* parameters) {
+ using namespace ogdf;
+ RandomPlacer* r = new RandomPlacer;
+
+ parameters->configure_option ("RandomPlacer.circleSize",
+ &RandomPlacer::setCircleSize, *r);
+
+ return r;
+ }
+
+ void declare (scripting::script s) {
+ using namespace scripting;
+ using namespace ogdf;
+
+ s.declare (key ("RandomPlacer")
+ .set_module ("InitialPlacer", this)
+ .documentation_in ("pgf.gd.doc.ogdf.energybased.multilevelmixer.RandomPlacer"));
+
+ s.declare (key ("RandomPlacer.circleSize")
+ .type ("number")
+ .documentation_in ("pgf.gd.doc.ogdf.energybased.multilevelmixer.RandomPlacer"));
+
+ }
+
+};