Back to index

Classes | Functions
canvas_widget.cpp File Reference
#include "rectangles.hpp"
#include "window.hpp"
#include "Widkit/basic_widget.hpp"
#include "Widkit/Event/attribute_event.hpp"
#include "Widkit/scroll_widget.hpp"
#include "Widkit/layout.hpp"

Go to the source code of this file.


class  canvas_widget_rep
class  resize_widget_rep
class  wrap_scroll_widget_rep


SI get_dx (gravity grav, SI w)
SI get_dy (gravity grav, SI h)
void indent ()
wk_widget resize_widget (wk_widget w, int style, string w1, string h1, string w2, string h2, string w3, string h3)
wk_widget wrap_scroll_widget (wk_widget w)
set_scrollable(wk_widget w)
canvas_widget (wk_widget w, gravity grav, bool request_focus)
wk_widget user_canvas_widget (wk_widget wid, int style)
wk_widget vsplit_widget (wk_widget t, wk_widget b)

Function Documentation

set_scrollable( wk_widget w) wk_widget canvas_widget ( wk_widget  w,
gravity  grav,
bool  request_focus 
) [get, set]

Definition at line 379 of file canvas_widget.cpp.

  return tm_new<canvas_widget_rep> (w, grav, request_focus);
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 indent ( )

Here is the caller graph for this function:

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

Definition at line 330 of file canvas_widget.cpp.

  //cout << "min: " << w1 << ", " << h1 << "\n";
  //cout << "def: " << w2 << ", " << h2 << "\n";
  //cout << "max: " << w3 << ", " << h3 << "\n";
  return tm_new<resize_widget_rep> (w, style, w1, h1, w2, h2, w3, h3);
wk_widget user_canvas_widget ( wk_widget  wid,
int  style 

Definition at line 384 of file canvas_widget.cpp.

  wk_widget cv= canvas_widget (wrap_scroll_widget (wid));
  SI widw, widh;
  gui_maximal_extents (widw, widh);
  wid << get_size (widw, widh, -1);
  abs_round (widw, widh);
  cv << set_coord4 ("extents", 0, -widh, widw, 0);
  return cv;

Here is the call graph for this function:

Definition at line 395 of file canvas_widget.cpp.

  (void) t; (void) b;
  FAILED ("not yet implemented");

Definition at line 365 of file canvas_widget.cpp.

  return tm_new<wrap_scroll_widget_rep> (w);

Here is the caller graph for this function: