26 #if ! defined (octave_text_engine_h)
27 #define octave_text_engine_h 1
29 #include "octave-config.h"
78 std::
string string_value ()
const {
return m_str; }
93 enum { invalid_code = 0xFFFFFFFFU };
102 int get_symbol ()
const {
return m_symbol; }
104 uint32_t get_symbol_code ()
const;
255 const std::
string& get_fontname ()
const {
return m_name; }
277 double get_fontsize ()
const {
return m_size; }
305 #define ASSIGN_COLOR(r,g,b) { m_rgb(0) = r; m_rgb(1) = g; m_rgb(2) = b; }
316 else if (cname ==
"lightBlue")
ASSIGN_COLOR(0.68, .85, .9)
345 el_p->accept (*
this);
374 #define TEXT_ELEMENT_ACCEPT(cls) \
376 cls::accept (text_processor& p) \
442 { destroy_lexer (); }
453 bool init_lexer (
const std::string& s);
455 void destroy_lexer ();
461 void *m_buffer_state;
469 std::unique_ptr<text_parser>
parser;
479 OCTAVE_END_NAMESPACE(
octave)
text_element_color(double r, double g, double b)
text_element_color()=delete
text_element_color(const std::string &cname)
text_element_combined(text_element *e1, text_element *e2)
text_element_fontname(const std::string &fname)
text_element_fontname()=delete
text_element_fontsize(double fsize)
text_element_fontsize()=delete
text_element_fontstyle()=delete
text_element_fontstyle(fontstyle st)
text_element_string(const std::string &s="")
text_element_subscript(char c)
text_element * get_element()
~text_element_subscript()
~text_element_superscript()
text_element * get_element()
text_element_superscript(char c)
text_element_symbol()=delete
text_element_symbol(int sym)
virtual void accept(text_processor &p)=0
void set_parse_result(text_element *e)
text_element * get_parse_result()
virtual text_element * parse(const std::string &s)=0
virtual void visit(text_element_combined &)
virtual void visit(text_element_string &)
virtual void visit(text_element_fontsize &)
virtual void visit(text_element_list &e)
virtual void visit(text_element_superscript &e)
virtual void visit(text_element_fontstyle &)
virtual void visit(text_element_fontname &)
virtual void visit(text_element_color &)
virtual void visit(text_element_symbol &)
virtual void visit(text_element_subscript &e)
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
#define TEXT_ELEMENT_ACCEPT(cls)
#define ASSIGN_COLOR(r, g, b)