/*! \brief Wrap an existing gagdet. */ public Gadget(Object tbObj, uint cmpID) { Object = tbObj; ComponentID = cmpID; Object.Gadgets.Add(ComponentID, this); }
/*! \brief Specify a toolbox object to be shown when the user clicks Select and/or * Adjust on the %Iconbar icon. * \param [in] flags Bits 0 and 1 indicate which buttons to set objects for. * \param [in] selectClickShow The object to be shown if Select is clicked (if bit 0 set * in flags - ButtonFlags.Select). * \param [in] adjustClickShow The object to be shown if Adjust is clicked (if bit 1 set * in flags - ButtonFlags.Adjust). * \note Set to null to prevent any object from being shown. * \note The \e SelectClickShow and \e AdjustClickShow properties can be used for * the same purpose. */ public void SetShow(ButtonFlags flags, Toolbox.Object selectClickShow, Toolbox.Object adjustClickShow) { MiscOp_SetR3R4((uint)flags, Method.SetShow, (selectClickShow != null) ? selectClickShow.ID : 0, (adjustClickShow != null) ? adjustClickShow.ID : 0); }
/*! \brief Return \e true if the Toolbox object given is the same as this * one. * \note This method is part of the IEquatable interface, */ public bool Equals(Toolbox.Object other) { if (other == null) { return(false); } return(ID == other.ID); }
/*! \brief Test the Toolbox object id to see if it has been registered and * return the corresponding managed object if so. * \param [in] id The Toolbox object id to test. * \param [out] obj The managed Toolbox object if the object is known. * \return \e true if the object was found. */ public static bool TryGetValue(uint id, out Toolbox.Object obj) { return(AllObjects.TryGetValue(id, out obj)); }