public void SetTextModifiedHandler(VoidActionMediator mediator) { if (mediator == null) { throw new ArgumentNullException(nameof(mediator)); } mediator.ThrowIfDisposed(); NativeMethods.text_field_set_text_modified_handler(this.NativePtr, mediator.NativePtr); }
public void SetOverlayRectsChangedHandler(VoidActionMediator mediator) { if (mediator == null) { throw new ArgumentNullException(nameof(mediator)); } this.ThrowIfDisposed(); mediator.ThrowIfDisposed(); NativeMethods.image_display_set_overlay_rects_changed_handler(this.NativePtr, mediator.NativePtr); }
public override void RegisterThread(VoidActionMediator mediator) { if (mediator == null) { throw new ArgumentNullException(nameof(mediator)); } this.ThrowIfDisposed(); mediator.ThrowIfDisposed(); NativeMethods.custom_multithreaded_object_register_thread(this.NativePtr, mediator.NativePtr); }
public MenuItemText(string str, VoidActionMediator mediator, char hk) { if (mediator == null) { throw new ArgumentNullException(nameof(mediator)); } mediator.ThrowIfDisposed(); var s = Dlib.Encoding.GetBytes(str ?? ""); this.NativePtr = NativeMethods.menu_item_text_new(s, mediator.NativePtr, hk); }
public MenuItemText(string str, VoidActionMediator mediator, char hk) { if (mediator == null) { throw new ArgumentNullException(nameof(mediator)); } mediator.ThrowIfDisposed(); var s = Dlib.Encoding.GetBytes(str ?? ""); var strLength = s.Length; Array.Resize(ref s, strLength + 1); s[strLength] = (byte)'\0'; this.NativePtr = NativeMethods.menu_item_text_new(s, mediator.NativePtr, hk); }