package ocgtk

  1. Overview
  2. Docs
OCaml bindings for GTK 4

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1-preview2.tar.gz
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054

doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Calendar/index.html

Module Wrappers.Calendar

type t = [ `calendar | `widget | `initially_unowned | `object_ ] Gobject.obj
val new_ : unit -> t

Create a new Calendar

val unmark_day : t -> int -> unit

Removes the visual marker from a particular day.

val set_year : t -> int -> unit

Sets the year for the selected date.

The new date must be valid. For example, setting 2023 for the year when then the date is 2024-02-29, fails.

val set_show_week_numbers : t -> bool -> unit

Sets whether week numbers are shown in the calendar.

val set_show_heading : t -> bool -> unit

Sets whether the calendar should show a heading.

The heading contains the current year and month as well as buttons for changing both.

val set_show_day_names : t -> bool -> unit

Sets whether the calendar shows day names.

val set_month : t -> int -> unit

Sets the month for the selected date.

The new date must be valid. For example, setting 1 (February) for the month when the day is 31, fails.

val set_day : t -> int -> unit

Sets the day for the selected date.

The new date must be valid. For example, setting 31 for the day when the month is February, fails.

val mark_day : t -> int -> unit

Places a visual marker on a particular day of the current month.

val get_year : t -> int

Gets the year of the selected date.

val get_show_week_numbers : t -> bool

Returns whether @self is showing week numbers right now.

This is the value of the property@Gtk.Calendar:show-week-numbers property.

val get_show_heading : t -> bool

Returns whether @self is currently showing the heading.

This is the value of the property@Gtk.Calendar:show-heading property.

val get_show_day_names : t -> bool

Returns whether @self is currently showing the names of the week days.

This is the value of the property@Gtk.Calendar:show-day-names property.

val get_month : t -> int

Gets the month of the selected date.

val get_day_is_marked : t -> int -> bool

Returns if the @day of the @calendar is already marked.

val get_day : t -> int

Gets the day of the selected date.

val clear_marks : t -> unit

Remove all visual markers.

val on_day_selected : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id
val on_next_month : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id
val on_next_year : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id
val on_prev_month : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id
val on_prev_year : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id