|
||||
File indexing completed on 2025-01-18 09:28:09
0001 // -*- C++ -*- 0002 // AID-GENERATED 0003 // ========================================================================= 0004 // This class was generated by AID - Abstract Interface Definition 0005 // DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it. 0006 // ========================================================================= 0007 #ifndef AIDA_IPLOTTER_H 0008 #define AIDA_IPLOTTER_H 1 0009 0010 // This file is part of the AIDA library 0011 // Copyright (C) 2002 by the AIDA team. All rights reserved. 0012 // This library is free software and under the terms of the 0013 // GNU Library General Public License described in the LGPL.txt 0014 0015 #include <string> 0016 #include <vector> 0017 0018 namespace AIDA { 0019 0020 class IPlotterRegion; 0021 class ITitleStyle; 0022 0023 /** 0024 * User level interface to plotter. 0025 * 0026 * This IPlotter interface assumes the handling of 0027 * multiple plotting regions. Then the IPlotter should 0028 * be seen as a "page" managing multiple drawing region. 0029 * It assumes that a "current" region mechanism is used. 0030 * 0031 * The keyword "region" is borrowed from the OpenInventor 0032 * terminology (viewing region). 0033 * 0034 * See also the IPlotterRegion for more comments. 0035 * 0036 * @author The AIDA team (http://aida.freehep.org/) 0037 * 0038 */ 0039 0040 class IPlotter { 0041 0042 public: 0043 /// Destructor. 0044 virtual ~IPlotter() { /* nop */; } 0045 0046 /** 0047 * Region management methods. 0048 */ 0049 0050 /** 0051 * Create a new region. 0052 * @param x, y, w, h Position and size in normal coordinates 0053 * that is to say between 0 and 1. 0054 * Then a region with (x=0,y=0,w=1,h=1) maps 0055 * the full page. "x" goes left to right. "y" bottom 0056 * to top. 0057 * @return The newly created region. Return null in case not failure. 0058 * Note that the plotter manages the regions ; user does not 0059 * have to delete a region object directly. 0060 */ 0061 virtual IPlotterRegion * createRegion(double x = 0, double y = 0, double w = 1.0, double h = 1.0) = 0; 0062 0063 /** 0064 * Create a grid of regions. 0065 * By default the current region is the top left one (with index 0). 0066 * Region are indexed from zero, with increasing order 0067 * left to right, top to bottom. 0068 * @param index Set the current region. 0069 */ 0070 virtual bool createRegions(int columns = 1, int rows = 1, int index = 0) = 0; 0071 0072 /** 0073 * @return The current region. 0074 */ 0075 virtual IPlotterRegion & currentRegion() const = 0; 0076 0077 /** 0078 * @return The current region index. 0079 */ 0080 virtual int currentRegionNumber() const = 0; 0081 0082 /** 0083 * @return The number of regions. 0084 */ 0085 virtual int numberOfRegions() const = 0; 0086 0087 /** 0088 * Set current region by giving its index [0,n-1] 0089 */ 0090 virtual bool setCurrentRegionNumber(int index) = 0; 0091 0092 /** 0093 * Set current region to be the "next" one. 0094 * If exceeding the number of regions, 0095 * the current region index return to 0. 0096 * @return The new current region. 0097 */ 0098 virtual IPlotterRegion & next() = 0; 0099 0100 /** 0101 * @return A region, knowing its index. 0102 */ 0103 virtual IPlotterRegion * region(int index) const = 0; 0104 0105 /** 0106 * Destroy regions. 0107 */ 0108 virtual void destroyRegions() = 0; 0109 0110 /** 0111 * Clear all regions. It does not reset the number 0112 * and position of regions. This can be done through 0113 * a destroyRegions. 0114 */ 0115 virtual void clearRegions() = 0; 0116 0117 /* 0118 * Set various plotting paramters for the whole page. 0119 * Activate the graphic layer and update the screen window(s) 0120 * if needed. 0121 */ 0122 virtual bool setParameter(const std::string & parameter, const std::string & options = "") = 0; 0123 0124 /** 0125 * Get value of a parameter. 0126 * @param paramName Name of the parameter. 0127 * @return the value. 0128 */ 0129 virtual std::string parameterValue(const std::string & parameter) const = 0; 0130 0131 virtual std::vector<std::string> availableParameterOptions(const std::string & parameter) const = 0; 0132 0133 virtual std::vector<std::string> availableParameters() const = 0; 0134 0135 /* 0136 * GUI related methods : 0137 */ 0138 0139 /** 0140 * Map the plotter on the screen. 0141 */ 0142 virtual bool show() = 0; 0143 0144 /** 0145 * Refresh the screen window(s). 0146 * Used when a plotted data analysis object 0147 * received new data. 0148 */ 0149 virtual bool refresh() = 0; 0150 0151 /** 0152 * Unmap the plotter on the screen. 0153 */ 0154 virtual bool hide() = 0; 0155 0156 /** 0157 * Give control to the plotter GUI. The plotter must be able 0158 * to return from this function from a user action in its GUI. 0159 */ 0160 virtual bool interact() = 0; 0161 0162 /* 0163 * Other methods. 0164 */ 0165 0166 /** 0167 * Produce an output file. 0168 * @param type A string to describe the type of the output : 0169 * "PS" or "PostScript" for PostScript, "JPEG" for JPEG. 0170 * If nothing is given, the type is guessed 0171 * from the given file name suffix (.ps for PostScript, 0172 * .jpg for JPEG, etc...). 0173 */ 0174 virtual bool writeToFile(const std::string & filename, const std::string & type = "") = 0; 0175 0176 /** 0177 * Set the global title of the plotter (page). 0178 */ 0179 virtual void setTitle(const std::string & title) = 0; 0180 0181 /** 0182 * Get/set title style. 0183 */ 0184 virtual ITitleStyle & titleStyle() = 0; 0185 0186 virtual void setTitleStyle(const ITitleStyle & style) = 0; 0187 }; // class 0188 } // namespace AIDA 0189 #endif /* ifndef AIDA_IPLOTTER_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |