Click or drag to resize

GraphController Class

[Missing <summary> documentation for "T:Altaxo.Gui.Graph.Gdi.Viewing.GraphController"]

Inheritance Hierarchy
SystemObject
  Altaxo.Gui.WorkbenchAbstractViewContent
    Altaxo.Gui.Graph.Gdi.ViewingGraphController

Namespace: Altaxo.Gui.Graph.Gdi.Viewing
Assembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public class GraphController : AbstractViewContent, 
	IGraphController, IMVCANController, IMVCAController, IMVCController, IDisposable, 
	IApplyController, IGraphViewEventSink

The GraphController type exposes the following members.

Constructors
 NameDescription
Public methodGraphControllerInitializes a new instance of the GraphController class
Public methodGraphController(GraphDocument) Creates a GraphController which shows the GraphDocumentgraphdoc.
Top
Properties
 NameDescription
Public propertyActiveLayer Returns the currently active layer. There is always an active layer.
Public propertyAutoZoomFactorGets the current zoom factor that would be used for auto zoom, but does not set it. Does not change any member variables.
Public propertyCloseCommand
(Inherited from AbstractViewContent)
Public propertyCloseWithSolution
(Inherited from AbstractViewContent)
Public propertyContentId Gets or sets the content identifier. Here, the content identifier is calculated of the reference hash of the document. Setting is not implemented here.
(Inherited from AbstractViewContent)
Public propertyCurrentGraphTool 
Public propertyCurrentLayerNumber Get / sets the currently active layer by number.
Public propertyCurrentPlotNumber Get / sets the currently active plot by number.
Public propertyDoc 
Public propertyFactorForGraphToMouseCoordinateConversion Factor for conversion of graph units (in points = 1/72 inch) to mouse coordinates. The resolution used for this is _screenResolutionDpi.
Public propertyIconSource
(Inherited from AbstractViewContent)
Public propertyInfoTip
(Inherited from AbstractViewContent)
Public propertyInitiallyFocusedControl
(Inherited from AbstractViewContent)
Public propertyIsActive Gets or sets a value indicating whether the view of this instance is active in the UI.
(Inherited from AbstractViewContent)
Public propertyIsAutoZoomActive Enables / disable the autozoom feature.
Public propertyIsContentVisible Gets a value indicating whether the content of this document window is visible (it is if either IsActive or IsSelected is visible.
(Inherited from AbstractViewContent)
Public propertyIsDirty
(Inherited from AbstractViewContent)
Public propertyIsDisposed
(Inherited from AbstractViewContent)
Public propertyIsDisposeInProgress
(Inherited from AbstractViewContent)
Public propertyIsOverlayPaintingRequired 
Public propertyIsReadOnly Gets if the view content is read-only (can be saved only when choosing another file name).
(Inherited from AbstractViewContent)
Public propertyIsSelected Gets or sets a value indicating whether the view of this instance is selected (e.g. inside its container).
(Inherited from AbstractViewContent)
Public propertyIsViewOnly Gets if the view content is view-only (cannot be saved at all).
(Inherited from AbstractViewContent)
Public propertyIsVisible Gets or sets the visibility of the document. If false, the document tab header is not visible (but the document itself maybe visible !). If true, the document tab header is visible (if it fits in the bar), and the document is visible, if it is selected, too.
(Inherited from AbstractViewContent)
Public propertyMarginGets or sets the margin. A value of 0 indicates that if autozoom is active, there is no margin around the graph. A value of 1 means that there is a right and left margin of 100 percent of the graph width, and a top and bottom margin of 100 percent of the graph heigth.
Public propertyModelObject
(Overrides AbstractViewContentModelObject)
Public propertyNonPageAreaColor Gets the color of the non page area, i.e. the area that not belongs to the graph.
Public propertyNumberOfSelectedObjects Returns the number of selected objects into this graph.
Public propertyPositionOfViewportsUpperLeftCornerInGraphCoordinatesGets or sets the position of the view port window's upper left corner in graph coordinates.
Public propertyRootLayer Returns the layer collection. Is the same as m_GraphDocument.XYPlotLayer.
Public propertySelectedObjects 
Public propertySelectedRealObjects Gets the objects currently selected. The returned objects are not the HitTestObjects, but the hitted objects itself.
Public propertyServices
(Inherited from AbstractViewContent)
Public propertySizeOfGraphWithMarginGets the size (in points = 1/72 inch) of the graph with margin (without zoom).
Public propertySizeOfGraphWithMarginZoomedGets the size (in points = 1/72 inch) of the graph with margin with taking into account the current zoom factor. This can be much greater than the actual viewport size, if the zoom factor exceeds the auto zoom factor.
Public propertyTitle Gets/Sets the title of the current tab page. This value will be passed through the string parser before being displayed.
(Inherited from AbstractViewContent)
Public propertyUseDocumentCopy 
Public propertyViewObject
(Overrides AbstractViewContentViewObject)
Public propertyZoomFactor Zoom value of the graph view. If this property is set, AutoZoom will be set to false.
Top
Methods
 NameDescription
Public methodApply 
Public methodArrange Arranges the objects so they share a common boundary.
Public methodArrangeBottomToBottom Arranges the objects so they share the bottom boundary with the bottom boundary of the master element.
Public methodArrangeBottomToTop Arranges the objects so they share the bottom boundary with the top boundary of the master element.
Public methodArrangeHorizontal Arranges the objects so they share the vertical middle line of the last selected object.
Public methodArrangeHorizontalTable Arranges the objects so they their vertical middle line is uniform spaced between the first and the last selected object.
Public methodArrangeLeftToLeft Arranges the objects so they share the left boundary with the left boundary of the master element.
Public methodArrangeLeftToRight Arranges the objects so they share the left boundary with the right boundary of the master element.
Public methodArrangeRightToLeft Arranges the objects so they share the right boundary with the left boundary of the master element.
Public methodArrangeRightToRight Arranges the objects so they share the right boundary with the right boundary of the master element.
Public methodArrangeSameHorizontalSize 
Public methodArrangeSameSizeBase 
Public methodArrangeSameVerticalSize 
Public methodArrangeTopToBottom Arranges the objects so they share the top boundary with the bottom boundary of the master element.
Public methodArrangeTopToTop Arranges the objects so they share the top boundary with the top boundary of the master element.
Public methodArrangeVertical Arranges the objects so they share the horizontal middle line of the last selected object.
Public methodArrangeVerticalTable Arranges the objects so they their horizontal middle line is uniform spaced between the first and the last selected object.
Public methodBuildNavPoint
(Inherited from AbstractViewContent)
Protected methodCanClose
(Inherited from AbstractViewContent)
Public methodClearIsDirty
(Inherited from AbstractViewContent)
Public methodCmdDelete 
Public methodConvertGraphCoordinateToScrollbarValueConverts a graph coordinate to scrollbar values. See the remarks in ConvertScrollbarValueToGraphCoordinate(PointD2D) to learn how the scroll bar parameters are set.
Public methodConvertGraphToMouseCoordinates Converts graph coordinates to wpf coordinates.
Public methodConvertMouseToRootLayerCoordinates Converts from mouse coordinates to graph coordinates.
Public methodConvertScrollbarValueToGraphCoordinateConverts the scrollbar values to the corresponding graph coordinate.
Public methodCopySelectedObjectsToClipboard Copy the selected objects of this graph to the clipboard.
Public methodCutSelectedObjectsToClipboard 
Public methodDisposeReleases all resources used by the GraphController
(Overrides AbstractViewContentDispose)
Public methodDoPaintOverlay Infrastructure: intended to be used by graph views to draw the overlay (the selection rectangles and handles of the currently selected tool) into a bitmap.
Protected methodStatic memberEhEditPlotItem Handles the double click event onto a plot item.
Protected methodStatic memberEhEditTextGraphics Handles the double click event onto a plot item.
Protected methodEhGraph_BoundsChanged_Unsynchronized 
Protected methodEhGraph_Changed Called if something in the GraphDocument changed.
Protected methodEhGraph_LayerCollectionChanged Handler of the event LayerCollectionChanged of the graph document. Forces to check the LayerButtonBar to keep track that the number of buttons match the number of layers.
Protected methodEhGraph_LayerCollectionChanged_Unsynchronized 
Protected methodEhGraph_SizeChanged Handler of the event LayerCollectionChanged of the graph document. Forces to check the LayerButtonBar to keep track that the number of buttons match the number of layers.
Protected methodEhTitleLocalizationChanged
(Inherited from AbstractViewContent)
Public methodEhView_CurrentGraphToolChanged 
Public methodEhView_CurrentLayerChoosen Handles the selection of the current layer by the user.
Public methodEhView_GraphPanelMouseWheelHandles the mouse wheel event.
Public methodEhView_GraphPanelSizeChanged Handles the event when the size of the graph area is changed.
Public methodEhView_Scroll 
Public methodEhView_ShowDataContextMenu The controller should show a data context menu (contains all plots of the currentLayer).
Public methodEnsureValidityOfCurrentLayerNumber check the validity of the CurrentLayerNumber and correct it
Public methodEnsureValidityOfCurrentPlotNumber This ensures that the current plot number is valid. If there is no plot on the currently active layer, the current plot number is set to -1.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodFindGraphObjectAtPixelPosition Looks for a graph object at pixel position pixelPos and returns true if one is found.
Public methodFindGraphObjectInRootLayerRectangle 
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetParentLayerOfSelectedObjects Determines the parent layer of the selected objects, as far as all selected objects belong to the same layer.
Public methodGetService(Type)
(Inherited from AbstractViewContent)
Public methodGetServiceT
(Inherited from AbstractViewContent)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodGroupSelectedObjects Groups the selected objects to form a ShapeGroup.
Public methodHostWindowClosing Called if the host window is about to be closed.
Protected methodInitialize 
Public methodInitializeDocument 
Public methodIsCmdCopyEnabled 
Public methodIsCmdCutEnabled 
Public methodIsCmdDeleteEnabled 
Public methodIsCmdPasteEnabled 
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Protected methodMouseWheelScroll Scrolls horizontally or vertically in response to a mouse wheel scroll event.
Public methodMoveSelectedGraphItemsDown 
Public methodMoveSelectedGraphItemsToBottom 
Public methodMoveSelectedGraphItemsToTop 
Public methodMoveSelectedGraphItemsUp 
Public methodMoveSelectedObjects Moves the selected objects in a certain direction in response to an arrow key pressed.
Public methodNotifyContentIdChanged Can be used to notify the view content that the ContentId maybe has changed.
(Inherited from AbstractViewContent)
Protected methodOnClose
(Inherited from AbstractViewContent)
Protected methodOnContentVisibilityChanged 
Public methodOnIsDirtyChanged
(Inherited from AbstractViewContent)
Protected methodOnPropertyChanged
(Overrides AbstractViewContentOnPropertyChanged(String))
Public methodPasteObjectsFromClipboard 
Protected methodRefreshAutoZoom Recalculates and sets the value of m_Zoom so the whole page is visible
Public methodRefreshGraph 
Protected methodRefreshManualZoom 
Public methodRemoveSelectedObjects Removes the currently selected objects (the IHitTestObject of the selected object(s) must provide a handler for deleting the object).
Public methodRenderOverlay If the cached graph bitmap is valid, the graph area is repainted immediately using the cached bitmap and then the custom mouse handler drawing. If the cached graph bitmap is invalid, a repaint (and thus a recreation of the cached graph bitmap) is triggered, but only with Gui render priority.
Public methodRevert Try to revert changes to the model, i.e. restores the original state of the model.
Public methodScaleForPaint This functions scales the graphics context to be ready for painting.
Public methodScaleForPaintingGraphDocument 
Public methodSetDirty
(Inherited from AbstractViewContent)
Public methodSetDisposeInProgress Announces that this view content is about to be disposed very soon. The view content should remain passiv (e.g. should not react to events any more), but should not release its resources yet (this is done later in Dispose).
(Inherited from AbstractViewContent)
Public methodSetGraphToolFromInternal 
Protected methodSetLocalizedInfoTip Sets a localized info tip that will update automatically when the language changes.
(Inherited from AbstractViewContent)
Protected methodSetLocalizedTitle Sets a localized title that will update automatically when the language changes.
(Inherited from AbstractViewContent)
Protected methodSetMemberVariablesToDefault Set the member variables to default values. Intended only for use in constructors and deserialization code.
Public methodSetPanelCursor 
Public methodSetSelectedObjectsProperty 
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodUngroupSelectedObjects Ungroups the selected objects (if they are ShapeGroup objects).
Public methodZoomAroundPivotPointZooms around a pivot point. The pivot point is the point in graph coordinates that does not change the location in the viewport window when zooming.
Top
Events
 NameDescription
Public eventCurrentGraphToolChanged This event will be fired if the current graph tool has changed, either by the user or by the program.
Public eventDisposed
(Inherited from AbstractViewContent)
Public eventIsDirtyChanged
(Inherited from AbstractViewContent)
Public eventPropertyChanged
(Inherited from AbstractViewContent)
Top
Fields
 NameDescription
Protected field_areaFillingFactor Ratio of view port dimension to the dimension of the graph. Example: a values of 2 means that the view port size is two times the size of the graph.
Protected field_currentLayerNumberNumber of the currently selected layer (or null if no layer is present).
Protected field_currentPlotNumberNumber of the currently selected plot (or -1 if no plot is present on the layer).
Protected field_docHolds the Graph document (the place were the layers, plots, graph elements... are stored).
Protected field_graphAreaBrush Brush to fill the printable area of the graph.
Protected field_isActive
(Inherited from AbstractViewContent)
Protected field_isAutoZoomActiveIf true, the view is zoomed so that the page fits exactly into the viewing area.
Protected field_isSelected
(Inherited from AbstractViewContent)
Protected field_isVisible
(Inherited from AbstractViewContent)
Protected field_nonPageAreaColor Color for the area of the view, where there is no page.
Protected field_pageGroundBrush Brush to fill the page ground. Since the printable area is filled with another brush, in effect this brush fills only the non printable margins of the page.
Protected field_positionOfViewportsUpperLeftCornerInRootLayerCoordinates 
Protected field_screenResolutionDpiScreen resolution in dpi (in fact it is the factor that converts physical length on the screen (in inch) to the coordinate system used by Wpf (mouse coordinates, heights, widths, etc.).
Protected field_title
(Inherited from AbstractViewContent)
Protected field_titleToBeLocalized
(Inherited from AbstractViewContent)
Protected field_triggerBasedUpdate 
Protected field_viewHolds the view (the window where the graph is visualized).
Protected field_weakEventHandlerForDoc_TunneledEvent 
Protected field_weakEventHandlersForDoc 
Protected field_zoomFactorCurrent zoom factor. If AutoZoom is on, this factor is calculated automatically.
Protected fieldStatic memberInchPerPointInches per point unit.
Protected fieldStatic memberPointsPerInchFor the graph elements all the units are in points. One point is 1/72 inch.
Top
See Also