{========================================================================} {= (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: 19.02.98 - 16:04:37 $ =} {========================================================================} unit MMForm; {$I COMPILER.INC} interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, ShellApi, MMObj, MMUtils, MMHook; type TMMFormStyler = class; TMMFontKind = (fkCustom, fkSystem, fkSystemI, fkSystemB, fkSystemBI, fkAutoHeight); {== TMMCompanyText ==========================================================} TMMCompanyText = class(TPersistent) public constructor Create(AOwner: TMMFormStyler); virtual; destructor Destroy; override; published property Caption: String read FCaption write SetCaption; property ColorActive: TColor read FColorActive write SetColorActive default clCaptionText; property ColorInactive: TColor read FColorInactive write SetColorInactive default clInactiveCaptionText; property Font: TFont read FFont write SetFont stored StoreFont; property FontKind: TMMFontKind read FFontKind write SetFontKind; property Visible: Boolean read FVisible write SetVisible; end; TMMAppNameText = class(TMMCompanyText) end; TMMCaptionText = class(TMMCompanyText) published property Caption : String read GetCaption write SetCaption; end; {== TMMFormStyler ===========================================================} TMMGradientColors = 2..236; TMMGradientOptions = (goAlways, goNever, goActive, goSmart); TMMFormStyler = class(TMMWndProcComponent) public constructor Create(AOwner: TComponent); override; destructor Destroy; override; procedure UpdateCaption; function DrawCaption(Active: Boolean): TRect; published property AppNameText: TMMAppNameText read FAppNameText write FAppNameText; property CaptionText: TMMCaptionText read FCaptionText write FCaptionText; property CompanyText: TMMCompanyText read FCompanyText write FCompanyText; property ClrLeftActive : TColor index 0 read FClrLeftActive write SetColors default clBlack; property ClrLeftInActive : TColor index 1 read FClrLeftInActive write SetColors default clBlack; property ClrRightActive : TColor index 2 read FClrRightActive write SetColors default clActiveCaption; property ClrRightInActive: TColor index 3 read FClrRightInActive write SetColors default clInActiveCaption; property Alignment: TAlignment read FAlignment write SetAlignment default taLeftJustify; property Options : TMMGradientOptions read FOptions write SetOptions default goSmart; property NumColors: TMMGradientColors read FNumColors write SetNumColors default 64; end; implementation