From f103e78625fb97de5c5d6a65550107277c681ff3 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Thu, 27 Sep 2018 22:12:41 +0000 Subject: [PATCH] jvcllaz: Add JvRollOut (expandable panel) git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6660 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../jvcllaz/design/JvCtrls/images/images.txt | 1 + .../design/JvCtrls/images/tjvrollout.bmp | Bin 0 -> 1654 bytes .../jvcllaz/design/JvCtrls/jvctrlsreg.pas | 13 +- .../examples/JvRollOut/JvRollOutDemo.lpi | 79 + .../examples/JvRollOut/JvRollOutDemo.lpr | 14 + .../jvcllaz/examples/JvRollOut/MainFrm.lfm | 1594 +++++++++++++++ .../jvcllaz/examples/JvRollOut/MainFrm.pas | 206 ++ components/jvcllaz/packages/jvctrlslazd.lpk | 11 +- components/jvcllaz/packages/jvctrlslazr.lpk | 12 +- components/jvcllaz/packages/jvdtrlslazr.lpk | 59 - components/jvcllaz/resource/jvctrlsreg.res | Bin 25528 -> 27220 bytes components/jvcllaz/run/JvCtrls/jvrollout.pas | 1707 +++++++++++++++++ .../run/JvPageComps/jvnotebookpagelist.pas | 124 ++ 13 files changed, 3739 insertions(+), 81 deletions(-) create mode 100644 components/jvcllaz/design/JvCtrls/images/tjvrollout.bmp create mode 100644 components/jvcllaz/examples/JvRollOut/JvRollOutDemo.lpi create mode 100644 components/jvcllaz/examples/JvRollOut/JvRollOutDemo.lpr create mode 100644 components/jvcllaz/examples/JvRollOut/MainFrm.lfm create mode 100644 components/jvcllaz/examples/JvRollOut/MainFrm.pas delete mode 100644 components/jvcllaz/packages/jvdtrlslazr.lpk create mode 100644 components/jvcllaz/run/JvCtrls/jvrollout.pas create mode 100644 components/jvcllaz/run/JvPageComps/jvnotebookpagelist.pas diff --git a/components/jvcllaz/design/JvCtrls/images/images.txt b/components/jvcllaz/design/JvCtrls/images/images.txt index b3073a4dd..1232fe35e 100644 --- a/components/jvcllaz/design/JvCtrls/images/images.txt +++ b/components/jvcllaz/design/JvCtrls/images/images.txt @@ -20,3 +20,4 @@ tjvruler.png tjvruler_150.png tjvruler_200.png tjvgroupheader.bmp +tjvrollout.bmp diff --git a/components/jvcllaz/design/JvCtrls/images/tjvrollout.bmp b/components/jvcllaz/design/JvCtrls/images/tjvrollout.bmp new file mode 100644 index 0000000000000000000000000000000000000000..ab85429a1588e451c378b1982c1dc76bf1d22458 GIT binary patch literal 1654 zcmbu-v5pf#41i%DS|KDlDoU3;0as;X(en;|3Ti)!i-_lNhr}~b_z|uTy72GJhRbo+ z;oUFZcqTKMo%!0UBl6+>BzKfHBSM5*B4*-~N2w~QUnLJe zzl*5BL4zg=En)%%59SCY3N7LSg@G>~NECXXSIGuPAW>)$9wik9M<7vX{-i)*a0C*C z7U7mw7#x8_p~Zy1DT?iK1QLawOH(Bq9Dzik=dw-721g)K==n-q$p%LtQRw-)Ldgb4 zAW`V~DpSb@M<7w?`I<|~21g)K=&=RXN;WtGi9$=T{t(5sa>sTh3N4`mg~1U>6nbu( zDcRr%BnmyZ)Rk;-1QLaw+sz~q21g)K=y?=U$p%LtQRsP0O34OCAW`UXgrb#fa0C*C zmSX)S3WFn%*sh*OOOovJ zUFlDi`}n-RzE)rO=@@_XKVAn~78-8qdjn+}ZtJ6Al$T}H`9H_gkyzKgygcqP>(^iG zQyngcy}mVU!|(A_pF_P;KR)ZfUdLhb+j0J + + + + + + + + + <Scaled Value="True"/> + <ResourceType Value="res"/> + <UseXPManifest Value="True"/> + <XPManifest> + <DpiAware Value="True"/> + </XPManifest> + <Icon Value="0"/> + </General> + <BuildModes Count="1"> + <Item1 Name="Default" Default="True"/> + </BuildModes> + <PublishOptions> + <Version Value="2"/> + <UseFileFilters Value="True"/> + </PublishOptions> + <RunParams> + <FormatVersion Value="2"/> + <Modes Count="0"/> + </RunParams> + <RequiredPackages Count="1"> + <Item1> + <PackageName Value="JvCtrlsLazR"/> + </Item1> + </RequiredPackages> + <Units Count="2"> + <Unit0> + <Filename Value="JvRollOutDemo.lpr"/> + <IsPartOfProject Value="True"/> + </Unit0> + <Unit1> + <Filename Value="MainFrm.pas"/> + <IsPartOfProject Value="True"/> + <ComponentName Value="Form1"/> + <HasResources Value="True"/> + <ResourceBaseClass Value="Form"/> + </Unit1> + </Units> + </ProjectOptions> + <CompilerOptions> + <Version Value="11"/> + <PathDelim Value="\"/> + <Target> + <Filename Value="..\..\bin\JvRollOutDemo"/> + </Target> + <SearchPaths> + <IncludeFiles Value="$(ProjOutDir)"/> + <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> + </SearchPaths> + <Linking> + <Options> + <Win32> + <GraphicApplication Value="True"/> + </Win32> + </Options> + </Linking> + </CompilerOptions> + <Debugging> + <Exceptions Count="3"> + <Item1> + <Name Value="EAbort"/> + </Item1> + <Item2> + <Name Value="ECodetoolError"/> + </Item2> + <Item3> + <Name Value="EFOpenError"/> + </Item3> + </Exceptions> + </Debugging> +</CONFIG> diff --git a/components/jvcllaz/examples/JvRollOut/JvRollOutDemo.lpr b/components/jvcllaz/examples/JvRollOut/JvRollOutDemo.lpr new file mode 100644 index 000000000..b5007b983 --- /dev/null +++ b/components/jvcllaz/examples/JvRollOut/JvRollOutDemo.lpr @@ -0,0 +1,14 @@ +program JvRollOutDemo; + +uses + Interfaces, Forms, + MainFrm in 'MainFrm.pas' {Form1}; + +{$R *.res} + +begin + Application.Scaled:=True; + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/components/jvcllaz/examples/JvRollOut/MainFrm.lfm b/components/jvcllaz/examples/JvRollOut/MainFrm.lfm new file mode 100644 index 000000000..c81e43673 --- /dev/null +++ b/components/jvcllaz/examples/JvRollOut/MainFrm.lfm @@ -0,0 +1,1594 @@ +object Form1: TForm1 + Left = 265 + Height = 503 + Top = 125 + Width = 800 + Caption = 'JvRollOut Demo' + ClientHeight = 483 + ClientWidth = 800 + Color = clBtnFace + DefaultMonitor = dmDesktop + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Shell Dlg 2' + Menu = MainMenu1 + OnCreate = FormCreate + Position = poScreenCenter + LCLVersion = '2.1.0.0' + Scaled = False + object Splitter1: TSplitter + Cursor = crSizeWE + Left = 280 + Height = 395 + Top = 0 + Width = 5 + AutoSnap = False + Color = clMaroon + MinSize = 200 + ParentColor = False + end + object Panel4: TPanel + Left = 0 + Height = 88 + Top = 395 + Width = 800 + Align = alBottom + BevelInner = bvRaised + BevelOuter = bvLowered + ClientHeight = 88 + ClientWidth = 800 + TabOrder = 0 + object chkShowFocus: TCheckBox + Left = 16 + Height = 19 + Top = 16 + Width = 77 + Caption = 'Show Focus' + Checked = True + OnClick = chkShowFocusClick + State = cbChecked + TabOrder = 0 + end + object chkTabStop: TCheckBox + Left = 16 + Height = 19 + Top = 40 + Width = 63 + Caption = 'Tab Stop' + Checked = True + OnClick = chkTabStopClick + State = cbChecked + TabOrder = 1 + end + object chkToggleAnywhere: TCheckBox + Left = 128 + Height = 19 + Top = 16 + Width = 104 + Caption = 'Toggle Anywhere' + OnClick = chkToggleAnywhereClick + TabOrder = 2 + end + object chkGroupIndex: TCheckBox + Left = 128 + Height = 19 + Top = 40 + Width = 49 + Caption = 'Group' + Checked = True + OnClick = chkGroupIndexClick + State = cbChecked + TabOrder = 3 + end + object chkHideButton: TCheckBox + Left = 264 + Height = 19 + Top = 16 + Width = 109 + Caption = 'Hide Button Frame' + OnClick = chkHideButtonClick + TabOrder = 4 + end + object chkHideFrame: TCheckBox + Left = 264 + Height = 19 + Top = 40 + Width = 110 + Caption = 'Hide Rollout Frame' + OnClick = chkHideFrameClick + TabOrder = 5 + end + object chkImages: TCheckBox + Left = 400 + Height = 19 + Top = 16 + Width = 55 + Caption = 'Images' + Checked = True + OnClick = chkImagesClick + State = cbChecked + TabOrder = 6 + end + end + object Panel3: TPanel + Left = 285 + Height = 395 + Top = 0 + Width = 515 + Align = alClient + BevelOuter = bvNone + ClientHeight = 395 + ClientWidth = 515 + TabOrder = 1 + object Splitter3: TSplitter + Cursor = crVSplit + Left = 0 + Height = 5 + Top = 265 + Width = 515 + Align = alTop + AutoSnap = False + Color = clMaroon + MinSize = 200 + ParentColor = False + ResizeAnchor = akTop + end + object pnlRightAlign: TPanel + Left = 0 + Height = 125 + Top = 270 + Width = 515 + Align = alClient + BevelOuter = bvNone + ClientHeight = 125 + ClientWidth = 515 + Color = clGray + ParentColor = False + TabOrder = 0 + object Label3: TLabel + Left = 425 + Height = 125 + Top = 0 + Width = 90 + Align = alRight + Alignment = taCenter + AutoSize = False + Caption = 'Right Aligned' + Color = clGray + Font.Color = clWhite + Font.Height = -13 + Font.Name = 'MS Shell Dlg 2' + Font.Style = [fsBold] + Layout = tlCenter + ParentColor = False + ParentFont = False + Transparent = False + end + object RO40: TJvRollOut + Left = 280 + Height = 125 + Top = 0 + Width = 145 + Align = alRight + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = 'T' + Placement = plLeft + GroupIndex = 1 + ImageOptions.IndexCollapsed = 3 + ImageOptions.IndexExpanded = 2 + ImageOptions.Images = ImageList1 + TabOrder = 6 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 152 + FCWidth = 22 + FCHeight = 152 + end + object RO39: TJvRollOut + Left = 258 + Height = 125 + Top = 0 + Width = 22 + Align = alRight + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = 'S' + Placement = plLeft + Collapsed = True + GroupIndex = 1 + ImageOptions.IndexCollapsed = 3 + ImageOptions.IndexExpanded = 2 + ImageOptions.Images = ImageList1 + TabOrder = 7 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 152 + end + object RO38: TJvRollOut + Left = 236 + Height = 125 + Top = 0 + Width = 22 + Align = alRight + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = 'R' + Placement = plLeft + Collapsed = True + GroupIndex = 1 + ImageOptions.IndexCollapsed = 3 + ImageOptions.IndexExpanded = 2 + ImageOptions.Images = ImageList1 + TabOrder = 8 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 152 + end + object RO37: TJvRollOut + Left = 214 + Height = 125 + Top = 0 + Width = 22 + Align = alRight + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = 'Q' + Placement = plLeft + Collapsed = True + GroupIndex = 1 + ImageOptions.IndexCollapsed = 3 + ImageOptions.IndexExpanded = 2 + ImageOptions.Images = ImageList1 + TabOrder = 9 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 152 + end + object RO36: TJvRollOut + Left = 192 + Height = 125 + Top = 0 + Width = 22 + Align = alRight + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = 'P && &Z' + Placement = plLeft + Collapsed = True + GroupIndex = 1 + ImageOptions.IndexCollapsed = 3 + ImageOptions.IndexExpanded = 2 + ImageOptions.Images = ImageList1 + TabOrder = 5 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 152 + end + object RO35: TJvRollOut + Left = 170 + Height = 125 + Top = 0 + Width = 22 + Align = alRight + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = 'O && &Y' + Placement = plLeft + Collapsed = True + GroupIndex = 1 + ImageOptions.IndexCollapsed = 3 + ImageOptions.IndexExpanded = 2 + ImageOptions.Images = ImageList1 + TabOrder = 4 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 152 + end + object RO34: TJvRollOut + Left = 148 + Height = 125 + Top = 0 + Width = 22 + Align = alRight + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = 'N && &X' + Placement = plLeft + Collapsed = True + GroupIndex = 1 + ImageOptions.IndexCollapsed = 3 + ImageOptions.IndexExpanded = 2 + ImageOptions.Images = ImageList1 + TabOrder = 3 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 152 + end + object RO33: TJvRollOut + Left = 126 + Height = 125 + Top = 0 + Width = 22 + Align = alRight + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = 'M && &W' + Placement = plLeft + Collapsed = True + GroupIndex = 1 + ImageOptions.IndexCollapsed = 3 + ImageOptions.IndexExpanded = 2 + ImageOptions.Images = ImageList1 + TabOrder = 2 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 152 + end + object RO32: TJvRollOut + Left = 104 + Height = 125 + Top = 0 + Width = 22 + Align = alRight + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = 'L && &V' + Placement = plLeft + Collapsed = True + GroupIndex = 1 + ImageOptions.IndexCollapsed = 3 + ImageOptions.IndexExpanded = 2 + ImageOptions.Images = ImageList1 + TabOrder = 1 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 152 + end + object RO31: TJvRollOut + Left = 82 + Height = 125 + Top = 0 + Width = 22 + Align = alRight + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = 'K && &U' + Placement = plLeft + Collapsed = True + GroupIndex = 1 + ImageOptions.IndexCollapsed = 3 + ImageOptions.IndexExpanded = 2 + ImageOptions.Images = ImageList1 + TabOrder = 0 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 152 + FCWidth = 22 + FCHeight = 152 + end + end + object pnlLeftAlign: TPanel + Left = 0 + Height = 265 + Top = 0 + Width = 515 + Align = alTop + BevelOuter = bvNone + ClientHeight = 265 + ClientWidth = 515 + Color = clGray + ParentColor = False + TabOrder = 1 + object Label4: TLabel + Left = 0 + Height = 265 + Top = 0 + Width = 90 + Align = alLeft + Alignment = taCenter + AutoSize = False + Caption = 'Left Aligned' + Color = clGray + Font.Color = clWhite + Font.Height = -13 + Font.Name = 'MS Shell Dlg 2' + Font.Style = [fsBold] + Layout = tlCenter + ParentColor = False + ParentFont = False + Transparent = False + end + object RO30: TJvRollOut + Left = 515 + Height = 265 + Top = 0 + Width = 22 + Align = alLeft + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = 'J && &T' + Placement = plLeft + Collapsed = True + GroupIndex = 1 + ImageOptions.IndexCollapsed = 7 + ImageOptions.IndexExpanded = 6 + ImageOptions.Images = ImageList1 + TabOrder = 6 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 129 + FCWidth = 22 + FCHeight = 22 + end + object RO29: TJvRollOut + Left = 389 + Height = 265 + Top = 0 + Width = 145 + Align = alLeft + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = 'I && &S' + Placement = plLeft + Collapsed = True + GroupIndex = 1 + ImageOptions.IndexCollapsed = 7 + ImageOptions.IndexExpanded = 6 + ImageOptions.Images = ImageList1 + TabOrder = 7 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 145 + FCHeight = 129 + end + object RO28: TJvRollOut + Left = 367 + Height = 265 + Top = 0 + Width = 22 + Align = alLeft + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = 'H && &R' + Placement = plLeft + Collapsed = True + GroupIndex = 1 + ImageOptions.IndexCollapsed = 7 + ImageOptions.IndexExpanded = 6 + ImageOptions.Images = ImageList1 + TabOrder = 8 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 129 + end + object RO27: TJvRollOut + Left = 345 + Height = 265 + Top = 0 + Width = 22 + Align = alLeft + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = 'G && &Q' + Placement = plLeft + Collapsed = True + GroupIndex = 1 + ImageOptions.IndexCollapsed = 7 + ImageOptions.IndexExpanded = 6 + ImageOptions.Images = ImageList1 + TabOrder = 9 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 129 + end + object RO26: TJvRollOut + Left = 323 + Height = 265 + Top = 0 + Width = 22 + Align = alLeft + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = 'F && &P' + Placement = plLeft + Collapsed = True + GroupIndex = 1 + ImageOptions.IndexCollapsed = 7 + ImageOptions.IndexExpanded = 6 + ImageOptions.Images = ImageList1 + TabOrder = 5 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 129 + end + object RO25: TJvRollOut + Left = 301 + Height = 265 + Top = 0 + Width = 22 + Align = alLeft + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = 'E && &O' + Placement = plLeft + Collapsed = True + GroupIndex = 1 + ImageOptions.IndexCollapsed = 7 + ImageOptions.IndexExpanded = 6 + ImageOptions.Images = ImageList1 + TabOrder = 4 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 129 + end + object RO24: TJvRollOut + Left = 279 + Height = 265 + Top = 0 + Width = 22 + Align = alLeft + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = 'D && &N' + Placement = plLeft + Collapsed = True + GroupIndex = 1 + ImageOptions.IndexCollapsed = 7 + ImageOptions.IndexExpanded = 6 + ImageOptions.Images = ImageList1 + TabOrder = 3 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 129 + end + object RO23: TJvRollOut + Left = 257 + Height = 265 + Top = 0 + Width = 22 + Align = alLeft + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = 'C && &M' + Placement = plLeft + Collapsed = True + GroupIndex = 1 + ImageOptions.IndexCollapsed = 7 + ImageOptions.IndexExpanded = 6 + ImageOptions.Images = ImageList1 + TabOrder = 2 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 129 + end + object RO22: TJvRollOut + Left = 235 + Height = 265 + Top = 0 + Width = 22 + Align = alLeft + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = 'B && &L' + Placement = plLeft + Collapsed = True + GroupIndex = 1 + ImageOptions.IndexCollapsed = 7 + ImageOptions.IndexExpanded = 6 + ImageOptions.Images = ImageList1 + TabOrder = 1 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 129 + end + object RO21: TJvRollOut + Left = 90 + Height = 265 + Top = 0 + Width = 145 + Align = alLeft + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = 'A && &K' + Placement = plLeft + GroupIndex = 1 + ImageOptions.IndexCollapsed = 7 + ImageOptions.IndexExpanded = 6 + ImageOptions.Images = ImageList1 + TabOrder = 0 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 129 + end + end + end + object Panel1: TPanel + Left = 0 + Height = 395 + Top = 0 + Width = 280 + Align = alLeft + BevelOuter = bvNone + ClientHeight = 395 + ClientWidth = 280 + TabOrder = 2 + object Splitter2: TSplitter + Cursor = crSizeWE + Left = 144 + Height = 395 + Top = 0 + Width = 5 + AutoSnap = False + Color = clMaroon + MinSize = 100 + ParentColor = False + end + object pnlTopAlign: TPanel + Left = 0 + Height = 395 + Top = 0 + Width = 144 + Align = alLeft + BevelOuter = bvNone + ClientHeight = 395 + ClientWidth = 144 + Color = clGray + ParentColor = False + TabOrder = 0 + object Label1: TLabel + Left = 0 + Height = 40 + Top = 0 + Width = 144 + Align = alTop + Alignment = taCenter + AutoSize = False + Caption = 'Top Aligned' + Color = clGray + Font.Color = clWhite + Font.Height = -13 + Font.Name = 'MS Shell Dlg 2' + Font.Style = [fsBold] + Layout = tlCenter + ParentColor = False + ParentFont = False + Transparent = False + end + object RO1: TJvRollOut + Left = 0 + Height = 22 + Top = 40 + Width = 144 + Action = JvRollOutAction1 + Align = alTop + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Collapsed = True + GroupIndex = 1 + ImageOptions.Images = ImageList1 + TabOrder = 0 + TabStop = True + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 22 + object Edit1: TEdit + Left = 8 + Height = 21 + Top = 40 + Width = 121 + TabOrder = 0 + Text = 'Edit1' + end + object Edit2: TEdit + Left = 8 + Height = 21 + Top = 72 + Width = 121 + TabOrder = 1 + Text = 'Edit2' + end + object Edit3: TEdit + Left = 8 + Height = 21 + Top = 104 + Width = 121 + TabOrder = 2 + Text = 'Edit3' + end + object Edit4: TEdit + Left = 8 + Height = 21 + Top = 136 + Width = 121 + TabOrder = 3 + Text = 'Edit4' + end + end + object RO2: TJvRollOut + Left = 0 + Height = 22 + Top = 62 + Width = 144 + Action = JvRollOutAction2 + Align = alTop + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Collapsed = True + GroupIndex = 1 + ImageOptions.Images = ImageList1 + TabOrder = 1 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 22 + object Edit5: TEdit + Left = 8 + Height = 21 + Top = 40 + Width = 121 + Color = clBtnFace + TabStop = False + TabOrder = 0 + Text = 'Edit1' + end + object Edit6: TEdit + Left = 8 + Height = 21 + Top = 72 + Width = 121 + Color = clBtnFace + TabStop = False + TabOrder = 1 + Text = 'Edit2' + end + object Edit7: TEdit + Left = 8 + Height = 21 + Top = 104 + Width = 121 + TabOrder = 2 + Text = 'Edit3' + end + object Edit8: TEdit + Left = 8 + Height = 21 + Top = 136 + Width = 121 + TabOrder = 3 + Text = 'Edit4' + end + end + object RO3: TJvRollOut + Left = 0 + Height = 22 + Top = 84 + Width = 144 + Align = alTop + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = '&3' + Collapsed = True + GroupIndex = 1 + ImageOptions.Images = ImageList1 + TabOrder = 2 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 22 + object Edit9: TEdit + Left = 8 + Height = 21 + Top = 40 + Width = 121 + TabOrder = 0 + Text = 'Edit1' + end + object Edit10: TEdit + Left = 8 + Height = 21 + Top = 72 + Width = 121 + TabOrder = 1 + Text = 'Edit2' + end + object Edit11: TEdit + Left = 8 + Height = 21 + Top = 104 + Width = 121 + Color = clBtnFace + TabStop = False + TabOrder = 2 + Text = 'Edit3' + end + object Edit12: TEdit + Left = 8 + Height = 21 + Top = 136 + Width = 121 + Color = clBtnFace + TabStop = False + TabOrder = 3 + Text = 'Edit4' + end + end + object RO4: TJvRollOut + Left = 0 + Height = 22 + Top = 106 + Width = 144 + Align = alTop + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = '&4' + Collapsed = True + GroupIndex = 1 + ImageOptions.Images = ImageList1 + TabOrder = 3 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 22 + end + object RO5: TJvRollOut + Left = 0 + Height = 22 + Top = 128 + Width = 144 + Align = alTop + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = '&5' + Collapsed = True + GroupIndex = 1 + ImageOptions.Images = ImageList1 + TabOrder = 4 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 22 + end + object RO6: TJvRollOut + Left = 0 + Height = 22 + Top = 150 + Width = 144 + Align = alTop + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = '&6' + Collapsed = True + GroupIndex = 1 + ImageOptions.Images = ImageList1 + TabOrder = 5 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 22 + end + object RO7: TJvRollOut + Left = 0 + Height = 22 + Top = 172 + Width = 144 + Align = alTop + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = '&7' + Collapsed = True + GroupIndex = 1 + ImageOptions.Images = ImageList1 + TabOrder = 6 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 22 + end + object RO8: TJvRollOut + Left = 0 + Height = 22 + Top = 194 + Width = 144 + Align = alTop + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = '&8' + Collapsed = True + GroupIndex = 1 + ImageOptions.Images = ImageList1 + TabOrder = 7 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 22 + end + object RO9: TJvRollOut + Left = 0 + Height = 22 + Top = 216 + Width = 144 + Align = alTop + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = '&9' + Collapsed = True + GroupIndex = 1 + ImageOptions.Images = ImageList1 + TabOrder = 8 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 22 + end + object RO10: TJvRollOut + Left = 0 + Height = 22 + Top = 238 + Width = 144 + Align = alTop + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = '1&0' + Collapsed = True + GroupIndex = 1 + ImageOptions.Images = ImageList1 + TabOrder = 9 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 22 + end + end + object pnlBottomAlign: TPanel + Left = 149 + Height = 395 + Top = 0 + Width = 131 + Align = alClient + BevelOuter = bvNone + ClientHeight = 395 + ClientWidth = 131 + Color = clGray + ParentColor = False + TabOrder = 1 + object Label2: TLabel + Left = 0 + Height = 40 + Top = 355 + Width = 131 + Align = alBottom + Alignment = taCenter + AutoSize = False + Caption = 'Bottom Aligned' + Color = clGray + Font.Color = clWhite + Font.Height = -13 + Font.Name = 'MS Shell Dlg 2' + Font.Style = [fsBold] + Layout = tlCenter + ParentColor = False + ParentFont = False + Transparent = False + end + object RO20: TJvRollOut + Left = 0 + Height = 170 + Top = 185 + Width = 131 + Align = alBottom + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = '&J' + GroupIndex = 1 + ImageOptions.IndexCollapsed = 5 + ImageOptions.IndexExpanded = 4 + ImageOptions.Images = ImageList1 + TabOrder = 6 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 22 + end + object RO19: TJvRollOut + Left = 0 + Height = 22 + Top = 163 + Width = 131 + Align = alBottom + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = '&I' + Collapsed = True + GroupIndex = 1 + ImageOptions.IndexCollapsed = 5 + ImageOptions.IndexExpanded = 4 + ImageOptions.Images = ImageList1 + TabOrder = 7 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 22 + end + object RO18: TJvRollOut + Left = 0 + Height = 22 + Top = 141 + Width = 131 + Align = alBottom + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = '&H' + Collapsed = True + GroupIndex = 1 + ImageOptions.IndexCollapsed = 5 + ImageOptions.IndexExpanded = 4 + ImageOptions.Images = ImageList1 + TabOrder = 8 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 22 + end + object RO17: TJvRollOut + Left = 0 + Height = 22 + Top = 119 + Width = 131 + Align = alBottom + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = '&G' + Collapsed = True + GroupIndex = 1 + ImageOptions.IndexCollapsed = 5 + ImageOptions.IndexExpanded = 4 + ImageOptions.Images = ImageList1 + TabOrder = 9 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 22 + end + object RO16: TJvRollOut + Left = 0 + Height = 22 + Top = 97 + Width = 131 + Align = alBottom + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = '&F' + Collapsed = True + GroupIndex = 1 + ImageOptions.IndexCollapsed = 5 + ImageOptions.IndexExpanded = 4 + ImageOptions.Images = ImageList1 + TabOrder = 5 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 22 + end + object RO15: TJvRollOut + Left = 0 + Height = 22 + Top = 75 + Width = 131 + Align = alBottom + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = '&E' + Collapsed = True + GroupIndex = 1 + ImageOptions.IndexCollapsed = 5 + ImageOptions.IndexExpanded = 4 + ImageOptions.Images = ImageList1 + TabOrder = 4 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 22 + end + object RO14: TJvRollOut + Left = 0 + Height = 22 + Top = 53 + Width = 131 + Align = alBottom + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = '&D' + Collapsed = True + GroupIndex = 1 + ImageOptions.IndexCollapsed = 5 + ImageOptions.IndexExpanded = 4 + ImageOptions.Images = ImageList1 + TabOrder = 3 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 22 + end + object RO13: TJvRollOut + Left = 0 + Height = 22 + Top = 31 + Width = 131 + Align = alBottom + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = '&C' + Collapsed = True + GroupIndex = 1 + ImageOptions.IndexCollapsed = 5 + ImageOptions.IndexExpanded = 4 + ImageOptions.Images = ImageList1 + TabOrder = 2 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 22 + end + object RO12: TJvRollOut + Left = 0 + Height = 22 + Top = 9 + Width = 131 + Align = alBottom + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = '&B' + Collapsed = True + GroupIndex = 1 + ImageOptions.IndexCollapsed = 5 + ImageOptions.IndexExpanded = 4 + ImageOptions.Images = ImageList1 + TabOrder = 1 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 22 + end + object RO11: TJvRollOut + Left = 0 + Height = 22 + Top = -13 + Width = 131 + Align = alBottom + ButtonFont.Color = clWindowText + ButtonFont.Style = [fsBold] + Caption = '&A' + Collapsed = True + GroupIndex = 1 + ImageOptions.IndexCollapsed = 5 + ImageOptions.IndexExpanded = 4 + ImageOptions.Images = ImageList1 + TabOrder = 0 + TabStop = True + ToggleAnywhere = False + FAWidth = 145 + FAHeight = 170 + FCWidth = 22 + FCHeight = 22 + end + end + end + object ImageList1: TImageList + left = 584 + top = 408 + Bitmap = { + 4C69090000001000000010000000000000000000000000000000848484FF0000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000848484FFC6C6C6FF8484 + 84FF000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF840084FFFFFFFFFFC6C6 + C6FF848484FF00000000000000000000000000000000848484FF848484FF8484 + 84FF00000000000000000000000000000000000000FF840084FFFFFFFFFFFFFF + FFFF848484FF0000000000000000848484FF848484FFFFFFFFFFFFFFFFFF8484 + 84FF00000000000000000000000000000000000000FF840084FFFFFFFFFFFFFF + FFFFC6C6C6FF848484FF848484FFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFF8484 + 84FF000000FF000000FF0000000000000000000000FF840084FFFFFFFFFFFFFF + FFFFFFFFFFFF000000FFC6C6C6FFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFF8484 + 84FFFFFFFFFF840084FF000000FF00000000000000FF840084FFFFFFFFFFFFFF + FFFFFFFFFFFF000000FFC6C6C6FFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFF8484 + 84FFFFFFFFFF840084FF000000FF00000000000000FF840084FFFFFFFFFFFFFF + FFFFFFFFFFFF000000FFC6C6C6FFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFF8484 + 84FFFFFFFFFF840084FF000000FF00000000000000FF840084FFFFFFFFFFFFFF + FFFFFFFFFFFF000000FFC6C6C6FFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFF8484 + 84FFFFFFFFFF840084FF000000FF00000000000000FF840084FFFFFFFFFFFFFF + FFFFFFFFFFFF000000FFC6C6C6FFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFF8484 + 84FFFFFFFFFF840084FF000000FF00000000000000FF840084FF840084FFFFFF + FFFFFFFFFFFF000000FFC6C6C6FFFFFFFFFFFFFFFFFFFFFFFFFF848484FFC6C6 + C6FFFFFFFFFF840084FF000000FF0000000000000000000000FF840084FF8400 + 84FFFFFFFFFF000000FFC6C6C6FFFFFFFFFF848484FF848484FFC6C6C6FFFFFF + FFFFFFFFFFFF840084FF000000FF000000000000000000000000000000FF8400 + 84FFFFFFFFFF000000FF848484FF848484FFC6C6C6FFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFF840084FF000000FF000000000000000000000000000000000000 + 00FF840084FF840084FF840084FF840084FF840084FF840084FF840084FF8400 + 84FF840084FF840084FF000000FF000000000000000000000000000000000000 + 0000000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000FF000000FF840084FF840084FF000000FF00000000000000000000 + 0000000000000000000000000000000000000000000000000000000000FF0000 + 00FF840084FF840084FF840084FF840084FF840084FF000000FF000000000000 + 000000000000000000000000000000000000000000FF000000FF840084FF8400 + 84FF840084FF840084FF840084FF840084FF840084FF840084FF000000FF0000 + 0000000000000000000000000000000000FFC6C6C6FF840084FF840084FF8400 + 84FF840084FF840084FF840084FF840084FF840084FF840084FF840084FF0000 + 00FF000000000000000000000000000000FF840084FFC6C6C6FF840084FF8400 + 84FF840084FF840084FF840084FF840084FF840084FF840084FF840084FF8400 + 84FF000000FF0000000000000000000000FF840084FF840084FFC6C6C6FF8400 + 84FF840084FF840084FF840084FF840084FF840084FF840084FF840084FF8400 + 84FF840084FF000000FF00000000000000FF840084FF840084FF840084FFC6C6 + C6FF840084FF840084FF840084FF840084FF840084FF840084FF840084FF8400 + 84FF840084FF000000FF000000FF000000FF840084FF840084FF840084FF8400 + 84FFC6C6C6FF840084FF840084FF840084FF840084FF840084FF840084FF0000 + 00FF000000FF848484FF0000000000000000000000FF840084FF840084FF8400 + 84FF840084FFC6C6C6FF840084FF840084FF840084FF000000FF000000FF8484 + 84FFFFFFFFFF848484FF000000000000000000000000000000FF840084FF8400 + 84FF840084FF840084FFC6C6C6FF000000FF000000FF848484FFC6C6C6FFFFFF + FFFFC6C6C6FF000000FF000000FF000000000000000000000000000000FF8400 + 84FF840084FF840084FF000000FF848484FFFFFFFFFFC6C6C6FFFFFFFFFFC6C6 + C6FF000000FF000000FF00000000000000000000000000000000000000000000 + 00FF840084FF840084FF000000FFFFFFFFFFC6C6C6FFFFFFFFFF000000FF0000 + 00FF000000000000000000000000000000000000000000000000000000000000 + 0000000000FF840084FF000000FF848484FF000000FF000000FF000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000000000000000FFFF0000 + 00000000FFFF0000FFFF00000000000000000000000000000000000000000000 + 00000000000000000000000000000000FFFF0000FFFF848484FF0000FFFF0000 + FFFF0000FFFF0000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000FFFF0000FFFF0000FFFF0000 + FFFF0000FFFF0000FFFF0000FFFF0000FFFF00000000848484FF848484FF8484 + 84FF00000000000000000000000000000000000000FF0000FFFF0000FFFFFFFF + FFFF0000FFFF0000FFFF00000000848484FF848484FFFFFFFFFFFFFFFFFF8484 + 84FF0000000000000000000000000000FFFF0000FFFF0000FFFF0000FFFF0000 + FFFF0000FFFF0000FFFF0000FFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFF8484 + 84FF000000FF000000FF0000000000000000000000FF840084FF0000FFFF0000 + FFFF0000FFFF000000FF0000FFFF0000FFFF00FFFFFFFFFFFFFFFFFFFFFF8484 + 84FFFFFFFFFF840084FF000000FF00000000000000FF0000FFFF0000FFFFFFFF + FFFF0000FFFF000000FFC6C6C6FFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFF8484 + 84FFFFFFFFFF840084FF000000FF00000000000000FF0000FFFFFFFFFFFFFFFF + FFFF0000FFFF000000FFC6C6C6FFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFF8484 + 84FFFFFFFFFF840084FF000000FF00000000000000FF840084FFFFFFFFFFFFFF + FFFFFFFFFFFF000000FFC6C6C6FFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFF8484 + 84FFFFFFFFFF840084FF000000FF00000000000000FF840084FFFFFFFFFFFFFF + FFFFFFFFFFFF000000FFC6C6C6FFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFF8484 + 84FFFFFFFFFF840084FF000000FF00000000000000FF840084FF840084FFFFFF + FFFFFFFFFFFF000000FFC6C6C6FFFFFFFFFFFFFFFFFFFFFFFFFF848484FFC6C6 + C6FFFFFFFFFF840084FF000000FF0000000000000000000000FF840084FF8400 + 84FFFFFFFFFF000000FFC6C6C6FFFFFFFFFF848484FF848484FFC6C6C6FFFFFF + FFFFFFFFFFFF840084FF000000FF000000000000000000000000000000FF8400 + 84FFFFFFFFFF000000FF848484FF848484FFC6C6C6FFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFF840084FF000000FF000000000000000000000000000000000000 + 00FF840084FF840084FF840084FF840084FF840084FF840084FF840084FF8400 + 84FF840084FF840084FF000000FF000000000000000000000000000000000000 + 0000000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000000000000000FFFF0000 + 00000000FFFF0000FFFF000000FF000000FF0000000000000000000000000000 + 00000000000000000000000000000000FFFF0000FFFF000000000000FFFF0000 + FFFF0000FFFF000000FF840084FF840084FF000000FF00000000000000000000 + 0000000000000000000000000000000000000000FFFF0000FFFF0000FFFF0000 + FFFF0000FFFF0000FFFF0000FFFF0000FFFF840084FF000000FF000000000000 + 000000000000000000000000000000000000000000FF0000FFFF0000FFFFFFFF + FFFF0000FFFF0000FFFF840084FF840084FF840084FF840084FF000000FF0000 + 00000000000000000000000000000000FFFF0000FFFF0000FFFF0000FFFF0000 + FFFF0000FFFF0000FFFF0000FFFF840084FF840084FF840084FF840084FF0000 + 00FF000000000000000000000000000000FF840084FFC6C6C6FF0000FFFF0000 + FFFF0000FFFF840084FF0000FFFF0000FFFF840084FF840084FF840084FF8400 + 84FF000000FF0000000000000000000000FF840084FF0000FFFF0000FFFF8400 + 84FF0000FFFF840084FF840084FF840084FF840084FF840084FF840084FF8400 + 84FF840084FF000000FF00000000000000FF840084FF0000FFFF840084FFC6C6 + C6FF0000FFFF840084FF840084FF840084FF840084FF840084FF840084FF8400 + 84FF840084FF000000FF000000FF000000FF840084FF840084FF840084FF8400 + 84FFC6C6C6FF840084FF840084FF840084FF840084FF840084FF840084FF0000 + 00FF000000FF848484FF0000000000000000000000FF840084FF840084FF8400 + 84FF840084FFC6C6C6FF840084FF840084FF840084FF000000FF000000FF8484 + 84FFFFFFFFFF848484FF000000000000000000000000000000FF840084FF8400 + 84FF840084FF840084FFC6C6C6FF000000FF000000FF848484FFC6C6C6FFFFFF + FFFFC6C6C6FF000000FF000000FF000000000000000000000000000000FF8400 + 84FF840084FF840084FF000000FF848484FFFFFFFFFFC6C6C6FFFFFFFFFFC6C6 + C6FF000000FF000000FF00000000000000000000000000000000000000000000 + 00FF840084FF840084FF000000FFFFFFFFFFC6C6C6FFFFFFFFFF000000FF0000 + 00FF000000000000000000000000000000000000000000000000000000000000 + 0000000000FF840084FF000000FF848484FF000000FF000000FF000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000848484FF8484 + 84FF848484FF848484FF848484FF000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000848484FFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFF848484FF0000000000000000000000000000 + 000000000000000000000000000000000000848484FFFFFFFFFF00FFFFFFC6C6 + C6FF00FFFFFFC6C6C6FF00FFFFFFFFFFFFFF848484FF848484FF848484FF8484 + 84FF848484FF848484FF0000000000000000848484FFFFFFFFFFC6C6C6FF00FF + FFFFC6C6C6FF00FFFFFFC6C6C6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFF848484FF000000FF00000000848484FFFFFFFFFF00FFFFFFC6C6 + C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6 + C6FF00FFFFFF848484FF000000FF848484FF848484FF848484FF848484FF8484 + 84FF848484FF848484FF848484FF848484FF848484FF848484FF848484FF8484 + 84FF00FFFFFF848484FF000000FF848484FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF848484FF8484 + 84FFC6C6C6FF848484FF000000FF848484FFFFFFFFFF00FFFFFFC6C6C6FF00FF + FFFFC6C6C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6C6FF00FFFFFF00FFFFFF0000 + 00FF848484FF848484FF000000FF00000000848484FFFFFFFFFF00FFFFFFC6C6 + C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6 + C6FF000000FF848484FF000000FF00000000848484FFFFFFFFFFC6C6C6FF00FF + FFFFC6C6C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6C6FF00FF + FFFF000000FF848484FF000000FF0000000000000000848484FFFFFFFFFFC6C6 + C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6C6FF00FFFFFF00FF + FFFF848484FF000000FF000000FF0000000000000000848484FF848484FF8484 + 84FF848484FF848484FF848484FF848484FF848484FF848484FF848484FF8484 + 84FF848484FF848484FF000000FF000000000000000000000000000000FF0000 + 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000848484FF8484 + 84FF848484FF848484FF848484FF000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000848484FF00FFFFFFC6C6 + C6FF00FFFFFFC6C6C6FF00FFFFFF848484FF0000000000000000000000000000 + 000000000000000000000000000000000000848484FF00FFFFFFC6C6C6FF00FF + FFFFC6C6C6FF00FFFFFFC6C6C6FF00FFFFFF848484FF848484FF848484FF8484 + 84FF848484FF848484FF0000000000000000848484FFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFF848484FF000000FF00000000848484FFFFFFFFFF00FFFFFFC6C6 + C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6 + C6FF00FFFFFF848484FF000000FF00000000848484FFFFFFFFFFC6C6C6FF00FF + FFFFC6C6C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6C6FF00FF + FFFFC6C6C6FF848484FF000000FF00000000848484FFFFFFFFFF00FFFFFFC6C6 + C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6 + C6FF00FFFFFF848484FF000000FF00000000848484FFFFFFFFFFC6C6C6FF00FF + FFFFC6C6C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6C6FF00FF + FFFFC6C6C6FF848484FF000000FF00000000848484FFFFFFFFFF00FFFFFFC6C6 + C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6 + C6FF00FFFFFF848484FF000000FF00000000848484FFFFFFFFFFC6C6C6FF00FF + FFFFC6C6C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6C6FF00FF + FFFFC6C6C6FF848484FF000000FF00000000848484FFFFFFFFFF00FFFFFFC6C6 + C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6C6FF00FFFFFFC6C6 + C6FF00FFFFFF848484FF000000FF00000000848484FF848484FF848484FF8484 + 84FF848484FF848484FF848484FF848484FF848484FF848484FF848484FF8484 + 84FF848484FF848484FF000000FF0000000000000000000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000FF0000 + 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF0000000000000000000000000000000000000000000000FF0000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000FF0000000000000000000000000000000000000000000000FF0000 + 0000000000000000000000000000000000000000000000000000000000FF0000 + 0000000000FF0000000000000000000000000000000000000000000000FF0000 + 00000000000000000000000000000000000000000000000000FF000000FF0000 + 0000000000FF0000000000000000000000000000000000000000000000FF0000 + 0000000000FF000000000000000000000000000000FF000000FF000000FF0000 + 0000000000FF0000000000000000000000000000000000000000000000FF0000 + 0000000000FF000000FF00000000000000FF000000FF000000FF000000000000 + 0000000000FF0000000000000000000000000000000000000000000000FF0000 + 0000000000FF000000FF000000FF000000FF000000FF00000000000000000000 + 0000000000FF0000000000000000000000000000000000000000000000FF0000 + 000000000000000000FF000000FF000000FF0000000000000000000000000000 + 0000000000FF0000000000000000000000000000000000000000000000FF0000 + 00000000000000000000000000FF000000000000000000000000000000000000 + 0000000000FF0000000000000000000000000000000000000000000000FF0000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000FF0000000000000000000000000000000000000000000000FF0000 + 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF0000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000FF0000 + 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF0000000000000000000000000000000000000000000000FF0000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000FF0000000000000000000000000000000000000000000000FF0000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000FF0000000000000000000000000000000000000000000000FF0000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000FF0000000000000000000000000000000000000000000000FF0000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000FF0000000000000000000000000000000000000000000000FF0000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000FF0000000000000000000000000000000000000000000000FF0000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000FF0000000000000000000000000000000000000000000000FF0000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000FF0000000000000000000000000000000000000000000000FF0000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000FF0000000000000000000000000000000000000000000000FF0000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000FF0000000000000000000000000000000000000000000000FF0000 + 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF0000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000FF000000000000000000000000000000FF000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000FF000000000000000000000000000000FF000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000FF000000000000000000000000000000FF000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000FF000000FF00000000000000FF000000FF000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000FF00000000000000FF00000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000FF000000FF000000FF00000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000840000FF000000FF840000FF00000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000840000FF00000000840000FF840000FF840000FF0000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000840000FF840000FF840000FF00000000840000FF00000000000000008400 + 00FF000000000000000000000000000000000000000000000000000000008400 + 00FF0000000000000000840000FF00000000840000FF00000000000000008400 + 00FF000000000000000000000000000000000000000000000000000000008400 + 00FF0000000000000000840000FF00000000840000FF00000000000000008400 + 00FF000000000000000000000000000000000000000000000000000000008400 + 00FF0000000000000000840000FF0000000000000000840000FF840000FF0000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000840000FF840000FF00000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000 + } + end + object ActionList1: TActionList + Images = ImageList1 + left = 664 + top = 408 + object JvRollOutAction1: TJvRollOutAction + Caption = 'Action &1 (Ctrl+1)' + OnExecute = JvRollOutAction1Execute + ShortCut = 16433 + RollOut = RO1 + LinkCheckedToCollapsed = False + end + object JvRollOutAction2: TJvRollOutAction + Caption = 'Action &2 (Ctrl+2)' + OnExecute = JvRollOutAction2Execute + ShortCut = 16434 + RollOut = RO2 + LinkCheckedToCollapsed = True + end + end + object MainMenu1: TMainMenu + left = 512 + top = 408 + object Actions1: TMenuItem + Caption = 'Actions' + object Action1Ctrl11: TMenuItem + Action = JvRollOutAction1 + end + object Action2Ctrl21: TMenuItem + Action = JvRollOutAction2 + end + end + end +end diff --git a/components/jvcllaz/examples/JvRollOut/MainFrm.pas b/components/jvcllaz/examples/JvRollOut/MainFrm.pas new file mode 100644 index 000000000..c05ec1fc7 --- /dev/null +++ b/components/jvcllaz/examples/JvRollOut/MainFrm.pas @@ -0,0 +1,206 @@ +unit MainFrm; + +{$mode objfpc}{$H+} + +interface + +uses + SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, ExtCtrls, JvRollOut, ImgList, + StdCtrls, ActnList, Menus; //, JvExtComponent; + +type + TForm1 = class(TForm) + Splitter1: TSplitter; + ImageList1: TImageList; + Panel4: TPanel; + chkShowFocus: TCheckBox; + chkTabStop: TCheckBox; + chkToggleAnywhere: TCheckBox; + Panel3: TPanel; + pnlRightAlign: TPanel; + RO40: TJvRollOut; + RO39: TJvRollOut; + RO38: TJvRollOut; + RO37: TJvRollOut; + RO36: TJvRollOut; + RO35: TJvRollOut; + RO34: TJvRollOut; + RO33: TJvRollOut; + RO32: TJvRollOut; + RO31: TJvRollOut; + pnlLeftAlign: TPanel; + RO30: TJvRollOut; + RO29: TJvRollOut; + RO28: TJvRollOut; + RO27: TJvRollOut; + RO26: TJvRollOut; + RO25: TJvRollOut; + RO24: TJvRollOut; + RO23: TJvRollOut; + RO22: TJvRollOut; + RO21: TJvRollOut; + Panel1: TPanel; + pnlTopAlign: TPanel; + RO1: TJvRollOut; + RO2: TJvRollOut; + RO3: TJvRollOut; + RO4: TJvRollOut; + RO5: TJvRollOut; + RO6: TJvRollOut; + RO7: TJvRollOut; + RO8: TJvRollOut; + RO9: TJvRollOut; + RO10: TJvRollOut; + pnlBottomAlign: TPanel; + RO20: TJvRollOut; + RO19: TJvRollOut; + RO18: TJvRollOut; + RO17: TJvRollOut; + RO16: TJvRollOut; + RO15: TJvRollOut; + RO14: TJvRollOut; + RO13: TJvRollOut; + RO12: TJvRollOut; + RO11: TJvRollOut; + Splitter2: TSplitter; + Splitter3: TSplitter; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + chkGroupIndex: TCheckBox; + chkHideButton: TCheckBox; + chkHideFrame: TCheckBox; + Edit1: TEdit; + Edit2: TEdit; + Edit3: TEdit; + Edit4: TEdit; + Edit5: TEdit; + Edit6: TEdit; + Edit7: TEdit; + Edit8: TEdit; + Edit9: TEdit; + Edit10: TEdit; + Edit11: TEdit; + Edit12: TEdit; + chkImages: TCheckBox; + ActionList1: TActionList; + JvRollOutAction1: TJvRollOutAction; + JvRollOutAction2: TJvRollOutAction; + MainMenu1: TMainMenu; + Actions1: TMenuItem; + Action1Ctrl11: TMenuItem; + Action2Ctrl21: TMenuItem; + procedure chkShowFocusClick(Sender: TObject); + procedure chkTabStopClick(Sender: TObject); + procedure chkToggleAnywhereClick(Sender: TObject); + procedure chkGroupIndexClick(Sender: TObject); + procedure chkHideButtonClick(Sender: TObject); + procedure chkHideFrameClick(Sender: TObject); + procedure chkImagesClick(Sender: TObject); + procedure JvRollOutAction1Execute(Sender: TObject); + procedure JvRollOutAction2Execute(Sender: TObject); + procedure FormCreate(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + Form1: TForm1; + +implementation + +{$R *.lfm} + +procedure TForm1.chkShowFocusClick(Sender: TObject); +var i:integer; +begin + for i := 0 to ComponentCount - 1 do + if Components[i] is TJvRollOut then + TJvRollOut(Components[i]).ShowFocus := chkShowFocus.Checked; +end; + +procedure TForm1.chkTabStopClick(Sender: TObject); +var i:integer; +begin + for i := 0 to ComponentCount - 1 do + if Components[i] is TJvRollOut then + TJvRollOut(Components[i]).TabStop := chkTabStop.Checked; +end; + +procedure TForm1.chkToggleAnywhereClick(Sender: TObject); +var i:integer; +begin + for i := 0 to ComponentCount - 1 do + if Components[i] is TJvRollOut then + TJvRollOut(Components[i]).ToggleAnywhere := chkToggleAnywhere.Checked; +end; + +procedure TForm1.chkGroupIndexClick(Sender: TObject); +var i:integer; +begin + for i := 0 to ComponentCount - 1 do + if Components[i] is TJvRollOut then + TJvRollOut(Components[i]).GroupIndex := Ord(chkGroupIndex.Checked); +end; + +procedure TForm1.chkHideButtonClick(Sender: TObject); +const + cTopColor:array[boolean] of TColor = (clBtnHighlight, clNone); + cBtmColor:array[boolean] of TColor = (clBtnShadow, clNone); +var i:integer; +begin + for i := 0 to ComponentCount - 1 do + if Components[i] is TJvRollOut then + begin + TJvRollOut(Components[i]).Colors.ButtonTop := cTopColor[chkHideButton.Checked]; + TJvRollOut(Components[i]).Colors.ButtonBottom := cBtmColor[chkHideButton.Checked]; + end; +end; + +procedure TForm1.chkHideFrameClick(Sender: TObject); +const + cTopColor:array[boolean] of TColor = (clBtnShadow, clNone); + cBtmColor:array[boolean] of TColor = (clBtnHighlight, clNone); +var i:integer; +begin + for i := 0 to ComponentCount - 1 do + if Components[i] is TJvRollOut then + begin + TJvRollOut(Components[i]).Colors.FrameTop := cTopColor[chkHideFrame.Checked]; + TJvRollOut(Components[i]).Colors.FrameBottom := cBtmColor[chkHideFrame.Checked]; + end; +end; + +procedure TForm1.chkImagesClick(Sender: TObject); +var i:integer; +begin + for i := 0 to ComponentCount - 1 do + if Components[i] is TJvRollOut then + begin + if chkImages.Checked then + TJvRollOut(Components[i]).ImageOptions.Images := ImageList1 + else + TJvRollOut(Components[i]).ImageOptions.Images := nil; + end; +end; + +procedure TForm1.JvRollOutAction1Execute(Sender: TObject); +begin + Caption := 'Action 1 executed!'; +end; + +procedure TForm1.JvRollOutAction2Execute(Sender: TObject); +begin + Caption := 'Action 2 executed!'; +end; + +procedure TForm1.FormCreate(Sender: TObject); +begin + JvRollOutAction2.AutoCheck := true; +end; + +end. diff --git a/components/jvcllaz/packages/jvctrlslazd.lpk b/components/jvcllaz/packages/jvctrlslazd.lpk index e318195b3..1ccb5f113 100644 --- a/components/jvcllaz/packages/jvctrlslazd.lpk +++ b/components/jvcllaz/packages/jvctrlslazd.lpk @@ -4,7 +4,7 @@ <PathDelim Value="\"/> <Name Value="JvCtrlsLazD"/> <Type Value="RunAndDesignTime"/> - <Author Value="Lazarus port by: Michał Gawrycki, Werner Pamler"/> + <Author Value="Several original authors - see header of each unit for details. Lazarus port by: Michał Gawrycki, Werner Pamler"/> <CompilerOptions> <Version Value="11"/> <PathDelim Value="\"/> @@ -15,9 +15,7 @@ </SearchPaths> </CompilerOptions> <Description Value="Controls of the JVCL library (https://sourceforge.net/projects/jvcl/) (designtime code): -- Movable bevel and panel -- Ruler -- Hypertext components +- Movable bevel and panel, ruler, expandable panel (RollOut), group header, hypertext components "/> <License Value="The JVCL is released in accordance with the MPL 1.1 license. To get your own copy or read it, go to http://www.mozilla.org/MPL/MPL-1.1.html. "/> <Version Major="1" Release="4"/> @@ -36,7 +34,7 @@ <UnitName Value="JvHTHintForm"/> </Item3> </Files> - <RequiredPkgs Count="4"> + <RequiredPkgs Count="3"> <Item1> <PackageName Value="IDEIntf"/> </Item1> @@ -46,9 +44,6 @@ <Item3> <PackageName Value="JvCtrlsLazR"/> </Item3> - <Item4> - <PackageName Value="FCL"/> - </Item4> </RequiredPkgs> <UsageOptions> <UnitPath Value="$(PkgOutDir)"/> diff --git a/components/jvcllaz/packages/jvctrlslazr.lpk b/components/jvcllaz/packages/jvctrlslazr.lpk index 36f9f56f9..552e00491 100644 --- a/components/jvcllaz/packages/jvctrlslazr.lpk +++ b/components/jvcllaz/packages/jvctrlslazr.lpk @@ -3,7 +3,7 @@ <Package Version="4"> <PathDelim Value="\"/> <Name Value="JvCtrlsLazR"/> - <Author Value="Lazarus port by: Michał Gawrycki, Werner Pamler"/> + <Author Value="Several original authors - see header of each unit for details. Lazarus port by: Michał Gawrycki, Werner Pamler"/> <CompilerOptions> <Version Value="11"/> <PathDelim Value="\"/> @@ -13,13 +13,11 @@ </SearchPaths> </CompilerOptions> <Description Value="Controls of the JVCL library (https://sourceforge.net/projects/jvcl/) (runtime code): -- Movable bevel and panel -- Ruler -- Hypertext components +- Movable bevel and panel, ruler, exandable panel (RollOut), group header, hypertext components "/> <License Value="The JVCL is released in accordance with the MPL 1.1 license. To get your own copy or read it, go to http://www.mozilla.org/MPL/MPL-1.1.html. "/> <Version Major="1" Release="4"/> - <Files Count="5"> + <Files Count="6"> <Item1> <Filename Value="..\run\JvCtrls\jvhint.pas"/> <UnitName Value="JvHint"/> @@ -40,6 +38,10 @@ <Filename Value="..\run\JvCtrls\jvgroupheader.pas"/> <UnitName Value="JvGroupHeader"/> </Item5> + <Item6> + <Filename Value="..\run\JvCtrls\jvrollout.pas"/> + <UnitName Value="JvRollOut"/> + </Item6> </Files> <RequiredPkgs Count="2"> <Item1> diff --git a/components/jvcllaz/packages/jvdtrlslazr.lpk b/components/jvcllaz/packages/jvdtrlslazr.lpk deleted file mode 100644 index 0876db5b1..000000000 --- a/components/jvcllaz/packages/jvdtrlslazr.lpk +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<CONFIG> - <Package Version="4"> - <PathDelim Value="\"/> - <Name Value="JvCtrlsLazR"/> - <Author Value="Lazarus port by: Michał Gawrycki, Werner Pamler"/> - <CompilerOptions> - <Version Value="11"/> - <PathDelim Value="\"/> - <SearchPaths> - <OtherUnitFiles Value="..\run\JvCtrls"/> - <UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)\run\JvCtrls"/> - </SearchPaths> - </CompilerOptions> - <Description Value="Controls of the JVCL library (https://sourceforge.net/projects/jvcl/) (runtime code): -- Movable bevel and panel -- Ruler -- Hypertext components -"/> - <License Value="The JVCL is released in accordance with the MPL 1.1 license. To get your own copy or read it, go to http://www.mozilla.org/MPL/MPL-1.1.html. "/> - <Version Major="1" Release="4"/> - <Files Count="5"> - <Item1> - <Filename Value="..\run\JvCtrls\jvhint.pas"/> - <UnitName Value="JvHint"/> - </Item1> - <Item2> - <Filename Value="..\run\JvCtrls\jvhtcontrols.pas"/> - <UnitName Value="JvHtControls"/> - </Item2> - <Item3> - <Filename Value="..\run\JvCtrls\jvmovablebevel.pas"/> - <UnitName Value="JvMovableBevel"/> - </Item3> - <Item4> - <Filename Value="..\run\JvCtrls\jvruler.pas"/> - <UnitName Value="JvRuler"/> - </Item4> - <Item5> - <Filename Value="..\run\JvCtrls\jvgroupheader.pas"/> - <UnitName Value="jvgroupheader"/> - </Item5> - </Files> - <RequiredPkgs Count="2"> - <Item1> - <PackageName Value="JvCoreLazR"/> - </Item1> - <Item2> - <PackageName Value="FCL"/> - </Item2> - </RequiredPkgs> - <UsageOptions> - <UnitPath Value="$(PkgOutDir)"/> - </UsageOptions> - <PublishOptions> - <Version Value="2"/> - </PublishOptions> - </Package> -</CONFIG> diff --git a/components/jvcllaz/resource/jvctrlsreg.res b/components/jvcllaz/resource/jvctrlsreg.res index fa92d53b226265a0d7ad816bb17bac99b5ac96ac..d06eb1fa910ece1d2c9eb62e324056f23525775e 100644 GIT binary patch delta 587 zcmbu6u?@m75JfM@VgR6_WCtXwoJEU}f)LPArJ-el43Pn7JOC0+Hei8l6D#KX;y^;^ z_;H%|@BYcY;u)1?bT87yWlXdrBIibQpbed9PYG@DC3FO#{5qRHcIUOqjO(ekwyLbP zY`CkqwxBq=&-oWu=tNGa*KLkcFgjd}j2RqG*APdrQo@m?jfO%sygI1iZAX|DyEt%f z`1qg?Z=yIG8oJlOZ4jn+gZ|-ik!En_5ai5I!ZrCz2T6kwj@4@XZ!tH#SMOiT^VQdi QW#7UvbuyUj@>@E80p^zS&;S4c delta 9 Qcmca|g>lDm#tl1?0UAC8^#A|> diff --git a/components/jvcllaz/run/JvCtrls/jvrollout.pas b/components/jvcllaz/run/JvCtrls/jvrollout.pas new file mode 100644 index 000000000..a84f4f1a0 --- /dev/null +++ b/components/jvcllaz/run/JvCtrls/jvrollout.pas @@ -0,0 +1,1707 @@ +{----------------------------------------------------------------------------- +The contents of this file are subject to the Mozilla Public License +Version 1.1 (the "License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at +http://www.mozilla.org/MPL/MPL-1.1.html +Software distributed under the License is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for +the specific language governing rights and limitations under the License. +The Original Code is: JvRollOut.PAS, released on 2002-05-26. +The Initial Developer of the Original Code is Peter Thörnqvist [peter3 at sourceforge dot net] +Portions created by Peter Thörnqvist are Copyright (C) 2002 Peter Thörnqvist. +All Rights Reserved. +Contributor(s): +You may retrieve the latest version of this file at the Project JEDI's JVCL home page, +located at http://jvcl.delphi-jedi.org +Description: + TJvRollOut is an autoexpanding / collapsing panel. +Known Issues: + Doesn't draw an underline for speed-keys (the '&' character ) if + Placement = plLeft. Something with DrawText ? +Changes 2003-03-23: + * Several properties have changed and been put into nested sub-properties. + To update current usage do the following: + - Color: change to Colors.Color + - ButtonColor: change to Colors.ButtonColor + - ButtonColTop: change to Colors.ButtonTop + - ButtonColBtm: change to Colors.ButtonBottom + - ColHiText: change to Colors.HotTrackText + - FrameColTop: change to Colors.FrameTop + - FrameColBtm: change to Colors.FrameBottom + - ImageExpanded: change to ImageOptions.IndexExpanded + - ImageCollapsed: change to ImageOptions.IndexCollapsed + - ImageList: change to ImageOptions.Images + - ImageOffset: change to ImageOptions.Offset // peter3 +-----------------------------------------------------------------------------} +// $Id$ + +unit JvRollOut; + +{$mode objfpc}{$H+} +interface + +uses + LCLType, LCLIntf, LMessages, + SysUtils, Classes, Controls, Graphics, ImgList, ExtCtrls, ActnList, Forms, + //JvExtComponent, + JvThemes; + +const + CM_EXPANDED = WM_USER + 155; + DefaultButtonColor = clBtnFace; + DefaultHotTextColor = clWindowText; + +type + TJvPlacement = (plTop, plLeft); + + TJvRollOutButtonStyle = (bsButton, bsHeader); + + TJvRollOutColors = class(TPersistent) + private + FFrameBottom: TColor; + FHotTrackText: TColor; + FFrameTop: TColor; + FColor: TColor; + FButtonTop: TColor; + FButtonBottom: TColor; + FOnChange: TNotifyEvent; + FButtonColor: TColor; + procedure SetButtonBottom(const Value: TColor); + procedure SetButtonTop(const Value: TColor); + procedure SetColor(const Value: TColor); + procedure SetFrameBottom(const Value: TColor); + procedure SetFrameTop(const Value: TColor); + procedure SetHotTrackText(const Value: TColor); + procedure SetButtonColor(const Value: TColor); + protected + procedure Change; + public + constructor Create; + published + property ButtonBottom: TColor read FButtonBottom write SetButtonBottom default clBtnShadow; + property ButtonTop: TColor read FButtonTop write SetButtonTop default clBtnHighlight; + property ButtonColor: TColor read FButtonColor write SetButtonColor default DefaultButtonColor; + property HotTrackText: TColor read FHotTrackText write SetHotTrackText default DefaultHotTextColor; + property Color: TColor read FColor write SetColor default clBtnFace; + property FrameBottom: TColor read FFrameBottom write SetFrameBottom default clBtnHighlight; + property FrameTop: TColor read FFrameTop write SetFrameTop default clBtnShadow; + property OnChange: TNotifyEvent read FOnChange write FOnChange; + end; + + TJvRollOutImageOptions = class(TPersistent) + private + FOffset: Integer; + FImages: TCustomImageList; + FIndexCollapsed: TImageIndex; + FIndexExpanded: TImageIndex; + FOnChange: TNotifyEvent; + FChangeLink: TChangeLink; + FOwner: TComponent; + procedure SetImages(const Value: TCustomImageList); + procedure SetIndexCollapsed(const Value: TImageIndex); + procedure SetIndexExpanded(const Value: TImageIndex); + procedure SetOffset(const Value: Integer); + protected + procedure Change; + procedure DoChangeLink(Sender: TObject); + public + constructor Create; + destructor Destroy; override; + published + property IndexCollapsed: TImageIndex read FIndexCollapsed write SetIndexCollapsed default 1; + property IndexExpanded: TImageIndex read FIndexExpanded write SetIndexExpanded default 0; + property Images: TCustomImageList read FImages write SetImages; + property Offset: Integer read FOffset write SetOffset default 5; + property OnChange: TNotifyEvent read FOnChange write FOnChange; + end; + + TJvCustomRollOut = class(TCustomPanel) //TJvCustomPanel) + private + FGroupIndex: Integer; + FButtonRect: TRect; + FPlacement: TJvPlacement; + FCollapsed: Boolean; + FMouseDown: Boolean; + FInsideButton: Boolean; + FCWidth: Integer; + FCHeight: Integer; + FAWidth: Integer; + FAHeight: Integer; + FButtonHeight: Integer; + FChildOffset: Integer; + FOnExpand: TNotifyEvent; + FOnCollapse: TNotifyEvent; + FColors: TJvRollOutColors; + FImageOptions: TJvRollOutImageOptions; + FToggleAnywhere: Boolean; + FShowFocus: Boolean; + FChildControlVisibility: TStringList; + + FButtonFont: TFont; + FCollapsedList: array of Boolean; + FSmartExpand: Boolean; + FSmartShow: Boolean; + FTopForm: TForm; + FOldParent: TControl; + FOldPos: TPoint; + FOldWidthHeight: TPoint; + FOldAlign: TAlign; + + FButtonStyle: TJvRollOutButtonStyle; + FCollapseCtrlsOnButton: Boolean; + FUseGroupBoxCaptionColor: Boolean; + + procedure SetGroupIndex(Value: Integer); + procedure SetPlacement(Value: TJvPlacement); + + procedure WriteAWidth(Writer: TWriter); + procedure WriteAHeight(Writer: TWriter); + procedure WriteCWidth(Writer: TWriter); + procedure WriteCHeight(Writer: TWriter); + procedure ReadAWidth(Reader: TReader); + procedure ReadAHeight(Reader: TReader); + procedure ReadCWidth(Reader: TReader); + procedure ReadCHeight(Reader: TReader); + + procedure SetCollapsed(Value: Boolean); + procedure SetButtonHeight(Value: Integer); + procedure SetChildOffset(Value: Integer); + procedure RedrawControl(DrawAll: Boolean); + procedure DrawButtonFrame; + {$IFDEF RTL230_UP} + procedure DrawThemedButtonFrame; + {$ENDIF RTL230_UP} + procedure UpdateGroup; + procedure SetExpandedSize(const Value: Integer); + procedure CMExpanded(var Msg: TLMessage); message CM_EXPANDED; + procedure ChangeHeight(NewHeight: Integer); + procedure ChangeWidth(NewWidth: Integer); + procedure SetShowFocus(const Value: Boolean); + procedure SetButtonFont(const Value: TFont); + + procedure SetSmartExpand(const Value: Boolean); + procedure OnTopDeactivate(Sender : TObject); + procedure RestoreFromTopForm; + procedure PutOnForm; + function IsButtonFontStored: Boolean; + procedure SetButtonStyle(const Value: TJvRollOutButtonStyle); + protected + procedure CheckChildVisibility; + procedure AlignControls(AControl: TControl; var Rect: TRect); override; + procedure Click; override; + procedure CMParentColorChanged(var Message: TLMessage); message CM_PARENTCOLORCHANGED; + procedure CreateWnd; override; + procedure DefineProperties(Filer: TFiler); override; + function DialogChar(var Message: TLMKey): boolean; override; + procedure DoButtonFontChange(Sender: TObject); + procedure DoCollapse; dynamic; + procedure DoColorsChange(Sender: TObject); + procedure DoEnter; override; + procedure DoExit; override; + procedure DoExpand; dynamic; + procedure DoImageOptionsChange(Sender: TObject); + procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; + procedure MouseEnter; override; + procedure MouseLeave; override; + procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; + procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + procedure Paint; override; + + property ButtonFont: TFont read FButtonFont write SetButtonFont stored IsButtonFontStored; + property ButtonHeight: Integer read FButtonHeight write SetButtonHeight default 20; + property ButtonStyle: TJvRollOutButtonStyle read FButtonStyle write SetButtonStyle default bsHeader; + property ChildOffset: Integer read FChildOffset write SetChildOffset default 0; + property CollapseCtrlsOnButton: Boolean read FCollapseCtrlsOnButton write FCollapseCtrlsOnButton default True; + property Collapsed: Boolean read FCollapsed write SetCollapsed default False; + property Colors: TJvRollOutColors read FColors write FColors; + property GroupIndex: Integer read FGroupIndex write SetGroupIndex default 0; + property ImageOptions: TJvRollOutImageOptions read FImageOptions write FImageOptions; + property Placement: TJvPlacement read FPlacement write SetPlacement default plTop; + property ShowFocus: Boolean read FShowFocus write SetShowFocus default True; + property ToggleAnywhere: Boolean read FToggleAnywhere write FToggleAnywhere default True; + property SmartExpand: Boolean read FSmartExpand write SetSmartExpand default True; + property SmartShow: Boolean read FSmartShow write FSmartShow default True; + property UseGroupBoxCaptionColor: Boolean read FUseGroupBoxCaptionColor write FUseGroupBoxCaptionColor default False; + property OnCollapse: TNotifyEvent read FOnCollapse write FOnCollapse; + property OnExpand: TNotifyEvent read FOnExpand write FOnExpand; + + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + function MouseIsOnButton: Boolean; + procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override; + procedure Collapse; virtual; + procedure Expand; virtual; + + property ExpandedSize: Integer write SetExpandedSize stored False; + end; + + TJvRollOut = class(TJvCustomRollOut) + published + property Action; + property Align; + property BevelWidth; + property BorderWidth; + property ButtonFont; + property ButtonHeight; + property ButtonStyle; + property Caption; + property ChildOffset; + property Placement; + property CollapseCtrlsOnButton; + property Collapsed; + property Colors; + property DragCursor; + property DragMode; + property Enabled; + property Font; + property GroupIndex; + property ImageOptions; + property ParentBackground default True; + property ParentColor; + property ParentFont; + property ParentShowHint; + property PopupMenu; + property ShowFocus; + property ShowHint; + property SmartExpand; + property SmartShow; + property TabOrder; + property TabStop; + property ToggleAnywhere; + property UseGroupBoxCaptionColor; + property Visible; + property OnClick; + property OnDragDrop; + property OnDragOver; + property OnEndDrag; + property OnEnter; + property OnExit; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + property OnStartDrag; + property OnExpand; + property OnCollapse; + end; + + TJvRollOutAction = class(TAction) + private + FRollOut: TJvCustomRollOut; + FLinkCheckedToCollapsed: Boolean; + procedure SetRollOut(const Value: TJvCustomRollOut); + procedure SetLinkCheckedToCollapsed(const Value: Boolean); + protected + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + public + procedure ExecuteTarget(Target: TObject); override; + procedure UpdateTarget(Target: TObject); override; + function HandlesTarget(Target: TObject): Boolean; override; + function Execute: Boolean; override; + destructor Destroy; override; + published + property RollOut: TJvCustomRollOut read FRollOut write SetRollOut; + property LinkCheckedToCollapsed: Boolean read FLinkCheckedToCollapsed write SetLinkCheckedToCollapsed; + end; + + +implementation + +uses + {$IFDEF RTL230_UP} + Vcl.Themes, Vcl.Styles, + {$ENDIF RTL230_UP} + Types, + JvJVCLUtils; // for IsAccel() + +procedure SetTextAngle(Cnv: TCanvas; Angle: Integer); +var + FntLogRec: TLogFont; +begin + GetObject(Cnv.Font.Handle, SizeOf(FntLogRec), Addr(FntLogRec)); + FntLogRec.lfEscapement := Angle * 10; + FntLogRec.lfOutPrecision := OUT_TT_ONLY_PRECIS; + Cnv.Font.Handle := CreateFontIndirect(FntLogRec); +end; + + +procedure InternalFrame3D(Canvas: TCanvas; var Rect: TRect; TopColor, BottomColor: TColor; Width: Integer); + + procedure DoRect; + var + TopRight, BottomLeft: TPoint; + begin + TopRight.X := Rect.Right; + TopRight.Y := Rect.Top; + BottomLeft.X := Rect.Left; + BottomLeft.Y := Rect.Bottom; + if TopColor <> clNone then + begin + Canvas.Pen.Color := TopColor; + Canvas.PolyLine([BottomLeft, Rect.TopLeft, TopRight]); + end; + if BottomColor <> clNone then + begin + Canvas.Pen.Color := BottomColor; + Dec(BottomLeft.X); + Canvas.PolyLine([TopRight, Rect.BottomRight, BottomLeft]); + end; + end; + +begin + Canvas.Pen.Width := 1; + Dec(Rect.Bottom); + Dec(Rect.Right); + while Width > 0 do + begin + Dec(Width); + DoRect; + InflateRect(Rect, -1, -1); + end; + Inc(Rect.Bottom); + Inc(Rect.Right); +end; + +//=== { TJvRollOutImageOptions } ============================================= + +constructor TJvRollOutImageOptions.Create; +begin + inherited Create; + FChangeLink := TChangeLink.Create; + FChangeLink.OnChange := @DoChangeLink; + FIndexCollapsed := 1; + FIndexExpanded := 0; + FOffset := 5; +end; + +destructor TJvRollOutImageOptions.Destroy; +begin + FChangeLink.Free; + inherited Destroy; +end; + +procedure TJvRollOutImageOptions.Change; +begin + if Assigned(FOnChange) then + FOnChange(Self); +end; + +procedure TJvRollOutImageOptions.DoChangeLink(Sender: TObject); +begin + Change; +end; + +procedure TJvRollOutImageOptions.SetImages(const Value: TCustomImageList); +begin + ReplaceImageListReference(FOwner, Value, FImages, FChangeLink); + Change; +end; + +procedure TJvRollOutImageOptions.SetIndexCollapsed(const Value: TImageIndex); +begin + if FIndexCollapsed <> Value then + begin + FIndexCollapsed := Value; + Change; + end; +end; + +procedure TJvRollOutImageOptions.SetIndexExpanded(const Value: TImageIndex); +begin + if FIndexExpanded <> Value then + begin + FIndexExpanded := Value; + Change; + end; +end; + +procedure TJvRollOutImageOptions.SetOffset(const Value: Integer); +begin + if FOffset <> Value then + begin + FOffset := Value; + Change; + end; +end; + +//=== { TJvRollOutColors } =================================================== + +constructor TJvRollOutColors.Create; +begin + inherited Create; + FButtonBottom := clBtnShadow; + FButtonTop := clBtnHighlight; + FButtonColor := DefaultButtonColor; + FHotTrackText := DefaultHotTextColor; + FColor := clBtnFace; + FFrameBottom := clBtnHighlight; + FFrameTop := clBtnShadow; +end; + +procedure TJvRollOutColors.Change; +begin + if Assigned(FOnChange) then + FOnChange(Self); +end; + +procedure TJvRollOutColors.SetButtonBottom(const Value: TColor); +begin + if FButtonBottom <> Value then + begin + FButtonBottom := Value; + Change; + end; +end; + +procedure TJvRollOutColors.SetButtonColor(const Value: TColor); +begin + if FButtonColor <> Value then + begin + FButtonColor := Value; + Change; + end; +end; + +procedure TJvRollOutColors.SetButtonTop(const Value: TColor); +begin + if FButtonTop <> Value then + begin + FButtonTop := Value; + Change; + end; +end; + +procedure TJvRollOutColors.SetColor(const Value: TColor); +begin + if FColor <> Value then + begin + FColor := Value; + Change; + end; +end; + +procedure TJvRollOutColors.SetFrameBottom(const Value: TColor); +begin + if FFrameBottom <> Value then + begin + FFrameBottom := Value; + Change; + end; +end; + +procedure TJvRollOutColors.SetFrameTop(const Value: TColor); +begin + if FFrameTop <> Value then + begin + FFrameTop := Value; + Change; + end; +end; + +procedure TJvRollOutColors.SetHotTrackText(const Value: TColor); +begin + if FHotTrackText <> Value then + begin + FHotTrackText := Value; + Change; + end; +end; + +//=== { TJvCustomRollOut } =================================================== + +constructor TJvCustomRollOut.Create(AOwner: TComponent); +var + R: TRect; +begin + inherited Create(AOwner); + IncludeThemeStyle(Self, [csNeedsBorderPaint, csParentBackground]); + FImageOptions := TJvRollOutImageOptions.Create; + FImageOptions.FOwner := Self; + FImageOptions.OnChange := @DoImageOptionsChange; + + FColors := TJvRollOutColors.Create; + FColors.OnChange := @DoColorsChange; + FToggleAnywhere := True; + FButtonHeight := 20; + FButtonStyle := bsHeader; + FCollapseCtrlsOnButton := True; + FPlacement := plTop; + SetBounds(0, 0, 145, 170); + FAWidth := 145; + FAHeight := 170; + FCWidth := 22; + FCHeight := 22; + FShowFocus := True; + + FButtonFont := TFont.Create; + FButtonFont.Name := 'default'; + FButtonFont.Size := 0; + FButtonFont.Style := [fsBold]; + FButtonFont.Color := clWindowText; + FButtonFont.OnChange := @DoButtonFontChange; + + // SmartExpand / SmartShow + FSmartExpand := True; + FSmartShow := True; + { + FTopForm := TForm.Create(self); + with FTopForm do + begin + BorderStyle := bsNone; + FormStyle := fsStayOnTop; + OnDeactivate := @OnTopDeactivate; + Position := poDesigned; + // Workaround to remove FTopForm from the screen + R := Screen.DesktopRect; + Left := R.Right+100; + end; } + + ControlStyle := ControlStyle - [csDoubleClicks]; // Doubleclicks are converted into single clicks +end; + +destructor TJvCustomRollOut.Destroy; +begin + FreeAndNil(FButtonFont); + FreeAndNil(FImageOptions); + FreeAndNil(FChildControlVisibility); + FreeAndNil(FColors); + inherited Destroy; +end; + +procedure TJvCustomRollOut.Click; +begin + if (Action = nil) and (MouseIsOnButton or ToggleAnywhere) then + Collapsed := not FCollapsed; + inherited Click; + RedrawControl(False); +end; + +procedure TJvCustomRollOut.CreateWnd; +begin + inherited CreateWnd; + if not Collapsed then + UpdateGroup; +end; + +procedure TJvCustomRollOut.AlignControls(AControl: TControl; var Rect: TRect); +begin + Rect.Left := Rect.Left + ChildOffset; + if FPlacement = plTop then + Rect.Top := Rect.Top + FButtonHeight + else + Rect.Left := Rect.Left + FButtonHeight; + inherited AlignControls(AControl, Rect); +end; + +procedure TJvCustomRollOut.MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); +begin + inherited MouseDown(Button, Shift, X, Y); + if not FMouseDown then + begin + FMouseDown := True; + RedrawControl(False); + if CanFocus {and not (csDesigning in ComponentState)} then + SetFocus; + end; +end; + +procedure TJvCustomRollOut.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); +begin + inherited MouseUp(Button, Shift, X, Y); + if FMouseDown then + begin + FMouseDown := False; + RedrawControl(False); + end; +end; + +procedure TJvCustomRollOut.MouseMove(Shift: TShiftState; X, Y: Integer); +var + B: Boolean; +begin + B := FInsideButton; + inherited MouseMove(Shift, X, Y); + FInsideButton := PtInRect(FButtonRect, Point(X, Y)); + if FInsideButton <> B then + RedrawControl(False); +end; + +procedure TJvCustomRollOut.RedrawControl(DrawAll: Boolean); +begin + if DrawAll then + Invalidate + else + {$IFDEF RTL230_UP} + if StyleServices.Enabled then + DrawThemedButtonFrame + else + {$ENDIF RTL230_UP} + DrawButtonFrame; +end; + +procedure TJvCustomRollOut.SetGroupIndex(Value: Integer); +begin + if FGroupIndex <> Value then + begin + FGroupIndex := Value; + if not Collapsed then + UpdateGroup; + end; +end; + +procedure TJvCustomRollOut.SetPlacement(Value: TJvPlacement); +begin + if FPlacement <> Value then + begin + FPlacement := Value; + if Collapsed then + begin + if FPlacement = plTop then + Height := FCHeight + else + Width := FCWidth; + end + else + begin + if FPlacement = plTop then + Height := FAHeight + else + Width := FAWidth; + end; + if FPlacement = plTop then + FButtonRect := Rect(1, 1, Width - 1, FButtonHeight - 1) + else + FButtonRect := Rect(1, 1, FButtonHeight - 1, Height - 1); + Realign; + RedrawControl(True); + end; +end; + +procedure TJvCustomRollOut.SetCollapsed(Value: Boolean); +begin + if FCollapsed <> Value then + begin + FCollapsed := Value; + if FCollapsed then + begin + // If Rollout panel was floating (= mapped onto a special form) + // -> restore old state + if FSmartShow and (FOldParent <> nil) then + RestoreFromTopForm; + + if Placement = plTop then + ChangeHeight(FCHeight) + else + ChangeWidth(FCWidth); + DoCollapse; + end + else + begin + if Placement = plTop then + ChangeHeight(FAHeight) + else + ChangeWidth(FAWidth); + DoExpand; + UpdateGroup; + end; + CheckChildVisibility; + end; +end; + +procedure TJvCustomRollOut.ChangeHeight(NewHeight: Integer); +var + OldHeight: Integer; +begin + OldHeight := Height; + Parent.DisableAlign; + DisableAlign; + try + Height := NewHeight; + if Align = alBottom then + Top := Top + (OldHeight - NewHeight); + finally + EnableAlign; + Parent.EnableAlign; + end; +end; + +procedure TJvCustomRollOut.ChangeWidth(NewWidth: Integer); +var + OldWidth: Integer; +begin + Parent.DisableAlign; + DisableAlign; + try + OldWidth := Width; + Width := NewWidth; + if Align = alRight then + Left := Left + (OldWidth - NewWidth); + finally + EnableAlign; + Parent.EnableAlign; + end; +end; + +procedure TJvCustomRollOut.DoExpand; +var + I: Integer; + OldSmartExpand: Boolean; +begin + // Smart-Expand: If there's not enough space to expand the rollup-panel + // then collapse the other rollout-panels + if FSmartExpand then + begin + // Todo: SmartExpand was only made for panels that are bottom-aligned + + // Remember Collapsed status of all other TJvCustomRollOut components: + SetLength(FCollapsedList, 0); + if Assigned(Parent) and (Top + Height > Parent.Height) then + begin + for I := 0 to Parent.ControlCount-1 do + begin + if (Parent.Controls[I] is TJvCustomRollOut) and (Parent.Controls[I] <> Self) then + begin + SetLength(FCollapsedList, Length(FCollapsedList) + 1); + FCollapsedList[Length(FCollapsedList) - 1] := (Parent.Controls[I] as TJvCustomRollOut).Collapsed; + + // Disable SmartExpand because it may cause troubles!! + // especially when there is less space and another panel would be + // shown obove the window (smartshow) + OldSmartExpand := (Parent.Controls[I] as TJvCustomRollOut).SmartExpand; + (Parent.Controls[I] as TJvCustomRollOut).SmartExpand := False; + (Parent.Controls[I] as TJvCustomRollOut).Collapsed := True; + + (Parent.Controls[I] as TJvCustomRollOut).SmartExpand := OldSmartExpand; + end; + end; + end; + end; + + if FSmartShow then + PutOnForm; + + if Assigned(FOnExpand) then + FOnExpand(Self); +end; + +procedure TJvCustomRollOut.DoCollapse; +var + ColIndex: Integer; + I : integer; + DoRestore: Boolean; +begin + // Smart-Expand: If other rollouts where collapsed automatically when this rollout + // expanded, then their old collapsed-state is now restored + if FSmartExpand then + begin + DoRestore := Length(FCollapsedList)<>0; + + // Check if one of the auto-collapsed rollouts wad expanded manually + // In this case we do not restore the old collapsed-states + for I := 0 to Parent.ControlCount-1 do + begin + if (Parent.Controls[I] is TJvCustomRollOut) and + (Parent.Controls[I] <> Self) then + begin + if (Parent.Controls[I] as TJvCustomRollOut).Collapsed = False then + begin + DoRestore := False; + Break; + end; + end; + end; + + if DoRestore then + begin + // Restore other rollouts + ColIndex := 0; + for I := 0 to Parent.ControlCount - 1 do + begin + if (Parent.Controls[I] is TJvCustomRollOut) and (Parent.Controls[I] <> Self) then + begin + (Parent.Controls[I] as TJvCustomRollOut).Collapsed := FCollapsedList[ColIndex]; + Inc(ColIndex); + + if ColIndex > Length(FCollapsedList) then + Break; + end; + end; + end; + SetLength(FCollapsedList, 0); + end; + + if Assigned(FOnCollapse) then + FOnCollapse(Self); +end; + +procedure TJvCustomRollOut.SetBounds(ALeft, ATop, AWidth, AHeight: Integer); +begin + if FCollapsed then + begin + if Placement = plTop then + FCHeight := AHeight + else + FCWidth := AWidth; + end + else + begin + if Placement = plTop then + FAHeight := AHeight + else + FAWidth := AWidth; + end; + inherited SetBounds(ALeft, ATop, AWidth, AHeight); + if not Collapsed then + UpdateGroup; +end; + +procedure TJvCustomRollOut.DefineProperties(Filer: TFiler); +begin + inherited DefineProperties(Filer); + Filer.DefineProperty('FAWidth', @ReadAWidth, @WriteAWidth, True); + Filer.DefineProperty('FAHeight', @ReadAHeight, @WriteAHeight, True); + Filer.DefineProperty('FCWidth', @ReadCWidth, @WriteCWidth, True); + Filer.DefineProperty('FCHeight', @ReadCHeight, @WriteCHeight, True); +end; + +procedure TJvCustomRollOut.WriteAWidth(Writer: TWriter); +begin + Writer.WriteInteger(FAWidth); +end; + +procedure TJvCustomRollOut.WriteAHeight(Writer: TWriter); +begin + Writer.WriteInteger(FAHeight); +end; + +procedure TJvCustomRollOut.WriteCWidth(Writer: TWriter); +begin + Writer.WriteInteger(FCWidth); +end; + +procedure TJvCustomRollOut.WriteCHeight(Writer: TWriter); +begin + Writer.WriteInteger(FCHeight); +end; + +procedure TJvCustomRollOut.ReadAWidth(Reader: TReader); +begin + FAWidth := Reader.ReadInteger; + if not Collapsed and (Placement = plLeft) then + SetBounds(Left, Top, FAWidth, Height); +end; + +procedure TJvCustomRollOut.ReadAHeight(Reader: TReader); +begin + FAHeight := Reader.ReadInteger; + if not Collapsed and (Placement = plTop) then + SetBounds(Left, Top, Width, FAHeight); +end; + +procedure TJvCustomRollOut.ReadCWidth(Reader: TReader); +begin + FCWidth := Reader.ReadInteger; + if Collapsed and (Placement = plLeft) then + SetBounds(Left, Top, FCWidth, Height); +end; + +procedure TJvCustomRollOut.ReadCHeight(Reader: TReader); +begin + FCHeight := Reader.ReadInteger; + if Collapsed and (Placement = plTop) then + SetBounds(Left, Top, Width, FCHeight); +end; + +procedure TJvCustomRollOut.SetButtonHeight(Value: Integer); +begin + if FButtonHeight <> Value then + begin + FButtonHeight := Value; + FCHeight := Value + 2; + if FPlacement = plTop then + FButtonRect := Rect(BevelWidth, BevelWidth, Width - BevelWidth, FButtonHeight + BevelWidth) + else + FButtonRect := Rect(BevelWidth, BevelWidth, FButtonHeight + BevelWidth, Height - BevelWidth); + Realign; + RedrawControl(True); + end; +end; + + +procedure TJvCustomRollOut.SetButtonStyle(const Value: TJvRollOutButtonStyle); +begin + if Value <> FButtonStyle then + begin + FButtonStyle := Value; + RedrawControl(False); + end; +end; + +procedure TJvCustomRollOut.SetChildOffset(Value: Integer); +begin + if FChildOffset <> Value then + begin + FChildOffset := Value; + Realign; + // R := ClientRect; + // AlignControls(nil,R); + end; +end; + +procedure TJvCustomRollOut.SetSmartExpand(const Value: boolean); +begin + FSmartExpand := Value; + SetLength(FCollapsedList, 0); +end; + +// To make Setting of expanded size possible, even if panel is collapsed +procedure TJvCustomRollOut.SetExpandedSize(const Value: integer); +begin + if ((FPlacement = plTop) and (FAHeight = Value)) or + ((FPlacement = plLeft) and (FAWidth = Value)) then + Exit; + + if FPlacement = plTop then + FAHeight := Value + else + FAWidth := Value; + + if not FCollapsed then + begin + // The top form is assigned so set the width and height of this form + if Parent = FTopForm then + begin + FTopForm.DisableAlign; + if FPlacement = plTop then + begin + FTopForm.Height := FAHeight; + FOldWidthHeight.Y := FAHeight; + end + else + begin + FTopForm.Width := FAWidth; + FOldWidthHeight.X := FAWidth; + end; + FTopForm.EnableAlign; + end; + + if FPlacement = plTop then + ChangeHeight(FAHeight) + else + ChangeWidth(FAWidth); + + if (Parent = FTopForm) and (FOldPos.Y + Height < FOldParent.Height) then + RestoreFromTopForm + else + PutOnForm; + end; +end; + +procedure TJvCustomRollOut.SetButtonFont(const Value: TFont); +begin + if Value <> FButtonFont then + FButtonFont.Assign(Value); +end; + +// Only store button font if not default value +function TJvCustomRollOut.IsButtonFontStored: Boolean; +begin + Result := (FButtonFont.Name <> 'Verdana') or + (FButtonFont.Size <> 7) or + (FButtonFont.Style <> [fsBold]) or + (FButtonFont.Color <> clWindowText); +end; + +procedure TJvCustomRollOut.MouseEnter; +begin + inherited; + if csDesigning in ComponentState then + Exit; + RedrawControl(False); +end; + +procedure TJvCustomRollOut.MouseLeave; +begin + inherited; + if csDesigning in ComponentState then + Exit; + if FInsideButton then + begin + FInsideButton := false; + FMouseDown := false; + end; + RedrawControl(false); +end; + + { +procedure TJvCustomRollOut.MouseEnter(Control: TControl); +begin + inherited MouseEnter(Control); + if csDesigning in ComponentState then + Exit; + RedrawControl(False); +end; + +procedure TJvCustomRollOut.MouseLeave(Control: TControl); +begin + inherited MouseLeave(Control); + if csDesigning in ComponentState then + Exit; + if FInsideButton then + begin + FInsideButton := False; + FMouseDown := False; + end; + RedrawControl(False); +end; + +function TJvCustomRollOut.DoEraseBackground(ACanvas: TCanvas; Param: LPARAM): Boolean; +begin + // inherited DoEraseBackground(Canvas, Param); + Result := False; +end; + } +procedure TJvCustomRollOut.DrawButtonFrame; +var + R: TRect; + TopC, BottomC: TColor; + FIndex: Integer; +begin + if FPlacement = plTop then + FButtonRect := Rect(BevelWidth, BevelWidth, Width - BevelWidth, FButtonHeight + BevelWidth) + else + FButtonRect := Rect(BevelWidth, BevelWidth, FButtonHeight + BevelWidth, Height - BevelWidth); + + R := FButtonRect; + Canvas.Brush.Color := Colors.ButtonColor; + if Canvas.Brush.Color <> clNone then + Canvas.FillRect(R); + + if FMouseDown and FInsideButton then + begin + TopC := Colors.ButtonBottom; + BottomC := Colors.ButtonTop; + end + else + if FInsideButton then + begin + TopC := Colors.ButtonTop; + BottomC := Colors.ButtonBottom; + end +{ else + if Focused then + begin + TopC := clHighlight; + BottomC := clHighlight; + end} + else + begin + TopC := Colors.Color; + BottomC := Colors.Color; + end; +// if not (csDesigning in ComponentState) then + InternalFrame3D(Canvas, R, TopC, BottomC, 1); + if Collapsed then + FIndex := ImageOptions.IndexCollapsed + else + FIndex := ImageOptions.IndexExpanded; + + Canvas.Font.Assign(FButtonFont); + R := FButtonRect; + if FPlacement = plTop then + begin + if Assigned(ImageOptions.Images) then + begin + ImageOptions.Images.Draw(Canvas, ImageOptions.Offset + BevelWidth, + BevelWidth + (FButtonHeight - ImageOptions.Images.Height) div 2, FIndex); + R.Left := ImageOptions.Images.Width + ImageOptions.Offset * 2 + BevelWidth; + end + else + R.Left := ImageOptions.Offset * 2 + BevelWidth; + R.Top := R.Top - (Canvas.TextHeight(Caption) - (FButtonRect.Bottom - FButtonRect.Top)) div 2 + BevelWidth div 2; + end + else + begin + if Assigned(ImageOptions.Images) then + begin + ImageOptions.Images.Draw(Canvas, BevelWidth + (FButtonHeight - ImageOptions.Images.Width) div 2, + ImageOptions.Offset + BevelWidth, FIndex); + R.Top := ImageOptions.Images.Height + ImageOptions.Offset * 2 + BevelWidth; + end + else + R.Top := ImageOptions.Offset * 2 + BevelWidth; + R.Left := R.Left + (Canvas.TextHeight(Caption) + (FButtonRect.Right - FButtonRect.Left)) div 2 + BevelWidth div 2; + end; + if FInsideButton then + Canvas.Font.Color := Colors.HotTrackText; + + if Length(Caption) > 0 then + begin + SetBkMode(Canvas.Handle, Transparent); + if FMouseDown and FInsideButton then + OffsetRect(R, 1, 1); + if Placement = plLeft then + SetTextAngle(Canvas, 270); + DrawText(Canvas.Handle, PChar(Caption), -1, R, DT_NOCLIP); + if Placement = plLeft then + SetTextAngle(Canvas, 0); + end; + if ShowFocus and Focused then + begin + R := FButtonRect; + InflateRect(R, -2, -2); + Canvas.DrawFocusRect(R); + end; +end; + +{$IFDEF RTL230_UP} +procedure TJvCustomRollOut.DrawThemedButtonFrame; +var + R: TRect; + State1: TThemedHeader; + State2: TThemedButton; + FIndex: Integer; +begin + if FPlacement = plTop then + FButtonRect := Rect(BevelWidth, BevelWidth, Width - BevelWidth, FButtonHeight + BevelWidth) + else + FButtonRect := Rect(BevelWidth, BevelWidth, FButtonHeight + BevelWidth, Height - BevelWidth); + + //Draw button + if FButtonStyle = bsHeader then + begin + if not Enabled then + State1 := thHeaderDontCare + else + if FMouseDown and FInsideButton then + State1 := thHeaderItemPressed + else + if FInsideButton then + State1 := thHeaderItemHot + else + State1 := thHeaderItemNormal; + R := FButtonRect; + StyleServices.DrawElement(Canvas.Handle, StyleServices.GetElementDetails(State1), R); + end + else //FButtonStyle = bsButton + begin + if not Enabled then + State2 := tbPushButtonDisabled + else + if FMouseDown and FInsideButton then + State2 := tbPushButtonPressed + else + if FInsideButton then + State2 := tbPushButtonHot + else + if ShowFocus and Focused then + State2 := tbPushButtonDefaulted + else + State2 := tbPushButtonNormal; + R := FButtonRect; + StyleServices.DrawElement(Canvas.Handle, StyleServices.GetElementDetails(State2), R); + end; + + if Collapsed then + FIndex := ImageOptions.IndexCollapsed + else + FIndex := ImageOptions.IndexExpanded; + + R := FButtonRect; + if FPlacement = plTop then + begin + if Assigned(ImageOptions.Images) then + begin + ImageOptions.Images.Draw(Canvas, ImageOptions.Offset + BevelWidth, + BevelWidth + (FButtonHeight - ImageOptions.Images.Height) div 2 - Integer(FButtonStyle = bsHeader) + Integer(FButtonStyle = bsButton), FIndex); + R.Left := ImageOptions.Images.Width + ImageOptions.Offset * 2 + BevelWidth; + end + else + R.Left := ImageOptions.Offset * 2 + BevelWidth; + R.Top := R.Top - (Canvas.TextHeight(Caption) - (FButtonRect.Bottom - FButtonRect.Top)) div 2 + BevelWidth div 2 - 2*Integer(FButtonStyle = bsHeader); + end + else + begin + if Assigned(ImageOptions.Images) then + begin + ImageOptions.Images.Draw(Canvas, BevelWidth + (FButtonHeight - ImageOptions.Images.Width) div 2, + ImageOptions.Offset + BevelWidth, FIndex); + R.Top := ImageOptions.Images.Height + ImageOptions.Offset * 2 + BevelWidth; + end + else + R.Top := ImageOptions.Offset * 2 + BevelWidth; + R.Left := R.Left + (Canvas.TextHeight(Caption) + (FButtonRect.Right - FButtonRect.Left)) div 2 + BevelWidth div 2 +2; + end; + + //Draw caption + Canvas.Font.Assign(FButtonFont); + if FUseGroupBoxCaptionColor then + begin + if not Enabled then + Canvas.Font.Color := StyleServices.GetStyleFontColor(sfGroupBoxTextDisabled) + else + Canvas.Font.Color := StyleServices.GetStyleFontColor(sfGroupBoxTextNormal); + end + else + if not Enabled then + Canvas.Font.Color := StyleServices.GetStyleFontColor(sfHeaderSectionTextDisabled) + else + if FMouseDown and FInsideButton then + Canvas.Font.Color := StyleServices.GetStyleFontColor(sfHeaderSectionTextPressed) + else + if FInsideButton then + Canvas.Font.Color := StyleServices.GetStyleFontColor(sfHeaderSectionTextHot) + else + Canvas.Font.Color := StyleServices.GetStyleFontColor(sfHeaderSectionTextNormal); + + if Length(Caption) > 0 then + begin + SetBkMode(Canvas.Handle, Transparent); + if FMouseDown and FInsideButton then + OffsetRect(R, 1, 1); + if Placement = plLeft then + SetTextAngle(Canvas, 270); + DrawText(Canvas.Handle, PChar(Caption), -1, R, DT_NOCLIP); + if Placement = plLeft then + SetTextAngle(Canvas, 0); + end; + + if ShowFocus and Focused then + begin + R := FButtonRect; + InflateRect(R, -2, -2); + Canvas.DrawFocusRect(R); + end; +end; +{$ENDIF RTL230_UP} + +procedure TJvCustomRollOut.Paint; +var + R: TRect; +begin + R := ClientRect; + if Colors.Color <> clNone then + begin + Canvas.Brush.Color := Colors.Color; + DrawThemedBackground(Self, Canvas, R); + end; + + {$IFDEF RTL230_UP} + if StyleServices.Enabled then + begin + DrawThemedBorder(Self); + DrawThemedButtonFrame; + end + else + {$ENDIF RTL230_UP} + begin + InternalFrame3D(Canvas, R, Colors.FrameTop, Colors.FrameBottom, BevelWidth); + if Colors.FrameTop = clNone then + begin + Dec(R.Left); + Dec(R.Top); + end; + if Colors.FrameBottom = clNone then + begin + Inc(R.Right); + Inc(R.Bottom); + end; + DrawButtonFrame; + end; +end; + +procedure TJvCustomRollOut.Collapse; +begin + SetCollapsed(True); +end; + +procedure TJvCustomRollOut.Expand; +begin + SetCollapsed(False); +end; + +procedure TJvCustomRollOut.UpdateGroup; +var + Msg: TLMessage; +begin + if (FGroupIndex <> 0) and (Parent <> nil) then + begin + Msg.Msg := CM_EXPANDED; + Msg.WParam := FGroupIndex; + Msg.LParam := LPARAM(Self); + Msg.Result := 0; + Parent.Broadcast(Msg); + end; +end; + +procedure TJvCustomRollOut.CMExpanded(var Msg: TLMessage); +var + Sender: TJvCustomRollOut; +begin + if Msg.WParam = WPARAM(FGroupIndex) then + begin + Sender := TJvCustomRollOut(Msg.LParam); + if (Sender <> Self) then + begin + SetCollapsed(True); + CheckChildVisibility; + Invalidate; + end; + end; +end; + { +function TJvCustomRollOut.WantKey(Key: Integer; Shift: TShiftState): Boolean; +begin + Result := Enabled and (IsAccel(Key, Caption) and (ssAlt in Shift)) or ((Key = VK_SPACE) and Focused); + if Result then + begin + SetCollapsed(not FCollapsed); + if CanFocus then + SetFocus; + end + else + Result := inherited WantKey(Key, Shift); +end; } + +procedure TJvCustomRollOut.DoColorsChange(Sender: TObject); +begin + RedrawControl(True); +end; + +procedure TJvCustomRollOut.DoImageOptionsChange(Sender: TObject); +begin + RedrawControl(True); +end; + +procedure TJvCustomRollOut.DoButtonFontChange(Sender: TObject); +begin + Invalidate; +end; + +procedure TJvCustomRollOut.Notification(AComponent: TComponent; + Operation: TOperation); +begin + inherited Notification(AComponent, Operation); + if (Operation = opRemove) and (ImageOptions <> nil) and (AComponent = ImageOptions.Images) then + ImageOptions.Images := nil; +end; + +procedure TJvCustomRollOut.CMParentColorChanged(var Message: TLMessage); +begin + if csLoading in ComponentState then Exit; + inherited; + if ParentColor then + Colors.Color := Color; +end; + + { +procedure TJvCustomRollOut.ParentColorChanged; +begin + inherited ParentColorChanged; + if ParentColor then + Colors.Color := Color; +end; } + +function TJvCustomRollOut.MouseIsOnButton: Boolean; +var + P: TPoint; + R: TRect; +begin + GetCursorPos(P); + P := ScreenToClient(P); + R := FButtonRect; + // (p3) include edges in hit test + InflateRect(R, 1, 1); + Result := PtInRect(R, P); +end; + +function TJvCustomRollOut.DialogChar(var Message: TLMKey): boolean; +var + key: Word; + shift: TShiftState; +begin + key := Message.CharCode; + shift := KeyDataToShiftState(Message.KeyData); + Result := Enabled and (IsAccel(Key, Caption) and (ssAlt in Shift)) or ((Key = VK_SPACE) and Focused); + if Result then + begin + SetCollapsed(not FCollapsed); + if CanFocus then + SetFocus; + end + else + Result := inherited; +end; + +procedure TJvCustomRollOut.DoEnter; +begin + CheckChildVisibility; + inherited; + Invalidate; +end; + +procedure TJvCustomRollOut.DoExit; +begin + CheckChildVisibility; + inherited; + Invalidate; +end; + +{ +procedure TJvCustomRollOut.FocusKilled(NextWnd: THandle); +begin + CheckChildVisibility; + inherited FocusKilled(NextWnd); + Invalidate; +end; + +procedure TJvCustomRollOut.FocusSet(PrevWnd: THandle); +begin + CheckChildVisibility; + inherited FocusSet(PrevWnd); + Invalidate; +end; + } +procedure TJvCustomRollOut.SetShowFocus(const Value: Boolean); +begin + if FShowFocus <> Value then + begin + FShowFocus := Value; + if Focused then + Invalidate; + end; +end; + +{ When the rollout-panel is collaped all contained controls are hidden + to avoid tabbing into the child when the child is not visible or the + rollout-caption-button being hidden by a contained control that is + aligned tot he bottom. + The original visiblility of each control is restored then the rollout + is expanded again. } +procedure TJvCustomRollOut.CheckChildVisibility; + + procedure GetChildVisibility; + var + I: Integer; + begin + if FChildControlVisibility = nil then + begin + FChildControlVisibility := TStringList.Create; + FChildControlVisibility.Sorted := True; + end; + + for I := 0 to ControlCount - 1 do + if (Controls[I] is TWinControl) and (TWinControl(Controls[I]).Visible) then + begin + FChildControlVisibility.AddObject(Controls[I].Name, Controls[I]); + if CollapseCtrlsOnButton or (TWinControl(Controls[I]).Top > ButtonHeight) then + TWinControl(Controls[I]).Visible := False; + end; + end; + + procedure SetChildVisibility; + var + I: Integer; + begin + if FChildControlVisibility <> nil then + begin + for I := 0 to FChildControlVisibility.Count - 1 do + if FindChildControl(FChildControlVisibility[I]) <> nil then + TWinControl(FChildControlVisibility.Objects[I]).Visible := True; + FreeAndNil(FChildControlVisibility); + end; + end; + +begin + if csDesigning in ComponentState then + Exit; + + if Collapsed then + GetChildVisibility + else + SetChildVisibility; +end; + +// Event handler called by the "TopWindow" when the window-rolloutpanel loses focus +// to automatically collapse panel again +procedure TJvCustomRollOut.OnTopDeactivate(Sender: TObject); +begin + if not FCollapsed then + RestoreFromTopForm; +// Collapse; // Use this line instead of the previous one if you want the rollout + // to collapse after the "topForm" lost focus +end; + +procedure TJvCustomRollOut.RestoreFromTopForm; +var + OldCollapsed: Boolean; +begin + if not FSmartShow then + Exit; + + // Rollout panel was mapped onto a special form (TopForm) + // -> restore old state + if Parent = FTopForm then + begin + FTopForm.OnDeactivate := nil; // Deactivate the Event to prevent + // calling this method a second time + FTopForm.Hide; + + OldCollapsed := FCollapsed; + FCollapsed := False; // Set control to expanded, so that SetBounds stores expanded dimesions + + // Set the control back to it's old position!! + Parent := FOldParent as TWinControl; + Align := FOldAlign; + SetBounds(FOldPos.X, FOldPos.Y, FOldWidthHeight.X, FOldWidthHeight.Y); + FOldParent := nil; + + FCollapsed := OldCollapsed; + FTopForm.OnDeactivate := @OnTopDeactivate; // restore Event handling + end; +end; + +// If expanded panel doesn't fit on parent form -> create a separate form +// so panel can be shown in it's full size: +procedure TJvCustomRollOut.PutOnForm; +var + ScrPos : TPoint; +begin + // Remember old pos + if FSmartShow and not Assigned(FOldParent) then + begin + // Don't Smart-Expand if parent form not visible + // (e.g. Collapsed-property is set from outside) + if (Owner is TForm) and not (Owner as TForm).Visible then + Exit; + + FOldPos := Point( Left, Top ); + FOldAlign := Align; + + if Top + Height > Parent.Height then + begin + // Save old size and position to be able to restore it + FOldParent:=Parent; + FOldWidthHeight:=Point(Width, Height); + + if FTopForm = nil then begin + FTopForm := TForm.Create(self); + with FTopForm do + begin + BorderStyle := bsNone; + FormStyle := fsStayOnTop; + OnDeactivate := @OnTopDeactivate; + Position := poDesigned; + end; + end; + + // set size of the special form + FTopForm.Width := Width; + FTopForm.Height := Height; + ScrPos := Parent.ClientToScreen(Point(Left, Top)); + FTopForm.Left := ScrPos.X; + FTopForm.Top := ScrPos.Y; + + Parent := FTopForm; + Align := alClient; + FTopForm.Show; + end; + end; +end; + +//=== { TJvRollOutAction } =================================================== + +destructor TJvRollOutAction.Destroy; +begin + if RollOut <> nil then + RollOut.RemoveFreeNotification(Self); + inherited Destroy; +end; + +function TJvRollOutAction.Execute: Boolean; +begin + Result := inherited Execute; + if Result then + begin + if ActionComponent is TJvCustomRollOut then + begin + if LinkCheckedToCollapsed then + TJvCustomRollOut(ActionComponent).Collapsed := not Checked + else + TJvCustomRollOut(ActionComponent).Collapsed := not TJvCustomRollOut(ActionComponent).Collapsed; + end + else + if RollOut <> nil then + begin + if LinkCheckedToCollapsed then + RollOut.Collapsed := not Checked + else + RollOut.Collapsed := not RollOut.Collapsed; + end; + end; +end; + +procedure TJvRollOutAction.ExecuteTarget(Target: TObject); +begin + inherited ExecuteTarget(Target); + if Target is TJvCustomRollOut then + begin + if LinkCheckedToCollapsed then + TJvCustomRollOut(Target).Collapsed := not Checked + else + TJvCustomRollOut(Target).Collapsed := not TJvCustomRollOut(Target).Collapsed; + end + else + if RollOut <> nil then + begin + if LinkCheckedToCollapsed then + RollOut.Collapsed := not Checked + else + RollOut.Collapsed := not RollOut.Collapsed; + end; +end; + +function TJvRollOutAction.HandlesTarget(Target: TObject): Boolean; +begin + Result := ((RollOut <> nil) and (Target = RollOut) or + (RollOut = nil) and (Target is TJvCustomRollOut)) and TJvCustomRollOut(Target).Enabled; +end; + +procedure TJvRollOutAction.Notification(AComponent: TComponent; + Operation: TOperation); +begin + inherited Notification(AComponent, Operation); + if AComponent = RollOut then + RollOut := nil; +end; + +procedure TJvRollOutAction.SetLinkCheckedToCollapsed(const Value: Boolean); +begin + if FLinkCheckedToCollapsed <> Value then + begin + FLinkCheckedToCollapsed := Value; + if FLinkCheckedToCollapsed then + begin + if RollOut <> nil then + RollOut.Collapsed := not Checked + else + if ActionComponent is TJvCustomRollOut then + TJvCustomRollOut(ActionComponent).Collapsed := not Checked; + end; + end; +end; + +procedure TJvRollOutAction.SetRollOut(const Value: TJvCustomRollOut); +begin + ReplaceComponentReference(Self, Value, TComponent(FRollOut)); +end; + +procedure TJvRollOutAction.UpdateTarget(Target: TObject); +begin + if LinkCheckedToCollapsed then + Checked := not (Target as TJvCustomRollOut).Collapsed; +end; + + +end. diff --git a/components/jvcllaz/run/JvPageComps/jvnotebookpagelist.pas b/components/jvcllaz/run/JvPageComps/jvnotebookpagelist.pas new file mode 100644 index 000000000..cff8cf0e9 --- /dev/null +++ b/components/jvcllaz/run/JvPageComps/jvnotebookpagelist.pas @@ -0,0 +1,124 @@ +{----------------------------------------------------------------------------- +The contents of this file are subject to the Mozilla Public License +Version 1.1 (the "License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at +http://www.mozilla.org/MPL/MPL-1.1.html + +Software distributed under the License is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for +the specific language governing rights and limitations under the License. + +The Original Code is: JvNotebookTabBar.pas, released on 2018-05-01. + +This unit was created as a workaround for the Lazarus issues with TJvCustomPage +and TJvCustomPageList and their descendants. +-----------------------------------------------------------------------------} + +unit JvNotebookPageList; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, ExtCtrls, + JvPageList; + +type + TJvNotebookPageList = class(TNotebook, IUnknown, IPageList) + private + FOnChanging: TJvPageChangingEvent; + + protected + procedure AddPage(const ACaption: string); + function CanChange(AIndex: Integer): Boolean; + procedure DeletePage(AIndex: Integer); + function GetPageCaption(AIndex: Integer): string; + function GetPageCount: Integer; + procedure MovePage(CurIndex, NewIndex: Integer); + procedure PageCaptionChanged(AIndex: Integer; const NewCaption: string); + procedure SetActivePageIndex(AIndex: Integer); + + public + + published + property OnChanging: TJvPageChangingEvent read FOnChanging write FOnChanging; + end; + +implementation + +function GetUniqueName(AOwner: TComponent; const AClassName: string): string; +var + i: Integer; +begin + i := 0; + if AOwner = nil then + begin + repeat + Inc(i); + Result := AClassName + IntToStr(i); + until FindGlobalComponent(Result) = nil; + end + else + repeat + Inc(i); + Result := AClassName + IntToStr(i); + until AOwner.FindComponent(Result) = nil; +end; + + +{------------------------------------------------------------------------------- + TJvNotebookPageList +-------------------------------------------------------------------------------} + +procedure TJvNotebookPageList.AddPage(const ACaption: String); +var + idx: Integer; + lPage: TPage; +begin + idx := Pages.Add(ACaption); + lPage := Page[idx]; + lPage.Name := GetUniqueName(Self, 'TPage'); +end; + +function TJvNotebookPageList.CanChange(AIndex: Integer): Boolean; +begin + Result := (AIndex >= 0) and (AIndex < GetPageCount); + if Result and Assigned(FOnChanging) then + FOnChanging(Self, AIndex, Result); +end; + +procedure TJvNotebookPageList.DeletePage(AIndex: Integer); +begin + Pages.Delete(AIndex); +end; + +function TJvNotebookPageList.GetPageCaption(AIndex: Integer): string; +begin + Result := Pages[AIndex]; +end; + +function TJvNotebookPageList.GetPageCount: Integer; +begin + Result := inherited PageCount; +end; + +procedure TJvNotebookPageList.MovePage(CurIndex, NewIndex: Integer); +begin + Pages.Exchange(CurIndex, NewIndex); +end; + +procedure TJvNotebookPagelist.PageCaptionChanged(AIndex: Integer; + const NewCaption: string); +begin + Pages[AIndex] := NewCaption; +end; + +procedure TJvNotebookPageList.SetActivePageIndex(AIndex: Integer); +begin + PageIndex := AIndex; +end; + + +end. +