private static void CRhinoObjectGrips_Draw(int serial_number, IntPtr pDrawSettings) { CustomObjectGrips grips = FromSerialNumber(serial_number); if (grips != null) { try { GripsDrawEventArgs args = new GripsDrawEventArgs(pDrawSettings); grips.OnDraw(args); args.m_pGripsDrawSettings = IntPtr.Zero; // don't let the args hold onto a pointer } catch (Exception ex) { Pixel.Rhino.Runtime.HostUtils.ExceptionReport(ex); } } }
/// <summary> /// Draws the grips. In your implementation, override this if you need to draw /// dynamic elements and then call this base implementation to draw the grips themselves. /// </summary> /// <param name="args">The grips draw event arguments.</param> protected virtual void OnDraw(GripsDrawEventArgs args) { IntPtr pThis = NonConstPointer(); UnsafeNativeMethods.CRhinoObjectGrips_DrawBase(pThis, args.m_pGripsDrawSettings); }
internal GripStatus(GripsDrawEventArgs parent, int index) { m_parent = parent; m_index = index; }