Back to index

texmacs  1.0.7.15
Functions
edit_modify.cpp File Reference
#include "modification.hpp"
#include "edit_modify.hpp"
#include "tm_window.hpp"

Go to the source code of this file.

Functions

void edit_assign (editor_rep *ed, path pp, tree u)
void edit_insert (editor_rep *ed, path pp, tree u)
void edit_remove (editor_rep *ed, path pp, int nr)
void edit_split (editor_rep *ed, path pp)
void edit_join (editor_rep *ed, path pp)
void edit_assign_node (editor_rep *ed, path pp, tree_label op)
void edit_insert_node (editor_rep *ed, path pp, tree t)
void edit_remove_node (editor_rep *ed, path pp)
void edit_set_cursor (editor_rep *ed, path pp, tree data)
void edit_announce (editor_rep *ed, modification mod)
void edit_done (editor_rep *ed, modification mod)
void edit_touch (editor_rep *ed, path p)

Function Documentation

void edit_announce ( editor_rep ed,
modification  mod 
)

Definition at line 212 of file edit_modify.cpp.

                                                 {
  switch (mod->k) {
  case MOD_ASSIGN:
    edit_assign (ed, mod->p, mod->t);
    break;
  case MOD_INSERT:
    edit_insert (ed, mod->p, mod->t);
    break;
  case MOD_REMOVE:
    edit_remove (ed, path_up (mod->p), last_item (mod->p));
    break;
  case MOD_SPLIT:
    edit_split (ed, mod->p);
    break;
  case MOD_JOIN:
    edit_join (ed, mod->p);
    break;
  case MOD_ASSIGN_NODE:
    edit_assign_node (ed, mod->p, L(mod));
    break;
  case MOD_INSERT_NODE:
    edit_insert_node (ed, mod->p, mod->t);
    break;
  case MOD_REMOVE_NODE:
    edit_remove_node (ed, mod->p);
    break;
  case MOD_SET_CURSOR:
    edit_set_cursor (ed, mod->p, mod->t);
    break;
  default: FAILED ("invalid modification type");
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void edit_assign ( editor_rep ed,
path  pp,
tree  u 
)

Definition at line 147 of file edit_modify.cpp.

                                              {
  path p= copy (pp);
  ASSERT (ed->the_buffer_path() <= p, "invalid modification");
  ed->notify_assign (p, u);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void edit_assign_node ( editor_rep ed,
path  pp,
tree_label  op 
)

Definition at line 184 of file edit_modify.cpp.

                                                          {
  path p= copy (pp);
  ASSERT (ed->the_buffer_path() <= p, "invalid modification");
  ed->notify_assign_node (p, op);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void edit_done ( editor_rep ed,
modification  mod 
)

Definition at line 246 of file edit_modify.cpp.

                                             {
  path p= copy (mod->p);
  ASSERT (ed->the_buffer_path() <= p, "invalid modification");
  if (mod->k != MOD_SET_CURSOR)
    ed->post_notify (p);
#ifdef EXPERIMENTAL
  copy_announce (subtree (ed->et, ed->rp), ed->cct, mod / ed->rp);
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

void edit_insert ( editor_rep ed,
path  pp,
tree  u 
)

Definition at line 154 of file edit_modify.cpp.

                                              {
  path p= copy (pp);
  ASSERT (ed->the_buffer_path() <= p, "invalid modification");
  ed->notify_insert (p, u);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void edit_insert_node ( editor_rep ed,
path  pp,
tree  t 
)

Definition at line 191 of file edit_modify.cpp.

                                                   {
  path p= copy (pp);
  ASSERT (ed->the_buffer_path() <= p, "invalid modification");
  ed->notify_insert_node (p, t);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void edit_join ( editor_rep ed,
path  pp 
)

Definition at line 176 of file edit_modify.cpp.

                                    {
  path p= copy (pp);
  ASSERT (ed->the_buffer_path() <= p, "invalid modification");
  if (N(p)<1) FAILED ("path too short in join");
  ed->notify_join (p);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void edit_remove ( editor_rep ed,
path  pp,
int  nr 
)

Definition at line 161 of file edit_modify.cpp.

                                              {
  path p= copy (pp);
  ASSERT (ed->the_buffer_path() <= p, "invalid modification");
  if (nr <= 0) return;
  ed->notify_remove (p, nr);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void edit_remove_node ( editor_rep ed,
path  pp 
)

Definition at line 198 of file edit_modify.cpp.

                                           {
  path p= copy (pp);
  ASSERT (ed->the_buffer_path() <= p, "invalid modification");
  ed->notify_remove_node (p);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void edit_set_cursor ( editor_rep ed,
path  pp,
tree  data 
)

Definition at line 205 of file edit_modify.cpp.

                                                     {
  path p= copy (pp);
  ASSERT (ed->the_buffer_path() <= p, "invalid modification");
  ed->notify_set_cursor (p, data);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void edit_split ( editor_rep ed,
path  pp 
)

Definition at line 169 of file edit_modify.cpp.

                                     {
  path p= copy (pp);
  ASSERT (ed->the_buffer_path() <= p, "invalid modification");
  ed->notify_split (p);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void edit_touch ( editor_rep ed,
path  p 
)

Definition at line 257 of file edit_modify.cpp.

                                    {
  //cout << "Touch " << p << "\n";
  ASSERT (ed->the_buffer_path() <= p, "invalid touch");
  ed -> typeset_invalidate (p);
}

Here is the call graph for this function:

Here is the caller graph for this function: