One step at a time. For the moment I just wanted to factor out the code the operates the generics of a control. But once this is done then OpenLayers would have the base to build some sort of dashboard for controls.<br><br>
Ludwig<br><br><div><span class="gmail_quote">On 11/8/06, <b class="gmail_sendername">Cameron Shorter</b> &lt;<a href="mailto:cameron.shorter@gmail.com">cameron.shorter@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Sounds like you are asking for a ToolBar or ControlBar.<br>A ToolBar shows an array of Tool Icons. When you select a tool, you get<br>a Control popup, or you change the way a Control works.<br><br>The entire Toolbar should be able to be hidden or expanded.
<br><br>There should be a distinction between the different types of buttons.<br>They can be:<br>* 2 State - on/off, multiple tools can be selected at once<br>* Radio buttons - on/off, pressing one button deselects other radio buttons
<br>* One Shot<br><br>(I'm also interested in this sort of functionality)<br><br>Ludwig Max Brinckmann wrote:<br>&gt; I find that there is a little too much combination of 'business-logic'<br>&gt; and presentation in the way the LayerSwitcher is implemented. One aspect
<br>&gt; of it is the actual layer control, but the other is just having a<br>&gt; control that can be opened and closed.<br>&gt;<br>&gt; I do not know if you have considered separating the two, so that there<br>&gt; would be a generic control, which would set up the open/close
<br>&gt; functionality and have some ways of positioning it on the page plus a<br>&gt; control over the size when opened.<br>&gt; A second bit of functionality would be e.g. the layerswitcher, which<br>&gt; would simply fill a div in the generic control and to which the generic
<br>&gt; control would delegate when redrawing the contents.<br>&gt; This would make it easier to develop custom controls that one could fill<br>&gt; with additional functionality, with a shared behaviour/appearance on the
<br>&gt; screen.<br>&gt;<br>&gt; I hacked out some simple stuff that I just need for a demo here, but you<br>&gt; can see the base idea at<br>&gt; <a href="http://iceds.ge.ucl.ac.uk/OL/control.html">http://iceds.ge.ucl.ac.uk/OL/control.html
</a><br>&gt;<br>&gt; On the right hand side are three controls, the top a variation of the<br>&gt; layerswitcher, the bottom two browsers that will allow adding a layer to<br>&gt; OpenLayers by clicking on a WMS Layer. All three controls just use the
<br>&gt; same dummy control to handle the opening and there are ways to set the<br>&gt; size and position....<br>&gt;<br>&gt; (The green sliders in the layerswitcher are supposed to enable a user to<br>&gt; adjust the opacity of a layer, but somehow the sliders do not get the
<br>&gt; mouse focus, as the map dragging monopolises it. The layers are also<br>&gt; supposed to be restackable using scriptaculous sortable, but in this<br>&gt; version it does not work for the same reason).<br>&gt;<br>
&gt; I have only tested this on firefox (it does not work at all on IE) and<br>&gt; there a quite a few bugs in it, but I thought submitting the idea to get<br>&gt; some more input on how this could be done in the most generic fashion.
<br>&gt;<br>&gt; Ludwig<br>&gt;<br>&gt;<br>&gt;<br>&gt; ------------------------------------------------------------------------<br>&gt;<br>&gt; _______________________________________________<br>&gt; Dev mailing list<br>
&gt; <a href="mailto:Dev@openlayers.org">Dev@openlayers.org</a><br>&gt; <a href="http://openlayers.org/mailman/listinfo/dev">http://openlayers.org/mailman/listinfo/dev</a><br><br><br>--<br>Cameron Shorter<br><a href="http://cameron.shorter.net">
http://cameron.shorter.net</a><br></blockquote></div><br>