abstract class flux::View

sys::Obj
  fwt::Widget
    fwt::Pane
      fwt::ContentPane
        flux::View

Source

View is a plugin designed to view or edit a Resource.

See pod doc for details.

buildStatusBar

virtual Widget? buildStatusBar()

Source

Build a view specific status bar to merge into the frame. This method is called after onLoad, but before mounting. Return null for no status bar.

buildToolBar

virtual Widget? buildToolBar()

Source

Build a view specific toolbar to merge into the frame. This method is called after onLoad, but before mounting. Return null for no toolbar. See Frame.command if you wish to use predefined commands like cut/copy/paste.

commandStack

CommandStack commandStack

Source

Get the command history for undo/redo.

dirty

Bool dirty := false

Source

The dirty state indicates if unsaved changes have been made to the view. Views should set dirty to true on modification. Dirty is automatically cleared onSave.

frame

Frame? frame { internal set }

Source

Get the top level flux frame associated with this view.

make

new make()

Source

Constructor.

onActive

virtual Void onActive()

Source

Callback when the view is selected as the current tab. This method should be used to enable predefined commands such as find or replace which the view will handle.

onCommand

virtual Void onCommand(Str id, Event? event)

Source

Callback when predefined view managed commands such as find and replace are invoked. Before view managed commands are routed to the view, they must be enabled in the onActive callback. A convenient technique is to route to handler methods via trap:

trap("on${id.capitalize}", [event])
onGotoMark

virtual Void onGotoMark(Mark mark)

Source

Callback when the view should jump to the specified mark. The mark's uri will always be the same as this view's resource. But the mark might also specify a specific line number and column number.

onInactive

virtual Void onInactive()

Source

Callback when the view is deactivated because the user has selected another tab.

onLoad

abstract Void onLoad()

Source

Callback to load the resource. At this point the view can access frame, but has not been mounted yet.

onMarks

virtual Void onMarks(Mark[] marks)

Source

Callback when the frame's list of marks is updated. This callback can be used for the view to highlight mark locations. The list of marks is the same as Frame.marks and might contain marks outside of this view's uri.

onSave

virtual Void onSave()

Source

Callback to save the view's modification to the resource. Save is only called for a dirty view.

onUnload

virtual Void onUnload()

Source

Callback when the view is being unloaded.

reload

Void reload()

Source

Reload this view.

resource

Resource? resource { internal set }

Source

Current resource loaded into this view.