Inkscape
Vector Graphics Editor
|
Classes | |
struct | Style |
The style of a single element in a (Pango markup)-enabled widget. More... | |
class | TextEditView |
Base class for styled text editing widget. More... | |
class | XMLFormatter |
A formatter for XML syntax, based on Pango markup. More... | |
struct | XMLStyles |
The styles used for simple XML syntax highlighting. More... | |
Enumerations | |
enum class | SyntaxMode { PlainText , InlineCss , CssStyle , SvgPathData , SvgPolyPoints , JavaScript } |
Syntax highlighting mode (language). More... | |
Functions | |
Glib::ustring | quote (const char *text) |
XMLStyles | build_xml_styles (const Glib::ustring &syntax_theme) |
Build XML styles from a GTKSourceView syntax color theme. | |
Glib::ustring | prettify_css (Glib::ustring const &css) |
Reformat CSS for better readability. | |
Glib::ustring | minify_css (Glib::ustring const &css) |
Undo the CSS prettification by stripping some whitespace from CSS markup. | |
Glib::ustring | prettify_svgd (Glib::ustring const &d) |
Reformat a path 'd' attibute for better readability. | |
Glib::ustring | minify_svgd (Glib::ustring const &d) |
Remove excessive space, including newlines, from a path 'd' attibute. | |
static void | init_text_view (Gtk::TextView *textview) |
Set default options on a TextView widget used for syntax-colored editing. | |
static GtkSourceLanguageManager * | get_language_manager () |
Return a pointer to a language manager which is aware of both default and custom syntaxes. | |
|
strong |
Syntax highlighting mode (language).
Enumerator | |
---|---|
PlainText | Plain text (no highlighting). |
InlineCss | Inline CSS (contents of a style="..." attribute). |
CssStyle | |
SvgPathData | Contents of the 'd' attribute of the SVG <path> element. |
SvgPolyPoints | Contents of the 'points' attribute of <polyline> or <polygon>. |
JavaScript |
XMLStyles Inkscape::UI::Syntax::build_xml_styles | ( | const Glib::ustring & | syntax_theme | ) |
Build XML styles from a GTKSourceView syntax color theme.
Definition at line 129 of file syntax.cpp.
References Inkscape::UI::Syntax::XMLStyles::angular_brackets, Inkscape::UI::Syntax::XMLStyles::attribute_name, Inkscape::UI::Syntax::XMLStyles::attribute_value, Inkscape::UI::Syntax::Style::background, Inkscape::UI::Syntax::Style::bold, Inkscape::UI::Syntax::Style::color, Inkscape::UI::Syntax::XMLStyles::comment, Inkscape::UI::Syntax::XMLStyles::content, Inkscape::UI::Syntax::XMLStyles::error, Inkscape::UI::Syntax::Style::italic, name, Inkscape::UI::Syntax::XMLStyles::prolog, set, Inkscape::UI::Syntax::XMLStyles::tag_name, and Inkscape::UI::Syntax::Style::underline.
Referenced by Inkscape::UI::Dialog::XmlTree::XmlTree().
|
static |
Return a pointer to a language manager which is aware of both default and custom syntaxes.
Definition at line 286 of file syntax.cpp.
References Inkscape::IO::Resource::get_path_string(), result, Inkscape::IO::Resource::SYSTEM, and Inkscape::IO::Resource::UIS.
|
static |
Set default options on a TextView widget used for syntax-colored editing.
Definition at line 254 of file syntax.cpp.
Glib::ustring Inkscape::UI::Syntax::minify_css | ( | Glib::ustring const & | css | ) |
Undo the CSS prettification by stripping some whitespace from CSS markup.
Definition at line 215 of file syntax.cpp.
Referenced by Inkscape::UI::Syntax::TextEditView::create().
Glib::ustring Inkscape::UI::Syntax::minify_svgd | ( | Glib::ustring const & | d | ) |
Remove excessive space, including newlines, from a path 'd' attibute.
Definition at line 245 of file syntax.cpp.
References result, and Inkscape::Util::trim().
Referenced by Inkscape::UI::Syntax::TextEditView::create().
Glib::ustring Inkscape::UI::Syntax::prettify_css | ( | Glib::ustring const & | css | ) |
Reformat CSS for better readability.
Definition at line 199 of file syntax.cpp.
Referenced by Inkscape::UI::Syntax::TextEditView::create().
Glib::ustring Inkscape::UI::Syntax::prettify_svgd | ( | Glib::ustring const & | d | ) |
Reformat a path 'd' attibute for better readability.
Definition at line 227 of file syntax.cpp.
References result, and Inkscape::Util::trim().
Referenced by Inkscape::UI::Syntax::TextEditView::create().
Glib::ustring Inkscape::UI::Syntax::quote | ( | const char * | text | ) |
Definition at line 72 of file syntax.cpp.
Referenced by Inkscape::UI::Syntax::XMLFormatter::addAttribute(), and Inkscape::UI::Syntax::XMLFormatter::formatContent().