Back to index

texmacs  1.0.7.15
Functions | Variables
edit_interface.cpp File Reference
#include "Interface/edit_interface.hpp"
#include "file.hpp"
#include "convert.hpp"
#include "server.hpp"
#include "tm_window.hpp"
#include "Metafont/tex_files.hpp"
#include "data_cache.hpp"
#include "drd_mode.hpp"
#include "message.hpp"
#include "tree_traverse.hpp"

Go to the source code of this file.

Functions

string MODE_LANGUAGE (string mode)
static bool is_graphical (tree t)
static void correct_adjacent (rectangles &rs1, rectangles &rs2)

Variables

void(* env_next_prog )(void)

Function Documentation

static void correct_adjacent ( rectangles rs1,
rectangles rs2 
) [static]

Definition at line 272 of file edit_interface.cpp.

                                                    {
  if (N(rs1) != 1 || N(rs2) != 1) return;
  SI bot1= rs1->item->y1;
  SI top2= rs2->item->y2;
  if (rs1->item->y1 <= rs2->item->y1) {
    //cout << "Discard " << rs1->item->y1 << ", " << rs2->item->y1 << "\n";
    return;
  }
  if (rs1->item->y2 <= rs2->item->y2) {
    //cout << "Discard " << rs1->item->y2 << ", " << rs2->item->y2 << "\n";
    return;
  }
  SI mid= (bot1 + top2) >> 1;
  rs1->item->y1= mid;
  rs2->item->y2= mid;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static bool is_graphical ( tree  t) [static]

Definition at line 263 of file edit_interface.cpp.

                      {
  return
    is_func (t, _POINT) ||
    is_func (t, LINE) || is_func (t, CLINE) ||
    is_func (t, ARC) || is_func (t, CARC) ||
    is_func (t, SPLINE) || is_func (t, CSPLINE);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 29 of file edit_interface.cpp.

                            {
  if (mode == "text") return LANGUAGE;
  else if (mode == "math") return MATH_LANGUAGE;
  else if (mode == "prog") return PROG_LANGUAGE;
  else if (mode == "src") return LANGUAGE;
  cerr << "Mode = " << mode << "\n";
  FAILED ("invalid mode");
  return LANGUAGE;
}

Here is the caller graph for this function:


Variable Documentation

void(* env_next_prog)(void)