Class ContentBlockStack

    • Constructor Detail

      • ContentBlockStack

        public ContentBlockStack()
    • Method Detail

      • pushChild

        public void pushChild​(int number,
                              Markup content,
                              Context context)
        Adds a new child block to the top of the stack. When the child is later removed, its parent will return to the top of the stack again.
      • pushSibling

        public void pushSibling​(int number,
                                Markup content,
                                Context context)
        Removes the block at the top of the stack and replaces it by a new sibling block. When the last sibling is later removed, their parent block will return to the top of the stack again.
      • blockAtLevel

        public ContentBlock blockAtLevel​(int indentationLevel)
        Finds the block in the stack that has the given indentation level. Works from the top of the stack to the bottom.
      • currentIndentationLevel

        public int currentIndentationLevel()
        Returns the indentation level of the block at the top of the stack or zero if the stack is empty. Works from the bottom of the stack to the top.
      • currentContext

        public Context currentContext()
      • parentContext

        public Context parentContext()