Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

M5HtmlViewer

M5Stack/M5GFX向けの、小さなHTMLサブセットを描画するArduinoライブラリです。

いきなりブラウザ互換を目指すのではなく、M5Stackの画面で設定画面、ヘルプ、端末内ドキュメント、簡単なカード表示を作るためのViewerとして設計しています。 CSSとJavaScriptは今後も対応しません。

対応タグ

  • <h1>, <h2>, <h3>
  • <p>, <div>
  • <br>, <hr>
  • <b>, <strong>, <i>, <em>, <small>
  • <a>
  • <ul>, <ol>, <li>

使い方

#include <M5Unified.h>
#include <M5HtmlViewer.h>

M5HtmlViewer viewer(M5.Display);

void setup() {
  auto cfg = M5.config();
  M5.begin(cfg);

  viewer.setViewport(0, 0, M5.Display.width(), M5.Display.height());
  viewer.render("<h1>Hello</h1><p>M5StackでHTMLを描画します。</p>");
}

void loop() {
  M5.update();
}

ドキュメント

方針

  • ESP32上で扱いやすいよう、DOMを大きく構築せずストリーミング気味に描画します。
  • 描画はM5GFXに依存します。
  • HTMLは「小型画面の情報表示」に必要な範囲から段階的に増やします。

次に入れたい機能

  • ボタン要素とそれの押下イベント

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages