Back to index

texmacs  1.0.7.15
Classes | Functions
window_widget.cpp File Reference
#include "window.hpp"
#include "message.hpp"
#include "Widkit/wk_widget.hpp"
#include "Widkit/Event/basic_event.hpp"

Go to the source code of this file.

Classes

class  window_widget_rep

Functions

wk_widget window_widget (wk_widget w, command quit)
wk_widget plain_window_widget (wk_widget wid, string s, command quit)
wk_widget popup_window_widget (wk_widget wid, string s)
void destroy_window_widget (wk_widget w)
void refresh_size (widget wid, bool exact)

Function Documentation

Definition at line 82 of file window_widget.cpp.

                                    {
  ASSERT (w->is_window_widget (), "not a window widget");
  tm_delete (w->win);
}

Here is the call graph for this function:

Definition at line 54 of file window_widget.cpp.

                                                            {
  SI W, H;
  gui_root_extents (W, H);
  SI min_w= 0, min_h= 0, def_w= W, def_h= H, max_w= W, max_h= H;
  wid << get_size (min_w, min_h, -1);
  wid << get_size (def_w, def_h, 0);
  wid << get_size (max_w, max_h, 1);
  wid= window_widget (wid, quit);
  (void) plain_window (abstract (wid), s,
                     min_w, min_h, def_w, def_h, max_w, max_h);
  return wid;
}

Here is the call graph for this function:

Definition at line 68 of file window_widget.cpp.

                                              {
  SI W, H;
  gui_root_extents (W, H);
  SI min_w= 0, min_h= 0, def_w= W, def_h= H, max_w= W, max_h= H;
  wid << get_size (min_w, min_h, -1);
  wid << get_size (def_w, def_h, 0);
  wid << get_size (max_w, max_h, 1);
  wid= window_widget (wid, command ());
  (void) popup_window (abstract (wid), s,
                     min_w, min_h, def_w, def_h, max_w, max_h);
  return wid;
}

Here is the call graph for this function:

void refresh_size ( widget  wid,
bool  exact 
)

Definition at line 88 of file window_widget.cpp.

                                      {
  window win= concrete (wid) -> win;
  SI old_w, old_h;
  win->get_size (old_w, old_h);
  SI def_w= old_w, def_h= old_h;
  SI min_w= old_w, min_h= old_h;
  SI max_w= old_w, max_h= old_h;
  concrete (wid) << get_size (def_w, def_h, 0);
  concrete (wid) << get_size (min_w, min_h, -1);
  concrete (wid) << get_size (max_w, max_h, 1);
  win->set_size_limits (min_w, min_h, max_w, max_h);
  SI new_w= min (max (old_w, min_w), max_w);
  SI new_h= min (max (old_h, min_h), max_h);
  if (exact) { new_w= def_w; new_h= def_h; }
  if (new_w != old_w || new_h != old_h) {
    concrete (wid) << emit_position (0, 0, new_w, new_h);
    win->set_size (new_w, new_h);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 41 of file window_widget.cpp.

                                          {
  array<wk_widget> a (1);
  a[0]= w;
  array<string> name (1);
  name[0]= "window";
  return tm_new<window_widget_rep> (a, name, quit);
}

Here is the caller graph for this function: