Inherits from NSView
Declared in M2CanvasView.h
M2CanvasView.m

Overview

Responsible for drawing canvas itself and objects on it.

Tasks

Other Methods

  •   objectsController

    Objects controller used for key-value observing on changes to objects and requesting objects.

    property
  •   objectViews

    Ordered array of views used for matching between array of objects and views.

    property

Updating models according to changes on canvas

Generating images of canvas

Other Methods

Other Methods

Other Methods

Other Methods

Other Methods

Other Methods

Properties

objectViews

Ordered array of views used for matching between array of objects and views.

@property (retain) NSMutableArray *objectViews

Discussion

Ordered array of views used for matching between array of objects and views.

Declared In

M2CanvasView.h

objectsController

Objects controller used for key-value observing on changes to objects and requesting objects.

@property (assign) IBOutlet NSArrayController *objectsController

Discussion

Objects controller used for key-value observing on changes to objects and requesting objects.

Declared In

M2CanvasView.h

Instance Methods

_canvasObjetForView:

Returns canvas model object for passed canvas view object

- (M2CanvasObject *)_canvasObjetForView:(M2ObjectView *)view

Discussion

Returns canvas model object for passed canvas view object

Declared In

M2CanvasView+PrivateMethods.h

_updateObjects

Updates objects displayed on canvas from array controller.

- (void)_updateObjects

Discussion

Updates objects displayed on canvas from array controller.

Declared In

M2CanvasView+PrivateMethods.h

_updateSelection

Updates selection on canvas from selection in array controller.

- (void)_updateSelection

Discussion

Updates selection on canvas from selection in array controller.

Declared In

M2CanvasView+PrivateMethods.h

_updateSelectionFromSelectedObject

Updates properties of object selected on canvas from object selected in array controller.

- (void)_updateSelectionFromSelectedObject

Discussion

Updates properties of object selected on canvas from object selected in array controller.

Declared In

M2CanvasView+PrivateMethods.h

_updateView:fromObject:

Updates particular object on canvas from its model.

- (void)_updateView:(M2ObjectView *)view fromObject:(M2CanvasObject *)canvasObject

Discussion

Updates particular object on canvas from its model.

Declared In

M2CanvasView+PrivateMethods.h

_viewForSelection

Returns view for selection in array controller.

- (M2ObjectView *)_viewForSelection

Discussion

Returns view for selection in array controller.

Declared In

M2CanvasView+PrivateMethods.h

contentsImage

Generates image containing everything on canvas, but not any control views. Used for export or printing.

- (NSImage *)contentsImage

Discussion

Generates image containing everything on canvas, but not any control views. Used for export or printing.

Declared In

M2CanvasView.h

objectViewDidChange:

This message is sent by object view when its properties are changed.

- (void)objectViewDidChange:(M2ObjectView *)objectView

Discussion

This message is sent by object view when its properties are changed.

Declared In

M2CanvasView.h

objectViewDidSelect:

This message is sent by object when it is selected.

- (void)objectViewDidSelect:(M2ObjectView *)objectView

Discussion

This message is sent by object when it is selected.

Declared In

M2CanvasView.h

thumbnailImage

Generates thumnail image from contentsImage, but in smaller size.

- (NSImage *)thumbnailImage

Discussion

Generates thumnail image from contentsImage, but in smaller size.

Declared In

M2CanvasView.h