mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 17:45:28 +00:00
implement gemini source view widget
This commit is contained in:
parent
d8b7a37060
commit
90c9c36ebf
4 changed files with 58 additions and 0 deletions
1
Makefile
1
Makefile
|
|
@ -20,6 +20,7 @@ SRCS = src/app.cpp\
|
||||||
src/app/browser/main/tab/page/content/text.cpp\
|
src/app/browser/main/tab/page/content/text.cpp\
|
||||||
src/app/browser/main/tab/page/content/text/gemini.cpp\
|
src/app/browser/main/tab/page/content/text/gemini.cpp\
|
||||||
src/app/browser/main/tab/page/content/text/gemini/reader.cpp\
|
src/app/browser/main/tab/page/content/text/gemini/reader.cpp\
|
||||||
|
src/app/browser/main/tab/page/content/text/gemini/source.cpp\
|
||||||
src/app/browser/main/tab/page/content/text/plain.cpp\
|
src/app/browser/main/tab/page/content/text/plain.cpp\
|
||||||
src/app/browser/main/tab/page/content/text/plain/reader.cpp\
|
src/app/browser/main/tab/page/content/text/plain/reader.cpp\
|
||||||
src/app/browser/main/tab/page/navigation.cpp\
|
src/app/browser/main/tab/page/navigation.cpp\
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ src/app/browser/main/tab/page/content.cpp
|
||||||
src/app/browser/main/tab/page/content/text.cpp
|
src/app/browser/main/tab/page/content/text.cpp
|
||||||
src/app/browser/main/tab/page/content/text/gemini.cpp
|
src/app/browser/main/tab/page/content/text/gemini.cpp
|
||||||
src/app/browser/main/tab/page/content/text/gemini/reader.cpp
|
src/app/browser/main/tab/page/content/text/gemini/reader.cpp
|
||||||
|
src/app/browser/main/tab/page/content/text/gemini/source.cpp
|
||||||
src/app/browser/main/tab/page/content/text/plain.cpp
|
src/app/browser/main/tab/page/content/text/plain.cpp
|
||||||
src/app/browser/main/tab/page/content/text/plain/reader.cpp
|
src/app/browser/main/tab/page/content/text/plain/reader.cpp
|
||||||
src/app/browser/main/tab/page/navigation.cpp
|
src/app/browser/main/tab/page/navigation.cpp
|
||||||
|
|
|
||||||
32
src/app/browser/main/tab/page/content/text/gemini/source.cpp
Normal file
32
src/app/browser/main/tab/page/content/text/gemini/source.cpp
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
#include "source.hpp"
|
||||||
|
|
||||||
|
using namespace app::browser::main::tab::page::content::text::gemini;
|
||||||
|
|
||||||
|
Source::Source(
|
||||||
|
const Glib::ustring & GEMTEXT
|
||||||
|
) {
|
||||||
|
set_valign(
|
||||||
|
Gtk::Align::START
|
||||||
|
);
|
||||||
|
|
||||||
|
set_wrap(
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
set_selectable(
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
set_use_markup(
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
set_markup(
|
||||||
|
Glib::ustring::sprintf(
|
||||||
|
"<tt>%s</tt>",
|
||||||
|
Glib::Markup::escape_text(
|
||||||
|
GEMTEXT
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
24
src/app/browser/main/tab/page/content/text/gemini/source.hpp
Normal file
24
src/app/browser/main/tab/page/content/text/gemini/source.hpp
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
#ifndef APP_BROWSER_MAIN_TAB_PAGE_CONTENT_TEXT_GEMINI_SOURCE_HPP
|
||||||
|
#define APP_BROWSER_MAIN_TAB_PAGE_CONTENT_TEXT_GEMINI_SOURCE_HPP
|
||||||
|
|
||||||
|
#include <glibmm/markup.h>
|
||||||
|
#include <glibmm/ustring.h>
|
||||||
|
#include <gtkmm/enums.h>
|
||||||
|
#include <gtkmm/label.h>
|
||||||
|
|
||||||
|
namespace app::browser::main::tab::page::content::text::gemini
|
||||||
|
{
|
||||||
|
class Source : public Gtk::Label
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Gemini class API
|
||||||
|
*/
|
||||||
|
public:
|
||||||
|
|
||||||
|
Source(
|
||||||
|
const Glib::ustring & GEMTEXT
|
||||||
|
);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // APP_BROWSER_MAIN_TAB_PAGE_CONTENT_TEXT_GEMINI_SOURCE_HPP
|
||||||
Loading…
Add table
Add a link
Reference in a new issue