#include <gcugtk/spectrumview.h>
Public Member Functions |
| SpectrumView (SpectrumDocument *pDoc) |
| Constructor.
|
virtual | ~SpectrumView () |
| Destructor.
|
void | SetAxisBounds (GogAxisType target, double min, double max, bool inverted) |
void | SetAxisLabel (GogAxisType target, char const *unit) |
void | ShowAxis (GogAxisType target, bool show) |
void | InvertAxis (GogAxisType target, bool inverted) |
void | Render (cairo_t *cr, double width, double height) |
void | OnMinChanged () |
void | OnYMinChanged () |
void | OnMaxChanged () |
void | OnYMaxChanged () |
void | OnXRangeChanged () |
void | OnYRangeChanged () |
GogSeries * | NewSeries (bool new_plot) |
void | SaveAsImage (std::string const &filename, char const *mime_type, unsigned width, unsigned height) const |
void | AddToOptionBox (GtkWidget *w) |
void | DestroyExtraWidget () |
SpectrumDocument * | GetDoc (void) const |
GtkWidget * | GetWidget (void) const |
GtkWidget * | GetOptionBox (void) const |
GogSeries * | GetSeries (void) const |
int | GetWidth (void) const |
int | GetHeight (void) const |
Detailed Description
The view class used for spectra. This API is still quite unstable and might change in the future.
Definition at line 38 of file spectrumview.h.
Constructor & Destructor Documentation
Constructor.
- Parameters
-
Creates a view for the document.
virtual gcugtk::SpectrumView::~SpectrumView |
( |
| ) |
|
|
virtual |
Member Function Documentation
void gcugtk::SpectrumView::AddToOptionBox |
( |
GtkWidget * |
w | ) |
|
- Parameters
-
w | the widget to add to the view. |
Adds a widget to display more options to the view.
void gcugtk::SpectrumView::DestroyExtraWidget |
( |
| ) |
|
Destroys any widget that might have been added to the view using AddToOptionBox().
gcugtk::SpectrumView::GetDoc |
( |
void |
| ) |
const |
|
inline |
gcugtk::SpectrumView::GetHeight |
( |
void |
| ) |
const |
|
inline |
gcugtk::SpectrumView::GetOptionBox |
( |
void |
| ) |
const |
|
inline |
- Returns
- a GtkBox to which an optional user interface might be added.
Definition at line 178 of file spectrumview.h.
gcugtk::SpectrumView::GetSeries |
( |
void |
| ) |
const |
|
inline |
- Returns
- the first GogSeries* created for the view.
Definition at line 182 of file spectrumview.h.
gcugtk::SpectrumView::GetWidget |
( |
void |
| ) |
const |
|
inline |
- Returns
- the widget used to display the spectrum.
Definition at line 174 of file spectrumview.h.
gcugtk::SpectrumView::GetWidth |
( |
void |
| ) |
const |
|
inline |
void gcugtk::SpectrumView::InvertAxis |
( |
GogAxisType |
target, |
|
|
bool |
inverted |
|
) |
| |
- Parameters
-
target | an axis type. |
inverted | whether to invert the axis scale or not |
Used to invert the first axis of either GOG_AXIS_X or GOG_AXIS_Y types.
GogSeries* gcugtk::SpectrumView::NewSeries |
( |
bool |
new_plot | ) |
|
- Parameters
-
new_plot | if true, a new plot is created (this is not yet implemented). Creates a new GogSeries for the chart. |
void gcugtk::SpectrumView::OnMaxChanged |
( |
| ) |
|
Called by the framework if the maximum has changed for the x-axis.
void gcugtk::SpectrumView::OnMinChanged |
( |
| ) |
|
Called by the framework if the minimum has changed for the x-axis.
void gcugtk::SpectrumView::OnXRangeChanged |
( |
| ) |
|
Called by the framework if the range has changed for the x-axis.
void gcugtk::SpectrumView::OnYMaxChanged |
( |
| ) |
|
Called by the framework if the maximum has changed for the y-axis.
void gcugtk::SpectrumView::OnYMinChanged |
( |
| ) |
|
Called by the framework if the minimum has changed for the y-axis.
void gcugtk::SpectrumView::OnYRangeChanged |
( |
| ) |
|
Called by the framework if the range has changed for the y-axis.
void gcugtk::SpectrumView::Render |
( |
cairo_t * |
cr, |
|
|
double |
width, |
|
|
double |
height |
|
) |
| |
- Parameters
-
cr | the cairo_t* to which render. |
width | the width of the rendering area. |
height | the height of the rendering area. |
Renders the chart to cr.
void gcugtk::SpectrumView::SaveAsImage |
( |
std::string const & |
filename, |
|
|
char const * |
mime_type, |
|
|
unsigned |
width, |
|
|
unsigned |
height |
|
) |
| const |
- Parameters
-
filename | the name of the file. |
mime_type | the requested mime type. |
width | the width of the generated image. |
height | the height of the generated image. |
Export the view contents as an image. The size of the new image is defined by the width and height parameters. Supported ilage file format include svg, png, jpeg, ps, eps, and pdf, and possibly a few other bitmap formats.
void gcugtk::SpectrumView::SetAxisBounds |
( |
GogAxisType |
target, |
|
|
double |
min, |
|
|
double |
max, |
|
|
bool |
inverted |
|
) |
| |
- Parameters
-
target | an axis type. |
min | the mimimum value to show. |
max | the maximum value to show. |
inverted | whether to invert the axis. |
Sets the scale of the first axis of the selected type.
void gcugtk::SpectrumView::SetAxisLabel |
( |
GogAxisType |
target, |
|
|
char const * |
unit |
|
) |
| |
- Parameters
-
target | an axis type. |
unit | a text (might be a unit). |
Sets the text for the label of the first axis of the selected type.
void gcugtk::SpectrumView::ShowAxis |
( |
GogAxisType |
target, |
|
|
bool |
show |
|
) |
| |
- Parameters
-
target | an axis type. |
show | whether to show the axis or not |
Used to show or hide the first axis of either GOG_AXIS_X or GOG_AXIS_Y types.
The documentation for this class was generated from the following file: