diff --git a/FL/Fl_Flow.H b/FL/Fl_Flow.H
index ea5f976ff..ac1a97491 100644
--- a/FL/Fl_Flow.H
+++ b/FL/Fl_Flow.H
@@ -4,8 +4,6 @@
 #include <FL/Fl.H>
 #include <FL/Fl_Group.H>
 
-struct Fl_Instruction;
-struct Fl_State;
 
 struct Fl_Flow : Fl_Group {
   Fl_Flow(int x = 0, int y = 0, int w = 128, int h = 128, const char *label = 0);
@@ -22,6 +20,9 @@ struct Fl_Flow : Fl_Group {
   virtual void resize_callback(Fl_Callback *cb, void *ctx);
 
 private:
+  struct Fl_Instruction;
+  struct Fl_State;
+
   Fl_Instruction *m_instructions;
   Fl_State *m_states;
   int m_padding;
diff --git a/examples/howto-flow.cxx b/examples/howto-flow.cxx
new file mode 100644
index 000000000..c6827cc43
--- /dev/null
+++ b/examples/howto-flow.cxx
@@ -0,0 +1,36 @@
+#include <FL/Fl_Double_Window.H>
+#include <FL/Fl_Button.H>
+#include <FL/Fl_Flow.H>
+#include <FL/Fl_Input.H>
+#include <FL/Fl_Box.H>
+#include <FL/Fl_Multiline_Input.H>
+
+int main()
+{
+  Fl_Double_Window win(640, 480);
+  Fl_Flow flow(0, 0, win.w(), win.h());
+  Fl_Button button(0, 0, 100, 30, "Button");
+  Fl_Input text(0, 0, 150, 30);
+  Fl_Box sep(0, 0, 10, 1);
+  Fl_Multiline_Input area(0, 0, 10, 10);
+  Fl_Box sep2(0, 0, 10, 1);
+  Fl_Button button2(0, 0, 100, 30, "Button");
+  sep.color(FL_BLACK);
+  sep.box(FL_FLAT_BOX);
+  sep2.color(FL_BLACK);
+  sep2.box(FL_FLAT_BOX);
+
+  flow.rule(button, "^<");
+  flow.rule(text, "^<");
+  flow.rule(sep, "=<^");
+  flow.rule(area, "<^");
+  flow.rule(sep2, "=<^");
+  flow.rule(button2, "v");
+  flow.rule(sep2, "v");
+  flow.rule(area, "=>=v");
+
+  win.resizable(flow);
+  win.show();
+
+  return Fl::run();
+}
diff --git a/src/Fl_Flow.cxx b/src/Fl_Flow.cxx
index 774abcd70..771186a3c 100644
--- a/src/Fl_Flow.cxx
+++ b/src/Fl_Flow.cxx
@@ -135,7 +135,7 @@ struct Fl_Transform {
   }
 };
 
-struct Fl_Instruction {
+struct Fl_Flow::Fl_Instruction {
   static const int NONE = 0;
   static const int EXPAND = 50;
   static const int CENTER = 60;
@@ -218,7 +218,7 @@ struct Fl_Instruction {
   int m_instruction;
 };
 
-struct Fl_State {
+struct Fl_Flow::Fl_State {
   Fl_State()
     : m_widget(0)
     , m_next(0)
@@ -248,18 +248,18 @@ Fl_Flow::Fl_Flow(int x, int y, int w, int h, const char *label)
  */
 Fl_Flow::~Fl_Flow()
 {
-  Fl_Instruction *ci = m_instructions;
+  Fl_Flow::Fl_Instruction *ci = m_instructions;
 
   while (ci) {
-    Fl_Instruction *next = ci->m_next;
+    Fl_Flow::Fl_Instruction *next = ci->m_next;
     delete ci;
     ci = next;
   }
 
-  Fl_State *cs = m_states;
+  Fl_Flow::Fl_State *cs = m_states;
 
   while (cs) {
-    Fl_State *next = cs->m_next;
+    Fl_Flow::Fl_State *next = cs->m_next;
     delete cs;
     cs = next;
   }
@@ -283,7 +283,7 @@ void Fl_Flow::rule(Fl_Widget &widget, const char *instructions) {
 }
 
 void Fl_Flow::rule(Fl_Widget *widget, const char *instructions) {
-  int type = Fl_Instruction::NONE;
+  int type = Fl_Flow::Fl_Instruction::NONE;
 
   // we should assume that the widget has already been add()ed to the group
   // DO NOT:  add(widget);
@@ -297,24 +297,24 @@ void Fl_Flow::rule(Fl_Widget *widget, const char *instructions) {
     char c = instructions[ci];
 
     if (c == '=') {
-      type = Fl_Instruction::EXPAND;
+      type = Fl_Flow::Fl_Instruction::EXPAND;
       continue;
     } else if (c == '/') {
-      type = Fl_Instruction::CENTER;
+      type = Fl_Flow::Fl_Instruction::CENTER;
       continue;
     }
 
-    Fl_Instruction instruction;
+    Fl_Flow::Fl_Instruction instruction;
     instruction.m_widget = widget;
-    instruction.m_instruction = Fl_Instruction::decode(c, type);
+    instruction.m_instruction = Fl_Flow::Fl_Instruction::decode(c, type);
 
     if (instruction.m_instruction)
     {
-      Fl_Instruction *curr = m_instructions;
+      Fl_Flow::Fl_Instruction *curr = m_instructions;
 
       while (curr)
       {
-        Fl_Instruction *next = curr->m_next;
+        Fl_Flow::Fl_Instruction *next = curr->m_next;
 
         if (!next)
           break;
@@ -323,16 +323,16 @@ void Fl_Flow::rule(Fl_Widget *widget, const char *instructions) {
       }
 
       if (curr)
-        curr->m_next = new Fl_Instruction(instruction);
+        curr->m_next = new Fl_Flow::Fl_Instruction(instruction);
       else
-        m_instructions = new Fl_Instruction(instruction);
+        m_instructions = new Fl_Flow::Fl_Instruction(instruction);
     }
     else
     {
       fprintf(stderr, "Invalid instruction: '%c' '%d'\n", c, type);
     }
 
-    type = Fl_Instruction::NONE;
+    type = Fl_Flow::Fl_Instruction::NONE;
   }
 
   m_drawn = false; // force re-layout before drawing
@@ -346,7 +346,7 @@ void Fl_Flow::rule(Fl_Widget *widget, const char *instructions) {
 int Fl_Flow::min_size(Fl_Widget *widget, int w, int h) {
   int ret = 0;
 
-  Fl_State *curr = m_states;
+  Fl_Flow::Fl_State *curr = m_states;
 
   while (curr) {
     if (curr->m_widget == widget) {
@@ -409,16 +409,16 @@ void Fl_Flow::resize_callback(Fl_Callback *cb, void *ctx) {
 
 void Fl_Flow::process() {
   Fl_Transform pt(this, 0);
-  Fl_Instruction *ci = m_instructions;
+  Fl_Flow::Fl_Instruction *ci = m_instructions;
 
   while (ci)
   {
-    if (ci->m_instruction == Fl_Instruction::MOVE_LEFT || ci->m_instruction == Fl_Instruction::MOVE_RIGHT ||
-        ci->m_instruction == Fl_Instruction::MOVE_UP || ci->m_instruction == Fl_Instruction::MOVE_DOWN ||
-        ci->m_instruction == Fl_Instruction::EXPAND_LEFT || ci->m_instruction == Fl_Instruction::EXPAND_RIGHT ||
-        ci->m_instruction == Fl_Instruction::EXPAND_UP || ci->m_instruction == Fl_Instruction::EXPAND_DOWN ||
-        ci->m_instruction == Fl_Instruction::CENTER_LEFT || ci->m_instruction == Fl_Instruction::CENTER_RIGHT ||
-        ci->m_instruction == Fl_Instruction::CENTER_UP || ci->m_instruction == Fl_Instruction::CENTER_DOWN) {
+    if (ci->m_instruction == Fl_Flow::Fl_Instruction::MOVE_LEFT   || ci->m_instruction == Fl_Flow::Fl_Instruction::MOVE_RIGHT   ||
+        ci->m_instruction == Fl_Flow::Fl_Instruction::MOVE_UP     || ci->m_instruction == Fl_Flow::Fl_Instruction::MOVE_DOWN    ||
+        ci->m_instruction == Fl_Flow::Fl_Instruction::EXPAND_LEFT || ci->m_instruction == Fl_Flow::Fl_Instruction::EXPAND_RIGHT ||
+        ci->m_instruction == Fl_Flow::Fl_Instruction::EXPAND_UP   || ci->m_instruction == Fl_Flow::Fl_Instruction::EXPAND_DOWN  ||
+        ci->m_instruction == Fl_Flow::Fl_Instruction::CENTER_LEFT || ci->m_instruction == Fl_Flow::Fl_Instruction::CENTER_RIGHT ||
+        ci->m_instruction == Fl_Flow::Fl_Instruction::CENTER_UP   || ci->m_instruction == Fl_Flow::Fl_Instruction::CENTER_DOWN) {
       int xDir = ci->x_direction();
       int yDir = ci->y_direction();
 
@@ -428,17 +428,17 @@ void Fl_Flow::process() {
       int origHeight = wt.m_h;
 
       while (true) {
-        if (ci->m_instruction == Fl_Instruction::MOVE_LEFT || ci->m_instruction == Fl_Instruction::MOVE_RIGHT ||
-            ci->m_instruction == Fl_Instruction::MOVE_UP || ci->m_instruction == Fl_Instruction::MOVE_DOWN) {
+        if (ci->m_instruction == Fl_Flow::Fl_Instruction::MOVE_LEFT || ci->m_instruction == Fl_Flow::Fl_Instruction::MOVE_RIGHT ||
+            ci->m_instruction == Fl_Flow::Fl_Instruction::MOVE_UP   || ci->m_instruction == Fl_Flow::Fl_Instruction::MOVE_DOWN) {
           wt.translate(xDir, yDir);
-        } else if (ci->m_instruction == Fl_Instruction::EXPAND_LEFT ||
-                   ci->m_instruction == Fl_Instruction::EXPAND_RIGHT ||
-                   ci->m_instruction == Fl_Instruction::EXPAND_UP ||
-                   ci->m_instruction == Fl_Instruction::EXPAND_DOWN ||
-                   ci->m_instruction == Fl_Instruction::CENTER_LEFT ||
-                   ci->m_instruction == Fl_Instruction::CENTER_RIGHT ||
-                   ci->m_instruction == Fl_Instruction::CENTER_UP ||
-                   ci->m_instruction == Fl_Instruction::CENTER_DOWN) {
+        } else if (ci->m_instruction == Fl_Flow::Fl_Instruction::EXPAND_LEFT ||
+                   ci->m_instruction == Fl_Flow::Fl_Instruction::EXPAND_RIGHT ||
+                   ci->m_instruction == Fl_Flow::Fl_Instruction::EXPAND_UP ||
+                   ci->m_instruction == Fl_Flow::Fl_Instruction::EXPAND_DOWN ||
+                   ci->m_instruction == Fl_Flow::Fl_Instruction::CENTER_LEFT ||
+                   ci->m_instruction == Fl_Flow::Fl_Instruction::CENTER_RIGHT ||
+                   ci->m_instruction == Fl_Flow::Fl_Instruction::CENTER_UP ||
+                   ci->m_instruction == Fl_Flow::Fl_Instruction::CENTER_DOWN) {
           wt.scale(xDir, yDir);
         } else {
           fprintf(stderr, "Invalid instruction: '%d'\n", ci->m_instruction);
@@ -456,10 +456,10 @@ void Fl_Flow::process() {
         /*
          * Collide with *positioned* siblings
          */
-        Fl_State *cs = m_states;
+        Fl_Flow::Fl_State *cs = m_states;
 
         while (cs) {
-          Fl_State *s = cs;
+          Fl_Flow::Fl_State *s = cs;
           cs = cs->m_next;
 
           if (!s->m_placed)
@@ -486,10 +486,10 @@ void Fl_Flow::process() {
       wt.rollback();
       // wt.debug_output();
 
-      if (ci->m_instruction == Fl_Instruction::CENTER_LEFT ||
-          ci->m_instruction == Fl_Instruction::CENTER_RIGHT ||
-          ci->m_instruction == Fl_Instruction::CENTER_UP ||
-          ci->m_instruction == Fl_Instruction::CENTER_DOWN) {
+      if (ci->m_instruction == Fl_Flow::Fl_Instruction::CENTER_LEFT ||
+          ci->m_instruction == Fl_Flow::Fl_Instruction::CENTER_RIGHT ||
+          ci->m_instruction == Fl_Flow::Fl_Instruction::CENTER_UP ||
+          ci->m_instruction == Fl_Flow::Fl_Instruction::CENTER_DOWN) {
         wt.contract(origWidth, origHeight);
         wt.commit();
       }
@@ -500,7 +500,7 @@ void Fl_Flow::process() {
     /*
      * Flag widget as placed.
      */
-    Fl_State *cs = m_states;
+    Fl_Flow::Fl_State *cs = m_states;
 
     while (cs) {
       if (cs->m_widget == ci->m_widget) {
@@ -519,10 +519,10 @@ void Fl_Flow::prepare() {
   /*
    * Remove any states with invalid children
    */
-  Fl_State *cs = m_states;
-  Fl_State *ps = 0;
+  Fl_Flow::Fl_State *cs = m_states;
+  Fl_Flow::Fl_State *ps = 0;
   while (cs) {
-    Fl_State *next = cs->m_next;
+    Fl_Flow::Fl_State *next = cs->m_next;
 
     if (find(cs->m_widget) == children()) {
       if (ps)
@@ -541,11 +541,11 @@ void Fl_Flow::prepare() {
   /*
    * Remove any instructions with invalid children
    */
-  Fl_Instruction *ci = m_instructions;
-  Fl_Instruction *pi = 0;
+  Fl_Flow::Fl_Instruction *ci = m_instructions;
+  Fl_Flow::Fl_Instruction *pi = 0;
   while (ci)
   {
-    Fl_Instruction *next = ci->m_next;
+    Fl_Flow::Fl_Instruction *next = ci->m_next;
 
     if (find(ci->m_widget) == children()) { // not found
       if (pi)
@@ -566,7 +566,7 @@ void Fl_Flow::prepare() {
    */
   for (int ci = 0; ci < children(); ++ci) {
     bool found = false;
-    Fl_State *cs = m_states;
+    Fl_Flow::Fl_State *cs = m_states;
     while (cs) {
       if (child(ci) == cs->m_widget) {
         found = true;
@@ -576,12 +576,12 @@ void Fl_Flow::prepare() {
     }
 
     if (found == false) {
-      Fl_State s;
+      Fl_Flow::Fl_State s;
       s.m_widget = child(ci);
       s.m_w = child(ci)->w();
       s.m_h = child(ci)->h();
       s.m_next = m_states;
-      m_states = new Fl_State(s);
+      m_states = new Fl_Flow::Fl_State(s);
     }
   }
 
diff --git a/src/Makefile b/src/Makefile
index 1415be133..70cfeabe3 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -42,6 +42,7 @@ CPPFILES = \
 	Fl_File_Chooser2.cxx \
 	Fl_File_Icon.cxx \
 	Fl_File_Input.cxx \
+	Fl_Flow.cxx \
 	Fl_Graphics_Driver.cxx \
 	Fl_Group.cxx \
 	Fl_Help_View.cxx \
