MMFORM.INT 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. {========================================================================}
  2. {= (c) 1995-98 SwiftSoft Ronald Dittrich =}
  3. {========================================================================}
  4. {= All Rights Reserved =}
  5. {========================================================================}
  6. {= D 01099 Dresden = Tel.: +0351-8012255 =}
  7. {= Loewenstr.7a = info@swiftsoft.de =}
  8. {========================================================================}
  9. {= Actual versions on http://www.swiftsoft.de/mmtools.html =}
  10. {========================================================================}
  11. {= This code is for reference purposes only and may not be copied or =}
  12. {= distributed in any format electronic or otherwise except one copy =}
  13. {= for backup purposes. =}
  14. {= =}
  15. {= No Delphi Component Kit or Component individually or in a collection=}
  16. {= subclassed or otherwise from the code in this unit, or associated =}
  17. {= .pas, .dfm, .dcu, .asm or .obj files may be sold or distributed =}
  18. {= without express permission from SwiftSoft. =}
  19. {= =}
  20. {= For more licence informations please refer to the associated =}
  21. {= HelpFile. =}
  22. {========================================================================}
  23. {= $Date: 19.02.98 - 16:04:37 $ =}
  24. {========================================================================}
  25. unit MMForm;
  26. {$I COMPILER.INC}
  27. interface
  28. uses
  29. Windows,
  30. Messages,
  31. SysUtils,
  32. Classes,
  33. Graphics,
  34. Controls,
  35. Forms,
  36. Dialogs,
  37. StdCtrls,
  38. ExtCtrls,
  39. ShellApi,
  40. MMObj,
  41. MMUtils,
  42. MMHook;
  43. type
  44. TMMFormStyler = class;
  45. TMMFontKind = (fkCustom, fkSystem, fkSystemI, fkSystemB, fkSystemBI, fkAutoHeight);
  46. {== TMMCompanyText ==========================================================}
  47. TMMCompanyText = class(TPersistent)
  48. public
  49. constructor Create(AOwner: TMMFormStyler); virtual;
  50. destructor Destroy; override;
  51. published
  52. property Caption: String read FCaption write SetCaption;
  53. property ColorActive: TColor read FColorActive write SetColorActive default clCaptionText;
  54. property ColorInactive: TColor read FColorInactive write SetColorInactive default clInactiveCaptionText;
  55. property Font: TFont read FFont write SetFont stored StoreFont;
  56. property FontKind: TMMFontKind read FFontKind write SetFontKind;
  57. property Visible: Boolean read FVisible write SetVisible;
  58. end;
  59. TMMAppNameText = class(TMMCompanyText)
  60. end;
  61. TMMCaptionText = class(TMMCompanyText)
  62. published
  63. property Caption : String read GetCaption write SetCaption;
  64. end;
  65. {== TMMFormStyler ===========================================================}
  66. TMMGradientColors = 2..236;
  67. TMMGradientOptions = (goAlways, goNever, goActive, goSmart);
  68. TMMFormStyler = class(TMMWndProcComponent)
  69. public
  70. constructor Create(AOwner: TComponent); override;
  71. destructor Destroy; override;
  72. procedure UpdateCaption;
  73. function DrawCaption(Active: Boolean): TRect;
  74. published
  75. property AppNameText: TMMAppNameText read FAppNameText write FAppNameText;
  76. property CaptionText: TMMCaptionText read FCaptionText write FCaptionText;
  77. property CompanyText: TMMCompanyText read FCompanyText write FCompanyText;
  78. property ClrLeftActive : TColor index 0 read FClrLeftActive write SetColors default clBlack;
  79. property ClrLeftInActive : TColor index 1 read FClrLeftInActive write SetColors default clBlack;
  80. property ClrRightActive : TColor index 2 read FClrRightActive write SetColors default clActiveCaption;
  81. property ClrRightInActive: TColor index 3 read FClrRightInActive write SetColors default clInActiveCaption;
  82. property Alignment: TAlignment read FAlignment write SetAlignment default taLeftJustify;
  83. property Options : TMMGradientOptions read FOptions write SetOptions default goSmart;
  84. property NumColors: TMMGradientColors read FNumColors write SetNumColors default 64;
  85. end;
  86. implementation