C# Class CatEye.StageOperationParametersWidget

Inheritance: Gtk.Bin, IStageOperationParametersEditor
Show file Open project: bigfatbrowncat/CatEye Class Usage Examples

Public Methods

Method Description
AnalyzeImage ( IBitmapCore image ) : void

Handles that the image is changed. Should be called from the outside. Override it to do some recalculations.

DrawEditor ( IBitmapView view ) : void

Adds editor modifications to picture. For example, some handlers to change parameters graphically, the crop frame and so on.

ReportMouseButton ( int x, int y, int width, int height, uint button_id, bool is_down ) : bool

Handles mouse button state change i.e. the user pushed or released the button. Base method should not be called when overridden.

ReportMousePosition ( int x, int y, int width, int height ) : bool

Handles mouse position change. Base method should not be called when overridden.

StageOperationParametersWidget ( StageOperationParameters parameters ) : System

Protected Methods

Method Description
EndChangingParameters ( ) : void

Should be called after changing Parameters properties from Widget UI.

Used to prevent calling HandleParametersChangedBySomeoneElse() handler.

HandleParametersChangedNotByUI ( ) : void To avoid calling of this handler when the class changes the parameter by itself, you should enclose changing operators with StartChangingParameters() and EndChangingParameters() calls. StartChangingParameters(); ((SomeChildClassOfParameters)Parameters).SomeProperty = some_value; EndChangingParameters();
OnShown ( ) : void
OnUserModified ( ) : void

Raises the UserModified event. Should be called every time when the user changes something in the widget's UI.

StartChangingParameters ( ) : void

Should be called before changing Parameters properties from Widget UI.

Used to prevent calling HandleParametersChangedBySomeoneElse() handler. Be careful! Don't forget to call EndChangingParameters() after changing.

Method Details

AnalyzeImage() public method

Handles that the image is changed. Should be called from the outside. Override it to do some recalculations.
public AnalyzeImage ( IBitmapCore image ) : void
image IBitmapCore
return void

DrawEditor() public method

Adds editor modifications to picture. For example, some handlers to change parameters graphically, the crop frame and so on.
public DrawEditor ( IBitmapView view ) : void
view IBitmapView
return void

EndChangingParameters() protected method

Should be called after changing Parameters properties from Widget UI.
Used to prevent calling HandleParametersChangedBySomeoneElse() handler.
protected EndChangingParameters ( ) : void
return void

HandleParametersChangedNotByUI() protected method

To avoid calling of this handler when the class changes the parameter by itself, you should enclose changing operators with StartChangingParameters() and EndChangingParameters() calls. StartChangingParameters(); ((SomeChildClassOfParameters)Parameters).SomeProperty = some_value; EndChangingParameters();
protected HandleParametersChangedNotByUI ( ) : void
return void

OnShown() protected method

protected OnShown ( ) : void
return void

OnUserModified() protected method

Raises the UserModified event. Should be called every time when the user changes something in the widget's UI.
protected OnUserModified ( ) : void
return void

ReportMouseButton() public method

Handles mouse button state change i.e. the user pushed or released the button. Base method should not be called when overridden.
public ReportMouseButton ( int x, int y, int width, int height, uint button_id, bool is_down ) : bool
x int /// X coordinate from the left top corner of the image ///
y int /// Y coordinate from the left top corner of the image ///
width int
height int
button_id uint /// The button which state is changed. ///
is_down bool /// true if the button is down now, false if it's up. ///
return bool

ReportMousePosition() public method

Handles mouse position change. Base method should not be called when overridden.
public ReportMousePosition ( int x, int y, int width, int height ) : bool
x int
y int
width int
height int
return bool

StageOperationParametersWidget() public method

public StageOperationParametersWidget ( StageOperationParameters parameters ) : System
parameters StageOperationParameters
return System

StartChangingParameters() protected method

Should be called before changing Parameters properties from Widget UI.
Used to prevent calling HandleParametersChangedBySomeoneElse() handler. Be careful! Don't forget to call EndChangingParameters() after changing.
protected StartChangingParameters ( ) : void
return void