UserInterfaceObjectBase
ReferencesNothing matches.
Base class for all on screen user interface widgets
Constructors
UserInterfaceObjectBase
#protected UserInterfaceObjectBase()
Properties
Does this object have keyboard focus? An object with keyboard focus gets first refusal on what is typed in a viewport; what it does not use carries on to the command line as usual.
Text shown in a tooltip when the mouse rests over this object. Null or an empty string means no tooltip, which is what an object starts with. One tooltip is on screen at a time; whichever object the mouse is over owns it.
Methods
Take keyboard focus away from whichever user interface object has it, so that typing goes to the command line again.
Parameters:
| doc (RhinoDoc) | Document to redraw. This can be null. |
IsMouseOver
#Called to test if the mouse is actively over this object
Parameters:
| mouse (MouseState) |
Returns: Return true if the mouse is over this object
OnDraw
#All user interface objects are drawn and can customize their look with the OnDraw function
Parameters:
| args (DrawEventArgs) |
OnMouseDoubleClick
#Called during a mouse double click event on this object
Parameters:
| mouse (MouseState) |
OnMouseDown
#Called when the mouse goes down on this object
Parameters:
| mouse (MouseState) | Current mouse state when this event occurs |
OnRunCommand
#Called after the above RunCommand function is called. This will be executing while inside of a Rhino command.
Parameters:
| doc (RhinoDoc) | Document that the command is running in |
| mode (RunMode) | Interactive or scripted mode |
| mouse (MouseState) | Mouse state that was passed to RunCommand |
Returns: Result of the command. The default implementation returns Success
Make this object visible for all documents. Typically you will only have user interface objects work with single documents. For that case, call doc.ViewUserInterface.Add
Call RunCommand to have the virtual OnRunCommand function executed in the scope of a Rhino command. If you are modifying the document from one of the mouse functions on this object, this is the best approach to do so since changes made inside of a command are recorded for undo.
Parameters:
| mouse (MouseState) | Current mouse state. This is handed back to OnRunCommand |