App:Library:LVGL:docs:Widgets:Message box (lv msgbox)
https://docs.lvgl.io/8.2/widgets/extra/msgbox.html
Message box (lv_msgbox)
Overview
英文 | 自動翻訳 |
---|---|
The Message boxes act as pop-ups. They are built from a background container, a title, an optional close button, a text and optional buttons. The text will be broken into multiple lines automatically and the height will be set automatically to include the text and the buttons. The message box can be modal (blocking clicks on the rest of the screen) or not modal. |
メッセージボックスはポップアップとして機能します。 これらは、背景コンテナ、タイトル、オプションの閉じるボタン、テキスト、およびオプションのボタンから構築されています。
テキストは自動的に複数の行に分割され、高さはテキストとボタンを含むように自動的に設定されます。 メッセージボックスは、モーダル(画面の残りの部分でのクリックをブロックする)またはモーダルではない場合があります。 |
Parts and Styles
英文 | 自動翻訳 |
---|---|
The message box is built from other widgets, so you can check these widgets' documentation for details.
|
メッセージボックスは他のウィジェットから構築されているため、これらのウィジェットのドキュメントで詳細を確認できます。
|
Usage
Create a message box
英文 | 自動翻訳 |
---|---|
|
lv_msgbox_create(parent, title, txt, btn_txts[], add_close_btn) は、メッセージボックスを作成します。
|
Get the parts
英文 | 自動翻訳 |
---|---|
The building blocks of the message box can be obtained using the following functions: lv_obj_t * lv_msgbox_get_title(lv_obj_t * mbox);
lv_obj_t * lv_msgbox_get_close_btn(lv_obj_t * mbox);
lv_obj_t * lv_msgbox_get_text(lv_obj_t * mbox);
lv_obj_t * lv_msgbox_get_btns(lv_obj_t * mbox);
|
メッセージボックスの構成要素は、次の関数を使用して取得できます。
lv_obj_t * lv_msgbox_get_title(lv_obj_t * mbox);
lv_obj_t * lv_msgbox_get_close_btn(lv_obj_t * mbox);
lv_obj_t * lv_msgbox_get_text(lv_obj_t * mbox);
lv_obj_t * lv_msgbox_get_btns(lv_obj_t * mbox);
|
Close the message box
英文 | 自動翻訳 |
---|---|
|
lv_msgbox_close(msgbox) は、メッセージボックスを閉じます(削除します)。
|
Events
英文 | 自動翻訳 |
---|---|
|
|
Keys
英文 | 自動翻訳 |
---|---|
Keys have effect on the close button and button matrix. You can add them manually to a group if required. Learn more about Keys. |
キーは、閉じるボタンとボタンのマトリックスに影響します。必要に応じて、グループに手動で追加できます。
キーの詳細を確認してください。 |
Example
英文 | 自動翻訳 |
---|---|
Simple Message box |
API
英文 | 自動翻訳 |
---|---|
Functions lv_obj_t *lv_msgbox_create(lv_obj_t *parent, const char *title, const char *txt, const char *btn_txts[], bool add_close_btn)
lv_obj_t *lv_msgbox_get_title(lv_obj_t *obj) lv_obj_t *lv_msgbox_get_close_btn(lv_obj_t *obj) lv_obj_t *lv_msgbox_get_text(lv_obj_t *obj) lv_obj_t *lv_msgbox_get_content(lv_obj_t *obj) lv_obj_t *lv_msgbox_get_btns(lv_obj_t *obj) uint16_t lv_msgbox_get_active_btn(lv_obj_t *mbox)
const char *lv_msgbox_get_active_btn_text(lv_obj_t *mbox) void lv_msgbox_close(lv_obj_t *mbox) void lv_msgbox_close_async(lv_obj_t *mbox) Variables const lv_obj_class_t lv_msgbox_class const lv_obj_class_t lv_msgbox_content_class const lv_obj_class_t lv_msgbox_backdrop_class struct lv_msgbox_t
|
Functions
lv_obj_t *lv_msgbox_create(lv_obj_t *parent, const char *title, const char *txt, const char *btn_txts[], bool add_close_btn)
lv_obj_t *lv_msgbox_get_title(lv_obj_t *obj) lv_obj_t *lv_msgbox_get_close_btn(lv_obj_t *obj) lv_obj_t *lv_msgbox_get_text(lv_obj_t *obj) lv_obj_t *lv_msgbox_get_content(lv_obj_t *obj) lv_obj_t *lv_msgbox_get_btns(lv_obj_t *obj) uint16_t lv_msgbox_get_active_btn(lv_obj_t *mbox)
const char *lv_msgbox_get_active_btn_text(lv_obj_t *mbox) void lv_msgbox_close(lv_obj_t *mbox) void lv_msgbox_close_async(lv_obj_t *mbox) Variables const lv_obj_class_t lv_msgbox_class const lv_obj_class_t lv_msgbox_content_class const lv_obj_class_t lv_msgbox_backdrop_class struct lv_msgbox_t
|