1{ 2 /*************************************************************************** 3 Toolwin.pp 4 ---------- 5 Component Library ToolWindow Controls 6 Initial Revision : THU Dec 9th 11:00am CST 7 8 9 ***************************************************************************/ 10 11 ***************************************************************************** 12 This file is part of the Lazarus Component Library (LCL) 13 14 See the file COPYING.modifiedLGPL.txt, included in this distribution, 15 for details about the license. 16 ***************************************************************************** 17} 18 19{ 20@author(TToolWindow - Author Name <smiller@lakefield.net>) 21@created(08-DEC-1999) 22@lastmod(08-DEC-1999) 23 24Detailed description of the Unit. 25} 26 27unit Toolwin; 28 29{$mode objfpc}{$H+} 30 31interface 32 33{$ifdef Trace} 34 {$ASSERTIONS ON} 35{$endif} 36 37uses 38 Classes, LCLProc, Controls, SysUtils, GraphType, Graphics, LCLType, LCLIntf, 39 StdCtrls; 40 41type 42 43 { TToolWindow } 44 45 TEdgeBorder = (ebLeft, ebTop, ebRight, ebBottom); 46 TEdgeBorders = set of TEdgeBorder; 47 48 TEdgeStyle = (esNone, esRaised, esLowered); 49 50 TToolWindow = class(TCustomControl) 51 private 52 FEdgeBorders: TEdgeBorders; 53 FEdgeInner: TEdgeStyle; 54 FEdgeOuter: TEdgeStyle; 55 procedure SetEdgeBorders(Value: TEdgeBorders); 56 procedure SetEdgeInner(Value: TEdgeStyle); 57 procedure SetEdgeOuter(Value: TEdgeStyle); 58 protected 59 FUpdateCount: Integer; 60 procedure AdjustClientRect(var ARect: TRect); override; 61 procedure Paint; override; 62 public 63 constructor Create(TheOwner: TComponent); override; 64 procedure BeginUpdate; virtual; 65 procedure EndUpdate; virtual; 66 public 67 property EdgeBorders: TEdgeBorders read FEdgeBorders write SetEdgeBorders default [ebLeft, ebTop, ebRight, ebBottom]; 68 property EdgeInner: TEdgeStyle read FEdgeInner write SetEdgeInner default esRaised; 69 property EdgeOuter: TEdgeStyle read FEdgeOuter write SetEdgeOuter default esLowered; 70 end; 71 72implementation 73 74{$I toolwindow.inc} 75 76end. 77