C++ API Reference
|
Panel state information setting and retrieval. More...
#include <MPanelCanvasInfo.h>
Public Member Functions | |
MPanelCanvasInfo (const MString &editorName, MStatus *stat=NULL) | |
The constructor. More... | |
virtual | ~MPanelCanvasInfo () |
Destructor. | |
MStatus | getViewportBounds (double &left, double &right, double &bottom, double &top) const |
Return the viewport bounds. More... | |
MStatus | getViewportBounds (MDoubleArray &boundsArray) const |
Get the attached Graph Editor's viewport bounds, using the currently defined animation time units. More... | |
MStatus | getViewportSize (int &width, int &height) const |
Return the viewport size. More... | |
MStatus | setViewportBounds (double left, double right, double bottom, double top) const |
Set the viewport bounds. More... | |
MStatus | setViewportBounds (const MDoubleArray &boundsArray) const |
Set the attached Graph Editor's viewport bounds to those that are supplied using the currently defined animation time units as seen in the viewport. More... | |
bool | supportsUIDrawing () |
Returns whether the attached panel control supports drawing primitives in screen space. More... | |
void | reset () |
Resets all stored state information to be empty, thereby detaching from the currently attached Graph Editor (if any) | |
MString | name () const |
Return the name of the currently attached panel. More... | |
Static Public Member Functions | |
static const char * | className () |
Returns the name of this class. More... | |
Friends | |
class | MGraphEditorInfo |
Panel state information setting and retrieval.
This class provides methods for setting and retrieving common information for all supported panels. Currently, the Graph Editor is the only supported editor.
MPanelCanvasInfo | ( | const MString & | editorName, |
MStatus * | ReturnStatus = NULL |
||
) |
The constructor.
Constructor.
A valid panel control name is required. For example, the panel control name of the default Graph Editor is "graphEditor1GraphEd".
Attaches to the Graph Editor corresponding the supplied name.
[in] | editorName | the name of the Graph Editor (i.e. graphEditor1GraphEd) |
[out] | ReturnStatus | the return status |
MStatus getViewportBounds | ( | double & | left, |
double & | right, | ||
double & | bottom, | ||
double & | top | ||
) | const |
Return the viewport bounds.
Get the attached Graph Editor's viewport bounds, using the currently defined animation time units.
Note: a viewport that is displaying stacked curves or re-normalized curves uses a different vertical axis scale.
[out] | left | left co-ordinate |
[out] | right | right co-ordinate |
[out] | bottom | bottom co-ordinate |
[out] | top | top co-ordinate |
MStatus getViewportBounds | ( | MDoubleArray & | boundsArray | ) | const |
Get the attached Graph Editor's viewport bounds, using the currently defined animation time units.
Note: a viewport that is displaying stacked curves or re-normalized curves uses a different vertical axis scale.
[out] | boundsArray | an array of four doubles representing in order: (left, right, bottom, top) bounds co-ordinates |
MStatus getViewportSize | ( | int & | width, |
int & | height | ||
) | const |
Return the viewport size.
Get the attached Graph Editor's viewport size, excluding the time line.
[out] | width | width of viewport |
[out] | height | height of viewport |
MStatus setViewportBounds | ( | double | left, |
double | right, | ||
double | bottom, | ||
double | top | ||
) | const |
Set the viewport bounds.
Set the attached Graph Editor's viewport bounds to those that are supplied using the currently defined animation time units as seen in the viewport.
Note: a viewport that is displaying stacked curves or re-normalized curves is not currently supported.
[in] | left | left co-ordinate |
[in] | right | right co-ordinate |
[in] | bottom | bottom co-ordinate |
[in] | top | top co-ordinate |
MStatus setViewportBounds | ( | const MDoubleArray & | boundsArray | ) | const |
Set the attached Graph Editor's viewport bounds to those that are supplied using the currently defined animation time units as seen in the viewport.
Note: a viewport that is displaying stacked curves or re-normalized curves is not currently supported.
[in] | boundsArray | an array of exactly four doubles representing in order: (left, right, bottom, top) bounds co-ordinates |
bool supportsUIDrawing | ( | ) |
Returns whether the attached panel control supports drawing primitives in screen space.
If such drawing is not supported, the registerDrawUICallback () method will return MStatus::kNotImplemented.
Note that for the Graph Editor, if the panel for drawing has not yet been created (e.g., when the default Graph Editor has not yet been opened), this method will return false.
Note that the Graph Editor will return false if it exists, but the panel for drawing has not yet been created (e.g., for the default Graph Editor when it has not yet been opened, but exists by default).
MString name | ( | ) | const |
Return the name of the currently attached panel.
Returns the name of the currently attached Graph Editor (if any)
|
static |
Returns the name of this class.