File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed
lib/Terminal/Widgets/Viewer Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 6363 "Terminal::Widgets::Utils::Color" : " lib/Terminal/Widgets/Utils/Color.rakumod" ,
6464 "Terminal::Widgets::Viewer::DirTree" : " lib/Terminal/Widgets/Viewer/DirTree.rakumod" ,
6565 "Terminal::Widgets::Viewer::Log" : " lib/Terminal/Widgets/Viewer/Log.rakumod" ,
66+ "Terminal::Widgets::Viewer::RichText" : " lib/Terminal/Widgets/Viewer/RichText.rakumod" ,
6667 "Terminal::Widgets::Viewer::Tree" : " lib/Terminal/Widgets/Viewer/Tree.rakumod" ,
6768 "Terminal::Widgets::Viz::SmokeChart" : " lib/Terminal/Widgets/Viz/SmokeChart.rakumod" ,
6869 "Terminal::Widgets::Volatile::DirTree" : " lib/Terminal/Widgets/Volatile/DirTree.rakumod" ,
Original file line number Diff line number Diff line change 1+ # ABSTRACT: General viewer for rich text content
2+
3+ use Terminal::Widgets::Layout;
4+ use Terminal::Widgets::WrappableBuffer;
5+
6+
7+ # | Layout node for a rich text viewer widget
8+ class Terminal::Widgets::Layout::RichTextViewer
9+ is Terminal::Widgets::Layout::Leaf {
10+ method builder-name () { ' rich-text-viewer' }
11+ }
12+
13+
14+ # | General viewer for rich text content
15+ class Terminal::Widgets::Viewer::RichText
16+ does Terminal::Widgets::WrappableBuffer {
17+ method layout-class () { Terminal::Widgets::Layout::RichTextViewer }
18+ }
19+
20+
21+ # Register Viewer::RichText as a buildable widget type
22+ Terminal::Widgets::Viewer::RichText. register;
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ use Terminal::Widgets::Volatile::DirTree;
6262use Terminal::Widgets::Viewer::Log;
6363use Terminal::Widgets::Viewer::Tree;
6464use Terminal::Widgets::Viewer::DirTree;
65+ use Terminal::Widgets::Viewer::RichText;
6566
6667use Terminal::Widgets::Viz::SmokeChart;
6768
You can’t perform that action at this time.
0 commit comments