C# Class BoxDiagrams.DiagramControl

A control that manages a set of Shape objects and manages a mouse-based user interface for drawing things.
This class has the following responsibilities: TODO
Inheritance: Util.WinForms.LLShapeWidgetControl
Mostrar archivo Open project: qwertie/ecsharp Class Usage Examples

Public Properties

Property Type Description
HitTestRadius Loyc.Geometry.Vector
KeyMap Dictionary,Symbol>

Protected Properties

Property Type Description
_focusShape Shape
_selectedShapes MSet

Private Properties

Property Type Description
AddShape void
AfterAction void
AfterShapesAdded void
AfterShapesRemoved void
BeginRemoveAnimation void
ClearText bool
ClickSelect void
Copy bool
Cut bool
DeleteSelected bool
DeleteShapes void
DeserializeAndEliminateDuplicateStyles BoxDiagrams.DiagramDocumentCore
DragAdornersChanged void
DuplicateSelected bool
HitTest Util.WinForms.HitTestResult
MatrixChanged void
PageDown bool
PageUp bool
Paste bool
PasteAndSelect BoxDiagrams.DiagramDocumentCore
RecreateSelectionAdorners void
S Symbol
Scroll void
ScrollDown bool
ScrollLeft bool
ScrollRight bool
ScrollUp bool
SelectAll bool
SerializeSelected System.IO.MemoryStream
ToPixelSpace Loyc.Geometry.Point
ToShapeSpace Loyc.Geometry.Point
ToShapeSpace Loyc.Geometry.Vector
Zoom void
ZoomIn bool
ZoomOut bool

Public Methods

Method Description
DiagramControl ( ) : System
GetBestAnchor ( Loyc.Geometry.Point input, int exitAngleMod8 = -1 ) : Anchor
Load ( string filename ) : void
ProcessShortcutKey ( KeyEventArgs e ) : bool
Save ( string filename ) : void
ShapesOnScreen ( Loyc.Geometry.Point mousePos ) : IEnumerable
WidgetsOnScreen ( Loyc.Geometry.Point mousePos ) : IEnumerable

Protected Methods

Method Description
GetSelType ( Shape shape ) : SelType
IsInputKey ( Keys keyData ) : bool
OnKeyDown ( KeyEventArgs e ) : void
OnKeyPress ( KeyPressEventArgs e ) : void
OnKeyUp ( KeyEventArgs e ) : void
OnMouseMove ( MouseEventArgs e ) : void
ShapesChanged ( ) : void

Private Methods

Method Description
AddShape ( Shape newShape ) : void
AfterAction ( bool @do ) : void
AfterShapesAdded ( IReadOnlyCollection newShapes ) : void
AfterShapesRemoved ( IReadOnlyCollection eraseSet ) : void
BeginRemoveAnimation ( MSet erasedShapes ) : void
ClearText ( bool run = true ) : bool
ClickSelect ( Shape clickedShape ) : void
Copy ( bool run = true ) : bool
Cut ( bool run = true ) : bool
DeleteSelected ( bool run = true ) : bool
DeleteShapes ( Set eraseSet ) : void
DeserializeAndEliminateDuplicateStyles ( Stream buf ) : BoxDiagrams.DiagramDocumentCore
DragAdornersChanged ( ) : void
DuplicateSelected ( bool run = true ) : bool
HitTest ( Loyc.Geometry.Point mouseLoc ) : Util.WinForms.HitTestResult
MatrixChanged ( ) : void
PageDown ( bool run = true ) : bool
PageUp ( bool run = true ) : bool
Paste ( bool run = true ) : bool
PasteAndSelect ( Stream buf, Loyc.Geometry.Vector offset ) : BoxDiagrams.DiagramDocumentCore
RecreateSelectionAdorners ( ) : void
S ( string s ) : Symbol
Scroll ( Loyc.Geometry.Vector pxAmount ) : void
ScrollDown ( bool run = true ) : bool
ScrollLeft ( bool run = true ) : bool
ScrollRight ( bool run = true ) : bool
ScrollUp ( bool run = true ) : bool
SelectAll ( bool run = true ) : bool
SerializeSelected ( ) : MemoryStream
ToPixelSpace ( Loyc.Geometry.Point px ) : Loyc.Geometry.Point
ToShapeSpace ( Loyc.Geometry.Point px ) : Loyc.Geometry.Point
ToShapeSpace ( Loyc.Geometry.Vector px ) : Loyc.Geometry.Vector
Zoom ( float factor ) : void
ZoomIn ( bool run = true ) : bool
ZoomOut ( bool run = true ) : bool

Method Details

DiagramControl() public method

public DiagramControl ( ) : System
return System

GetBestAnchor() public method

public GetBestAnchor ( Loyc.Geometry.Point input, int exitAngleMod8 = -1 ) : Anchor
input Loyc.Geometry.Point
exitAngleMod8 int
return Anchor

GetSelType() protected method

protected GetSelType ( Shape shape ) : SelType
shape Shape
return SelType

IsInputKey() protected method

protected IsInputKey ( Keys keyData ) : bool
keyData Keys
return bool

Load() public method

public Load ( string filename ) : void
filename string
return void

OnKeyDown() protected method

protected OnKeyDown ( KeyEventArgs e ) : void
e System.Windows.Forms.KeyEventArgs
return void

OnKeyPress() protected method

protected OnKeyPress ( KeyPressEventArgs e ) : void
e System.Windows.Forms.KeyPressEventArgs
return void

OnKeyUp() protected method

protected OnKeyUp ( KeyEventArgs e ) : void
e System.Windows.Forms.KeyEventArgs
return void

OnMouseMove() protected method

protected OnMouseMove ( MouseEventArgs e ) : void
e MouseEventArgs
return void

ProcessShortcutKey() public method

public ProcessShortcutKey ( KeyEventArgs e ) : bool
e System.Windows.Forms.KeyEventArgs
return bool

Save() public method

public Save ( string filename ) : void
filename string
return void

ShapesChanged() protected method

protected ShapesChanged ( ) : void
return void

ShapesOnScreen() public method

public ShapesOnScreen ( Loyc.Geometry.Point mousePos ) : IEnumerable
mousePos Loyc.Geometry.Point
return IEnumerable

WidgetsOnScreen() public method

public WidgetsOnScreen ( Loyc.Geometry.Point mousePos ) : IEnumerable
mousePos Loyc.Geometry.Point
return IEnumerable

Property Details

HitTestRadius public_oe property

public Vector,Loyc.Geometry HitTestRadius
return Loyc.Geometry.Vector

KeyMap public_oe property

public Dictionary,Symbol> KeyMap
return Dictionary,Symbol>

_focusShape protected_oe property

protected Shape _focusShape
return Shape

_selectedShapes protected_oe property

protected MSet _selectedShapes
return MSet