ONOS-6391: writing API readme's for the following modules:
- dialog
- event
- filter
- force

Change-Id: I38208b1eb0fccfe5300361cd3605b2ea1befe5a1
diff --git a/web/gui/src/main/webapp/_doc/view/topo/README.dialog.md b/web/gui/src/main/webapp/_doc/view/topo/README.dialog.md
index 9089999..33f8d5e 100644
--- a/web/gui/src/main/webapp/_doc/view/topo/README.dialog.md
+++ b/web/gui/src/main/webapp/_doc/view/topo/README.dialog.md
@@ -5,5 +5,16 @@
 
 ### Function Descriptions
 
-`foo()`
+`openDialog()`
+* Opens the topology view dialog box
+
+`closeDialog()`
+* Closes the topology view dialog box
+
+`createDiv(cls)`
+* `cls`: CSS class to assign (optional)
+* Creates a (detached) _div_ element
+* If `cls` is defined, it is applied as a CSS class
+  to the _div_
+* Returns a D3 selection of that _div_
 
diff --git a/web/gui/src/main/webapp/_doc/view/topo/README.event.md b/web/gui/src/main/webapp/_doc/view/topo/README.event.md
index 0894c09..9c3a1ea 100644
--- a/web/gui/src/main/webapp/_doc/view/topo/README.event.md
+++ b/web/gui/src/main/webapp/_doc/view/topo/README.event.md
@@ -5,5 +5,12 @@
 
 ### Function Descriptions
 
-`foo()`
+`bindHandlers()`
+* Binds the topology view event handlers to the web socket service
+
+`start()`
+* Initiates topology view by sending "start" event to server
+
+`stop()`
+* Deactivates topology view by sending "stop" event to server
 
diff --git a/web/gui/src/main/webapp/_doc/view/topo/README.filter.md b/web/gui/src/main/webapp/_doc/view/topo/README.filter.md
index 4cc4466..eb9b47e 100644
--- a/web/gui/src/main/webapp/_doc/view/topo/README.filter.md
+++ b/web/gui/src/main/webapp/_doc/view/topo/README.filter.md
@@ -5,5 +5,21 @@
 
 ### Function Descriptions
 
-`foo()`
+`initFilter(api)`
+* `api`: reverse linkage to topoForce module
+  * `node()`: reference to D3 node selection
+  * `link()`: reference to D3 link selection
+* Initializes this module with a function API to other modules
 
+`clickAction()`
+* Increments filter mode index and re-renders nodes and links
+  to highlight those in the newly selected layer
+
+`selected()`
+* Returns the currently selected "layer"
+  * (`all`, `pkt`, or `opt`)
+
+`inLayer(d, layer)`
+* `d`: model data (link, host, device)
+* `layer`: layer id (e.g. `pkt`)
+* Returns true if the given element is "in" the specified layer
diff --git a/web/gui/src/main/webapp/_doc/view/topo/README.force.md b/web/gui/src/main/webapp/_doc/view/topo/README.force.md
index b13b914..bbdfc45 100644
--- a/web/gui/src/main/webapp/_doc/view/topo/README.force.md
+++ b/web/gui/src/main/webapp/_doc/view/topo/README.force.md
@@ -5,5 +5,111 @@
 
 ### Function Descriptions
 
-`foo()`
+`initForce(svg, forceG, uplink, dim, opts)`
+* `svg`: D3 selection of _svg_ element for force layout rendering
+* `forceG`: D3 selection of force layout _SVG_ group element
+* `uplink`: API uplink to main _topo.js_ module
+  * `showNoDevs(b)` - show or hide _no connected devices_ message
+  * `projection()` - return ref to map projection object
+  * `zoomLayer()` - return ref to zoom layer element
+  * `zoomer()` - return ref to zoomer object
+  * `opacifyMap(b)` - show or hide map layer
+  * `topoStartDone()` - callback invoked after topo data
+     has been received from server
+* `dim`: initial dimensions of _SVG_ ... `[w, h]`
+* `opts`: options object
+  * can be used to override default settings
+  * _gravity_, _friction_, _charge_, _linkDistance_, _linkStrength_
 
+`newDim()`
+* `dim`: new dimensions ... `[w, h]`
+* Sets new dimensions of force layout
+
+`destroyForce()`
+* Frees up all resources, cancels timers, cleans up DOM
+
+`updateDeviceColors()`
+* Delegates to _topoD3.js_ function of same name
+
+`toggleHosts(x)`
+* `x`: boolean (optional)
+* If `x` is not defined, toggles host visibility
+* If `x` is defined, sets or clears host visibility
+
+`togglePorts()`
+* `x`: boolean (optional)
+* If `x` is not defined, toggles port labels visibility
+* If `x` is defined, sets or clears port labels visibility
+
+`toggleOffline()`
+* `x`: boolean (optional)
+* If `x` is not defined, toggles offline devices visibility
+* If `x` is defined, sets or clears offline devices visibility
+
+`cycleDeviceLabels()`
+* Increments the device label mode and re-renders device labels
+
+`unpin()`
+* will _unpin_ a node over which the mouse currently hovers
+
+`showMastership(masterId)`
+* `masterId`: ONOS instance identifier (e.g. IP address)
+* If `masterId` is defined, will render the display to highlight
+  those devices mastered by the given cluster member
+* If `masterId` is not defined, restores the display
+
+`showBadLinks()`
+* Will briefly highlight links for which there is only a single backing link
+* Also writes a summary of bad links to the console
+
+`setNodeScale()`
+* `scale`: the scale to use
+* Rescales the nodes and links (and labels) based on the input parameter
+
+`resetAllLocations()`
+* Resets all nodes (hosts, devices) to the configured positions
+
+`addDevice(data)`
+* `data`: add-device event payload
+* Adds a device to the model (and renders it)
+
+`updateDevice(data)`
+* `data`: update-device event payload
+* Updates information for a device (re-rendering it)
+
+`removeDevice(data)`
+* `data`: remove-device event payload
+* Removes a device from the model (and animates its removal)
+
+`addHost(data)`
+* `data`: add-host event payload
+* Adds a host to the model (and renders it if hosts visible)
+
+`updateHost(data)`
+* `data`: update-host event payload
+* Updates information for a host (re-rendering it)
+
+`moveHost(data)`
+* `data`: move-host event payload
+* Updates information for a host to move it to a new location
+  (re-rendering it if hosts visible)
+
+`removeHost(data)`
+* `data`: remove-host event payload
+* Removes host from the model (and animates removal if hosts visible)
+
+`addLink(data)`
+* `data`: add-link event payload
+* Adds a link to the model (and renders it)
+
+`updateLink(data)`
+* `data`: update-link event payload
+* Updates information for a link (re-rendering it)
+
+`removeLink(data)`
+* `data`: remove-link event payload
+* Removes link from model (and animates removal)
+
+`topoStartDone()`
+* Callback invoked once the server signals that all topology data
+  has been transferred