Skip to content

Commit

Permalink
More ribbon API prototyping
Browse files Browse the repository at this point in the history
Contextual task groups for #56
  • Loading branch information
kirill-grouchnikov committed Dec 29, 2022
1 parent b0f3ccf commit 23fb930
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,39 @@ fun main() = auroraApplication {
keyTip = "W"
)

val contextualTaskGroup1 = RibbonContextualTaskGroup(
title = resourceBundle.getString("Group1.textTaskGroupTitle"),
hueColor = Color.Red,
tasks = listOf(
RibbonTask(
title = resourceBundle.getString("Task11.textTaskTitle"),
bands = listOf(builder.getActionBand(), builder.getApplicationsBand()),
resizeSequencingPolicy = CoreRibbonResizeSequencingPolicies.RoundRobin(),
keyTip = "XA"
),
RibbonTask(
title = resourceBundle.getString("Task12.textTaskTitle"),
bands = listOf(builder.getActionBand(), builder.getApplicationsBand()),
resizeSequencingPolicy = CoreRibbonResizeSequencingPolicies.RoundRobin(),
keyTip = "XB"
)
),
isActive = false
)
val contextualTaskGroup2 = RibbonContextualTaskGroup(
title = resourceBundle.getString("Group2.textTaskGroupTitle"),
hueColor = Color.Green,
tasks = listOf(
RibbonTask(
title = resourceBundle.getString("Task21.textTaskTitle"),
bands = listOf(builder.getActionBand(), builder.getApplicationsBand()),
resizeSequencingPolicy = CoreRibbonResizeSequencingPolicies.RoundRobin(),
keyTip = "YA"
)
),
isActive = false
)

val taskbarElements: List<RibbonTaskbarElement> =
listOf(
RibbonTaskbarCommandProjection(
Expand Down Expand Up @@ -153,6 +186,7 @@ fun main() = auroraApplication {
tasks = listOf(pageLayoutTask, writeTask),
selectedTask = selectedTask,
onTaskClick = { selectedTask = it },
contextualTaskGroups = listOf(contextualTaskGroup1, contextualTaskGroup2),
taskbarElements = taskbarElements,
taskbarKeyTipPolicy = DefaultRibbonTaskbarKeyTipPolicy(),
anchoredCommands = builder.getAnchoredCommands(),
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 23fb930

Please sign in to comment.