Back to index

texmacs  1.0.7.15
Classes | Functions | Variables
qt_ui_element.cpp File Reference
#include "qt_ui_element.hpp"
#include "qt_utilities.hpp"
#include "qt_renderer.hpp"
#include "qt_simple_widget.hpp"
#include "qt_basic_widgets.hpp"
#include "QTMMenuHelper.hpp"
#include "QTMStyle.hpp"
#include "analyze.hpp"
#include "widget.hpp"
#include "message.hpp"
#include "promise.hpp"
#include "scheme.hpp"
#include <QtGui>
#include "QTMWindow.hpp"
#include "QTMGuiHelper.hpp"
#include "qt_gui.hpp"
#include "qt_window_widget.hpp"
#include "qt_menu.hpp"
#include "../../Style/Evaluate/evaluate_main.hpp"

Go to the source code of this file.

Classes

class  QTMAuxMenu
class  QTMMenuButton
class  QTMMenuWidget
class  QTMTileAction
class  QTMMinibarAction
class  qt_plain_window_widget_rep
 Models the simplest top-level window possible. More...
class  qt_key_command_rep
 Ad-hoc command to be used to simulate keypresses. More...
class  QTMUIButton
class  qt_toggle_command_rep
 Ad-hoc command to be used with toggle widgets. More...
class  qt_enum_command_rep
 Ad-hoc command to be used with enum widgets. More...
class  qt_choice_command_rep
 Ad-hoc command to be used with choice widgets. More...

Functions

static string conv_sub (string ks)
static string conv (string s)
widget horizontal_menu (array< widget > arr)
widget vertical_menu (array< widget > arr)
widget horizontal_list (array< widget > arr)
widget vertical_list (array< widget > arr)
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 wrapped_widget (widget w, command cmd)
widget tile_menu (array< widget > a, int cols)
widget minibar_menu (array< widget > arr)
widget menu_separator (bool vertical)
widget menu_group (string name, int style)
widget pulldown_button (widget w, promise< widget > pw)
widget pullright_button (widget w, promise< widget > pw)
widget menu_button (widget w, command cmd, string pre, string ks, int style)
widget balloon_widget (widget w, widget help)
widget text_widget (string s, int style, color col, bool tsp)
widget xpm_widget (url file_name)
widget toggle_widget (command cmd, bool on, int style)
widget enum_widget (command cmd, array< string > vals, string val, int style, string width)
widget choice_widget (command cmd, array< string > vals, array< string > chosen)
widget choice_widget (command cmd, array< string > vals, string cur)
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 ink_widget (command cb)
widget refresh_widget (string tmwid)

Variables

const char * ui_type_string []

Function Documentation

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

Definition at line 1278 of file qt_ui_element.cpp.

                                                                                                 { 
  typedef quartet<SI, SI, SI, SI> T1;
  typedef triple<array<widget>, array<widget>, T1> T;
  return tm_new <qt_ui_element_rep> (qt_ui_element_rep::aligned_widget, 
                                     close_box (T (lhs,rhs, T1 (hsep, vsep, lpad, rpad)))); 
}

Here is the call graph for this function:

widget balloon_widget ( widget  w,
widget  help 
)

Definition at line 1293 of file qt_ui_element.cpp.

Here is the call graph for this function:

widget choice_widget ( command  cmd,
array< string vals,
array< string chosen 
)

Definition at line 1298 of file qt_ui_element.cpp.

{ return qt_ui_element_rep::create(qt_ui_element_rep::choice_widget, cmd, vals, chosen, true); }

Here is the call graph for this function:

widget choice_widget ( command  cmd,
array< string vals,
string  cur 
)

Definition at line 1299 of file qt_ui_element.cpp.

                                                                   {
  array<string> chosen (1);
  chosen[0]= cur;
  return qt_ui_element_rep::create(qt_ui_element_rep::choice_widget, cmd, vals, chosen, false); }

Here is the call graph for this function:

static string conv ( string  s) [static]

