WriteopiaManager
class WriteopiaManager(stepsNormalizer: UnitsNormalizationMap = StepsMapNormalizationBuilder.reduceNormalizations {
defaultNormalizers()
}, movementHandler: MovementHandler = MovementHandler(), contentHandler: ContentHandler = ContentHandler(
stepsNormalizer = stepsNormalizer
), focusHandler: FocusHandler = FocusHandler())
Constructors
Link copied to clipboard
constructor(stepsNormalizer: UnitsNormalizationMap = StepsMapNormalizationBuilder.reduceNormalizations {
defaultNormalizers()
}, movementHandler: MovementHandler = MovementHandler(), contentHandler: ContentHandler = ContentHandler(
stepsNormalizer = stepsNormalizer
), focusHandler: FocusHandler = FocusHandler())
Functions
Link copied to clipboard
Changes the state of a story step based of the stateChange
Link copied to clipboard
fun changeStoryType(position: Int, typeInfo: TypeInfo, commandInfo: CommandInfo?, storyState: StoryState): StoryState
Changes the story type. The type of a messages changes without changing the content of it. Commands normally change the type of a message. From a message to a unordered list item, for example.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Merges two StoryStep into a group. This can be used to merge two images into a message group or any other kind of group.
Link copied to clipboard
A request to move a content to a position.
Link copied to clipboard
fun newStory(documentId: String = GenerateId.generate(), title: String = "", parentFolder: String = "root"): Pair<DocumentInfo, StoryState>
Link copied to clipboard
Link copied to clipboard
Deletes a StoryStep
Link copied to clipboard
Erases a StoryStep
Link copied to clipboard
fun onLineBreak(lineBreak: Action.LineBreak, storyState: StoryState): Pair<Pair<Int, StoryStep>, StoryState>?
Creates a line break. When a line break happens, the line it divided into two StorySteps of the same, if possible, or the next line will be a Message.
Link copied to clipboard
Link copied to clipboard