public TextTool() { cursor_hand = new Gdk.Cursor(PintaCore.Chrome.Canvas.Display, PintaCore.Resources.GetIcon("Cursor.Pan.png"), 8, 8); imContext = new Gtk.IMMulticontext(); imContext.Commit += OnIMCommit; layout = new TextLayout(); }
public TextTool(IServiceManager services) : base(services) { cursor_hand = new Gdk.Cursor(Gdk.Display.Default, PintaCore.Resources.GetIcon("Cursor.Pan.png"), 8, 8); imContext = new Gtk.IMMulticontext(); imContext.Commit += OnIMCommit; layout = new Pinta.Core.TextLayout(); }
static CustomCursorFactory() { Gdk.Pixbuf cursorGrabbingPix = Gdk.Pixbuf.LoadFromResource("TraceLab.UI.GTK.Resources.cursor_grabbing.png"); Gdk.Pixbuf cursorGrabOpenPix = Gdk.Pixbuf.LoadFromResource("TraceLab.UI.GTK.Resources.cursor-grab-open.png"); s_cursorGrabbingHand = new Cursor(Display.Default, cursorGrabbingPix, 0, 0); s_cursorOpenHandGrab = new Cursor(Display.Default, cursorGrabOpenPix, 0, 0); }
public void SetCursor(Gdk.Cursor cursor) { CurrentCursor = cursor; if (PintaCore.Workspace.HasOpenDocuments && PintaCore.Workspace.ActiveWorkspace.Canvas.GdkWindow != null) { PintaCore.Workspace.ActiveWorkspace.Canvas.GdkWindow.Cursor = cursor; } }
protected override void OnDestroyed() { base.OnDestroyed(); if (resizeCursor != null) { resizeCursor.Dispose(); resizeCursor = null; } }
private bool HideCursor() { if (empty_cursor == null) { empty_cursor = GdkUtils.CreateEmptyCursor(GdkWindow.Display); } this.GdkWindow.Cursor = empty_cursor; view.GdkWindow.Cursor = empty_cursor; return(false); }
static Resources() { IconCurveDelete = Gdk.Pixbuf.LoadFromResource("chart_curve_delete.png"); IconCurveBezier = Gdk.Pixbuf.LoadFromResource("chart_curve.png"); IconCurveLinear = Gdk.Pixbuf.LoadFromResource("chart_line.png"); IconColorWheel = Gdk.Pixbuf.LoadFromResource("color_wheel.png"); IconCancel = Gdk.Pixbuf.LoadFromResource("cancel.png"); IconDelete = Gdk.Pixbuf.LoadFromResource("delete.png"); HandCursor = new Cursor(CursorType.Hand1); }
protected override void OnKeyDown(Gtk.DrawingArea canvas, Gtk.KeyPressEventArgs args) { base.OnKeyDown(canvas, args); //note that this WONT work if user presses control key and THEN selects the tool! if (args.Event.Key == Key.Control_L || args.Event.Key == Key.Control_R) { Gdk.Pixbuf icon = PintaCore.Resources.GetIcon("Cursor.CloneStampSetSource.png"); Gdk.Cursor setSourceCursor = new Gdk.Cursor(PintaCore.Chrome.Canvas.Display, icon, 6, 11); SetCursor(setSourceCursor); } }
public PropertyGridTable(EditorManager editorManager, PropertyGrid parentGrid) { GtkWorkarounds.FixContainerLeak(this); this.parentGrid = parentGrid; this.editorManager = editorManager; WidgetFlags |= Gtk.WidgetFlags.AppPaintable; Events |= Gdk.EventMask.PointerMotionMask; CanFocus = true; resizeCursor = new Cursor(CursorType.SbHDoubleArrow); handCursor = new Cursor(CursorType.Hand1); }
protected override void OnDestroyed() { view.MotionNotifyEvent -= HandleImageViewMotion; view.Item.Changed -= HandleItemChanged; view.ZoomChanged -= HandleViewZoomChanged; opened_hand_cursor.Dispose(); closed_hand_cursor.Dispose(); opened_hand_cursor = null; closed_hand_cursor = null; base.OnDestroyed(); }
private void SetCursor(CursorType type) { Gdk.Cursor cursor = GetCursor(type); if (cursor == null) { ResetCursor(); } else { default_cursor = false; window.Window.Cursor = cursor; } }
public PropertyGridTable(EditorManager editorManager, PropertyGrid parentGrid) { Mono.TextEditor.GtkWorkarounds.FixContainerLeak(this); this.editorManager = editorManager; WidgetFlags |= Gtk.WidgetFlags.AppPaintable; Events |= Gdk.EventMask.PointerMotionMask; CanFocus = true; resizeCursor = new Cursor(CursorType.SbHDoubleArrow); handCursor = new Cursor(CursorType.Hand1); discloseDown = Gdk.Pixbuf.LoadFromResource("disclose-arrow-down.png"); discloseUp = Gdk.Pixbuf.LoadFromResource("disclose-arrow-up.png"); }
public LinkTextView(string linkText) : base() { currentCursor = -1; handCursor = new Gdk.Cursor (Gdk.CursorType.Hand2); hoveringOverLink = false; string xmlLinkText = "<message>" + linkText + "</message>"; XmlDocument linkTextDom = new XmlDocument(); linkTextDom.LoadXml(xmlLinkText); TextTagTable textTagTable = CreateTextTagTable(linkTextDom); TextBuffer textBuffer = new TextBuffer(textTagTable); FormatTextBuffer(textBuffer, linkTextDom.DocumentElement); this.Buffer = textBuffer; }
public PropertyGridTable(EditorManager editorManager, PropertyGrid parentGrid) { GtkWorkarounds.FixContainerLeak(this); this.parentGrid = parentGrid; this.editorManager = editorManager; WidgetFlags |= Gtk.WidgetFlags.AppPaintable; Events |= Gdk.EventMask.PointerMotionMask; CanFocus = true; resizeCursor = new Cursor(CursorType.SbHDoubleArrow); handCursor = new Cursor(CursorType.Hand1); discloseDown = Xwt.Drawing.Image.FromResource("disclose-arrow-down-16.png"); discloseUp = Xwt.Drawing.Image.FromResource("disclose-arrow-up-16.png"); }
public ToolboxWidget() { this.Events = EventMask.ExposureMask | EventMask.EnterNotifyMask | EventMask.LeaveNotifyMask | EventMask.ButtonPressMask | EventMask.ButtonReleaseMask | EventMask.KeyPressMask | EventMask.PointerMotionMask; this.CanFocus = true; discloseDown = ImageService.GetIcon("md-disclose-arrow-down", Gtk.IconSize.Menu); discloseUp = ImageService.GetIcon("md-disclose-arrow-up", Gtk.IconSize.Menu); handCursor = new Cursor(CursorType.Hand1); }
public Gdk.Cursor Empty() { Gdk.Cursor cempty = null; try { Gdk.Pixbuf empty = new Gdk.Pixbuf(Gdk.Colorspace.Rgb, true, 8, 1, 1); empty.Fill(0x00000000); cempty = new Gdk.Cursor(GdkWindow.Display, empty, 0, 0); } catch (System.Exception e) { System.Console.WriteLine(e.ToString()); return(null); } return(cempty); }
bool HideCursor() { if (View.InPanMotion) { return(false); } if (empty_cursor == null) { empty_cursor = GdkUtils.CreateEmptyCursor(GdkWindow.Display); } this.GdkWindow.Cursor = empty_cursor; View.GdkWindow.Cursor = empty_cursor; return(false); }
private Gdk.Cursor GetCursor(object desc) { Gdk.Cursor rv; var name = desc as string; if (name != null) { var theme = Gtk.IconTheme.Default; var icon = theme.LoadIcon(name, 32, default(Gtk.IconLookupFlags)); rv = icon == null ? new Gdk.Cursor(CursorType.XCursor) : new Gdk.Cursor(Display.Default, icon, 0, 0); } else { rv = new Gdk.Cursor((CursorType)desc); } rv.Owned = false; return rv; }
public PropertyGridTable(EditorManager editorManager, PropertyGrid parentGrid) { // TODO: ??? //Mono.TextEditor.GtkWorkarounds.FixContainerLeak (this); this.editorManager = editorManager; WidgetFlags |= Gtk.WidgetFlags.AppPaintable; Events |= Gdk.EventMask.PointerMotionMask; CanFocus = true; resizeCursor = new Cursor(CursorType.SbHDoubleArrow); handCursor = new Cursor(CursorType.Hand1); discloseDown = Gdk.Pixbuf.LoadFromResource("disclose-arrow-down.png"); discloseUp = Gdk.Pixbuf.LoadFromResource("disclose-arrow-up.png"); arrowLeft = Gdk.Pixbuf.LoadFromResource("arrow-left.png"); arrowRight = Gdk.Pixbuf.LoadFromResource("arrow-right.png"); PropertyContentRightPadding = MG.Framework.Utility.Platform.IsMac ? 10 : 0; }
private Gdk.Cursor GetCursor(object desc) { Gdk.Cursor rv; var name = desc as string; if (name != null) { var theme = Gtk.IconTheme.Default; var icon = theme.LoadIcon(name, 32, default(Gtk.IconLookupFlags)); rv = icon == null ? new Gdk.Cursor(CursorType.XCursor) : new Gdk.Cursor(Display.Default, icon, 0, 0); } else { rv = new Gdk.Cursor((CursorType)desc); } rv.Owned = false; return(rv); }
public LinkTextView(string linkText) : base() { currentCursor = -1; handCursor = new Gdk.Cursor(Gdk.CursorType.Hand2); hoveringOverLink = false; string xmlLinkText = "<message>" + linkText + "</message>"; XmlDocument linkTextDom = new XmlDocument(); linkTextDom.LoadXml(xmlLinkText); TextTagTable textTagTable = CreateTextTagTable(linkTextDom); TextBuffer textBuffer = new TextBuffer(textTagTable); FormatTextBuffer(textBuffer, linkTextDom.DocumentElement); this.Buffer = textBuffer; }
public FullSlide(Gtk.Window parent, IBrowsableItem [] items) : base("Slideshow") { screenshot = PixbufUtils.LoadFromScreen(parent.GdkWindow); this.Destroyed += HandleDestroyed; this.TransientFor = parent; this.ButtonPressEvent += HandleSlideViewButtonPressEvent; this.KeyPressEvent += HandleSlideViewKeyPressEvent; this.AddEvents((int)(EventMask.ButtonPressMask | EventMask.KeyPressMask | EventMask.PointerMotionMask)); slideview = new SlideView(screenshot, items); this.Add(slideview); this.Decorated = false; this.Fullscreen(); this.Realize(); busy = new Gdk.Cursor(Gdk.CursorType.Watch); this.GdkWindow.Cursor = busy; none = GdkUtils.CreateEmptyCursor(GdkWindow.Display); hide = new Delay(2000, new GLib.IdleHandler(HideCursor)); }
public FullSlide (Gtk.Window parent, IBrowsableItem [] items) : base ("Slideshow") { screenshot = PixbufUtils.LoadFromScreen (parent.GdkWindow); this.Destroyed += HandleDestroyed; this.TransientFor = parent; this.ButtonPressEvent += HandleSlideViewButtonPressEvent; this.KeyPressEvent += HandleSlideViewKeyPressEvent; this.AddEvents ((int) (EventMask.ButtonPressMask | EventMask.KeyPressMask | EventMask.PointerMotionMask)); slideview = new SlideView (screenshot, items); this.Add (slideview); this.Decorated = false; this.Fullscreen(); this.Realize (); busy = new Gdk.Cursor (Gdk.CursorType.Watch); this.GdkWindow.Cursor = busy; none = Empty (); hide = new Delay (2000, new GLib.IdleHandler (HideCursor)); }
protected override void OnKeyDown(Gtk.DrawingArea canvas, Gtk.KeyPressEventArgs args) { base.OnKeyDown(canvas, args); //note that this WONT work if user presses control key and THEN selects the tool! if (args.Event.Key == Key.Control_L || args.Event.Key == Key.Control_R) { Gdk.Pixbuf icon = PintaCore.Resources.GetIcon ("Cursor.CloneStampSetSource.png"); Gdk.Cursor setSourceCursor = new Gdk.Cursor(PintaCore.Chrome.Canvas.Display, icon, 6, 11); SetCursor(setSourceCursor); } }
public override void Dispose () { if (arrowCursor == null) return; CancelCodeSegmentTooltip (); DisposeHighightBackgroundWorker (); DisposeSearchPatternWorker (); lock (lockObject) { if (caretTimer != null) { StopCaretThread (); caretTimer.Elapsed -= UpdateCaret; caretTimer.Dispose (); caretTimer = null; } } textEditor.Document.EndUndo -= UpdateBracketHighlighting; Caret.PositionChanged -= UpdateBracketHighlighting; textEditor.GetTextEditorData ().SearchChanged -= HandleSearchChanged; arrowCursor.Dispose (); xtermCursor.Dispose (); arrowCursor = xtermCursor = null; DisposeGCs (); if (caretGc != null) { caretGc.Dispose (); caretGc = null; } if (markerLayout != null) { markerLayout.Dispose (); markerLayout = null; } DisposeLayoutDict (); if (tabArray != null) { tabArray.Dispose (); tabArray = null; } layoutDict = null; base.Dispose (); }
static CreateFunc() { _cursor = LoadCursor("cursor-slice.png"); }
protected override void OnDestroyed () { if (fleurCursor != null) { fleurCursor.Dispose (); fleurCursor = null; } base.OnDestroyed (); }
static CreateTableFunc() { _cursor = LoadCursor("cursor-table.png"); }
public void SetCursor(Gdk.Cursor cursor) { PintaCore.Chrome.Canvas.GdkWindow.Cursor = cursor; }
protected override void OnDestroyed () { if (cursorX != null) { cursorX.Dispose (); cursorXY.Dispose (); cursorY.Dispose (); cursorX = cursorXY = cursorY = null; } base.OnDestroyed (); }
public BuyDialog(int featureLicenceId, string featureTitle, Gtk.Window parent) : base() { this.featureTitle = featureTitle; this.featureLicenceId = featureLicenceId; this.HasSeparator = false; if (parent != null) { this.TransientFor = parent; } this.WidthRequest = 570; this.HeightRequest = 450; this.ModifyBg(Gtk.StateType.Normal, Style.White); string userLicenceId = "-100"; if (MainClass.User != null) { userLicenceId = MainClass.User.LicenseId; } int iTyp = 0; if (!Int32.TryParse(userLicenceId, out iTyp)) { iTyp = -100; } featureLicence = MainClass.LicencesSystem.GetLicence(this.featureLicenceId.ToString()); handCursor = new Gdk.Cursor(Gdk.CursorType.Hand2); regularCursor = new Gdk.Cursor(Gdk.CursorType.Xterm); viewHeader = new TextView(); viewHeader.CanFocus = false; TextBuffer buffer = viewHeader.Buffer; viewFooter = new TextView(); TextBuffer buffer2 = viewFooter.Buffer; viewFooter.KeyPressEvent += new KeyPressEventHandler(KeyPress); viewFooter.WidgetEventAfter += new WidgetEventAfterHandler(EventAfter); viewFooter.MotionNotifyEvent += new MotionNotifyEventHandler(MotionNotify); viewFooter.HeightRequest = 15; viewFooter.CanFocus = false; viewTable = new TextView(); viewTable.CanFocus = false; TextBuffer buffer3 = viewTable.Buffer; ScrolledWindow sw = new ScrolledWindow(); sw.SetPolicy(PolicyType.Automatic, PolicyType.Automatic); sw.HeightRequest = 115; sw.Add(viewHeader); ScrolledWindow sw2 = new ScrolledWindow(); sw2.SetPolicy(PolicyType.Automatic, PolicyType.Automatic); sw2.HeightRequest = 15; sw2.Add(viewFooter); ScrolledWindow sw3 = new ScrolledWindow(); sw3.SetPolicy(PolicyType.Automatic, PolicyType.Automatic); sw3.Add(viewTable); CreateTags(buffer); CreateTags(buffer2); CreateTags(buffer3); InsertTextHeader(buffer); InsertTextFooter(buffer2); InsertTextTable(buffer3); Table tbl = new Table(4, 1, false); if (MainClass.Platform.IsMac) { tbl.BorderWidth = 20; } else { tbl.BorderWidth = 6; } BannerButton btnBuy = new BannerButton(); btnBuy.ModifyBase(StateType.Normal, new Gdk.Color(109, 158, 24)); btnBuy.ModifyBg(StateType.Normal, new Color(109, 158, 24)); btnBuy.HeightRequest = 38; btnBuy.WidthRequest = 170; string buyPath = System.IO.Path.Combine(MainClass.Paths.ResDir, "btnBuy.png"); btnBuy.ButtonPressEvent += delegate(object o, ButtonPressEventArgs args) { string url = "http://moscrif.com/download?t={0}"; if (MainClass.User != null && (!String.IsNullOrEmpty(MainClass.User.Token))) { url = string.Format(url, MainClass.User.Token); } System.Diagnostics.Process.Start(url); this.Respond(Gtk.ResponseType.Ok); }; btnBuy.ImageIcon = new Pixbuf(buyPath); BannerButton btnCancel = new BannerButton(); btnCancel.HeightRequest = 38; btnCancel.WidthRequest = 170; string cancelPath = System.IO.Path.Combine(MainClass.Paths.ResDir, "btnCancel.png"); btnCancel.ImageIcon = new Pixbuf(cancelPath); btnCancel.ButtonPressEvent += delegate(object o, ButtonPressEventArgs args) { this.Respond(Gtk.ResponseType.Cancel); }; Table tblButton = new Table(1, 4, false); tblButton.ColumnSpacing = 12; tblButton.BorderWidth = 6; tblButton.Attach(new Label(""), 0, 1, 0, 1, AttachOptions.Expand, AttachOptions.Expand, 0, 0); tblButton.Attach(btnCancel, 1, 2, 0, 1, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0); tblButton.Attach(btnBuy, 2, 3, 0, 1, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0); tblButton.Attach(new Label(""), 3, 4, 0, 1, AttachOptions.Expand, AttachOptions.Expand, 0, 0); tbl.Attach(sw, 0, 1, 0, 1, AttachOptions.Fill, AttachOptions.Fill, 0, 0); tbl.Attach(sw3, 0, 1, 1, 2, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Fill | AttachOptions.Expand, 0, 0); tbl.Attach(tblButton, 0, 1, 2, 3, AttachOptions.Fill, AttachOptions.Fill, 0, 0); tbl.Attach(sw2, 0, 1, 3, 4, AttachOptions.Fill, AttachOptions.Shrink, 0, 0); tbl.ShowAll(); this.VBox.Add(tbl); this.ShowAll(); }
public PanTool(IDrawingEditor editor, Cursor defaultCursor): base (editor) { m_defaultCursor = defaultCursor; Gtk.Widget widget = (Gtk.Widget) editor.View; widget.GdkWindow.Cursor = m_defaultCursor; }
static extern void gimp_preview_set_default_cursor(IntPtr preview, Cursor cursor);
public TextTool() { cursor_hand = new Gdk.Cursor (Gdk.Display.Default, PintaCore.Resources.GetIcon ("Cursor.Pan.png"), 8, 8); imContext = new Gtk.IMMulticontext (); imContext.Commit += OnIMCommit; layout = new TextLayout (); }
static RemoveFunc() { _cursor = LoadCursor("cursor-eraser.png"); }
private Cursor GetCursor(CursorType type) { int index; switch (type) { case CursorType.TopSide: index = 0; break; case CursorType.LeftSide: index = 1; break; case CursorType.BottomSide: index = 2; break; case CursorType.RightSide: index = 3; break; case CursorType.TopLeftCorner: index = 4; break; case CursorType.TopRightCorner: index = 5; break; case CursorType.BottomLeftCorner: index = 6; break; case CursorType.BottomRightCorner: index = 7; break; default: return null; } if (cursors == null) { cursors = new Cursor[8]; } if (cursors[index] == null) { cursors[index] = new Cursor (type); } return cursors[index]; }
public TextTool() { cursor_hand = new Gdk.Cursor (PintaCore.Chrome.Canvas.Display, PintaCore.Resources.GetIcon ("Tools.Pan.png"), 0, 0); }
public Gdk.Cursor Empty () { Gdk.Cursor cempty = null; try { Gdk.Pixbuf empty = new Gdk.Pixbuf (Gdk.Colorspace.Rgb, true, 8, 1, 1); empty.Fill (0x00000000); cempty = new Gdk.Cursor (GdkWindow.Display, empty, 0, 0); } catch (System.Exception e){ System.Console.WriteLine (e.ToString ()); return null; } return cempty; }
public BuyDialog(int featureLicenceId,string featureTitle,Gtk.Window parent) : base() { this.featureTitle = featureTitle; this.featureLicenceId = featureLicenceId; this.HasSeparator = false; if(parent!=null) this.TransientFor = parent; this.WidthRequest = 570; this.HeightRequest = 450; this.ModifyBg (Gtk.StateType.Normal, Style.White); string userLicenceId ="-100"; if(MainClass.User != null){ userLicenceId = MainClass.User.LicenseId; } int iTyp =0; if(!Int32.TryParse(userLicenceId,out iTyp)){ iTyp = -100; } featureLicence = MainClass.LicencesSystem.GetLicence(this.featureLicenceId.ToString()); handCursor = new Gdk.Cursor (Gdk.CursorType.Hand2); regularCursor = new Gdk.Cursor (Gdk.CursorType.Xterm); viewHeader = new TextView (); viewHeader.CanFocus = false; TextBuffer buffer = viewHeader.Buffer; viewFooter = new TextView (); TextBuffer buffer2 = viewFooter.Buffer; viewFooter.KeyPressEvent += new KeyPressEventHandler (KeyPress); viewFooter.WidgetEventAfter += new WidgetEventAfterHandler (EventAfter); viewFooter.MotionNotifyEvent += new MotionNotifyEventHandler (MotionNotify); viewFooter.HeightRequest = 15; viewFooter.CanFocus = false; viewTable = new TextView (); viewTable.CanFocus = false; TextBuffer buffer3 = viewTable.Buffer; ScrolledWindow sw = new ScrolledWindow (); sw.SetPolicy (PolicyType.Automatic, PolicyType.Automatic); sw.HeightRequest = 115; sw.Add (viewHeader); ScrolledWindow sw2 = new ScrolledWindow (); sw2.SetPolicy (PolicyType.Automatic, PolicyType.Automatic); sw2.HeightRequest = 15; sw2.Add (viewFooter); ScrolledWindow sw3 = new ScrolledWindow (); sw3.SetPolicy (PolicyType.Automatic, PolicyType.Automatic); sw3.Add (viewTable); CreateTags (buffer); CreateTags (buffer2); CreateTags (buffer3); InsertTextHeader (buffer); InsertTextFooter (buffer2); InsertTextTable (buffer3); Table tbl = new Table(4,1,false); if(MainClass.Platform.IsMac) tbl.BorderWidth=20; else tbl.BorderWidth=6; BannerButton btnBuy = new BannerButton(); btnBuy.ModifyBase(StateType.Normal,new Gdk.Color(109,158,24)); btnBuy.ModifyBg(StateType.Normal,new Color(109,158,24)); btnBuy.HeightRequest = 38; btnBuy.WidthRequest = 170; string buyPath = System.IO.Path.Combine(MainClass.Paths.ResDir,"btnBuy.png"); btnBuy.ButtonPressEvent+= delegate(object o, ButtonPressEventArgs args) { string url = "http://moscrif.com/download?t={0}"; if (MainClass.User!=null && (!String.IsNullOrEmpty(MainClass.User.Token))) { url = string.Format(url,MainClass.User.Token); } System.Diagnostics.Process.Start(url); this.Respond( Gtk.ResponseType.Ok ); }; btnBuy.ImageIcon = new Pixbuf(buyPath); BannerButton btnCancel = new BannerButton(); btnCancel.HeightRequest = 38; btnCancel.WidthRequest = 170; string cancelPath = System.IO.Path.Combine(MainClass.Paths.ResDir,"btnCancel.png"); btnCancel.ImageIcon = new Pixbuf(cancelPath); btnCancel.ButtonPressEvent+= delegate(object o, ButtonPressEventArgs args) { this.Respond( Gtk.ResponseType.Cancel ); }; Table tblButton = new Table (1,4,false); tblButton.ColumnSpacing = 12; tblButton.BorderWidth = 6; tblButton.Attach(new Label(""),0,1,0,1,AttachOptions.Expand,AttachOptions.Expand,0,0); tblButton.Attach(btnCancel,1,2,0,1,AttachOptions.Shrink,AttachOptions.Shrink,0,0); tblButton.Attach(btnBuy,2,3,0,1,AttachOptions.Shrink,AttachOptions.Shrink,0,0); tblButton.Attach(new Label(""),3,4,0,1,AttachOptions.Expand,AttachOptions.Expand,0,0); tbl.Attach(sw,0,1,0,1,AttachOptions.Fill,AttachOptions.Fill,0,0); tbl.Attach(sw3,0,1,1,2,AttachOptions.Fill|AttachOptions.Expand,AttachOptions.Fill|AttachOptions.Expand,0,0); tbl.Attach(tblButton,0,1,2,3,AttachOptions.Fill,AttachOptions.Fill,0,0); tbl.Attach(sw2,0,1,3,4,AttachOptions.Fill,AttachOptions.Shrink,0,0); tbl.ShowAll(); this.VBox.Add (tbl); this.ShowAll(); }
public PropertyGridTable(EditorManager editorManager, PropertyGrid parentGrid) { Mono.TextEditor.GtkWorkarounds.FixContainerLeak (this); this.editorManager = editorManager; WidgetFlags |= Gtk.WidgetFlags.AppPaintable; Events |= Gdk.EventMask.PointerMotionMask; CanFocus = true; resizeCursor = new Cursor (CursorType.SbHDoubleArrow); handCursor = new Cursor (CursorType.Hand1); discloseDown = Xwt.Drawing.Image.FromResource ("disclose-arrow-down-light-16.png"); discloseUp = Xwt.Drawing.Image.FromResource ("disclose-arrow-up-light-16.png"); }
private bool HideCursor() { if (view.InPanMotion) { return false; } if (empty_cursor == null) empty_cursor = GdkUtils.CreateEmptyCursor (GdkWindow.Display); this.GdkWindow.Cursor = empty_cursor; view.GdkWindow.Cursor = empty_cursor; return false; }
public TextTool() { cursor_hand = new Gdk.Cursor(PintaCore.Chrome.Canvas.Display, PintaCore.Resources.GetIcon("Cursor.Pan.png"), 8, 8); }
protected override void OnDestroyed () { if (handCursor != null) { handCursor.Dispose (); handCursor = null; } base.OnDestroyed (); }
public void SetCursorForTool(DrawTool tool) { string cursorStr = null; Gdk.Cursor cursor = null; if (widget.GdkWindow == null) { return; } switch (tool) { case DrawTool.Line: cursorStr = "arrow"; break; case DrawTool.Cross: cursorStr = "cross"; break; case DrawTool.Text: cursorStr = "text"; break; case DrawTool.Counter: cursorStr = "number"; break; case DrawTool.Ellipse: case DrawTool.CircleArea: cursorStr = "ellipse"; break; case DrawTool.Rectangle: case DrawTool.RectangleArea: cursorStr = "rect"; break; case DrawTool.Angle: cursorStr = "angle"; break; case DrawTool.Pen: cursorStr = "freehand"; break; case DrawTool.Eraser: cursorStr = "eraser"; break; case DrawTool.Player: cursorStr = "player"; break; case DrawTool.Zoom: cursorStr = "zoom"; break; case DrawTool.CanMove: cursorStr = "hand_opened"; break; case DrawTool.Move: cursorStr = "hand_closed"; break; case DrawTool.Selection: cursorStr = "hand_select"; break; default: cursor = null; break; } if (cursorStr == null) { widget.GdkWindow.Cursor = cursor; } else { Image img = App.Current.ResourcesLocator.LoadImage(Path.Combine("images/cursors", cursorStr)); Cursor c = new Cursor(widget.Display, img.Value, 0, 0); widget.GdkWindow.Cursor = c; } }
public void SetCursorForTool(DrawTool tool) { string cursorStr = null; Gdk.Cursor cursor = null; switch (tool) { case DrawTool.Line: cursorStr = "arrow"; break; case DrawTool.Cross: cursorStr = "cross"; break; case DrawTool.Text: cursorStr = "text"; break; case DrawTool.Counter: cursorStr = "number"; break; case DrawTool.Ellipse: case DrawTool.CircleArea: cursorStr = "ellipse"; break; case DrawTool.Rectangle: case DrawTool.RectangleArea: cursorStr = "rect"; break; case DrawTool.Angle: cursorStr = "angle"; break; case DrawTool.Pen: cursorStr = "freehand"; break; case DrawTool.Eraser: cursorStr = "eraser"; break; case DrawTool.Player: cursorStr = "player"; break; case DrawTool.Zoom: cursorStr = "zoom"; break; case DrawTool.CanMove: cursorStr = "hand_opened"; break; case DrawTool.Move: cursorStr = "hand_closed"; break; case DrawTool.Selection: cursorStr = "hand_select"; break; default: cursor = null; break; } if (cursorStr == null) { widget.GdkWindow.Cursor = cursor; } else { Image img = Image.LoadFromFile (Path.Combine (Config.ImagesDir, "cursors", cursorStr)); Cursor c = new Cursor (widget.Display, img.Value, 0, 0); widget.GdkWindow.Cursor = c; } }
protected override void OnDestroyed () { allNotebooks.Remove (this); if (ActiveNotebook == this) ActiveNotebook = null; if (fleurCursor != null) { fleurCursor.Dispose (); fleurCursor = null; } base.OnDestroyed (); }
public TextTool() { cursor_hand = new Gdk.Cursor (PintaCore.Chrome.DrawingArea.Display, PintaCore.Resources.GetIcon ("Tools.Pan.png"), 0, 0); engine = new TextEngine (); }
protected override void OnDestroyed() { base.OnDestroyed (); if (resizeCursor != null) { resizeCursor.Dispose (); resizeCursor = null; } }
static MouseFunc() { _defaultCursor = LoadCursor("cursor-select.png"); }
protected override void OnDestroyed() { view.MotionNotifyEvent -= HandleImageViewMotion; view.Item.Changed -= HandleItemChanged; view.ZoomChanged -= HandleViewZoomChanged; opened_hand_cursor.Dispose (); closed_hand_cursor.Dispose (); opened_hand_cursor = null; closed_hand_cursor = null; base.OnDestroyed (); }
public TextTool() { cursor_hand = new Gdk.Cursor(PintaCore.Chrome.Canvas.Display, PintaCore.Resources.GetIcon("Tools.Pan.png"), 0, 0); engine = new TextEngine(); }
protected BaseTool () { CurrentCursor = DefaultCursor; PintaCore.Workspace.ActiveDocumentChanged += Workspace_ActiveDocumentChanged; }