add text/plain content support

This commit is contained in:
yggverse 2024-08-18 15:32:31 +03:00
parent a73bb3aea6
commit 30e3ae691a
8 changed files with 66 additions and 2 deletions

View file

@ -0,0 +1,21 @@
#include "plain.hpp"
using namespace app::browser::main::tab::page::content::text;
Plain::Plain(
const Glib::ustring & text
) {
set_wrap(
true
);
set_selectable(
true
);
set_text(
text
);
}
Plain::~Plain() = default;

View file

@ -0,0 +1,21 @@
#ifndef APP_BROWSER_MAIN_TAB_PAGE_CONTENT_TEXT_PLAIN_HPP
#define APP_BROWSER_MAIN_TAB_PAGE_CONTENT_TEXT_PLAIN_HPP
#include <glibmm/ustring.h>
#include <gtkmm/label.h>
namespace app::browser::main::tab::page::content::text
{
class Plain : public Gtk::Label
{
public:
Plain(
const Glib::ustring & text
);
~Plain();
};
}
#endif // APP_BROWSER_MAIN_TAB_PAGE_CONTENT_TEXT_PLAIN_HPP