Python interface module for SALOME GUI. More...
#include <SALOMEGUI_Swig.hxx>
Public Member Functions | |
SALOMEGUI_Swig () | |
Constructor. More... | |
~SALOMEGUI_Swig () | |
Destructor. More... | |
bool | hasDesktop () |
Check GUI availability. More... | |
void | updateObjBrowser (bool) |
Update active study's Object Browser. More... | |
int | getActiveStudyId () |
Get active study identifier. More... | |
const char * | getActiveStudyName () |
Get active study name. More... | |
const char * | getComponentName (const char *) |
Get name of the component by its title (user name) More... | |
const char * | getComponentUserName (const char *) |
Get title (user name) of the component by its name. More... | |
int | SelectedCount () |
Get number of selected items. More... | |
const char * | getSelected (int i) |
Get entry of the specified selected item. More... | |
void | AddIObject (const char *) |
Add an object to the current selection. More... | |
void | RemoveIObject (const char *) |
Remove the object from the selection. More... | |
void | ClearIObjects () |
Clear selection (unselect all objects). More... | |
void | Display (const char *) |
Display an object in the current view window. More... | |
void | DisplayOnly (const char *) |
Displays an object in the current view window and erases all other ones. More... | |
void | Erase (const char *) |
Erase an object in the current view window. More... | |
void | DisplayAll () |
Display all active module's presentable child objects in the current view window. More... | |
void | EraseAll () |
Erase all objects from the current view window. More... | |
bool | IsInCurrentView (const char *) |
Check it the object is displayed in the current view window. More... | |
void | UpdateView () |
Update (repaint) current view window. More... | |
void | FitAll () |
Fit current view window to display all its contents. More... | |
void | ResetView () |
Reset current view window to the default state. More... | |
void | ViewTop () |
Switch current view window to show the top view. More... | |
void | ViewBottom () |
Switch current view window to show the bottom view. More... | |
void | ViewLeft () |
Switch current view window to show the left view. More... | |
void | ViewRight () |
Switch current view window to show the right view. More... | |
void | ViewFront () |
Switch current view window to show the front view. More... | |
void | ViewBack () |
Switch current view window to show the back view. More... | |
const char * | getViewParameters () |
void | setCameraPosition (double x, double y, double z) |
Set camera position of the active view . More... | |
void | setCameraFocalPoint (double x, double y, double z) |
Set camera focal point of the active view. More... | |
void | setCameraViewUp (double x, double y, double z) |
Set the view up direction for the camera. More... | |
void | setViewScale (double parallelScale, double x, double y, double z) |
Set view scale. More... | |
This module provides an access to the SALOME GUI implementing set of functions which can be used from Python. This module is implemented using SWIG wrappings for some GUI functionality:
Instance of this class is created every time "import salome" line is typed
SALOME GUI (desktop and other objects) is only available in SALOME_Session_Server. It means that it can not be accessed from the external Python console.
The usage in Python:
SALOMEGUI_Swig::SALOMEGUI_Swig | ( | ) |
SALOMEGUI_Swig::~SALOMEGUI_Swig | ( | ) |
void SALOMEGUI_Swig::AddIObject | ( | const char * | theEntry | ) |
theEntry | object entry |
References getApplication(), myEntry, ProcessVoidEvent(), SALOME_InteractiveObject(), and LightApp_SelectionMgr::setSelectedObjects().
void SALOMEGUI_Swig::ClearIObjects | ( | ) |
References SUIT_SelectionMgr::clearSelected(), getApplication(), and ProcessVoidEvent().
void SALOMEGUI_Swig::Display | ( | const char * | theEntry | ) |
The presentable object should be previously created and displayed in this viewer.
theEntry | object entry |
References LightApp_Study::children(), LightApp_Study::componentDataType(), LightApp_Displayer::Display(), LightApp_Displayer::FindDisplayer(), getActiveStudy(), getApplication(), LightApp_Study::isComponent(), CAM_Application::moduleTitle(), myEntry, ProcessVoidEvent(), and LightApp_Study::referencedToEntry().
void SALOMEGUI_Swig::DisplayAll | ( | ) |
The presentable objects should be previously created and displayed in this viewer.
References LightApp_Study::centry(), LightApp_Study::children(), LightApp_Study::components(), LightApp_Displayer::Display(), LightApp_Displayer::FindDisplayer(), getActiveStudy(), getApplication(), CAM_Application::moduleTitle(), ProcessVoidEvent(), and LightApp_Study::referencedToEntry().
void SALOMEGUI_Swig::DisplayOnly | ( | const char * | theEntry | ) |
The presentable object should be previously created and displayed in this viewer.
theEntry | object entry |
References LightApp_Study::children(), LightApp_Study::componentDataType(), LightApp_Study::components(), LightApp_Displayer::Display(), LightApp_Displayer::EraseAll(), LightApp_Displayer::FindDisplayer(), getActiveStudy(), getApplication(), LightApp_Study::isComponent(), CAM_Application::moduleTitle(), myEntry, ProcessVoidEvent(), and LightApp_Study::referencedToEntry().
void SALOMEGUI_Swig::Erase | ( | const char * | theEntry | ) |
The presentable object should be previously created and displayed in this viewer.
theEntry | object entry |
References LightApp_Study::children(), LightApp_Study::componentDataType(), LightApp_Displayer::Erase(), LightApp_Displayer::FindDisplayer(), getActiveStudy(), getApplication(), LightApp_Study::isComponent(), CAM_Application::moduleTitle(), myEntry, ProcessVoidEvent(), and LightApp_Study::referencedToEntry().
void SALOMEGUI_Swig::EraseAll | ( | ) |
void SALOMEGUI_Swig::FitAll | ( | ) |
References SUIT_ViewManager::getActiveView(), getApplication(), and ProcessVoidEvent().
int SALOMEGUI_Swig::getActiveStudyId | ( | ) |
References ProcessEvent().
const char * SALOMEGUI_Swig::getActiveStudyName | ( | ) |
References ProcessEvent().
componentUserName | component title (user name) |
References ProcessEvent().
componentName | component name |
References ProcessEvent().
const char * SALOMEGUI_Swig::getSelected | ( | int | index | ) |
index | selected object index |
References ProcessEvent().
const char * SALOMEGUI_Swig::getViewParameters | ( | ) |
References ProcessEvent().
bool SALOMEGUI_Swig::hasDesktop | ( | ) |
true
if GUI is available References ProcessEvent().
bool SALOMEGUI_Swig::IsInCurrentView | ( | const char * | theEntry | ) |
VSR: For the current moment implemented for OCC and VTK viewers only.
theEntry | object entry |
true
if the object with given entry is displayed in the current viewer References ProcessEvent().
void SALOMEGUI_Swig::RemoveIObject | ( | const char * | theEntry | ) |
theEntry | object entry |
References getApplication(), myEntry, ProcessVoidEvent(), SALOME_InteractiveObject(), LightApp_SelectionMgr::selectedObjects(), and LightApp_SelectionMgr::setSelectedObjects().
void SALOMEGUI_Swig::ResetView | ( | ) |
References SUIT_ViewManager::getActiveView(), getApplication(), and ProcessVoidEvent().
int SALOMEGUI_Swig::SelectedCount | ( | ) |
References ProcessEvent().
void SALOMEGUI_Swig::setCameraFocalPoint | ( | double | x, |
double | y, | ||
double | z | ||
) |
x | - X coordinate of the focal point |
y | - Y coordinate of the focal point |
z | - Z coordinate of the focal point |
References __CameraFocalPoint, and setViewParameter().
void SALOMEGUI_Swig::setCameraPosition | ( | double | x, |
double | y, | ||
double | z | ||
) |
x | - X coordinate of the camera |
y | - Y coordinate of the camera |
z | - Z coordinate of the camera |
References __CameraPosition, and setViewParameter().
void SALOMEGUI_Swig::setCameraViewUp | ( | double | x, |
double | y, | ||
double | z | ||
) |
x | - X component of the direction vector |
y | - Y component of the direction vector |
z | - Z component of the direction vector |
References __CameraViewUp, and setViewParameter().
void SALOMEGUI_Swig::setViewScale | ( | double | parallelScale, |
double | x, | ||
double | y, | ||
double | z | ||
) |
parallelScale | - scaling used for a parallel projection. |
x | - X scale |
y | - Y scale |
z | - Z scale |
References __ViewScale, and setViewParameter().
void SALOMEGUI_Swig::updateObjBrowser | ( | bool | ) |
updateSelection | this parameter is obsolete |
References getApplication(), and ProcessVoidEvent().
void SALOMEGUI_Swig::UpdateView | ( | ) |
void SALOMEGUI_Swig::ViewBack | ( | ) |
References __ViewBack, and setView().
void SALOMEGUI_Swig::ViewBottom | ( | ) |
References __ViewBottom, and setView().
void SALOMEGUI_Swig::ViewFront | ( | ) |
References __ViewFront, and setView().
void SALOMEGUI_Swig::ViewLeft | ( | ) |
References __ViewLeft, and setView().
void SALOMEGUI_Swig::ViewRight | ( | ) |
References __ViewRight, and setView().