# UserInterfaceObjectBase class

Namespace: [Rhino.UI](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.ui.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
public abstract class UserInterfaceObjectBase
```

Base class for all on screen user interface widgets

**Derived types:** [GripUserInterfaceObject](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.gripuserinterfaceobject.md), [TextDotUserInterfaceObject](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.textdotuserinterfaceobject.md), [UserInterfaceControl](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol.md)

## Constructors

- [UserInterfaceObjectBase](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/ctor.md)

## Properties

- [BoundToActiveView](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/boundtoactiveview.md)
- [HasKeyboardFocus](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/haskeyboardfocus.md): 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.
- [Tooltip](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/tooltip.md): 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.
- [Visible](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/visible.md): Is the user interface object visible? Objects that are not visible will not be drawn and will not receive mouse events

## Methods

- [ClearKeyboardFocus](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/clearkeyboardfocus.md): (static) Take keyboard focus away from whichever user interface object has it, so that typing goes to the command line again.
- [IsMouseOver](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/ismouseover.md): Called to test if the mouse is actively over this object
- [IsRegistered](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/isregistered.md): Is this user interface object active
- [OnDraw](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/ondraw.md): All user interface objects are drawn and can customize their look with the OnDraw function
- [OnMouseClick](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onmouseclick.md): Called during a mouse click event on this object
- [OnMouseDoubleClick](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onmousedoubleclick.md): Called during a mouse double click event on this object
- [OnMouseDown](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onmousedown.md): Called when the mouse goes down on this object
- [OnMouseEnter](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onmouseenter.md): Called when the mouse goes over this object
- [OnMouseLeave](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onmouseleave.md): Called when the mouse leaves this object
- [OnMouseMove](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onmousemove.md): Called when the mouse is moved
- [OnMouseUp](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onmouseup.md): Called when the mouse is released on this object
- [OnRunCommand](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onruncommand.md): Called after the above RunCommand function is called. This will be executing while inside of a Rhino command.
- [RegisterForAllDocuments](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/registerforalldocuments.md): 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
- [RunCommand](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/runcommand.md): 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.
- [Unregister](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/unregister.md): Unregister this object
