public override void GetRequiredPosition(TextEditor editor, Components.Window tipWindow, out int requiredWidth, out double xalign) { var win = (TooltipInformationWindow)tipWindow; requiredWidth = (int)win.Width; xalign = 0.5; }
public override void ShowTooltipWindow(TextEditor editor, Components.Window tipWindow, TooltipItem item, Xwt.ModifierKeys modifierState, int mouseX, int mouseY) { base.ShowTooltipWindow(editor, tipWindow, item, modifierState, mouseX, mouseY); var info = (TaggedTooltipInformation <CodeActions.CodeActionContainer>)item.Item; var sourceEditorView = editor.GetContent <SourceEditorView> (); var codeActionEditorExtension = editor.GetContent <CodeActionEditorExtension> (); var loc = editor.OffsetToLocation(info.Tag.Span.Start); if (info.Tag?.FloatingWidgetShown == true) { var point = sourceEditorView.TextEditor.TextArea.LocationToPoint(loc.Line, loc.Column); point.Y += (int)editor.GetLineHeight(loc.Line); var window = (LanguageItemWindow)tipWindow; if (floatingWidget != null) { floatingWidget.Destroy(); floatingWidget = null; } floatingWidget = new FloatingQuickFixIconWidget(codeActionEditorExtension, window, sourceEditorView, SmartTagSeverity.ErrorFixes, info.Tag, point); sourceEditorView.TextEditor.GdkWindow.GetOrigin(out int ox, out int oy); floatingWidget.Move(ox + (int)point.X, oy + (int)(point.Y + 4)); window.Tag = floatingWidget; window.EnterNotifyEvent += delegate { floatingWidget.CancelDestroy(); }; window.LeaveNotifyEvent += delegate { floatingWidget.QueueDestroy(); }; } }
public override bool GetIsFullscreen(Components.Window window) { WINDOWPLACEMENT lpwndpl = new WINDOWPLACEMENT(); lpwndpl.length = Marshal.SizeOf(lpwndpl); Gtk.Window controlWindow = window; IntPtr handle = GdkWin32.HgdiobjGet(controlWindow.GdkWindow); Win32.GetWindowPlacement(handle, ref lpwndpl); return(lpwndpl.showCmd == Win32.SW_SHOWMAXIMIZED); }
public override bool IsInteractive(TextEditor editor, Components.Window tipWindow) { return(true); }
public static Task <bool> Run(string url, SupportedCredentialTypes types, Credentials cred, Components.Window parentWindow = null) { return(Runtime.RunInMainThread(() => { var engine = Platform.IsMac ? Toolkit.NativeEngine : Toolkit.CurrentEngine; var response = false; engine.Invoke(() => { using (var xwtDialog = new XwtCredentialsDialog(url, types, cred)) { response = xwtDialog.Run(parentWindow ?? IdeServices.DesktopService.GetFocusedTopLevelWindow()) == Command.Ok; } }); return response; })); }
public MessageDialogProgressMonitor(bool showProgress, bool allowCancel, bool showDetails, bool hideWhenDone, Components.Window parent) : base(Runtime.MainSynchronizationContext) { if (showProgress) { var parentWindow = parent ?? DesktopService.GetFocusedTopLevelWindow(); dialog = new ProgressDialog(parentWindow, allowCancel, showDetails); dialog.Message = ""; MessageService.PlaceDialog(dialog, parentWindow); dialog.Show(); dialog.CancellationTokenSource = CancellationTokenSource; DispatchService.RunPendingEvents(); this.hideWhenDone = hideWhenDone; this.showDetails = showDetails; } }
public override void SetIsFullscreen(Components.Window window, bool isFullscreen) { //no-op as we have not yet implemented this }
public override bool GetIsFullscreen(Components.Window window) { //the Fullscreen functionality is broken in GTK on Win7+ //TODO: implement a workaround. return(false); }
public QuickAccessKeywordAssignedWindow(Components.Window window) { this.window = window; InitializeComponent(); }