C# Class ComponentFactory.Krypton.Toolkit.ButtonSpecView

Create and manage the view for a ButtonSpec definition.
Inheritance: GlobalId, IContentValues
Mostrar archivo Open project: ComponentFactory/Krypton Class Usage Examples

Public Methods

Method Description
ButtonSpecView ( PaletteRedirect redirector, IPaletteMetric paletteMetric, PaletteMetricPadding metricPadding, ButtonSpecManagerBase manager, ButtonSpec buttonSpec ) : System

Initialize a new instance of the ButtonSpecView class.

CreateController ( ViewDrawButton viewButton, NeedPaintHandler needPaint, MouseEventHandler clickHandler ) : ButtonSpecViewControllers

Create a button controller for the view.

Destruct ( ) : void

Destruct the previously created views.

GetImage ( PaletteState state ) : Image

Gets the content image.

GetImageTransparentColor ( PaletteState state ) : Color

Gets the content image transparent color.

GetLongText ( ) : string

Gets the content long text.

GetShortText ( ) : string

Gets the content short text.

PerformNeedPaint ( bool needLayout ) : void

Requests a repaint and optional layout be performed.

UpdateButtonStyle ( ) : void

Update the button style to reflect new button style setting.

UpdateChecked ( ) : bool

Update view button to reflect new button checked setting.

UpdateEnabled ( ) : bool

Update view button to reflect new button enabled setting.

UpdateVisible ( ) : bool

Update view button to reflect new button visible setting.

Protected Methods

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

Processes the finish of the button being pressed.

Private Methods

Method Description
OnClick ( object sender, MouseEventArgs e ) : void
OnKryptonContextMenuClosed ( object sender, System.Windows.Forms.ToolStripDropDownClosedEventArgs e ) : void
OnNeedPaint ( object sender, NeedLayoutEventArgs e ) : void
OnPropertyChanged ( object sender, PropertyChangedEventArgs e ) : void

Method Details

ButtonSpecView() public method

Initialize a new instance of the ButtonSpecView class.
public ButtonSpecView ( PaletteRedirect redirector, IPaletteMetric paletteMetric, PaletteMetricPadding metricPadding, ButtonSpecManagerBase manager, ButtonSpec buttonSpec ) : System
redirector PaletteRedirect Palette redirector.
paletteMetric IPaletteMetric Source for metric values.
metricPadding PaletteMetricPadding Padding metric for border padding.
manager ButtonSpecManagerBase Reference to owning manager.
buttonSpec ButtonSpec Access
return System

CreateController() public method

Create a button controller for the view.
public CreateController ( ViewDrawButton viewButton, NeedPaintHandler needPaint, MouseEventHandler clickHandler ) : ButtonSpecViewControllers
viewButton ViewDrawButton View to be controlled.
needPaint NeedPaintHandler Paint delegate.
clickHandler MouseEventHandler Reference to click handler.
return ButtonSpecViewControllers

Destruct() public method

Destruct the previously created views.
public Destruct ( ) : void
return void

GetImage() public method

Gets the content image.
public GetImage ( PaletteState state ) : Image
state PaletteState The state for which the image is needed.
return Image

GetImageTransparentColor() public method

Gets the content image transparent color.
public GetImageTransparentColor ( PaletteState state ) : Color
state PaletteState The state for which the image color is needed.
return Color

GetLongText() public method

Gets the content long text.
public GetLongText ( ) : string
return string

GetShortText() public method

Gets the content short text.
public GetShortText ( ) : string
return string

OnFinishDelegate() protected method

Processes the finish of the button being pressed.
protected OnFinishDelegate ( object sender, EventArgs e ) : void
sender object Source of the event.
e System.EventArgs An EventArgs that contains the event data.
return void

PerformNeedPaint() public method

Requests a repaint and optional layout be performed.
public PerformNeedPaint ( bool needLayout ) : void
needLayout bool Does the palette change require a layout.
return void

UpdateButtonStyle() public method

Update the button style to reflect new button style setting.
public UpdateButtonStyle ( ) : void
return void

UpdateChecked() public method

Update view button to reflect new button checked setting.
public UpdateChecked ( ) : bool
return bool

UpdateEnabled() public method

Update view button to reflect new button enabled setting.
public UpdateEnabled ( ) : bool
return bool

UpdateVisible() public method

Update view button to reflect new button visible setting.
public UpdateVisible ( ) : bool
return bool