Back to index

texmacs  1.0.7.15
Public Member Functions | Public Attributes
oriental_language_rep Struct Reference
Inheritance diagram for oriental_language_rep:
Inheritance graph
[legend]
Collaboration diagram for oriental_language_rep:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 oriental_language_rep (string lan_name)
text_property advance (tree t, int &pos)
array< int > get_hyphens (string s)
void hyphenate (string s, int after, string &left, string &right)
virtual string get_group (string s)
virtual array< stringget_members (string s)
virtual void highlight (tree t)
virtual string get_color (tree t, int start, int end)

Public Attributes

string lan_name
int hl_lan
string res_name

Detailed Description

Definition at line 112 of file text_language.cpp.


Constructor & Destructor Documentation

Definition at line 119 of file text_language.cpp.

                                                            :
  language_rep (lan_name) {}

Member Function Documentation

text_property oriental_language_rep::advance ( tree  t,
int &  pos 
) [virtual]

Implements language_rep.

Definition at line 123 of file text_language.cpp.

                                                {
  string s= t->label;
  if (pos == N(s)) return &tp_normal_rep;

  if (s[pos]==' ') {
    pos++;
    if ((pos == N(s)) || (!is_punctuation (s[pos])))
      return &tp_space_rep;
    return &tp_blank_rep;
  }

  int begin= pos;
  while (pos<N(s) && s[pos] != ' ') {
    int start= pos;
    tm_char_forwards (s, pos);
    string c= s (start, pos);
    if (starts (c, "<#300") && N(c) == 7) {
      if (start > begin) pos= start;
      break;
    }
  }
  return &tp_normal_rep;
}

Here is the call graph for this function:

string language_rep::get_color ( tree  t,
int  start,
int  end 
) [virtual, inherited]

Reimplemented in cpp_language_rep, mathemagix_language_rep, scheme_language_rep, and verb_language_rep.

Definition at line 168 of file language.cpp.

                                                   {
  (void) t; (void) start; (void) end;
  return "";
}
string language_rep::get_group ( string  s) [virtual, inherited]

Reimplemented in math_language_rep.

Definition at line 150 of file language.cpp.

                                 {
  (void) s;
  return "default";
}

Implements language_rep.

Definition at line 148 of file text_language.cpp.

                                            {
  int i, n= N(s);
  array<int> T (n-1);
  for (i=0; i<n-1; i++)
    T[i]= HYPH_INVALID;
  for (i=0, tm_char_forwards (s, i); i<n; tm_char_forwards (s, i))
    if (s[i] == '<')
      T[i-1]= 0;
  return T;
}

Here is the call graph for this function:

array< string > language_rep::get_members ( string  s) [virtual, inherited]

Reimplemented in math_language_rep.

Definition at line 156 of file language.cpp.

                                   {
  (void) s;
  return array<string> ();
}
void language_rep::highlight ( tree  t) [virtual, inherited]

Definition at line 162 of file language.cpp.

                               {
  if (hl_lan != 0 && !has_highlight (t, hl_lan))
    packrat_highlight (res_name, "Main", t);
}

Here is the call graph for this function:

void oriental_language_rep::hyphenate ( string  s,
int  after,
string left,
string right 
) [virtual]

Implements language_rep.

Definition at line 160 of file text_language.cpp.

{
  left = s (0, after+1);
  right= s (after+1, N(s));
}

Here is the call graph for this function:


Member Data Documentation

int language_rep::hl_lan [inherited]

Definition at line 113 of file language.hpp.

Definition at line 112 of file language.hpp.

string rep< language >::res_name [inherited]

Definition at line 17 of file resource.hpp.


The documentation for this struct was generated from the following file: