C# Class Sce.Atf.Controls.FloatInputControl

Control for editing a bounded int value
Inheritance: UserControl
显示文件 Open project: Pikachuxxxx/Razix

Public Methods

Method Description
FloatInputControl ( ) : System

Constructor

FloatInputControl ( float value, float min, float max ) : System

Constructor with initial and bounding values

SetMinMax ( float min, float max ) : void

Sets min and max

Protected Methods

Method Description
GetPosition ( float value ) : float

Translates from value to normalized position

Override this method to change the mapping between position and value, for example, for a logarithmic slider. This should be the inverse of GetValue().

GetValue ( float position ) : float

Translates from normalized trackbar position to value

Override this method to change the mapping between position and value, for example, for a logarithmic slider.

OnPaint ( PaintEventArgs e ) : void

Handles the event and performs custom processing

OnValueChanged ( EventArgs e ) : void

Raises the E:Sce.Atf.Controls.IntInputControl.ValueChanged event

OnValueEdited ( EventArgs e ) : void

Raises the E:Sce.Atf.Controls.IntInputControl.ValueEdited event

Private Methods

Method Description
Constrain ( float value ) : float
EndEdit ( bool forceNewValue ) : void
SetValue ( float value, bool forceNewValue ) : void
UpdateTextBox ( ) : void

Method Details

FloatInputControl() public method

Constructor
public FloatInputControl ( ) : System
return System

FloatInputControl() public method

Constructor with initial and bounding values
public FloatInputControl ( float value, float min, float max ) : System
value float Initial value
min float Minimum value
max float Maximum value
return System

GetPosition() protected method

Translates from value to normalized position
Override this method to change the mapping between position and value, for example, for a logarithmic slider. This should be the inverse of GetValue().
protected GetPosition ( float value ) : float
value float The value, in [Min..Max]
return float

GetValue() protected method

Translates from normalized trackbar position to value
Override this method to change the mapping between position and value, for example, for a logarithmic slider.
protected GetValue ( float position ) : float
position float The normalized trackbar position, in [0..1]
return float

OnPaint() protected method

Handles the event and performs custom processing
protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs A that contains the event data
return void

OnValueChanged() protected method

Raises the E:Sce.Atf.Controls.IntInputControl.ValueChanged event
protected OnValueChanged ( EventArgs e ) : void
e EventArgs The instance containing the event data
return void

OnValueEdited() protected method

Raises the E:Sce.Atf.Controls.IntInputControl.ValueEdited event
protected OnValueEdited ( EventArgs e ) : void
e EventArgs The instance containing the event data
return void

SetMinMax() public method

Sets min and max
public SetMinMax ( float min, float max ) : void
min float min value
max float max value
return void