diff --git a/foundation/src/main/kotlin/org/jetbrains/jewel/foundation/lazy/Keybindings.kt b/foundation/src/main/kotlin/org/jetbrains/jewel/foundation/lazy/Keybindings.kt index 5f7e0e3a05..50d21ac4d3 100644 --- a/foundation/src/main/kotlin/org/jetbrains/jewel/foundation/lazy/Keybindings.kt +++ b/foundation/src/main/kotlin/org/jetbrains/jewel/foundation/lazy/Keybindings.kt @@ -19,82 +19,66 @@ public interface SelectableColumnKeybindings { public val KeyEvent.isMultiSelectionKeyPressed: Boolean - val PointerKeyboardModifiers.isMultiSelectionKeyPressed: Boolean + public val PointerKeyboardModifiers.isMultiSelectionKeyPressed: Boolean - /** - * Select First Node - */ - val KeyEvent.isSelectFirstItem: Boolean + /** Select First Node */ + public val KeyEvent.isSelectFirstItem: Boolean /** - * Extend Selection to First Node inherited from Move Caret to Text Start with Selection + * Extend Selection to First Node inherited from Move Caret to Text Start + * with Selection */ - val KeyEvent.isExtendSelectionToFirstItem: Boolean + public val KeyEvent.isExtendSelectionToFirstItem: Boolean - /** - * Select Last Node inherited from Move Caret to Text End - */ - val KeyEvent.isSelectLastItem: Boolean + /** Select Last Node inherited from Move Caret to Text End */ + public val KeyEvent.isSelectLastItem: Boolean /** - * Extend Selection to Last Node inherited from Move Caret to Text End with Selection + * Extend Selection to Last Node inherited from Move Caret to Text End with + * Selection */ - val KeyEvent.isExtendSelectionToLastItem: Boolean + public val KeyEvent.isExtendSelectionToLastItem: Boolean - /** - * Select Previous Node inherited from Up - */ - val KeyEvent.isSelectPreviousItem: Boolean + /** Select Previous Node inherited from Up */ + public val KeyEvent.isSelectPreviousItem: Boolean - /** - * Extend Selection with Previous Node inherited from Up with Selection - */ - val KeyEvent.isExtendSelectionWithPreviousItem: Boolean + /** Extend Selection with Previous Node inherited from Up with Selection */ + public val KeyEvent.isExtendSelectionWithPreviousItem: Boolean - /** - * Select Next Node inherited from Down - */ - val KeyEvent.isSelectNextItem: Boolean + /** Select Next Node inherited from Down */ + public val KeyEvent.isSelectNextItem: Boolean - /** - * Extend Selection with Next Node inherited from Down with Selection - */ - val KeyEvent.isExtendSelectionWithNextItem: Boolean + /** Extend Selection with Next Node inherited from Down with Selection */ + public val KeyEvent.isExtendSelectionWithNextItem: Boolean - /** - * Scroll Page Up and Select Node inherited from Page Up - */ - val KeyEvent.isScrollPageUpAndSelectItem: Boolean + /** Scroll Page Up and Select Node inherited from Page Up */ + public val KeyEvent.isScrollPageUpAndSelectItem: Boolean /** - * Scroll Page Up and Extend Selection inherited from Page Up with Selection + * Scroll Page Up and Extend Selection inherited from Page Up with + * Selection */ - val KeyEvent.isScrollPageUpAndExtendSelection: Boolean + public val KeyEvent.isScrollPageUpAndExtendSelection: Boolean - /** - * Scroll Page Down and Select Node inherited from Page Down - */ - val KeyEvent.isScrollPageDownAndSelectItem: Boolean + /** Scroll Page Down and Select Node inherited from Page Down */ + public val KeyEvent.isScrollPageDownAndSelectItem: Boolean /** - * Scroll Page Down and Extend Selection inherited from Page Down with Selection + * Scroll Page Down and Extend Selection inherited from Page Down with + * Selection */ - val KeyEvent.isScrollPageDownAndExtendSelection: Boolean + public val KeyEvent.isScrollPageDownAndExtendSelection: Boolean - /** - * Edit item - */ - val KeyEvent.isEdit: Boolean + /** Edit item */ + public val KeyEvent.isEdit: Boolean - /** - * SelectAll - */ - val KeyEvent.isSelectAll: Boolean + /** SelectAll */ + public val KeyEvent.isSelectAll: Boolean } -open class DefaultMacOsSelectableColumnKeybindings : DefaultSelectableColumnKeybindings() { +public open class DefaultMacOsSelectableColumnKeybindings : DefaultSelectableColumnKeybindings() { - companion object : DefaultMacOsSelectableColumnKeybindings() + public companion object : DefaultMacOsSelectableColumnKeybindings() override val KeyEvent.isMultiSelectionKeyPressed: Boolean get() = isMetaPressed @@ -103,7 +87,9 @@ open class DefaultMacOsSelectableColumnKeybindings : DefaultSelectableColumnKeyb get() = isMetaPressed } -open class DefaultSelectableColumnKeybindings : SelectableColumnKeybindings { +public open class DefaultSelectableColumnKeybindings : SelectableColumnKeybindings { + + public companion object : DefaultSelectableColumnKeybindings() override val KeyEvent.isContiguousSelectionKeyPressed: Boolean get() = isShiftPressed @@ -117,45 +103,43 @@ open class DefaultSelectableColumnKeybindings : SelectableColumnKeybindings { override val PointerKeyboardModifiers.isMultiSelectionKeyPressed: Boolean get() = isCtrlPressed - companion object : DefaultSelectableColumnKeybindings() - - override val KeyEvent.isSelectFirstItem + override val KeyEvent.isSelectFirstItem: Boolean get() = key == Key.Home && !isContiguousSelectionKeyPressed - override val KeyEvent.isExtendSelectionToFirstItem + override val KeyEvent.isExtendSelectionToFirstItem: Boolean get() = key == Key.Home && isContiguousSelectionKeyPressed - override val KeyEvent.isSelectLastItem + override val KeyEvent.isSelectLastItem: Boolean get() = key == Key.MoveEnd && !isContiguousSelectionKeyPressed - override val KeyEvent.isExtendSelectionToLastItem + override val KeyEvent.isExtendSelectionToLastItem: Boolean get() = key == Key.MoveEnd && isContiguousSelectionKeyPressed - override val KeyEvent.isSelectPreviousItem + override val KeyEvent.isSelectPreviousItem: Boolean get() = key == Key.DirectionUp && !isContiguousSelectionKeyPressed - override val KeyEvent.isExtendSelectionWithPreviousItem + override val KeyEvent.isExtendSelectionWithPreviousItem: Boolean get() = key == Key.DirectionUp && isContiguousSelectionKeyPressed - override val KeyEvent.isSelectNextItem + override val KeyEvent.isSelectNextItem: Boolean get() = key == Key.DirectionDown && !isContiguousSelectionKeyPressed - override val KeyEvent.isExtendSelectionWithNextItem + override val KeyEvent.isExtendSelectionWithNextItem: Boolean get() = key == Key.DirectionDown && isContiguousSelectionKeyPressed - override val KeyEvent.isScrollPageUpAndSelectItem + override val KeyEvent.isScrollPageUpAndSelectItem: Boolean get() = key == Key.PageUp && !isContiguousSelectionKeyPressed - override val KeyEvent.isScrollPageUpAndExtendSelection + override val KeyEvent.isScrollPageUpAndExtendSelection: Boolean get() = key == Key.PageUp && isContiguousSelectionKeyPressed - override val KeyEvent.isScrollPageDownAndSelectItem + override val KeyEvent.isScrollPageDownAndSelectItem: Boolean get() = key == Key.PageDown && !isContiguousSelectionKeyPressed - override val KeyEvent.isScrollPageDownAndExtendSelection + override val KeyEvent.isScrollPageDownAndExtendSelection: Boolean get() = key == Key.PageDown && isContiguousSelectionKeyPressed - override val KeyEvent.isEdit + override val KeyEvent.isEdit: Boolean get() = false override val KeyEvent.isSelectAll: Boolean diff --git a/foundation/src/main/kotlin/org/jetbrains/jewel/foundation/lazy/tree/DefaultTreeViewKeybindings.kt b/foundation/src/main/kotlin/org/jetbrains/jewel/foundation/lazy/tree/DefaultTreeViewKeybindings.kt index da24608fe3..ef5e0a7f20 100644 --- a/foundation/src/main/kotlin/org/jetbrains/jewel/foundation/lazy/tree/DefaultTreeViewKeybindings.kt +++ b/foundation/src/main/kotlin/org/jetbrains/jewel/foundation/lazy/tree/DefaultTreeViewKeybindings.kt @@ -15,25 +15,26 @@ public open class DefaultTreeViewKeybindings : DefaultSelectableColumnKeybinding public companion object : DefaultTreeViewKeybindings() - override val KeyEvent.isSelectParent + override val KeyEvent.isSelectParent: Boolean get() = key == Key.DirectionLeft && !isContiguousSelectionKeyPressed - override val KeyEvent.isExtendSelectionToParent + override val KeyEvent.isExtendSelectionToParent: Boolean get() = key == Key.DirectionLeft && isContiguousSelectionKeyPressed - override val KeyEvent.isSelectChild + override val KeyEvent.isSelectChild: Boolean get() = key == Key.DirectionRight && !isContiguousSelectionKeyPressed - override val KeyEvent.isExtendSelectionToChild + override val KeyEvent.isExtendSelectionToChild: Boolean get() = key == Key.DirectionRight && isContiguousSelectionKeyPressed - override val KeyEvent.isSelectNextSibling + override val KeyEvent.isSelectNextSibling: Boolean get() = false - override val KeyEvent.isSelectPreviousSibling + override val KeyEvent.isSelectPreviousSibling: Boolean get() = false - override val KeyEvent.isEdit get() = key == Key.F2 && !isContiguousSelectionKeyPressed + override val KeyEvent.isEdit: Boolean + get() = key == Key.F2 && !isContiguousSelectionKeyPressed } public interface TreeViewKeybindings : SelectableColumnKeybindings { diff --git a/foundation/src/main/kotlin/org/jetbrains/jewel/foundation/lazy/tree/KeyActions.kt b/foundation/src/main/kotlin/org/jetbrains/jewel/foundation/lazy/tree/KeyActions.kt index 74efd1ad90..9ba6609168 100644 --- a/foundation/src/main/kotlin/org/jetbrains/jewel/foundation/lazy/tree/KeyActions.kt +++ b/foundation/src/main/kotlin/org/jetbrains/jewel/foundation/lazy/tree/KeyActions.kt @@ -44,13 +44,13 @@ public interface PointerEventActions { key: Any, ) - fun toggleKeySelection( + public fun toggleKeySelection( key: Any, allKeys: List, selectableLazyListState: SelectableLazyListState, ) - fun onExtendSelectionToKey( + public fun onExtendSelectionToKey( key: Any, allKeys: List, state: SelectableLazyListState, @@ -58,7 +58,7 @@ public interface PointerEventActions { ) } -open class DefaultSelectableLazyColumnEventAction : PointerEventActions { +public open class DefaultSelectableLazyColumnEventAction : PointerEventActions { override fun handlePointerEventPress( pointerEvent: PointerEvent, @@ -251,7 +251,7 @@ public open class DefaultSelectableLazyColumnKeyActions( override val actions: SelectableColumnOnKeyEvent = DefaultSelectableOnKeyEvent(keybindings), ) : KeyActions { - companion object : DefaultSelectableLazyColumnKeyActions( + public companion object : DefaultSelectableLazyColumnKeyActions( when { hostOs.isMacOS -> DefaultMacOsSelectableColumnKeybindings else -> DefaultSelectableColumnKeybindings @@ -292,7 +292,8 @@ public open class DefaultSelectableLazyColumnKeyActions( isScrollPageUpAndExtendSelection -> onScrollPageUpAndExtendSelection(keys, state) isScrollPageUpAndSelectItem -> onScrollPageUpAndSelectItem(keys, state) isSelectAll -> onSelectAll(keys, state) - else -> return false} + else -> return false + } } return true } diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiLabelledTextFieldStyling.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiLabelledTextFieldStyling.kt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ui/src/main/kotlin/org/jetbrains/jewel/ui/DefaultComponentStyling.kt b/ui/src/main/kotlin/org/jetbrains/jewel/ui/DefaultComponentStyling.kt index 33d50305a4..3def3ec01a 100644 --- a/ui/src/main/kotlin/org/jetbrains/jewel/ui/DefaultComponentStyling.kt +++ b/ui/src/main/kotlin/org/jetbrains/jewel/ui/DefaultComponentStyling.kt @@ -48,7 +48,7 @@ import org.jetbrains.jewel.ui.component.styling.TooltipStyle @Stable @GenerateDataFunctions -class DefaultComponentStyling( +public class DefaultComponentStyling( public val checkboxStyle: CheckboxStyle, public val chipStyle: ChipStyle, public val circularProgressStyle: CircularProgressStyle, diff --git a/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/LabelledTextField.kt b/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/LabelledTextField.kt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/styling/LabelledTextFieldStyling.kt b/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/styling/LabelledTextFieldStyling.kt deleted file mode 100644 index e69de29bb2..0000000000