SHAPER
9.12.0
|
This is the module custom presentation, which manage an AIS presentation, that can be filled by a feature and visualized in the viewer additionally to usual workshop objects. More...
Public Member Functions | |
PartSet_CustomPrs (ModuleBase_IWorkshop *theWorkshop) | |
Constructor. More... | |
bool | isActive (const ModuleBase_IModule::ModuleBase_CustomizeFlag &theFlag) |
Returns true if the presentation is active. More... | |
bool | activate (const FeaturePtr &theObject, const ModuleBase_IModule::ModuleBase_CustomizeFlag &theFlag, const bool theUpdateViewer) |
Initializes the operation presentation by the parameter object and display the presentation. More... | |
bool | deactivate (const ModuleBase_IModule::ModuleBase_CustomizeFlag &theFlag, const bool theUpdateViewer) |
Initializes the operation presentation by empty object and erase the presentation. More... | |
bool | redisplay (const ObjectPtr &theObject, const ModuleBase_IModule::ModuleBase_CustomizeFlag &theFlag, const bool theUpdateViewer) |
If the presentation is active[displayed], the shapes of the presentation is recomputed and the presentation is redisplayed. More... | |
void | clearPrs () |
Nullify all internal presentations. More... | |
void | disableCustomMode (ModuleBase_IModule::ModuleBase_CustomizeFlag theMode) |
Disable displaying of custom mode. More... | |
void | enableCustomModes () |
Enables disabled custom mode. More... | |
virtual void | processEvent (const std::shared_ptr< Events_Message > &theMessage) |
Redefinition of Events_Listener method to listen a moment that the presentation becomes empty. More... | |
virtual EVENTS_EXPORT bool | groupMessages () |
Listener that needs mostly grouped messages received returns true in this method. More... | |
Static Public Member Functions | |
static const std::string | OPERATION_PARAMETER_COLOR () |
Returns yellow color. More... | |
static const std::string | OPERATION_RESULT_COLOR () |
Returns green color. More... | |
static const std::string | OPERATION_HIGHLIGHT_COLOR () |
Returns color between white and color of highlight. More... | |
static const std::string | OPERATION_REMOVE_FEATURE_COLOR () |
Returns color lighter than sketch feature entity : pink. More... | |
static const std::string | OPERATION_SKETCH_PLANE () |
Returns color equal to default color of construction plugin : green. More... | |
Protected Member Functions | |
void | groupWhileFlush (const std::shared_ptr< Events_Message > &theMessage) |
Allows to group messages while they are flushed (for flush for groupMessages=true listeners) More... | |
EVENTS_EXPORT void | flushGrouped (const Events_ID &theID) |
Sends myGroups on flush finish. More... | |
This is the module custom presentation, which manage an AIS presentation, that can be filled by a feature and visualized in the viewer additionally to usual workshop objects.
PartSet_CustomPrs::PartSet_CustomPrs | ( | ModuleBase_IWorkshop * | theWorkshop | ) |
Constructor.
theWorkshop | a reference to workshop |
|
inlinestatic |
Returns yellow color.
|
inlinestatic |
Returns green color.
|
inlinestatic |
Returns color between white and color of highlight.
|
inlinestatic |
Returns color lighter than sketch feature entity : pink.
|
inlinestatic |
Returns color equal to default color of construction plugin : green.
bool PartSet_CustomPrs::isActive | ( | const ModuleBase_IModule::ModuleBase_CustomizeFlag & | theFlag | ) |
Returns true if the presentation is active.
theFlag | an object AIS presentation type |
bool PartSet_CustomPrs::activate | ( | const FeaturePtr & | theObject, |
const ModuleBase_IModule::ModuleBase_CustomizeFlag & | theFlag, | ||
const bool | theUpdateViewer | ||
) |
Initializes the operation presentation by the parameter object and display the presentation.
theObject | an operation feature source to fill the presentation |
theFlag | an object AIS presentation type |
theUpdateViewer | the parameter whether the viewer should be update immediatelly |
bool PartSet_CustomPrs::deactivate | ( | const ModuleBase_IModule::ModuleBase_CustomizeFlag & | theFlag, |
const bool | theUpdateViewer | ||
) |
Initializes the operation presentation by empty object and erase the presentation.
theUpdateViewer | the parameter whether the viewer should be update immediatelly |
theFlag | an object AIS presentation type |
bool PartSet_CustomPrs::redisplay | ( | const ObjectPtr & | theObject, |
const ModuleBase_IModule::ModuleBase_CustomizeFlag & | theFlag, | ||
const bool | theUpdateViewer | ||
) |
If the presentation is active[displayed], the shapes of the presentation is recomputed and the presentation is redisplayed.
theObject | an object to redisplay |
theFlag | an object AIS presentation type |
theUpdateViewer | the parameter whether the viewer should be update immediatelly |
void PartSet_CustomPrs::clearPrs | ( | ) |
Nullify all internal presentations.
For example, it can be useful when the viewer/context is closed. If this is not performed and the presentation is assigned in another context, it caused erroneus case because the presentation has linkage to the previous context.
|
inline |
Disable displaying of custom mode.
theMode | a mode to disable |
|
inline |
Enables disabled custom mode.
|
virtual |
Redefinition of Events_Listener method to listen a moment that the presentation becomes empty.
store state to analize it after display/erase is finished
Implements Events_Listener.
|
inlinevirtualinherited |
Listener that needs mostly grouped messages received returns true in this method.
In this case during the message is flushed, all the new messages are grouped, not sended immideately and then sent in the end of flush.
Reimplemented in SketchSolver_Manager, and SketchPlugin_OverConstraintsResolver.
|
protectedinherited |
Allows to group messages while they are flushed (for flush for groupMessages=true listeners)
|
protectedinherited |
Sends myGroups on flush finish.