AffogatoEvents class
AffogatoEvents forms the foundation of all communication and interaction in the Affogato Editor. It is how actions are executed and how state is observed. However, actions are not meant to be performed directly by adding events to streams in this class. Use the AffogatoAPI, which groups events into specific tasks, to perform actions safely. As for reading Stream events, while there is no issue with listening to streams from this class directly, it is preferred that the AffogatoAPI is used for that purpose as well, just because it clearly delineates different endpoints and for consistency.
There is a specific naming convention for each Event:
- A request to perform an action
- A notification that an action has been performed
The
labelgives us information about the type of the event. The label for a request will start withrequest, while the label for a notification will be in past tense. For example, "requestDocumentSetActive" is a request label, while "documentChanged" or "instanceDidSetActive" are notification labels.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
editorInstanceClosedEventsController
→ StreamController<
EditorInstanceClosedEvent> -
Emitted when an instance has been closed.
final
-
editorInstanceLoadedEventsController
→ StreamController<
EditorInstanceLoadedEvent> -
Emitted when an instance has been loaded.
final
-
editorInstanceRequestReloadEventsController
→ StreamController<
EditorInstanceRequestReloadEvent> -
Emitted to ask a specific instance to reload its state.
final
-
editorInstanceRequestToggleSearchOverlayEventsController
→ StreamController<
EditorInstanceRequestToggleSearchOverlayEvent> -
Emitted to ask a specific instance to toggle the search-and-replace overlay.
final
-
editorKeyEventsController
→ StreamController<
EditorKeyEvent> -
Emitted for key presses while focus is currently on the TextField of
a specific instance.
final
-
vfsDocumentChangedEventsController
→ StreamController<
VFSDocumentChangedEvent> -
Emitted when a specific document's contents have changed.
final
-
vfsDocumentRequestChangeEventsController
→ StreamController<
VFSDocumentRequestChangeEvent> -
Emitted to modify the contents of a specific document.
final
-
vfsStructureChangedEventsController
→ StreamController<
VFSStructureChangedEvent> -
Emitted when the directory structure of the VFS has changed.
final
-
windowClosedEventsController
→ StreamController<
WindowClosedEvent> -
Emitted whenever the AffogatoWindow is closed. Usually, the last event emitted
before the whole widget is disposed.
final
-
windowInstanceDidSetActiveEventsController
→ StreamController<
WindowInstanceDidSetActiveEvent> -
Emitted whenever an instance has been set as the active instance
final
-
windowInstanceDidUnsetActiveEventsController
→ StreamController<
WindowInstanceDidUnsetActiveEvent> -
Emitted whenever an instance has been unset as the active instance
final
-
windowKeyboardEventsController
→ StreamController<
WindowKeyboardEvent> -
Emitted for key presses while no instance is currently in focus. If an instance is
in focus, listen instead for events on editorKeyEventsController.
final
-
windowPaneCellLayoutChangedEventsController
→ StreamController<
WindowPaneCellLayoutChangedEvent> -
Emitted whenever the layout of panes in the window changes. A listener in the Panes API
then re-computes the new layout and requests affected pane cells to rebuild via the windowPaneCellRequestReloadEventsController.
final
-
windowPaneCellRequestReloadEventsController
→ StreamController<
WindowPaneCellRequestReloadEvent> -
Emitted to request a specific pane cell to relayout its children based on new
constraints (assuming the constraints have already been computed and stored in the workspace data).
Each pane cell then emits an event with the cell ID of its immediate children. For reload requests due
to changes in the data of a specific pane, see windowPaneRequestReloadEventsController.
final
-
windowPaneRequestReloadEventsController
→ StreamController<
WindowPaneRequestReloadEvent> -
Emitted to request a specific pane to reload its state, due to changes in its data.
For reloads pertaining to changes in layout, see windowPaneCellRequestReloadEventsController,
which rebuilds of descendants as well.
final
-
windowRequestDocumentSetActiveEventsController
→ StreamController<
WindowRequestDocumentSetActiveEvent> -
Emitted to request for a document to be set as the active instance, regardless
of whether there is an instance associated with it or whether the instance is currently
in any of the panes.
final
-
windowStartupFinishedEventsController
→ StreamController<
WindowStartupFinishedEvent> -
Emitted after the AffogatoWindow is initialised and once extensions are ready to be loaded.
final