Back to index

texmacs  1.0.7.15
Classes | Defines | Functions
texmacs_widget.cpp File Reference
#include "window.hpp"
#include "Widkit/basic_widget.hpp"
#include "Widkit/Event/attribute_event.hpp"
#include "message.hpp"
#include "dictionary.hpp"

Go to the source code of this file.

Classes

class  texmacs_widget_rep

Defines

#define THIS   (wk_widget (this))

Functions

static wk_widget make_menu_bar ()
static wk_widget make_icon_bar (bool on)
static wk_widget make_header (int mask)
static wk_widget make_footer (int mask)
static wk_widget middle_widget ()
static wk_widget make_texmacs_widget (int mask)
wk_widget texmacs_wk_widget (int mask, command quit)

Define Documentation

#define THIS   (wk_widget (this))

Definition at line 18 of file texmacs_widget.cpp.


Function Documentation

static wk_widget make_footer ( int  mask) [static]

Definition at line 125 of file texmacs_widget.cpp.

                       {
  array<wk_widget> F (3);
  array<string> F_name (3);
  F[0]= text_wk_widget (translate ("Welcome to TeXmacs!"));
  F[1]= glue_wk_widget (true, false);
  F[2]= text_wk_widget ("TeXmacs " TEXMACS_VERSION);
  F_name[0]= "left";
  F_name[1]= "middle";
  F_name[2]= "right";
  wk_widget ftr= horizontal_array (F, F_name, 1);
#ifdef OS_MACOS
  F << glue_wk_widget (false, false, 14*PIXEL, 0);
  F_name << string ("margin");
#endif

  array<wk_widget> I (3);
  array<string> I_name (3);
  I[0]= text_wk_widget (translate ("Input:"));
  I[1]= glue_wk_widget (true, false);
#ifdef OS_MACOS
  I[2]= glue_wk_widget (false, false, 18*PIXEL);
#else
  I[2]= glue_wk_widget (false, false, 2*PIXEL);
#endif
  I_name[0]= "left";
  I_name[1]= "middle";
  I_name[2]= "right";
  wk_widget iac= horizontal_list (I, I_name);
  //wk_widget iac= horizontal_array (I, I_name, 1);

  array<wk_widget> S (3);
  array<string> S_name (3);
  S[0]= ftr;
  S[1]= iac;
  S[2]= glue_wk_widget (false, false);
  S_name[0]= "default";
  S_name[1]= "interactive";
  return switch_widget (S, S_name, (mask & 32) == 32? 0: 2);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static wk_widget make_header ( int  mask) [static]

Definition at line 107 of file texmacs_widget.cpp.

                       {
  array<wk_widget> H (6);
  array<string> H_name (6);
  H[0]= make_menu_bar ();
  H[1]= make_icon_bar ((mask & 2) == 2);
  H[2]= make_icon_bar ((mask & 4) == 4);
  H[3]= make_icon_bar ((mask & 8) == 8);
  H[4]= make_icon_bar ((mask & 16) == 16);
  H[5]= glue_wk_widget (true, false, 0, 2*PIXEL);
  H_name[0]= "menu";
  H_name[1]= "main";
  H_name[2]= "mode";
  H_name[3]= "focus";
  H_name[4]= "user";
  return optional_widget (vertical_list (H, H_name), (mask & 1) == 1);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static wk_widget make_icon_bar ( bool  on) [static]

Definition at line 89 of file texmacs_widget.cpp.

                        {
  array<wk_widget> I (4);
  array<string> I_name (4);
  I[0]= glue_wk_widget (false, false, 3*PIXEL);
  I[1]= horizontal_array (array<wk_widget> (0));
  I[2]= glue_wk_widget (true, false);
  I[3]= glue_wk_widget (false, false, 3*PIXEL);
  I_name[1]= "icons";

  array<wk_widget> V (2);
  array<string> V_name (2);
  V[0]= separator_wk_widget (PIXEL, 2*PIXEL);
  V[1]= horizontal_array (I, I_name);
  V_name[1]= "bar";
  return optional_widget (vertical_list (V, V_name), on);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static wk_widget make_menu_bar ( ) [static]

Definition at line 73 of file texmacs_widget.cpp.

                 {
  array<wk_widget> M (2);
  array<string> M_name (2);
  M[0]= horizontal_array (array<wk_widget> (0));
  M[1]= glue_wk_widget (true, false);
  M_name[0]= "menu";

  array<wk_widget> V (2);
  array<string> V_name (2);
  V[0]= glue_wk_widget (true, false, 0, 2*PIXEL);
  V[1]= horizontal_array (M, M_name);
  V_name[1]= "bar";
  return optional_widget (vertical_list (V, V_name));
}

Here is the call graph for this function:

Here is the caller graph for this function:

static wk_widget make_texmacs_widget ( int  mask) [static]

Definition at line 175 of file texmacs_widget.cpp.

                               {
  array<wk_widget> V (5);
  array<string> V_name (5);
  V[0]= make_header (mask);
  //V[1]= canvas_widget (glue_wk_widget (), north_west, true);
  V[1]= middle_widget ();
  V[2]= glue_wk_widget (false, false, 0, PIXEL);
  V[3]= make_footer (mask);
  V[4]= glue_wk_widget (false, false, 0, PIXEL);
  V_name[0]= "header";
  //V_name[1]= "canvas";
  V_name[1]= "middle";
  V_name[3]= "footer";
  return vertical_list (V, V_name);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static wk_widget middle_widget ( ) [static]

Definition at line 166 of file texmacs_widget.cpp.

                 {
  wk_widget w1= canvas_widget (glue_wk_widget (), north_west, true);
  wk_widget w2= glue_wk_widget (true, true, 200*PIXEL, 0);
  wk_widget w3= resize_widget (w2, 0, "200px", "", "200px", "", "200px", "");
  if (!use_side_tools) return w1;
  else return hsplit_widget (w1, w3);
}

Here is the call graph for this function:

Here is the caller graph for this function:

wk_widget texmacs_wk_widget ( int  mask,
command  quit 
)

Definition at line 532 of file texmacs_widget.cpp.

                                           {
  return tm_new<texmacs_widget_rep> (mask, quit);
}

Here is the caller graph for this function: