ContentHandler
class ContentHandler(focusableTypes: Set<Int> = setOf(
StoryTypes.TITLE.type.number,
StoryTypes.TEXT.type.number,
StoryTypes.CHECK_ITEM.type.number,
StoryTypes.UNORDERED_LIST_ITEM.type.number,
), stepsNormalizer: UnitsNormalizationMap, lineBreakMap: (StoryType) -> StoryType = ::defaultLineBreakMap, isTextStory: (StoryStep) -> Boolean = { story ->
focusableTypes.contains(story.type.number)
})
Class dedicated to handle adding, deleting or changing StorySteps
Constructors
Link copied to clipboard
constructor(focusableTypes: Set<Int> = setOf(
StoryTypes.TITLE.type.number,
StoryTypes.TEXT.type.number,
StoryTypes.CHECK_ITEM.type.number,
StoryTypes.UNORDERED_LIST_ITEM.type.number,
), stepsNormalizer: UnitsNormalizationMap, lineBreakMap: (StoryType) -> StoryType = ::defaultLineBreakMap, isTextStory: (StoryStep) -> Boolean = { story ->
focusableTypes.contains(story.type.number)
})
Functions
Link copied to clipboard
Link copied to clipboard
fun changeStoryStepState(currentStory: Map<Int, StoryStep>, newState: StoryStep, position: Int): StoryState?
Link copied to clipboard
fun changeStoryType(currentStory: Map<Int, StoryStep>, typeInfo: TypeInfo, position: Int, commandInfo: CommandInfo?): StoryState
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun onLineBreak(currentStory: Map<Int, StoryStep>, lineBreakInfo: Action.LineBreak): Pair<Pair<Int, StoryStep>, StoryState>?
Link copied to clipboard
Link copied to clipboard