MMOBJ.INT 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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: 20.01.1998 - 18:00:00 $ =}
  24. {========================================================================}
  25. unit MMObj;
  26. {$I COMPILER.INC}
  27. interface
  28. Uses
  29. {$IFDEF WIN32}
  30. Windows,
  31. {$ELSE}
  32. WinTypes,
  33. WinProcs,
  34. {$ENDIF}
  35. SysUtils,
  36. Dialogs,
  37. Messages,
  38. Classes,
  39. Controls,
  40. ExtCtrls,
  41. Forms,
  42. Graphics,
  43. MMAbout;
  44. type
  45. {-- TMMObject -------------------------------------------------------------}
  46. TMMObject = class(TPersistent)
  47. public
  48. property OnChange: TNotifyEvent read FOnChange write FOnChange;
  49. end;
  50. {-- TMMBevel --------------------------------------------------------------}
  51. TMMBevel = class(TMMObject)
  52. public
  53. constructor Create; virtual;
  54. procedure Assign(Source: TPersistent); override;
  55. property BevelExtend: Integer read GetBevelExtend;
  56. function PaintBevel(Canvas: TCanvas; FrameRect: TRect): TRect; virtual;
  57. published
  58. property BevelInner: TPanelBevel read FBevelInner write SetBevelInner;
  59. property BevelOuter: TPanelBevel read FBevelOuter write SetBevelOuter;
  60. property BevelInnerWidth: TBevelWidth read FBevelInnerWidth write SetBevelInnerWidth;
  61. property BevelOuterWidth: TBevelWidth read FBevelOuterWidth write SetBevelOuterWidth;
  62. property BorderStyle: TBorderStyle read FBorderStyle write SetBorderStyle;
  63. property BorderWidth: TBorderWidth read FBorderWidth write SetBorderWidth;
  64. property BorderSpace: TBorderWidth read FBorderSpace write SetBorderSpace;
  65. property BorderColor: TColor index 0 read FBorderColor write SetColors;
  66. property BorderSpaceColor: TColor index 1 read FBorderSpaceColor write SetColors;
  67. property InnerLightColor : TColor index 2 read FInnerLightColor write SetColors;
  68. property InnerShadowColor: TColor index 3 read FInnerShadowColor write SetColors;
  69. property OuterLightColor : TColor index 4 read FOuterLightColor write SetColors;
  70. property OuterShadowColor: TColor index 5 read FOuterShadowColor write SetColors;
  71. end;
  72. {-- TMMComponent ----------------------------------------------------------}
  73. TMMComponent = class(TComponent)
  74. published
  75. {$IFDEF TRIAL}
  76. property About: TMMAboutBox read FAbout write FAbout stored False;
  77. {$ENDIF}
  78. end;
  79. {-- TMMWinControl ---------------------------------------------------------}
  80. TMMWinControl = class(TWinControl)
  81. public
  82. function ClientToClient(Source: TControl; const Point: TPoint): TPoint;
  83. published
  84. {$IFDEF TRIAL}
  85. property About: TMMAboutBox read FAbout write FAbout stored False;
  86. {$ENDIF}
  87. end;
  88. {-- TMMCustomControl ------------------------------------------------------}
  89. TMMCustomControl = class(TCustomControl)
  90. public
  91. constructor Create(AOwner: TComponent); override;
  92. destructor Destroy; override;
  93. function ClientToClient(Source: TControl; const Point: TPoint): TPoint;
  94. function BevelExtend: Integer;
  95. function BeveledRect: TRect;
  96. function ScreenRect(aRect: TRect): TRect;
  97. property Canvas;
  98. published
  99. {$IFDEF TRIAL}
  100. property About: TMMAboutBox read FAbout write FAbout stored False;
  101. {$ENDIF}
  102. end;
  103. {-- TMMCustomPanel --------------------------------------------------------}
  104. TMMCustomPanel = class(TCustomPanel)
  105. public
  106. constructor Create(AOwner: TComponent); override;
  107. destructor Destroy; override;
  108. function ClientToClient(Source: TControl; const Point: TPoint): TPoint;
  109. function BevelExtend: Integer;
  110. function BeveledRect: TRect;
  111. function ScreenRect(aRect: TRect): TRect;
  112. property OnPaint: TNotifyEvent read FOnPaint write FOnPaint;
  113. property Canvas;
  114. property Caption;
  115. published
  116. {$IFDEF TRIAL}
  117. property About: TMMAboutBox read FAbout write FAbout stored False;
  118. {$ENDIF}
  119. end;
  120. {-- TMMGraphicControl -----------------------------------------------------}
  121. TMMGraphicControl = class(TGraphicControl)
  122. public
  123. constructor Create(AOwner: TComponent); override;
  124. destructor Destroy; override;
  125. function ClientToClient(Source: TControl; const Point: TPoint): TPoint;
  126. function BevelExtend: Integer;
  127. function BeveledRect: TRect;
  128. function ScreenRect(aRect: TRect): TRect;
  129. property Canvas;
  130. published
  131. {$IFDEF TRIAL}
  132. property About: TMMAboutBox read FAbout write FAbout stored False;
  133. {$ENDIF}
  134. end;
  135. {-- TMMCommonDialog -------------------------------------------------------}
  136. TMMCommonDialog = class(TCommonDialog)
  137. published
  138. {$IFDEF TRIAL}
  139. property About: TMMAboutBox read FAbout write FAbout stored False;
  140. {$ENDIF}
  141. end;
  142. {$I MMCONST.INC}
  143. function LoadResStr(const ResID: Word): String;
  144. {$I MMCURSOR.INC}
  145. function LoadResCursor(const ResID: Word): HCURSOR;
  146. implementation