BioImager  4.9.0
A .NET microscopy imaging application based on Bio library. Supports various microscopes by using imported libraries & GUI automation. Supports XInput game controllers to move stage, take images, run ImageJ macros on images or Bio C# scripts.
Loading...
Searching...
No Matches
BioImager.CodeView.ScrollTextBox Class Reference

TextBox with support for getting and setting the vertical scroll bar position, as well as listening to vertical scroll events. More...

Inheritance diagram for BioImager.CodeView.ScrollTextBox:

Protected Member Functions

override void WndProc (ref Message message)
 
override void OnKeyDown (System.Windows.Forms.KeyEventArgs e)
 
override void OnKeyUp (System.Windows.Forms.KeyEventArgs e)
 
override void OnResize (System.EventArgs e)
 
override void OnMouseDown (System.Windows.Forms.MouseEventArgs e)
 
override void OnMouseUp (System.Windows.Forms.MouseEventArgs e)
 
override void OnMouseMove (System.Windows.Forms.MouseEventArgs e)
 
override void OnFontChanged (System.EventArgs e)
 
override void Dispose (bool disposing)
 

Properties

int VerticalScrollPosition [get, set]
 
int HorizontalScrollPosition [get, set]
 

Events

System.Windows.Forms.ScrollEventHandler ScrollChanged
 

Detailed Description

TextBox with support for getting and setting the vertical scroll bar position, as well as listening to vertical scroll events.

Definition at line 68 of file CodeView.cs.

Constructor & Destructor Documentation

◆ ScrollTextBox()

BioImager.CodeView.ScrollTextBox.ScrollTextBox ( )

Definition at line 71 of file CodeView.cs.

72 {
73 _components = new System.ComponentModel.Container();
74 // Calculate width of "W" to set as the small horizontal increment
75 OnFontChanged(null);
76 }

Member Function Documentation

◆ Dispose()

override void BioImager.CodeView.ScrollTextBox.Dispose ( bool disposing)
protected

If the components are not null, dispose of them.

Parameters
disposingtrue to release both managed and unmanaged resources; false to release only unmanaged resources.

Definition at line 204 of file CodeView.cs.

207 {
208 if (disposing && (_components != null))
209 _components.Dispose();
210 base.Dispose(disposing);
211 }

◆ OnFontChanged()

override void BioImager.CodeView.ScrollTextBox.OnFontChanged ( System.EventArgs e)
protected

Definition at line 190 of file CodeView.cs.

193 {
194 base.OnFontChanged(e);
195 using (System.Drawing.Graphics graphics = this.CreateGraphics())
196 _fontWidth = (int)graphics.MeasureString("W", this.Font).Width;
197 TryFireScrollEvent();
198 }

◆ OnKeyDown()

override void BioImager.CodeView.ScrollTextBox.OnKeyDown ( System.Windows.Forms.KeyEventArgs e)
protected

Definition at line 123 of file CodeView.cs.

126 {
127 base.OnKeyDown(e);
128 TryFireScrollEvent();
129 }

◆ OnKeyUp()

override void BioImager.CodeView.ScrollTextBox.OnKeyUp ( System.Windows.Forms.KeyEventArgs e)
protected

If the user presses the up or down arrow key, then the scroll event is fired

Parameters
eThe event arguments.

Definition at line 134 of file CodeView.cs.

137 {
138 base.OnKeyUp(e);
139 TryFireScrollEvent();
140 }

◆ OnMouseDown()

override void BioImager.CodeView.ScrollTextBox.OnMouseDown ( System.Windows.Forms.MouseEventArgs e)
protected

Definition at line 154 of file CodeView.cs.

157 {
158 base.OnMouseDown(e);
159 TryFireScrollEvent();
160 }

◆ OnMouseMove()

override void BioImager.CodeView.ScrollTextBox.OnMouseMove ( System.Windows.Forms.MouseEventArgs e)
protected

Definition at line 175 of file CodeView.cs.

178 {
179 base.OnMouseMove(e);
180 if (e.Button != System.Windows.Forms.MouseButtons.None)
181 TryFireScrollEvent();
182 }

◆ OnMouseUp()

override void BioImager.CodeView.ScrollTextBox.OnMouseUp ( System.Windows.Forms.MouseEventArgs e)
protected

If the mouse is up, then try to fire the scroll event.

Parameters
eThe mouse event arguments.

Definition at line 165 of file CodeView.cs.

168 {
169 base.OnMouseUp(e);
170 TryFireScrollEvent();
171 }

◆ OnResize()

override void BioImager.CodeView.ScrollTextBox.OnResize ( System.EventArgs e)
protected

Definition at line 144 of file CodeView.cs.

147 {
148 base.OnResize(e);
149 TryFireScrollEvent();
150 }

◆ WndProc()

override void BioImager.CodeView.ScrollTextBox.WndProc ( ref Message message)
protected

Definition at line 110 of file CodeView.cs.

113 {
114 base.WndProc(ref message);
115 if (message.Msg == Win32.WM_VSCROLL
116 || message.Msg == Win32.WM_HSCROLL
117 || message.Msg == Win32.WM_MOUSEWHEEL
118 ) TryFireScrollEvent();
119 }

Property Documentation

◆ HorizontalScrollPosition

int BioImager.CodeView.ScrollTextBox.HorizontalScrollPosition
getset

Definition at line 96 of file CodeView.cs.

97 {
98 set { SetScroll(value, Win32.WM_HSCROLL, Win32.SB_HORZ); }
99 get { return GetScroll(Win32.SB_HORZ); }
100 }

◆ VerticalScrollPosition

int BioImager.CodeView.ScrollTextBox.VerticalScrollPosition
getset

Definition at line 84 of file CodeView.cs.

85 {
86 set { SetScroll(value, Win32.WM_VSCROLL, Win32.SB_VERT); }
87 get { return GetScroll(Win32.SB_VERT); }
88 }

Event Documentation

◆ ScrollChanged

System.Windows.Forms.ScrollEventHandler BioImager.CodeView.ScrollTextBox.ScrollChanged

Definition at line 107 of file CodeView.cs.


The documentation for this class was generated from the following file: