12#ifndef SEEN_UI_UI_SYNTAX_H
13#define SEEN_UI_UI_SYNTAX_H
18#include <gtkmm/textview.h>
20#include <glibmm/ustring.h>
27 std::optional<Glib::ustring>
color;
74 void openTag(
char const *tag_name);
75 void addAttribute(
char const *attribute_name,
char const *attribute_value);
76 Glib::ustring
finishTag(
bool self_close =
false);
78 Glib::ustring
formatContent(
char const* content,
bool wrap_in_quotes =
true)
const;
79 Glib::ustring
formatComment(
char const* comment,
bool wrap_in_comment_marks =
true)
const;
83 Glib::ustring
_format(
Style const &style, Glib::ustring
const &content)
const;
84 Glib::ustring
_format(
Style const &style,
char const *content)
const
112 virtual void setStyle(
const Glib::ustring& theme) = 0;
113 virtual void setText(
const Glib::ustring& text) = 0;
Base class for styled text editing widget.
virtual Glib::ustring getText() const =0
virtual ~TextEditView()=default
virtual void setStyle(const Glib::ustring &theme)=0
virtual void setText(const Glib::ustring &text)=0
virtual Gtk::TextView & getTextView() const =0
XMLStyles build_xml_styles(const Glib::ustring &syntax_theme)
Build XML styles from a GTKSourceView syntax color theme.
SyntaxMode
Syntax highlighting mode (language).
@ CssStyle
File-scope CSS (contents of a CSS file or a <style> tag).
@ PlainText
Plain text (no highlighting).
@ SvgPolyPoints
Contents of the 'points' attribute of <polyline> or <polygon>.
@ SvgPathData
Contents of the 'd' attribute of the SVG <path> element.
@ InlineCss
Inline CSS (contents of a style="..." attribute).
The style of a single element in a (Pango markup)-enabled widget.
std::optional< Glib::ustring > background
Glib::ustring openingTag() const
Get the opening tag of the Pango markup for this style.
std::optional< Glib::ustring > color
Glib::ustring closingTag() const
Get the closing tag of Pango markup for this style.
The styles used for simple XML syntax highlighting.