public static Gdk.Cursor GetCursorFromType(Gdk.CursorType cursorType) { Gdk.Cursor cursor = null; if (CursorClass.Cursors.TryGetValue(cursorType, out cursor) == false) { cursor = new Gdk.Cursor(cursorType); CursorClass.Cursors.Add(cursorType, cursor); } return(cursor); }
public Cursor(Gdk.CursorType cursor_type) : base(IntPtr.Zero) { if (GetType() != typeof(Cursor)) { var vals = new List <GLib.Value> (); var names = new List <string> (); names.Add("cursor_type"); vals.Add(new GLib.Value(cursor_type)); CreateNativeObject(names.ToArray(), vals.ToArray()); return; } Raw = gdk_cursor_new((int)cursor_type); }
private void SelectCursor() { Gdk.CursorType selCursorType = Gdk.CursorType.Arrow; if (!SizingSide.CursorTypeMaps.TryGetValue(sizingSide, out selCursorType)) { selCursorType = Gdk.CursorType.Arrow; } GdkWindow.Cursor = new Gdk.Cursor(cursorType); if (cursorType != selCursorType) { cursorType = selCursorType; GdkWindow.Cursor = new Gdk.Cursor(cursorType); GdkWindow.Screen.RootWindow.Cursor = new Gdk.Cursor(cursorType); } }
public Cursor(Gdk.Display display, Gdk.CursorType cursor_type) : base(IntPtr.Zero) { if (GetType() != typeof(Cursor)) { var vals = new List <GLib.Value> (); var names = new List <string> (); if (display != null) { names.Add("display"); vals.Add(new GLib.Value(display)); } names.Add("cursor_type"); vals.Add(new GLib.Value(cursor_type)); CreateNativeObject(names.ToArray(), vals.ToArray()); return; } Raw = gdk_cursor_new_for_display(display == null ? IntPtr.Zero : display.Handle, (int)cursor_type); }
public void SelectCursor() { Gdk.CursorType cursorType = Gdk.CursorType.Arrow; switch (_isSizingSide) { case E_SIZING_SIDE.E_LEFT_SIDE: cursorType = Gdk.CursorType.LeftSide; break; case E_SIZING_SIDE.E_RIGHT_SIDE: cursorType = Gdk.CursorType.RightSide; break; case E_SIZING_SIDE.E_TOP_SIDE: cursorType = Gdk.CursorType.TopSide; break; case E_SIZING_SIDE.E_TOP_LEFT_CONER: cursorType = Gdk.CursorType.TopLeftCorner; break; case E_SIZING_SIDE.E_TOP_RIGHT_CONER: cursorType = Gdk.CursorType.TopRightCorner; break; case E_SIZING_SIDE.E_BOTTOM_SIDE: cursorType = Gdk.CursorType.BottomSide; break; case E_SIZING_SIDE.E_BOTTOM_LEFT_CONER: cursorType = Gdk.CursorType.BottomLeftCorner; break; case E_SIZING_SIDE.E_BOTTOM_RIGHT_CONER: cursorType = Gdk.CursorType.BottomRightCorner; break; default: cursorType = Gdk.CursorType.Arrow; break; } this._window.GdkWindow.Cursor = new Gdk.Cursor(cursorType); }
public void SetCursor(Gdk.CursorType cursorType) { mainControl.GdkWindow.Cursor = new Gdk.Cursor(cursorType); }
private void SelectCursor() { Gdk.CursorType selCursorType = Gdk.CursorType.Arrow; if (!SizingSide.CursorTypeMaps.TryGetValue(sizingSide, out selCursorType)) selCursorType = Gdk.CursorType.Arrow; GdkWindow.Cursor = new Gdk.Cursor(cursorType); if (cursorType != selCursorType) { cursorType = selCursorType; GdkWindow.Cursor = new Gdk.Cursor(cursorType); GdkWindow.Screen.RootWindow.Cursor = new Gdk.Cursor(cursorType); } }
public ToolControl(Gdk.CursorType cursor, MouseHandler moveAction) { this.action = moveAction; Position = new PointD(-5, -5); Cursor = cursor; }
public void SetCursor(Gdk.CursorType cursorType) { this.GdkWindow.Cursor = new Gdk.Cursor(cursorType); }