TTileBitBtn -
TTileImage - TTileImage
TTilePanel -
TTileSpeedButton -
DrawTransparentButtonFace - DrawButtonFace - returns the remaining usable area inside the Client rect.
Register - ===========================================================} {============ Component Registration =======================} {===========================================================
PMinMaxInfo
TBitBtnKind
TBoundary
TDropSupport
TFilesDroppedEvent
TMinMaxInfo
TTrackingEvent
HEIGHT_CRNR
TPM_PICTURECHANGED
WIDTH_CRNR
function DrawTransparentButtonFace(Canvas: TCanvas; const Client: TRect; IsDown: Boolean): TRect;
DrawButtonFace - returns the remaining usable area inside the Client rect.
procedure Register;
===========================================================} {============ Component Registration =======================} {===========================================================
PMinMaxInfo = ^TMinMaxInfo
TBitBtnKind = (bkCustom, bkOK, bkCancel, bkHelp, bkYes, bkNo, bkClose,
bkAbort, bkRetry, bkIgnore, bkAll);
TBoundary = (bRectangle, bEllipse, bRoundRect);
TDropSupport = set of (TranslateLinks, RecurseDirectories, TranslateSublinks, RecurseSubDirectories)
TFilesDroppedEvent = procedure (Sender: TTilePanel; FileList: TStringList) of object
TMinMaxInfo = record
Reserved : TPoint;
MaxSize : TPoint;
MinSize : TPoint;
MaxPosition : TPoint;
MinTrackSize : TPoint;
MaxTrackSize : TPoint;
end;
TTrackingEvent = procedure (var MinSize, MaxSize: TPoint) of object
HEIGHT_CRNR = 3
TPM_PICTURECHANGED = CM_BASE + 137
==============================================================================} // // Tiles.pas - Tiled image support for panels & buttons // // Author - Mark White // EMail - whitema@iafrica.com // // Versions: 1.0 - Supported tiled images & parent image inheritance. // 1.1 - Supported boundaries property to set the clip region. (Now removed) // 1.2 - Supports shell file drag'n'drop with .lnk translation & // subdirectory recursion // 1.3 - Added 'splitter' functionality. Removed boundary support. // // Notes - This is a relatively 'heavy' unit, containing a vast amount of // source code. This is because TSpeedButton and TBitBtn (from // Borland's Buttons unit) are so heavily private'ized, that the // only way to achieve the bitmap tilling effect was to rewrite // the code , since the classes cannot be inherited to achieve this. // // TTilePanel is 100% interface & property compatible with TPanel // which means that you can easily modify existing forms that use // TPanel to use TTilePanel, simply by replacing 'TPanel' with // 'TTilePanel' in the .PAS and the .DFM (use 'View As Text'). // // Likewise, TTileBitBtn is 100% compatible with TBitBtn, and // TTileSpeedButton with TSpeedButton. // // Drag'n'Drop - If you use the 'TranslateLinks' and 'RecurseDirectories' // and 'TranslateSubLinks' AND 'RecurseSubDirectories' (phew!) // in the DropSupport property, then you may wind up with // a massive number of files, since links may reference // parent directories, which will also be recursed. // If it's any comfort to you, I've designed the code // to handle any circular references that the links may create. // // Splitter - The latest craze... added this to give that 'pro' look & feel // to applications wiht ease. The new 'splitter' property will // (if true) cause a splitter bar to become present when the // panel is aligned within it's parent. This splitter effectively // just resizes the panel. It uses native windows WM_NCHITTEST // to achieve this. Since the panel could be dragged right across // the parent form, a new event - 'OnTracking' is supported. // This event sinmply intercepts and interprets WM_GETMINMAXINFO // messages to give the user some control over the minimum and // maximum sizes of the panel. The Splitter bar is 'aware' // of the BevelInner, BevelOuter and BorderWidth properties, // and it moulds itself around it. // // Optimization- To reduce code size, use EITHER this suite, OR the standard // Delphi buttons unit, but not both in the same project. // // // Future Vision : // // Being a developer, I - like you - are not entitled to an opinion, or vision // or anything that might make dumb-asshole B.Com graduates feel threatened. // // I might, however, split this file, and use it to overhaul the origional // Delphi 2.0 TPanel and TBitBtn etc.. Maybe. // // // Other crap : // // What would YOU like to see ???? // // Should you like to see any other features built into this suite, why // not Email your suggestions to me, or feel free to modify this file yourself, // and then re-submit it to the Delphi Deli. // // This is my way of giving something back to the Delphi community. // // Please support the spirit of free information. // // // Anyone out there interested in hacking together an operating system today? // Why not? Microsoft probably will. // // {==============================================================================} {$S-,W-} {$C PRELOAD
WIDTH_CRNR = 3