C++
virtual ACDBCORE2D_PORT Adesk::Boolean userBreak( bool updCtrlsWhenEnteringIdle = true ) const;
Description
The userBreak() method is called by the database code to see if the user has entered a CTRL+C break. Some independent ObjectARX applications that may be running with ObjectDBX may also call this, as it is the equivalent of acedUsrBrk(), which is not available in ObjectDBX. The default implementation is to always return Adesk::kFalse.
You must override this method to make your application sensitive to CTRL+C interrupts. A simple approach would be to have your host application trap the CTRL+C input from the user, and toggle a Boolean value. When YourHostApp::userBreak() is queried, if you have trapped a CTRL+C, return Adesk::kTrue, and reset the Boolean to capture the next break. If none have been captured, return Adesk::kFalse.
If updCtrlsWhenEnteringIdle is false, the host application does not update any UI controls during idle time. This setting is very important when this function is called by the implementation of an open object (such as within an entity's worldDraw() method), because the updating of some UI controls can close entities that were opened by the host application, or can result in the modification of objects.
Parameters
Parameters | Description |
---|---|
updCtrlsWhenEnteringIdle | Input boolean indicating whether or not to suppress updating controls |