From Bcontrol

Jump to: navigation, search

Solo - a framework to help write large Matlab programs with GUIs

[edit] Solo core functions – User’s guide

[edit] Overview and index

The Solo core functions are a set of Matlab routines designed to assist in the building of complex user interfaces. We will principally use them in the context of writing control protocols for behavior and electrophysiology, but they could be used for other interfaces as well.

In a complex interface, one usually has many parameters that are controllable through user-interface graphics objects – for example, menus, pushbuttons, editable fields, etc. Sometimes there are so many of these that keeping track of all of them conflicts with a different, but highly desirable aspect of programming: compartmentalization. When writing a large program, keeping different parts of it separate from each other is an enormously useful way of breaking the problem down into manageable chunks. Typically, one bases the program on many small functions, each of which keeps its internal variables private and secret from the others. That way, each of the small functions can be cleanly and completely debugged, quite separately from the others.

So, how do we separate variables that might all have values determined by objects in the same graphics window? The Solo core functions are designed to address this problem.

In addition, (1) Solo core functions implement a functionality available in Exper: having variables internal to a program whose value is automatically tied to graphics interface objects. (2) Solo further enhances that functionality by using Matlab object-oriented programming to allow a syntax that is easier to read and write than the one available in Exper. (3) Solo allows passing variables by reference, in either read/write or read-only modes, a functionality otherwise unavailable in Matlab.

  1. SoloParamHandles : variables by reference
  2. Operator syntax
  3. Subscript syntax
    1. Cell subscripts
    2. Matrix subscripts
  4. GUI SoloParamHandles
    1. Menus
      1. Optional parameters common to all graphics SoloParamHandle types: ‘position’ and ‘TooltipString'.
      2. MenuParam() shortcut function
    2. Numerical edit fields
    3. String edit fields
    4. Display params
    5. Headers
    6. Subheaders
    7. Toggle buttons
    8. Pushbuttons
    9. Sliders
    10. Logarithmic sliders
  5. SoloParamHandle user properties
  6. SoloParamHandle callbacks
  7. SoloParamHandle scope
    1. By default, SoloParamHandles are local and persistent
    2. Passing SoloParamHandles read/write and read-only
    3. Global SoloParamHandles
    4. Shit, I can’t find my SoloParamHandle! How can I grab it?
  8. Saving and loading SoloParamHandles
  9. Autosetting

Insert non-formatted text here

NEXT: Plugins

PREVIOUS: Dispatcher

Personal tools