Canvas Toolkit
← Class index

CCalendarWidget

Widgets · extends CWidget

Implements the calendar widget widget.

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

Declared members

readonly selectionChanged: CSignal<[]>;

Signal emitted when selection changes.

readonly clicked: CSignal<[Date]>;

Public clicked member.

readonly activated: CSignal<[Date]>;

Public activated member.

readonly currentPageChanged: CSignal<[number, number]>;

Signal emitted when current page changes.

constructor(parent?: CWidget | null);

Creates a new instance.

selectedDate(): Date;

Returns the selected date.

setSelectedDate(date: Date): void;

Sets the selected date.

minimumDate(): Date;

Returns the minimum date.

setMinimumDate(date: Date): void;

Sets the minimum date.

maximumDate(): Date;

Returns the maximum date.

setMaximumDate(date: Date): void;

Sets the maximum date.

yearShown(): number;

Provides year shown behavior.

monthShown(): number;

Provides month shown behavior.

showNextMonth(): void;

Shows next month.

showPreviousMonth(): void;

Shows previous month.

showNextYear(): void;

Shows next year.

showPreviousYear(): void;

Shows previous year.

setCurrentPage(year: number, month: number): void;

Sets the current page.

sizeHint(): CSize;

Returns the preferred size of the widget.

setGeometry(x: number, y: number, width: number, height: number): void;

Sets the geometry.

protected mouseReleaseEvent(event: CMouseEvent): void;

Handles the mouse release event.

protected mouseMoveEvent(event: CMouseEvent): void;

Handles the mouse move event.

protected mouseLeaveEvent(event: CMouseEvent): void;

Handles the mouse leave event.

protected paintEvent(painter: CPainter): void;

Handles the paint event.