CCategoryButton
A single Tab stop with mutually exclusive segments. Arrows select immediately and wrap. The first item is selected automatically. -1 explicitly clears the selection. currentIndexChanged includes programmatic changes; activated reports user activation.
import { CCategoryButton } from "canvas-toolkit-lib";Declared members
readonly currentIndexChanged: CSignal<[number]>;readonly activated: CSignal<[number]>;constructor(parent?: CWidget | null);count(): number;currentIndex(): number;currentText(): string;itemText(index: number): string;itemIcon(index: number): CIcon | null;isItemEnabled(index: number): boolean;addItem(text: string, icon?: CIcon | null): number;addItems(texts: readonly string[]): void;insertItem(index: number, text: string, icon?: CIcon | null): number;Returns -1 for an invalid insertion index.
removeItem(index: number): void;clear(): void;setItemText(index: number, text: string): void;setItemIcon(index: number, icon: CIcon | null): void;setItemEnabled(index: number, enabled: boolean): void;Disabling the current segment selects the next enabled one, or -1 if none remain.
setCurrentIndex(index: number): void;sizeHint(): CSize;segmentRect(index: number): CRect | null;Segments share surplus width; when squeezed they shrink proportionally.
setEnabled(enabled: boolean): void;setFont(font: CFont, _propagate?: boolean): void;setGeometry(x: number, y: number, w: number, h: number): void;protected visibilityChangeEvent(): void;protected focusOutEvent(event: CFocusEvent): void;protected mousePressEvent(event: CMouseEvent): void;protected mouseReleaseEvent(event: CMouseEvent): void;protected mouseMoveEvent(event: CMouseEvent): void;protected mouseLeaveEvent(event: CMouseEvent): void;protected keyPressEvent(event: CKeyEvent): void;protected keyReleaseEvent(event: CKeyEvent): void;protected paintEvent(painter: CPainter): void;