Back to index

texmacs  1.0.7.15
Classes | Defines | Functions
widkit_wrapper.cpp File Reference
#include "promise.hpp"
#include "url.hpp"
#include "Widkit/wk_widget.hpp"
#include "message.hpp"
#include "window.hpp"
#include "dictionary.hpp"

Go to the source code of this file.

Classes

class  abstract_promise_rep
class  concrete_promise_rep

Defines

#define THIS   wk_widget (this)

Functions

static void noop ()
widget box_widget (scheme_tree p, string s, color col, bool trans, bool ink)
abstract array< widget > (array< wk_widget > a)
array< wk_widgetconcrete (array< widget > a)
abstract promise< widget > (promise< wk_widget > pw)
promise< wk_widgetconcrete (promise< widget > pw)
widget extend (widget w, array< widget > a)
widget horizontal_list (array< widget > a)
widget vertical_list (array< widget > a)
widget aligned_widget (array< widget > lhs, array< widget > rhs, SI hsep, SI vsep, SI lpad, SI rpad)
widget tabs_widget (array< widget > tabs, array< widget > bodies)
widget horizontal_menu (array< widget > a)
widget vertical_menu (array< widget > a)
widget tile_menu (array< widget > a, int cols)
widget minibar_widget (widget w)
widget minibar_menu (array< widget > a)
widget switch_widget (array< widget > a, array< string > name, int init)
widget optional_widget (widget w, bool on)
widget wrapped_widget (widget w, command cmd)
widget empty_widget ()
widget glue_widget (bool hx, bool vx, SI w, SI h)
widget glue_widget (tree col, bool hx, bool vx, SI w, SI h)
widget menu_separator (bool vert)
widget menu_text_widget (string s, int style, color col, bool tsp, bool tt)
widget text_widget (string s, int style, color col, bool tsp)
widget xpm_widget (url file_name)
widget command_button (widget w, command cmd, int style)
widget command_button (widget lw, widget cw, widget rw, command cmd, int style)
widget menu_group (string name, int style)
widget menu_button (widget w, command cmd, string pre, string ks, int style)
widget pulldown_button (widget w, promise< widget > pw)
widget pullright_button (widget w, promise< widget > pw)
widget toggle_widget (command cmd, bool on, int style)
widget popup_widget (widget w)
 A factory for a popup widget container whose contents are to be unmapped as soon as the mouse exits the widget.
widget canvas_widget (widget w)
widget user_canvas_widget (widget wid, int style)
widget resize_widget (widget w, int style, string w1, string h1, string w2, string h2, string w3, string h3)
widget hsplit_widget (widget l, widget r)
widget vsplit_widget (widget t, widget b)
widget input_text_widget (command call_back, string type, array< string > def, int style, string width)
widget inputs_list_widget (command call_back, array< string > prompts)
widget enum_widget (command cb, array< string > vals, string v, int style, string w)
widget choice_widget (command cb, array< string > vals, string v)
widget choice_widget (command cb, array< string > vals, array< string > mc)
widget file_chooser_widget (command cmd, string type, bool save)
widget printer_widget (command cmd, url u)
widget color_picker_widget (command cmd, bool bg, array< tree > proposals)
widget balloon_widget (widget w, widget help)
widget wait_widget (SI w, SI h, string message)
widget ink_widget (command cb)
widget refresh_widget (string tmwid)
widget texmacs_widget (int mask, command quit)
 A factory for the main TeXmacs window.
widget plain_window_widget (widget wid, string s, command quit)
 Creates a decorated window using the given widget.
