OnionFrame

An onion frame places its children as layers, drawing one on top of the other, instead of on the side.

Children are placed in order of drawing — the last child will be drawn last, and so, will appear on top.

Constructors

this
this(T args)
Undocumented in source.

Members

Functions

drawImpl
void drawImpl(Rectangle outer, Rectangle inner)
Undocumented in source. Be warned that the author may not have intended to support it.
resizeImpl
void resizeImpl(Vector2 available)
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From Frame

isDropHovered
bool isDropHovered;

If true, a drag & drop node hovers this frame.

dropSelector
Selector dropSelector;

Selector (same as in themes) used to decide which nodes can be dropped inside, defaults to none.

dropCursor
Vector2 dropCursor;

Position of the cursor, indicating the area of the drop.

dropSize
Vector2 dropSize;

Size of the droppable area.

resizeImpl
void resizeImpl(Vector2 availableSpace)
Undocumented in source. Be warned that the author may not have intended to support it.
drawImpl
void drawImpl(Rectangle outer, Rectangle inner)
Undocumented in source. Be warned that the author may not have intended to support it.
hoveredImpl
bool hoveredImpl(Rectangle rect, Vector2 mousePosition)
Undocumented in source. Be warned that the author may not have intended to support it.
childOffset
Vector2 childOffset(Vector2 currentOffset, Vector2 childSpace)
Undocumented in source. Be warned that the author may not have intended to support it.
dropOffset
Vector2 dropOffset(Vector2 offset)

Drag and drop implementation: Offset nodes to provide space for the dropped node.

canDrop
bool canDrop(Node node)
dropHover
void dropHover(Vector2 position, Rectangle rectangle)
Undocumented in source. Be warned that the author may not have intended to support it.
drop
void drop(Vector2 position, Rectangle rectangle, Node node)
Undocumented in source. Be warned that the author may not have intended to support it.

Examples

import fluid;

auto myFrame = onionFrame(

    // Draw an image
    imageView("logo.png"),

    // Draw a label in the middle of the frame
    label(
        layout!(1, "center"),
        "Hello, Fluid!"
    ),

);

Meta