home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Garbo
/
Garbo.cdr
/
mac
/
sound
/
chaneler.sit
/
Channelizer.ƒ
/
UserIntf.p
< prev
next >
Wrap
Text File
|
1989-09-08
|
2KB
|
120 lines
unit UserIntf;
{ Copyright ⌐ 1989 Chris Muir, Entropy Engineering. }
{ Internet: (hplabs,pacbell,ucbvax,apple) !well!cbm }
{ Pan: ZMS }
{ US Mail: 360 Elizabeth St. San Francisco, CA 94114 }
{ There isn't much user interface to speak of. What there is goes here.}
{+++++++++++++++++++++++ History +++++++++++++++++++++++}
{ 1.0 September 5, 1989 cbm}
{ new for Channeler. }
interface
uses
QuickDraw, WindowLayout, Numerical, MIDI, MungeMidi;
procedure InitUserJunk;
procedure TrackUserJunk;
procedure UpdateUserJunk;
implementation
const
min_numChan = 0;
max_numChan = $F;
ChanNum = 134; { STR# }
MidiNames = 800; { STR# }
MidiBytes = 801; { STR# }
NoteNames = 802; { STR# }
ModNames = 803; { STR# }
HexDigits = 804; { STR# }
{_____________________ Numericals _____________________}
procedure InitUserNum;
begin
{ Now combine all numerical regions }
gInUserNumericals := NewRgn;
OpenRgn;
{Normally, there would be more numericals here. That's why this is done with regions.}
FrameRect(gMidiOutChanRect);
CloseRgn(gInUserNumericals);
end; {InitUserNum}
procedure DrawMidiEdNumericals;
begin {Draw those Numericals}
DrawNum(gMidiOutChanRect, ChanNum, gMidiOutChanNum);
end; { DrawMidiEdNumericals }
procedure UpdateUserJunk;
var
tempStr: str255;
begin
DrawMidiEdNumericals;
TextFont(gTheFont);
tempStr := 'Output Chan:'; { this should really be from the res file, but╔ }
TextBox(Pointer(ord(@tempStr) + 1), length(tempStr), gMidiOutLabelRect, teJustRight);
end;
{_____________________ Track Numericals _____________________}
procedure NilCall (what: integer);
begin
end;
procedure TrackOutChan;
begin
gMidiOutChanNum := TrackNum(gMidiOutChanRect, ChanNum, gMidiOutChanNum, max_numChan, min_numChan, NilCall)
end; { TrackOutChan }
procedure TrackMidiEdNumericals;
var
inside: boolean;
begin
inside := PtInRect(gMyPt, gMidiOutChanRect);
if inside = true then
TrackOutChan;
end; {TrackMidiEdNumericals}
procedure TrackUserJunk;
begin
TrackMidiEdNumericals;
end;
procedure InitUserJunk;
begin
SetPort(gMyWindow);
InitUserNum;
end;
end.