widget popup_window_widget (widget wid, string s)
void destroy_window_widget (widget w)
void check_type_void (blackbox bb, string s)
template<class T >
void check_type (blackbox bb, string s)
template<class T1 , class T2 >
void check_type (blackbox bb, string s)
SI get_dx (gravity grav, SI w)
SI get_dy (gravity grav, SI h)
bool bad_parent (wk_widget wid)
void principal_widget_check (wk_widget wid)
void set_geometry (wk_widget wid, SI x, SI y, SI w, SI h)
void get_geometry (wk_widget wid, SI &x, SI &y, SI &w, SI &h)
void send_bool (wk_widget w, string key, blackbox val)
void send_int (wk_widget w, string key, blackbox val)
void send_string (wk_widget w, string key, blackbox val)
void send_coord2 (wk_widget w, string key, blackbox val)
void send_coord4 (wk_widget w, string key, blackbox val)
void send_position (wk_widget w, blackbox val)
void send_size (wk_widget w, blackbox val)
void send_update (wk_widget w, blackbox val)
void send_refresh (wk_widget w, blackbox val)
void send_keyboard (wk_widget w, blackbox val)
void send_keyboard_focus (wk_widget w, blackbox val)
void send_mouse (wk_widget w, blackbox val)
void send_mouse_grab (wk_widget w, blackbox val)
void send_mouse_pointer (wk_widget w, blackbox val)
void send_invalidate (wk_widget w, blackbox val)
void send_invalidate_all (wk_widget w, blackbox val)
void send_repaint (wk_widget w, blackbox val)
void send_delayed_message (wk_widget w, blackbox val)
void send_destroy (wk_widget w, blackbox val)
blackbox query_bool (wk_widget w, string key, int type_id)
blackbox query_int (wk_widget w, string key, int type_id)
blackbox query_string (wk_widget w, string key, int type_id)
blackbox query_coord2 (wk_widget w, string key, int type_id)
blackbox query_coord4 (wk_widget w, string key, int type_id)
blackbox query_size (wk_widget w, int type_id)
blackbox query_position (wk_widget w, int type_id)
blackbox query_keyboard_focus (wk_widget w, int type_id)
blackbox query_mouse_grab (wk_widget w, int type_id)
void notify_keyboard_focus (wk_widget w, blackbox val)
void notify_mouse_grab (wk_widget w, blackbox val)

Define Documentation

#define THIS   wk_widget (this)

Definition at line 19 of file widkit_wrapper.cpp.


Function Documentation

widget aligned_widget ( array< widget lhs,
array< widget rhs,
SI  hsep,
SI  vsep,
SI  lpad,
SI  rpad 
)

Definition at line 90 of file widkit_wrapper.cpp.

                                                    {
  return abstract (aligned_widget (concrete (lhs), concrete (rhs),
                                   hsep, vsep, lpad, rpad));
}

Here is the call graph for this function:

Here is the caller graph for this function:

abstract array< widget > ( array< wk_widget a) [pure virtual]

Definition at line 29 of file widkit_wrapper.cpp.

                              {
  int i, n= N(a);
  array<widget> b (n);
  for (i=0; i<n; i++) b[i]= abstract (a[i]);
  return b;
}

Here is the call graph for this function:

bool bad_parent ( wk_widget  wid)

Definition at line 377 of file widkit_wrapper.cpp.

                           {
  return wid->win != NULL && wid != concrete (wid->win->get_widget ()) [0];
}

Here is the call graph for this function:

Here is the caller graph for this function:

widget balloon_widget ( widget  w,
widget  help 
)

Definition at line 305 of file widkit_wrapper.cpp.

                                       {
  return abstract (balloon_widget (concrete (w), concrete (help)));
}

Here is the call graph for this function:

Here is the caller graph for this function:

widget box_widget ( scheme_tree  p,
string  s,
color  col,
bool  trans,
bool  ink 
)

Definition at line 155 of file tm_button.cpp.

                                                                      {
  string family  = "roman";
  string fn_class= "mr";
  string series  = "medium";
  string shape   = "normal";
  int    sz      = 10;
  int    dpi     = 600;
  int    n       = arity (p);
  if ((n >= 1) && is_atomic (p[0])) family  = as_string (p[0]);
  if ((n >= 2) && is_atomic (p[1])) fn_class= as_string (p[1]);
  if ((n >= 3) && is_atomic (p[2])) series  = as_string (p[2]);
  if ((n >= 4) && is_atomic (p[3])) shape   = as_string (p[3]);
  if ((n >= 5) && is_atomic (p[4])) sz      = as_int (p[4]);
  if ((n >= 6) && is_atomic (p[5])) dpi     = as_int (p[5]);
  font fn= find_font (family, fn_class, series, shape, sz, dpi);
  box  b = text_box (decorate (), 0, s, fn, col);
  if (ink) b= resize_box (decorate (), b, b->x3, b->y3, b->x4, b->y4, true);
  return box_widget (b, trans);
}

Here is the caller graph for this function:

