Difference between revisions of "Solo: a framework to help write large Matlab programs with GUIs"

From Bcontrol
(Overview)
(Overview)
Line 1: Line 1:
 
== Solo core functions – User’s guide ==
 
== Solo core functions – User’s guide ==
  
=== Overview ===
+
=== 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.
 
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.
Line 14: Line 14:
 
# Overview
 
# Overview
 
# SoloParamHandles : variables by reference
 
# SoloParamHandles : variables by reference
# Operator syntax 5
+
# Operator syntax
# Subscript syntax 6
+
# Subscript syntax
## Cell subscripts 6
+
## Cell subscripts
## Matrix subscripts 7
+
## Matrix subscripts
# GUI SoloParamHandles 8
+
# GUI SoloParamHandles
## Menus 8
+
## Menus
### Optional parameters common to all graphics SoloParamHandle types: ‘position’ and ‘TooltipString’. 9
+
### Optional parameters common to all graphics SoloParamHandle types: ‘position’ and ‘TooltipString’.
### MenuParam() shortcut function 10
+
### MenuParam() shortcut function
## Numerical edit fields 11
+
## Numerical edit fields
## String edit fields 11
+
## String edit fields
## Display params 12
+
## Display params
## Headers 12
+
## Headers
## Subheaders 12
+
## Subheaders
## Toggle buttons 12
+
## Toggle buttons
## Pushbuttons 12
+
## Pushbuttons
## Sliders 13
+
## Sliders
## Logarithmic sliders 13
+
## Logarithmic sliders
# SoloParamHandle callbacks 13
+
# SoloParamHandle callbacks
# SoloParamHandle scope 15
+
# SoloParamHandle scope
## By default, SoloParamHandles are local and persistent 16
+
## By default, SoloParamHandles are local and persistent
## Passing SoloParamHandles read/write and read-only 18
+
## Passing SoloParamHandles read/write and read-only
## Global SoloParamHandles 18
+
## Global SoloParamHandles
## Shit, I can’t find my SoloParamHandle! How can I grab it? 19
+
## Shit, I can’t find my SoloParamHandle! How can I grab it?
# Saving and loading SoloParamHandles 20
+
# Saving and loading SoloParamHandles
# Autosetting 20
+
# Autosetting

Revision as of 04:57, 1 June 2007

Solo core functions – User’s guide

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. Overview
  2. SoloParamHandles : variables by reference
  3. Operator syntax
  4. Subscript syntax
    1. Cell subscripts
    2. Matrix subscripts
  5. 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
  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