abstract classcamembert::View

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

View is used to view/edit a file

curPos

Source

virtual Pos curPos()

Current caret position of view

curSelection

Source

virtual Str curSelection()

Current selected string or empty

curStatus

Source

virtual Str curStatus()

Current status string for status bar

dirty

Source

Bool dirty := false

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.

file

Source

const File file

frame

Source

Frame frame { private set }

make

Source

new make(Frame frame, File file)

makeBest

Source

static View? makeBest(Frame frame, File? file)

onGoto

Source

virtual Void onGoto(Item item)

If a space loads a view from a goto event, then this callback is made after the space has finished loading

onMarks

Source

virtual Void onMarks(Item[] marks)

Highlight marks

onReady

Source

virtual Void onReady()

Focus and ready for editing

onSave

Source

virtual Void onSave()

Save current state

onUnload

Source

virtual Void onUnload()

Callback to cleanup resources