Definition at line 238 of file widkit_wrapper.cpp.

                         {
  return abstract (canvas_widget (concrete (w), north_west, true));
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void check_type ( blackbox  bb,
string  s 
)

Definition at line 357 of file widkit_wrapper.cpp.

                                   {
  if (type_box (bb) != type_helper<T>::id) {
    cerr << "\nslot type= " << s << "\n";
    FAILED ("type mismatch");
  }
}

Here is the call graph for this function:

template<class T1 , class T2 >
void check_type ( blackbox  bb,
string  s 
) [inline]

Definition at line 365 of file widkit_wrapper.cpp.

                                   {
  check_type<pair<T1,T2> > (bb, s);
}
void check_type_void ( blackbox  bb,
string  s 
)

Definition at line 349 of file widkit_wrapper.cpp.

                                        {
  if (!is_nil (bb)) {
    cerr << "\nslot type= " << s << "\n";
    FAILED ("type mismatch");
  }
}

Here is the call graph for this function:

widget choice_widget ( command  cb,
array< string vals,
string  v 
)

Definition at line 280 of file widkit_wrapper.cpp.

                                                         {
  return abstract (choice_wk_widget (cb, vals, v));
}

Here is the call graph for this function:

Here is the caller graph for this function:

widget choice_widget ( command  cb,
array< string vals,
array< string mc 
)

Definition at line 285 of file widkit_wrapper.cpp.

                                                                 {
  return abstract (choice_wk_widget (cb, vals, mc));
}

Here is the call graph for this function:

widget color_picker_widget ( command  cmd,
bool  bg,
array< tree proposals 
)

Definition at line 300 of file widkit_wrapper.cpp.

                                                                  {
  return abstract (color_picker_wk_widget (cmd, bg, proposals));
}

Here is the call graph for this function:

Here is the caller graph for this function:

widget command_button ( widget  w,
command  cmd,
int  style 
)

Definition at line 178 of file widkit_wrapper.cpp.

                                                  {
  return abstract (command_button (concrete (w), cmd, style));
}

Here is the call graph for this function:

Here is the caller graph for this function:

widget command_button ( widget  lw,
widget  cw,
widget  rw,
command  cmd,
int  style 
)

Definition at line 183 of file widkit_wrapper.cpp.

                                                                         {
  return abstract (command_button (concrete (lw), concrete (cw),
                               concrete (rw), cmd, style));
}

Here is the call graph for this function:

Definition at line 37 of file widkit_wrapper.cpp.

                           {
  int i, n= N(a);
  array<wk_widget> b (n);
  for (i=0; i<n; i++) b[i]= concrete (a[i]);
  return b;
}

Here is the call graph for this function:

Definition at line 66 of file widkit_wrapper.cpp.

                              {
  return tm_new<concrete_promise_rep> (pw);
}

Definition at line 340 of file widkit_wrapper.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 143 of file widkit_wrapper.cpp.

                {
  return abstract (glue_wk_widget (false, false, 0, 0));
}

Here is the call graph for this function:

Here is the caller graph for this function:

widget enum_widget ( command  cb,
array< string vals,
string  v,
int  style,
string  w 
)

Definition at line 275 of file widkit_wrapper.cpp.

                                                                            {
  return abstract (enum_wk_widget (cb, vals, v, style, w));
}

Here is the call graph for this function:

Here is the caller graph for this function:

widget extend ( widget  w,
array< widget a 
)

Definition at line 75 of file widkit_wrapper.cpp.

                                   {
  return abstract (extend (concrete (w), concrete (a)));
}

Here is the call graph for this function:

widget file_chooser_widget ( command  cmd,
string  type,
bool  save 
)

Definition at line 290 of file widkit_wrapper.cpp.

                                                          {
  return abstract (file_chooser_wk_widget (cmd, type));
}

Here is the call graph for this function:

Here is the caller graph for this function:

SI get_dx ( gravity  grav,
SI  w 
)

Definition at line 35 of file wk_widget.cpp.

                            {
  switch (grav) {
  case north_west: case west: case south_west:
    return 0;
  case north: case center: case south:
    return (w/(2*PIXEL))*PIXEL;
  case north_east: case east: case south_east:
    return w;
  }
  FAILED ("unknown gravity");
  return 0;
}
SI get_dy ( gravity  grav,
SI  h 
)

Definition at line 49 of file wk_widget.cpp.

                            {
  switch (grav) {
  case north_west: case north: case  north_east:
    return 0;
  case west: case center: case east:
    return ((-h)/(2*PIXEL))*PIXEL;
  case south_west: case south: case south_east:
    return -h;
  }
  FAILED ("unknown gravity");
  return 0;
}
void get_geometry ( wk_widget  wid,
SI x,
SI y,
SI w,
SI h 
)

Definition at line 410 of file widkit_wrapper.cpp.

                                                         {
  if (wid->is_window_widget ()) {
    wid->win->get_position (x, y);
    wid->win->get_size (w, h);
    //cout << "Size == " << (w>>8) << ", " << (h>>8) << "\n";
  }
  else {
    //principal_widget_check (wid);// FIXME: we should use parent's coordinates
    x= wid->ox - get_dx (wid->grav, wid->w);
    y= wid->oy - get_dy (wid->grav, wid->h);
    w= wid->w;
    h= wid->h;

    if (bad_parent (wid)) {
      SI dx, dy;
      wid->win->get_position (dx, dy);
      x += dx; y += dy;
    }
    //cout << "Size " << ((tree) wid) << " := " << (w>>8) << ", " << (h>>8) << "\n";
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

widget glue_widget ( bool  hx,
bool  vx,
SI  w,
SI  h 
)

Definition at line 148 of file widkit_wrapper.cpp.

                                           {
  return abstract (glue_wk_widget (hx, vx, w, h));
}

Here is the call graph for this function:

Here is the caller graph for this function:

widget glue_widget ( tree  col,
bool  hx,
bool  vx,
SI  w,
SI  h 
)

Definition at line 153 of file widkit_wrapper.cpp.

                                                     {
  return abstract (glue_wk_widget (col, hx, vx, w, h));
}

Here is the call graph for this function:

Definition at line 80 of file widkit_wrapper.cpp.

                                  {
  return abstract (horizontal_list (concrete (a)));
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 102 of file widkit_wrapper.cpp.

                                  {
  return abstract (horizontal_list (concrete (a)));
  //return abstract (horizontal_array (concrete (a), -1));
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 254 of file widkit_wrapper.cpp.

                                   {
  return abstract (hsplit_widget (concrete (l), concrete (r)));
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 315 of file widkit_wrapper.cpp.

                        {
  return abstract (ink_wk_widget (cb));
}

Here is the call graph for this function:

Here is the caller graph for this function:

widget input_text_widget ( command  call_back,
string  type,
array< string def,
int  style,
string  width 
)

Definition at line 264 of file widkit_wrapper.cpp.

                                          {
  return abstract (input_text_wk_widget (call_back, type, def, style, width));
}

Here is the caller graph for this function:

widget inputs_list_widget ( command  call_back,
array< string prompts 
)

Definition at line 270 of file widkit_wrapper.cpp.

                                                              {
  return abstract (inputs_list_wk_widget (call_back, prompts));
}

Here is the call graph for this function:

Here is the caller graph for this function:

widget menu_button ( widget  w,
command  cmd,
string  pre,
string  ks,
int  style 
)

Definition at line 198 of file widkit_wrapper.cpp.

                                                                      {
  bool ok= (style & WIDGET_STYLE_INERT) == 0;
  if (pre == "" && ks == "")
    return command_button (w, cmd, style);
  else {
    color  c = ok? black: dark_grey;
    widget lw= empty_widget ();
    widget rw= menu_text_widget (ks, 0, c, true, true);
    if (pre != "") {
      string s= "";
      if (pre == "v") s= "<checked>";
      if (pre == "o") s= "<circ>";
      if (pre == "*") s= "<bullet>";
      if (s != "") lw= box_widget (tree (TUPLE), s, c, true, false);
    }
    return command_button (lw, w, rw, cmd, style);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

widget menu_group ( string  name,
int  style 
)

Definition at line 189 of file widkit_wrapper.cpp.

                                    {
  widget lw= empty_widget ();
  widget cw= text_widget (name, style, dark_grey, false);
  widget rw= empty_widget ();
  return command_button (lw, cw, rw, noop,
                      WIDGET_STYLE_INERT | WIDGET_STYLE_CENTERED);
}

Here is the call graph for this function:

Here is the caller graph for this function:

widget menu_separator ( bool  vert)

Definition at line 158 of file widkit_wrapper.cpp.

                           {
  return abstract (separator_wk_widget (2*PIXEL, 2*PIXEL, vert));
}

Here is the call graph for this function:

Here is the caller graph for this function:

widget menu_text_widget ( string  s,
int  style,
color  col,
bool  tsp,
bool  tt 
)

Definition at line 163 of file widkit_wrapper.cpp.

                                                                     {
  return abstract (menu_text_wk_widget (s, style, col, tsp, tt));
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 123 of file widkit_wrapper.cpp.

                               {
  return minibar_widget (horizontal_menu (a));
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 118 of file widkit_wrapper.cpp.

                          {
  return abstract (minibar_widget (concrete (w)));
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void noop ( ) [static]

Definition at line 21 of file widkit_wrapper.cpp.

{}

Here is the caller graph for this function:

void notify_keyboard_focus ( wk_widget  w,
blackbox  val 
)

Definition at line 852 of file widkit_wrapper.cpp.

                                                  {
  ASSERT (type_box (val) == type_helper<bool>::id, "type mismatch");
  w << emit_keyboard_focus (open_box<bool> (val));
}

Here is the call graph for this function:

void notify_mouse_grab ( wk_widget  w,
blackbox  val 
)

Definition at line 858 of file widkit_wrapper.cpp.

                                              {
  ASSERT (type_box (val) == type_helper<bool>::id, "type mismatch");
  w << emit_mouse_grab (open_box<bool> (val));
}

Here is the call graph for this function:

widget optional_widget ( widget  w,
bool  on 
)

Definition at line 133 of file widkit_wrapper.cpp.

                                    {
  return abstract (optional_widget (concrete (w), on));
}

Here is the call graph for this function:

Here is the caller graph for this function:

widget plain_window_widget ( widget  wid,
string  s,
command  quit 
)

Creates a decorated window using the given widget.

The window will have name s, contents w and perform command q upon closing.

Definition at line 330 of file widkit_wrapper.cpp.

                                                         {
  return abstract (plain_window_widget (concrete (wid), s, quit));
}

Here is the call graph for this function:

Here is the caller graph for this function:

A factory for a popup widget container whose contents are to be unmapped as soon as the mouse exits the widget.

This is used in edit_mouse.cpp to implement a contextual menu in the canvas

Parameters:
wThe widget to be placed in the popup. It will be deleted after the mouse leaves the popup.
Returns:

Definition at line 233 of file widkit_wrapper.cpp.

                        {
  return abstract (popup_widget (concrete (w), center));
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 335 of file widkit_wrapper.cpp.

                                           {
  return abstract (popup_window_widget (concrete (wid), s));
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 382 of file widkit_wrapper.cpp.

                                       {
  // FIXME: Positions should really be computed relative to parent widgets.
  // Currently, we only allow geometry access of the unique child of
  // a window widget.
  if (bad_parent (wid)) {
    cerr << "Widget= " << wid << "\n";
    FAILED ("invalid geometry access");
  }
}

Here is the call graph for this function:

widget printer_widget ( command  cmd,
url  u 
)

Definition at line 295 of file widkit_wrapper.cpp.

                                    {
  return menu_button (text_widget ("Cancel", 0, black), cmd, "", "", 0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

abstract promise< widget > ( promise< wk_widget pw) [pure virtual]

Definition at line 53 of file widkit_wrapper.cpp.

                                 {
  return tm_new<abstract_promise_rep> (pw);
}

Definition at line 218 of file widkit_wrapper.cpp.

                                               {
  return abstract (pulldown_button (concrete (w), concrete (pw)));
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 223 of file widkit_wrapper.cpp.

                                                {
  return abstract (pullright_button (concrete (w), concrete (pw)));
}

Here is the call graph for this function:

Here is the caller graph for this function:

blackbox query_bool ( wk_widget  w,
string  key,
int  type_id 
)

Definition at line 718 of file widkit_wrapper.cpp.

                                                  {
  ASSERT (type_id == type_helper<bool>::id, "type mismatch");
  string s;
  w << get_string (key, s);
  return close_box<bool> (s == "on");
}

Here is the caller graph for this function:

blackbox query_coord2 ( wk_widget  w,
string  key,
int  type_id 
)

Definition at line 742 of file widkit_wrapper.cpp.

                                                    {
  typedef pair<SI,SI> coord2;
  ASSERT (type_id == type_helper<coord2>::id, "type mismatch");
  SI c1, c2;
  w << get_coord2 (key, c1, c2);
  return close_box<coord2> (coord2 (c1, c2));
}

Here is the caller graph for this function:

blackbox query_coord4 ( wk_widget  w,
string  key,
int  type_id 
)

Definition at line 751 of file widkit_wrapper.cpp.

                                                    {
  typedef quartet<SI,SI,SI,SI> coord4;
  ASSERT (type_id == type_helper<coord4>::id, "type mismatch");
  SI c1, c2, c3, c4;
  w << get_coord4 (key, c1, c2, c3, c4);
  return close_box<coord4> (coord4 (c1, c2, c3, c4));
}

Here is the caller graph for this function:

blackbox query_int ( wk_widget  w,
string  key,
int  type_id 
)

Definition at line 726 of file widkit_wrapper.cpp.

                                                 {
  ASSERT (type_id == type_helper<int>::id, "type mismatch");
  int i;
  w << get_integer (key, i);
  return close_box<int> (i);
}

Here is the call graph for this function:

Here is the caller graph for this function:

blackbox query_keyboard_focus ( wk_widget  w,
int  type_id 
)

Definition at line 778 of file widkit_wrapper.cpp.

                                                {
  ASSERT (type_id == type_helper<bool>::id, "type mismatch");
  if (w->win == NULL) return close_box<bool> (false);
  return close_box<bool> (w->win->get_keyboard_focus (abstract (w)));
}
blackbox query_mouse_grab ( wk_widget  w,
int  type_id 
)

Definition at line 785 of file widkit_wrapper.cpp.

                                            {
  ASSERT (type_id == type_helper<bool>::id, "type mismatch");
  if (w->win == NULL) return close_box<bool> (false);
  return close_box<bool> (w->win->get_mouse_grab (abstract (w)));
}
blackbox query_position ( wk_widget  w,
int  type_id 
)

Definition at line 769 of file widkit_wrapper.cpp.

                                          {
  typedef pair<SI,SI> coord2;
  ASSERT (type_id == type_helper<coord2>::id, "type mismatch");
  SI x, y, W, H;
  get_geometry (w, x, y, W, H);
  return close_box<coord2> (coord2 (x, y));
}

Here is the call graph for this function:

Here is the caller graph for this function:

blackbox query_size ( wk_widget  w,
int  type_id 
)

Definition at line 760 of file widkit_wrapper.cpp.

                                      {
  typedef pair<SI,SI> coord2;
  ASSERT (type_id == type_helper<coord2>::id, "type mismatch");
  SI x, y, W, H;
  get_geometry (w, x, y, W, H);
  return close_box<coord2> (coord2 (W, H));
}

Here is the call graph for this function:

Here is the caller graph for this function:

blackbox query_string ( wk_widget  w,
string  key,
int  type_id 
)

Definition at line 734 of file widkit_wrapper.cpp.

                                                    {
  ASSERT (type_id == type_helper<string>::id, "type mismatch");
  string s;
  w << get_string (key, s);
  return close_box<string> (s);
}

Here is the caller graph for this function:

Definition at line 320 of file widkit_wrapper.cpp.

                              {
  return abstract (refresh_wk_widget (tmwid));
}

Here is the call graph for this function:

Here is the caller graph for this function:

widget resize_widget ( widget  w,
int  style,
string  w1,
string  h1,
string  w2,
string  h2,
string  w3,
string  h3 
)

Definition at line 248 of file widkit_wrapper.cpp.

                                                           {
  return abstract (resize_widget (concrete (w), style, w1, h1, w2, h2, w3, h3));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void send_bool ( wk_widget  w,
string  key,
blackbox  val 
)

Definition at line 437 of file widkit_wrapper.cpp.

                                                  {
  ASSERT (type_box (val) == type_helper<bool>::id, "type mismatch");
  w << set_string (key, open_box<bool> (val)? string ("on"): string ("off"));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void send_coord2 ( wk_widget  w,
string  key,
blackbox  val 
)

Definition at line 455 of file widkit_wrapper.cpp.

                                                    {
  typedef pair<SI,SI> coord2;
  ASSERT (type_box (val) == type_helper<coord2>::id, "type mismatch");
  coord2 p= open_box<coord2> (val);
  w << set_coord2 (key, p.x1, p.x2);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void send_coord4 ( wk_widget  w,
string  key,
blackbox  val 
)

Definition at line 463 of file widkit_wrapper.cpp.

                                                    {
  typedef quartet<SI,SI,SI,SI> coord4;
  ASSERT (type_box (val) == type_helper<coord4>::id, "type mismatch");
  coord4 p= open_box<coord4> (val);
  w << set_coord4 (key, p.x1, p.x2, p.x3, p.x4);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void send_delayed_message ( wk_widget  w,
blackbox  val 
)

Definition at line 571 of file widkit_wrapper.cpp.

                                                 {
  typedef pair<string,time_t> delayed;
  ASSERT (type_box (val) == type_helper<delayed>::id, "type mismatch");
  delayed dm= open_box<delayed> (val);
  w << emit_alarm (dm.x1, dm.x2);
}

Here is the call graph for this function:

void send_destroy ( wk_widget  w,
blackbox  val 
)

Definition at line 579 of file widkit_wrapper.cpp.

                                         {
  ASSERT (is_nil (val), "type mismatch");
  w << emit_destroy ();
}

Here is the call graph for this function:

void send_int ( wk_widget  w,
string  key,
blackbox  val 
)

Definition at line 443 of file widkit_wrapper.cpp.

                                                 {
  ASSERT (type_box (val) == type_helper<int>::id, "type mismatch");
  w << set_integer (key, open_box<int> (val));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void send_invalidate ( wk_widget  w,
blackbox  val 
)

Definition at line 546 of file widkit_wrapper.cpp.

                                            {
  typedef quartet<SI,SI,SI,SI> coord4;
  ASSERT (type_box (val) == type_helper<coord4>::id, "type mismatch");
  coord4 p= open_box<coord4> (val);
  w << emit_invalidate (w->ox + p.x1, w->oy + p.x2,
                     w->ox + p.x3, w->oy + p.x4);
}

Here is the call graph for this function:

void send_invalidate_all ( wk_widget  w,
blackbox  val 
)

Definition at line 555 of file widkit_wrapper.cpp.

                                                {
  ASSERT (is_nil (val), "type mismatch");
  w << emit_invalidate_all ();
}

Here is the call graph for this function:

void send_keyboard ( wk_widget  w,
blackbox  val 
)

Definition at line 509 of file widkit_wrapper.cpp.

                                          {
  typedef pair<string,time_t> keypress;
  ASSERT (type_box (val) == type_helper<keypress>::id, "type mismatch");
  keypress k= open_box<keypress> (val);
  w << emit_keypress (k.x1, k.x2);
}

Here is the call graph for this function:

void send_keyboard_focus ( wk_widget  w,
blackbox  val 
)

Definition at line 517 of file widkit_wrapper.cpp.

                                                {
  ASSERT (type_box (val) == type_helper<bool>::id, "type mismatch");
  w->win->set_keyboard_focus (abstract (w), open_box<bool> (val));
}

Here is the call graph for this function:

void send_mouse ( wk_widget  w,
blackbox  val 
)

Definition at line 523 of file widkit_wrapper.cpp.

                                       {
  typedef quintuple<string,SI,SI,int,time_t> mouse;
  ASSERT (type_box (val) == type_helper<mouse>::id, "type mismatch");
  mouse m= open_box<mouse> (val);
  // FIXME: we should assume the position in the local coordinates
  w << emit_mouse (m.x1, m.x2, m.x3, m.x4, m.x5);
}

Here is the call graph for this function:

void send_mouse_grab ( wk_widget  w,
blackbox  val 
)

Definition at line 532 of file widkit_wrapper.cpp.

                                            {
  ASSERT (type_box (val) == type_helper<bool>::id, "type mismatch");
  w->win->set_mouse_grab (abstract (w), open_box<bool> (val));
}

Here is the call graph for this function:

void send_mouse_pointer ( wk_widget  w,
blackbox  val 
)

Definition at line 538 of file widkit_wrapper.cpp.

                                               {
  typedef pair<string,string> change_pointer;
  ASSERT (type_box (val) == type_helper<change_pointer>::id, "type mismatch");
  change_pointer cp= open_box<change_pointer> (val);
  w->win->set_mouse_pointer (abstract (w), cp.x1, cp.x2);
}

Here is the call graph for this function:

void send_position ( wk_widget  w,
blackbox  val 
)

Definition at line 471 of file widkit_wrapper.cpp.

                                          {
  typedef pair<SI,SI> coord2;
  ASSERT (type_box (val) == type_helper<coord2>::id, "type mismatch");
  coord2 p= open_box<coord2> (val);
  if (w->is_window_widget ()) w->win->set_position (p.x1, p.x2);
  else {
    SI x, y, W, H;
    get_geometry (w, x, y, W, H);
    set_geometry (w, p.x1, p.x2, W, H);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void send_refresh ( wk_widget  w,
blackbox  val 
)

Definition at line 503 of file widkit_wrapper.cpp.

                                         {
  ASSERT (is_nil (val), "type mismatch");
  w << emit_refresh ();
}

Here is the call graph for this function:

void send_repaint ( wk_widget  w,
blackbox  val 
)

Definition at line 561 of file widkit_wrapper.cpp.

                                         {
  typedef quartet<SI,SI,SI,SI> repaint;
  ASSERT (type_box (val) == type_helper<repaint>::id, "type mismatch");
  repaint r= open_box<repaint> (val);
  bool stop_flag= false;
  // FIXME: we should assume local coordinates for repainting
  w << emit_repaint (r.x1, r.x2, r.x3, r.x4, stop_flag);
}

Here is the call graph for this function:

void send_size ( wk_widget  w,
blackbox  val 
)

Definition at line 484 of file widkit_wrapper.cpp.

                                      {
  typedef pair<SI,SI> coord2;
  ASSERT (type_box (val) == type_helper<coord2>::id, "type mismatch");
  coord2 p= open_box<coord2> (val);
  if (w->is_window_widget ()) w->win->set_size (p.x1, p.x2);
  else {
    SI x, y, W, H;
    get_geometry (w, x, y, W, H);
    set_geometry (w, x, y, p.x1, p.x2);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void send_string ( wk_widget  w,
string  key,
blackbox  val 
)

Definition at line 449 of file widkit_wrapper.cpp.

                                                    {
  ASSERT (type_box (val) == type_helper<string>::id, "type mismatch");
  w << set_string (key, open_box<string> (val));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void send_update ( wk_widget  w,
blackbox  val 
)

Definition at line 497 of file widkit_wrapper.cpp.

                                        {
  ASSERT (is_nil (val), "type mismatch");
  w << emit_update ();
}

Here is the call graph for this function:

void set_geometry ( wk_widget  wid,
SI  x,
SI  y,
SI  w,
SI  h 
)

Definition at line 393 of file widkit_wrapper.cpp.

                                                     {
  if (wid->is_window_widget ()) {
    wid->win->set_position (x, y);
    wid->win->set_size (w, h);
  }
  else {
    //principal_widget_check (wid);// FIXME: we should use parent's coordinates
    if (bad_parent (wid)) {
      SI dx, dy;
      wid->win->get_position (dx, dy);
      x -= dx; y -= dy;
    }
    wid << emit_position (x, y, w, h, north_west);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

widget switch_widget ( array< widget a,
array< string name,
int  init 
)

Definition at line 128 of file widkit_wrapper.cpp.

                                                              {
  return abstract (switch_widget (concrete (a), name, init));
}

Here is the call graph for this function:

Here is the caller graph for this function:

widget tabs_widget ( array< widget tabs,
array< widget bodies 
)

Definition at line 97 of file widkit_wrapper.cpp.

                                                       {
  return abstract (tabs_widget (concrete (tabs), concrete (bodies)));
}

Here is the call graph for this function:

Here is the caller graph for this function:

widget texmacs_widget ( int  mask,
command  quit 
)

A factory for the main TeXmacs window.

Parameters:
maskIndicates whether the menu, icon bars, status bar, etc. are visible or not.
quitCommand called on exit.

Definition at line 325 of file widkit_wrapper.cpp.

                                        {
  return abstract (texmacs_wk_widget (mask, quit));
}

Here is the call graph for this function:

Here is the caller graph for this function:

widget text_widget ( string  s,
int  style,
color  col,
bool  tsp 
)

Definition at line 168 of file widkit_wrapper.cpp.

                                                       {
  return menu_text_widget (s, style, col, tsp, false);
}

Here is the call graph for this function:

Here is the caller graph for this function:

widget tile_menu ( array< widget a,
int  cols 
)

Definition at line 113 of file widkit_wrapper.cpp.

                                      {
  return abstract (tile (concrete (a), cols));
}

Here is the call graph for this function:

Here is the caller graph for this function:

widget toggle_widget ( command  cmd,
bool  on,
int  style 
)

Definition at line 228 of file widkit_wrapper.cpp.

                                                {
  return abstract (toggle_wk_widget (cmd, on, style));
}

Here is the call graph for this function:

Here is the caller graph for this function:

widget user_canvas_widget ( widget  wid,
int  style 
)

Definition at line 243 of file widkit_wrapper.cpp.

                                           {
  return abstract (user_canvas_widget (concrete (wid), style));
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 85 of file widkit_wrapper.cpp.

                                {
  return abstract (vertical_list (concrete (a)));
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 108 of file widkit_wrapper.cpp.

                                {
  return abstract (vertical_menu (concrete (a)));
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 259 of file widkit_wrapper.cpp.

                                   {
  return abstract (vsplit_widget (concrete (t), concrete (b)));
}

Here is the call graph for this function:

Here is the caller graph for this function:

widget wait_widget ( SI  w,
SI  h,
string  message 
)

Definition at line 310 of file widkit_wrapper.cpp.

                                         {
  return abstract (wait_wk_widget (w, h, message));
}

Here is the call graph for this function:

Here is the caller graph for this function:

widget wrapped_widget ( widget  w,
command  cmd 
)

Definition at line 138 of file widkit_wrapper.cpp.

                                       {
  return abstract (wrapped_widget (concrete (w), cmd));
}

Here is the call graph for this function:

Here is the caller graph for this function:

widget xpm_widget ( url  file_name)

Definition at line 173 of file widkit_wrapper.cpp.

                           {
  return abstract (xpm_wk_widget (file_name, true));
}

Here is the call graph for this function:

Here is the caller graph for this function: