Back to index

texmacs  1.0.7.15
Public Member Functions | Public Attributes | Protected Attributes
tm_frame_rep Class Reference

#include <tm_frame.hpp>

Inheritance diagram for tm_frame_rep:
Inheritance graph
[legend]
Collaboration diagram for tm_frame_rep:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 tm_frame_rep ()
 ~tm_frame_rep ()
int get_window_id ()
void set_window_property (scheme_tree what, scheme_tree val)
void set_bool_window_property (string what, bool val)
void set_int_window_property (string what, int val)
void set_string_window_property (string what, string val)
scheme_tree get_window_property (scheme_tree what)
bool get_bool_window_property (string what)
int get_int_window_property (string what)
string get_string_window_property (string what)
void show_header (bool flag)
void show_icon_bar (int which, bool flag)
void show_side_tools (int which, bool flag)
bool visible_header ()
bool visible_icon_bar (int which)
bool visible_side_tools (int which)
void menu_widget (string menu, widget &w)
void menu_main (string menu)
void menu_icons (int which, string menu)
void side_tools (int which, string menu)
void set_shrinking_factor (int sf)
int get_shrinking_factor ()
void set_scrollbars (int sb)
void get_visible (SI &x1, SI &y1, SI &x2, SI &y2)
void scroll_where (SI &x, SI &y)
void scroll_to (SI x, SI y)
void set_extents (SI x1, SI y1, SI x2, SI y2)
void get_extents (SI &x1, SI &y1, SI &x2, SI &y2)
void full_screen_mode (bool on, bool edit)
bool in_full_screen_mode ()
bool in_full_screen_edit_mode ()
void show_footer (bool flag)
bool visible_footer ()
void set_left_footer (string s)
void set_right_footer (string s)
void set_message (tree left, tree right, bool temp=false)
void recall_message ()
void dialogue_start (string name, widget wid)
void dialogue_inquire (int i, string &arg)
void dialogue_end ()
void choose_file (object fun, string title, string type)
void interactive (object fun, scheme_tree p)
virtual server_repget_server ()=0
virtual bool has_view ()=0
virtual bool has_window ()=0
virtual tm_view get_view (bool must_be_valid=true)=0
virtual void set_view (tm_view vw)=0
virtual tm_buffer get_buffer ()=0
virtual editor get_editor ()=0
virtual tm_window get_window ()=0
virtual int get_nr_windows ()=0
virtual void set_font_rules (scheme_tree rules)=0
virtual bool kbd_get_command (string s, string &help, command &cmd)=0
virtual void insert_kbd_wildcard (string key, string im, bool post, bool l, bool r)=0
virtual string kbd_pre_rewrite (string l)=0
virtual string kbd_post_rewrite (string l, bool var_flag=true)=0
virtual tree kbd_system_rewrite (string l)=0
virtual void set_variant_keys (string var, string unvar)=0
virtual void get_keycomb (string &s, int &status, command &cmd, string &sh, string &help)=0
virtual void style_clear_cache ()=0
virtual void refresh ()=0
virtual void interpose_handler ()=0
virtual void wait_handler (string message, string arg)=0
virtual void set_script_status (int i)=0
virtual void focus_on_editor (editor ed)=0
virtual void set_printing_command (string s)=0
virtual void set_printer_page_type (string s)=0
virtual string get_printer_page_type ()=0
virtual void set_printer_dpi (string dpi)=0
virtual void set_default_shrinking_factor (int sf)=0
virtual int get_default_shrinking_factor ()=0
virtual void image_gc (string which="*")=0
virtual void inclusions_gc (string which="*")=0
virtual void typeset_update (path p)=0
virtual void typeset_update_all ()=0
virtual bool is_yes (string s)=0
virtual void quit ()=0
virtual void shell (string s)=0

Public Attributes

int ref_count

Protected Attributes

bool full_screen
bool full_screen_edit
widget dialogue_win
widget dialogue_wid

Detailed Description

Definition at line 16 of file tm_frame.hpp.


Constructor & Destructor Documentation

Definition at line 20 of file tm_frame.cpp.

                           :
  full_screen (false), full_screen_edit (false), dialogue_win () {}

Definition at line 22 of file tm_frame.cpp.

{}

Member Function Documentation

void tm_frame_rep::choose_file ( object  fun,
string  title,
string  type 
) [virtual]

Implements server_rep.

