export_Canvas.cxx

Go to the documentation of this file.
00001 
00012 // for dll interface warning
00013 #ifdef _MSC_VER
00014 #include "msdevstudio/MSconfig.h"
00015 #endif
00016 
00017 // include first to avoid _POSIX_C_SOURCE warning.
00018 #include <boost/python.hpp>
00019 
00020 #include "PyCanvas.h"
00021 
00022 #include "QtCut.h"
00023 
00024 #include "datasrcs/NTuple.h"
00025 
00026 using namespace boost::python;
00027 
00028 namespace hippodraw {
00029 namespace Python {
00030 
00031 void 
00032 export_Canvas()
00033 {
00034         class_ < PyCanvas >
00035           ( "Canvas",
00036             "The HippoDraw canvas.\n\n"
00037             "This class provides an interface to the canvas.\n"
00038             "One can take various actions that are also\n"
00039             "available from menu items in the canvas window." )
00040 
00041           .def ( "show", &PyCanvas::show,
00042                  "show () -> None\n"
00043                  "\n"
00044                  "Displays the canvas window on the screen.   One only needs\n"
00045                  "to use this method if running HippoDraw in the Python\n"
00046                  "thread." )
00047 
00048           .def ( "close", &PyCanvas::close,
00049                  "close () -> None\n"
00050                  "\n"
00051                  "Closes the window." )
00052 
00053            .def ( "addDisplay", &PyCanvas::addDisplay,
00054                   with_custodian_and_ward < 1, 2 > (),
00055                   "addDisplay ( Display ) -> None\n"
00056                   "\n"
00057                   "Adds a display to the canvas." )
00058 
00059            .def ( "saveAs", &PyCanvas::saveAs,
00060                   "saveAs ( string ) -> None\n"
00061                   "\n"
00062                   "Save the canvas as a XML file." )
00063 
00064            .def ( "printTo", &PyCanvas::print,
00065                   "printTo ( string ) -> None\n"
00066                   "\n"
00067                   "Prints the canvas to PostScript file." )
00068 
00069            .def ( "getDisplay", &PyCanvas::getDisplay,
00070                   return_value_policy < reference_existing_object > (),
00071                   "getDisplay () -> Display\n"
00072                   "\n"
00073                   "Returns the selected Display object." )
00074 
00075            .def ( "getDisplays", &PyCanvas::getDisplays,
00076                   return_value_policy < copy_const_reference > (),
00077                   "getDisplays () -> tuple\n"
00078                   "\n"
00079                   "Returns a tuple of all Display objects on the canvas." )
00080 
00081            .def ( "getCut", &PyCanvas::getCut,
00082                   return_value_policy < reference_existing_object > (),
00083                   "getCut () -> Cut\n"
00084                   "\n"
00085                   "Returns the currently selected Cut object." )
00086 
00087            .def ( "selectAllDisplays", &PyCanvas::selectAllDisplays,
00088                   "selectAllDisplays ( Boolean ) -> None\n"
00089                   "\n"
00090                   "Sets all displays to selected state or not." )
00091 
00092            .def ( "selectDisplay", &PyCanvas::selectDisplay,
00093                   "selectDisplay ( Display ) -> None\n"
00094                   "\n"
00095                   "Sets a display to selected state." )
00096 
00097            .def ( "saveAsImage", &PyCanvas::saveAsImage,
00098                   "saveAsImage ( Display, string ) -> None\n"
00099                   "\n"
00100                   "Save a display as an image file.\n"
00101                   "The suffix of the file name controls the image type." )
00102 
00103            .def ( "saveSelectedImages", &PyCanvas::saveSelectedImages,
00104                   "saveSelectedImages ( string ) -> None\n"
00105                   "\n"
00106                   "Save the selected displays as an image file.\n"
00107                   "The suffix of the file name controls the image type." )
00108 
00109            .def ( "removeDisplay", &PyCanvas::removeDisplay,
00110                   "removeDisplay ( Display ) -> None\n"
00111                   "\n"
00112                   "Removes the display from the canvas." )
00113 
00114            .def ( "addText", &PyCanvas::addText,
00115                   "addText ( Display, string ) -> None\n"
00116                   "\n"
00117                   "Adds text to display." )
00118 
00119            .def ( "addTextAt", &PyCanvas::addTextAt,
00120                   "addTextAt ( Display, string, value, value ) -> None\n"
00121                   "\n"
00122                   "Adds text to a display at specified position\n"
00123                   "Position is fraction of width and height." )
00124 
00125            .def ( "addTextAtAbs", &PyCanvas::addTextAtAbs,
00126                   "addTextAt ( Display, string, value, value ) -> None\n"
00127                   "\n"
00128                   "Adds text to a display at specified position\n"
00129                   "Position is absolute value of the date point." )
00130 
00131           .def ( "addTextRep", &PyCanvas::addTextRep,
00132                  "addTextRep ( Display, string ) -> None\n"
00133                  "\n"
00134                  "Adds textual data representation to display.  Use\n"
00135                  "Canvas.getTextRepTypes() to see available types." )
00136 
00137            .def ( "mouseData", &PyCanvas::mouseData,
00138                   return_value_policy < copy_const_reference > (),
00139                   "mouseData () -> tuple\n"
00140                   "\n"
00141                   "Returns a tuple of picked data." )
00142 
00143           .def ( "setPlotMatrix", &PyCanvas::setPlotMatrix,
00144                  "setPlotMatrix ( columns, rows ) -> None\n"
00145                  "\n"
00146                  "Sets the number of columns and "
00147                  "rows of plots for each page." )
00148 
00149           .def ( "swapOrientation", &PyCanvas::swapOrientation,
00150                  "swapOrientation ( ) -> None\n"
00151                  "\n"
00152                  "Swaps the canvas' orientation from portrait to landscape\n"
00153                  "or vice verse." )
00154 
00155           .def ( "getTextRepTypes", &PyCanvas::getTextRepTypes,
00156                  return_value_policy < copy_const_reference > (),
00157                  "getTextRepTypes () -> tuple\n"
00158                  "\n"
00159                  "Returns the types of textual data representations"
00160                  " available." )
00161 
00162           .def ( "clear", &PyCanvas::clear,
00163                  "clear () -> None\n"
00164                  "\n"
00165                  "Removes all items from the canvas" )
00166           
00167           .def ( "getX", &PyCanvas::getX,
00168                  "getX ( Display ) -> value\n"
00169                  "\n"
00170                  "Returns the X coordinate of the Display." )
00171 
00172           .def ( "getY", &PyCanvas::getY,
00173                  "getY ( Display ) -> value\n"
00174                  "\n"
00175                  "Returns the Y coordinate of the Display.  Note that Y=0 is\n"
00176                  "at the top and Y increases downward." )
00177 
00178           .def ( "setX", &PyCanvas::setX,
00179                  "setX ( Display, value ) -> None\n"
00180                  "\n"
00181                  "Sets the X coordinate of the Display" )
00182 
00183           .def ( "setY", &PyCanvas::setY,
00184                  "setY ( Display, value ) -> None\n"
00185                  "\n"
00186                  "Sets the Y coordinate of the Display.   Note that Y = 0 is\n"
00187                  "at the top and Y increases downward." )
00188 
00189           .def ( "getHeight", &PyCanvas::getHeight,
00190                  "getHeight ( Display ) -> value\n"
00191                  "\n"
00192                  "Returns the height of the Display." )
00193 
00194           .def ( "getWidth", &PyCanvas::getWidth,
00195                  "getWidth ( Display ) -> value\n"
00196                  "\n"
00197                  "Returns the width of the Display." )
00198 
00199           .def ( "setHeight", &PyCanvas::setHeight,
00200                  "setHeight ( Display, value ) -> None\n"
00201                  "\n"
00202                  "Sets the height of the Display." )
00203 
00204           .def ( "setWidth", &PyCanvas::setWidth,
00205                  "setWidth ( Display, value ) -> None\n"
00206                  "\n"
00207                  "Sets the width of the Display." )
00208          
00209           .def ( "getSelPickTable", &PyCanvas::getSelPickTable,
00210                  return_value_policy < reference_existing_object > (),
00211                  "getSelPickTable () -> NTuple\n"
00212                  "\n"
00213                  "Gets the pick table for selected Display." )
00214 
00215           .def ( "getPickTable", &PyCanvas::getPickTable,
00216                  return_value_policy < reference_existing_object > (),
00217                  "getPickTable ( Display ) -> NTuple\n"
00218                  "\n"
00219                  "Gets the pick table of the Display." )
00220 
00221            ;
00222 }
00223 
00224 } // namespace Python
00225 } // namespace hippodraw

Generated for HippoDraw Class Library by doxygen