protected override void initVulkan() { base.initVulkan(); iFace = new Crow.Interface((int)Width, (int)Height, WindowHandle); iFace.Init(); initUISurface(); }
public void Init(Crow.Interface iFace) { }
public VerticalStack(Interface iface) : base(iface) { }
public override void onMouseMove(object sender, MouseMoveEventArgs e) { base.onMouseMove(sender, e); Interface otkgw = CurrentInterface; if (!hoverBorder) { currentDirection = Direction.None; CurrentInterface.MouseCursor = XCursor.Default; return; } if (this.HasFocus && _movable) { if (e.Mouse.IsButtonDown(MouseButton.Left)) { int currentLeft = this.Left; int currentTop = this.Top; int currentWidth, currentHeight; if (currentLeft == 0) { currentLeft = this.Slot.Left; this.Left = currentLeft; } if (currentTop == 0) { currentTop = this.Slot.Top; this.Top = currentTop; } if (this.Width.IsFixed) { currentWidth = this.Width; } else { currentWidth = this.Slot.Width; } if (this.Height.IsFixed) { currentHeight = this.Height; } else { currentHeight = this.Slot.Height; } switch (currentDirection) { case Direction.None: this.Left = currentLeft + e.XDelta; this.Top = currentTop + e.YDelta; break; case Direction.N: this.Height = currentHeight - e.YDelta; if (this.Height == currentHeight - e.YDelta) { this.Top = currentTop + e.YDelta; } break; case Direction.S: this.Height = currentHeight + e.YDelta; break; case Direction.W: this.Width = currentWidth - e.XDelta; if (this.Width == currentWidth - e.XDelta) { this.Left = currentLeft + e.XDelta; } break; case Direction.E: this.Width = currentWidth + e.XDelta; break; case Direction.NW: this.Height = currentHeight - e.YDelta; if (this.Height == currentHeight - e.YDelta) { this.Top = currentTop + e.YDelta; } this.Width = currentWidth - e.XDelta; if (this.Width == currentWidth - e.XDelta) { this.Left = currentLeft + e.XDelta; } break; case Direction.NE: this.Height = currentHeight - e.YDelta; if (this.Height == currentHeight - e.YDelta) { this.Top = currentTop + e.YDelta; } this.Width = currentWidth + e.XDelta; break; case Direction.SW: this.Width = currentWidth - e.XDelta; if (this.Width == currentWidth - e.XDelta) { this.Left = currentLeft + e.XDelta; } this.Height = currentHeight + e.YDelta; break; case Direction.SE: this.Height = currentHeight + e.YDelta; this.Width = currentWidth + e.XDelta; break; } return; } } // GraphicObject firstFocusableAncestor = otkgw.hoverWidget; // while (firstFocusableAncestor != this) { // if (firstFocusableAncestor == null) // return; // if (firstFocusableAncestor.Focusable) // return; // firstFocusableAncestor = firstFocusableAncestor.Parent as GraphicObject; // } if (Resizable) { Direction lastDir = currentDirection; if (Math.Abs(e.Position.Y - this.Slot.Y) < Interface.BorderThreshold) { if (Math.Abs(e.Position.X - this.Slot.X) < Interface.BorderThreshold) { currentDirection = Direction.NW; } else if (Math.Abs(e.Position.X - this.Slot.Right) < Interface.BorderThreshold) { currentDirection = Direction.NE; } else { currentDirection = Direction.N; } } else if (Math.Abs(e.Position.Y - this.Slot.Bottom) < Interface.BorderThreshold) { if (Math.Abs(e.Position.X - this.Slot.X) < Interface.BorderThreshold) { currentDirection = Direction.SW; } else if (Math.Abs(e.Position.X - this.Slot.Right) < Interface.BorderThreshold) { currentDirection = Direction.SE; } else { currentDirection = Direction.S; } } else if (Math.Abs(e.Position.X - this.Slot.X) < Interface.BorderThreshold) { currentDirection = Direction.W; } else if (Math.Abs(e.Position.X - this.Slot.Right) < Interface.BorderThreshold) { currentDirection = Direction.E; } else { currentDirection = Direction.None; } if (currentDirection != lastDir) { switch (currentDirection) { case Direction.None: otkgw.MouseCursor = XCursor.Default; break; case Direction.N: otkgw.MouseCursor = XCursor.V; break; case Direction.S: otkgw.MouseCursor = XCursor.V; break; case Direction.E: otkgw.MouseCursor = XCursor.H; break; case Direction.W: otkgw.MouseCursor = XCursor.H; break; case Direction.NW: otkgw.MouseCursor = XCursor.NW; break; case Direction.NE: otkgw.MouseCursor = XCursor.NE; break; case Direction.SW: otkgw.MouseCursor = XCursor.SW; break; case Direction.SE: otkgw.MouseCursor = XCursor.SE; break; } } } }
public static XCursorFile Load(Interface iface, string path) { return(loadFromStream(iface.GetStreamFromPath(path))); }
public ColorSelector(Interface iface) : base(iface) { }
public Popper(Interface iface) : base(iface) { }
public DockStack(Interface iface) : base(iface) { }
public TabItem(Interface iface) : base(iface) { }
public TextRun(Interface iface) : base(iface) { }
public GroupBox(Interface iface) : base(iface) { }
public Menu(Interface iface) : base(iface) { }
public FileDialog(Interface iface) : base(iface) { }
public TreeView(Interface iface) : base(iface) { }
public TabView(Interface iface) : base(iface) { }