Back to index

texmacs  1.0.7.15
Functions
scrollable_widget.cpp File Reference
#include "window.hpp"
#include "Widkit/scroll_widget.hpp"

Go to the source code of this file.

Functions

SI get_dx (gravity grav, int w)
SI get_dy (gravity grav, int h)
bool is_nil (wk_widget_rep *x)

Function Documentation

SI get_dx ( gravity  grav,
int  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,
int  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;
}
bool is_nil ( wk_widget_rep x) [inline]

Definition at line 18 of file scrollable_widget.cpp.

{ return x==NULL; }