String GetClip() { var nf = IComponent_Util.GetTopLevelComponent(this) as NoForm; String ot; nf.window.GetClipboard(out ot); return(ot); }
void SetClip(String cs) { var nf = IComponent_Util.GetTopLevelComponent(this) as NoForm; if (nf != null) { nf.window.SetClipboard(cs); } }
public override void MouseUpDown(Point location, MouseButton mb, ButtonState mbs, bool inComponent, bool amClipped) { if (mbs == ButtonState.DOWN && inComponent && !amClipped && IComponent_Util.AmITopZOrder(this, location)) { deltaLoc = controlled.controller.MouseScreenLocation; controlled.window.CaptureMouse = true; movin = true; } if (mbs == ButtonState.UP && movin) { movin = false; } }
public override void MouseUpDown(Point location, MouseButton mb, ButtonState mbs, bool inComponent, bool amClipped) { base.MouseUpDown(location, mb, mbs, inComponent, amClipped); bool topz = IComponent_Util.AmITopZOrder(this, location); if (inComponent && !amClipped && topz && mbs == ButtonState.DOWN) { (background as USolidBrush).color = new Color(.8f); } else { (background as USolidBrush).color = new Color(.7f); } }
public override void MouseUpDown(Point location, MouseButton mb, ButtonState mbs, bool inComponent, bool amClipped) { base.MouseUpDown(location, mb, mbs, inComponent, amClipped); if (inComponent && !amClipped && IComponent_Util.AmITopZOrder(this, location) && mbs == ButtonState.DOWN) { downed = true; var sloc = location; downedOrigin = orientation == Orientation.v ? sloc.Y : sloc.X; topOriginal = orientation == Orientation.v ? Location.Y : Location.X; (trackBrush as USolidBrush).color = new Color(0.8f); } else { downed = false; (trackBrush as USolidBrush).color = new Color(0.6f); } }
public virtual void MouseMove(Point location, bool inComponent, bool amClipped) { if (inComponent && !amClipped) { var tzo = IComponent_Util.AmITopZOrder(this, location); if (tzo) { var tlc = IComponent_Util.GetTopLevelComponent(this); if (tlc is NoForm) { var nf = (tlc as NoForm); if (nf.window.Cursor != Cursor) { nf.window.Cursor = Cursor; } } } } }
protected override void OnLocationChanged() { base.OnLocationChanged(); tlc = IComponent_Util.GetTopLevelComponent(this); float abo = DisplayRectangle.top - lb.Size.height + 1f; float bel = DisplayRectangle.bottom - 1f; float abo_spc = DisplayRectangle.top; float bel_spc = tlc.Size.height - DisplayRectangle.bottom; float toppy = 0; switch (dropDirection) { case ComboBoxDirection.Above: toppy = abo; break; case ComboBoxDirection.Below: toppy = bel; break; case ComboBoxDirection.MostSpace: toppy = abo_spc > bel_spc ? abo : bel; break; case ComboBoxDirection.LeastSpace: toppy = abo_spc < bel_spc ? abo : bel; break; } if (dropPlatform == null) { lb.Location = new Point(DisplayRectangle.left, toppy); } if (ddf != null) { var ofp = tlc.Location + Location; ddf.Location = new Point(ofp.X, tlc.Location.Y + toppy); } }
void dropArrowThing_Clicked(Point loc) { tlc = IComponent_Util.GetTopLevelComponent(this); if (dropPlatform != null) { recreateddf(); } ComboBox_SizeChanged(Size); if (ddf == null) { tlc.components.Add(lb); } else { recreateddf(); ddf.window.Show(); } shown = true; OnLocationChanged(); }
public override void MouseUpDown(Point location, MouseButton mb, ButtonState mbs, bool inComponent, bool amClipped) { base.MouseUpDown(location, mb, mbs, inComponent, amClipped); bool tzo = IComponent_Util.AmITopZOrder(this, location); if (!downed && (!inComponent || amClipped || !tzo)) { return; } if (mbs == ButtonState.DOWN) { scrollTimer.Change(0, cycle); (butBrsh as USolidBrush).color = new Color(.6f, .5f, .7f, .5f); downed = true; } else if (downed) { scrollTimer.Change(System.Threading.Timeout.Infinite, cycle); (butBrsh as USolidBrush).color = new Color(.8f, .4f, .6f, .4f); downed = false; } }
public override void MouseMove(Point location, bool inComponent, bool amClipped) { Rectangle clipDr = DisplayRectangle; clipDr.height -= HorizontalScrollbarVisible ? HorizontalScrollbarHeight : 0; clipDr.width -= VerticalScrollbarVisible ? VerticalScrollbarWidth : 0; // We trick the children by modifying these positions using the x and y offsets var scrollOffset = new Point(xOffset, yOffset); var tll = IComponent_Util.GetTopLevelLocation(this); foreach (IComponent c in components) { if (!c.visible) { continue; } Point useloc = c.Scrollable ? (Point)location + scrollOffset : (Point)location; bool child_inComponent = c.DisplayRectangle.Contains(useloc); bool child_amClipped = amClipped ? true : !clipDr.Contains(useloc); c.MouseMove(useloc, child_inComponent, child_amClipped); } }