aboutsummaryrefslogtreecommitdiff
path: root/dw
diff options
context:
space:
mode:
authorJorge Arellano Cid <jcid@dillo.org>2009-02-09 14:56:31 -0300
committerJorge Arellano Cid <jcid@dillo.org>2009-02-09 14:56:31 -0300
commite32686c10a4f4fe7c34b181845220b5c491f32fb (patch)
treec090052c311a3a1732d03dc17fe357f97437b397 /dw
parent74f64426001a693759e47963f99965e0e6ee847d (diff)
whitespace cleanup: 's/ +$//g'
Diffstat (limited to 'dw')
-rw-r--r--dw/alignedtextblock.cc6
-rw-r--r--dw/bullet.cc2
-rw-r--r--dw/bullet.hh4
-rw-r--r--dw/findtext.cc14
-rw-r--r--dw/findtext.hh10
-rw-r--r--dw/fltkflatview.cc2
-rw-r--r--dw/fltkflatview.hh2
-rw-r--r--dw/fltkimgbuf.cc10
-rw-r--r--dw/fltkplatform.cc6
-rw-r--r--dw/fltkplatform.hh12
-rw-r--r--dw/fltkpreview.cc2
-rw-r--r--dw/fltkui.cc26
-rw-r--r--dw/fltkui.hh18
-rw-r--r--dw/fltkviewbase.cc14
-rw-r--r--dw/fltkviewbase.hh2
-rw-r--r--dw/fltkviewport.cc16
-rw-r--r--dw/fltkviewport.hh4
-rw-r--r--dw/image.cc8
-rw-r--r--dw/image.hh16
-rw-r--r--dw/imgbuf.hh22
-rw-r--r--dw/iterator.cc26
-rw-r--r--dw/iterator.hh20
-rw-r--r--dw/layout.cc42
-rw-r--r--dw/layout.hh8
-rw-r--r--dw/listitem.cc2
-rw-r--r--dw/platform.hh10
-rw-r--r--dw/ruler.cc2
-rw-r--r--dw/ruler.hh4
-rw-r--r--dw/selection.cc4
-rw-r--r--dw/selection.hh48
-rw-r--r--dw/style.cc6
-rw-r--r--dw/style.hh98
-rw-r--r--dw/table.cc24
-rw-r--r--dw/table.hh180
-rw-r--r--dw/tablecell.cc2
-rw-r--r--dw/textblock.cc20
-rw-r--r--dw/textblock.hh76
-rw-r--r--dw/types.cc2
-rw-r--r--dw/types.hh8
-rw-r--r--dw/ui.hh96
-rw-r--r--dw/view.hh6
-rw-r--r--dw/widget.cc12
-rw-r--r--dw/widget.hh16
43 files changed, 454 insertions, 454 deletions
diff --git a/dw/alignedtextblock.cc b/dw/alignedtextblock.cc
index a886aed2..66ce5bb6 100644
--- a/dw/alignedtextblock.cc
+++ b/dw/alignedtextblock.cc
@@ -63,7 +63,7 @@ int AlignedTextblock::CLASS_ID = -1;
AlignedTextblock::AlignedTextblock (bool limitTextWidth):
Textblock (limitTextWidth)
{
- registerName ("dw::AlignedTextblock", &CLASS_ID);
+ registerName ("dw::AlignedTextblock", &CLASS_ID);
}
void AlignedTextblock::setRefTextblock (AlignedTextblock *ref)
@@ -76,7 +76,7 @@ void AlignedTextblock::setRefTextblock (AlignedTextblock *ref)
listPos = list->add (this);
updateValue ();
}
-
+
AlignedTextblock::~AlignedTextblock()
{
list->unref (listPos);
@@ -86,7 +86,7 @@ void AlignedTextblock::updateValue ()
{
if (list) {
list->setValue (listPos, getValue ());
-
+
if (list->getValue (listPos) > list->getMaxValue ()) {
// New value greater than current maximum -> apply it to others.
list->setMaxValue (list->getValue (listPos));
diff --git a/dw/bullet.cc b/dw/bullet.cc
index cc13867c..e3f265eb 100644
--- a/dw/bullet.cc
+++ b/dw/bullet.cc
@@ -21,7 +21,7 @@
#include "bullet.hh"
-
+
#include <stdio.h>
namespace dw {
diff --git a/dw/bullet.hh b/dw/bullet.hh
index 00912bd8..98854abb 100644
--- a/dw/bullet.hh
+++ b/dw/bullet.hh
@@ -15,8 +15,8 @@ class Bullet: public core::Widget
{
protected:
void sizeRequestImpl (core::Requisition *requisition);
- void draw (core::View *view, core::Rectangle *area);
- core::Iterator *iterator (core::Content::Type mask, bool atEnd);
+ void draw (core::View *view, core::Rectangle *area);
+ core::Iterator *iterator (core::Content::Type mask, bool atEnd);
public:
Bullet ();
diff --git a/dw/findtext.cc b/dw/findtext.cc
index eb7dd2c0..ccc41fad 100644
--- a/dw/findtext.cc
+++ b/dw/findtext.cc
@@ -75,7 +75,7 @@ FindtextState::Result FindtextState::search (const char *key, bool caseSens,
bool wasHighlighted = unhighlight ();
bool newKey;
-
+
// If the key (or the widget) changes (including case sensitivity),
// the search is started from the beginning.
if (this->key == NULL || this->caseSens != caseSens ||
@@ -89,7 +89,7 @@ FindtextState::Result FindtextState::search (const char *key, bool caseSens,
if (nexttab)
delete[] nexttab;
nexttab = createNexttab (key, caseSens, backwards);
-
+
if (iterator)
delete iterator;
iterator = new CharIterator (widget);
@@ -149,7 +149,7 @@ void FindtextState::resetSearch ()
if (key)
delete key;
- key = NULL;
+ key = NULL;
}
/*
@@ -221,7 +221,7 @@ bool FindtextState::search0 (bool backwards, bool firstTrial)
{
if (iterator->getChar () == CharIterator::END)
return false;
-
+
bool ret = false;
const char* searchKey = (backwards) ? rev(key) : key;
int j = 0;
@@ -246,7 +246,7 @@ bool FindtextState::search0 (bool backwards, bool firstTrial)
* If n is negative, we have to move backwards, but if it is
* positive, we have to move forward. So, when l>=4, we start moving
* the iterator forward. */
-
+
if (l==1) {
iterator->prev();
iterator->prev();
@@ -262,7 +262,7 @@ bool FindtextState::search0 (bool backwards, bool firstTrial)
/* Particular case where we can't find the last character */
iterator->next();
}
-
+
do {
if (j == -1 || charsEqual (iterator->getChar(),searchKey[j],caseSens)) {
j++;
@@ -270,7 +270,7 @@ bool FindtextState::search0 (bool backwards, bool firstTrial)
} else
j = nexttab[j];
} while (nextit && j < l);
-
+
if (j >= l) {
if (backwards) {
//This is the location of the key
diff --git a/dw/findtext.hh b/dw/findtext.hh
index 83d22bd3..3a4ab2a7 100644
--- a/dw/findtext.hh
+++ b/dw/findtext.hh
@@ -48,19 +48,19 @@ private:
* dw::core::Findtext::widget
*/
Widget *widget;
-
+
/** \brief The position from where the next search will start. */
CharIterator *iterator;
/**
* \brief The position from where the characters are highlighted.
- *
+ *
* NULL, when no text is highlighted.
*/
- CharIterator *hlIterator;
-
+ CharIterator *hlIterator;
+
static const char* rev(const char* _str); /* Function to reverse a C-string */
-
+
static int *createNexttab (const char *needle, bool caseSens, bool backwards);
bool unhighlight ();
bool search0 (bool backwards, bool firstTrial);
diff --git a/dw/fltkflatview.cc b/dw/fltkflatview.cc
index 7f5f88a6..60727c13 100644
--- a/dw/fltkflatview.cc
+++ b/dw/fltkflatview.cc
@@ -52,7 +52,7 @@ void FltkFlatView::setCanvasSize (int width, int ascent, int descent)
#if 0
FltkWidgetView::setCanvasSize (width, ascent, descent);
-
+
w (width);
h (ascent + descent);
#endif
diff --git a/dw/fltkflatview.hh b/dw/fltkflatview.hh
index dee5498f..5106cbdf 100644
--- a/dw/fltkflatview.hh
+++ b/dw/fltkflatview.hh
@@ -22,7 +22,7 @@ protected:
public:
FltkFlatView (int x, int y, int w, int h, const char *label = 0);
~FltkFlatView ();
-
+
void setCanvasSize (int width, int ascent, int descent);
bool usesViewport ();
diff --git a/dw/fltkimgbuf.cc b/dw/fltkimgbuf.cc
index 96164674..233a132b 100644
--- a/dw/fltkimgbuf.cc
+++ b/dw/fltkimgbuf.cc
@@ -123,7 +123,7 @@ inline void FltkImgbuf::scaleRow (int row, const core::byte *data)
{
int sr1 = scaledY (row);
int sr2 = scaledY (row + 1);
-
+
for (int sr = sr1; sr < sr2; sr++) {
// Avoid multiple passes.
if (copiedRows->get(sr)) continue;
@@ -163,7 +163,7 @@ void FltkImgbuf::newScan ()
if (isRoot()) {
for (Iterator<FltkImgbuf> it = scaledBuffers->iterator(); it.hasNext();){
FltkImgbuf *sb = it.getNext ();
- sb->copiedRows->clear();
+ sb->copiedRows->clear();
}
}
}
@@ -172,7 +172,7 @@ core::Imgbuf* FltkImgbuf::getScaledBuf (int width, int height)
{
if (!isRoot())
return root->getScaledBuf (width, height);
-
+
if (width == this->width && height == this->height) {
ref ();
return this;
@@ -265,7 +265,7 @@ void FltkImgbuf::unref ()
bool FltkImgbuf::lastReference ()
{
- return refCount == 1 &&
+ return refCount == 1 &&
(scaledBuffers == NULL || scaledBuffers->isEmpty ());
}
@@ -311,7 +311,7 @@ void FltkImgbuf::draw (::fltk::Widget *target, int xRoot, int yRoot,
height = this->height - y;
}
- // Draw
+ // Draw
::fltk::Rectangle rect (xRoot + x, yRoot + y, width, height);
PixelType ptype = (type == RGBA) ? ::fltk::RGBA : ::fltk::RGB;
drawimage(rawdata+bpp*(y*this->width + x),ptype,rect,bpp*this->width);
diff --git a/dw/fltkplatform.cc b/dw/fltkplatform.cc
index 64229155..229fbcfa 100644
--- a/dw/fltkplatform.cc
+++ b/dw/fltkplatform.cc
@@ -60,7 +60,7 @@ FltkFont::FltkFont (core::style::FontAttrs *attrs)
* means mono, and fltk::TIMES means serif.
*/
font = HELVETICA->plus (fa);
- }
+ }
setfont(font, size);
spaceWidth = (int)getwidth(" ");
@@ -141,7 +141,7 @@ FltkColor * FltkColor::create (int col)
colorsTable->put (color, color);
}
- return color;
+ return color;
}
void FltkView::addFltkWidget (::fltk::Widget *widget,
@@ -320,7 +320,7 @@ void FltkPlatform::generalIdle ()
/* Execute the first function in the list. */
idleFunc = idleQueue->getFirst ();
(layout->*(idleFunc->func)) ();
-
+
/* Remove this function. */
idleQueue->removeRef(idleFunc);
}
diff --git a/dw/fltkplatform.hh b/dw/fltkplatform.hh
index 238af582..253f1bbd 100644
--- a/dw/fltkplatform.hh
+++ b/dw/fltkplatform.hh
@@ -24,7 +24,7 @@ class FltkFont: public core::style::Font
public:
::fltk::Font *font;
-
+
static FltkFont *create (core::style::FontAttrs *attrs);
};
@@ -119,24 +119,24 @@ public:
~FltkPlatform ();
void setLayout (core::Layout *layout);
-
+
void attachView (core::View *view);
void detachView (core::View *view);
-
+
int textWidth (core::style::Font *font, const char *text, int len);
int nextGlyph (const char *text, int idx);
int prevGlyph (const char *text, int idx);
float dpiX ();
float dpiY ();
-
+
int addIdle (void (core::Layout::*func) ());
void removeIdle (int idleId);
-
+
core::style::Font *createFont (core::style::FontAttrs *attrs,
bool tryEverything);
core::style::Color *createColor (int color);
-
+
core::Imgbuf *createImgbuf (core::Imgbuf::Type type, int width, int height);
void copySelection(const char *text);
diff --git a/dw/fltkpreview.cc b/dw/fltkpreview.cc
index 3c383638..181ad05e 100644
--- a/dw/fltkpreview.cc
+++ b/dw/fltkpreview.cc
@@ -288,7 +288,7 @@ int FltkPreviewButton::handle (int event)
case RELEASE:
window->hideWindow ();
return Button::handle (event);
-
+
default:
return Button::handle (event);
}
diff --git a/dw/fltkui.cc b/dw/fltkui.cc
index d1a2c074..8c7ebcf3 100644
--- a/dw/fltkui.cc
+++ b/dw/fltkui.cc
@@ -100,7 +100,7 @@ void FltkResource::attachView (FltkView *view)
if (view->usesFltkWidgets ()) {
ViewAndWidget *viewAndWidget = new ViewAndWidget();
viewAndWidget->view = view;
-
+
viewAndWidget->widget = createNewWidget (&allocation);
viewAndWidget->view->addFltkWidget (viewAndWidget->widget, &allocation);
viewsAndWidgets->append (viewAndWidget);
@@ -323,7 +323,7 @@ static core::ButtonState getDwButtonState ()
{
int s1 = ::fltk::event_state ();
int s2 = (core::ButtonState)0;
-
+
if (s1 & ::fltk::SHIFT) s2 |= core::SHIFT_MASK;
if (s1 & ::fltk::CTRL) s2 |= core::CONTROL_MASK;
if (s1 & ::fltk::ALT) s2 |= core::META_MASK;
@@ -496,7 +496,7 @@ int FltkComplexButtonResource::reliefYThickness ()
if (!relief)
button->box(::fltk::FLAT_BOX);
- FltkFlatView *flatView =
+ FltkFlatView *flatView =
new FltkFlatView (allocation->x + reliefXThickness (),
allocation->y + reliefYThickness (),
allocation->width - 2 * reliefXThickness (),
@@ -514,13 +514,13 @@ int FltkComplexButtonResource::reliefYThickness ()
// ----------------------------------------------------------------------
FltkEntryResource::FltkEntryResource (FltkPlatform *platform, int maxLength,
- bool password, const char *label):
+ bool password, const char *label):
FltkSpecificResource <dw::core::ui::EntryResource> (platform)
{
this->maxLength = maxLength;
this->password = password;
this->label = label ? strdup(label) : NULL;
-
+
initText = NULL;
editable = false;
@@ -636,7 +636,7 @@ void FltkEntryResource::setEditable (bool editable)
// ----------------------------------------------------------------------
FltkMultiLineTextResource::FltkMultiLineTextResource (FltkPlatform *platform,
- int cols, int rows):
+ int cols, int rows):
FltkSpecificResource <dw::core::ui::MultiLineTextResource> (platform)
{
buffer = new ::fltk::TextBuffer;
@@ -726,7 +726,7 @@ void FltkMultiLineTextResource::setEditable (bool editable)
template <class I>
FltkToggleButtonResource<I>::FltkToggleButtonResource (FltkPlatform *platform,
bool activated):
- FltkSpecificResource <I> (platform)
+ FltkSpecificResource <I> (platform)
{
initActivated = activated;
}
@@ -815,7 +815,7 @@ FltkCheckButtonResource::~FltkCheckButtonResource ()
::fltk::Button *FltkCheckButtonResource::createNewButton (core::Allocation
- *allocation)
+ *allocation)
{
::fltk::CheckButton *cb =
new ::fltk::CheckButton (allocation->x, allocation->y, allocation->width,
@@ -854,7 +854,7 @@ FltkRadioButtonResource::Group::~Group ()
{
delete list;
}
-
+
void FltkRadioButtonResource::Group::connect (FltkRadioButtonResource
*radioButtonResource)
{
@@ -915,7 +915,7 @@ void FltkRadioButtonResource::buttonClicked ()
}
::fltk::Button *FltkRadioButtonResource::createNewButton (core::Allocation
- *allocation)
+ *allocation)
{
/*
* Groups of fltk::RadioButton must be added to one fltk::Group, which is
@@ -1104,7 +1104,7 @@ template <class I> void FltkSelectionResource<I>::addItem (const char *str,
}
}
}
-
+
template <class I> void FltkSelectionResource<I>::pushGroup (const char *name,
bool enabled)
{
@@ -1202,7 +1202,7 @@ void FltkOptionMenuResource::sizeRequest (core::Requisition *requisition)
requisition->width = 1;
requisition->ascent = 1;
requisition->descent = 0;
- }
+ }
}
void FltkOptionMenuResource::addItem (const char *str,
@@ -1296,7 +1296,7 @@ void FltkListResource::sizeRequest (core::Requisition *requisition)
requisition->width = 1;
requisition->ascent = 1;
requisition->descent = 0;
- }
+ }
}
bool FltkListResource::isSelected (int index)
diff --git a/dw/fltkui.hh b/dw/fltkui.hh
index 77c8a7b0..68cb4923 100644
--- a/dw/fltkui.hh
+++ b/dw/fltkui.hh
@@ -27,7 +27,7 @@ using namespace lout;
* edge [arrowhead="none", arrowtail="empty", labelfontname=Helvetica,
* labelfontsize=10, color="#404040", labelfontcolor="#000080"];
* fontname=Helvetica; fontsize=10;
- *
+ *
* subgraph cluster_core {
* style="dashed"; color="#000080"; fontname=Helvetica; fontsize=10;
* label="dw::core::ui";
@@ -79,7 +79,7 @@ using namespace lout;
* edge [arrowhead="none", arrowtail="empty", labelfontname=Helvetica,
* labelfontsize=10, color="#404040", labelfontcolor="#000080"];
* fontname=Helvetica; fontsize=10;
- *
+ *
* subgraph cluster_core {
* style="dashed"; color="#000080"; fontname=Helvetica; fontsize=10;
* label="dw::core::ui";
@@ -120,7 +120,7 @@ using namespace lout;
* edge [arrowhead="none", arrowtail="empty", labelfontname=Helvetica,
* labelfontsize=10, color="#404040", labelfontcolor="#000080"];
* fontname=Helvetica; fontsize=10;
- *
+ *
* subgraph cluster_core {
* style="dashed"; color="#000080"; fontname=Helvetica; fontsize=10;
* label="dw::core::ui";
@@ -202,7 +202,7 @@ public:
virtual void attachView (FltkView *view);
virtual void detachView (FltkView *view);
-
+
void sizeAllocate (core::Allocation *allocation);
void draw (core::View *view, core::Rectangle *area);
@@ -276,7 +276,7 @@ protected:
dw::core::Platform *createPlatform ();
void setLayout (dw::core::Layout *layout);
-
+
int reliefXThickness ();
int reliefYThickness ();
@@ -356,7 +356,7 @@ private:
protected:
virtual ::fltk::Button *createNewButton (core::Allocation *allocation) = 0;
::fltk::Widget *createNewWidget (core::Allocation *allocation);
-
+
public:
FltkToggleButtonResource (FltkPlatform *platform,
bool activated);
@@ -413,7 +413,7 @@ private:
public:
Group (FltkRadioButtonResource *radioButtonResource);
-
+
inline container::typed::Iterator <FltkRadioButtonResource> iterator ()
{
return list->iterator ();
@@ -496,10 +496,10 @@ public:
FltkSelectionResource (FltkPlatform *platform);
~FltkSelectionResource ();
- dw::core::Iterator *iterator (dw::core::Content::Type mask, bool atEnd);
+ dw::core::Iterator *iterator (dw::core::Content::Type mask, bool atEnd);
void addItem (const char *str, bool enabled, bool selected);
-
+
void pushGroup (const char *name, bool enabled);
void popGroup ();
diff --git a/dw/fltkviewbase.cc b/dw/fltkviewbase.cc
index ae43b352..14984a3c 100644
--- a/dw/fltkviewbase.cc
+++ b/dw/fltkviewbase.cc
@@ -115,7 +115,7 @@ void FltkViewBase::draw (const core::Rectangle *rect,
translateCanvasXToViewX (rect->x) + offsetX,
translateCanvasYToViewY (rect->y) + offsetY,
rect->width, rect->height);
-
+
::fltk::intersect_with_clip (viewRect);
viewRect.x (viewRect.x () - offsetX);
@@ -135,7 +135,7 @@ void FltkViewBase::draw (const core::Rectangle *rect,
backBuffer->setsize (viewRect.w (), viewRect.h ());
backBuffer->make_current ();
- translate (-viewRect.x (), -viewRect.y ());
+ translate (-viewRect.x (), -viewRect.y ());
setcolor (bgColor);
fillrect (viewRect);
@@ -177,7 +177,7 @@ core::ButtonState getDwButtonState ()
{
int s1 = event_state ();
int s2 = (core::ButtonState)0;
-
+
if (s1 & SHIFT) s2 |= core::SHIFT_MASK;
if (s1 & CTRL) s2 |= core::CONTROL_MASK;
if (s1 & ALT) s2 |= core::META_MASK;
@@ -193,7 +193,7 @@ int FltkViewBase::handle (int event)
bool processed;
/**
- * \todo Consider, whether this from the FLTK documentation has any
+ * \todo Consider, whether this from the FLTK documentation has any
* impacts: "To receive fltk::RELEASE events you must return non-zero
* when passed a fltk::PUSH event. "
*/
@@ -249,7 +249,7 @@ int FltkViewBase::handle (int event)
case LEAVE:
theLayout->leaveNotify (this, getDwButtonState ());
return Group::handle (event);
-
+
default:
return Group::handle (event);
}
@@ -410,7 +410,7 @@ void FltkViewBase::drawPolygon (core::style::Color *color,
fillpath();
else
strokepath();
- }
+ }
}
core::View *FltkViewBase::getClippingView (int x, int y, int width, int height)
@@ -439,7 +439,7 @@ FltkWidgetView::~FltkWidgetView ()
void FltkWidgetView::layout () {
/**
- * pass layout to child widgets. This is needed for complex fltk
+ * pass layout to child widgets. This is needed for complex fltk
* widgets as TextEditor.
* We can't use Group::layout() as that would rearrange the widgets.
*/
diff --git a/dw/fltkviewbase.hh b/dw/fltkviewbase.hh
index 4c1f98d8..3bdb1666 100644
--- a/dw/fltkviewbase.hh
+++ b/dw/fltkviewbase.hh
@@ -79,7 +79,7 @@ class FltkWidgetView: public FltkViewBase
public:
FltkWidgetView (int x, int y, int w, int h, const char *label = 0);
~FltkWidgetView ();
-
+
void layout();
void drawText (core::style::Font *font,
diff --git a/dw/fltkviewport.cc b/dw/fltkviewport.cc
index 8e3eea71..53b22029 100644
--- a/dw/fltkviewport.cc
+++ b/dw/fltkviewport.cc
@@ -157,7 +157,7 @@ void FltkViewport::layout ()
{
theLayout->viewportSizeChanged (this, w(), h());
adjustScrollbarsAndGadgetsAllocation ();
-
+
FltkWidgetView::layout ();
}
@@ -206,8 +206,8 @@ void FltkViewport::draw ()
}
}
- scrollDX = 0;
- scrollDY = 0;
+ scrollDX = 0;
+ scrollDY = 0;
}
int FltkViewport::handle (int event)
@@ -262,12 +262,12 @@ int FltkViewport::handle (int event)
case ::fltk:: MOUSEWHEEL:
return (event_dx() ? hscrollbar : vscrollbar)->handle(event);
break;
-
+
case ::fltk::RELEASE:
if (::fltk::event_button() == ::fltk::MiddleButton) {
dragScrolling = 0;
setCursor (core::style::CURSOR_DEFAULT);
- }
+ }
break;
case ::fltk::ENTER:
@@ -362,7 +362,7 @@ void FltkViewport::positionChanged ()
/*
* For scrollbars, this currently sets the same step to both vertical and
* horizontal. It may me differentiated if necessary.
- */
+ */
void FltkViewport::setScrollStep(int step)
{
vscrollbar->linesize(step);
@@ -443,8 +443,8 @@ void FltkViewport::updateCanvasWidgets (int dx, int dy)
// scroll all child widgets except scroll bars
for (int i = children () - 1; i > 0; i--) {
::fltk::Widget *widget = child (i);
-
- if (widget == hscrollbar || widget == vscrollbar)
+
+ if (widget == hscrollbar || widget == vscrollbar)
continue;
widget->x (widget->x () - dx);
diff --git a/dw/fltkviewport.hh b/dw/fltkviewport.hh
index 6af377d4..0e53c5be 100644
--- a/dw/fltkviewport.hh
+++ b/dw/fltkviewport.hh
@@ -26,7 +26,7 @@ private:
::fltk::Scrollbar *vscrollbar, *hscrollbar;
GadgetOrientation gadgetOrientation[4];
- container::typed::List <object::TypedPointer < ::fltk::Widget> > *gadgets;
+ container::typed::List <object::TypedPointer < ::fltk::Widget> > *gadgets;
void adjustScrollbarsAndGadgetsAllocation ();
void adjustScrollbarValues ();
@@ -49,7 +49,7 @@ protected:
public:
FltkViewport (int x, int y, int w, int h, const char *label = 0);
~FltkViewport ();
-
+
void layout();
void draw ();
int handle (int event);
diff --git a/dw/image.cc b/dw/image.cc
index 82fe7252..091292fc 100644
--- a/dw/image.cc
+++ b/dw/image.cc
@@ -232,7 +232,7 @@ void Image::enterNotifyImpl (core::EventCrossing *event)
}
void Image::leaveNotifyImpl (core::EventCrossing *event)
-{
+{
clicking = false;
if (currLink != -1) {
@@ -273,7 +273,7 @@ bool Image::buttonPressImpl (core::EventButton *event)
ret = true;
}
return ret;
-}
+}
bool Image::buttonReleaseImpl (core::EventButton *event)
{
@@ -314,7 +314,7 @@ void Image::draw (core::View *view, core::Rectangle *area)
if (altTextWidth == -1)
altTextWidth =
layout->textWidth (getStyle()->font, altText, strlen (altText));
-
+
core::View *clippingView = NULL, *usedView = view;
if (allocation.width < altTextWidth ||
allocation.ascent < getStyle()->font->ascent ||
@@ -375,7 +375,7 @@ void Image::drawRow (int row)
core::Rectangle area;
assert (buffer != NULL);
-
+
buffer->getRowArea (row, &area);
if (area.width && area.height)
queueDrawArea (area.x + getStyle()->boxOffsetX (),
diff --git a/dw/image.hh b/dw/image.hh
index 37c27e0d..054ba777 100644
--- a/dw/image.hh
+++ b/dw/image.hh
@@ -38,7 +38,7 @@ private:
public:
ImageMap ();
~ImageMap ();
-
+
void add (core::Shape *shape, int link);
void setDefaultLink (int link) { defaultLink = link; };
int link (int x, int y);
@@ -47,7 +47,7 @@ private:
lout::container::typed::HashTable <lout::object::Object, ImageMap>
*imageMaps;
ImageMap *currentMap;
-
+
public:
ImageMapsList ();
~ImageMapsList ();
@@ -90,7 +90,7 @@ public:
* dw::ImageMapsList::addShapeToCurrentMap adds a shape to the current
* map. The \em link argument is a number, which is later passed to
* the dw::core::Widget::LinkReceiver.
- *
+ *
* This map list is then, together with the key for the image, passed to
* dw::Image::setUseMap. For HTML, a URL with the value of the "ismap"
* attribute of \<IMG\> should be used.
@@ -103,9 +103,9 @@ public:
* Currently, only maps defined in the same document as the image may be
* used, since the dw::ImageMapsList is stored in the HTML link block, and
* contains only the image maps defined in the document.
- *
+ *
* <h4>Server Side %Image Maps</h4>
- *
+ *
* To use images for server side image maps, you must call
* dw::Image::setIsMap, and the dw::Image::style must contain a valid link
* (dw::core::style::Style::x_link). After this, motions and clicks are
@@ -129,7 +129,7 @@ protected:
void sizeRequestImpl (core::Requisition *requisition);
void sizeAllocateImpl (core::Allocation *allocation);
- void draw (core::View *view, core::Rectangle *area);
+ void draw (core::View *view, core::Rectangle *area);
bool buttonPressImpl (core::EventButton *event);
bool buttonReleaseImpl (core::EventButton *event);
@@ -137,7 +137,7 @@ protected:
void leaveNotifyImpl (core::EventCrossing *event);
bool motionNotifyImpl (core::EventMotion *event);
- //core::Iterator *iterator (Content::Type mask, bool atEnd);
+ //core::Iterator *iterator (Content::Type mask, bool atEnd);
public:
static int CLASS_ID;
@@ -145,7 +145,7 @@ public:
Image(const char *altText);
~Image();
- core::Iterator *iterator (core::Content::Type mask, bool atEnd);
+ core::Iterator *iterator (core::Content::Type mask, bool atEnd);
inline core::Imgbuf *getBuffer () { return buffer; }
void setBuffer (core::Imgbuf *buffer, bool resize = false);
diff --git a/dw/imgbuf.hh b/dw/imgbuf.hh
index 8948bbef..43320aeb 100644
--- a/dw/imgbuf.hh
+++ b/dw/imgbuf.hh
@@ -53,16 +53,16 @@ using namespace lout;
*
*
* <h3>Scaling</h3>
- *
+ *
* The buffer with the original size, which was created by
* dw::core::Platform::createImgbuf, is called root buffer. Imgbuf provides
* the ability to scale buffers. Generally, both root buffers, as well as
* scaled buffers, may be shared, memory management is done by reference
* counters.
- *
+ *
* Via dw::core::Imgbuf::getScaledBuf, you can retrieve a scaled buffer.
* Generally, something like this must work always, in an efficient way:
- *
+ *
* \code
* dw::core::Imgbuf *curBuf, *oldBuf;
* int width, heigt,
@@ -71,15 +71,15 @@ using namespace lout;
* curBuf = oldBuf->getScaledBuf(oldBuf, width, height);
* oldBuf->unref();
* \endcode
- *
+ *
* \em oldBuf may both be a root buffer, or a scaled buffer.
- *
+ *
* The root buffer keeps a list of all children, and all methods
* operating on the image data (dw::core::Imgbuf::copyRow and
* dw::core::Imgbuf::setCMap) are delegated to the scaled buffers, when
* processed, and inherited, when a new scaled buffer is created. This
* means, that they must only be performed for the root buffer.
- *
+ *
* A possible implementation could be (dw::fltk::FltkImgbuf does it this way):
*
* <ul>
@@ -92,7 +92,7 @@ using namespace lout;
* <li> Otherwise, if this buffer has already been scaled to the given
* size, return this scaled buffer, with an increased reference
* counter.
- *
+ *
* <li> Otherwise, return a new scaled buffer with reference counter 1.
* </ul>
*
@@ -120,7 +120,7 @@ using namespace lout;
* \code
* dw::fltk::FltkPlatform *platform = new dw::fltk::FltkPlatform ();
* dw::core::Layout *layout = new dw::core::Layout (platform);
- *
+ *
* dw::core::Imgbuf *rootbuf =
* layout->createImgbuf (dw::core::Imgbuf::RGB, 100, 100);
* dw::core::Imgbuf *scaledbuf = rootbuf->getScaledBuf (50, 50);
@@ -133,12 +133,12 @@ using namespace lout;
* the scaled buffer, it is deleted, and after it, the root buffer.
*
* <h3>Drawing</h3>
- *
+ *
* dw::core::Imgbuf provides no methods for drawing, instead, this is
* done by the views (implementation of dw::core::View).
*
* There are two situations, when drawing is necessary:
- *
+ *
* <ol>
* <li> To react on expose events, the function dw::core::View::drawImage
* should be used, with the following parameters:
@@ -149,7 +149,7 @@ using namespace lout;
* <li> the region within the image, which should be displayed (\em x,
* \em y, \em width, \em height).
* </ul>
- *
+ *
* <li> When a row has been copied, it has to be drawn. To determine the
* area, which has to be drawn, the dw::core::Imgbuf::getRowArea
* should be used. The result can then passed
diff --git a/dw/iterator.cc b/dw/iterator.cc
index 41c2c444..f9ecc750 100644
--- a/dw/iterator.cc
+++ b/dw/iterator.cc
@@ -159,7 +159,7 @@ void Iterator::scrollTo (Iterator *it1, Iterator *it2, int start, int end,
// |----------|
// width
//
-
+
/** \todo Changes in the viewport size, until the idle function is
* called, are not regarded. */
@@ -468,7 +468,7 @@ DeepIterator::DeepIterator (Iterator *it)
// since an DeepIterator should never return widgets.
if (it->getContent()->type == Content::WIDGET) {
Iterator *it2;
-
+
// The second argument of searchDownward is actually a matter of
// taste :-)
if ((it2 = searchDownward (it, mask, false)) ||
@@ -484,7 +484,7 @@ DeepIterator::DeepIterator (Iterator *it)
hasContents = false;
}
}
-
+
//DEBUG_MSG (1, " => %s\n", a_Dw_iterator_text (it));
if (hasContents) {
@@ -509,7 +509,7 @@ DeepIterator::DeepIterator (Iterator *it)
break;
}
}
-
+
stack.put (it, thisLevel);
content = *(it->getContent());
}
@@ -552,10 +552,10 @@ int DeepIterator::compareTo (misc::Comparable *other)
while (stack.get(level)->getWidget ()
!= otherDeepIterator->stack.get(level)->getWidget ())
level--;
-
+
return stack.get(level)->compareTo (otherDeepIterator->stack.get(level));
}
-
+
DeepIterator *DeepIterator::createVariant(Iterator *it)
{
/** \todo Not yet implemented, and actually not yet needed very much. */
@@ -574,7 +574,7 @@ bool DeepIterator::isEmpty () {
bool DeepIterator::next ()
{
Iterator *it = stack.getTop ();
-
+
if (it->next ()) {
if (it->getContent()->type == Content::WIDGET) {
// Widget: new iterator on stack, to search in this widget.
@@ -596,7 +596,7 @@ bool DeepIterator::next ()
content.type = Content::END;
return false;
}
- }
+ }
}
/**
@@ -607,7 +607,7 @@ bool DeepIterator::next ()
bool DeepIterator::prev ()
{
Iterator *it = stack.getTop ();
-
+
if (it->prev ()) {
if (it->getContent()->type == Content::WIDGET) {
// Widget: new iterator on stack, to search in this widget.
@@ -629,7 +629,7 @@ bool DeepIterator::prev ()
content.type = Content::START;
return false;
}
- }
+ }
}
// -----------------
@@ -708,9 +708,9 @@ bool CharIterator::next ()
return next ();
}
}
-
+
return true;
- }
+ }
}
bool CharIterator::prev ()
@@ -746,7 +746,7 @@ bool CharIterator::prev ()
pos--;
ch = it->getContent()->text[pos];
return true;
- }
+ }
}
void CharIterator::highlight (CharIterator *it1, CharIterator *it2,
diff --git a/dw/iterator.hh b/dw/iterator.hh
index 605217ec..1d4c2f98 100644
--- a/dw/iterator.hh
+++ b/dw/iterator.hh
@@ -65,7 +65,7 @@ public:
/**
* \brief Shrink highlighted region to no longer contain the
* current content.
- *
+ *
* The direction parameter indicates whether the highlighted region should be
* reduced from the start (direction > 0) or from the end (direction < 0).
* If direction is 0 all content is unhighlighted.
@@ -80,7 +80,7 @@ public:
* DwIterator::highlight().
*/
virtual void getAllocation (int start, int end, Allocation *allocation) = 0;
-
+
inline Iterator *cloneIterator () { return (Iterator*)clone(); }
static void scrollTo (Iterator *it1, Iterator *it2, int start, int end,
@@ -96,10 +96,10 @@ class EmptyIterator: public Iterator
{
private:
EmptyIterator (EmptyIterator &it);
-
+
public:
EmptyIterator (Widget *widget, Content::Type mask, bool atEnd);
-
+
object::Object *clone();
int compareTo(misc::Comparable *other);
bool next ();
@@ -119,13 +119,13 @@ class TextIterator: public Iterator
private:
/** May be NULL, in this case, the next is skipped. */
const char *text;
-
+
TextIterator (TextIterator &it);
-
+
public:
TextIterator (Widget *widget, Content::Type mask, bool atEnd,
const char *text);
-
+
int compareTo(misc::Comparable *other);
bool next ();
@@ -168,14 +168,14 @@ private:
inline DeepIterator () { }
-public:
+public:
DeepIterator(Iterator *it);
~DeepIterator();
object::Object *clone ();
DeepIterator *createVariant(Iterator *it);
- inline Iterator *getTopIterator () { return stack.getTop(); }
+ inline Iterator *getTopIterator () { return stack.getTop(); }
inline Content *getContent () { return &content; }
bool isEmpty ();
@@ -188,7 +188,7 @@ public:
/**
* \brief Highlight a part of the current content.
*
- * Unhighlight the current content by passing -1 as start (see also
+ * Unhighlight the current content by passing -1 as start (see also
* (dw::core::Iterator::unhighlight). For text, start and end define the
* characters, otherwise, the shape is defined as [0, 1], i.e. for
* highlighting a whole dw::core::Content, pass 0 and >= 1.
diff --git a/dw/layout.cc b/dw/layout.cc
index e7d7d913..c9856d58 100644
--- a/dw/layout.cc
+++ b/dw/layout.cc
@@ -55,7 +55,7 @@ bool Layout::Emitter::emitToReceiver (lout::signal::Receiver *receiver,
misc::assertNotReached ();
}
- return false;
+ return false;
}
void Layout::Emitter::emitCanvasSizeChanged (int width,
@@ -88,7 +88,7 @@ Layout::Layout (Platform *platform)
cursor = style::CURSOR_DEFAULT;
canvasWidth = canvasAscent = canvasDescent = 0;
-
+
usesViewport = false;
scrollX = scrollY = 0;
viewportWidth = viewportHeight = 0;
@@ -250,7 +250,7 @@ void Layout::detachView (View *view)
}
/**
- * \brief Scrolls all viewports, so that the region [x, y, width, height]
+ * \brief Scrolls all viewports, so that the region [x, y, width, height]
* is seen, according to hpos and vpos.
*/
void Layout::scrollTo (HPosition hpos, VPosition vpos,
@@ -273,12 +273,12 @@ void Layout::scrollTo0 (HPosition hpos, VPosition vpos,
scrollTargetY = y;
scrollTargetWidth = width;
scrollTargetHeight = height;
-
+
if (scrollIdleId == -1) {
scrollIdleId = platform->addIdle (&Layout::scrollIdle);
scrollIdleNotInterrupted = true;
}
-
+
scrollIdleNotInterrupted =
scrollIdleNotInterrupted || !scrollingInterrupted;
}
@@ -452,7 +452,7 @@ char *Layout::addAnchor (Widget *widget, const char* name, int y)
void Layout::changeAnchor (Widget *widget, char* name, int y)
{
- String key (name);
+ String key (name);
Anchor *anchor = anchorsTable->get (&key);
assert (anchor);
assert (anchor->widget == widget);
@@ -490,7 +490,7 @@ void Layout::setCursor (style::Cursor cursor)
{
if (cursor != this->cursor) {
this->cursor = cursor;
-
+
for (typed::Iterator <View> it = views->iterator (); it.hasNext (); ) {
View *view = it.getNext ();
view->setCursor (cursor);
@@ -566,7 +566,7 @@ void Layout::resizeIdle ()
(canvasAscent + canvasDescent > viewportHeight) ?
vScrollbarThickness : 0;
- if (!canvasHeightGreater &&
+ if (!canvasHeightGreater &&
canvasAscent + canvasDescent
> viewportHeight - actualHScrollbarThickness) {
canvasHeightGreater = true;
@@ -594,7 +594,7 @@ void Layout::resizeIdle ()
}
void Layout::setSizeHints ()
-{
+{
if (topLevel) {
topLevel->setWidth (viewportWidth
- (canvasHeightGreater ? vScrollbarThickness : 0));
@@ -625,15 +625,15 @@ void Layout::queueDrawExcept (int x, int y, int width, int height,
if (x == ex && y == ey && width == ewidth && height == eheight)
return;
-
+
// queueDraw() the four rectangles within rectangle (x, y, width, height)
// around rectangle (ex, ey, ewidth, eheight).
// Some or all of these may be empty.
- // upper left corner of the intersection rectangle
+ // upper left corner of the intersection rectangle
int ix1 = misc::max (x, ex);
int iy1 = misc::max (y, ey);
- // lower right corner of the intersection rectangle
+ // lower right corner of the intersection rectangle
int ix2 = misc::min (x + width, ex + ewidth);
int iy2 = misc::min (y + height, ey + eheight);
@@ -661,10 +661,10 @@ void Layout::queueResize ()
bool Layout::buttonEvent (ButtonEventType type, View *view, int numPressed,
int x, int y, ButtonState state, int button)
-
+
{
EventButton event;
-
+
moveToWidgetAtPoint (x, y, state);
event.xCanvas = x;
@@ -672,7 +672,7 @@ bool Layout::buttonEvent (ButtonEventType type, View *view, int numPressed,
event.state = state;
event.button = button;
event.numPressed = numPressed;
-
+
return processMouseEvent (&event, type, true);
}
@@ -685,13 +685,13 @@ bool Layout::buttonEvent (ButtonEventType type, View *view, int numPressed,
bool Layout::motionNotify (View *view, int x, int y, ButtonState state)
{
EventButton event;
-
+
moveToWidgetAtPoint (x, y, state);
event.xCanvas = x;
event.yCanvas = y;
event.state = state;
-
+
return processMouseEvent (&event, MOTION_NOTIFY, true);
}
@@ -763,7 +763,7 @@ void Layout::moveToWidget (Widget *newWidgetAtPoint, ButtonState state)
EventCrossing crossingEvent;
if (newWidgetAtPoint != widgetAtPoint) {
- // The mouse pointer has been moved into another widget.
+ // The mouse pointer has been moved into another widget.
if (newWidgetAtPoint && widgetAtPoint)
ancestor =
newWidgetAtPoint->getNearestCommonAncestor (widgetAtPoint);
@@ -803,13 +803,13 @@ void Layout::moveToWidget (Widget *newWidgetAtPoint, ButtonState state)
crossingEvent.state = state;
crossingEvent.currentWidget = widgetAtPoint; // ???
crossingEvent.lastWidget = widgetAtPoint; // ???
-
+
if (i != 0)
track[i]->enterNotify (&crossingEvent);
if (i != trackLen - 1)
track[i]->leaveNotify (&crossingEvent);
}
-
+
delete[] track;
widgetAtPoint = newWidgetAtPoint;
@@ -862,7 +862,7 @@ void Layout::scrollPosChanged (View *view, int x, int y)
if (x != scrollX || y != scrollY) {
scrollX = x;
scrollY = y;
-
+
// Tell all views about the scrolling position, except the caller.
for (container::typed::Iterator <View> it = views->iterator ();
it.hasNext (); ) {
diff --git a/dw/layout.hh b/dw/layout.hh
index b66d653f..a4214220 100644
--- a/dw/layout.hh
+++ b/dw/layout.hh
@@ -70,7 +70,7 @@ private:
int scrollX, scrollY, viewportWidth, viewportHeight;
bool canvasHeightGreater;
int hScrollbarThickness, vScrollbarThickness;
-
+
HPosition scrollTargetHpos;
VPosition scrollTargetVpos;
int scrollTargetX, scrollTargetY, scrollTargetWidth, scrollTargetHeight;
@@ -136,13 +136,13 @@ private:
int ex, int ey, int ewidth, int eheight);
void queueResize ();
void removeWidget ();
-
+
public:
Layout (Platform *platform);
~Layout ();
misc::ZoneAllocator *textZone;
-
+
void addWidget (Widget *widget);
void setWidget (Widget *widget);
@@ -168,7 +168,7 @@ public:
/**
* \brief This function is called by a view, to delegate a button press
* event.
- *
+ *
* \em numPressed is 1 for simple presses, 2 for double presses etc. (more
* that 2 is never needed), \em x and \em y the world coordinates, and
* \em button the number of the button pressed.
diff --git a/dw/listitem.cc b/dw/listitem.cc
index c31690a5..6e574518 100644
--- a/dw/listitem.cc
+++ b/dw/listitem.cc
@@ -49,7 +49,7 @@ void ListItem::initWithWidget (core::Widget *widget,
void ListItem::initWithText (const char *text, core::style::Style *style)
{
addText (text, style);
- addSpace (style);
+ addSpace (style);
updateValue ();
}
diff --git a/dw/platform.hh b/dw/platform.hh
index 156a602a..e1aec83c 100644
--- a/dw/platform.hh
+++ b/dw/platform.hh
@@ -27,7 +27,7 @@ public:
* a layout.
*/
virtual void setLayout (Layout *layout) = 0;
-
+
/*
* -------------------------
* Operations on views
@@ -45,7 +45,7 @@ public:
* from the related layout.
*/
virtual void detachView (View *view) = 0;
-
+
/*
* -----------------------------------
* Platform dependant properties
@@ -76,7 +76,7 @@ public:
* \brief Return screen resolution in y-direction.
*/
virtual float dpiY () = 0;
-
+
/*
* ---------------------------------------------------------
* These are to encapsulate some platform dependencies
@@ -85,7 +85,7 @@ public:
/**
* \brief Add an idle function.
- *
+ *
* An idle function is called once, when no other
* tasks are to be done (e.g. there are no events to process), and then
* removed from the queue. The return value is a number, which can be
@@ -118,7 +118,7 @@ public:
*/
virtual style::Font *createFont (style::FontAttrs *attrs,
bool tryEverything) = 0;
-
+
/**
* \brief Create a color resource for a given 0xrrggbb value.
*/
diff --git a/dw/ruler.cc b/dw/ruler.cc
index abefa1bf..d47ddd68 100644
--- a/dw/ruler.cc
+++ b/dw/ruler.cc
@@ -22,7 +22,7 @@
#include "ruler.hh"
#include "../lout/misc.hh"
-
+
#include <stdio.h>
namespace dw {
diff --git a/dw/ruler.hh b/dw/ruler.hh
index a1ae67ea..32e859a1 100644
--- a/dw/ruler.hh
+++ b/dw/ruler.hh
@@ -17,12 +17,12 @@ class Ruler: public core::Widget
{
protected:
void sizeRequestImpl (core::Requisition *requisition);
- void draw (core::View *view, core::Rectangle *area);
+ void draw (core::View *view, core::Rectangle *area);
public:
Ruler ();
- core::Iterator *iterator (core::Content::Type mask, bool atEnd);
+ core::Iterator *iterator (core::Content::Type mask, bool atEnd);
};
} // namespace dw
diff --git a/dw/selection.cc b/dw/selection.cc
index 3153576f..7fb25e21 100644
--- a/dw/selection.cc
+++ b/dw/selection.cc
@@ -95,13 +95,13 @@ void SelectionState::resetLink ()
link = NULL;
linkState = LINK_NONE;
}
-
+
bool SelectionState::buttonPress (Iterator *it, int charPos, int linkNo,
EventButton *event, bool withinContent)
{
Widget *itWidget = it->getWidget ();
bool ret = false;
-
+
if (event && event->button == 1 &&
!withinContent && event->numPressed == 2) {
// When the user double-clicks on empty parts, emit the double click
diff --git a/dw/selection.hh b/dw/selection.hh
index 9cc8d25f..5aa9dc48 100644
--- a/dw/selection.hh
+++ b/dw/selection.hh
@@ -15,23 +15,23 @@ using namespace lout;
* which is closely related.
*
* <h3>General Overview</h3>
- *
+ *
* dw::core::SelectionState is associated with dw::core::Layout. The selection
* state is controlled by "abstract events", which are sent by single
* widgets by calling one of the following methods:
- *
+ *
* <ul>
* <li> dw::core::SelectionState::buttonPress for button press events,
* <li> dw::core::SelectionState::buttonRelease for button release events, and
* <li> dw::core::SelectionState::buttonMotion for motion events (with pressed
* mouse button).
* </ul>
- *
+ *
* The widget must construct simple iterators (dw::core::Iterator), which will
* be transferred to deep iterators (dw::core::DeepIterator), see below for
* more details. All event handling methods have the same signature, the
* arguments in detail are:
- *
+ *
* <table>
* <tr><td>dw::core::Iterator *it <td>the iterator pointing on the item
* under the mouse pointer; this
@@ -64,26 +64,26 @@ using namespace lout;
* simple iterator is discarded and instead the stack has an iterator
* pointing to text at the top. As a result, only the first letter of the
* ALT text would be copied.
- *
+ *
* To avoid this problem, widgets should in this case pass
* dw::core::SelectionState::END_OF_WORD as \em charPos, which is then
* automatically reduced to the actual length of the deep(!) iterator.
- *
+ *
* The return value is the same as in DwWidget event handling methods.
* I.e., in most cases, they should simply return it. The events
* dw::core::Widget::LinkReceiver::press,
- * dw::core::Widget::LinkReceiver::release and
+ * dw::core::Widget::LinkReceiver::release and
* dw::core::Widget::LinkReceiver::click (but not
* dw::core::Widget::LinkReceiver::enter) are emitted by these methods, so
* that widgets which let dw::core::SelectionState handle links, should only
* emit dw::core::Widget::LinkReceiver::enter for themselves.
- *
+ *
* <h3>Selection State</h3>
- *
+ *
* Selection interferes with handling the activation of links, so the
* latter is also handled by the dw::core::SelectionState. Details are based on
* following guidelines:
- *
+ *
* <ol>
* <li> It should be simple to select links and to start selection in
* links. The rule to distinguish between link activation and
@@ -91,18 +91,18 @@ using namespace lout;
* the link. (This is, IMO, a useful feature. Even after drag and
* drop has been implemented in dillo, this should be somehow
* preserved.)
- *
+ *
* <li> The selection should stay as long as possible, i.e., the old
* selection is only cleared when a new selection is started.
* </ol>
- *
+ *
* The latter leads to a model with two states: the selection state and
* the link handling state.
- *
+ *
* The general selection works, for events not pointing on links, like
* this (numbers in parantheses after the event denote the button, "n"
* means arbitrary button):
- *
+ *
* \dot
* digraph G {
* node [shape=ellipse, fontname=Helvetica, fontsize=10];
@@ -122,15 +122,15 @@ using namespace lout;
* q -> SELECTED [label="yes"];
* q -> NONE [label="no"];
* SELECTED -> SELECTING [label="press(1)"];
- *
+ *
* }
* \enddot
*
* The selected region is represented by two instances of
* dw::core::DeepIterator.
- *
+ *
* Links are handled by a different state machine:
- *
+ *
* \dot
* digraph G {
* node [shape=ellipse, fontname=Helvetica, fontsize=10];
@@ -170,16 +170,16 @@ using namespace lout;
* eventually be SELECTED/SELECTING, with the original and the current
* position making up the selection region. This happens for button 1,
* events with buttons other than 1 do not affect selection at all.
- *
- *
+ *
+ *
* \todo dw::core::SelectionState::buttonMotion currently always assumes
* that button 1 has been pressed (since otherwise it would not do
* anything). This should be made a bit cleaner.
- *
+ *
* \todo The selection should be cleared, when the user selects something
* somewhere else (perhaps switched into "non-active" mode, as e.g. Gtk+
* does).
- *
+ *
*/
class SelectionState
{
@@ -248,15 +248,15 @@ private:
public:
enum EventType { BUTTON_PRESS, BUTTON_RELEASE, BUTTON_MOTION };
-
+
SelectionState ();
~SelectionState ();
-
+
inline void setLayout (Layout *layout) { this->layout = layout; }
void reset ();
inline void connectDoubleClick (DoubleClickReceiver *receiver)
{ doubleClickEmitter.connectDoubleClick (receiver); }
-
+
bool buttonPress (Iterator *it, int charPos, int linkNo,
EventButton *event, bool withinContent);
bool buttonRelease (Iterator *it, int charPos, int linkNo,
diff --git a/dw/style.cc b/dw/style.cc
index 6cb93ef9..66b37c7b 100644
--- a/dw/style.cc
+++ b/dw/style.cc
@@ -150,7 +150,7 @@ int StyleAttrs::hashValue () {
width +
height +
margin.hashValue () +
- borderWidth.hashValue () +
+ borderWidth.hashValue () +
padding.hashValue () +
(intptr_t) borderColor.top +
(intptr_t) borderColor.right +
@@ -217,7 +217,7 @@ Style::~Style ()
x_tooltip->unref();
styleTable->remove (this);
- totalRef--;
+ totalRef--;
}
void Style::copyAttrs (StyleAttrs *attrs)
@@ -403,7 +403,7 @@ int Color::shadeColor (int color, Shading shading)
}
}
-
+
Color *Color::create (Layout *layout, int col)
{
ColorAttrs attrs(col);
diff --git a/dw/style.hh b/dw/style.hh
index e8897b36..8d0b9df7 100644
--- a/dw/style.hh
+++ b/dw/style.hh
@@ -14,100 +14,100 @@ namespace core {
* \brief Anything related to Dillo %Widget styles is defined here.
*
* <h3>Overview</h3>
- *
+ *
* dw::core::style::Style provides some resources and attributes for
* drawing widgets, as well as for parts of a widget (e.g., dw::Textblock
* uses styles for its words). Creating a style is done by filling a
* dw::core::style::StyleAttrs with the attributes and calling
* dw::core::style::Style::create:
- *
+ *
* \code
* dw::core::style::Style styleAttrs;
* dw::core::style::Style *style;
* dw::core::Layout *layout;
- *
+ *
* // ...
- *
+ *
* styleAttrs.foo = bar;
* // etc.
* style = dw::core::style::Style::create (&styleAttrs, layout);
* // do something with style
* \endcode
- *
+ *
* After this, the attributes of a dw::core::style::Style should not be
* changed anymore, since styles are often shared between different
* widgets etc. (see below). Most times, you simply copy the attributes
* of another style (possible, since dw::core::style::Style is a sub
* class of dw::core::style::StyleAttrs), modify them and create a new
* style:
- *
+ *
* \code
* styleAttrs = *anotherStyle;
* styleAttrs.foo = baz;
* style = dw::core::style::Style::create (&styleAttrs, layout);
* \endcode
- *
+ *
* The dw::core::style::Font structure can be created by
* dw::core::style::Font::create, in a similar, with
* dw::core::style::FontAttrs, and colors by
* dw::core::style::Color::create, passing 0xrrggbb as an
* argument. Furthermore, there is dw::core::style::Tooltip, created by
* dw::core::style::Tooltip::create.
- *
+ *
* Notice that fonts, colors and tooltips are only intended to be used in
* conjunction with dw::core::style::Style.
- *
- *
+ *
+ *
* <h3>Naming</h3>
- *
+ *
* dw::core::style::Style will become important for CSS, each CSS
* attribute, which is supported by dillo, will refer to an attribute in
* dw::core::style::Style. For this reason, the attributes in
* dw::core::style::Style get the names from the CSS attributes, with
* "camelCase" instead of hythens (e.g. "background-color" becomes
* "backgroundColor").
- *
+ *
* However, dw::core::style::Style will be extended by some more
* attributes, which are not defined by CSS. To distinguish them, they
* get the prefix "x_", e.g. dw::core::style::Style::x_link.
- *
- *
+ *
+ *
* <h3>Lengths and Percentages</h3>
- *
+ *
* dw::core::style::Length is a simple data type for lengths and
* percentages:
- *
+ *
* <ul>
* <li> A length refers to an absolute measurement. It is used to
* represent the HTML type %Pixels; and the CSS type \<length\>.
- *
+ *
* For CSS lenghts, there are two units: (i) pixels and absolute
* units, which have to be converted to pixels (a pixel is, unlike
* in the CSS specification, treated as absolute unit), and (ii) the
* relative units "em" and "ex" (see below).
- *
+ *
* <li> A percentage refers to a value relative to another value. It is
* used for the HTML type %Length; (except %Pixels;), and the CSS
* type \<percentage\>.
- *
+ *
* <li> A relative length can be used in lists of HTML MultiLengths.
* </ul>
- *
+ *
* Since many values in CSS may be either lengths or percentages, a
* single type is very useful.
- *
+ *
* <h4>Useful Functions</h4>
- *
+ *
* Creating lengths:
- *
+ *
* <ul>
* <li> dw::core::style::createAbsLength
* <li> dw::core::style::createPerLength
* <li> dw::core::style::createRelLength
* </ul>
- *
+ *
* Examine lengths:
- *
+ *
* <ul>
* <li> dw::core::style::isAbsLength
* <li> dw::core::style::isPerLength
@@ -116,61 +116,61 @@ namespace core {
* <li> dw::core::style::perLengthVal
* <li> dw::core::style::relLengthVal
* </ul>
- *
- *
+ *
+ *
* <h3>Boxes</h3>
- *
+ *
* <h4>The CSS %Box Model</h4>
- *
+ *
* For borders, margins etc., the box model defined by CSS2 is
* used. dw::core::style::Style contains some members defining these
* attributes. A dw::core::Widget must use these values for any
* calculation of sizes. There are some helper functions (see
* dw/style.hh). A dw::core::style::Style box looks quite similar to a
* CSS box:
- *
+ *
* \image html dw-style-box-model.png
- *
+ *
* <h4>Background colors</h4>
- *
+ *
* The background color is stored in
* dw::core::style::Style::backgroundColor, which may be NULL (the
* background color of the parent widget is shining through).
- *
+ *
* For toplevel widgets, this color is set as the background color of the
* views (dw::core::View::setBgColor), for other widgets, a filled
* rectangle is drawn, covering the content and padding. (This is
* compliant with CSS2, the background color of the toplevel element
* covers the whole canvas.)
- *
+ *
* <h4>Drawing</h4>
- *
+ *
* The following methods may be useful:
- *
+ *
* <ul>
* <li> dw::core::Widget::drawWidgetBox for drawing the box of a widget
* (typically at the beginning of the implementation of
* dw::core::Widget::draw), and
- *
+ *
* <li> dw::core::Widget::drawBox, for drawing parts of a widget (e.g.
* dw::Textblock::Word, which has its own dw::Textblock::Word::style).
* </ul>
- *
- *
+ *
+ *
* <h3>Notes on Memory Management</h3>
- *
+ *
* Memory management is done by reference counting,
* dw::core::style::Style::create returns a pointer to
* dw::core::style::Style with an increased reference counter, so you
* should care about calling dw::core::style::Style::unref if it is not
* used anymore. You do \em not need to care about the reference counters
* of fonts and styles.
- *
+ *
* In detail:
- *
+ *
* <ul>
* <li> dw::core::style::Style::ref is called in
- *
+ *
* <ul>
* <li> dw::core::Widget::setStyle to assign a style to a widget,
* <li> dw::Textblock::addText, dw::Textblock::addWidget,
@@ -179,9 +179,9 @@ namespace core {
* to assign a style to a dw::Textblock::Word, and
* <li> by the HTML parser, when pushing an element on the stack.
* </ul>
- *
+ *
* <li> dw::core::style::Style::unref is called in
- *
+ *
* <ul>
* <li> dw::core::Widget::~Widget, dw::Textblock::~Textblock, by the
* HTML parser, when popping an element fom the stack, and
@@ -319,15 +319,15 @@ enum WhiteSpace {
* This is an implementation detail, use one of the following functions:
*
* Creating lengths:
- *
+ *
* <ul>
* <li> dw::core::style::createAbsLength
* <li> dw::core::style::createPerLength
* <li> dw::core::style::createRelLength
* </ul>
- *
+ *
* Examine lengths:
- *
+ *
* <ul>
* <li> dw::core::style::isAbsLength
* <li> dw::core::style::isPerLength
@@ -433,7 +433,7 @@ public:
int x_link;
int x_img;
Tooltip *x_tooltip;
-
+
void initValues ();
void resetValues ();
diff --git a/dw/table.cc b/dw/table.cc
index b5e6f192..8c05cbc0 100644
--- a/dw/table.cc
+++ b/dw/table.cc
@@ -114,7 +114,7 @@ void Table::sizeRequestImpl (core::Requisition *requisition)
getStyle()->boxDiffHeight () + cumHeight->get (numRows)
+ getStyle()->vBorderSpacing;
requisition->descent = 0;
-
+
}
void Table::getExtremesImpl (core::Extremes *extremes)
@@ -171,14 +171,14 @@ void Table::sizeAllocateImpl (core::Allocation *allocation)
core::Allocation childAllocation;
core::Requisition childRequisition;
-
+
children->get(n)->cell.widget->sizeRequest (&childRequisition);
childAllocation.x = x;
childAllocation.y = cumHeight->get (row) + offy;
childAllocation.width = width;
childAllocation.ascent = childRequisition.ascent;
- childAllocation.descent =
+ childAllocation.descent =
cumHeight->get (row + children->get(n)->cell.rowspan)
- cumHeight->get (row) - getStyle()->vBorderSpacing
- childRequisition.ascent;
@@ -187,7 +187,7 @@ void Table::sizeAllocateImpl (core::Allocation *allocation)
}
x += colWidths->get (col) + getStyle()->hBorderSpacing;
- }
+ }
}
void Table::resizeDrawImpl ()
@@ -199,7 +199,7 @@ void Table::resizeDrawImpl ()
}
void Table::setWidth (int width)
-{
+{
// If limitTextWidth is set, a queueResize may also be necessary.
if (availWidth != width || limitTextWidth) {
_MSG(" Table::setWidth %d\n", width);
@@ -255,7 +255,7 @@ void Table::draw (core::View *view, core::Rectangle *area)
}
}
}
-
+
void Table::removeChild (Widget *child)
{
/** \bug Not implemented. */
@@ -333,7 +333,7 @@ void Table::addCell (Widget *widget, int colspan, int rowspan)
child->cell.colspanEff = colspanEff;
child->cell.rowspan = rowspan;
children->set (curRow * numCols + curCol, child);
-
+
curCol += colspanEff;
widget->setParent (this);
@@ -454,7 +454,7 @@ void Table::reallocChildren (int newNumCols, int newNumRows)
for (int row = numRows; row < newNumRows; row++)
for (int col = 0; col < newNumCols; col++)
children->set (row * newNumCols + col, NULL);
-
+
// Simple arrays.
rowStyle->setSize (newNumRows);
for (int row = numRows; row < newNumRows; row++)
@@ -481,7 +481,7 @@ void Table::forceCalcCellSizes ()
// Will also call calcColumnExtremes(), when needed.
getExtremes (&extremes);
-
+
if (core::style::isAbsLength (getStyle()->width)) {
totalWidth = core::style::absLengthVal (getStyle()->width);
} else if (core::style::isPerLength (getStyle()->width)) {
@@ -1106,7 +1106,7 @@ int Table::TableIterator::compareTo(misc::Comparable *other)
{
return index - ((TableIterator*)other)->index;
}
-
+
bool Table::TableIterator::next ()
{
Table *table = (Table*)getWidget();
@@ -1119,7 +1119,7 @@ bool Table::TableIterator::next ()
content.type = core::Content::END;
return false;
}
-
+
do {
index++;
if (index >= table->children->size ()) {
@@ -1146,7 +1146,7 @@ bool Table::TableIterator::prev ()
content.type = core::Content::START;
return false;
}
-
+
do {
index--;
if (index < 0) {
diff --git a/dw/table.hh b/dw/table.hh
index ec2bacc8..73d362e5 100644
--- a/dw/table.hh
+++ b/dw/table.hh
@@ -11,22 +11,22 @@ namespace dw {
* \brief A Widget for rendering tables.
*
* <h3>Introduction</h3>
- *
+ *
* The dw::Table widget is used to render HTML tables.
- *
+ *
* Each cell is itself an own widget. Any widget may be used, however, in
* dillo, only instances of dw::Textblock and dw::TableCell are used as
* children of dw::Table.
- *
- *
+ *
+ *
* <h3>Sizes</h3>
- *
+ *
* <h4>General</h4>
- *
+ *
* The following diagram shows the dependencies between the different
* functions, which are related to size calculation. Click on the boxes
* for more informations.
- *
+ *
* \dot
* digraph G {
* node [shape=record, fontname=Helvetica, fontsize=10, color="#c0c0c0"];
@@ -34,125 +34,125 @@ namespace dw {
* labelfontsize=10, color="#404040", labelfontcolor="#000080",
* fontname=Helvetica, fontsize=10];
* fontname=Helvetica; fontsize=10;
- *
+ *
* sizeRequestImpl [color="#0000ff", URL="\ref dw::Table::sizeRequestImpl"];
* sizeAllocateImpl [color="#0000ff",
* URL="\ref dw::Table::sizeAllocateImpl"];
* getExtremesImpl [color="#0000ff", URL="\ref dw::Table::getExtremesImpl"];
- *
+ *
* subgraph cluster_sizes {
* style="dashed"; color="#8080c0";
* calcCellSizes [URL="\ref dw::Table::calcCellSizes"];
* forceCalcCellSizes [URL="\ref dw::Table::forceCalcCellSizes"];
* }
- *
+ *
* subgraph cluster_extremes {
* style="dashed"; color="#8080c0";
* calcColumnExtremes [URL="\ref dw::Table::calcColumnExtremes"];
* forceCalcColumnExtremes[URL="\ref dw::Table::forceCalcColumnExtremes"];
* }
- *
+ *
* sizeRequestImpl -> forceCalcCellSizes [label="[B]"];
* sizeAllocateImpl -> calcCellSizes [label="[A]"];
* getExtremesImpl -> forceCalcColumnExtremes [label="[B]"];
- *
+ *
* forceCalcCellSizes -> calcColumnExtremes;
- *
+ *
* calcCellSizes -> forceCalcCellSizes [style="dashed", label="[C]"];
* calcColumnExtremes -> forceCalcColumnExtremes [style="dashed",
* label="[C]"];
* }
* \enddot
- *
+ *
* [A] In this case, the new calculation is \em not forced, but only
* done, when necessary.
- *
+ *
* [B] In this case, the new calculation is allways necessary, since [C]
* is the case.
- *
+ *
* [C] Whether this function is called, depends on NEEDS_RESIZE /
* EXTREMES_CHANGED.
- *
- *
+ *
+ *
* <h4>Apportionment</h4>
- *
+ *
* \sa\ref rounding-errors
- *
+ *
* Given two array \f$e_{i,\min}\f$ and \f$e_{i,\max}\f$, which
* represent the column minima and maxima, and a total width \f$W\f$, \em
* apportionment means to calculate column widths \f$w_{i}\f$, with
- *
+ *
* \f[e_{i,\min} \le w_{i} \le e_{i,\max}\f]
- *
+ *
* and
- *
+ *
* \f[\sum w_{i} = W\f]
- *
+ *
* There are different algorithms for apportionment, a simple one is
* recommended in the HTML 4.0.1 specification
* (http://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.5.2.2):
- *
+ *
* \f[w_{i} = e_{i,\min} +
* {e_{i,\max} - e_{i,\min}\over\sum e_{i,\max} - \sum e_{i,\min}}
* (W - \sum e_{i,\min})\f]
- *
+ *
* This one is used currently, but another one will be used soon, which is
* described below. The rest of this chapter is independant of the exact
* apportionment algorithm.
- *
+ *
* When referring to the apportionment function, we will call it
* \f$a_i (W, (e_{i,\min}), (e_{i,\min}))\f$ and write
* something like this:
- *
+ *
* \f[w_{i} = a_i (W, (e_{i,\min}), (e_{i,\max})) \f]
- *
+ *
* It is implemented by dw::Table::apportion.
- *
+ *
* <h4>Column Extremes</h4>
- *
+ *
* \sa\ref rounding-errors
- *
+ *
* The sizes, which all other sizes depend on, are column extremes, which
* define, how wide a column may be at min and at max. They are
* calculated in the following way:
- *
+ *
* <ol>
* <li> First, only cells with colspan = 1 are regarded:
- *
+ *
* \f[ e_{\hbox{base},i,\min} = \max \{ e_{\hbox{cell},i,j,\min} \} \f]
* \f[ e_{\hbox{base},i,\max} = \max \{ e_{\hbox{cell},i,j,\max} \} \f]
- *
+ *
* only for cells \f$(i, j)\f$ with colspan = 1.
- *
+ *
* <li> Then,
* \f$e_{\hbox{span},i,\min}\f$ (but not \f$e_{\hbox{span},i,\max}\f$)
* are calculated from cells with colspan > 1. (In the following formulas,
* the cell at \f$(i_1, j)\f$ always span from \f$i_1\f$ to \f$i_2\f$.)
* If the minimal width of the column exeeds the sum of the column minima
* calculated in the last step:
- *
+ *
* \f[e_{\hbox{cell},i_1,j,\min} >
* \sum_{i=i_1}^{i=i_2} e_{\hbox{base},i,\min}\f]
- *
+ *
* then the minimal width of this cell is apportioned to the columns:
- *
+ *
* <ul>
* <li> If the minimal width of this cell also exeeds the sum of the
* column maxima:
- *
+ *
* \f[e_{\hbox{cell},i_1,j,\min} >
* \sum_{i=i_1}^{i=i_2} e_{\hbox{base},i,\max}\f]
- *
+ *
* then \f$e_{\hbox{cell},i_1,j,\min}\f$ is apportioned in a simple
* way:
- *
+ *
* \f[e_{\hbox{span},i,j,\min} =
* e_{\hbox{base},i,\max}
* {e_{\hbox{span},i,j,\min} \over
* \sum_{i=i_1}^{i=i_2} e_{\hbox{base},i,\max}}\f]
- *
+ *
* <li> Otherwise, the apportionment function is used:
- *
+ *
* \f[e_{\hbox{span},i,j,\min} =
* a_i (e_{\hbox{cell},i_1,j,\min},
* (e_{\hbox{cell},i_1,j,\min} \ldots
@@ -160,10 +160,10 @@ namespace dw {
* (e_{\hbox{cell},i_1,j,\max} \ldots
* e_{\hbox{cell},i_2,j,\max}))\f]
* </ul>
- *
+ *
* After this, \f$e_{\hbox{span},i,\min}\f$ is then the maximum of all
* \f$e_{\hbox{span},i,j,\min}\f$.
- *
+ *
* <li> Finally, the maximum of both is used.
* \f[ e_{i,\min} =
* \max \{ e_{\hbox{base},i,\min}, e_{\hbox{span},i,\min} \} \f]
@@ -173,7 +173,7 @@ namespace dw {
* be assured, that the maximum is always greater or equal than/to the
* minimum.
* </ol>
- *
+ *
* Generally, if absolute widths are speficied, they are, instead of the
* results of dw::core::Widget::getExtremes, taken for the minimal and
* maximal width of a cell (minus the box difference, i.e. the difference
@@ -181,106 +181,106 @@ namespace dw {
* specification is smaller than the minimal content width of the widget
* (determined by dw::core::Widget::getExtremes), the latter is used
* instead.
- *
+ *
* If percentage widths are specified, they are also collected, as column
* maxima. A similar method as for the extremes is used, for cells with
* colspan > 1:
- *
+ *
* \f[w_{\hbox{span},i,j,\%} =
* a_i (w_{\hbox{cell},i_1,j,\%},
* (e_{\hbox{cell},i_1,j,\min} \ldots e_{\hbox{cell},i_2,j,\min}),
* (e_{\hbox{cell},i_1,j,\max} \ldots e_{\hbox{cell},i_2,j,\max}))\f]
- *
+ *
* <h4>Cell Sizes</h4>
- *
+ *
* <h5>Determining the Width of the Table</h5>
- *
+ *
* The total width is
- *
+ *
* <ul>
* <li> the specified absolute width of the table, when given, or
* <li> the available width (set by dw::Table::setWidth) times the specifies
* percentage width pf t(at max 100%), if the latter is given, or
* <li> otherwise the available width.
* </ul>
- *
+ *
* In any case, it is corrected, if it is less than the minimal width
* (but not if it is greater than the maximal width).
- *
+ *
* \bug The parantheses is not fully clear, look at the old code.
- *
+ *
* Details on differences because of styles are omitted. Below, this
* total width is called \f$W\f$.
- *
+ *
* <h5>Evaluating percentages</h5>
- *
+ *
* The following algorithms are used to solve collisions between
* different size specifications (absolute and percentage). Generally,
* inherent sizes and specified absolute sizes are preferred.
- *
+ *
* <ol>
* <li> First, calculate the sum of the minimal widths, for columns, where
* no percentage width has been specified. The difference to the total
* width is at max available to the columns with percentage width
* specifications:
- *
+ *
* \f[W_{\hbox{columns}_\%,\hbox{available}} = W - \sum e_{i,\min}\f]
- *
+ *
* with only those columns \f$i\f$ with no percentage width specification.
- *
+ *
* <li> Then, calculate the sum of the widths, which the columns with
* percentage width specification would allocate, when fully adhering to
* then:
- *
+ *
* \f[W_{\hbox{columns}_\%,\hbox{best}} = W \sum w_{i,\%}\f]
- *
+ *
* with only those columns \f$i\f$ with a percentage width specification.
- *
+ *
* <li> Two cases are distinguished:
- *
+ *
* <ul>
* <li> \f$W_{\hbox{columns}_\%,\hbox{available}} \ge
* W_{\hbox{columns}_\%,\hbox{best}}\f$: In this case, the
* percentage widths can be used without any modification, by
* setting the extremes:
- *
+ *
* \f[e_{i,\min} = e_{i,\max} = W w_{i,\%}\f]
- *
+ *
* for only those columns \f$i\f$ with a percentage width
* specification.
- *
+ *
* <li> \f$W_{\hbox{columns}_\%,\hbox{available}} <
* W_{\hbox{columns}_\%,\hbox{best}}\f$: In this case, the widths
* for these columns must be cut down:
- *
+ *
* \f[e_{i,\min} = e_{i,\max} =
* w_{i,\%}
* {W_{\hbox{columns}_\%,\hbox{available}} \over
* w_{\hbox{total},\%}}\f]
- *
+ *
* with
- *
+ *
* \f[w_{\hbox{total},\%} = \sum w_{i,\%}\f]
- *
+ *
* in both cases for only those columns \f$i\f$ with a percentage
- * width specification.
+ * width specification.
* </ul>
* </ol>
- *
+ *
* (\f$e_{i,\min}\f$ and \f$e_{i,\max}\f$ are set \em temporarily here,
* the notation should be a bit clearer.)
- *
- *
+ *
+ *
* <h5>Column Widths</h5>
- *
+ *
* The column widths are now simply calculated by applying the
* apportenment function.
- *
- *
+ *
+ *
* <h5>Row Heights</h5>
- *
+ *
* ...
- *
+ *
* <h3>Alternative Apportionment Algorithm</h3>
*
* The algorithm described here tends to result in more homogeneous column
@@ -306,13 +306,13 @@ namespace dw {
* Based on an initial value \f$w = {W\over n}\f$, \f$w\f$ can iteratively
* adjusted, based on these rules.
*
- *
+ *
* <h3>Borders, Paddings, Spacing</h3>
- *
+ *
* Currently, DwTable supports only the separated borders model (see CSS
* specification). Borders, paddings, spacing is done by creating
* dw::core::style::Style structures with values equivalent to following CSS:
- *
+ *
* <pre>
* TABLE {
* border: outset \em table-border;
@@ -320,14 +320,14 @@ namespace dw {
* border-spacing: \em table-cellspacing;
* background-color: \em table-bgcolor;
* }
- *
+ *
* TD TH {
* border: inset \em table-border;
* padding: \em table-cellspacing;
* background-color: \em td/th-bgcolor;
* }
* </pre>
- *
+ *
* Here, \em foo-bar refers to the attribute \em bar of the tag \em foo foo.
* Look at the HTML parser for more details.
*/
@@ -380,7 +380,7 @@ private:
misc::SimpleVector<Child*> *children;
int redrawX, redrawY;
-
+
/**
* \brief The extremes of all columns.
*/
@@ -460,7 +460,7 @@ protected:
void setWidth (int width);
void setAscent (int ascent);
void setDescent (int descent);
- void draw (core::View *view, core::Rectangle *area);
+ void draw (core::View *view, core::Rectangle *area);
//bool buttonPressImpl (core::EventButton *event);
//bool buttonReleaseImpl (core::EventButton *event);
@@ -474,7 +474,7 @@ public:
Table(bool limitTextWidth);
~Table();
- core::Iterator *iterator (core::Content::Type mask, bool atEnd);
+ core::Iterator *iterator (core::Content::Type mask, bool atEnd);
void addCell (Widget *widget, int colspan, int rowspan);
void addRow (core::style::Style *style);
diff --git a/dw/tablecell.cc b/dw/tablecell.cc
index b4d404f7..89c8c581 100644
--- a/dw/tablecell.cc
+++ b/dw/tablecell.cc
@@ -29,7 +29,7 @@ int TableCell::CLASS_ID = -1;
TableCell::TableCell (TableCell *ref, bool limitTextWidth):
AlignedTextblock (limitTextWidth)
-{
+{
registerName ("dw::TableCell", &CLASS_ID);
/** \bug ignoreLine1OffsetSometimes does not work? */
diff --git a/dw/textblock.cc b/dw/textblock.cc
index 62d6d4ce..b80afb86 100644
--- a/dw/textblock.cc
+++ b/dw/textblock.cc
@@ -371,9 +371,9 @@ void Textblock::sizeAllocateImpl (core::Allocation *allocation)
// + word->content.widget->getStyle()->margin.bottom;
oldChildAllocation = word->content.widget->getAllocation();
-
- if (childAllocation.x != oldChildAllocation->x ||
- childAllocation.y != oldChildAllocation->y ||
+
+ if (childAllocation.x != oldChildAllocation->x ||
+ childAllocation.y != oldChildAllocation->y ||
childAllocation.width != oldChildAllocation->width) {
/* The child widget has changed its position or its width
* so we need to redraw from this line onwards.
@@ -393,7 +393,7 @@ void Textblock::sizeAllocateImpl (core::Allocation *allocation)
* end up redrawing the whole screen over and over.
* The drawing of the child content is left to the child itself.
*/
- int childChangedY =
+ int childChangedY =
misc::min(childAllocation.y - allocation->y +
childAllocation.ascent + childAllocation.descent,
oldChildAllocation->y - this->allocation.y +
@@ -1662,7 +1662,7 @@ bool Textblock::addAnchor (const char *name, core::style::Style *style)
char *copy;
int y;
- // Since an anchor does not take any space, it is safe to call
+ // Since an anchor does not take any space, it is safe to call
// addAnchor already here.
if (wasAllocated ()) {
if (lines->size () == 0)
@@ -1829,9 +1829,9 @@ void Textblock::addLinebreak (core::style::Style *style)
/**
* \brief Search recursively through widget.
- *
+ *
* This is an optimized version of the general
- * dw::core::Widget::getWidgetAtPoint method.
+ * dw::core::Widget::getWidgetAtPoint method.
*/
core::Widget *Textblock::getWidgetAtPoint(int x, int y, int level)
{
@@ -2001,14 +2001,14 @@ int Textblock::TextblockIterator::compareTo(misc::Comparable *other)
{
return index - ((TextblockIterator*)other)->index;
}
-
+
bool Textblock::TextblockIterator::next ()
{
Textblock *textblock = (Textblock*)getWidget();
if (content.type == core::Content::END)
return false;
-
+
do {
index++;
if (index >= textblock->words->size ()) {
@@ -2027,7 +2027,7 @@ bool Textblock::TextblockIterator::prev ()
if (content.type == core::Content::START)
return false;
-
+
do {
index--;
if (index < 0) {
diff --git a/dw/textblock.hh b/dw/textblock.hh
index d3198b69..e65ce7b2 100644
--- a/dw/textblock.hh
+++ b/dw/textblock.hh
@@ -13,118 +13,118 @@ using namespace lout;
* of paragraphs.
*
* <h3>Signals</h3>
- *
+ *
* dw::Textblock uses the signals defined in
* dw::core::Widget::LinkReceiver, related to links. The coordinates are
* always -1.
- *
- *
+ *
+ *
* <h3>Collapsing Spaces</h3>
- *
+ *
* The idea behind this is that every paragraph has a specific vertical
* space around and that they are combined to one space, according to
* rules stated below. A paragraph consists either of the lines between
* two paragraph breaks within a dw::Textblock, or of a dw::Textblock
* within a dw::Textblock, in a single line; the latter is used for
* indented boxes and list items.
- *
+ *
* The rules:
- *
+ *
* <ol>
* <li> If a paragraph is following by another, the space between them is the
* maximum of both box spaces:
- *
+ *
* \image html dw-textblock-collapsing-spaces-1-1.png
- *
+ *
* are combined like this:
- *
+ *
* \image html dw-textblock-collapsing-spaces-1-2.png
- *
+ *
* <li> a) If one paragraph is the first paragraph within another, the upper
* space of these paragraphs collapse. b) The analogue is the case for the
* last box:
- *
+ *
* \image html dw-textblock-collapsing-spaces-2-1.png
- *
+ *
* If B and C are put into A, the result is:
- *
+ *
* \image html dw-textblock-collapsing-spaces-2-2.png
* </ol>
- *
+ *
* For achieving this, there are some features of dw::Textblock:
- *
+ *
* <ul>
* <li> Consequent breaks are automatically combined, according to
* rule 1. See the code of dw::Textblock::addParBreak for details.
- *
+ *
* <li> If a break is added as the first word of the dw::Textblock within
* another dw::Textblock, collapsing according to rule 2a is done
* automatically. See the code of dw::Textblock::addParBreak.
- *
+ *
* <li> To collapse spaces according to rule 2b,
* dw::Textblock::addParBreak::handOverBreak must be called for
* the \em inner widget. The HTML parser does this in
* Html_eventually_pop_dw.
* </ul>
- *
- *
+ *
+ *
* <h3>Collapsing Margins</h3>
- *
+ *
* Collapsing margins, as defined in the CSS2 specification, are,
* supported in addition to collapsing spaces. Also, spaces and margins
* collapse themselves. I.e., the space between two paragraphs is the
* maximum of the space calculated as described in "Collapsing Spaces"
* and the space calculated according to the rules for collapsing margins.
- *
+ *
* (This is an intermediate hybrid state, collapsing spaces are used in
* the current version of dillo, while I implemented collapsing margins
* for the CSS prototype and integrated it already into the main trunk. For
* a pure CSS-based dillo, collapsing spaces will not be needed anymore, and
* may be removed for simplicity.)
- *
- *
+ *
+ *
* <h3>Some Internals</h3>
- *
+ *
* There are two lists, dw::Textblock::words and
* dw::Textblock::lines. The word list is quite static; only new words
* may be added. A word is either text, a widget, a break or an
* anchor. Anchors are stored in the text, because it may be necessary to
* correct the scroller positions at rewrapping.
- *
+ *
* Lines refer to the word list (first and last), they are completely
* redundant, i.e., they can be rebuilt from the words. Lines can be
* rewrapped either completely or partially (see "Incremental Resizing"
* below). For the latter purpose, several values are accumulated in the
* lines. See dw::Textblock::Line for details.
- *
- *
+ *
+ *
* <h4>Incremental Resizing</h4>
- *
+ *
* dw::Textblock makes use of incremental resizing as described in \ref
* dw-widget-sizes. The parentRef is, for children of a dw::Textblock, simply
* the number of the line.
- *
+ *
* Generally, there are three cases which may change the size of the
* widget:
- *
+ *
* <ul>
* <li> The available size of the widget has changed, e.g., because the
* user has changed the size of the browser window. In this case,
* it is necessary to rewrap all the lines.
- *
+ *
* <li> A child widget has changed its size. In this case, only a rewrap
* down from the line where this widget is located is necessary.
- *
+ *
* (This case is very important for tables. Tables are quite at the
* bottom, so that a partial rewrap is relevant. Otherwise, tables
* change their size quite often, so that this is necessary for a
* fast, non-blocking rendering)
- *
+ *
* <li> A word (or widget, break etc.) is added to the text block. This
* makes it possible to reuse the old size by simply adjusting the
* current width and height, so no rewrapping is necessary.
* </ul>
- *
+ *
* The state of the size calculation is stored in wrapRef within
* dw::Textblock, which has the value -1 if no rewrapping of lines
* necessary, or otherwise the line from which a rewrap is necessary.
@@ -282,7 +282,7 @@ protected:
*/
inline int lineXOffsetContents (Line *line)
{
- return innerPadding + line->leftOffset +
+ return innerPadding + line->leftOffset +
(line == lines->getRef (0) ? line1OffsetEff : 0);
}
@@ -327,7 +327,7 @@ protected:
{
return lineYOffsetWidget (lines->getRef (lineIndex));
}
-
+
inline int lineYOffsetCanvasI (int lineIndex)
{
return lineYOffsetCanvas (lines->getRef (lineIndex));
@@ -348,7 +348,7 @@ protected:
void setWidth (int width);
void setAscent (int ascent);
void setDescent (int descent);
- void draw (core::View *view, core::Rectangle *area);
+ void draw (core::View *view, core::Rectangle *area);
bool buttonPressImpl (core::EventButton *event);
bool buttonReleaseImpl (core::EventButton *event);
@@ -364,7 +364,7 @@ public:
Textblock(bool limitTextWidth);
~Textblock();
- core::Iterator *iterator (core::Content::Type mask, bool atEnd);
+ core::Iterator *iterator (core::Content::Type mask, bool atEnd);
void flush ();
diff --git a/dw/types.cc b/dw/types.cc
index d72d46cf..31fae8aa 100644
--- a/dw/types.cc
+++ b/dw/types.cc
@@ -249,7 +249,7 @@ void Region::addRectangle (Rectangle *rPointer)
r->y = misc::min(r->y, ownRect->y);
r->width = combinedWidth;
r->height = combinedHeight;
-
+
rectangleList->removeRef (ownRect);
}
}
diff --git a/dw/types.hh b/dw/types.hh
index bdfca629..4687c7fc 100644
--- a/dw/types.hh
+++ b/dw/types.hh
@@ -100,7 +100,7 @@ private:
/**
* \brief Return the z-coordinate of the vector product of two
- * vectors, whose z-coordinate is 0 (so that x and y of
+ * vectors, whose z-coordinate is 0 (so that x and y of
* the vector product is 0, too).
*/
inline int zOfVectorProduct(int x1, int y1, int x2, int y2) {
@@ -130,8 +130,8 @@ public:
class Region
{
private:
- container::typed::List <Rectangle> *rectangleList;
-
+ container::typed::List <Rectangle> *rectangleList;
+
public:
Region ();
~Region ();
@@ -186,7 +186,7 @@ struct Content
SELECTION_CONTENT = TEXT | WIDGET | BREAK
};
/* Content is embedded in struct Word therefore we
- * try to be space efficient.
+ * try to be space efficient.
*/
short type;
bool space;
diff --git a/dw/ui.hh b/dw/ui.hh
index 419284cd..37724b52 100644
--- a/dw/ui.hh
+++ b/dw/ui.hh
@@ -14,24 +14,24 @@ namespace core {
* UI resources are another abstraction for Dw widgets, which are not
* fully implemented in a platform-independent way. Typically, they
* involve creating widgets, which the underlying UI toolkit provides.
- *
+ *
* As you see in this diagram:
- *
+ *
* \dot
* digraph G {
* node [shape=record, fontname=Helvetica, fontsize=10];
* edge [arrowhead="none", arrowtail="empty", labelfontname=Helvetica,
* labelfontsize=10, color="#404040", labelfontcolor="#000080"];
* fontname=Helvetica; fontsize=10;
- *
+ *
* subgraph cluster_core {
* style="dashed"; color="#000080"; fontname=Helvetica; fontsize=10;
* label="dw::core";
- *
+ *
* subgraph cluster_ui {
* style="dashed"; color="#000080"; fontname=Helvetica; fontsize=10;
* label="dw::core::ui";
- *
+ *
* Embed [URL="\ref dw::core::ui::Embed"];
* Resource [color="#a0a0a0", URL="\ref dw::core::ui::Resource"];
* LabelButtonResource [color="#a0a0a0",
@@ -40,19 +40,19 @@ namespace core {
* URL="\ref dw::core::ui::EntryResource"];
* etc [color="#a0a0a0", label="..."];
* }
- *
+ *
* Widget [URL="\ref dw::core::Widget", color="#a0a0a0"];
* }
- *
+ *
* subgraph cluster_fltk {
* style="dashed"; color="#000080"; fontname=Helvetica; fontsize=10;
* label="dw::fltk::ui";
- *
+ *
* FltkLabelButtonResource
* [URL="\ref dw::fltk::ui::FltkLabelButtonResource"];
* FltkEntryResource [URL="\ref dw::fltk::ui::FltkEntryResource"];
* }
- *
+ *
* Widget -> Embed;
* Embed -> Resource [arrowhead="open", arrowtail="none",
* headlabel="1", taillabel="1"];
@@ -63,16 +63,16 @@ namespace core {
* EntryResource -> FltkEntryResource;
* }
* \enddot
- *
+ *
* <center>[\ref uml-legend "legend"]</center>
- *
+ *
* there are several levels:
- *
+ *
* <ol>
* <li> The Dw widget is dw::core::ui::Embed. It delegates most to
* dw::core::ui::Resource, which has similar methods like
* dw::core::Widget.
- *
+ *
* <li> There are several sub interfaces of dw::core::ui::Resource, which
* may provide methods, as e.g. dw::core::ui::ListResource::addItem. In a
* platform independent context, you can cast the result of
@@ -80,44 +80,44 @@ namespace core {
* know, which one is used. E.g., if you know, that a given instance
* dw::core::ui::Embed refers to a dw::core::ui::ListResource, you can
* write something like:
- *
+ *
* \code
* dw::core::ui::Embed *embed;
* //...
* ((dw::core::ui::ListResource*)embed->getResource ())->addItem ("Hello!");
* \endcode
- *
+ *
* <li> These sub classes are then fully implemented in a platform specific
* way. For an example, look at dw::fltk::ui.
* </ol>
- *
+ *
* There is a factory interface, dw::core::ui::ResourceFactory, which
* provides methods for creating common resources. By calling
* dw::core::Layout::getResourceFactory, which calls
* dw::core::Platform::getResourceFactory, you get the factory for the used
* platform.
- *
+ *
* It is possible to define additional sub classes of
* dw::core::ui::Resource, but since they are not provided by
* dw::core::ui::ResourceFactory, you have to define some other
* abstractions, if you want to remain platform independent.
- *
- *
+ *
+ *
* <h3>...</h3>
- *
- *
+ *
+ *
* <h3>Resouces needed for HTML</h3>
- *
+ *
* This chapter describes, how the form controls defined by HTML are
* implemented in Dw. Some of them do not refer to UI resources, but to
* other widgets, links to the respective documentations are provided
* here.
- *
+ *
* <h4>Resouces created with \<INPUT\></h4>
- *
+ *
* The HTML \<INPUT\> is always implemented by using UI
* resources. \<INPUT\> element has the following attributes:
- *
+ *
* <table>
* <tr><th>Attribute <th>Implementation
* <tr><td>type <td>This defines the resource you have to instanciate.
@@ -127,7 +127,7 @@ namespace core {
* <tr><td>checked <td>Parameter to
* dw::core::ui::ResourceFactory::createCheckButtonResource
* and dw::core::ui::ResourceFactory::createRadioButtonResource.
- * <tr><td>disabled <td>This is provided for all resources by
+ * <tr><td>disabled <td>This is provided for all resources by
* dw::core::ui::Resource::setEnabled.
* <tr><td>readonly <td>This is provided by
* dw::core::ui::TextResource::setEditable.
@@ -146,10 +146,10 @@ namespace core {
* <tr><td>onchange <td>Not supported currently.
* <tr><td>accept <td>Not supported currently.
* </table>
- *
+ *
* For the different values of \em type, the following resources can be
* used:
- *
+ *
* <table>
* <tr><th>Type <th>Resource
* <th>Factory Method
@@ -175,35 +175,35 @@ namespace core {
* <tr><td>file <td>Not supported currently.
* <td>-
* </table>
- *
+ *
* <h4>\<SELECT\>, \<OPTGROUP\>, and \<OPTION\></h4>
- *
+ *
* \<SELECT\> is implemented either by dw::core::ui::OptionMenuResource
* (better suitable for \em size = 1 and single selection) or
* dw::core::ui::ListResource, which have a common base,
* dw::core::ui::SelectionResource. In the latter case, \em size must be
* specified via dw::core::style::Style.
- *
+ *
* Factory methods are dw::core::ui::ResourceFactory::createListResource and
* dw::core::ui::ResourceFactory::createOptionMenuResource.
- *
+ *
* \<OPTION\>'s are added via dw::core::ui::SelectionResource::addItem.
- *
+ *
* \<OPTGROUP\> are created by using dw::core::ui::SelectionResource::pushGroup
* and dw::core::ui::SelectionResource::popGroup.
- *
+ *
* For lists, the selection mode must be set in
* dw::core::ui::ResourceFactory::createListResource.
- *
+ *
* <h4>\<TEXTAREA\></h4>
- *
+ *
* \<TEXTAREA\> is implemented by dw::core::ui::MultiLineTextResource,
* the factory method is
* dw::core::ui::ResourceFactory::createMultiLineTextResource.
* dw::core::ui::TextResource::setEditable can be used, as for entries.
- *
+ *
* <h4>\<BUTTON\></h4>
- *
+ *
* For handling \<BUTTON\>, dw::core::ui::ComplexButtonResource should be used,
* with a dw::Textblock inside, and relief = true. The contents of \<BUTTON\>
* is then added to the dw::Textblock.
@@ -328,7 +328,7 @@ protected:
public:
inline Resource () { embed = NULL; }
-
+
virtual ~Resource ();
virtual void sizeRequest (Requisition *requisition) = 0;
@@ -339,7 +339,7 @@ public:
virtual void setDescent (int descent);
virtual void setDisplayed (bool displayed);
virtual void draw (View *view, Rectangle *area);
- virtual Iterator *iterator (Content::Type mask, bool atEnd) = 0;
+ virtual Iterator *iterator (Content::Type mask, bool atEnd) = 0;
virtual void setStyle (style::Style *style);
virtual bool isEnabled () = 0;
@@ -361,7 +361,7 @@ class ButtonResource: public Resource
class LabelButtonResource: public ButtonResource
{
public:
- Iterator *iterator (Content::Type mask, bool atEnd);
+ Iterator *iterator (Content::Type mask, bool atEnd);
virtual const char *getLabel () = 0;
virtual void setLabel (const char *label) = 0;
@@ -391,7 +391,7 @@ protected:
virtual Platform *createPlatform () = 0;
virtual void setLayout (Layout *layout) = 0;
-
+
virtual int reliefXThickness () = 0;
virtual int reliefYThickness () = 0;
@@ -413,14 +413,14 @@ public:
};
/**
- * \brief Base interface for dw::core::ui::ListResource and
+ * \brief Base interface for dw::core::ui::ListResource and
* dw::core::ui::OptionMenuResource.
*/
class SelectionResource: public Resource
{
public:
virtual void addItem (const char *str, bool enabled, bool selected) = 0;
-
+
virtual void pushGroup (const char *name, bool enabled) = 0;
virtual void popGroup () = 0;
@@ -442,7 +442,7 @@ public:
/**
* \brief Exactly one item is selected, except possibly at the beginning.
- *
+ *
* If no item is selected initially, no one is selected automatically.
* The user may not unselect the only selected item.
*/
@@ -470,7 +470,7 @@ class OptionMenuResource: public SelectionResource
class TextResource: public Resource
{
public:
- Iterator *iterator (Content::Type mask, bool atEnd);
+ Iterator *iterator (Content::Type mask, bool atEnd);
virtual const char *getText () = 0;
virtual void setText (const char *text) = 0;
@@ -499,7 +499,7 @@ public:
class CheckButtonResource: public ToggleButtonResource
{
public:
- Iterator *iterator (Content::Type mask, bool atEnd);
+ Iterator *iterator (Content::Type mask, bool atEnd);
};
class RadioButtonResource: public ToggleButtonResource
@@ -523,7 +523,7 @@ public:
*/
virtual GroupIterator *groupIterator () = 0;
- Iterator *iterator (Content::Type mask, bool atEnd);
+ Iterator *iterator (Content::Type mask, bool atEnd);
};
diff --git a/dw/view.hh b/dw/view.hh
index ef604549..cd88b790 100644
--- a/dw/view.hh
+++ b/dw/view.hh
@@ -34,7 +34,7 @@ public:
virtual void setCanvasSize (int width, int ascent, int descent) = 0;
/**
- * \brief Set the cursor appearance.
+ * \brief Set the cursor appearance.
*/
virtual void setCursor (style::Cursor cursor) = 0;
@@ -42,7 +42,7 @@ public:
* \brief Set the background of the view.
*/
virtual void setBgColor (style::Color *color) = 0;
-
+
/*
* ---------------------------------------------------------
* Scrolling and Related. Only usesViewport must be
@@ -107,7 +107,7 @@ public:
/**
* \brief Called before drawing.
*
- * All actual drawing operations will be enclosed into calls of
+ * All actual drawing operations will be enclosed into calls of
* dw::core:View::startDrawing and dw::core:View::finishDrawing. They
* may be implemented, e.g. when a backing
* pixmap is used, to prevent flickering. StartDrawing() will then
diff --git a/dw/widget.cc b/dw/widget.cc
index 9a77d0b1..7f50fa70 100644
--- a/dw/widget.cc
+++ b/dw/widget.cc
@@ -198,7 +198,7 @@ bool Widget::LinkEmitter::emitToReceiver (lout::signal::Receiver *receiver,
return false;
}
-bool Widget::LinkEmitter::emitEnter (Widget *widget, int link, int img,
+bool Widget::LinkEmitter::emitEnter (Widget *widget, int link, int img,
int x, int y)
{
Integer ilink (link), iimg (img), ix (x), iy (y);
@@ -238,7 +238,7 @@ int Widget::CLASS_ID = -1;
Widget::Widget ()
{
registerName ("dw::core::Widget", &CLASS_ID);
-
+
flags = (Flags)(NEEDS_RESIZE | EXTREMES_CHANGED | HAS_CONTENTS);
parent = NULL;
layout = NULL;
@@ -496,7 +496,7 @@ void Widget::leaveNotify (EventCrossing *event)
* The old style is automatically unreferred, the new is referred. If this
* call causes the widget to change its size, dw::core::Widget::queueResize
* is called.
- */
+ */
void Widget::setStyle (style::Style *style)
{
bool sizeChanged;
@@ -696,7 +696,7 @@ Widget *Widget::getNearestCommonAncestor (Widget *otherWidget)
MSG_WARN("widgets in different trees\n");
return NULL;
}
-
+
widget1 = widget1->parent;
widget2 = widget2->parent;
}
@@ -707,7 +707,7 @@ Widget *Widget::getNearestCommonAncestor (Widget *otherWidget)
/**
* \brief Search recursively through widget.
- *
+ *
* Used by dw::core::Layout:getWidgetAtPoint.
*/
Widget *Widget::getWidgetAtPoint (int x, int y, int level)
@@ -739,7 +739,7 @@ Widget *Widget::getWidgetAtPoint (int x, int y, int level)
level + 1);
it->unref ();
-
+
if (childAtPoint)
return childAtPoint;
else
diff --git a/dw/widget.hh b/dw/widget.hh
index 1bcfd032..0515f250 100644
--- a/dw/widget.hh
+++ b/dw/widget.hh
@@ -162,7 +162,7 @@ protected:
/**
* \brief Set, when dw::core::Widget::requisition is not up to date
* anymore.
- */
+ */
NEEDS_RESIZE = 1 << 0,
/**
@@ -175,7 +175,7 @@ protected:
/**
* \brief Set, when dw::core::Widget::extremes is not up to date
* anymore.
- */
+ */
EXTREMES_CHANGED = 1 << 2,
/**
@@ -183,7 +183,7 @@ protected:
* methods are implemented.
*
* Will hopefully be removed, after redesigning the size model.
- */
+ */
USES_HINTS = 1 << 3,
/**
@@ -191,7 +191,7 @@ protected:
* some contents, e.g. an image, as opposed to a horizontal ruler.
*
* Will hopefully be removed, after redesigning the size model.
- */
+ */
HAS_CONTENTS = 1 << 4,
/**
@@ -266,7 +266,7 @@ protected:
inline void setFlags (Flags f) { flags = (Flags)(flags | f); }
inline void unsetFlags (Flags f) { flags = (Flags)(flags & ~f); }
-
+
inline void queueDraw ()
{
@@ -343,7 +343,7 @@ protected:
EventMotion *event, bool withinContent)
{ return layout->selectionState.buttonMotion (it, charPos, linkNo, event,
withinContent); }
-
+
inline bool selectionHandleEvent (SelectionState::EventType eventType,
Iterator *it, int charPos, int linkNo,
MousePositionEvent *event,
@@ -375,7 +375,7 @@ public:
inline void connectLink (LinkReceiver *receiver)
{ linkEmitter.connectLink (receiver); }
-
+
inline bool emitLinkEnter (int link, int img, int x, int y)
{ return linkEmitter.emitEnter (this, link, img, x, y); }
@@ -417,7 +417,7 @@ public:
bool motionNotify (EventMotion *event);
void enterNotify (EventCrossing *event);
void leaveNotify (EventCrossing *event);
-
+
virtual void setStyle (style::Style *style);
void setBgColor (style::Color *bgColor);
style::Color *getBgColor ();