Create StatusStripEx similar to MenuStripEx and ToolStripEx to allow click through, and replace all our status bars with it
This commit is contained in:
parent
19f3b1b1da
commit
1895e15ea5
|
@ -73,6 +73,41 @@ public class MenuStripEx : MenuStrip
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This class adds on to the functionality provided in System.Windows.Forms.MenuStrip.
|
||||
/// </summary>
|
||||
public class StatusStripEx : StatusStrip
|
||||
{
|
||||
private bool clickThrough = true;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets whether the ToolStripEx honors item clicks when its containing form does
|
||||
/// not have input focus.
|
||||
/// </summary>
|
||||
public bool ClickThrough
|
||||
{
|
||||
get
|
||||
{
|
||||
return clickThrough;
|
||||
}
|
||||
set
|
||||
{
|
||||
clickThrough = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void WndProc(ref Message m)
|
||||
{
|
||||
base.WndProc(ref m);
|
||||
if (clickThrough &&
|
||||
m.Msg == NativeConstants.WM_MOUSEACTIVATE &&
|
||||
m.Result == (IntPtr)NativeConstants.MA_ACTIVATEANDEAT)
|
||||
{
|
||||
m.Result = (IntPtr)NativeConstants.MA_ACTIVATE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class NativeConstants
|
||||
{
|
||||
private NativeConstants(){}
|
||||
|
|
|
@ -284,7 +284,7 @@
|
|||
this.OnlineHelpMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.ForumsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.AboutMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.MainStatusBar = new System.Windows.Forms.StatusStrip();
|
||||
this.MainStatusBar = new StatusStripEx();
|
||||
this.DumpStatusButton = new System.Windows.Forms.ToolStripDropDownButton();
|
||||
this.EmuStatus = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.PlayRecordStatusButton = new System.Windows.Forms.ToolStripDropDownButton();
|
||||
|
@ -3248,7 +3248,7 @@
|
|||
private System.Windows.Forms.ToolStripMenuItem ToolBoxMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator12;
|
||||
private System.Windows.Forms.ToolStripMenuItem SwitchToFullscreenMenuItem;
|
||||
private System.Windows.Forms.StatusStrip MainStatusBar;
|
||||
private StatusStripEx MainStatusBar;
|
||||
private System.Windows.Forms.ToolStripStatusLabel EmuStatus;
|
||||
private System.Windows.Forms.ToolStripMenuItem MessagesMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem TI83SubMenu;
|
||||
|
|
|
@ -101,7 +101,7 @@
|
|||
this.SaveWindowPositionMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.AlwaysOnTopMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.FloatingWindowMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.NesPPUStatusBar = new System.Windows.Forms.StatusStrip();
|
||||
this.NesPPUStatusBar = new StatusStripEx();
|
||||
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.Messagetimer = new System.Windows.Forms.Timer(this.components);
|
||||
this.CHRROMGroup = new System.Windows.Forms.GroupBox();
|
||||
|
@ -942,7 +942,7 @@
|
|||
private System.Windows.Forms.ToolStripMenuItem CopyPatternToClipboardMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem CopySpriteToClipboardMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
|
||||
private System.Windows.Forms.StatusStrip NesPPUStatusBar;
|
||||
private StatusStripEx NesPPUStatusBar;
|
||||
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
|
||||
private System.Windows.Forms.Timer Messagetimer;
|
||||
private System.Windows.Forms.ToolStripMenuItem AlwaysOnTopMenuItem;
|
||||
|
|
|
@ -102,7 +102,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
this.TasView = new BizHawk.Client.EmuHawk.TasListView();
|
||||
this.Frame = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.Log = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.TasStatusStrip = new System.Windows.Forms.StatusStrip();
|
||||
this.TasStatusStrip = new StatusStripEx();
|
||||
this.MessageStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.SplicerStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.TasPlaybackBox = new BizHawk.Client.EmuHawk.PlaybackBox();
|
||||
|
@ -839,7 +839,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator12;
|
||||
private System.Windows.Forms.ToolStripMenuItem RestoreDefaultSettingsMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem AutoloadProjectMenuItem;
|
||||
private System.Windows.Forms.StatusStrip TasStatusStrip;
|
||||
private StatusStripEx TasStatusStrip;
|
||||
private System.Windows.Forms.ToolStripStatusLabel MessageStatusLabel;
|
||||
private PlaybackBox TasPlaybackBox;
|
||||
private BookmarksBranchesBox TasBookmarksBranchesBox;
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
this.ShowChangeCountsContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.ShowDiffContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.ShowDomainContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.statusStrip1 = new StatusStripEx();
|
||||
this.MessageLabel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolStrip1 = new ToolStripEx();
|
||||
this.newToolStripButton = new System.Windows.Forms.ToolStripButton();
|
||||
|
@ -1067,7 +1067,7 @@
|
|||
private System.Windows.Forms.ToolStripMenuItem ShowDomainContextMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem AlwaysOnTopMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem FloatingWindowMenuItem;
|
||||
private System.Windows.Forms.StatusStrip statusStrip1;
|
||||
private StatusStripEx statusStrip1;
|
||||
private System.Windows.Forms.ToolStripStatusLabel MessageLabel;
|
||||
private System.Windows.Forms.ToolStripButton ErrorIconButton;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue