All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.symphony.ActionManagerBuilderDsl.kt Maven / Gradle / Ivy

Go to download

A kotlin multiplatform library for representing headless collection based ui such as lists, tables and grids

The newest version!
@file:Suppress("NOTHING_TO_INLINE")

package symphony

import kevlar.builders.Actions0Builder
import symphony.internal.BluntLinearSelectionManager
import symphony.internal.FixedActionsManagerImpl
import symphony.internal.GroupedSelectorBasedActionsManagerImpl
import symphony.internal.LinearSelectorBasedActionsManagerImpl

inline fun  actionsOf(
    linear: LinearSelectionManager,
    builder: LinearSelectorBasedActionsBuilder.() -> Unit
): SelectorBasedActionsManager = LinearSelectorBasedActionsManagerImpl(linear, LinearSelectorBasedActionsBuilder().apply(builder))

inline fun  actionsOf(
    selector: GroupedSelectionManager,
    builder: GroupedSelectorBasedActionsBuilder.() -> Unit
): SelectorBasedActionsManager = GroupedSelectorBasedActionsManagerImpl(selector, GroupedSelectorBasedActionsBuilder().apply(builder))

inline fun emptyActions(): SelectorBasedActionsManager = LinearSelectorBasedActionsManagerImpl(
    selector = BluntLinearSelectionManager.instance,
    builder = LinearSelectorBasedActionsBuilder()
)

inline fun actionsOf(
    noinline builder: Actions0Builder.() -> Unit
): FixedActionsManager = FixedActionsManagerImpl(FixedActionsBuilder(builder))




© 2015 - 2025 Weber Informatics LLC | Privacy Policy