Definition at line 113 of file tm_dialogue.cpp.

                                                                {
  url      name= get_name_buffer ();
  command  cb  = dialogue_command (get_server(), fun, 1);
  bool     save= starts (title, "Save") || starts (title, "Export");
  widget   wid = file_chooser_widget (cb, type, save);
  if (!is_scratch (name)) {
    set_directory (wid, as_string (head (name)));
    if ((type != "image") && (type != "")) {
      url u= tail (name);
      string old_suf= suffix (u);
      string new_suf= format_to_suffix (type);
      if ((suffix_to_format (suffix (u)) != type) &&
         (old_suf != "") && (new_suf != ""))
       {
         u= unglue (u, N(old_suf) + 1);
         u= glue (u, "." * new_suf);
       }
      set_file (wid, as_string (u));
    }
  }
  else set_directory (wid, ".");
  dialogue_start (title, wid);
  if (type == "directory") send_keyboard_focus (get_directory (dialogue_wid));
  else send_keyboard_focus (get_file (dialogue_wid));
}

Here is the call graph for this function:

void tm_frame_rep::dialogue_end ( ) [virtual]

Implements server_rep.

Definition at line 96 of file tm_dialogue.cpp.

Here is the call graph for this function:

void tm_frame_rep::dialogue_inquire ( int  i,
string arg 
) [virtual]

Implements server_rep.

Definition at line 87 of file tm_dialogue.cpp.

                                                  {
  if (i == 0) arg= get_string_input (dialogue_wid);
  else {
    widget field_i= get_form_field (dialogue_wid, i);
    arg= get_string_input (field_i);
  }
}

Here is the call graph for this function:

void tm_frame_rep::dialogue_start ( string  name,
widget  wid 
) [virtual]

Implements server_rep.

