class

CRT::Ncurses::Calendar

Inherits CRT::Ncurses::CRTObjs < CRT::Ncurses::Formattable < CRT::Ncurses::CommonControls < CRT::Ncurses::WindowHooks < CRT::Ncurses::WindowInput < CRT::Ncurses::HasTitle < CRT::Ncurses::HasScreen < CRT::Ncurses::ExitConditions < CRT::Ncurses::Bindings < CRT::Ncurses::Focusable < CRT::Ncurses::Borders < CRT::Ncurses::Movement < CRT::Ncurses::Converters < CRT::Ncurses::Justifications < CRT::Ncurses::Alignments < Reference < Object

Constants

CALENDAR_LIMIT = (MAX_DAYS * MAX_MONTHS) * MAX_YEARS
DAYS_OF_THE_MONTH = [-1, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
MAX_DAYS = 32
MAX_MONTHS = 13
MAX_YEARS = 140
MONTHS_OF_THE_YEAR = ["NULL", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]

Constructors

new(screen : CRT::Ncurses::Screen, *, x : Int32, y : Int32, day : Int32 = Time.local.day, month : Int32 = Time.local.month, year : Int32 = Time.local.year, title : String = "", day_attrib : Int32 = 0, month_attrib : Int32 = 0, year_attrib : Int32 = 0, highlight : Int32 = LibNCurses::Attribute::Reverse.value.to_i32, box : Bool | CRT::Ncurses::Framing | Nil = nil, shadow : Bool = false)
Source

Class methods

calendar_index(d : Int32, m : Int32, y : Int32) : Int32
Source
get_month_length(year : Int32, month : Int32) : Int32
Source
get_month_start_weekday(year : Int32, month : Int32) : Int32
Source
is_leap_year?(year : Int32) : Bool
Source
year2index(year : Int32) : Int32
Source

Instance methods

activate(actions : Array(Int32) | Nil = nil) : Int32
Source
background=(attrib : Int32)
Source
destroy
Source
draw(box : Bool = @box)
Source
draw_field
Source
erase
Source
focus
Source
get_marker(day : Int32, month : Int32, year : Int32) : Int32
Source
inject(input : Int32) : Int32
Source
month
Source
object_type
Source
remove_marker(day : Int32, month : Int32, year : Int32)
Source
set_date(day : Int32, month : Int32, year : Int32)
Source
set_marker(day : Int32, month : Int32, year : Int32, marker : Int32)
Source
unfocus
Source
week_base
Source
year
Source