Canvas Toolkit
← Class index

CNavigationPath

Widgets · extends CWidget

A hierarchy path with clickable ancestors and an overflow menu. Activation requests navigation; it never changes the path automatically.

import { CNavigationPath } from "canvas-toolkit-lib";

Declared members

static readonly HorizontalPadding = 8;
static readonly SeparatorWidth = 14;
readonly activated: CSignal<[number, string]>;
readonly pathChanged: CSignal<[string[]]>;
constructor(parent?: CWidget | null);
path(): string[];
count(): number;
currentIndex(): number;
setPath(path: readonly string[]): void;
clear(): void;
segmentRect(index: number): CRect | null;

A copy of a visible segment's rectangle, or null when it is hidden.

overflowButtonRect(): CRect | null;
hiddenIndices(): number[];
overflowMenu(): CMenu | null;

The internally owned popup, created lazily when overflow is opened.

sizeHint(): CSize;
setFont(font: CFont, propagate?: boolean): void;
setGeometry(x: number, y: number, width: number, height: number): void;
setEnabled(enabled: boolean): void;
hide(): void;
destroy(): void;
showOverflow(): void;
protected mousePressEvent(event: CMouseEvent): void;
protected mouseReleaseEvent(event: CMouseEvent): void;
protected mouseMoveEvent(event: CMouseEvent): void;
protected mouseEnterEvent(event: CMouseEvent): void;
protected mouseLeaveEvent(event: CMouseEvent): void;
protected focusOutEvent(event: CFocusEvent): void;
protected keyPressEvent(event: CKeyEvent): void;
protected keyReleaseEvent(event: CKeyEvent): void;
protected paintEvent(painter: CPainter): void;