24#include <FL/Fl_Window.H>
48static ImageStyleDeletionReceiver
isdr;
80 for(
int x = 0; x < 400; x++) {
81 buf[3 * x + 0] = 128 + x * 127 / 399;
82 buf[3 * x + 1] = 128 + (399 - x) * 127 / 399;
83 buf[3 * x + 2] = 128 +
imgRow1 * 127 / 199;
93 for(
int x = 0; x < 100; x++) {
94 int r = 128 + rand () % 127;
95 buf[3 * x + 0] = buf[3 * x + 1] = buf[3 * x + 2] = r;
112 Fl_Window *
window =
new Fl_Window(200, 300,
"Dw Example");
128 styleAttrs.
x_lang[0] =
'e';
129 styleAttrs.
x_lang[1] =
'n';
132 fontAttrs.
name =
"Bitstream Charter";
164 for(
int i = 1; i <= 1; i++) {
166 sprintf(buf,
"%d.", i);
168 const char *words[] = {
"This",
"is",
"the", buf,
"paragraph.",
169 "Here",
"comes",
"some",
"more",
"text",
170 "to",
"demonstrate",
"word",
"wrapping.",
173 for(
int j = 0; words[j]; j++) {
182 wordStyleBg->
unref();
192 int errorCode = Fl::run();
A Widget for rendering text blocks, i.e.
void addSpace(core::style::Style *style)
?
void addText(const char *text, size_t len, core::style::Style *style)
Add a word to the page structure.
void addParbreak(int space, core::style::Style *style)
Cause a paragraph break.
virtual void drawRow(int row)=0
Called, when data from a row is available and has been copied into the image buffer.
virtual void setBuffer(core::Imgbuf *buffer, bool resize=false)=0
Called, when an image buffer is attached.
The platform independent interface for image buffers.
virtual void copyRow(int row, const byte *data)=0
The central class for managing and drawing a widget tree.
void attachView(View *view)
Attach a view to the layout.
void setWidget(Widget *widget)
Imgbuf * createImgbuf(Imgbuf::Type type, int width, int height, double gamma)
void setBgImage(style::StyleImage *bgImage, style::BackgroundRepeat bgRepeat, style::BackgroundAttachment bgAttachment, style::Length bgPositionX, style::Length bgPositionY)
static Color * create(Layout *layout, int color)
static Font * create(Layout *layout, FontAttrs *attrs)
StyleImage * backgroundImage
Length backgroundPositionY
BackgroundRepeat backgroundRepeat
Length backgroundPositionX
ImgRenderer * getMainImgRenderer()
static StyleImage * create()
static Style * create(StyleAttrs *attrs)
virtual void deleted(ObservedObject *object)=0
An observed object has a signal emitter, which tells the receivers, when the object is deleted.
void connectDeletion(DeletionReceiver *receiver)
static Style * widgetStyle
static Fl_Window * window
static FltkPlatform * platform
static FltkViewport * viewport
static ImageStyleDeletionReceiver isdr
static void imageInitTimeout(void *data)
static StyleImage * image1
static StyleImage * image2
static void imageDrawTimeout(void *data)
Anything related to Dillo Widget styles is defined here.
@ BACKGROUND_ATTACHMENT_SCROLL
Length createPerLength(double v)
Returns a percentage, v is relative to 1, not to 100.
Length createAbsLength(int n)
Returns a length of n pixels.
The core of Dw is defined in this namespace.
This namespace contains FLTK implementations of Dw interfaces.
Dw is in this namespace, or sub namespaces of this one.
Miscellaneous stuff, which does not fit anywhere else.
This namespace provides base classes to define signals.