Separator

ceramic.Entityceramic.Visualceramic.Quadceramic.Layerceramic.Viewelements.Separator (Class)
Implements: tracker.Observable

A horizontal line separator for visually dividing content sections.

Separator renders as a horizontal line positioned in the center of its container, with customizable thickness. It's commonly used in layouts to create visual separation between groups of related content.

The separator automatically centers itself vertically within its bounds and extends the full width of the container.

Usage example:

var separator = new Separator();
separator.size(200, 10);
separator.thickness = 2;
add(separator);

Instance Members

elements
observedDirty: Bool

Default is false, automatically set to true when any of this instance's observable variables has changed.


elements
theme: Theme

Custom theme override for this separator. If null, uses the global context theme


elements
thickness: Float

Thickness of the separator line in pixels.

Setting this property triggers a layout update to apply the new thickness.


elements
invalidateTheme(): Void

elements
new(): Void

Creates a new Separator.

Sets up the line quad with transparent background and initializes automatic style updates based on theme changes.

Private Members

elements
unobservedTheme: Theme

elements
quad: ceramic.Quad

The quad that renders the separator line


elements
emitObservedDirty(instance: Separator, fromSerializedField: Bool): Void

Event when any observable value as changed on this instance.

Name Type
instance Separator
fromSerializedField Bool

elements
emitThemeChange(current: Theme, previous: Theme): Void

Event when theme field changes.

Name Type
current Theme
previous Theme

elements
layout(): Void

Positions and sizes the separator line.

Centers the line vertically within the container and stretches it to fill the full width with the specified thickness.


elements
updateStyle(): Void

Updates the visual style of the separator based on the current theme.

Sets the line color using the theme's medium border color.

Metadata

Name Parameters
:build tracker.macros.ObservableMacro.build()
:autoBuild tracker.macros.ObservableMacro.build()
:build ceramic.macros.EntityMacro.buildForCompletion()
:autoBuild ceramic.macros.EntityMacro.buildForCompletion()
:build tracker.macros.EventsMacro.build()
:autoBuild tracker.macros.EventsMacro.build()