37
$\begingroup$

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?

$\endgroup$

4 Answers 4

33
$\begingroup$

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.

Relief-Shaded Elevation Map

enter image description here

3D Waves

enter image description here

Potter's Wheel

enter image description here

Motion Blur

enter image description here

Contours of Algebraic Surfaces

enter image description here

Polar Area Sweep

enter image description here

Color Quantization... Tracing Contour... Creating Posters...

enter image description here

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

enter image description here

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

enter image description here

Interesting type - the content is the control: Block Builder

enter image description here

Constrained locators: Sweet Heart

enter image description here

$\endgroup$
17
$\begingroup$

Mathematica graphics

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.
$\endgroup$
13
  • 2
    $\begingroup$ 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. $\endgroup$
    – Ajasja
    May 4, 2012 at 11:11
  • 4
    $\begingroup$ @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? $\endgroup$
    – Szabolcs
    May 4, 2012 at 13:59
  • 3
    $\begingroup$ @Szabolcs: I second your motion. $\endgroup$ May 4, 2012 at 16:33
  • 3
    $\begingroup$ @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. $\endgroup$ May 4, 2012 at 18:33
  • 3
    $\begingroup$ @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. $\endgroup$ May 4, 2012 at 20:55
10
$\begingroup$

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.

    enter image description here

  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.

    enter image description here

  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.

    enter image description here

    [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.

    enter image description here

$\endgroup$
4
$\begingroup$

Dave Bailey maintains a package called SWP that you might find useful:

Super Widget Package

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.