# Question about collections of custom GUI controls for Mathematica

Background: I have only recently begun programming GUIs in Mathematica, so I have a continuous need for custom controls. I needed a scrollable list control and with the help of Google I found a beautiful one in this MathGroup post (One of Sjoerd, if I am correct.) The point being: there is a lot of excellent Mathematica code shattered all over. Most matured languages have libraries of custom controls. I am not aware of any existing for Mathematica.

Question(s): What is the best managed collection of (open source) custom GUI controls for Mathematica that you know of? Where do you get your custom GUI controls? Should there be a collection of custom GUI controls for Mathematica?

-

One of the excellent places to look is the Wolfram Demonstration Project. There are many cases with custom controls there. You can test out controls immediately and download the source code. Because I know that site pretty well I will keep the list here.

3D Waves

Potter's Wheel

Motion Blur

Contours of Algebraic Surfaces

Polar Area Sweep

Relationship between the Tone Curve and the Histogram of a Photographic Image

Complex nested controls: Two-Dimensional Block Cellular Automata with a 2×2 Neighborhood

Interesting type - the content is the control: Block Builder

Constrained locators: Sweet Heart

-
• Some you can find in the Documentation Center, like the angular slider in Dynamic's documentation (under Applications), or the ValueThumbSlider in the Advanced Manipulate Functionality section (under Custom Control Appearances).
• Some you can find in developer packages like the angular slider in the "Experimental" package:

Needs@"Experimental"; AngularSlider[]

Note that these are not part of official Mathematica yet, so they can be changed with any new release without any notification.

• Some you can find in StackOverflow or on MathGroup, like Heike's toggling MouseOver button, Szabolcs's zooming rectangle or my SplitPane gui element or a gridded TogglerBar: TogglerGrid, or a throbber.
• Some you have to write for your own. It's really not that hard once you get a grip on Dynamic, DynamicModule and EventHandler.
• I've written many controls, some specific some more general, I would be glad to share them, though I don't know of any specific place where the Mathematica community shares functions/libraries other than SE (and SO). Some of the dynamic controls that I've designed and used (since Mathematica 6 was introduced) I am going to list here (or somewhere) in the future. One particularly complex controller to manipulate 2D plots can be found here.
-
I think we (as a community) should start using Github or something equivalent. Sharing small snippets on SE is not a problem, but for larger packages it gets cumbersome. –  Ajasja May 4 '12 at 11:11
@Leonid, Ajasja, ndroock1 Since this site was created, the idea that there should be a more organized way to collaborate keeps coming up again and again. Perhaps it's time to start a discussion on meta? –  Szabolcs May 4 '12 at 13:59
@Szabolcs: I second your motion. –  István Zachar May 4 '12 at 16:33
@IstvánZachar, Szabolcs For example, I have about 5 projects I am currenty working on, with various degrees of completeness, and many more in my plans. Some of them you know, because I posted the (often simplified) code here on SE, some not, but the point is that my work is very slow, in big part because I spend so much time here answering questions. I suspect that many regulars here have a similar situation. We are still very young as a community, and try hard to make it gain more momentum. Once it gets it fully and stable, we can start real work. This is just my opinion, of course. –  Leonid Shifrin May 4 '12 at 18:33
@ndroock1 I agree with you. I just think that it can wait for a little more (like a month or two). There are some fundamental problems with making code sharing efficient for smaller code snippets. They are not unsolvable, but require careful considerations and design. I have some ideas on the matter and have already done some work on that, but, let me just say, that for now a combination of SE (this site) for smaller code snippets plus GitHub for larger projects should be IMO good enough for most people. I just have this feeling that we should first get more stable. –  Leonid Shifrin May 4 '12 at 20:55

You can also look at the GUIKit package which allows you to create complicated widgets and panels that mimic the look and feel of the OS. The user guide/tutorial is pretty decent and has several examples too that you can learn from and modify to your needs. In fact, a lot of the additional editing/explorer functionality like GraphEdit and DatabaseExplorer are designed using this. You can find some of these files in \$InstallationDirectory/AddOns/Packages/GUIKit/. Some examples from the documentation:

1. Text import wizard:

Import text files into Mathematica like you can in MS Excel and set delimiters and other options.

2. NIntegrate explorer

The NIntegrate Explorer is a GUI that lets you do numerical quadrature using NIntegrate. It opens a tool that lets you enter an integrand, set a region, then modify and change the various option settings for NIntegrate. The result of the computation is shown, along with a graphical display of the function evaluations, as well as the input to NIntegrate that was used.

3. EquationTrekker

... an interactive tool for investigating the solutions of differential equations as well as other types of equations that have solutions that can be viewed as paths or trajectories.

[EquationTrekker allows] you to investigate the solutions of differential equations. Using the TrekParameters option, you can give the equation with symbolic parameters, which are controlled through the EquationTrekker` window interface.

-