//used for normal toolbars, not for satellite toolbars void _Show(bool owned, AWnd owner, ITBOwnerObject oo, AScreen screen) { //if(_c.IsDisposed) throw new ObjectDisposedException("AToolbar"); if (_loaded) { throw new InvalidOperationException(); } AWnd c = default; if (owned) { if (owner.Is0) { throw new ArgumentException(); } var w = owner.Window; if (w.Is0) { return; } if (w != owner) { c = owner; owner = w; } } _CreateControl(owned, owner, screen); _Manager.Add(this, owner, c, oo); }
public _OwnerControl(AWnd control, ITBOwnerObject ioo) { c = control; oo = ioo; }
/// <summary> /// Shows the toolbar and attaches to an object in a window. /// </summary> /// <param name="ownerWindow">Window that contains the object. Can be control. Can belong to any process.</param> /// <param name="oo">A variable of a user-defined class that implements <see cref="ITBOwnerObject"/> interface. It provides object location, visibility, etc.</param> /// <exception cref="InvalidOperationException"><b>Show</b> already called.</exception> /// <exception cref="ArgumentException"><b>ownerWindow</b> is 0.</exception> /// <remarks> /// The toolbar will be above the window in the Z order; moved when the object or window moved or resized; hidden when the object or window hidden, cloaked or minimized; destroyed when the object or window destroyed. /// </remarks> public void Show(AWnd ownerWindow, ITBOwnerObject oo) => _Show(true, ownerWindow, oo, default);