20#include "../lout/msg.h"
26#include <FL/Fl_Bitmap.H>
27#include <FL/fl_draw.H>
79 if (parent() && parent()->visible ())
111 MSG_ERR(
"FltkPreview::scroll not implemented\n");
115 int hScrollbarThickness,
116 int vScrollbarThickness)
125 int x,
int y,
const char *text,
int len)
138 int width = (int)getwidth (text, len);
139 int height = font->
ascent;
145 Rectangle rect (x1, y1, x2 - x1, y2 - y1);
147 setcolor(((
FltkColor*)color)->colors[shading]);
150 fl_color(((
FltkColor*)color)->colors[shading]);
157 int x,
int y,
int w,
int h,
163 int x,
int y,
int width,
int height)
180 Fl_Menu_Window (1, 1)
182 box (FL_EMBOSSED_BOX);
205 int mx, my, width, height;
218 Fl::get_mouse(mx, my);
275 Fl_Button (x, y, w, h, label)
277 image (
new Fl_Bitmap (preview_bits, preview_width, preview_height));
292 return Fl_Button::handle (event);
299 return Fl_Button::handle (event);
303 return Fl_Button::handle (event);
306 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.