/** * ToolBox — counterpart of vcl/source/window/toolbox.cxx. Buttons never take * focus (mousedown is swallowed) so the document keeps its selection. */ import { ChevronDown } from "lucide-react"; import type { MouseEvent as ReactMouseEvent, ReactNode } from "react"; const keepFocus = (e: ReactMouseEvent) => e.preventDefault(); export function ToolBox({ children, label }: { children: ReactNode; label?: string }) { return (
{children}
); } export interface ToolBoxButtonProps { icon?: ReactNode; text?: string; tooltip: string; checked?: boolean; disabled?: boolean; onClick: (e: ReactMouseEvent) => void; } export function ToolBoxButton({ icon, text, tooltip, checked, disabled, onClick }: ToolBoxButtonProps) { return ( ); } /** A button with a drop-down arrow (ToolBoxItemBits::DROPDOWN). */ export function ToolBoxSplitButton({ onDropDown, ...main }: ToolBoxButtonProps & { onDropDown: (e: ReactMouseEvent) => void }) { return ( } tooltip={`${main.tooltip} options`} disabled={main.disabled} onClick={onDropDown} /> ); } export function ToolBoxSeparator() { return ; }