Definition at line 66 of file tm_dialogue.cpp.

                                                     {
  if (is_nil (dialogue_win)) {
    string lan= get_output_language ();
    if (lan == "russian") lan= "english";
    name= translate (name, "english", lan);
    dialogue_wid= wid;
    dialogue_win= plain_window_widget (dialogue_wid, name);

    widget win= get_window () -> win;
    SI ox, oy, dx, dy, ex= 0, ey= 0;
    get_position (win, ox, oy);
    get_size (win, dx, dy);
    get_size (dialogue_win, ex, ey);
    ox += (dx - ex) >> 1;
    oy -= (dy - ey) >> 1;
    set_position (dialogue_win, ox, oy);
    set_visibility (dialogue_win, true);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void server_rep::focus_on_editor ( editor  ed) [pure virtual, inherited]

Implemented in tm_server_rep.

Here is the caller graph for this function:

void tm_frame_rep::full_screen_mode ( bool  on,
bool  edit 
) [virtual]

Implements server_rep.

Definition at line 241 of file tm_frame.cpp.

                                                  {
  if (on && !edit) {
    show_header (false);
    show_footer (false);
  }
  else {
    show_header (true);
    show_footer (true);
  }
  set_full_screen (get_window () -> win, on);
  get_editor () -> full_screen_mode (on && !edit);
  full_screen = on;
  full_screen_edit = on && edit;
}

Here is the call graph for this function:

Implements server_rep.

Definition at line 83 of file tm_frame.cpp.

                                                   {
  return as_bool (get_window () -> get_property (what));
}

Here is the call graph for this function:

virtual tm_buffer server_rep::get_buffer ( ) [pure virtual, inherited]

Implemented in tm_server_rep.

virtual int server_rep::get_default_shrinking_factor ( ) [pure virtual, inherited]

Implemented in tm_server_rep.

virtual editor server_rep::get_editor ( ) [pure virtual, inherited]

Implemented in tm_server_rep.

Here is the caller graph for this function:

void tm_frame_rep::get_extents ( SI x1,
SI y1,
SI x2,
SI y2 
) [virtual]

Implements server_rep.

Definition at line 207 of file tm_frame.cpp.

                                                         {
  get_window () -> get_extents (x1, y1, x2, y2);
}

Here is the call graph for this function:

Implements server_rep.

Definition at line 88 of file tm_frame.cpp.

                                                  {
  return as_int (get_window () -> get_property (what));
}

Here is the call graph for this function:

virtual void server_rep::get_keycomb ( string s,
int &  status,
command cmd,
string sh,
string help 
) [pure virtual, inherited]

Implemented in tm_config_rep.

Here is the caller graph for this function:

virtual int server_rep::get_nr_windows ( ) [pure virtual, inherited]

Implemented in tm_server_rep.

virtual string server_rep::get_printer_page_type ( ) [pure virtual, inherited]

Implemented in tm_server_rep.

virtual server_rep* server_rep::get_server ( ) [pure virtual, inherited]

Implemented in tm_server_rep.

Here is the caller graph for this function:

Implements server_rep.

Definition at line 178 of file tm_frame.cpp.

                                    {
  return get_window () -> get_shrinking_factor ();
}

Here is the call graph for this function:

Implements server_rep.

Definition at line 93 of file tm_frame.cpp.

                                                     {
  return as_string (get_window () -> get_property (what));
}

Here is the call graph for this function:

virtual tm_view server_rep::get_view ( bool  must_be_valid = true) [pure virtual, inherited]

Implemented in tm_server_rep.

void tm_frame_rep::get_visible ( SI x1,
SI y1,
SI x2,
SI y2 
) [virtual]

Implements server_rep.

Definition at line 187 of file tm_frame.cpp.

                                                         {
  get_window () -> get_visible (x1, y1, x2, y2);
}

Here is the call graph for this function:

virtual tm_window server_rep::get_window ( ) [pure virtual, inherited]

Implemented in tm_server_rep.

Here is the caller graph for this function:

int tm_frame_rep::get_window_id ( ) [virtual]

Implements server_rep.

Definition at line 53 of file tm_frame.cpp.

                             {
  return get_window () -> serial;
}

Here is the call graph for this function:

Implements server_rep.

Definition at line 78 of file tm_frame.cpp.

                                                   {
  return get_window () -> get_property (what);
}

Here is the call graph for this function:

virtual bool server_rep::has_view ( ) [pure virtual, inherited]

Implemented in tm_server_rep.

Here is the caller graph for this function:

virtual bool server_rep::has_window ( ) [pure virtual, inherited]

Implemented in tm_server_rep.

Here is the caller graph for this function:

virtual void server_rep::image_gc ( string  which = "*") [pure virtual, inherited]

Implemented in tm_server_rep.

Implements server_rep.

Definition at line 262 of file tm_frame.cpp.

                                        {
  return full_screen && full_screen_edit;
}

Implements server_rep.

Definition at line 257 of file tm_frame.cpp.

                                   {
  return full_screen && !full_screen_edit;
}
virtual void server_rep::inclusions_gc ( string  which = "*") [pure virtual, inherited]

Implemented in tm_server_rep.

virtual void server_rep::insert_kbd_wildcard ( string  key,
string  im,
bool  post,
bool  l,
bool  r 
) [pure virtual, inherited]

Implemented in tm_config_rep.

void tm_frame_rep::interactive ( object  fun,
scheme_tree  p 
) [virtual]

Implements server_rep.

Definition at line 218 of file tm_dialogue.cpp.

                                                    {
  ASSERT (is_tuple (p), "tuple expected");
  if (get_preference ("interactive questions") == "popup") {
    int i, n= N(p);
    array<string> prompts (n);
    for (i=0; i<n; i++)
      prompts[i]= get_prompt (p, i);
    command cb= dialogue_command (get_server(), fun, n);
    widget wid= inputs_list_widget (cb, prompts);
    for (i=0; i<n; i++) {
      widget input_wid= get_form_field (wid, i);
      set_input_type (input_wid, get_type (p, i));
      array<string> proposals= get_proposals (p, i);
      int j, k= N(proposals);
      if (k > 0) set_string_input (input_wid, proposals[0]);
      for (j=0; j<k; j++) add_input_proposal (input_wid, proposals[j]);
    }
    string title= translate ("Enter data");
    if (ends (prompts[0], "?")) title= translate ("Question");
    dialogue_start (title, wid);
    send_keyboard_focus (get_form_field (dialogue_wid, 0));
  }
  else {
    if (get_window () -> get_interactive_mode ()) beep ();
    else {
      command interactive_cmd=
       tm_new<interactive_command_rep> (this, get_window (), fun, p);
      interactive_cmd ();
    }
  }
}

Here is the call graph for this function:

virtual void server_rep::interpose_handler ( ) [pure virtual, inherited]

Implemented in tm_server_rep.

virtual bool server_rep::is_yes ( string  s) [pure virtual, inherited]

Implemented in tm_server_rep.

virtual bool server_rep::kbd_get_command ( string  s,
string help,
command cmd 
) [pure virtual, inherited]

Implemented in tm_config_rep.

Here is the caller graph for this function:

virtual string server_rep::kbd_post_rewrite ( string  l,
bool  var_flag = true 
) [pure virtual, inherited]

Implemented in tm_config_rep.

Here is the caller graph for this function:

virtual string server_rep::kbd_pre_rewrite ( string  l) [pure virtual, inherited]

Implemented in tm_config_rep.

virtual tree server_rep::kbd_system_rewrite ( string  l) [pure virtual, inherited]

Implemented in tm_config_rep.

Here is the caller graph for this function:

void tm_frame_rep::menu_icons ( int  which,
string  menu 
) [virtual]

Implements server_rep.

Definition at line 114 of file tm_frame.cpp.

                                                {
  if ((which<0) || (which>3) || (!has_view())) return;
  get_window () -> menu_icons (which, menu);
}

Here is the call graph for this function:

void tm_frame_rep::menu_main ( string  menu) [virtual]

Implements server_rep.

Definition at line 108 of file tm_frame.cpp.

                                    {
  if (!has_view ()) return;
  get_window () -> menu_main (menu);
}

Here is the call graph for this function:

void tm_frame_rep::menu_widget ( string  menu,
widget w 
) [virtual]

Implements server_rep.

Definition at line 102 of file tm_frame.cpp.

                                                 {
  object xmenu= eval ("'" * menu);
  w= make_menu_widget (xmenu);
}

Here is the call graph for this function:

virtual void server_rep::quit ( ) [pure virtual, inherited]

Implemented in tm_server_rep.

void tm_frame_rep::recall_message ( ) [virtual]

Implements server_rep.

Definition at line 235 of file tm_frame.cpp.

                              {
  if (!has_window ()) return;
  get_editor() -> recall_message ();
}

Here is the call graph for this function:

virtual void server_rep::refresh ( ) [pure virtual, inherited]

Implemented in tm_server_rep.

void tm_frame_rep::scroll_to ( SI  x,
SI  y 
) [virtual]

Implements server_rep.

Definition at line 202 of file tm_frame.cpp.

                                   {
  get_window () -> set_scroll_pos (x, y);
}

Here is the call graph for this function:

void tm_frame_rep::scroll_where ( SI x,
SI y 
) [virtual]

Implements server_rep.

Definition at line 197 of file tm_frame.cpp.

                                        {
  get_window () -> get_scroll_pos (x, y);
}

Here is the call graph for this function:

void tm_frame_rep::set_bool_window_property ( string  what,
bool  val 
) [virtual]

Implements server_rep.

Definition at line 63 of file tm_frame.cpp.

                                                             {
  get_window () -> set_property (what, val? string ("true"): string ("false"));
}

Here is the call graph for this function:

virtual void server_rep::set_default_shrinking_factor ( int  sf) [pure virtual, inherited]

Implemented in tm_server_rep.

void tm_frame_rep::set_extents ( SI  x1,
SI  y1,
SI  x2,
SI  y2 
) [virtual]

Implements server_rep.

Definition at line 212 of file tm_frame.cpp.

                                                     {
  get_window () -> set_extents (x1, y1, x2, y2);
}

Here is the call graph for this function:

virtual void server_rep::set_font_rules ( scheme_tree  rules) [pure virtual, inherited]

Implemented in tm_config_rep.

void tm_frame_rep::set_int_window_property ( string  what,
int  val 
) [virtual]

Implements server_rep.

Definition at line 68 of file tm_frame.cpp.

                                                           {
  get_window () -> set_property (what, as_tree (val));
}

Here is the call graph for this function:

void tm_frame_rep::set_left_footer ( string  s) [virtual]

Implements server_rep.

Definition at line 217 of file tm_frame.cpp.

                                       {
  if (!has_window ()) return;
  get_window () -> set_left_footer (s);
}

Here is the call graph for this function:

void tm_frame_rep::set_message ( tree  left,
tree  right,
bool  temp = false 
) [virtual]

Implements server_rep.

Definition at line 229 of file tm_frame.cpp.

                                                           {
  if (!has_window ()) return;
  get_editor() -> set_message (left, right, temp);
}

Here is the call graph for this function:

virtual void server_rep::set_printer_dpi ( string  dpi) [pure virtual, inherited]

Implemented in tm_server_rep.

virtual void server_rep::set_printer_page_type ( string  s) [pure virtual, inherited]

Implemented in tm_server_rep.

virtual void server_rep::set_printing_command ( string  s) [pure virtual, inherited]

Implemented in tm_server_rep.

void tm_frame_rep::set_right_footer ( string  s) [virtual]

Implements server_rep.

Definition at line 223 of file tm_frame.cpp.

                                        {
  if (!has_window ()) return;
  get_window () -> set_right_footer (s);
}

Here is the call graph for this function:

virtual void server_rep::set_script_status ( int  i) [pure virtual, inherited]

Implemented in tm_server_rep.

void tm_frame_rep::set_scrollbars ( int  sb) [virtual]

Implements server_rep.

Definition at line 192 of file tm_frame.cpp.

                                    {
  get_window () -> set_scrollbars (sb);
}

Here is the call graph for this function:

void tm_frame_rep::set_shrinking_factor ( int  sf) [virtual]

Implements server_rep.

Definition at line 172 of file tm_frame.cpp.

                                          {
  if (!has_view ()) return;
  get_window () -> set_shrinking_factor (sf);
}

Here is the call graph for this function:

void tm_frame_rep::set_string_window_property ( string  what,
string  val 
) [virtual]

Implements server_rep.

Definition at line 73 of file tm_frame.cpp.

                                                                 {
  get_window () -> set_property (what, val);
}

Here is the call graph for this function:

virtual void server_rep::set_variant_keys ( string  var,
string  unvar 
) [pure virtual, inherited]

Implemented in tm_config_rep.

virtual void server_rep::set_view ( tm_view  vw) [pure virtual, inherited]

Implemented in tm_server_rep.

void tm_frame_rep::set_window_property ( scheme_tree  what,
scheme_tree  val 
) [virtual]

Implements server_rep.

Definition at line 58 of file tm_frame.cpp.

                                                                    {
  get_window () -> set_property (what, val);
}

Here is the call graph for this function:

virtual void server_rep::shell ( string  s) [pure virtual, inherited]

Implemented in tm_server_rep.

void tm_frame_rep::show_footer ( bool  flag) [virtual]

Implements server_rep.

Definition at line 144 of file tm_frame.cpp.

                                    {
  if (!has_view ()) return;
  get_window () -> set_footer_flag (flag);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void tm_frame_rep::show_header ( bool  flag) [virtual]

Implements server_rep.

Definition at line 126 of file tm_frame.cpp.

                                    {
  if (!has_view ()) return;
  get_window () -> set_header_flag (flag);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void tm_frame_rep::show_icon_bar ( int  which,
bool  flag 
) [virtual]

Implements server_rep.

Definition at line 132 of file tm_frame.cpp.

                                                 {
  if ((which<0) || (which>3) || (!has_view())) return;
  get_window () -> set_icon_bar_flag (which, flag);
}

Here is the call graph for this function:

void tm_frame_rep::show_side_tools ( int  which,
bool  flag 
) [virtual]

Implements server_rep.

Definition at line 138 of file tm_frame.cpp.

                                                   {
  if ((which<0) || (which>0) || (!has_view())) return;
  get_window () -> set_side_tools_flag (which, flag);
}

Here is the call graph for this function:

void tm_frame_rep::side_tools ( int  which,
string  menu 
) [virtual]

Implements server_rep.

Definition at line 120 of file tm_frame.cpp.

                                                 {
  if ((which<0) || (which>0)|| (!has_view())) return;
  get_window () -> side_tools (which, tools);
}

Here is the call graph for this function:

virtual void server_rep::style_clear_cache ( ) [pure virtual, inherited]

Implemented in tm_server_rep.

virtual void server_rep::typeset_update ( path  p) [pure virtual, inherited]

Implemented in tm_server_rep.

virtual void server_rep::typeset_update_all ( ) [pure virtual, inherited]

Implemented in tm_server_rep.

bool tm_frame_rep::visible_footer ( ) [virtual]

Implements server_rep.

Definition at line 167 of file tm_frame.cpp.

                              {
  return get_window () -> get_footer_flag ();
}

Here is the call graph for this function:

bool tm_frame_rep::visible_header ( ) [virtual]

Implements server_rep.

Definition at line 150 of file tm_frame.cpp.

                              {
  return get_window () -> get_header_flag ();
}

Here is the call graph for this function:

bool tm_frame_rep::visible_icon_bar ( int  which) [virtual]

Implements server_rep.

Definition at line 155 of file tm_frame.cpp.

                                         {
  if ((which<0) || (which>3)) return false;
  return get_window () -> get_icon_bar_flag (which);
}

Here is the call graph for this function:

bool tm_frame_rep::visible_side_tools ( int  which) [virtual]

Implements server_rep.

Definition at line 161 of file tm_frame.cpp.

                                           {
  if ((which<0) || (which>0)) return false;
  return get_window () -> get_side_tools_flag (which);
}

Here is the call graph for this function:

virtual void server_rep::wait_handler ( string  message,
string  arg 
) [pure virtual, inherited]

Implemented in tm_server_rep.


Member Data Documentation

Definition at line 21 of file tm_frame.hpp.

Definition at line 20 of file tm_frame.hpp.

bool tm_frame_rep::full_screen [protected]

Definition at line 18 of file tm_frame.hpp.

Definition at line 19 of file tm_frame.hpp.

int abstract_struct::ref_count [inherited]

Definition at line 142 of file basic.hpp.


The documentation for this class was generated from the following files: