Dillo v3.1.1-99-gf3103cc4
Loading...
Searching...
No Matches
dw::fltk::FltkFlatView Class Reference

#include <fltkflatview.hh>

Public Member Functions

 FltkFlatView (int x, int y, int w, int h, const char *label=0)
 
 ~FltkFlatView ()
 
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 setViewportSize (int width, int height, int hScrollbarThickness, int vScrollbarThickness)
 Set the viewport size.
 
- Public Member Functions inherited from dw::fltk::FltkWidgetView
 FltkWidgetView (int x, int y, int w, int h, const char *label=0)
 
 ~FltkWidgetView ()
 
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 addFltkWidget (Fl_Widget *widget, core::Allocation *allocation)
 
void removeFltkWidget (Fl_Widget *widget)
 
void allocateFltkWidget (Fl_Widget *widget, core::Allocation *allocation)
 
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::ViewgetClippingView (int x, int y, int width, int height)
 
void mergeClippingView (core::View *clippingView)
 
void setBufferedDrawing (bool b)
 
- Public Member Functions inherited from dw::core::View
virtual void scroll (ScrollCommand)
 Scroll the viewport as commanded.
 
- 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 Objectclone ()
 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)
 

Additional Inherited Members

- Protected Attributes inherited from dw::fltk::FltkViewBase
core::LayouttheLayout
 
int canvasWidth
 
int canvasHeight
 
int mouse_x
 
int mouse_y
 
Fl_Widget * focused_child
 

Detailed Description

Definition at line 11 of file fltkflatview.hh.

Constructor & Destructor Documentation

◆ FltkFlatView()

dw::fltk::FltkFlatView::FltkFlatView ( int  x,
int  y,
int  w,
int  h,
const char *  label = 0 
)

Definition at line 32 of file fltkflatview.cc.

References DBG_OBJ_CREATE.

◆ ~FltkFlatView()

dw::fltk::FltkFlatView::~FltkFlatView ( )

Definition at line 38 of file fltkflatview.cc.

Member Function Documentation

◆ getHScrollbarThickness()

int dw::fltk::FltkFlatView::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.

Definition at line 63 of file fltkflatview.cc.

◆ getScrollbarOnLeft()

int dw::fltk::FltkFlatView::getScrollbarOnLeft ( )
virtual

Implements dw::core::View.

Definition at line 73 of file fltkflatview.cc.

◆ getVScrollbarThickness()

int dw::fltk::FltkFlatView::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.

Definition at line 68 of file fltkflatview.cc.

◆ scrollTo()

void dw::fltk::FltkFlatView::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.

Definition at line 78 of file fltkflatview.cc.

◆ setCanvasSize()

void dw::fltk::FltkFlatView::setCanvasSize ( int  width,
int  ascent,
int  descent 
)
virtual

Set the canvas size.

Bug:
It has to be clarified, who is responsible for setting the FLTK widget size. In the only used context (complex buttons), it is done elsewhere.

Implements dw::core::View.

Definition at line 42 of file fltkflatview.cc.

References dw::fltk::FltkViewBase::setCanvasSize().

◆ setViewportSize()

void dw::fltk::FltkFlatView::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.

Definition at line 82 of file fltkflatview.cc.

◆ translateCanvasXToViewX()

int dw::fltk::FltkFlatView::translateCanvasXToViewX ( int  x)
protectedvirtual

Implements dw::fltk::FltkViewBase.

Definition at line 98 of file fltkflatview.cc.

◆ translateCanvasYToViewY()

int dw::fltk::FltkFlatView::translateCanvasYToViewY ( int  y)
protectedvirtual

Implements dw::fltk::FltkViewBase.

Definition at line 103 of file fltkflatview.cc.

◆ translateViewXToCanvasX()

int dw::fltk::FltkFlatView::translateViewXToCanvasX ( int  x)
protectedvirtual

Implements dw::fltk::FltkViewBase.

Definition at line 88 of file fltkflatview.cc.

◆ translateViewYToCanvasY()

int dw::fltk::FltkFlatView::translateViewYToCanvasY ( int  y)
protectedvirtual

Implements dw::fltk::FltkViewBase.

Definition at line 93 of file fltkflatview.cc.

◆ usesViewport()

bool dw::fltk::FltkFlatView::usesViewport ( )
virtual

Return, whether this view uses a viewport.

Implements dw::core::View.

Definition at line 58 of file fltkflatview.cc.


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