C# Class ComponentFactory.Krypton.Toolkit.ButtonController

Process mouse events for a standard button.
Inheritance: GlobalId, IMouseController, IKeyController, ISourceController
Mostra file Open project: ComponentFactory/Krypton Class Usage Examples

Public Methods

Method Description
ButtonController ( ViewBase target, NeedPaintHandler needPaint ) : System

Initialize a new instance of the ButtonController class.

ClearDragRect ( ) : void

Reset the dragging rect to prevent any dragging starting.

DoubleClick ( Point pt ) : void

Left mouse button double click.

GotFocus ( Control c ) : void

Source control has lost the focus.

KeyDown ( Control c, KeyEventArgs e ) : void

Key has been pressed down.

KeyPress ( Control c, KeyPressEventArgs e ) : void

Key has been pressed.

KeyUp ( Control c, KeyEventArgs e ) : bool

Key has been released.

LostFocus ( Control c ) : void

Source control has lost the focus.

MouseDown ( Control c, Point pt, MouseButtons button ) : bool

Mouse button has been pressed in the view.

MouseEnter ( Control c ) : void

Mouse has entered the view.

MouseLeave ( Control c, ViewBase next ) : void

Mouse has left the view.

MouseMove ( Control c, Point pt ) : void

Mouse has moved inside the view.

MouseUp ( Control c, Point pt, MouseButtons button ) : void

Mouse button has been released in the view.

PerformNeedPaint ( ) : void

Fires the NeedPaint event.

PerformNeedPaint ( bool needLayout ) : void

Fires the NeedPaint event.

RemoveFixed ( ) : void

Remove the fixed pressed mode.

Protected Methods

Method Description
OnButtonDragOffset ( ButtonDragOffsetEventArgs e ) : void

Raises the ButtonDragOffset event.

OnButtonDragRectangle ( ButtonDragRectangleEventArgs e ) : void

Raises the ButtonDragRectangle event.

OnClick ( MouseEventArgs e ) : void

Raises the Click event.

OnDragEnd ( Point mousePt ) : void

Raises the DragEnd event.

OnDragMove ( Point mousePt ) : void

Raises the DragMove event.

OnDragQuit ( ) : void

Raises the DragQuit event.

OnDragStart ( Point mousePt, Point offset, Control c ) : void

Raises the DragStart event.

OnMouseSelect ( MouseEventArgs e ) : void

Raises the MouseSelect event.

OnNeedPaint ( bool needLayout ) : void

Raises the NeedPaint event.

OnRightClick ( MouseEventArgs e ) : void

Raises the RightClick event.

UpdateTargetState ( Control c ) : void

Set the correct visual state of the target.

UpdateTargetState ( Point pt ) : void

Set the correct visual state of the target.

ViewIsPartOfButton ( ViewBase next ) : bool

Discovers if the provided view is part of the button.

Private Methods

Method Description
OnRepeatTimer ( object sender, EventArgs e ) : void

Method Details

ButtonController() public method

Initialize a new instance of the ButtonController class.
public ButtonController ( ViewBase target, NeedPaintHandler needPaint ) : System
target ViewBase Target for state changes.
needPaint NeedPaintHandler Delegate for notifying paint requests.
return System

ClearDragRect() public method

Reset the dragging rect to prevent any dragging starting.
public ClearDragRect ( ) : void
return void

DoubleClick() public method

Left mouse button double click.
public DoubleClick ( Point pt ) : void
pt Point Mouse position relative to control.
return void

GotFocus() public method

Source control has lost the focus.
public GotFocus ( Control c ) : void
c Control Reference to the source control instance.
return void

KeyDown() public method

Key has been pressed down.
public KeyDown ( Control c, KeyEventArgs e ) : void
c Control Reference to the source control instance.
e KeyEventArgs A KeyEventArgs that contains the event data.
return void

KeyPress() public method

Key has been pressed.
public KeyPress ( Control c, KeyPressEventArgs e ) : void
c Control Reference to the source control instance.
e KeyPressEventArgs A KeyPressEventArgs that contains the event data.
return void

KeyUp() public method

