Back to index

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

#include <tm_window.hpp>

Collaboration diagram for tm_window_rep:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 tm_window_rep (widget wid2, tree geom)
 tm_window_rep (tree doc, command quit)
 ~tm_window_rep ()
void set_window_name (string s)
void set_window_url (url u)
void map ()
void unmap ()
void refresh ()
void set_property (scheme_tree what, scheme_tree val)
scheme_tree get_property (scheme_tree what)
bool get_menu_widget (int which, string menu, widget &w)
void menu_main (string menu)
void menu_icons (int which, string menu)
void side_tools (int which, string tools)
void set_header_flag (bool flag)
void set_icon_bar_flag (int which, bool flag)
void set_side_tools_flag (int which, bool flag)
bool get_header_flag ()
bool get_icon_bar_flag (int which)
bool get_side_tools_flag (int which)
int get_shrinking_factor ()
void set_shrinking_factor (int sf)
void get_visible (SI &x1, SI &y1, SI &x2, SI &y2)
void get_extents (SI &x1, SI &y1, SI &x2, SI &y2)
void set_extents (SI x1, SI y1, SI x2, SI y2)
void set_scrollbars (int i)
void get_scroll_pos (SI &x, SI &y)
void set_scroll_pos (SI x, SI y)
bool get_footer_flag ()
void set_footer_flag (bool on)
void set_left_footer (string s)
void set_right_footer (string s)
bool get_interactive_mode ()
void set_interactive_mode (bool on)
void interactive (string name, string type, array< string > def, string &s, command cmd)
void interactive_return ()

Public Attributes

widget win
widget wid
int id
hashmap< tree, treeprops
int serial
int sfactor

Protected Attributes

hashmap< int, objectmenu_current
hashmap< object, widgetmenu_cache
stringtext_ptr
command call_back

Detailed Description

Definition at line 17 of file tm_window.hpp.


Constructor & Destructor Documentation

Definition at line 31 of file tm_window.cpp.

                                                   :
  win (texmacs_window_widget (wid2, geom)),
  wid (wid2), id (create_window_id ()),
  serial (tm_window_serial++),
  menu_current (object ()), menu_cache (widget ()),
  text_ptr (NULL)
{
  sfactor= get_server () -> get_default_shrinking_factor ();
}

Here is the call graph for this function:

Definition at line 41 of file tm_window.cpp.

                                                   :
  win (texmacs_widget (0, quit)),
  wid (win), id (-1),
  serial (tm_window_serial++),
  menu_current (object ()), menu_cache (widget ()),
  text_ptr (NULL)
{
  sfactor= get_server () -> get_default_shrinking_factor ();
}

Here is the call graph for this function:

Definition at line 51 of file tm_window.cpp.

                               {
  if (id != -1) destroy_window_id (id);
}

Here is the call graph for this function:


Member Function Documentation

void tm_window_rep::get_extents ( SI x1,
SI y1,
SI x2,
SI y2 
)

Definition at line 303 of file tm_window.cpp.

                                                          {
  ::get_extents (wid, x1, y1, x2, y2);
}

Definition at line 332 of file tm_window.cpp.

                                {
  return get_footer_visibility (wid);
}

Here is the call graph for this function:

Definition at line 263 of file tm_window.cpp.

                                {
  return get_header_visibility (wid);
}

Here is the call graph for this function:

bool tm_window_rep::get_icon_bar_flag ( int  which)

Definition at line 268 of file tm_window.cpp.

                                           {
  if      (which == 0) return get_main_icons_visibility (wid);
  else if (which == 1) return get_mode_icons_visibility (wid);
  else if (which == 2) return get_focus_icons_visibility (wid);
  else if (which == 3) return get_user_icons_visibility (wid);
  else return false;
}

Here is the call graph for this function:

Definition at line 364 of file tm_window.cpp.

Here is the caller graph for this function:

bool tm_window_rep::get_menu_widget ( int  which,
string  menu,
widget w 
)

