As the mouse moves over entities in the graphics window, entities valid for selection are highlighted. Before an entity is highlighted, Fusion determines if it is a valid selectable entity using the selection filter defined on the SelectionCommandInput and the preSelect event of the command. The preSelectStart event fires when the mouse first moves over an entity valid for selection. You can obtain the entity and mouse position from the Selection object returned by the selection property of the SelectionEventArgs object provided through the event.
Some related events are the preSelectMouseMove event, which fires as the mouse moves across the entity, and the preSelectEnd event, which fires when the mouse moves off the entity.
-------- Import ---------
-------- Global variables ---------
-------- Connect the handler to the event. ---------
-------- Event handler function definition ---------
|
-------- Global variables ---------
-------- Connect the handler to the event. ---------
-------- Event handler class definition ---------
|
--------- Required include files. ---------
--------- Event handler class definition and global declaration. ---------
class MyPreSelectStartEventHandler : public adsk::core::SelectionEventHandler { public: void notify(const Ptr<SelectionEventArgs>& eventArgs) override { // Code to react to the event. ui->messageBox("In MyPreSelectStartEventHandler event handler."); } } _preSelectStart; --------- Connect the handler to the event. ---------
|