24#include <FL/Fl_Window.H>
71int main(
int argc,
char **argv)
76 window =
new Fl_Window(200, 300,
"Dw Find Test");
84 findButton =
new Fl_Button(0, 280, 50, 20,
"Find");
89 resetButton =
new Fl_Button(50, 280, 50, 20,
"Reset");
98 fontAttrs.
name =
"Bitstream Charter";
125 Stack <Textblock> *stack =
new Stack <Textblock> (
false);
126 stack->
push (textblock);
128 for(
int i = 0; i < 10; i++)
129 for(
int j = 0; j < 10; j++) {
134 stack->
push (current);
136 stack->
getTop()->flush ();
138 current = stack->
getTop ();
145 stack->
getTop()->flush ();
153 int errorCode = Fl::run();
A Widget for rendering text blocks, i.e.
void addText(const char *text, size_t len, core::style::Style *style)
Add a word to the page structure.
void addLinebreak(core::style::Style *style)
@ SUCCESS
The next occurrence of the pattern has been found.
@ NOT_FOUND
The patten does not at all occur in the text.
@ RESTART
There is no further occurrence of the pattern, instead, the first occurrence has been selected.
The central class for managing and drawing a widget tree.
void attachView(View *view)
Attach a view to the layout.
FindtextState::Result search(const char *str, bool caseSens, int backwards)
See dw::core::FindtextState::search.
void resetSearch()
See dw::core::FindtextState::resetSearch.
void setWidget(Widget *widget)
static Color * create(Layout *layout, int color)
static Font * create(Layout *layout, FontAttrs *attrs)
static Style * create(StyleAttrs *attrs)
static Style * widgetStyle
static Style * topWidgetStyle
static Fl_Button * resetButton
static Fl_Widget * resultLabel
static void findCallback(Fl_Widget *widget, void *data)
static Fl_Window * window
static FltkPlatform * platform
static Fl_Button * findButton
static FltkViewport * viewport
static void resetCallback(Fl_Widget *widget, void *data)
Anything related to Dillo Widget styles is defined here.
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.
This namespace provides thin wrappers, implemented as C++ templates, to gain type-safety.