#include <fltkpreview.hh>
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 |
| dw::fltk::FltkPreview::FltkPreview | ( | int | x, | |
| int | y, | |||
| int | w, | |||
| int | h, | |||
| dw::core::Layout * | layout, | |||
| const char * | label = 0 | |||
| ) |
References dw::core::Layout::attachView(), scrollHeight, scrollWidth, scrollX, and scrollY.
| dw::fltk::FltkPreview::~FltkPreview | ( | ) |
| 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] |
| 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.
| void dw::fltk::FltkPreview::setCanvasSize | ( | int | width, | |
| int | ascent, | |||
| int | descent | |||
| ) | [virtual] |
| 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] |
Implements dw::fltk::FltkViewBase.
References dw::fltk::FltkViewBase::canvasWidth.
Referenced by drawText(), and dw::fltk::FltkPreviewWindow::reallocate().
| int dw::fltk::FltkPreview::translateCanvasYToViewY | ( | int | y | ) | [protected, virtual] |
Implements dw::fltk::FltkViewBase.
References dw::fltk::FltkViewBase::canvasHeight.
Referenced by drawText(), and dw::fltk::FltkPreviewWindow::reallocate().
| int dw::fltk::FltkPreview::translateViewXToCanvasX | ( | int | x | ) | [protected, virtual] |
Implements dw::fltk::FltkViewBase.
References dw::fltk::FltkViewBase::canvasWidth.
Referenced by dw::fltk::FltkPreviewWindow::scrollTo().
| int dw::fltk::FltkPreview::translateViewYToCanvasY | ( | int | y | ) | [protected, virtual] |
Implements dw::fltk::FltkViewBase.
References dw::fltk::FltkViewBase::canvasHeight.
Referenced by dw::fltk::FltkPreviewWindow::scrollTo().
| bool dw::fltk::FltkPreview::usesFltkWidgets | ( | ) | [virtual] |
Implements dw::fltk::FltkView.
| bool dw::fltk::FltkPreview::usesViewport | ( | ) | [virtual] |
friend class FltkPreviewWindow [friend] |
int dw::fltk::FltkPreview::scrollHeight [private] |
int dw::fltk::FltkPreview::scrollWidth [private] |
int dw::fltk::FltkPreview::scrollX [private] |
int dw::fltk::FltkPreview::scrollY [private] |
1.5.9