diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-10-15 20:12:37 +0200 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-10-15 20:12:37 +0200 |
commit | 214f4d073de54ed1d7960210b41b1e9d0dc538da (patch) | |
tree | b99cc28c4d023c2bb991ab301af7d4f89dacb5e3 | |
parent | 5d4f5b8d2c471ef679f4929836e889f4ee9982fa (diff) |
remove "using namespace" statements from header files
"using namespace" in headers also affects all files that include the
header which is unwanted and unexpected in most cases.
-rw-r--r-- | dw/alignedtextblock.cc | 4 | ||||
-rw-r--r-- | dw/alignedtextblock.hh | 4 | ||||
-rw-r--r-- | dw/events.hh | 2 | ||||
-rw-r--r-- | dw/fltkimgbuf.cc | 6 | ||||
-rw-r--r-- | dw/fltkplatform.cc | 1 | ||||
-rw-r--r-- | dw/fltkui.cc | 10 | ||||
-rw-r--r-- | dw/fltkui.hh | 34 | ||||
-rw-r--r-- | dw/fltkviewbase.cc | 2 | ||||
-rw-r--r-- | dw/fltkviewport.cc | 1 | ||||
-rw-r--r-- | dw/fltkviewport.hh | 3 | ||||
-rw-r--r-- | dw/imgbuf.hh | 4 | ||||
-rw-r--r-- | dw/iterator.cc | 2 | ||||
-rw-r--r-- | dw/iterator.hh | 24 | ||||
-rw-r--r-- | dw/layout.cc | 1 | ||||
-rw-r--r-- | dw/layout.hh | 10 | ||||
-rw-r--r-- | dw/platform.hh | 2 | ||||
-rw-r--r-- | dw/selection.cc | 2 | ||||
-rw-r--r-- | dw/selection.hh | 2 | ||||
-rw-r--r-- | dw/style.cc | 2 | ||||
-rw-r--r-- | dw/style.hh | 18 | ||||
-rw-r--r-- | dw/table.cc | 1 | ||||
-rw-r--r-- | dw/table.hh | 26 | ||||
-rw-r--r-- | dw/textblock.cc | 2 | ||||
-rw-r--r-- | dw/textblock.hh | 10 | ||||
-rw-r--r-- | dw/types.cc | 2 | ||||
-rw-r--r-- | dw/types.hh | 10 | ||||
-rw-r--r-- | dw/ui.cc | 3 | ||||
-rw-r--r-- | dw/ui.hh | 2 | ||||
-rw-r--r-- | dw/view.hh | 2 | ||||
-rw-r--r-- | dw/widget.cc | 1 | ||||
-rw-r--r-- | dw/widget.hh | 2 | ||||
-rw-r--r-- | src/findbar.cc | 2 | ||||
-rw-r--r-- | src/findbar.hh | 22 | ||||
-rw-r--r-- | src/form.cc | 1 | ||||
-rw-r--r-- | src/html.cc | 1 | ||||
-rw-r--r-- | src/ui.hh | 28 | ||||
-rw-r--r-- | test/shapes.cc | 2 |
37 files changed, 129 insertions, 122 deletions
diff --git a/dw/alignedtextblock.cc b/dw/alignedtextblock.cc index ec39e2f0..dde408b2 100644 --- a/dw/alignedtextblock.cc +++ b/dw/alignedtextblock.cc @@ -26,8 +26,8 @@ namespace dw { AlignedTextblock::List::List () { - textblocks = new misc::SimpleVector <AlignedTextblock*> (4); - values = new misc::SimpleVector <int> (4); + textblocks = new lout::misc::SimpleVector <AlignedTextblock*> (4); + values = new lout::misc::SimpleVector <int> (4); maxValue = 0; refCount = 0; } diff --git a/dw/alignedtextblock.hh b/dw/alignedtextblock.hh index e855f1cc..7bac15bb 100644 --- a/dw/alignedtextblock.hh +++ b/dw/alignedtextblock.hh @@ -16,8 +16,8 @@ private: class List { private: - misc::SimpleVector <AlignedTextblock*> *textblocks; - misc::SimpleVector <int> *values; + lout::misc::SimpleVector <AlignedTextblock*> *textblocks; + lout::misc::SimpleVector <int> *values; int maxValue, refCount; ~List (); diff --git a/dw/events.hh b/dw/events.hh index 2bd36340..c29cb7f4 100644 --- a/dw/events.hh +++ b/dw/events.hh @@ -28,7 +28,7 @@ enum ButtonState * The dw::core::Event hierarchy describes events in a platform independent * way. */ -class Event: public object::Object +class Event: public lout::object::Object { public: }; diff --git a/dw/fltkimgbuf.cc b/dw/fltkimgbuf.cc index 48339b51..6ba7ff1d 100644 --- a/dw/fltkimgbuf.cc +++ b/dw/fltkimgbuf.cc @@ -33,7 +33,7 @@ using namespace fltk; namespace dw { namespace fltk { -using namespace container::typed; +using namespace lout::container::typed; FltkImgbuf::FltkImgbuf (Type type, int width, int height) { @@ -67,11 +67,11 @@ void FltkImgbuf::init (Type type, int width, int height, FltkImgbuf *root) refCount = 1; deleteOnUnref = true; - copiedRows = new misc::BitSet (height); + copiedRows = new lout::misc::BitSet (height); // The list is only used for root buffers. if (isRoot()) - scaledBuffers = new container::typed::List <FltkImgbuf> (true); + scaledBuffers = new lout::container::typed::List <FltkImgbuf> (true); else scaledBuffers = NULL; diff --git a/dw/fltkplatform.cc b/dw/fltkplatform.cc index 3309d5c5..90244c12 100644 --- a/dw/fltkplatform.cc +++ b/dw/fltkplatform.cc @@ -34,6 +34,7 @@ namespace dw { namespace fltk { using namespace ::fltk; +using namespace lout; /** * \todo Distinction between italics and oblique would be nice. diff --git a/dw/fltkui.cc b/dw/fltkui.cc index aba6e1fe..51100710 100644 --- a/dw/fltkui.cc +++ b/dw/fltkui.cc @@ -47,8 +47,8 @@ namespace ui { enum { RELIEF_X_THICKNESS = 3, RELIEF_Y_THICKNESS = 3 }; -using namespace object; -using namespace container::typed; +using namespace lout::object; +using namespace lout::container::typed; FltkResource::FltkResource (FltkPlatform *platform) { @@ -71,7 +71,7 @@ FltkResource::FltkResource (FltkPlatform *platform) */ void FltkResource::init (FltkPlatform *platform) { - viewsAndWidgets = new container::typed::List <ViewAndWidget> (true); + viewsAndWidgets = new lout::container::typed::List <ViewAndWidget> (true); platform->attachResource (this); } @@ -393,7 +393,7 @@ FltkComplexButtonResource::FltkComplexButtonResource (FltkPlatform *platform, *widget, bool relief): FltkSpecificResource <dw::core::ui::ComplexButtonResource> (platform) { - viewsAndViews = new container::typed::List <ViewAndView> (true); + viewsAndViews = new lout::container::typed::List <ViewAndView> (true); this->relief = relief; FltkResource::init (platform); ComplexButtonResource::init (widget); @@ -853,7 +853,7 @@ void FltkRadioButtonResource::Group::FltkGroupIterator::unref () FltkRadioButtonResource::Group::Group (FltkRadioButtonResource *radioButtonResource) { - list = new container::typed::List <FltkRadioButtonResource> (false); + list = new lout::container::typed::List <FltkRadioButtonResource> (false); connect (radioButtonResource); } diff --git a/dw/fltkui.hh b/dw/fltkui.hh index 109fc0e5..c8bc8de4 100644 --- a/dw/fltkui.hh +++ b/dw/fltkui.hh @@ -14,8 +14,6 @@ namespace dw { namespace fltk { -using namespace lout; - /** * \brief FLTK implementation of dw::core::ui. * @@ -174,20 +172,20 @@ namespace ui { /** * ... */ -class FltkResource: public object::Object +class FltkResource: public lout::object::Object { private: bool enabled; protected: - class ViewAndWidget: public object::Object + class ViewAndWidget: public lout::object::Object { public: FltkView *view; ::fltk::Widget *widget; }; - container::typed::List <ViewAndWidget> *viewsAndWidgets; + lout::container::typed::List <ViewAndWidget> *viewsAndWidgets; core::Allocation allocation; FltkPlatform *platform; @@ -262,7 +260,7 @@ private: static void widgetCallback (::fltk::Widget *widget, void *data); protected: - class ViewAndView: public object::Object + class ViewAndView: public lout::object::Object { public: FltkView *topView, *flatView; @@ -270,7 +268,7 @@ protected: FltkView *lastFlatView; - container::typed::List <ViewAndView> *viewsAndViews; + lout::container::typed::List <ViewAndView> *viewsAndViews; void attachView (FltkView *view); void detachView (FltkView *view); @@ -396,10 +394,10 @@ private: public dw::core::ui::RadioButtonResource::GroupIterator { private: - container::typed::Iterator <FltkRadioButtonResource> it; + lout::container::typed::Iterator <FltkRadioButtonResource> it; public: - inline FltkGroupIterator (container::typed::List + inline FltkGroupIterator (lout::container::typed::List <FltkRadioButtonResource> *list) { it = list->iterator (); } @@ -409,7 +407,7 @@ private: void unref (); }; - container::typed::List <FltkRadioButtonResource> *list; + lout::container::typed::List <FltkRadioButtonResource> *list; protected: ~Group (); @@ -417,7 +415,7 @@ private: public: Group (FltkRadioButtonResource *radioButtonResource); - inline container::typed::Iterator <FltkRadioButtonResource> iterator () + inline lout::container::typed::Iterator <FltkRadioButtonResource> iterator () { return list->iterator (); } @@ -454,7 +452,7 @@ template <class I> class FltkSelectionResource: public FltkSpecificResource <I> { protected: - class Item: public object::Object + class Item: public lout::object::Object { public: enum Type { ITEM, START, END } type; @@ -470,19 +468,19 @@ protected: ::fltk::ItemGroup *createNewGroupWidget (); }; - class WidgetStack: public object::Object + class WidgetStack: public lout::object::Object { public: ::fltk::Menu *widget; - container::typed::Stack <object::TypedPointer < ::fltk::Menu> > *stack; + lout::container::typed::Stack <lout::object::TypedPointer < ::fltk::Menu> > *stack; WidgetStack (::fltk::Menu *widget); ~WidgetStack (); }; - container::typed::List <WidgetStack> *widgetStacks; - container::typed::List <Item> *allItems; - container::typed::Vector <Item> *items; + lout::container::typed::List <WidgetStack> *widgetStacks; + lout::container::typed::List <Item> *allItems; + lout::container::typed::Vector <Item> *items; Item *createNewItem (typename Item::Type type, const char *name = NULL, @@ -540,7 +538,7 @@ protected: private: static void widgetCallback (::fltk::Widget *widget, void *data); - misc::SimpleVector <bool> itemsSelected; + lout::misc::SimpleVector <bool> itemsSelected; int showRows; ListResource::SelectionMode mode; public: diff --git a/dw/fltkviewbase.cc b/dw/fltkviewbase.cc index 37cce590..7969665f 100644 --- a/dw/fltkviewbase.cc +++ b/dw/fltkviewbase.cc @@ -73,7 +73,7 @@ void FltkViewBase::draw () int d = damage (); if ((d & DAMAGE_VALUE) && !(d & DAMAGE_EXPOSE)) { - container::typed::Iterator <core::Rectangle> it; + lout::container::typed::Iterator <core::Rectangle> it; for (it = drawRegion.rectangles (); it.hasNext (); ) { draw (it.getNext (), DRAW_BUFFERED); diff --git a/dw/fltkviewport.cc b/dw/fltkviewport.cc index fa6d9bc3..dd779a8f 100644 --- a/dw/fltkviewport.cc +++ b/dw/fltkviewport.cc @@ -29,6 +29,7 @@ #include "../lout/msg.h" using namespace fltk; +using namespace lout; using namespace lout::object; using namespace lout::container::typed; diff --git a/dw/fltkviewport.hh b/dw/fltkviewport.hh index 38f9310d..1e7f54f6 100644 --- a/dw/fltkviewport.hh +++ b/dw/fltkviewport.hh @@ -26,7 +26,8 @@ private: ::fltk::Scrollbar *vscrollbar, *hscrollbar; GadgetOrientation gadgetOrientation[4]; - container::typed::List <object::TypedPointer < ::fltk::Widget> > *gadgets; + lout::container::typed::List <lout::object::TypedPointer < ::fltk::Widget> > + *gadgets; void adjustScrollbarsAndGadgetsAllocation (); void adjustScrollbarValues (); diff --git a/dw/imgbuf.hh b/dw/imgbuf.hh index 1e49db68..150bf165 100644 --- a/dw/imgbuf.hh +++ b/dw/imgbuf.hh @@ -8,8 +8,6 @@ namespace dw { namespace core { -using namespace lout; - /** * \brief The platform independent interface for image buffers. * @@ -158,7 +156,7 @@ using namespace lout; * * \sa \ref dw-images-and-backgrounds */ -class Imgbuf: public object::Object, public lout::signal::ObservedObject +class Imgbuf: public lout::object::Object, public lout::signal::ObservedObject { public: enum Type { RGB, RGBA, GRAY, INDEXED, INDEXED_ALPHA }; diff --git a/dw/iterator.cc b/dw/iterator.cc index 6bd950cc..ef37cbc2 100644 --- a/dw/iterator.cc +++ b/dw/iterator.cc @@ -22,6 +22,8 @@ #include "core.hh" #include <limits.h> +using namespace lout; + namespace dw { namespace core { diff --git a/dw/iterator.hh b/dw/iterator.hh index 89b9faac..838d66a1 100644 --- a/dw/iterator.hh +++ b/dw/iterator.hh @@ -16,7 +16,7 @@ namespace core { * * \sa dw::core::Widget::iterator */ -class Iterator: public object::Object, public misc::Comparable +class Iterator: public lout::object::Object, public lout::misc::Comparable { protected: Iterator(Widget *widget, Content::Type mask, bool atEnd); @@ -100,8 +100,8 @@ private: public: EmptyIterator (Widget *widget, Content::Type mask, bool atEnd); - object::Object *clone(); - int compareTo(misc::Comparable *other); + lout::object::Object *clone(); + int compareTo(lout::misc::Comparable *other); bool next (); bool prev (); void highlight (int start, int end, HighlightLayer layer); @@ -126,7 +126,7 @@ public: TextIterator (Widget *widget, Content::Type mask, bool atEnd, const char *text); - int compareTo(misc::Comparable *other); + int compareTo(lout::misc::Comparable *other); bool next (); bool prev (); @@ -142,13 +142,13 @@ public: * iterators do not have the limitation, that iteration is only done within * a widget, instead, child widgets are iterated through recursively. */ -class DeepIterator: public object::Object, public misc::Comparable +class DeepIterator: public lout::object::Object, public lout::misc::Comparable { private: - class Stack: public container::typed::Vector<Iterator> + class Stack: public lout::container::typed::Vector<Iterator> { public: - inline Stack (): container::typed::Vector<Iterator> (4, false) { } + inline Stack (): lout::container::typed::Vector<Iterator> (4, false) { } ~Stack (); inline Iterator *getTop () { return get (size () - 1); } inline void push (Iterator *it) { put(it, -1); } @@ -172,7 +172,7 @@ public: DeepIterator(Iterator *it); ~DeepIterator(); - object::Object *clone (); + lout::object::Object *clone (); DeepIterator *createVariant(Iterator *it); inline Iterator *getTopIterator () { return stack.getTop(); } @@ -183,7 +183,7 @@ public: bool next (); bool prev (); inline DeepIterator *cloneDeepIterator() { return (DeepIterator*)clone(); } - int compareTo(misc::Comparable *other); + int compareTo(lout::misc::Comparable *other); /** * \brief Highlight a part of the current content. @@ -216,7 +216,7 @@ public: start, end, hpos, vpos); } }; -class CharIterator: public object::Object, public misc::Comparable +class CharIterator: public lout::object::Object, public lout::misc::Comparable { public: // START and END must not clash with any char value @@ -233,8 +233,8 @@ public: CharIterator (Widget *widget); ~CharIterator (); - object::Object *clone(); - int compareTo(misc::Comparable *other); + lout::object::Object *clone(); + int compareTo(lout::misc::Comparable *other); bool next (); bool prev (); diff --git a/dw/layout.cc b/dw/layout.cc index 2d350a05..3cbc0791 100644 --- a/dw/layout.cc +++ b/dw/layout.cc @@ -25,6 +25,7 @@ #include "../lout/debug.hh" #include "../lout/misc.hh" +using namespace lout; using namespace lout::container; using namespace lout::object; diff --git a/dw/layout.hh b/dw/layout.hh index bd7e191d..36a5f17b 100644 --- a/dw/layout.hh +++ b/dw/layout.hh @@ -13,7 +13,7 @@ namespace core { * * \sa\ref dw-overview, \ref dw-layout-widgets, \ref dw-layout-views */ -class Layout: public object::Object +class Layout: public lout::object::Object { friend class Widget; @@ -47,7 +47,7 @@ private: Emitter emitter; - class Anchor: public object::Object + class Anchor: public lout::object::Object { public: char *name; @@ -58,7 +58,7 @@ private: }; Platform *platform; - container::typed::List <View> *views; + lout::container::typed::List <View> *views; Widget *topLevel, *widgetAtPoint; /* The state, which must be projected into the views. */ @@ -80,7 +80,7 @@ private: bool scrollIdleNotInterrupted; /* Anchors of the widget tree */ - container::typed::HashTable <object::String, Anchor> *anchorsTable; + lout::container::typed::HashTable <lout::object::String, Anchor> *anchorsTable; SelectionState selectionState; FindtextState findtextState; @@ -141,7 +141,7 @@ public: Layout (Platform *platform); ~Layout (); - misc::ZoneAllocator *textZone; + lout::misc::ZoneAllocator *textZone; void addWidget (Widget *widget); void setWidget (Widget *widget); diff --git a/dw/platform.hh b/dw/platform.hh index d31fb6f9..4b1acdb9 100644 --- a/dw/platform.hh +++ b/dw/platform.hh @@ -13,7 +13,7 @@ namespace core { * * \sa\ref dw-overview */ -class Platform: public object::Object +class Platform: public lout::object::Object { public: /* diff --git a/dw/selection.cc b/dw/selection.cc index 5b9d4e16..08d3bf00 100644 --- a/dw/selection.cc +++ b/dw/selection.cc @@ -23,6 +23,8 @@ #include <string.h> +using namespace lout; + /* * strndup() is a GNU extension. */ diff --git a/dw/selection.hh b/dw/selection.hh index 5aa9dc48..2e84c385 100644 --- a/dw/selection.hh +++ b/dw/selection.hh @@ -8,8 +8,6 @@ namespace dw { namespace core { -using namespace lout; - /** * \brief This class handles selections, as well as activation of links, * which is closely related. diff --git a/dw/style.cc b/dw/style.cc index b284964f..64827a9e 100644 --- a/dw/style.cc +++ b/dw/style.cc @@ -27,6 +27,8 @@ #include "core.hh" #include "../lout/msg.h" +using namespace lout; + namespace dw { namespace core { namespace style { diff --git a/dw/style.hh b/dw/style.hh index e21cacc1..c0b41d1d 100644 --- a/dw/style.hh +++ b/dw/style.hh @@ -406,7 +406,7 @@ class Tooltip; /** * \sa dw::core::style */ -class StyleAttrs : public object::Object +class StyleAttrs : public lout::object::Object { public: Font *font; @@ -467,7 +467,7 @@ public: inline bool hasBackground () { return backgroundColor != NULL; } - bool equals (object::Object *other); + bool equals (lout::object::Object *other); int hashValue (); }; @@ -480,7 +480,7 @@ class Style: public StyleAttrs private: static int totalRef; int refCount; - static container::typed::HashTable <StyleAttrs, Style> *styleTable; + static lout::container::typed::HashTable <StyleAttrs, Style> *styleTable; Style (StyleAttrs *attrs); @@ -510,10 +510,10 @@ public: /** * \sa dw::core::style */ -class TooltipAttrs: public object::String +class TooltipAttrs: public lout::object::String { public: - TooltipAttrs(const char *text): object::String(text) { } + TooltipAttrs(const char *text): lout::object::String(text) { } }; /** @@ -542,7 +542,7 @@ public: /** * \sa dw::core::style */ -class FontAttrs: public object::Object +class FontAttrs: public lout::object::Object { public: const char *name; @@ -550,7 +550,7 @@ public: int weight; FontStyle style; - bool equals(object::Object *other); + bool equals(lout::object::Object *other); int hashValue(); }; @@ -588,7 +588,7 @@ public: /** * \sa dw::core::style */ -class ColorAttrs: public object::Object +class ColorAttrs: public lout::object::Object { protected: int color; @@ -601,7 +601,7 @@ public: inline int getColor () { return color; } - bool equals(object::Object *other); + bool equals(lout::object::Object *other); int hashValue(); }; diff --git a/dw/table.cc b/dw/table.cc index 291674aa..b8c675ed 100644 --- a/dw/table.cc +++ b/dw/table.cc @@ -25,6 +25,7 @@ #define MAX misc::max +using namespace lout; namespace dw { diff --git a/dw/table.hh b/dw/table.hh index 004c22cb..b7264336 100644 --- a/dw/table.hh +++ b/dw/table.hh @@ -361,8 +361,8 @@ private: TableIterator (Table *table, core::Content::Type mask, bool atEnd); TableIterator (Table *table, core::Content::Type mask, int index); - object::Object *clone(); - int compareTo(misc::Comparable *other); + lout::object::Object *clone(); + int compareTo(lout::misc::Comparable *other); bool next (); bool prev (); @@ -377,37 +377,37 @@ private: int availWidth, availAscent, availDescent; // set by set... int numRows, numCols, curRow, curCol; - misc::SimpleVector<Child*> *children; + lout::misc::SimpleVector<Child*> *children; int redrawX, redrawY; /** * \brief The extremes of all columns. */ - misc::SimpleVector<core::Extremes> *colExtremes; + lout::misc::SimpleVector<core::Extremes> *colExtremes; /** * \brief The widths of all columns. */ - misc::SimpleVector<int> *colWidths; + lout::misc::SimpleVector<int> *colWidths; /** * Row cumulative height array: cumHeight->size() is numRows + 1, * cumHeight->get(0) is 0, cumHeight->get(numRows) is the total table * height. */ - misc::SimpleVector<int> *cumHeight; + lout::misc::SimpleVector<int> *cumHeight; /** * If a Cell has rowspan > 1, it goes into this array */ - misc::SimpleVector<int> *rowSpanCells; + lout::misc::SimpleVector<int> *rowSpanCells; /** * If a Cell has colspan > 1, it goes into this array */ - misc::SimpleVector<int> *colSpanCells; - misc::SimpleVector<int> *baseline; + lout::misc::SimpleVector<int> *colSpanCells; + lout::misc::SimpleVector<int> *baseline; - misc::SimpleVector<core::style::Style*> *rowStyle; + lout::misc::SimpleVector<core::style::Style*> *rowStyle; /** * hasColPercent becomes true when any cell specifies a percentage width. @@ -415,7 +415,7 @@ private: */ enum { LEN_AUTO = -1, LEN_ABS = -2}; int hasColPercent; - misc::SimpleVector<float> *colPercents; + lout::misc::SimpleVector<float> *colPercents; inline bool childDefined(int n) { @@ -438,7 +438,7 @@ private: void setCumHeight (int row, int value) { if (value != cumHeight->get (row)) { - redrawY = misc::min ( redrawY, value ); + redrawY = lout::misc::min ( redrawY, value ); cumHeight->set (row, value); } } @@ -446,7 +446,7 @@ private: inline void setColWidth (int col, int value) { if (value != colWidths->get (col)) { - redrawX = misc::min (redrawX, value); + redrawX = lout::misc::min (redrawX, value); colWidths->set (col, value); } } diff --git a/dw/textblock.cc b/dw/textblock.cc index 81ad7113..94e3d8ea 100644 --- a/dw/textblock.cc +++ b/dw/textblock.cc @@ -26,6 +26,8 @@ #include <stdio.h> #include <limits.h> +using namespace lout; + namespace dw { int Textblock::CLASS_ID = -1; diff --git a/dw/textblock.hh b/dw/textblock.hh index 1bf0256e..94dffbac 100644 --- a/dw/textblock.hh +++ b/dw/textblock.hh @@ -6,8 +6,6 @@ namespace dw { -using namespace lout; - /** * \brief A Widget for rendering text blocks, i.e. paragraphs or sequences * of paragraphs. @@ -185,8 +183,8 @@ protected: TextblockIterator (Textblock *textblock, core::Content::Type mask, int index); - object::Object *clone(); - int compareTo(misc::Comparable *other); + lout::object::Object *clone(); + int compareTo(lout::misc::Comparable *other); bool next (); bool prev (); @@ -239,8 +237,8 @@ protected: int lastLineParMax; int wrapRef; /* [0 based] */ - misc::SimpleVector <Line> *lines; - misc::SimpleVector <Word> *words; + lout::misc::SimpleVector <Line> *lines; + lout::misc::SimpleVector <Word> *words; struct {int index, nChar;} hlStart[core::HIGHLIGHT_NUM_LAYERS], hlEnd[core::HIGHLIGHT_NUM_LAYERS]; diff --git a/dw/types.cc b/dw/types.cc index 057e48fe..05665909 100644 --- a/dw/types.cc +++ b/dw/types.cc @@ -22,6 +22,8 @@ #include "core.hh" #include "../lout/msg.h" +using namespace lout; + namespace dw { namespace core { diff --git a/dw/types.hh b/dw/types.hh index 4ebe9490..d21d58a2 100644 --- a/dw/types.hh +++ b/dw/types.hh @@ -8,8 +8,6 @@ namespace dw { namespace core { -using namespace lout; - enum HPosition { HPOS_LEFT, @@ -52,7 +50,7 @@ struct Point /** * \brief Abstract interface for different shapes. */ -class Shape: public object::Object +class Shape: public lout::object::Object { public: virtual bool isPointWithin (int x, int y) = 0; @@ -97,7 +95,7 @@ public: class Polygon: public Shape { private: - misc::SimpleVector<Point> *points; + lout::misc::SimpleVector<Point> *points; int minx, miny, maxx, maxy; /** @@ -132,7 +130,7 @@ public: class Region { private: - container::typed::List <Rectangle> *rectangleList; + lout::container::typed::List <Rectangle> *rectangleList; public: Region (); @@ -142,7 +140,7 @@ public: void addRectangle (Rectangle *r); - container::typed::Iterator <Rectangle> rectangles () + lout::container::typed::Iterator <Rectangle> rectangles () { return rectangleList->iterator (); }; @@ -27,7 +27,8 @@ namespace dw { namespace core { namespace ui { -using namespace object; +using namespace lout; +using namespace lout::object; int Embed::CLASS_ID = -1; @@ -531,7 +531,7 @@ public: /** * \brief A factory for the common resource. */ -class ResourceFactory: public object::Object +class ResourceFactory: public lout::object::Object { public: virtual LabelButtonResource *createLabelButtonResource (const char *label) @@ -13,7 +13,7 @@ namespace core { * * \sa\ref dw-overview, \ref dw-layout-views */ -class View: public object::Object +class View: public lout::object::Object { public: /* diff --git a/dw/widget.cc b/dw/widget.cc index 289ef380..0555b571 100644 --- a/dw/widget.cc +++ b/dw/widget.cc @@ -24,6 +24,7 @@ #include "../lout/msg.h" #include "../lout/debug.hh" +using namespace lout; using namespace lout::object; namespace dw { diff --git a/dw/widget.hh b/dw/widget.hh index 569d7d6d..56f115f6 100644 --- a/dw/widget.hh +++ b/dw/widget.hh @@ -20,7 +20,7 @@ namespace core { * * \sa\ref dw-overview, \ref dw-layout-widgets */ -class Widget: public identity::IdentifiableObject +class Widget: public lout::identity::IdentifiableObject { friend class Layout; diff --git a/src/findbar.cc b/src/findbar.cc index d35719d6..8cca52ba 100644 --- a/src/findbar.cc +++ b/src/findbar.cc @@ -18,6 +18,8 @@ #include "uicmd.hh" #include "bw.h" +using namespace fltk; + /* * Local sub class * (Used to handle escape in the findbar, may also avoid some shortcuts). diff --git a/src/findbar.hh b/src/findbar.hh index 84922ac0..ba7ed8ed 100644 --- a/src/findbar.hh +++ b/src/findbar.hh @@ -9,22 +9,20 @@ #include <fltk/Group.h> #include <fltk/CheckButton.h> -using namespace fltk; - /* * Searchbar to find text in page. */ -class Findbar : public Group { - Button *clrb; - HighlightButton *hide_btn, *next_btn, *prev_btn; - CheckButton *check_btn; - xpmImage *hideImg; - Input *i; +class Findbar : public fltk::Group { + fltk::Button *clrb; + fltk::HighlightButton *hide_btn, *next_btn, *prev_btn; + fltk::CheckButton *check_btn; + fltk::xpmImage *hideImg; + fltk::Input *i; - static void search_cb (Widget *, void *); - static void searchBackwards_cb (Widget *, void *); - static void search_cb2 (Widget *, void *); - static void hide_cb (Widget *, void *); + static void search_cb (fltk::Widget *, void *); + static void searchBackwards_cb (fltk::Widget *, void *); + static void search_cb2 (fltk::Widget *, void *); + static void hide_cb (fltk::Widget *, void *); public: Findbar(int width, int height); diff --git a/src/form.cc b/src/form.cc index 920bc548..bf1b12e0 100644 --- a/src/form.cc +++ b/src/form.cc @@ -25,6 +25,7 @@ #include "nav.h" #include "uicmd.hh" +using namespace lout; using namespace dw; using namespace dw::core; using namespace dw::core::style; diff --git a/src/html.cc b/src/html.cc index 8c1a9519..51ac1543 100644 --- a/src/html.cc +++ b/src/html.cc @@ -58,6 +58,7 @@ /*----------------------------------------------------------------------------- * Name spaces *---------------------------------------------------------------------------*/ +using namespace lout; using namespace dw; using namespace dw::core; using namespace dw::core::ui; @@ -16,8 +16,6 @@ #include "findbar.hh" -using namespace fltk; - typedef enum { UI_BACK = 0, UI_FORW, @@ -48,15 +46,15 @@ class UI : public fltk::Group { CustTabGroup *Tabs; char *TabTooltip; - Group *TopGroup; - Button *Back, *Forw, *Home, *Reload, *Save, *Stop, *Bookmarks, *Tools, + fltk::Group *TopGroup; + fltk::Button *Back, *Forw, *Home, *Reload, *Save, *Stop, *Bookmarks, *Tools, *Clear, *Search, *FullScreen, *BugMeter, *FileButton; - Input *Location; - PackedGroup *ProgBox; + fltk::Input *Location; + fltk::PackedGroup *ProgBox; CustProgressBox *PProg, *IProg; - Group *Panel, *StatusPanel; - Widget *Main; - Output *Status; + fltk::Group *Panel, *StatusPanel; + fltk::Widget *Main; + fltk::Output *Status; int MainIdx; // Panel customization variables @@ -67,13 +65,13 @@ class UI : public fltk::Group { Findbar *findbar; int PointerOnLink; - PackedGroup *make_toolbar(int tw, int th); - PackedGroup *make_location(); - PackedGroup *make_progress_bars(int wide, int thin_up); + fltk::PackedGroup *make_toolbar(int tw, int th); + fltk::PackedGroup *make_location(); + fltk::PackedGroup *make_progress_bars(int wide, int thin_up); void make_menubar(int x, int y, int w, int h); - Widget *make_filemenu_button(); - Group *make_panel(int ww); - Group *make_status_panel(int ww); + fltk::Widget *make_filemenu_button(); + fltk::Group *make_panel(int ww); + fltk::Group *make_status_panel(int ww); public: diff --git a/test/shapes.cc b/test/shapes.cc index b20c5419..30aa7d81 100644 --- a/test/shapes.cc +++ b/test/shapes.cc @@ -22,7 +22,7 @@ #include "../dw/core.hh" using namespace dw::core; -using namespace misc; +using namespace lout::misc; int main() { |