App:Library:LVGL:docs:Widgets:Calendar (lv calendar)
https://docs.lvgl.io/8.2/widgets/extra/calendar.html https://docs.lvgl.io/latest/en/html/widgets/calendar.html
Calendar (lv_calendar)
Overview
英文 | 自動翻訳 |
---|---|
The Calendar object is a classic calendar which can:
To make the Calendar flexible, by default it doesn't show the current year or month. Instead, there are optional "headers" that can be attached to the calendar. |
Calendarオブジェクトは、次のことができる従来のカレンダーです。
|
Parts and Styles
英文 | 自動翻訳 |
---|---|
The calendar object uses the Button matrix object under the hood to arrange the days into a matrix.
|
calendarオブジェクトは、内部的にButton matrixオブジェクトを使用して、日付をマトリックスに配置します。
|
Usage
英文 | 自動翻訳 |
---|---|
Some functions use the |
いくつかの関数では、year 、month 、day のフィールドを持つ構造体である lv_calendar_date_t 型を使用する。
|
Current date
英文 | 自動翻訳 |
---|---|
To set the current date (today), use the |
現在の日付(今日)を設定するには、 lv_calendar_set_today_date(calendar, year, month, day) 関数を使用します。
|
Shown date
英文 | 自動翻訳 |
---|---|
To set the shown date, use |
表示する日付を設定するには、lv_calendar_set_shown_date(calendar, year, month) を使用します。
|
Highlighted days
英文 | 自動翻訳 |
---|---|
The list of highlighted dates should be stored in a Only the array's pointer will be saved so the array should be a static or global variable. |
ハイライトされた日付のリストは lv_calendar_set_highlighted_dates(calendar, highlighted_dates, date_num) で読み込んだ lv_calendar_date_t 配列に格納されなければなりません。
配列のポインタだけが保存されるので、配列は静的変数かグローバル変数であるべきです。 |
Name of the days
英文 | 自動翻訳 |
---|---|
The name of the days can be adjusted with Only the pointer of the day names is saved so the elements should be static, global or constant variables. |
曜日名は lv_calendar_set_day_names(calendar, day_names) で調整可能で、day_names は const char * day_names[7] = {"Su", "Mo", ...}; のようになります。
曜日のポインタだけが保存されるので、その要素は静的変数、グローバル変数、定数変数である必要があります。 |
Events
英文 | 自動翻訳 |
---|---|
Learn more about Events. |
|
Keys
英文 | 自動翻訳 |
---|---|
Learn more about Keys. |
キーの詳細を確認してください。 |
Headers
英文 | 自動翻訳 |
---|---|
From v8.1 the header is added directly into the Calendar widget and the API of the headers has been changed. |
v 8.1から、ヘッダはカレンダウィジェットに直接追加され、ヘッダのAPIが変更されました。 |
Arrow buttons
英文 | 自動翻訳 |
---|---|
|
lv_calendar_header_arrow_create(calendar) は、左右の矢印と、その間に現在の年と月を記したテキストを含むヘッダを作成します。
|
Drop-down
英文 | 自動翻訳 |
---|---|
|
lv_calendar_header_dropdown_create(calendar) は、2つのドロップダウンリスト(年、月)を含むヘッダーを作成します。
|
Example
英文 | 自動翻訳 |
---|---|
Calendar with header |
API
英文 | 自動翻訳 |
---|---|
Functions lv_obj_t *lv_calendar_create(lv_obj_t *parent) void lv_calendar_set_today_date(lv_obj_t *obj, uint32_t year, uint32_t month, uint32_t day)
void lv_calendar_set_showed_date(lv_obj_t *obj, uint32_t year, uint32_t month)
void lv_calendar_set_highlighted_dates(lv_obj_t *obj, lv_calendar_date_t highlighted[], uint16_t date_num)
void lv_calendar_set_day_names(lv_obj_t *obj, const char **day_names)
lv_obj_t *lv_calendar_get_btnmatrix(const lv_obj_t *obj)
const lv_calendar_date_t *lv_calendar_get_today_date(const lv_obj_t *calendar)
const lv_calendar_date_t *lv_calendar_get_showed_date(const lv_obj_t *calendar)
lv_calendar_date_t *lv_calendar_get_highlighted_dates(const lv_obj_t *calendar)
uint16_t lv_calendar_get_highlighted_dates_num(const lv_obj_t *calendar)
lv_res_t lv_calendar_get_pressed_date(const lv_obj_t *calendar, lv_calendar_date_t *date)
Variables const lv_obj_class_t lv_calendar_class struct lv_calendar_date_t
struct lv_calendar_t
|
lv_obj_t *lv_calendar_create(lv_obj_t *parent) void lv_calendar_set_today_date(lv_obj_t *obj, uint32_t year, uint32_t month, uint32_t day)
void lv_calendar_set_showed_date(lv_obj_t *obj, uint32_t year, uint32_t month)
void lv_calendar_set_highlighted_dates(lv_obj_t *obj, lv_calendar_date_t highlighted[], uint16_t date_num)
void lv_calendar_set_day_names(lv_obj_t *obj, const char **day_names)
lv_obj_t *lv_calendar_get_btnmatrix(const lv_obj_t *obj)
const lv_calendar_date_t *lv_calendar_get_today_date(const lv_obj_t *calendar)
const lv_calendar_date_t *lv_calendar_get_showed_date(const lv_obj_t *calendar)
lv_calendar_date_t *lv_calendar_get_highlighted_dates(const lv_obj_t *calendar)
uint16_t lv_calendar_get_highlighted_dates_num(const lv_obj_t *calendar)
lv_res_t lv_calendar_get_pressed_date(const lv_obj_t *calendar, lv_calendar_date_t *date)
Variables const lv_obj_class_t lv_calendar_class struct lv_calendar_date_t
struct lv_calendar_t
|