mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
draft gemtext composer
This commit is contained in:
parent
70f3b51591
commit
1cc3ddaf2e
5 changed files with 89 additions and 8 deletions
|
|
@ -1,3 +1,7 @@
|
|||
mod gemini;
|
||||
|
||||
use gemini::Gemini;
|
||||
|
||||
use gtk::ScrolledWindow;
|
||||
|
||||
pub struct Text {
|
||||
|
|
@ -6,10 +10,17 @@ pub struct Text {
|
|||
|
||||
impl Text {
|
||||
// Construct
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
widget: ScrolledWindow::builder().build(),
|
||||
}
|
||||
pub fn gemini(gemtext: &str) -> Self {
|
||||
// Init components
|
||||
let gemini = Gemini::new(gemtext);
|
||||
|
||||
// Init widget
|
||||
let widget = ScrolledWindow::builder().build();
|
||||
|
||||
widget.set_child(Some(gemini.widget()));
|
||||
|
||||
// Result
|
||||
Self { widget }
|
||||
}
|
||||
|
||||
// Getters
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue