Implementation of Client built for user scripting (non-GUI) user interface. More...
#include <ClientScript.h>
Public Member Functions | |
ClientScript (PlotMSApp *app, Plotter::Implementation impl=Plotter::DEFAULT) | |
virtual | ~ClientScript () |
virtual bool | isActionEnabled (PlotMSAction::Type type) const |
Returns whether or not the user can invoke a particular action. | |
virtual vector< PlotMSPlot * > | getCurrentPlots () const |
Return the current client plot. | |
virtual vector< vector < PMS::Axis > > | getSelectedLoadAxes () const |
Retrieve the plot load axes the user has specified. | |
virtual vector< vector < PMS::Axis > > | getSelectedReleaseAxes () const |
Retrieve the release axes the user has specified. | |
virtual PlotMSFlagging | getFlagging () const |
Retrieve flagging information specified by the client. | |
virtual void | setFlagging (PlotMSFlagging flag) |
Flagging. | |
virtual bool | isInteractive () const |
Return whether the client is interactive (a GUI) or noninteractive (a script). | |
virtual bool | exportPlot (const PlotExportFormat &format, const bool async) |
Save the current plot to a file. | |
virtual void | showError (const String &message, const String &title, bool warning) |
Display an error in a client dependent way. | |
virtual void | showMessage (const String &message, const String &title, bool warning=false) |
Display a message. | |
virtual void | clearMessage () |
only for GUI client | |
virtual void | canvasAdded (PlotCanvasPtr &) |
Add a plot to those displayed. | |
virtual void | setOperationCompleted (bool completed) |
virtual void | doThreadedOperation (ThreadController *) |
The client is responsible for doing threaded operations. | |
virtual ThreadController * | getThreadController (PlotMSAction::Type type, PMSPTMethod postThreadMethod=NULL, PlotMSPlot *postThreadObject=NULL, int index=0) |
FactoryMethod for producing a thread controller to manage a specific type of threaded operation. | |
virtual bool | plot () |
virtual void | showGUI (bool show=true) |
virtual int | execLoop () |
virtual bool | guiShown () const |
virtual bool | close () |
virtual bool | isDrawing () const |
virtual bool | isClosed () const |
virtual void | gridSizeChanged (int, int) |
virtual vector< String > | getFiles () const |
Return a list of files loaded in the client. | |
Private Member Functions | |
void | initializeCurrentPlot () |
void | initialize (Plotter::Implementation impl) |
Private Attributes | |
PlotMSApp * | plotController |
PlotMSFlagging | flagging |
vector< PlotMSPlot * > | currentPlots |
const String | SCRIPT_CLIENT |
Implementation of Client built for user scripting (non-GUI) user interface.
Definition at line 43 of file ClientScript.h.
casa::ClientScript::ClientScript | ( | PlotMSApp * | app, | |
Plotter::Implementation | impl = Plotter::DEFAULT | |||
) |
virtual casa::ClientScript::~ClientScript | ( | ) | [virtual] |
virtual void casa::ClientScript::canvasAdded | ( | PlotCanvasPtr & | ) | [inline, virtual] |
Add a plot to those displayed.
Implements casa::Client.
Definition at line 92 of file ClientScript.h.
virtual void casa::ClientScript::clearMessage | ( | ) | [inline, virtual] |
virtual bool casa::ClientScript::close | ( | ) | [inline, virtual] |
Implements casa::Client.
Definition at line 123 of file ClientScript.h.
virtual void casa::ClientScript::doThreadedOperation | ( | ThreadController * | ) | [inline, virtual] |
The client is responsible for doing threaded operations.
For a GUI client this will involve starting a background thread so that the GUI is not frozen. For a script client, this may be a no-opt as the script can just wait for the operation to complete.
Implements casa::Client.
Definition at line 102 of file ClientScript.h.
virtual int casa::ClientScript::execLoop | ( | ) | [inline, virtual] |
Implements casa::Client.
Definition at line 117 of file ClientScript.h.
References casa::Client::itsFactory_.
virtual bool casa::ClientScript::exportPlot | ( | const PlotExportFormat & | format, | |
const bool | async | |||
) | [virtual] |
Save the current plot to a file.
Implements casa::Client.
virtual vector<PlotMSPlot*> casa::ClientScript::getCurrentPlots | ( | ) | const [virtual] |
Return the current client plot.
Implements casa::Client.
virtual vector<String> casa::ClientScript::getFiles | ( | ) | const [virtual] |
Return a list of files loaded in the client.
Implements casa::Client.
virtual PlotMSFlagging casa::ClientScript::getFlagging | ( | ) | const [virtual] |
Retrieve flagging information specified by the client.
Implements casa::Client.
virtual vector<vector<PMS::Axis> > casa::ClientScript::getSelectedLoadAxes | ( | ) | const [virtual] |
Retrieve the plot load axes the user has specified.
Implements casa::Client.
virtual vector<vector<PMS::Axis> > casa::ClientScript::getSelectedReleaseAxes | ( | ) | const [virtual] |
Retrieve the release axes the user has specified.
Implements casa::Client.
virtual ThreadController* casa::ClientScript::getThreadController | ( | PlotMSAction::Type | type, | |
PMSPTMethod | postThreadMethod = NULL , |
|||
PlotMSPlot * | postThreadObject = NULL , |
|||
int | index = 0 | |||
) | [virtual] |
FactoryMethod for producing a thread controller to manage a specific type of threaded operation.
Examples include caching, exporting a plot, and drawing.
Implements casa::Client.
virtual void casa::ClientScript::gridSizeChanged | ( | int | , | |
int | ||||
) | [virtual] |
Implements casa::Client.
virtual bool casa::ClientScript::guiShown | ( | ) | const [inline, virtual] |
Implements casa::Client.
Definition at line 120 of file ClientScript.h.
void casa::ClientScript::initialize | ( | Plotter::Implementation | impl | ) | [private] |
void casa::ClientScript::initializeCurrentPlot | ( | ) | [private] |
virtual bool casa::ClientScript::isActionEnabled | ( | PlotMSAction::Type | type | ) | const [virtual] |
Returns whether or not the user can invoke a particular action.
Implements casa::Client.
virtual bool casa::ClientScript::isClosed | ( | ) | const [inline, virtual] |
Implements casa::Client.
Definition at line 129 of file ClientScript.h.
virtual bool casa::ClientScript::isDrawing | ( | ) | const [inline, virtual] |
Implements casa::Client.
Definition at line 126 of file ClientScript.h.
virtual bool casa::ClientScript::isInteractive | ( | ) | const [virtual] |
Return whether the client is interactive (a GUI) or noninteractive (a script).
Implements casa::Client.
virtual bool casa::ClientScript::plot | ( | ) | [virtual] |
Implements casa::Client.
virtual void casa::ClientScript::setFlagging | ( | PlotMSFlagging | flag | ) | [virtual] |
Flagging.
Implements casa::Client.
virtual void casa::ClientScript::setOperationCompleted | ( | bool | completed | ) | [virtual] |
Reimplemented from casa::Client.
virtual void casa::ClientScript::showError | ( | const String & | message, | |
const String & | title, | |||
bool | warning | |||
) | [virtual] |
Display an error in a client dependent way.
For a GUI, this may mean popping up a dialog; for a script, this may mean writing the error to a log file or web log.
Implements casa::Client.
virtual void casa::ClientScript::showGUI | ( | bool | show = true |
) | [virtual] |
Implements casa::Client.
virtual void casa::ClientScript::showMessage | ( | const String & | message, | |
const String & | title, | |||
bool | warning = false | |||
) | [virtual] |
Display a message.
For a GUI client, this may mean popping up a dialog; for a script client, this may mean writing the message to a log file or a web log.
Implements casa::Client.
vector<PlotMSPlot*> casa::ClientScript::currentPlots [private] |
Definition at line 141 of file ClientScript.h.
PlotMSFlagging casa::ClientScript::flagging [private] |
Definition at line 140 of file ClientScript.h.
PlotMSApp* casa::ClientScript::plotController [private] |
Definition at line 139 of file ClientScript.h.
const String casa::ClientScript::SCRIPT_CLIENT [private] |
Definition at line 143 of file ClientScript.h.