14 #include "msdevstudio/MSconfig.h" 18 #include <boost/python.hpp> 36 "The HippoDraw canvas.\n\n" 37 "This class provides an interface to the canvas.\n" 38 "One can take various actions that are also\n" 39 "available from menu items in the canvas window." )
41 .def (
"show", &PyCanvas::show,
44 "Displays the canvas window on the screen. One only needs\n" 45 "to use this method if running HippoDraw in the Python\n" 48 .def (
"close", &PyCanvas::close,
51 "Closes the window." )
53 .def (
"addDisplay", &PyCanvas::addDisplay,
54 with_custodian_and_ward < 1, 2 > (),
55 "addDisplay ( Display ) -> None\n" 57 "Adds a display to the canvas." )
59 .def (
"saveAs", &PyCanvas::saveAs,
60 "saveAs ( string ) -> None\n" 62 "Save the canvas as a XML file." )
64 .def (
"printTo", &PyCanvas::print,
65 "printTo ( string ) -> None\n" 67 "Prints the canvas to PostScript file." )
69 .def (
"getDisplay", &PyCanvas::getDisplay,
70 return_value_policy < reference_existing_object > (),
71 "getDisplay () -> Display\n" 73 "Returns the selected Display object." )
75 .def (
"getDisplays", &PyCanvas::getDisplays,
76 return_value_policy < copy_const_reference > (),
77 "getDisplays () -> tuple\n" 79 "Returns a tuple of all Display objects on the canvas." )
81 .def (
"getCut", &PyCanvas::getCut,
82 return_value_policy < reference_existing_object > (),
85 "Returns the currently selected Cut object." )
87 .def (
"selectAllDisplays", &PyCanvas::selectAllDisplays,
88 "selectAllDisplays ( Boolean ) -> None\n" 90 "Sets all displays to selected state or not." )
92 .def (
"selectDisplay", &PyCanvas::selectDisplay,
93 "selectDisplay ( Display ) -> None\n" 95 "Sets a display to selected state." )
97 .def (
"saveAsImage", &PyCanvas::saveAsImage,
98 "saveAsImage ( Display, string ) -> None\n" 100 "Save a display as an image file.\n" 101 "The suffix of the file name controls the image type." )
103 .def (
"saveSelectedImages", &PyCanvas::saveSelectedImages,
104 "saveSelectedImages ( string ) -> None\n" 106 "Save the selected displays as an image file.\n" 107 "The suffix of the file name controls the image type." )
109 .def (
"removeDisplay", &PyCanvas::removeDisplay,
110 "removeDisplay ( Display ) -> None\n" 112 "Removes the display from the canvas." )
114 .def (
"addText", &PyCanvas::addText,
115 "addText ( Display, string ) -> None\n" 117 "Adds text to display." )
119 .def (
"addTextAt", &PyCanvas::addTextAt,
120 "addTextAt ( Display, string, value, value ) -> None\n" 122 "Adds text to a display at specified position\n" 123 "Position is fraction of width and height." )
125 .def (
"addTextAtAbs", &PyCanvas::addTextAtAbs,
126 "addTextAt ( Display, string, value, value ) -> None\n" 128 "Adds text to a display at specified position\n" 129 "Position is absolute value of the date point." )
131 .def (
"addTextRep", &PyCanvas::addTextRep,
132 "addTextRep ( Display, string ) -> None\n" 134 "Adds textual data representation to display. Use\n" 135 "Canvas.getTextRepTypes() to see available types." )
137 .def (
"mouseData", &PyCanvas::mouseData,
138 return_value_policy < copy_const_reference > (),
139 "mouseData () -> tuple\n" 141 "Returns a tuple of picked data." )
143 .def (
"setPlotMatrix", &PyCanvas::setPlotMatrix,
144 "setPlotMatrix ( columns, rows ) -> None\n" 146 "Sets the number of columns and " 147 "rows of plots for each page." )
149 .def (
"swapOrientation", &PyCanvas::swapOrientation,
150 "swapOrientation ( ) -> None\n" 152 "Swaps the canvas' orientation from portrait to landscape\n" 155 .def (
"getTextRepTypes", &PyCanvas::getTextRepTypes,
156 return_value_policy < copy_const_reference > (),
157 "getTextRepTypes () -> tuple\n" 159 "Returns the types of textual data representations" 162 .def (
"clear", &PyCanvas::clear,
165 "Removes all items from the canvas" )
167 .def (
"getX", &PyCanvas::getX,
168 "getX ( Display ) -> value\n" 170 "Returns the X coordinate of the Display." )
172 .def (
"getY", &PyCanvas::getY,
173 "getY ( Display ) -> value\n" 175 "Returns the Y coordinate of the Display. Note that Y=0 is\n" 176 "at the top and Y increases downward." )
178 .def (
"setX", &PyCanvas::setX,
179 "setX ( Display, value ) -> None\n" 181 "Sets the X coordinate of the Display" )
183 .def (
"setY", &PyCanvas::setY,
184 "setY ( Display, value ) -> None\n" 186 "Sets the Y coordinate of the Display. Note that Y = 0 is\n" 187 "at the top and Y increases downward." )
189 .def (
"getHeight", &PyCanvas::getHeight,
190 "getHeight ( Display ) -> value\n" 192 "Returns the height of the Display." )
194 .def (
"getWidth", &PyCanvas::getWidth,
195 "getWidth ( Display ) -> value\n" 197 "Returns the width of the Display." )
199 .def (
"setHeight", &PyCanvas::setHeight,
200 "setHeight ( Display, value ) -> None\n" 202 "Sets the height of the Display." )
204 .def (
"setWidth", &PyCanvas::setWidth,
205 "setWidth ( Display, value ) -> None\n" 207 "Sets the width of the Display." )
209 .def (
"getSelPickTable", &PyCanvas::getSelPickTable,
210 return_value_policy < reference_existing_object > (),
211 "getSelPickTable () -> NTuple\n" 213 "Gets the pick table for selected Display." )
215 .def (
"getPickTable", &PyCanvas::getPickTable,
216 return_value_policy < reference_existing_object > (),
217 "getPickTable ( Display ) -> NTuple\n" 219 "Gets the pick table of the Display." )
hippodraw::PyCanvas class interface.
hippodraw::NTuple class interface.
void export_Canvas()
Exports the PyCanvas class to Python.
hippodraw::QtCut class interface