Fantom

 

class

fluxText::TextEditor

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

@fluxViewMimeType = ["text"]

TextEditor provides a syntax color coded editor for working with text files.

Slots

buildStatusBarSource

override Widget? buildStatusBar()

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.

buildToolBarSource

override Widget? buildToolBar()

Overrides flux::View.buildToolBar

Doc inherited from flux::View.buildToolBar

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 flux::Frame.command if you wish to use predefined commands like cut/copy/paste.

charsetSource

Charset charset := this.options.charset

docSource

Doc? doc

fileSource

File? file

onActiveSource

override Void onActive()

Overrides flux::View.onActive

Doc inherited from flux::View.onActive

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.

onCommandSource

override Void onCommand(Str id, Event? event)

Overrides flux::View.onCommand

Doc inherited from flux::View.onCommand

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])
onGotoMarkSource

override Void onGotoMark(Mark mark)

Overrides flux::View.onGotoMark

Doc inherited from flux::View.onGotoMark

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.

onInactiveSource

override Void onInactive()

Overrides flux::View.onInactive

Doc inherited from flux::View.onInactive

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

onLoadSource

override Void onLoad()

Overrides flux::View.onLoad

Doc inherited from flux::View.onLoad

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

onMarksSource

override Void onMarks(Mark[] marks)

Overrides flux::View.onMarks

Doc inherited from flux::View.onMarks

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 flux::Frame.marks and might contain marks outside of this view's uri.

onSaveSource

override Void onSave()

Overrides flux::View.onSave

Doc inherited from flux::View.onSave

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

optionsSource

TextEditorOptions options := TextEditorOptions.load

richTextSource

RichText? richText

rulesSource

SyntaxRules? rules

syntaxSource

SyntaxOptions syntax := SyntaxOptions.load