home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Garbo
/
Garbo.cdr
/
mac
/
sound
/
chaneler.sit
/
Numerical.p
< prev
Wrap
Text File
|
1989-09-05
|
2KB
|
55 lines
unit Numerical;
{ Interface file for Numerical Control library. }
{ Version 1.1. September 5, 1989 }
{ Copyright ⌐ 1989 Chris Muir, Entropy Engineering. }
{ Internet: (hplabs,pacbell,ucbvax,apple) !well!cbm }
{ Pan: ZMS }
{ US Mail: 360 Elizabeth St. San Francisco, CA 94114 }
{ Numericals are a control idea I first saw in an Opcode patch editor by David Zicarelli. He}
{since went on to perfect it in a number of twisted (and I mean that in the best possible way)}
{Intellegent Music programs like M, Jam Factory & OvalTune.}
{ Numericals are a very efficient use of screen space when a large number of numeric variables }
{must be controlled. Actually, they aren't limited to numeric values, as they get their strings}
{to display from a STR# in the resource file, but if a Numerical isn't mostly numeric values,}
{I think that a popup menu is a better choice. }
{ To use a Numerical you first have to set up a rect for the number. This rect is passed to }
{DrawNum & TrackNum so you need to keep it around. }
{ In your resource file there needs to be a STR# with the strings that you want to display. }
{The Resource number of this STR# is passed as the second parameter to DrawNum & TrackNum. }
{ The third parameter is the current (integer) value of the Numerical in question.}
{ DrawNum only takes these three parameters, but TrackNum takes three more: }
{max_num and min_num are the high and low limits. Numbers above and below these limits}
{cannot be selected.}
{The last parameter is a procedure. This is a call back so that some action can be taken}
{every time the number changes.}
{ TrackNum returns the final value after a the mouse button is released. }
interface
procedure DrawNum (where: rect; Table, what: integer);
function TrackNum (where: rect; Table, what: integer; max_num, min_num: integer; procedure CallBack (what: integer)): integer;
implementation
procedure DrawNum (where: rect; Table, what: integer);
external;
function TrackNum (where: rect; Table, what: integer; max_num, min_num: integer; procedure CallBack (what: integer)): integer;
external;
end.