Dillo v3.1.1-111-gd4f56d0d
|
#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. | |
int | getScrollbarOnLeft () |
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) |
Public Member Functions inherited from dw::fltk::FltkViewBase | |
FltkViewBase (int x, int y, int w, int h, const char *label=0) | |
~FltkViewBase () | |
void | draw () |
int | handle (int event) |
void | setLayout (core::Layout *layout) |
This methods notifies the view, that it has been attached to a layout. | |
void | setCanvasSize (int width, int ascent, int descent) |
Set the canvas size. | |
void | setCursor (core::style::Cursor cursor) |
Set the cursor appearance. | |
void | setBgColor (core::style::Color *color) |
Set the background of the view. | |
void | startDrawing (core::Rectangle *area) |
Called before drawing. | |
void | finishDrawing (core::Rectangle *area) |
Called after drawing. | |
void | queueDraw (core::Rectangle *area) |
Queue a region, which is given in canvas coordinates, for drawing. | |
void | queueDrawTotal () |
Queue the total viewport for drawing. | |
void | cancelQueueDraw () |
Cancel a draw queue request. | |
void | drawPoint (core::style::Color *color, core::style::Color::Shading shading, int x, int y) |
void | drawLine (core::style::Color *color, core::style::Color::Shading shading, int x1, int y1, int x2, int y2) |
void | drawTypedLine (core::style::Color *color, core::style::Color::Shading shading, core::style::LineType type, int width, int x1, int y1, int x2, int y2) |
void | drawRectangle (core::style::Color *color, core::style::Color::Shading shading, bool filled, int x, int y, int width, int height) |
void | drawArc (core::style::Color *color, core::style::Color::Shading shading, bool filled, int centerX, int centerY, int width, int height, int angle1, int angle2) |
void | drawPolygon (core::style::Color *color, core::style::Color::Shading shading, bool filled, bool convex, core::Point *points, int npoints) |
core::View * | getClippingView (int x, int y, int width, int height) |
void | mergeClippingView (core::View *clippingView) |
void | setBufferedDrawing (bool b) |
Public Member Functions inherited from dw::fltk::FltkView | |
virtual void | addFltkWidget (Fl_Widget *widget, core::Allocation *allocation) |
virtual void | removeFltkWidget (Fl_Widget *widget) |
virtual void | allocateFltkWidget (Fl_Widget *widget, core::Allocation *allocation) |
Public Member Functions inherited from lout::object::Object | |
virtual | ~Object () |
The destructor is defined as virtual (but not abstract), so that destruction of Object's works properly. | |
virtual bool | equals (Object *other) |
Returns, whether two objects are equal. | |
virtual int | hashValue () |
Return a hash value for the object. | |
virtual Object * | clone () |
Return an exact copy of the object. | |
virtual void | intoStringBuffer (misc::StringBuffer *sb) |
Store a textual representation of the object in a misc::StringBuffer. | |
const char * | toString () |
Use object::Object::intoStringBuffer to return a textual representation of the object. | |
virtual size_t | sizeOf () |
Return the number of bytes, this object totally uses. | |
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 |
Additional Inherited Members | |
Protected Attributes inherited from dw::fltk::FltkViewBase | |
core::Layout * | theLayout |
int | canvasWidth |
int | canvasHeight |
int | mouse_x |
int | mouse_y |
Fl_Widget * | focused_child |
Definition at line 11 of file fltkpreview.hh.
dw::fltk::FltkPreview::FltkPreview | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
dw::core::Layout * | layout, | ||
const char * | label = 0 |
||
) |
Definition at line 35 of file fltkpreview.cc.
References layout, scrollHeight, scrollWidth, scrollX, and scrollY.
dw::fltk::FltkPreview::~FltkPreview | ( | ) |
Definition at line 47 of file fltkpreview.cc.
|
virtual |
Reimplemented from dw::fltk::FltkView.
Definition at line 172 of file fltkpreview.cc.
|
virtual |
Implements dw::core::View.
Definition at line 162 of file fltkpreview.cc.
|
virtual |
Implements dw::core::View.
Definition at line 154 of file fltkpreview.cc.
|
virtual |
Implements dw::core::View.
Definition at line 122 of file fltkpreview.cc.
References dw::core::style::Font::ascent, dw::fltk::FltkFont::font, dw::core::style::FontAttrs::size, translateCanvasXToViewX(), and translateCanvasYToViewY().
|
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.
Definition at line 88 of file fltkpreview.cc.
|
virtual |
Implements dw::core::View.
Definition at line 98 of file fltkpreview.cc.
|
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.
Definition at line 93 of file fltkpreview.cc.
int dw::fltk::FltkPreview::handle | ( | int | event | ) |
Definition at line 51 of file fltkpreview.cc.
References dw::fltk::FltkViewBase::handle().
|
virtual |
Scroll the viewport as commanded.
Reimplemented from dw::core::View.
Definition at line 109 of file fltkpreview.cc.
References MSG_ERR.
|
virtual |
Scroll the vieport to the given position.
Does not have to be implemented, when usesViewport returns false.
Implements dw::core::View.
Definition at line 103 of file fltkpreview.cc.
|
virtual |
Set the canvas size.
Implements dw::core::View.
Definition at line 76 of file fltkpreview.cc.
References dw::fltk::FltkViewBase::setCanvasSize().
|
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.
Definition at line 114 of file fltkpreview.cc.
References scrollHeight, and scrollWidth.
|
protectedvirtual |
Implements dw::fltk::FltkViewBase.
Definition at line 66 of file fltkpreview.cc.
References dw::fltk::FltkViewBase::canvasWidth.
Referenced by drawText(), and dw::fltk::FltkPreviewWindow::reallocate().
|
protectedvirtual |
Implements dw::fltk::FltkViewBase.
Definition at line 71 of file fltkpreview.cc.
References dw::fltk::FltkViewBase::canvasHeight.
Referenced by drawText(), and dw::fltk::FltkPreviewWindow::reallocate().
|
protectedvirtual |
Implements dw::fltk::FltkViewBase.
Definition at line 56 of file fltkpreview.cc.
References dw::fltk::FltkViewBase::canvasWidth.
Referenced by dw::fltk::FltkPreviewWindow::scrollTo().
|
protectedvirtual |
Implements dw::fltk::FltkViewBase.
Definition at line 61 of file fltkpreview.cc.
References dw::fltk::FltkViewBase::canvasHeight.
Referenced by dw::fltk::FltkPreviewWindow::scrollTo().
|
virtual |
Implements dw::fltk::FltkView.
Definition at line 167 of file fltkpreview.cc.
|
virtual |
Return, whether this view uses a viewport.
Implements dw::core::View.
Definition at line 83 of file fltkpreview.cc.
|
friend |
Definition at line 13 of file fltkpreview.hh.
|
private |
Definition at line 16 of file fltkpreview.hh.
Referenced by FltkPreview(), dw::fltk::FltkPreviewWindow::reallocate(), dw::fltk::FltkPreviewWindow::scrollTo(), and setViewportSize().
|
private |
Definition at line 16 of file fltkpreview.hh.
Referenced by FltkPreview(), dw::fltk::FltkPreviewWindow::reallocate(), dw::fltk::FltkPreviewWindow::scrollTo(), and setViewportSize().
|
private |
Definition at line 16 of file fltkpreview.hh.
Referenced by FltkPreview(), dw::fltk::FltkPreviewWindow::reallocate(), dw::fltk::FltkPreviewWindow::scrollTo(), and scrollTo().
|
private |
Definition at line 16 of file fltkpreview.hh.
Referenced by FltkPreview(), dw::fltk::FltkPreviewWindow::reallocate(), dw::fltk::FltkPreviewWindow::scrollTo(), and scrollTo().