Inherits from NSWindowController
Conforms to NSTextFieldDelegate
NSToolbarDelegate
NSWindowDelegate
ViDeferredDelegate
ViJumpListDelegate
Declared in ViWindowController.h

Overview

A ViWindowController object manages a document window.

Tasks

Class Methods

currentWindowController

The currently active window controller.

+ (ViWindowController *)currentWindowController

Return Value

The currently active window controller.

Declared In

ViWindowController.h

Instance Methods

closeDocument:andWindow:

Close a document, and optionally the window.

- (void)closeDocument:(ViDocument *)document andWindow:(BOOL)canCloseWindow

Parameters

document

The document to close.

canCloseWindow

YES if the window should be closed if there are no more documents in the window.

Declared In

ViWindowController.h

currentDocument

The currently focused document, or nil if no document is focused.

- (ViDocument *)currentDocument

Return Value

The currently focused document, or nil if no document is focused.

Declared In

ViWindowController.h

currentView

The currently focused view.

- (id<ViViewController>)currentView

Return Value

The currently focused view.

Declared In

ViWindowController.h

documents

The documents open in the window.

- (NSArray *)documents

Return Value

The documents open in the window.

Declared In

ViWindowController.h

gotoURL:

Open a document.

- (BOOL)gotoURL:(NSURL *)url

Parameters

url

The URL of the document to open. The document may already be opened.

Return Value

YES if the document could be opened.

Declared In

ViWindowController.h

gotoURL:line:column:

Open a document and go to a specific point in the file.

- (BOOL)gotoURL:(NSURL *)url line:(NSUInteger)line column:(NSUInteger)column

Parameters

url

The URL of the document to open. The document may already be opened.

line

The line number to jump to, or 0 to not jump to any line.

column

The column to jump to.

Return Value

YES if the document could be opened.

Declared In

ViWindowController.h

splitVertically:andOpen:orSwitchToDocument:allowReusedView:

Split the current view and display another document.

- (id<ViViewController>)splitVertically:(BOOL)isVertical andOpen:(id)filenameOrURL orSwitchToDocument:(ViDocument *)doc allowReusedView:(BOOL)allowReusedView

Parameters

isVertical

YES to split vertically, NO for a horizontal split.

filenameOrURL

A path (as an NSString) or a URL pointing to a document to open. The document may already be open.

doc

An already open document that should be displayed in the split view.

allowReusedView

YES to focus an already visible view for the given document. NO to always create a new split view.

Return Value

The new split view.

Declared In

ViWindowController.h