| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401 |
- {========================================================================}
- {= (c) 1995-98 SwiftSoft Ronald Dittrich =}
- {========================================================================}
- {= All Rights Reserved =}
- {========================================================================}
- {= D 01099 Dresden = Tel.: +0351-8012255 =}
- {= Loewenstr.7a = info@swiftsoft.de =}
- {========================================================================}
- {= Actual versions on http://www.swiftsoft.de/mmtools.html =}
- {========================================================================}
- {= This code is for reference purposes only and may not be copied or =}
- {= distributed in any format electronic or otherwise except one copy =}
- {= for backup purposes. =}
- {= =}
- {= No Delphi Component Kit or Component individually or in a collection=}
- {= subclassed or otherwise from the code in this unit, or associated =}
- {= .pas, .dfm, .dcu, .asm or .obj files may be sold or distributed =}
- {= without express permission from SwiftSoft. =}
- {= =}
- {= For more licence informations please refer to the associated =}
- {= HelpFile. =}
- {========================================================================}
- {= $Date: 20.01.1998 - 18:00:00 $ =}
- {========================================================================}
- unit MMMixBlk;
- {$I COMPILER.INC}
- {$DEFINE _MMDEBUG}
- interface
- uses
- {$IFDEF WIN32}
- Windows,
- {$ELSE}
- WinTypes,
- WinProcs,
- {$ENDIF}
- Forms,
- Messages,
- StdCtrls,
- ExtCtrls,
- SysUtils,
- Controls,
- Classes,
- Graphics,
- MMObj,
- MMObsrv,
- MMLevel,
- MMUtils,
- MMMixer,
- MMMixCtl,
- MMSlider,
- MMScale;
- const
- MM_SETPARENT = WM_USER + 1;
- type
- TMMSetParentAction = (saInsert,saInsNoRole,saRemove,saUpdate);
- TMMSetParent = record
- Msg : Cardinal;
- Action : Cardinal;
- Control : TControl;
- Result : LongInt;
- end;
- type
- TMMBlockSliderStyle = (ssWin95);
- TMMBlockSliderRole = (srPan,srLeftVolume,srRightVolume);
- {-- TMMCustomBlockSlider -----------------------------------------------}
- TMMCustomBlockSlider = class(TMMCustomMixerSlider)
- protected
- procedure SetParent(Value: TWinControl); override;
- procedure UpdateStyle; virtual;
- public
- constructor Create(AOwner: TComponent); override;
- protected
- property Style: TMMBlockSliderStyle read FStyle write SetStyle default ssWin95;
- property Role: TMMBlockSliderRole read FRole write SetRole default srPan;
- property GrooveSize nodefault;
- property ScalePosition nodefault;
- property Logarithmic nodefault;
- end;
- {-- TMMMixerBlockSlider ---------------------------------------------}
- TMMMixerBlockSlider = class(TMMCustomBlockSlider)
- published
- property OnEnter;
- property OnExit;
- property OnKeyDown;
- property OnKeyPress;
- property OnKeyUp;
- property OnChange;
- property OnTrack;
- property OnTrackEnd;
- property OnDrawThumb;
- property OnDrawGroove;
- property Style;
- property Role;
- property Logarithmic;
- property Sensitivity;
- property Enabled;
- property Visible;
- property Color;
- property ParentShowHint;
- property PopupMenu;
- property ShowHint;
- property TabStop;
- property TabOrder;
- property Width;
- property Height;
- property Bevel;
- property Groove;
- property FocusAction;
- property FocusColor;
- property GrooveColor;
- property ThumbColor;
- property DisabledColor;
- property HandCursor;
- property Orientation;
- property GrooveSize;
- property ThumbWidth;
- property ThumbHeight;
- property ThumbStyle;
- property Scale;
- property ScalePosition;
- property ScaleDistance;
- property PicLeft;
- property PicRight;
- end;
- TMMBlockLevelStyle = (lsWin95);
- TMMBlockLevelRole = (lrLeftLevel,lrRightLevel);
- {-- TMMCustomBlockLevel ------------------------------------------------}
- TMMCustomBlockLevel = class(TMMCustomLevel)
- protected
- procedure UpdateStyle; virtual;
- procedure SetParent(Value: TWinControl); override;
- public
- constructor Create(AOwner: TComponent); override;
- protected
- property Style: TMMBlockLevelStyle read FStyle write SetStyle default lsWin95;
- property Role: TMMBlockLevelRole read FRole write SetRole default lrLeftLevel;
- property Color nodefault;
- property SpotWidth nodefault;
- property Bar1Color nodefault;
- property Bar2Color nodefault;
- property Bar3Color nodefault;
- property Inactive1Color nodefault;
- property Inactive2Color nodefault;
- property Inactive3Color nodefault;
- property Point1 nodefault;
- property Point2 nodefault;
- property LogAmp nodefault;
- property NumPeaks nodefault;
- end;
- {-- TMMMixerBlockLevel ----------------------------------------------}
- TMMMixerBlockLevel = class(TMMCustomBlockLevel)
- published
- property OnClick;
- property OnDblClick;
- property OnMouseDown;
- property OnMouseMove;
- property OnMouseUp;
- property OnGainOverflow;
- property OnPcmOverflow;
- property Style;
- property Role;
- property Align;
- property Bevel;
- property ParentShowHint;
- property ParentColor;
- property ShowHint;
- property Visible;
- property Color;
- property Enabled;
- property Kind;
- property Height;
- property Width;
- property SpotSpace;
- property SpotWidth;
- property Bar1Color;
- property Bar2Color;
- property Bar3Color;
- property Inactive1Color;
- property Inactive2Color;
- property Inactive3Color;
- property InactiveDoted;
- property ActiveDoted;
- property Point1;
- property Point2;
- property Direction;
- property BitLength;
- property Channel;
- property Mode;
- property Gain;
- property Samples;
- property Sensitivy;
- property LogAmp;
- property NumPeaks;
- property PeakHold;
- property PeakDelay;
- property DecayMode;
- property Decay;
- property Value;
- end;
- {-- TMMCustomBlockCheck ----------------------------------------------}
- TMMCustomBlockCheck = class(TMMCustomMixerCheckBox)
- protected
- procedure SetParent(Value: TWinControl); override;
- end;
- {-- TMMMixerBlockCheck -----------------------------------------------}
- TMMMixerBlockCheck = class(TMMCustomBlockCheck)
- published
- property OnDragDrop;
- property OnDragOver;
- property OnEndDrag;
- property OnEnter;
- property OnExit;
- property OnKeyDown;
- property OnKeyPress;
- property OnKeyUp;
- property OnMouseDown;
- property OnMouseMove;
- property OnMouseUp;
- property OnStartDrag;
- property AutoCaption;
- property Short;
- property Enabled;
- property Caption;
- property Alignment;
- property Color;
- property Ctl3D;
- property DragCursor;
- property DragMode;
- property Font;
- property ParentColor;
- property ParentCtl3D;
- property ParentFont;
- property ParentShowHint;
- property PopupMenu;
- property ShowHint;
- property TabOrder;
- property TabStop;
- property Visible;
- end;
- TMMBlockLabelRole = (lrLineTitle,lrPanTitle,lrVolumeTitle);
- {-- TMMCustomMixerLabel ----------------------------------------------}
- TMMCustomBlockLabel = class(TCustomLabel)
- protected
- procedure SetParent(Value: TWinControl); override;
- protected
- property Role: TMMBlockLabelRole read FRole write SetRole default lrLineTitle;
- end;
- {-- TMMMixerBlockLabel ----------------------------------------------}
- TMMMixerBlockLabel = class(TMMCustomBlockLabel)
- published
- property OnClick;
- property OnDblClick;
- property OnDragDrop;
- property OnDragOver;
- property OnEndDrag;
- property OnMouseDown;
- property OnMouseMove;
- property OnMouseUp;
- property OnStartDrag;
- property Role;
- property Align;
- property Alignment;
- property AutoSize;
- property Caption;
- property Color;
- property DragCursor;
- property DragMode;
- property Enabled;
- property FocusControl;
- property Font;
- property ParentColor;
- property ParentFont;
- property ParentShowHint;
- property PopupMenu;
- property ShowAccelChar;
- property ShowHint;
- property Transparent;
- property Visible;
- property WordWrap;
- end;
- EMMBlockError = class(Exception);
- TMMBlockStyle = (bsWin95);
- TMMMuteKind = (mkMute,mkSelect);
- {-- TMMCustomMixerBlock ------------------------------------------------}
- TMMCustomMixerBlock = class(TMMCustomPanel)
- protected
- procedure UpdateBlock; virtual;
- procedure Notification(AComponent: TComponent; Operation: TOperation); override;
- procedure InsertCtl(C: TComponent); virtual;
- procedure Loaded; override;
- procedure ArrangeControls; virtual;
- procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;
- procedure ConnectLine;
- procedure DisconnectLine;
- procedure ConnectControls;
- procedure MMSetParent(var Msg: TMMSetParent); message MM_SETPARENT;
- procedure CollectControls;
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- function GetMuteKind: TMMMuteKind;
- property Pan: TMMCustomBlockSlider read FPan;
- property Mute: TMMCustomBlockCheck read FMute;
- property VolumeLeft: TMMCustomBlockSlider read FVolumeLeft;
- property VolumeRight: TMMCustomBlockSlider read FVolumeRight;
- property LevelLeft: TMMCustomBlockLevel read FLevelLeft;
- property LevelRight: TMMCustomBlockLevel read FLevelRight;
- property LineTitle: TMMCustomBlockLabel read FLineTitle;
- property PanTitle: TMMCustomBlockLabel read FPanTitle;
- property VolumeTitle: TMMCustomBlockLabel read FVolumeTitle;
- protected
- property Line: TMMAudioLine read FLine write SetLine;
- property AutoArrange : Boolean read FAutoArrange write SetAutoArrange default True;
- property AutoSize : Boolean read FAutoSize write SetAutoSize default True;
- property Style: TMMBlockStyle read FStyle write SetStyle default bsWin95;
- property Mixer: TMMCustomMixerControl read FMixer write SetMixer;
- property Item: TMMItemIndex read FItem write SetItem default NoItem;
- property MuteKind: TMMMuteKind read GetMuteKind write FKDummy stored False;
- end;
- {-- TMMMixerBlock ------------------------------------------------------}
- TMMMixerBlock = class(TMMCustomMixerBlock)
- published
- property OnClick;
- property OnDblClick;
- property OnDragDrop;
- property OnDragOver;
- property OnEndDrag;
- property OnEnter;
- property OnExit;
- property OnMouseDown;
- property OnMouseMove;
- property OnMouseUp;
- property OnResize;
- {$IFDEF WIN32}
- property OnStartDrag;
- {$ENDIF}
- property Align;
- property Bevel;
- property DragCursor;
- property DragMode;
- property Enabled;
- property Color;
- property Ctl3D;
- property Font;
- property ParentColor;
- property ParentCtl3D;
- property ParentFont;
- property ParentShowHint;
- property PopupMenu;
- property ShowHint;
- property TabOrder;
- property TabStop;
- property Visible;
- property Line;
- property AutoArrange;
- property AutoSize;
- property Style;
- property Mixer;
- property Item;
- property MuteKind;
- end;
- implementation
|