24#include <FL/Fl_Window.H>
38 bool enter (
Widget *widget,
int link,
int img,
int x,
int y);
39 bool press (
Widget *widget,
int link,
int img,
int x,
int y,
41 bool release (
Widget *widget,
int link,
int img,
int x,
int y,
47bool LinkTestReceiver::enter (
Widget *widget,
int link,
int img,
int x,
int y)
49 printf (
"enter: %d\n", link);
53bool LinkTestReceiver::press (
Widget *widget,
int link,
int img,
int x,
int y,
56 printf (
"press: %d\n", link);
60bool LinkTestReceiver::release (
Widget *widget,
int link,
int img,
int x,
int y,
63 printf (
"release: %d\n", link);
67bool LinkTestReceiver::click (
Widget *widget,
int link,
int img,
int x,
int y,
70 printf (
"click: %d\n", link);
74int main(
int argc,
char **argv)
76 LinkTestReceiver linkTestReceiver;
80 Fl_Window *
window =
new Fl_Window(200, 300,
"Dw Links");
92 fontAttrs.
name =
"Bitstream Charter";
123 for(
int i = 1; i <= 10; i++) {
125 sprintf(buf,
"%d.", i);
127 const char *words1[] = {
128 "This",
"is",
"the", buf,
"paragraph.",
129 "Here",
"comes",
"some",
"more",
"text",
130 "to",
"demonstrate",
"word",
"wrapping.",
132 const char *words2[] = {
133 "Click",
"here",
"for",
"more..", NULL };
135 for(
int j = 0; words1[j]; j++) {
143 for(
int j = 0; words2[j]; j++) {
144 textblock->
addText(words2[j], linkStyle);
159 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 bool click(Widget *widget, int link, int img, int x, int y, EventButton *event)
Called, when the user has clicked on a link.
virtual bool press(Widget *widget, int link, int img, int x, int y, EventButton *event)
Called, when the user has pressed the mouse button on a link (but not yet released).
virtual bool release(Widget *widget, int link, int img, int x, int y, EventButton *event)
Called, when the user has released the mouse button on a link.
virtual bool enter(Widget *widget, int link, int img, int x, int y)
Called, when a link is entered, left, or the position has changed.
The central class for managing and drawing a widget tree.
void attachView(View *view)
Attach a view to the layout.
void setWidget(Widget *widget)
void connectLink(LinkReceiver *receiver)
static Color * create(Layout *layout, int color)
static Font * create(Layout *layout, FontAttrs *attrs)
static Style * create(StyleAttrs *attrs)
static Style * widgetStyle
static Fl_Window * window
static FltkPlatform * platform
static FltkViewport * viewport
Anything related to Dillo Widget styles is defined here.
@ TEXT_DECORATION_UNDERLINE
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.