20#include "../lout/msg.h"
26#include <FL/Fl_Bitmap.H>
27#include <FL/fl_draw.H>
79 if (parent() && parent()->visible ())
106 MSG_ERR(
"FltkPreview::scroll not implemented\n");
110 int hScrollbarThickness,
111 int vScrollbarThickness)
120 int x,
int y,
const char *text,
int len)
133 int width = (int)getwidth (text, len);
134 int height = font->
ascent;
140 Rectangle rect (x1, y1, x2 - x1, y2 - y1);
142 setcolor(((
FltkColor*)color)->colors[shading]);
145 fl_color(((
FltkColor*)color)->colors[shading]);
152 int x,
int y,
int w,
int h,
158 int x,
int y,
int width,
int height)
175 Fl_Menu_Window (1, 1)
177 box (FL_EMBOSSED_BOX);
200 int mx, my, width, height;
213 Fl::get_mouse(mx, my);
270 Fl_Button (x, y, w, h, label)
272 image (
new Fl_Bitmap (preview_bits, preview_width, preview_height));
287 return Fl_Button::handle (event);
294 return Fl_Button::handle (event);
298 return Fl_Button::handle (event);
301 return Fl_Button::handle (event);
The platform independent interface for image buffers.
The central class for managing and drawing a widget tree.
void scrollPosChanged(View *view, int x, int y)
dw::core::Shape implemtation for simple rectangles.
void scrollTo(int mouseX, int mouseY)
FltkPreviewWindow(dw::core::Layout *layout)
void drawFltkWidget(Fl_Widget *widget, core::Rectangle *area)
void drawText(core::style::Font *font, core::style::Color *color, core::style::Color::Shading shading, int x, int y, const char *text, int len)
bool usesViewport()
Return, whether this view uses a viewport.
int getVScrollbarThickness()
Get the thickness of the vertical scrollbar, when it is visible.
int translateCanvasYToViewY(int y)
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 drawImage(core::Imgbuf *imgbuf, int xRoot, int yRoot, int x, int y, int width, int height)
int translateViewXToCanvasX(int x)
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)
int translateCanvasXToViewX(int x)
int getHScrollbarThickness()
Get the thickness of the horizontal scrollbar, when it is visible.
void setViewportSize(int width, int height, int hScrollbarThickness, int vScrollbarThickness)
Set the viewport size.
void setCanvasSize(int width, int ascent, int descent)
Set the canvas size.
int translateViewYToCanvasY(int y)
FltkPreview(int x, int y, int w, int h, dw::core::Layout *layout, const char *label=0)
void setCanvasSize(int width, int ascent, int descent)
Set the canvas size.
static core::Imgbuf * imgbuf
void warpPointer(int x, int y)
Dw is in this namespace, or sub namespaces of this one.