dw::fltk::FltkPreview Class Reference

#include <fltkpreview.hh>

List of all members.

Public Member Functions

 FltkPreview (int x, int y, int w, int h, dw::core::Layout *layout, const char *label=0)
 ~FltkPreview ()
int handle (int event)
void setCanvasSize (int width, int ascent, int descent)
 Set the canvas size.
bool usesViewport ()
 Return, whether this view uses a viewport.
int getHScrollbarThickness ()
 Get the thickness of the horizontal scrollbar, when it is visible.
int getVScrollbarThickness ()
 Get the thickness of the vertical scrollbar, when it is visible.
void scrollTo (int x, int y)
 Scroll the vieport to the given position.
void scroll (dw::core::ScrollCommand cmd)
 Scroll the viewport as commanded.
void setViewportSize (int width, int height, int hScrollbarThickness, int vScrollbarThickness)
 Set the viewport size.
void drawText (core::style::Font *font, core::style::Color *color, core::style::Color::Shading shading, int x, int y, const char *text, int len)
void drawSimpleWrappedText (core::style::Font *font, core::style::Color *color, core::style::Color::Shading shading, int x, int y, int w, int h, const char *text)
void drawImage (core::Imgbuf *imgbuf, int xRoot, int yRoot, int x, int y, int width, int height)
bool usesFltkWidgets ()
void drawFltkWidget (Fl_Widget *widget, core::Rectangle *area)

Protected Member Functions

int translateViewXToCanvasX (int x)
int translateViewYToCanvasY (int y)
int translateCanvasXToViewX (int x)
int translateCanvasYToViewY (int y)

Private Attributes

int scrollX
int scrollY
int scrollWidth
int scrollHeight

Friends

class FltkPreviewWindow


Constructor & Destructor Documentation

dw::fltk::FltkPreview::FltkPreview ( int  x,
int  y,
int  w,
int  h,
dw::core::Layout layout,
const char *  label = 0 
)

dw::fltk::FltkPreview::~FltkPreview (  ) 


Member Function Documentation

void dw::fltk::FltkPreview::drawFltkWidget ( Fl_Widget *  widget,
core::Rectangle area 
) [virtual]

Reimplemented from dw::fltk::FltkView.

void dw::fltk::FltkPreview::drawImage ( core::Imgbuf imgbuf,
int  xRoot,
int  yRoot,
int  x,
int  y,
int  width,
int  height 
) [virtual]

Implements dw::core::View.

void dw::fltk::FltkPreview::drawSimpleWrappedText ( core::style::Font font,
core::style::Color color,
core::style::Color::Shading  shading,
int  x,
int  y,
int  w,
int  h,
const char *  text 
) [virtual]

Implements dw::core::View.

void dw::fltk::FltkPreview::drawText ( core::style::Font font,
core::style::Color color,
core::style::Color::Shading  shading,
int  x,
int  y,
const char *  text,
int  len 
) [virtual]

int dw::fltk::FltkPreview::getHScrollbarThickness (  )  [virtual]

Get the thickness of the horizontal scrollbar, when it is visible.

Does not have to be implemented, when usesViewport returns false.

Implements dw::core::View.

int dw::fltk::FltkPreview::getVScrollbarThickness (  )  [virtual]

Get the thickness of the vertical scrollbar, when it is visible.

Does not have to be implemented, when usesViewport returns false.

Implements dw::core::View.

int dw::fltk::FltkPreview::handle ( int  event  ) 

Reimplemented from dw::fltk::FltkViewBase.

void dw::fltk::FltkPreview::scroll ( dw::core::ScrollCommand   )  [virtual]

Scroll the viewport as commanded.

Reimplemented from dw::core::View.

void dw::fltk::FltkPreview::scrollTo ( int  x,
int  y 
) [virtual]

Scroll the vieport to the given position.

Does not have to be implemented, when usesViewport returns false.

Implements dw::core::View.

References scrollX, and scrollY.

void dw::fltk::FltkPreview::setCanvasSize ( int  width,
int  ascent,
int  descent 
) [virtual]

Set the canvas size.

Reimplemented from dw::fltk::FltkViewBase.

void dw::fltk::FltkPreview::setViewportSize ( int  width,
int  height,
int  hScrollbarThickness,
int  vScrollbarThickness 
) [virtual]

Set the viewport size.

Does not have to be implemented, when usesViewport returns false.

This will normally imply a resize of the UI widget. Width and height are the dimensions of the new size, including the scrollbar thicknesses.

Implements dw::core::View.

References scrollHeight, and scrollWidth.

int dw::fltk::FltkPreview::translateCanvasXToViewX ( int  x  )  [protected, virtual]

int dw::fltk::FltkPreview::translateCanvasYToViewY ( int  y  )  [protected, virtual]

int dw::fltk::FltkPreview::translateViewXToCanvasX ( int  x  )  [protected, virtual]

int dw::fltk::FltkPreview::translateViewYToCanvasY ( int  y  )  [protected, virtual]

bool dw::fltk::FltkPreview::usesFltkWidgets (  )  [virtual]

Implements dw::fltk::FltkView.

bool dw::fltk::FltkPreview::usesViewport (  )  [virtual]

Return, whether this view uses a viewport.

Implements dw::core::View.


Friends And Related Function Documentation

friend class FltkPreviewWindow [friend]


Member Data Documentation


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

Generated on Wed Sep 7 02:00:38 2011 for Dillo by  doxygen 1.5.9