--- /dev/null
+#include <boost/python.hpp>
+#include <boost/python/register_ptr_to_python.hpp>
+using namespace boost::python;
+
+#include "alg/drawable.hpp"
+
+
+void export_drawable()
+{
+ class_<Drawable>("Drawable")
+ .def(init<float, float, float, float, ColorRef>())
+ //optional<Drawable::draw_func_ptr> >())
+ .add_property("x", &Drawable::x, &Drawable::setX,
+ "starting x (horizontal) coordinate")
+ .add_property("y", &Drawable::y, &Drawable::setY,
+ "starting y (vertical) coordinate")
+ .add_property("z", &Drawable::z, &Drawable::setZ,
+ "starting z (depth into/out of screen) coordinate")
+ .add_property("h", &Drawable::height, &Drawable::setHeight,
+ "how 'tall' our rectangle should be")
+ .add_property("color", &Drawable::color, &Drawable::setColor,
+ "color for this object")
+
+ //void setDrawFunction(draw_func_ptr d) { draw_func = d; }
+ //draw_func_ptr drawFunction() const { return draw_func; }
+ ;
+
+ register_ptr_to_python< DrawableRef >();
+}
+
+
+
void export_annotations();
void export_container_exceptions();
void export_conserved_path();
+void export_drawable();
void export_flps();
void export_glsequence();
void export_mussa();
export_annotation_colors();
export_annotations();
export_conserved_path();
+ export_drawable();
export_flps();
export_seq_span();
export_sequence();
// return_value_policy<copy_const_reference>()))
.add_property("annotations", &SeqSpan::annotations,
&SeqSpan::setAnnotations)
+ .add_property("drawable", &SeqSpan::drawable, &SeqSpan::setDrawable)
.add_property("start", &SeqSpan::start, &SeqSpan::setStart,
"start position relative to root sequence")
.add_property("stop", &SeqSpan::stop, &SeqSpan::setStop,
s.annotations[term_key] = term
self.failUnlessEqual(s.annotations[term_key], term)
+ def testDrawable(self):
+ # ok this is a boring test...
+ seq_text = "AAAAAG"
+ s = mussa.SeqSpan(seq_text)
+ d = mussa.Drawable()
+ s.drawable = d
+
+ self.failUnless(s.drawable is d)
+
+
def suite():
return unittest.makeSuite(TestSeqSpan, 'test')