/// <summary> Handle the ButtonPress event. </summary> /// <param name="source"> The widget, the ButtonPress event is assigned to. <see cref="XrwRectObj"/> </param> /// <param name="e"> The event data. <see cref="XawButtonEvent"/> </param> /// <remarks> Set XawButtonEvent. Set result to nonzero to stop further event processing. </remarks> void HandleMessageBoxButtonRelease(XrwRectObj source, XrwButtonEvent e) { if ((source is XrwCommand) && !(source as XrwCommand).Focused) { return; } XrwMessageBox messageBox = new XrwMessageBox(this, "Hallo an alle X11\nund Mono Develop\nFans da draußen!", "Mono Develop", X11Graphic.StockIcon.Information48TrueColor); ApplicationFramework.SetWmShellIcon(messageBox, APPICON_FILEPATH); this.AddTransientShell(messageBox); XrwDialogShell.Result result = messageBox.Run(); if (result == XrwDialogShell.Result.OK) { Console.WriteLine(CLASS_NAME + "::HandleMessageBoxButtonRelease () Message box closed with: OK"); ApplicationFramework.WriteStatus("Message box closed with: OK"); } else { Console.WriteLine(CLASS_NAME + "::HandleMessageBoxButtonRelease () Message box closed with: Cancel"); ApplicationFramework.WriteStatus("Message box closed with: Cancel"); } e.Result = 1; }
/// <summary> Handle the ButtonPress event. </summary> /// <param name="source"> The widget, the ButtonPress event is assigned to. <see cref="XrwRectObj"/> </param> /// <param name="e"> The event data. <see cref="XawButtonEvent"/> </param> /// <remarks> Set XawButtonEvent. Set result to nonzero to stop further event processing. </remarks> void HandleCloseButtonRelease(XrwRectObj source, XrwButtonEvent e) { if ((source is XrwCommand) && !(source as XrwCommand).Focused) { return; } this.DefaultClose(); e.Result = 1; }
/// <summary> Handle the ButtonPress event. </summary> /// <param name="source"> The widget, the ButtonPress event is assigned to. <see cref="XrwRectObj"/> </param> /// <param name="e"> The event data. <see cref="XawButtonEvent"/> </param> /// <remarks> Set XawButtonEvent. Set result to nonzero to stop further event processing. </remarks> void HandleCloseMenuButtonPress(XrwRectObj source, XrwButtonEvent e) { X11lib.XSetInputFocus(_display, _window, X11lib.TRevertTo.RevertToParent, (TInt)0); e.Result = 1; }
/// <summary> Handle the ButtonRelease event. </summary> /// <param name="e"> The event data. <see cref="XawButtonEvent"/> </param> /// <remarks> Set XawButtonEvent. Set result to nonzero to stop further event processing. </remarks> void HandleMenuEntry2ButtonRelease(XrwRectObj source, XrwButtonEvent e) { ApplicationFramework.WriteStatus("MenuEntryButton_2"); e.Result = 1; }