C# Class Paint.ToolBox

Inheritance: IToolBox
Afficher le fichier Open project: RandolphBurt/MonoGame-iOS-SimplePaint

Méthodes publiques

Méthode Description
CheckTouchCollision ( ITouchPoint touchPosition ) : bool

Checks wheter a particular touch point (user pressing the screen) is within the bounds of one of the tools.

Draw ( bool refreshDisplay ) : void

Draw the toolbox (and all containing tools) on to the image

ToolBox ( ToolboxLayoutDefinition toolboxLayoutDefinition, IGraphicsDisplay graphicsDisplay, int scale ) : System

Initializes a new instance of the Paint.ToolBox class.

Méthodes protégées

Méthode Description
AddButton ( ToolboxLayoutDefinitionStandardToolsButtonsButton buttonLayout ) : void

Creates a button and adds it.

AddButtons ( ToolboxLayoutDefinitionStandardToolsButtonsButton buttons ) : void

Creates all the buttons and adds them to our list of controls

AddTool ( IToolBoxTool tool ) : void

Adds the tool to our toolbox

DrawBackground ( ) : void

Draws the background (and border)

DrawTools ( bool refreshDisplay ) : void

Draws the tools.

OnExitButtonPressed ( EventArgs e ) : void

Raises the exit selected changed event.

Private Methods

Méthode Description
AddStandardTools ( ToolboxLayoutDefinitionStandardTools standardTools ) : void

Adds the standard tools.

TranslateToolboxLayoutColor ( ColorType color ) : Color

Translates the toolbox layout color type to a Color.

Method Details

AddButton() protected méthode

Creates a button and adds it.
protected AddButton ( ToolboxLayoutDefinitionStandardToolsButtonsButton buttonLayout ) : void
buttonLayout Paint.ToolboxLayout.ToolboxLayoutDefinitionStandardToolsButtonsButton /// Button layout. ///
Résultat void

AddButtons() protected méthode

Creates all the buttons and adds them to our list of controls
protected AddButtons ( ToolboxLayoutDefinitionStandardToolsButtonsButton buttons ) : void
buttons Paint.ToolboxLayout.ToolboxLayoutDefinitionStandardToolsButtonsButton
Résultat void

AddTool() protected méthode

Adds the tool to our toolbox
protected AddTool ( IToolBoxTool tool ) : void
tool IToolBoxTool /// The tool to add to the toolbox ///
Résultat void

CheckTouchCollision() public méthode

Checks wheter a particular touch point (user pressing the screen) is within the bounds of one of the tools.
public CheckTouchCollision ( ITouchPoint touchPosition ) : bool
touchPosition ITouchPoint
Résultat bool

Draw() public méthode

Draw the toolbox (and all containing tools) on to the image
public Draw ( bool refreshDisplay ) : void
refreshDisplay bool /// True = we should redraw the entire control /// False = just draw any updates ///
Résultat void

DrawBackground() protected méthode

Draws the background (and border)
protected DrawBackground ( ) : void
Résultat void

DrawTools() protected méthode

Draws the tools.
protected DrawTools ( bool refreshDisplay ) : void
refreshDisplay bool /// True = we should redraw the entire control /// False = just draw any updates ///
Résultat void

OnExitButtonPressed() protected méthode

Raises the exit selected changed event.
protected OnExitButtonPressed ( EventArgs e ) : void
e System.EventArgs /// Any relevant EventArgs (should be EventArgs.Empty) ///
Résultat void

ToolBox() public méthode

Initializes a new instance of the Paint.ToolBox class.
public ToolBox ( ToolboxLayoutDefinition toolboxLayoutDefinition, IGraphicsDisplay graphicsDisplay, int scale ) : System
toolboxLayoutDefinition Paint.ToolboxLayout.ToolboxLayoutDefinition
graphicsDisplay IGraphicsDisplay
scale int
Résultat System