Definition at line 196 of file tm_window.cpp.

                                                                 {
  object xmenu= call ("menu-expand", eval ("'" * menu));
  //cout << "xmenu= " << xmenu << "\n";
  if (menu_cache->contains (xmenu)) {
    //if (menu_current[which] == xmenu) cout << "Same " << menu << "\n";
    if (menu_current[which] == xmenu) return false;
    menu_current (which)= xmenu;
    //cout << "Cached " << menu << "\n";
    w= menu_cache [xmenu];
    return true;
  }
  menu_current (which)= xmenu;
  //cout << "Compute " << menu << "\n";
  object umenu= eval ("'" * menu);
  w= make_menu_widget (umenu);
  menu_cache (xmenu)= w;
  return true;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 45 of file tm_window.hpp.

                                                     {
    return props [what]; }
void tm_window_rep::get_scroll_pos ( SI x,
SI y 
)

Definition at line 318 of file tm_window.cpp.

Here is the call graph for this function:

Definition at line 293 of file tm_window.cpp.

                                     {
  return sfactor;
}

Here is the caller graph for this function:

Definition at line 277 of file tm_window.cpp.

                                             {
  if (which == 0) return get_side_tools_visibility (wid);
  else return false;
}

Here is the call graph for this function:

void tm_window_rep::get_visible ( SI x1,
SI y1,
SI x2,
SI y2 
)

Definition at line 298 of file tm_window.cpp.

                                                          {
  get_visible_part (wid, x1, y1, x2, y2);
}

Here is the call graph for this function:

void tm_window_rep::interactive ( string  name,
string  type,
array< string def,
string s,
command  cmd 
)

Definition at line 374 of file tm_window.cpp.

{
  if (get_interactive_mode ()) { s= "cancel"; return; }
  text_ptr = &s;
  call_back= cmd;
  widget tw = text_widget (translate (name), 0, black, false);
  widget inp= input_text_widget (tm_new<ia_command_rep> (this), type, def);
  set_interactive_prompt (wid, tw);
  set_interactive_input (wid, inp);
  set_interactive_mode (true);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 388 of file tm_window.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 177 of file tm_window.cpp.

                    {
  set_visibility (win, true);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void tm_window_rep::menu_icons ( int  which,
string  menu 
)

Definition at line 224 of file tm_window.cpp.

                                                 {
  eval ("(lazy-initialize-force)");
  widget w;
  if (get_menu_widget (which, menu, w)) {
    if      (which == 0) set_main_icons (wid, w);
    else if (which == 1) set_mode_icons (wid, w);
    else if (which == 2) set_focus_icons (wid, w);
    else if (which == 3) set_user_icons (wid, w);
  }
}

Here is the call graph for this function:

Definition at line 216 of file tm_window.cpp.

                                     {
  eval ("(lazy-initialize-force)");
  widget w;
  if (get_menu_widget (-1, menu, w))
    ::set_main_menu (wid, w);
}

Here is the call graph for this function:

Definition at line 187 of file tm_window.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void tm_window_rep::set_extents ( SI  x1,
SI  y1,
SI  x2,
SI  y2 
)

Definition at line 308 of file tm_window.cpp.

                                                      {
  ::set_extents (wid, x1, y1, x2, y2);
}
void tm_window_rep::set_footer_flag ( bool  on)

Definition at line 337 of file tm_window.cpp.

                                         {
  set_footer_visibility (wid, flag);
}

Here is the call graph for this function:

void tm_window_rep::set_header_flag ( bool  flag)

Definition at line 245 of file tm_window.cpp.

                                         {
  set_header_visibility (wid, flag);
}

Here is the call graph for this function:

void tm_window_rep::set_icon_bar_flag ( int  which,
bool  flag 
)

Definition at line 250 of file tm_window.cpp.

                                                      {
  if      (which == 0) set_main_icons_visibility (wid, flag);
  else if (which == 1) set_mode_icons_visibility (wid, flag);
  else if (which == 2) set_focus_icons_visibility (wid, flag);
  else if (which == 3) set_user_icons_visibility (wid, flag);
}

Here is the call graph for this function:

Definition at line 369 of file tm_window.cpp.

Here is the caller graph for this function:

Definition at line 342 of file tm_window.cpp.

void tm_window_rep::set_property ( scheme_tree  what,
scheme_tree  val 
) [inline]

Definition at line 43 of file tm_window.hpp.

                                                               {
    props (what)= val; }

Definition at line 347 of file tm_window.cpp.

void tm_window_rep::set_scroll_pos ( SI  x,
SI  y 
)

Definition at line 323 of file tm_window.cpp.

Here is the call graph for this function:

Definition at line 313 of file tm_window.cpp.

Here is the call graph for this function:

Definition at line 287 of file tm_window.cpp.

Here is the caller graph for this function:

void tm_window_rep::set_side_tools_flag ( int  which,
bool  flag 
)

Definition at line 258 of file tm_window.cpp.

                                                        {
  if (which == 0) set_side_tools_visibility (wid, flag);
}

Here is the call graph for this function:

Definition at line 167 of file tm_window.cpp.

                                        {
  set_name (wid, s);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 172 of file tm_window.cpp.

                                    {
  if (!is_none (u)) set_file (wid, as_string (u));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void tm_window_rep::side_tools ( int  which,
string  tools 
)

Definition at line 236 of file tm_window.cpp.

                                                  {
  eval ("(lazy-initialize-force)");
  widget w;
  if (get_menu_widget (10 + which, tools, w)) {
    if (which == 0) set_side_tools (wid, w);
  }
}

Here is the call graph for this function:

Definition at line 182 of file tm_window.cpp.

                      {
  set_visibility (win, false);
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 32 of file tm_window.hpp.

Definition at line 21 of file tm_window.hpp.

Definition at line 30 of file tm_window.hpp.

Definition at line 29 of file tm_window.hpp.

Definition at line 24 of file tm_window.hpp.

Definition at line 25 of file tm_window.hpp.

Definition at line 26 of file tm_window.hpp.

Definition at line 31 of file tm_window.hpp.

Definition at line 20 of file tm_window.hpp.

Definition at line 19 of file tm_window.hpp.


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