Key has been released.
public KeyUp ( Control c, KeyEventArgs e ) : bool
c Control Reference to the source control instance.
e KeyEventArgs A KeyEventArgs that contains the event data.
return bool

LostFocus() public method

Source control has lost the focus.
public LostFocus ( Control c ) : void
c Control Reference to the source control instance.
return void

MouseDown() public method

Mouse button has been pressed in the view.
public MouseDown ( Control c, Point pt, MouseButtons button ) : bool
c Control Reference to the source control instance.
pt Point Mouse position relative to control.
button MouseButtons Mouse button pressed down.
return bool

MouseEnter() public method

Mouse has entered the view.
public MouseEnter ( Control c ) : void
c Control Reference to the source control instance.
return void

MouseLeave() public method

Mouse has left the view.
public MouseLeave ( Control c, ViewBase next ) : void
c Control Reference to the source control instance.
next ViewBase Reference to view that is next to have the mouse.
return void

MouseMove() public method

Mouse has moved inside the view.
public MouseMove ( Control c, Point pt ) : void
c Control Reference to the source control instance.
pt Point Mouse position relative to control.
return void

MouseUp() public method

Mouse button has been released in the view.
public MouseUp ( Control c, Point pt, MouseButtons button ) : void
c Control Reference to the source control instance.
pt Point Mouse position relative to control.
button MouseButtons Mouse button released.
return void

OnButtonDragOffset() protected method

Raises the ButtonDragOffset event.
protected OnButtonDragOffset ( ButtonDragOffsetEventArgs e ) : void
e ButtonDragOffsetEventArgs An ButtonDragOffsetEventArgs containing the event args.
return void

OnButtonDragRectangle() protected method

Raises the ButtonDragRectangle event.
protected OnButtonDragRectangle ( ButtonDragRectangleEventArgs e ) : void
e ButtonDragRectangleEventArgs An ButtonDragRectangleEventArgs containing the event args.
return void

OnClick() protected method

Raises the Click event.
protected OnClick ( MouseEventArgs e ) : void
e MouseEventArgs A MouseEventArgs containing the event data.
return void

OnDragEnd() protected method

Raises the DragEnd event.
protected OnDragEnd ( Point mousePt ) : void
mousePt Point Mouse point at time of event.
return void

OnDragMove() protected method

Raises the DragMove event.
protected OnDragMove ( Point mousePt ) : void
mousePt Point Mouse point at time of event.
return void

OnDragQuit() protected method

Raises the DragQuit event.
protected OnDragQuit ( ) : void
return void

OnDragStart() protected method

Raises the DragStart event.
protected OnDragStart ( Point mousePt, Point offset, Control c ) : void
mousePt Point Mouse point at time of event.
offset Point Offset compared to target.
c Control Control that is source of drag start.
return void

OnMouseSelect() protected method

Raises the MouseSelect event.
protected OnMouseSelect ( MouseEventArgs e ) : void
e MouseEventArgs A MouseEventArgs containing the event data.
return void

OnNeedPaint() protected method

Raises the NeedPaint event.
protected OnNeedPaint ( bool needLayout ) : void
needLayout bool Does the palette change require a layout.
return void

OnRightClick() protected method

Raises the RightClick event.
protected OnRightClick ( MouseEventArgs e ) : void
e MouseEventArgs A MouseEventArgs containing the event data.
return void

PerformNeedPaint() public method

Fires the NeedPaint event.
public PerformNeedPaint ( ) : void
return void

PerformNeedPaint() public method

Fires the NeedPaint event.
public PerformNeedPaint ( bool needLayout ) : void
needLayout bool Does the palette change require a layout.
return void

RemoveFixed() public method

Remove the fixed pressed mode.
public RemoveFixed ( ) : void
return void

UpdateTargetState() protected method

Set the correct visual state of the target.
protected UpdateTargetState ( Control c ) : void
c Control Owning control.
return void

UpdateTargetState() protected method

Set the correct visual state of the target.
protected UpdateTargetState ( Point pt ) : void
pt Point Mouse point.
return void

ViewIsPartOfButton() protected method

Discovers if the provided view is part of the button.
protected ViewIsPartOfButton ( ViewBase next ) : bool
next ViewBase View to investigate.
return bool