package net.afterlifelochie.fontbox.api.layout;

public interface IPage extends IContainer {
    Iterable<? extends IElement> allElements();

    Iterable<? extends IElement> dynamicElements();

    Iterable<? extends IElement> staticElements();
}

@@ -46,203 +46,1115 @@
 t;%0A%0A
-public interface IPage extends IContainer %7B%0A    Iterable%3C? extends IElement%3E allElements();%0A%0A    Iterable%3C? extends IElement%3E dynamicElements();%0A%0A    Iterable%3C? extends IElement%3E staticElements();
+import net.minecraft.client.renderer.GlStateManager;%0A%0Aimport java.util.Iterator;%0Aimport java.util.LinkedList;%0Aimport java.util.List;%0A%0A/**%0A * A page of %7B@link IElement%7Ds%0A */%0Apublic interface IPage extends IContainer, Iterable%3CIElement%3E %7B%0A    /**%0A     * @return all elements on the page%0A     */%0A    Iterable%3C? extends IElement%3E allElements();%0A%0A    /**%0A     * Dynamic rendering means that the results should be saved to a display list%0A     *%0A     * @return all elements that require dynamic rendering%0A     */%0A    Iterable%3C? extends IElement%3E dynamicElements();%0A%0A    /**%0A     * Static elements can/should be save to a display list for performance reasons%0A     * See %7B@link net.minecraft.client.renderer.GlStateManager#glNewList(int, int)%7D%0A     * and %7B@link GlStateManager#glEndList()%7D for more info%0A     *%0A     * @return all elements that can be statically rendered%0A     */%0A    Iterable%3C? extends IElement%3E staticElements();%0A%0A    @Override%0A    default Iterator%3CIElement%3E iterator()%7B%0A        List%3CIElement%3E list = new LinkedList%3C%3E();%0A        allElements().forEach(list::add);%0A        return list.iterator();%0A    %7D
 %0A%7D%0A

document IPage