Definition at line 323 of file qt_ui_element.cpp.

                {
  int i=0, k;
  string r;
  for (k=0; k<=N(s); k++)
    if (k == N(s) || s[k] == ' ') {
      r << conv_sub (s (i, k));
      i= k;
    }
  return r;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static string conv_sub ( string  ks) [static]

Definition at line 296 of file qt_ui_element.cpp.

                     {
  string r(ks);
#ifdef Q_WS_MAC
  r = replace (r, "S-", "Shift+");
  r = replace (r, "C-", "Meta+");
  r = replace (r, "A-", "Alt+");
  r = replace (r, "M-", "Ctrl+");
  //r = replace (r, "K-", "");
  r = replace (r, " ", ",");
#else
  r = replace (r, "S-", "Shift+");
  r = replace (r, "C-", "Ctrl+");
  r = replace (r, "A-", "Alt+");
  r = replace (r, "M-", "Meta+");
  //r = replace (r, "K-", "");
  r = replace (r, " ", ",");
#endif
  if (N(r) == 1 || (N(r) > 2 && r[N(r)-2] == '+')) {
    if (is_locase (r[N(r)-1]))
      r= r (0, N(r)-1) * upcase_all (r (N(r)-1, N(r)));
    else if (is_upcase (r[N(r)-1]))
      r= r (0, N(r)-1) * "Shift+" * upcase_all (r (N(r)-1, N(r)));
  }
  return r;
}

Here is the call graph for this function:

Here is the caller graph for this function:

widget enum_widget ( command  cmd,
array< string vals,
string  val,
int  style,
string  width 
)

Definition at line 1297 of file qt_ui_element.cpp.

{ return qt_ui_element_rep::create (qt_ui_element_rep::enum_widget, cmd, vals, val, style, width); }

Here is the call graph for this function:

Definition at line 1276 of file qt_ui_element.cpp.

Here is the call graph for this function:

Definition at line 1274 of file qt_ui_element.cpp.

Here is the call graph for this function:

Definition at line 1310 of file qt_ui_element.cpp.

Here is the call graph for this function:

Definition at line 1312 of file qt_ui_element.cpp.

                               {
  (void) cb;
  FAILED ("not yet implemented"); }
widget menu_button ( widget  w,
command  cmd,
string  pre,
string  ks,
int  style 
)

Definition at line 1292 of file qt_ui_element.cpp.

{ return qt_ui_element_rep::create (qt_ui_element_rep::menu_button, w, cmd, pre, ks, style); }

Here is the call graph for this function:

widget menu_group ( string  name,
int  style 
)

Definition at line 1289 of file qt_ui_element.cpp.

Here is the call graph for this function:

widget menu_separator ( bool  vertical)

Definition at line 1288 of file qt_ui_element.cpp.

Here is the call graph for this function:

Definition at line 1287 of file qt_ui_element.cpp.

Here is the call graph for this function:

Definition at line 1290 of file qt_ui_element.cpp.

Here is the call graph for this function:

Definition at line 1291 of file qt_ui_element.cpp.

Here is the call graph for this function:

Definition at line 1315 of file qt_ui_element.cpp.

                                     {
  (void) tmwid;
  FAILED ("not yet implemented"); }
widget resize_widget ( widget  w,
int  style,
string  w1,
string  h1,
string  w2,
string  h2,
string  w3,
string  h3 
)

Definition at line 1304 of file qt_ui_element.cpp.

                                                                  {
  (void) w; (void) style; (void) w1; (void) h1; (void) w2; (void) h2; (void) w3; (void) h3;
  //FIXME: add a meaningul semantics
  return w;
}
widget tabs_widget ( array< widget tabs,
array< widget bodies 
)

Definition at line 1284 of file qt_ui_element.cpp.

Here is the call graph for this function:

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

Definition at line 1294 of file qt_ui_element.cpp.

Here is the call graph for this function:

widget tile_menu ( array< widget a,
int  cols 
)

Definition at line 1286 of file qt_ui_element.cpp.

Here is the call graph for this function:

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

Definition at line 1296 of file qt_ui_element.cpp.

Here is the call graph for this function:

widget user_canvas_widget ( widget  wid,
int  style 
)

Definition at line 1303 of file qt_ui_element.cpp.

Here is the call graph for this function:

Definition at line 1277 of file qt_ui_element.cpp.

Here is the call graph for this function:

Definition at line 1275 of file qt_ui_element.cpp.

Here is the call graph for this function:

Definition at line 1311 of file qt_ui_element.cpp.

Here is the call graph for this function:

widget wrapped_widget ( widget  w,
command  cmd 
)

Definition at line 1285 of file qt_ui_element.cpp.

Here is the call graph for this function:

widget xpm_widget ( url  file_name)

Definition at line 1295 of file qt_ui_element.cpp.

Here is the call graph for this function:


Variable Documentation

const char* ui_type_string[]
Initial value:
 {
  "horizontal_menu", "vertical_menu", "horizontal_list", "vertical_list",
  "tile_menu", "minibar_menu", "menu_separator", "menu_group", 
  "pulldown_button", "pullright_button", "menu_button",
  "balloon_widget", "text_widget", "xpm_widget", "toggle_widget",
  "enum_widget", "choice_widget", "scrollable_widget",
  "hsplit_widget", "vsplit_widget", 
  "aligned_widget", "tabs_widget", "wrapped_widget"
}

Definition at line 35 of file qt_ui_element.cpp.