NShape Reference
IDiagramPresenter Interface

<< Click to Display Table of Contents >>

Navigation:  Class Reference > Namespace Dataweb.NShape.Controllers >

NShape Reference
IDiagramPresenter Interface

Previous pageReturn to chapter overviewNext page

Defines a diagram presenter widget.

Syntax

public interface IDiagramPresenter : ISynchronizeInvoke

Description

Defines a diagram presenter widget.

Public Properties

Name

Description

ActiveLayers

Returns a bitwise combination of LayerIds.

ActiveTool

The currently active tool for manipulating the current diagram.

Capture

Specifies if the diagram presenter should capture mouse movement.

CloseCaptionEditor

Closes the currently open text editor. The parameter specifies whether changes to the shape's text should be applied or discarded.

ConnectonPointShape

Specifies the shape of connection points when a shape is selected.

Diagram

The displayed diagram.

DiagramSetController

A DiagramSetController that is connected to a project.

DisplayService

Returns a DisplayService instance.

Font

The current font.

GridSize

The spacing between grid lines in display units.

GripSize

The size of the grips representing the shape's control points

HiddenLayers

Returns a bitwise combination of currently hidden LayerIds. Layers can be hidden manually (e.g. by the LayerController / LayerPresenter) or automatically, if the current zoom level exceeds their LowerZoomTreshold or UpperZoomTreshold.

HighQualityRendering

Specifies the rendering quaity of the displayed content.

MinRotateRange

Specifies the minimum distance of the mouse cursor from a shape's rotation point before a shape can be rotated.

Project

The DiagramSetController's project.

ResizeGripShape

Specifies the shape of control points used for resizing when a shape is selected.

SelectedShapes

A shape collection of selected shapes sorted by Z-Order

IsGridVisible

Specified whether grid lines should be drawn or not.

SnapDistance

Specifies the distance inbetween a dragged control point or shape 'snaps' to a nearby grid line or connection point.

SnapToGrid

Specifies if dragged control points or shapes should snap to nearby grid lines or connection points.

ZoomedGripSize

Specifies the zoomed/unzoomed size of the drawn grips in display units.

ZoomLevel

Specifies the current zoom level

Public Methods

Name

Description

ControlToDiagram

Calculates diagram coordinates from control coordinates

DiagramToControl

Calculates control coordinates from diagram coordinates

DrawAnglePreview

Draws rotation preview for the rotated shape.

DrawCaptionBounds

Draws the text bounds of a caption.

DrawConnectionPoint

Draws a grip indicating a connection point at the position of the given control point.

DrawLine

Draws a line.

DrawResizeGrip

Draws a grip indicating a control point used for resizing shapes at the position of the given control point.

DrawRotateGrip

Draws a grip indicating a control point used for rotating shapes at the position of the given control point.

DrawSelectionFrame

Draws a selection frame.

DrawShape

Draws a single shape.

DrawShapeOutline

Draws the outline of a single shape.

DrawShapes

Draws a collection of shapes

DrawSnapIndicators

Draw lines and grips indicating that a dragged control point or shape has been snapped to a nearby grid line.

EnsureVisible

Scrolls and/or zooms the diagram until the given shape or area is visible.

InvalidateDiagram

Invalidate the given area of the diagram in order to cause redrawing.

InvalidateGrips

Invalidates all grips of all control points meeting the given control point capability constraint for each of the given shapes.

InvalidateSnapIndicators

Invalidate snap indicators drawn for the given shape.

IsLayerActive

Tests wether the given layer(s) is/are active or not.

IsLayerVisible

Tests wether the given layer(s) is/are visible or not.

OpenCaptionEditor

Opens a caption editor on top of the given captioned shape's caption.

ResetTransformation

Resets transformation of the graphics context.

RestoreTransformation

Transforms the graphics context.

ResumeUpdate

Stops ignoring/collecting calls of "InvalidateDiagram" and executes the collected calls at once.

ScreenToDiagram

Calculates diagram coordinates from screen coordinates.

SelectAll

Selects all shapes of the current diagram.

SelectShape

Selects a given shape (if it is not already selected).

SelectShapes

Selects a given collection of shapes (if it is not already selected).

SetCursor

Activates a registered cursor.

SetLayerActive

Set a Layer as the currently active Layer.

SetLayerVisibility

Shows/Hides the layer(s) with the given Id(s).

SuspendUpdate

Ignores (and collects) calls of "InvalidateDiagram" until ResumeUpdate is called.

UnselectAll

Unselects all selected shapes.

UnselectShape

Unselects the given shape.

Public Events

Name

Description

ActiveLayersChanged

Occurs when the active layers have changed.

DiagramChanged

Occurs when a property of the diagram has changed.

DiagramChanging

Occurs when the diagram is going to be changed.

LayerVisibilityChanged

Occurs when the visibility of a layer was changed.

ShapeClick

Occurs when a shape has been clicked.

ShapeDoubleClick

Occurs when a shape has been double clicked.

ShapeInsert

Occurs when a shape has been inserted.

ShapeRemove

Occurs when a shape has been removed from the diagram.

ShapesSelected

Occurs when a shape has been selected.

ZoomChanged

Occurs if the zoom level has changed.

Requirements

Namespace: Dataweb.NShape.Controllers

Assembly: Dataweb.NShape