From 87836a7f2b80455be2d21c66ee4bdfc6de2875d7 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Sat, 24 Jun 2023 22:41:48 +0000 Subject: [PATCH] NiceSidebar: new package by Priyatna git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8849 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../Demo1/Project_Delphi/Project1.dof | 143 ++ .../Demo1/Project_Delphi/Project1.dpr | 13 + .../Demo1/Project_Delphi/Project1.dproj | 149 ++ .../Demo1/Project_Delphi/Project1_Icon.ico | Bin 0 -> 766 bytes .../Demo1/Project_Lazarus/Project1.lpi | 83 + .../Demo1/Project_Lazarus/Project1.lpr | 15 + components/nicesidebar/Demo1/common/Unit1.dfm | 839 +++++++ components/nicesidebar/Demo1/common/Unit1.lfm | 327 +++ components/nicesidebar/Demo1/common/Unit1.pas | 154 ++ .../Demo3/Project_Delphi/Project1.dof | 147 ++ .../Demo3/Project_Delphi/Project1.dpr | 13 + .../Demo3/Project_Delphi/Project1.dproj | 139 ++ .../Demo3/Project_Delphi/Project1_Icon.ico | Bin 0 -> 766 bytes .../Demo3/Project_Lazarus/Project1.lpi | 87 + .../Demo3/Project_Lazarus/Project1.lpr | 15 + components/nicesidebar/Demo3/common/Unit1.dfm | 34 + components/nicesidebar/Demo3/common/Unit1.lfm | 30 + components/nicesidebar/Demo3/common/Unit1.pas | 90 + components/nicesidebar/License.txt | 567 +++++ components/nicesidebar/Readme.html | 211 ++ components/nicesidebar/images/make_res.bat | 1 + .../nicesidebar/images/tnicesidebar.bmp | Bin 0 -> 1654 bytes .../NiceSideBarDXE11.dpk | 40 + .../NiceSideBarDXE11.dproj | 873 +++++++ .../packages/Delphi7/NiceSideBarD7.dof | 142 ++ .../packages/Delphi7/NiceSideBarD7.dpk | 37 + .../packages/Lazarus/nicesidebarlaz.lpk | 46 + .../packages/Lazarus/nicesidebarlaz.pas | 22 + components/nicesidebar/source/NiceSideBar.dcr | Bin 0 -> 1728 bytes components/nicesidebar/source/NiceSideBar.pas | 2166 +++++++++++++++++ .../nicesidebar/source/NiceSideBarReg.pas | 78 + .../nicesidebar/source/nicesidebar_images.res | Bin 0 -> 1728 bytes 32 files changed, 6461 insertions(+) create mode 100644 components/nicesidebar/Demo1/Project_Delphi/Project1.dof create mode 100644 components/nicesidebar/Demo1/Project_Delphi/Project1.dpr create mode 100644 components/nicesidebar/Demo1/Project_Delphi/Project1.dproj create mode 100644 components/nicesidebar/Demo1/Project_Delphi/Project1_Icon.ico create mode 100644 components/nicesidebar/Demo1/Project_Lazarus/Project1.lpi create mode 100644 components/nicesidebar/Demo1/Project_Lazarus/Project1.lpr create mode 100644 components/nicesidebar/Demo1/common/Unit1.dfm create mode 100644 components/nicesidebar/Demo1/common/Unit1.lfm create mode 100644 components/nicesidebar/Demo1/common/Unit1.pas create mode 100644 components/nicesidebar/Demo3/Project_Delphi/Project1.dof create mode 100644 components/nicesidebar/Demo3/Project_Delphi/Project1.dpr create mode 100644 components/nicesidebar/Demo3/Project_Delphi/Project1.dproj create mode 100644 components/nicesidebar/Demo3/Project_Delphi/Project1_Icon.ico create mode 100644 components/nicesidebar/Demo3/Project_Lazarus/Project1.lpi create mode 100644 components/nicesidebar/Demo3/Project_Lazarus/Project1.lpr create mode 100644 components/nicesidebar/Demo3/common/Unit1.dfm create mode 100644 components/nicesidebar/Demo3/common/Unit1.lfm create mode 100644 components/nicesidebar/Demo3/common/Unit1.pas create mode 100644 components/nicesidebar/License.txt create mode 100644 components/nicesidebar/Readme.html create mode 100644 components/nicesidebar/images/make_res.bat create mode 100644 components/nicesidebar/images/tnicesidebar.bmp create mode 100644 components/nicesidebar/packages/Delphi XE11 Alexandria/NiceSideBarDXE11.dpk create mode 100644 components/nicesidebar/packages/Delphi XE11 Alexandria/NiceSideBarDXE11.dproj create mode 100644 components/nicesidebar/packages/Delphi7/NiceSideBarD7.dof create mode 100644 components/nicesidebar/packages/Delphi7/NiceSideBarD7.dpk create mode 100644 components/nicesidebar/packages/Lazarus/nicesidebarlaz.lpk create mode 100644 components/nicesidebar/packages/Lazarus/nicesidebarlaz.pas create mode 100644 components/nicesidebar/source/NiceSideBar.dcr create mode 100644 components/nicesidebar/source/NiceSideBar.pas create mode 100644 components/nicesidebar/source/NiceSideBarReg.pas create mode 100644 components/nicesidebar/source/nicesidebar_images.res diff --git a/components/nicesidebar/Demo1/Project_Delphi/Project1.dof b/components/nicesidebar/Demo1/Project_Delphi/Project1.dof new file mode 100644 index 000000000..e49002fb8 --- /dev/null +++ b/components/nicesidebar/Demo1/Project_Delphi/Project1.dof @@ -0,0 +1,143 @@ +[FileVersion] +Version=7.0 +[Compiler] +A=8 +B=0 +C=1 +D=1 +E=0 +F=0 +G=1 +H=1 +I=1 +J=0 +K=0 +L=1 +M=0 +N=1 +O=1 +P=1 +Q=0 +R=0 +S=0 +T=0 +U=0 +V=1 +W=0 +X=1 +Y=1 +Z=1 +ShowHints=1 +ShowWarnings=1 +UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; +NamespacePrefix= +SymbolDeprecated=1 +SymbolLibrary=1 +SymbolPlatform=1 +UnitLibrary=1 +UnitPlatform=1 +UnitDeprecated=1 +HResultCompat=1 +HidingMember=1 +HiddenVirtual=1 +Garbage=1 +BoundsError=1 +ZeroNilCompat=1 +StringConstTruncated=1 +ForLoopVarVarPar=1 +TypedConstVarPar=1 +AsgToTypedConst=1 +CaseLabelRange=1 +ForVariable=1 +ConstructingAbstract=1 +ComparisonFalse=1 +ComparisonTrue=1 +ComparingSignedUnsigned=1 +CombiningSignedUnsigned=1 +UnsupportedConstruct=1 +FileOpen=1 +FileOpenUnitSrc=1 +BadGlobalSymbol=1 +DuplicateConstructorDestructor=1 +InvalidDirective=1 +PackageNoLink=1 +PackageThreadVar=1 +ImplicitImport=1 +HPPEMITIgnored=1 +NoRetVal=1 +UseBeforeDef=1 +ForLoopVarUndef=1 +UnitNameMismatch=1 +NoCFGFileFound=1 +MessageDirective=1 +ImplicitVariants=1 +UnicodeToLocale=1 +LocaleToUnicode=1 +ImagebaseMultiple=1 +SuspiciousTypecast=1 +PrivatePropAccessor=1 +UnsafeType=0 +UnsafeCode=0 +UnsafeCast=0 +[Linker] +MapFile=0 +OutputObjs=0 +ConsoleApp=1 +DebugInfo=0 +RemoteSymbols=0 +MinStackSize=16384 +MaxStackSize=1048576 +ImageBase=4194304 +ExeDescription= +[Directories] +OutputDir= +UnitOutputDir= +PackageDLLOutputDir= +PackageDCPOutputDir= +SearchPath=..\..\source\ +Packages=vcl;rtl;dbrtl;adortl;vcldb;vclx;bdertl;vcldbx;ibxpress;dsnap;cds;bdecds;teeui;teedb;tee;dss;dsnapcrba;dsnapcon;VclSmp;vclie;xmlrtl;inet;inetdbbde;inetdbxpress;inetdb;webdsnap;websnap;dbexpress;dbxcds;RxCtl6;Commons;XLSPkg;GridPreviewD6;NiceGridD6;NicePreviewD6;NiceSettingsPkg +Conditionals= +DebugSourceDirs= +UsePackages=0 +[Parameters] +RunParams= +HostApplication= +Launcher= +UseLauncher=0 +DebugCWD= +[Language] +ActiveLang= +ProjectLang= +RootDir=C:\PROGRAM FILES\BORLAND\DELPHI6\BIN\ +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= +[HistoryLists\hlUnitAliases] +Count=1 +Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; +[HistoryLists\hlSearchPath] +Count=2 +Item0=..\..\source\ +Item1=.. diff --git a/components/nicesidebar/Demo1/Project_Delphi/Project1.dpr b/components/nicesidebar/Demo1/Project_Delphi/Project1.dpr new file mode 100644 index 000000000..74baed530 --- /dev/null +++ b/components/nicesidebar/Demo1/Project_Delphi/Project1.dpr @@ -0,0 +1,13 @@ +program Project1; + +uses + Forms, + Unit1 in '..\common\Unit1.pas' {Form1}; + +{$R *.res} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/components/nicesidebar/Demo1/Project_Delphi/Project1.dproj b/components/nicesidebar/Demo1/Project_Delphi/Project1.dproj new file mode 100644 index 000000000..c975b0fca --- /dev/null +++ b/components/nicesidebar/Demo1/Project_Delphi/Project1.dproj @@ -0,0 +1,149 @@ + + + {61D27277-CEBC-4D1C-A55C-B4902E782271} + Project1.dpr + True + Debug + 1 + Application + VCL + 19.5 + Win32 + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + true + Cfg_2 + true + true + + + false + false + false + true + false + 00400000 + 1 + 1 + ..\common;..\..\source\;$(DCC_UnitSearchPath) + vcl;rtl;dbrtl;adortl;vcldb;vclx;bdertl;vcldbx;ibxpress;dsnap;cds;bdecds;teeui;teedb;tee;dss;dsnapcrba;dsnapcon;VclSmp;vclie;xmlrtl;inet;inetdbbde;inetdbxpress;inetdb;webdsnap;websnap;dbexpress;dbxcds;RxCtl6;Commons;XLSPkg;GridPreviewD6;NiceGridD6;NicePreviewD6;NiceSettingsPkg;$(DCC_UsePackage) + Project1 + Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace) + 1033 + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + + + System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + Debug + true + CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName) + 1033 + $(BDS)\bin\default_app.manifest + Project1_Icon.ico + $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png + $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png + + + Project1_Icon.ico + $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png + $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png + + + RELEASE;$(DCC_Define) + 0 + false + 0 + + + PerMonitorV2 + + + DEBUG;$(DCC_Define) + false + true + true + true + + + PerMonitorV2 + true + CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName) + + + + MainSource + + +
Form1
+
+ + Base + + + Cfg_1 + Base + + + Cfg_2 + Base + +
+ + Delphi.Personality.12 + + + + + Project1.dpr + + + Microsoft Office 2000 Beispiele für gekapselte Komponenten für Automatisierungsserver + Microsoft Office XP Beispiele für gekapselte Komponenten für Automation Server + Datei C:\Users\Werner-3\Documents\Embarcadero\Studio\22.0\Bpl\Win32\JclBaseExpert280.bpl nicht gefunden + Datei C:\Users\Werner-3\Documents\Embarcadero\Studio\22.0\Bpl\Win32\JclDebugExpert280.bpl nicht gefunden + Datei C:\Users\Werner-3\Documents\Embarcadero\Studio\22.0\Bpl\Win32\JclProjectAnalysisExpert280.bpl nicht gefunden + Datei C:\Users\Werner-3\Documents\Embarcadero\Studio\22.0\Bpl\Win32\JclFavoriteFoldersExpert280.bpl nicht gefunden + Datei C:\Users\Werner-3\Documents\Embarcadero\Studio\22.0\Bpl\Win32\JclRepositoryExpert280.bpl nicht gefunden + Datei C:\Users\Werner-3\Documents\Embarcadero\Studio\22.0\Bpl\Win32\JclSIMDViewExpert280.bpl nicht gefunden + Datei C:\Users\Werner-3\Documents\Embarcadero\Studio\22.0\Bpl\Win32\JclStackTraceViewerExpert280.bpl nicht gefunden + + + + True + False + + + 12 + + + +
diff --git a/components/nicesidebar/Demo1/Project_Delphi/Project1_Icon.ico b/components/nicesidebar/Demo1/Project_Delphi/Project1_Icon.ico new file mode 100644 index 0000000000000000000000000000000000000000..cfd8992a5b8ff4b89478d89e93ae9205bb8125ef GIT binary patch literal 766 zcmZvaJxjw-6o%h^fPsh~i*;)WQr#qE6x5;U{}5?bDU!Qs#KAy@{*{(2!dc?v-w<3J zyH!xUzUL;X9X!dK+~<6Tdjqt14F+APeYAl+zK^H@bxyTV#lYDAmIAzyrqzp2E~yk{ zSu$YV4Qq8p@lqEbez>c)L$@gg8}<%Oa6GG-Tha@RIgpyYyx3_6 z0sK0F9J)}Gz=q1c)CrmBhWa9M&IR0YL{dad6xMSUMJ!a-f}CrS zObTrz@|^QLXnD=E3VB8v_nQw=P@5rbS=*@WSgTre9_?ZacCm^3g@?0G70_3Gujz+t p>P*GoN!7Oxk5il4S6hB}YQS~ZBQNRfhwsN>Ye}J@)z3c!&m?S literal 0 HcmV?d00001 diff --git a/components/nicesidebar/Demo1/Project_Lazarus/Project1.lpi b/components/nicesidebar/Demo1/Project_Lazarus/Project1.lpi new file mode 100644 index 000000000..90ec44fda --- /dev/null +++ b/components/nicesidebar/Demo1/Project_Lazarus/Project1.lpi @@ -0,0 +1,83 @@ + + + + + + + + + <Scaled Value="True"/> + <ResourceType Value="res"/> + <UseXPManifest Value="True"/> + <XPManifest> + <DpiAware Value="True"/> + </XPManifest> + <Icon Value="0"/> + </General> + <BuildModes> + <Item Name="Default" Default="True"/> + </BuildModes> + <PublishOptions> + <Version Value="2"/> + <UseFileFilters Value="True"/> + </PublishOptions> + <RunParams> + <FormatVersion Value="2"/> + </RunParams> + <RequiredPackages> + <Item> + <PackageName Value="NiceSidebarLaz"/> + </Item> + <Item> + <PackageName Value="LCL"/> + </Item> + </RequiredPackages> + <Units> + <Unit> + <Filename Value="Project1.lpr"/> + <IsPartOfProject Value="True"/> + </Unit> + <Unit> + <Filename Value="..\common\Unit1.pas"/> + <IsPartOfProject Value="True"/> + <ComponentName Value="Form1"/> + <HasResources Value="True"/> + <ResourceBaseClass Value="Form"/> + </Unit> + </Units> + </ProjectOptions> + <CompilerOptions> + <Version Value="11"/> + <PathDelim Value="\"/> + <Target> + <Filename Value="Project1"/> + </Target> + <SearchPaths> + <IncludeFiles Value="$(ProjOutDir)"/> + <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> + </SearchPaths> + <Linking> + <Debugging> + <DebugInfoType Value="dsDwarf3"/> + </Debugging> + <Options> + <Win32> + <GraphicApplication Value="True"/> + </Win32> + </Options> + </Linking> + </CompilerOptions> + <Debugging> + <Exceptions> + <Item> + <Name Value="EAbort"/> + </Item> + <Item> + <Name Value="ECodetoolError"/> + </Item> + <Item> + <Name Value="EFOpenError"/> + </Item> + </Exceptions> + </Debugging> +</CONFIG> diff --git a/components/nicesidebar/Demo1/Project_Lazarus/Project1.lpr b/components/nicesidebar/Demo1/Project_Lazarus/Project1.lpr new file mode 100644 index 000000000..1b3b0edc8 --- /dev/null +++ b/components/nicesidebar/Demo1/Project_Lazarus/Project1.lpr @@ -0,0 +1,15 @@ +program Project1; + +uses + Interfaces, + Forms, + Unit1 in '..\common\Unit1.pas' {Form1}; + +{$R *.res} + +begin + Application.Scaled:=True; + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/components/nicesidebar/Demo1/common/Unit1.dfm b/components/nicesidebar/Demo1/common/Unit1.dfm new file mode 100644 index 000000000..1e57d43df --- /dev/null +++ b/components/nicesidebar/Demo1/common/Unit1.dfm @@ -0,0 +1,839 @@ +object Form1: TForm1 + Left = 262 + Top = 98 + BorderStyle = bsNone + Caption = 'NiceSideBar Demo - priyatna.org' + ClientHeight = 484 + ClientWidth = 623 + Color = clWhite + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Segoi UI' + Font.Style = [] + OldCreateOrder = True + Position = poDesktopCenter + DesignSize = ( + 623 + 484) + PixelsPerInch = 96 + TextHeight = 14 + object Shape1: TShape + Left = 0 + Top = 0 + Width = 623 + Height = 113 + Align = alTop + Brush.Color = 11626823 + Pen.Color = 11626823 + end + object Shape2: TShape + Left = 0 + Top = 113 + Width = 623 + Height = 8 + Align = alTop + Brush.Color = clBlack + end + object Label1: TLabel + Left = 121 + Top = 24 + Width = 483 + Height = 59 + Alignment = taRightJustify + Anchors = [akTop, akRight] + Caption = 'NiceSideBar Demo' + Font.Charset = DEFAULT_CHARSET + Font.Color = 16766894 + Font.Height = -53 + Font.Name = 'Bookman Old Style' + Font.Style = [] + ParentFont = False + Transparent = True + end + object Label2: TLabel + Left = 373 + Top = 72 + Width = 228 + Height = 36 + Alignment = taRightJustify + Anchors = [akTop, akRight] + Caption = 'priyatna.org' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWhite + Font.Height = -32 + Font.Name = 'Courier New' + Font.Style = [] + ParentFont = False + Transparent = True + end + object Label3: TLabel + Left = 216 + Top = 432 + Width = 66 + Height = 14 + Caption = 'Hovered Item:' + end + object Label4: TLabel + Left = 216 + Top = 448 + Width = 67 + Height = 14 + Caption = 'Selected Item:' + end + object Label5: TLabel + Left = 216 + Top = 184 + Width = 239 + Height = 14 + Caption = 'Click on red button in the right top corner to close.' + end + object Label6: TLabel + Left = 216 + Top = 200 + Width = 222 + Height = 14 + Caption = 'Click on green button to maximize and restore.' + end + object Label7: TLabel + Left = 216 + Top = 216 + Width = 163 + Height = 14 + Caption = 'Click on yellow button to minimize.' + end + object NiceSideBar1: TNiceSideBar + Left = 0 + Top = 121 + Width = 193 + Height = 356 + ItemStyle.NormalFont.Charset = DEFAULT_CHARSET + ItemStyle.NormalFont.Color = clWindowText + ItemStyle.NormalFont.Height = -11 + ItemStyle.NormalFont.Name = 'Arial' + ItemStyle.NormalFont.Style = [fsBold] + ItemStyle.HoverFont.Charset = DEFAULT_CHARSET + ItemStyle.HoverFont.Color = clRed + ItemStyle.HoverFont.Height = -11 + ItemStyle.HoverFont.Name = 'Arial' + ItemStyle.HoverFont.Style = [fsBold] + ItemStyle.SelectedFont.Charset = DEFAULT_CHARSET + ItemStyle.SelectedFont.Color = clWindowText + ItemStyle.SelectedFont.Height = -11 + ItemStyle.SelectedFont.Name = 'Arial' + ItemStyle.SelectedFont.Style = [fsBold] + ItemStyle.DisabledFont.Charset = DEFAULT_CHARSET + ItemStyle.DisabledFont.Color = clGrayText + ItemStyle.DisabledFont.Height = -11 + ItemStyle.DisabledFont.Name = 'Arial' + ItemStyle.DisabledFont.Style = [fsBold] + ItemStyle.NormalColor = 14145495 + SubItemStyle.NormalFont.Charset = DEFAULT_CHARSET + SubItemStyle.NormalFont.Color = clWindowText + SubItemStyle.NormalFont.Height = -11 + SubItemStyle.NormalFont.Name = 'Arial' + SubItemStyle.NormalFont.Style = [] + SubItemStyle.HoverFont.Charset = DEFAULT_CHARSET + SubItemStyle.HoverFont.Color = clRed + SubItemStyle.HoverFont.Height = -11 + SubItemStyle.HoverFont.Name = 'Arial' + SubItemStyle.HoverFont.Style = [] + SubItemStyle.SelectedFont.Charset = DEFAULT_CHARSET + SubItemStyle.SelectedFont.Color = clWindowText + SubItemStyle.SelectedFont.Height = -11 + SubItemStyle.SelectedFont.Name = 'Arial' + SubItemStyle.SelectedFont.Style = [] + SubItemStyle.DisabledFont.Charset = DEFAULT_CHARSET + SubItemStyle.DisabledFont.Color = clGrayText + SubItemStyle.DisabledFont.Height = -11 + SubItemStyle.DisabledFont.Name = 'Arial' + SubItemStyle.DisabledFont.Style = [] + SubItemStyle.NormalColor = 14145495 + Items = < + item + Caption = 'First Item' + ImageIndex = 5 + Items.Strings = ( + 'Ini Sub Item' + 'Ini Juga Sub Item' + 'Kalau Ini Memang' + 'Sub Item Juga') + end + item + Caption = 'Second Item' + ImageIndex = 1 + Items.Strings = ( + 'Ini Apaan Aja' + 'Pokoknya Sub Item' + 'Terserah Mau' + 'Apa Saja Boleh') + end + item + Caption = 'Third Item' + ImageIndex = 2 + Items.Strings = ( + 'Yang Penting' + 'Ini Sub Item' + 'Anda Jangan' + 'Protes Segala') + end + item + Caption = 'Fourth Item' + ImageIndex = 3 + Items.Strings = ( + 'Ini Mah Dua Aja' + 'Itemnya Jangan' + 'Banyak-banyak, yah!') + end> + ItemIndex = 1 + SubItemIndex = 2 + ItemHeight = 32 + AlwaysExpand = False + Images = ImageList2 + HoverImages = ImageList1 + SelectedImages = ImageList1 + OnHover = NiceSideBar1Hover + OnSelect = NiceSideBar1Select + BorderStyle = bsNone + ParentBackground = False + Color = 14145495 + TabStop = True + TabOrder = 0 + end + object Panel1: TPanel + Left = 537 + Top = 16 + Width = 17 + Height = 17 + Cursor = crHandPoint + Anchors = [akTop, akRight] + BevelOuter = bvNone + Color = 8454143 + ParentBackground = False + TabOrder = 1 + OnClick = Panel1Click + end + object Panel2: TPanel + Left = 561 + Top = 16 + Width = 17 + Height = 17 + Cursor = crHandPoint + Anchors = [akTop, akRight] + BevelOuter = bvNone + Color = 8454016 + ParentBackground = False + TabOrder = 2 + OnClick = Panel2Click + end + object Panel3: TPanel + Left = 585 + Top = 16 + Width = 17 + Height = 17 + Cursor = crHandPoint + Anchors = [akTop, akRight] + BevelOuter = bvNone + Color = clRed + ParentBackground = False + TabOrder = 3 + OnClick = Panel3Click + end + object Panel4: TPanel + Left = 0 + Top = 477 + Width = 623 + Height = 7 + Align = alBottom + BevelOuter = bvNone + Caption = ' ' + Color = clBlack + TabOrder = 4 + end + object Button1: TButton + Left = 216 + Top = 264 + Width = 193 + Height = 25 + Caption = 'Toggle Item "Enable" Property' + TabOrder = 5 + OnClick = Button1Click + end + object Button2: TButton + Left = 216 + Top = 296 + Width = 193 + Height = 25 + Caption = 'Toggle Sub Item "Enable" Property' + TabOrder = 6 + OnClick = Button2Click + end + object Button3: TButton + Left = 216 + Top = 328 + Width = 193 + Height = 25 + Caption = 'Toggle Item "Visible" Property' + TabOrder = 7 + OnClick = Button3Click + end + object Button4: TButton + Left = 216 + Top = 360 + Width = 193 + Height = 25 + Caption = 'Toggle Sub Item "Visible" Property' + TabOrder = 8 + OnClick = Button4Click + end + object ImageList1: TImageList + Left = 216 + Top = 136 + Bitmap = { + 494C010107000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 + 0000000000003600000028000000400000002000000001002000000000000020 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000008080800080808000808080008080 + 8000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000FFFFFF0000000000FFFFFF0000000000FFFFFF000000 + 0000FFFFFF000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000008080800000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000008080 + 8000808080008080800080808000808080000000000000000000000000000000 + 0000808080000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000008080800000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF000000 + 0000808080000000000000000000000000000000000000000000000000000000 + 0000FFFFFF000000000080808000000000000000000000000000000000000000 + 00008080800000000000FFFFFF00000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000080808000FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF0000000000000000000000000080808000FFFFFF000000 + 000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF0000FFFF00FFFF + FF00000000008080800000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000080808000FFFFFF00808080008080 + 8000808080008080800080808000808080008080800080808000808080008080 + 80008080800080808000000000000000000000000000FFFFFF00000000000000 + 00000000000080808000FFFFFF00FFFFFF00808080000000000000000000FFFF + FF00000000008080800000000000000000000000000000000000000000008000 + 00000000000000000000FFFFFF0000000000FFFFFF0000000000FFFFFF000000 + 0000FFFFFF000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000080808000FFFFFF0080808000FFFF + 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF + 0000FFFF000080808000000000000000000000000000FFFFFF00000000008080 + 80000000000000000000FFFFFF00FFFFFF0080808000FFFFFF0000FFFF0000FF + FF00FFFFFF000000000080808000000000000000000000000000FF000000FF00 + 0000FF0000000000000000000000000000000000000080000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000080808000FFFFFF0080808000FFFF + 0000FFFF0000FFFF000000008000000080000000800000008000FFFF0000FFFF + 0000FFFF00008080800000000000000000000000000000000000000000000000 + 000000000000000000008080800000FFFF0000FFFF0080808000000000000000 + 0000FFFFFF000000000080808000000000008080800080000000FF000000FF00 + 0000FF00000000800000008000000080000000800000FF000000800000008080 + 8000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000080808000FFFFFF0080808000FFFF + 0000FFFF00000000FF000000FF0000008000000080000000800000008000FFFF + 0000FFFF00008080800000000000000000000000000000000000FF0000000000 + 0000FF0000000000000000000000000000000000000080808000FFFFFF0000FF + FF0000FFFF00FFFFFF00000000008080800080808000FF000000FF000000FF00 + 0000FF0000000080000000800000008000000080000080800000FF0000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000080808000FFFFFF0080808000FFFF + 0000FFFF00000000FF000000FF0000008000FFFF0000FFFF0000FFFF0000FFFF + 0000FFFF0000808080000000000000000000000000000000000000000000FF00 + 000000000000FF0000000000000080808000FFFFFF00FFFFFF00808080000000 + 000000000000FFFFFF00000000008080800080808000FF000000FF0000000080 + 00000080000000800000008000000080000000800000FF000000FF0000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000080808000FFFFFF0080808000FFFF + 0000FFFF0000FFFF00000000FF0000008000FFFF00000000800000008000FFFF + 0000FFFF00008080800000000000000000000000000000000000000000000000 + 0000FF00000000000000FF00000000000000FFFFFF00FFFFFF00FFFFFF00FFFF + FF0000FFFF0000FFFF00FFFFFF000000000080808000FF000000008000000080 + 0000008000000080000000800000800000008080000080000000008000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000080808000FFFFFF0080808000FFFF + 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF + 0000FFFF00008080800000000000000000000000000000000000000000000000 + 000000000000FF000000000000000000000080808000FFFFFF00FFFFFF00FFFF + FF000000000000000000000000000000000080808000FF000000000000000080 + 000000800000800000000080000000800000FF00000000800000008000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000080808000FFFFFF00000000008080 + 8000808080008080800080808000808080008080800080808000808080008080 + 8000808080008080800000000000000000000000000000000000000000000000 + 0000FF00000000000000FF000000000000000000000000000000000000000000 + 0000000000000000000000000000000000008080800080808000FF000000FFFF + FF0000000000FF000000FF000000FF000000FF00000000800000008000008080 + 8000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000080808000FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 + 000000000000FF00000000000000FF0000000000000000000000000000000000 + 0000000000000000000000000000000000000000000080808000FFFFFF000000 + 0000FFFFFF000080000000800000008000000080000000800000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000080808000FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00808080000000000000000000000000000000 + 00000000000000000000FF000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000808080008080 + 8000808000000000000000800000008000000080000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000008080800080808000808080008080 + 8000808080008080800080808000808080008080800080808000808080008080 + 8000808080008080800080808000808080000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000008080 + 8000808080008080800080808000808080008080800000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000800000008000000080000000800000008000 + 0000800000008000000080000000800000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000008080000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000000000FFFF + FF00000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000080000000FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00800000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000080 + 8000000000000000000000FFFF00000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000008080 + 0000808000008080000080800000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF + FF00FFFFFF0000000000000000000000000000000000C0C0C00000000000C0C0 + C00000000000C0C0C0000000000080000000FFFFFF0000000000000000000000 + 00000000000000000000FFFFFF00800000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000FFFF000000 + 00000000000000FFFF0000FFFF00000000000000000080808000808080008080 + 800080808000808080008080800080808000808080000000000080800000FFFF + 0000FFFF0000FFFFFF0000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000FFFFFF00FF000000FFFF + FF00FFFFFF00FFFFFF000000000000000000C0C0C000FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF0080000000FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00800000000000000000000000000000000000 + 0000000000000000000000000000008080000080800000808000000000000000 + 000000FFFF0000FFFF0000000000000000000000000000000000FFFF00008080 + 0000808000008080000080800000808000000000000080800000FFFF0000FFFF + 0000FFFFFF000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFFFFF00FF000000FFFFFF00FF00 + 00000000FF0000008000FFFFFF000000000000000000FFFFFF00C0C0C000FFFF + FF00C0C0C000FFFFFF00C0C0C00080000000FFFFFF0000000000000000000000 + 00000000000000000000FFFFFF00800000000000000000000000008080000080 + 80000080800000FFFF00000000000080800000FFFF00000000000000000000FF + FF0000FFFF00000000000000000000000000000000000000000000000000FFFF + 00008080000080800000808000000000000080800000FFFF0000FFFF0000FFFF + FF00000000008080000000000000000000000000000000000000000000000000 + 0000000000000000000000000000FFFFFF00FF000000FFFFFF00FF000000FFFF + FF0000008000000080000000000000000000C0C0C000FFFFFF00FFFFFF00C0C0 + C000FFFFFF00C0C0C000FFFFFF0080000000FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF008000000000000000008080000080800000FF + FF0000FFFF0000FFFF0000FFFF0000FFFF00000000000000000000FFFF0000FF + FF00000000000000000000000000000000000000000000000000000000000000 + 0000FFFF0000808000000000000080800000FFFF0000FFFF0000FFFFFF000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000FFFFFF00FFFFFF00FFFFFF00FF000000FFFFFF00FFFF + FF00FFFFFF0000000000000000000000000000000000FFFFFF00C0C0C000FFFF + FF00C0C0C000FFFFFF00C0C0C00080000000FFFFFF000000000000000000FFFF + FF0080000000800000008000000080000000000000000080800000FFFF0000FF + FF000080800000FFFF0000FFFF00000000000000000000FFFF0000FFFF000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000080800000FFFF0000FFFF0000FFFFFF00000000000000 + 0000000000000000000000000000000000000000000000000000000000008080 + 8000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000080800000000000C0C0C000FFFFFF00FFFFFF00C0C0 + C000FFFFFF00C0C0C000FFFFFF0080000000FFFFFF00FFFFFF00FFFFFF00FFFF + FF0080000000FFFFFF008000000000000000000000000080800000FFFF0000FF + FF0000FFFF000080800000FFFF0000FFFF000080800000FFFF00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000080800000FFFF0000FFFF0000FFFFFF0000000000000000000000 + 0000000000000000000000000000000000000000000000FFFF00008080000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000808000008080000000000000000000FFFFFF00C0C0C000FFFF + FF00C0C0C000FFFFFF00C0C0C00080000000FFFFFF00FFFFFF00FFFFFF00FFFF + FF00800000008000000000000000000000008080800080808000808080000000 + 000000FFFF0000FFFF000080800000FFFF0000FFFF0000808000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000080800000FFFF0000FFFF0000FFFFFF000000000080800000808080000000 + 000000000000000000000000000000000000000000000000000000000000FFFF + FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF + FF0000FFFF00000000000080800000000000C0C0C000C0C0C000FFFFFF00C0C0 + C000FFFFFF00C0C0C000FFFFFF00800000008000000080000000800000008000 + 0000800000000000000000000000000000000000000000FFFF00000000000000 + 00000000000000FFFF0000FFFF000080800000FFFF0000FFFF00000000000000 + 0000000000000000000000000000000000000000000000000000000000008080 + 0000FFFF0000FFFF0000FFFFFF0000000000FFFF000080800000808000008080 + 8000000000000000000000000000000000000000000000000000FFFFFF0000FF + FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF + FF00FFFFFF0000FFFF00000000000000000000000000FFFFFF00C0C0C000FFFF + FF00C0C0C000FFFFFF0000000000C0C0C0000000000000000000000000000000 + 000000000000000000000000000000000000000000000080800000FFFF000000 + 0000808080000000000000FFFF0000FFFF0000FFFF0000FFFF00000000000000 + 000000000000000000000000000000000000000000000000000080800000FFFF + 0000FFFF0000FFFFFF00000000000000000000000000FFFF0000808000008080 + 0000808080000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000C0C0C000FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00C0C0C00000000000C0C0C00000000000000000000000 + 00000000000000000000000000000000000000000000000000000080800000FF + FF00000000008080800000FFFF0000FFFF0000FFFF0000808000000000000000 + 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF + FF00FFFFFF000000000000000000000000000000000000000000FFFF0000FFFF + 0000FFFF0000FFFF000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000C0C0C00000000000C0C0 + C00000000000C0C0C00000000000C0C0C0000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000080 + 800000FFFF008080800000FFFF0000FFFF000080800000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000008080800000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000424D3E000000000000003E000000 + 2800000040000000200000000100010000000000000100000000000000000000 + 000000000000000000000000FFFFFF00FFFFFFFFF8430000FFFFFF0FF5150000 + 0000E007E80200007FFE8007E0E0000000020003E802000000021003C5150000 + 000200018003000000028801000F000000029400000F00000002C800000F0000 + 0002D400000F00000002EA00200F00002002E50F080F00000002F27F901F0000 + 0000F57FC43F00000000F8FFE07F0000FFFFFFFFFFFFFFFFFFFFFFE1FFFFFFAF + FE00FFE4FFE0FF47FE00FF880000FE830000FE100001FD010000C0218003FA00 + 00008043C001F40100000087E00108000000010FF01F45F00001001FF01F0000 + 0003001FE00F40000007101FC0070000007F001F81030000017F801F0381FFFF + 00FFC03F07C1FFFFFFFFE07FFFFFFFFF00000000000000000000000000000000 + 000000000000} + end + object ImageList2: TImageList + Left = 256 + Top = 136 + Bitmap = { + 494C010107000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 + 0000000000003600000028000000400000002000000001002000000000000020 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000069696900000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000008080800080808000808080008080 + 8000000000000000000000000000000000000000000000000000000000000000 + 00000000000069696900FEFEFE0069696900FEFEFE0000000000FEFEFE006969 + 6900FEFEFE006969690000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000008080800000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000008080 + 8000808080008080800080808000808080000000000000000000000000000000 + 0000808080000000000000000000000000000000000000000000000000000000 + 0000696969000000000000000000000000000000000000000000000000000000 + 0000000000000000000069696900000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000008080800069696900696969006969 + 6900696969006969690069696900696969006969690069696900696969006969 + 6900696969006969690069696900000000000000000000000000000000000000 + 000000000000000000000000000000000000FEFEFE00FEFEFE00FEFEFE000000 + 0000808080000000000000000000000000000000000000000000000000000000 + 0000FEFEFE000000000080808000000000006969690069696900696969000000 + 00008080800000000000FEFEFE00000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000080808000FEFEFE00FEFEFE00FEFE + FE00FEFEFE00FEFEFE00FEFEFE00FEFEFE00FEFEFE00FEFEFE00FEFEFE00FEFE + FE00FEFEFE00FEFEFE0069696900000000000000000080808000FEFEFE000000 + 000000000000FEFEFE00FEFEFE00FEFEFE00FEFEFE00E1E1E100E1E1E100FEFE + FE00000000008080800000000000000000000000000000000000000000000000 + 0000696969000000000000000000000000000000000000000000000000000000 + 0000000000000000000069696900000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000080808000FEFEFE00808080008080 + 8000808080008080800080808000808080008080800080808000808080008080 + 80008080800080808000696969000000000000000000FEFEFE00000000006969 + 69000000000080808000FEFEFE00FEFEFE00808080000000000000000000FEFE + FE00000000008080800000000000000000000000000000000000000000000F0F + 0F000000000069696900FEFEFE0069696900FEFEFE0000000000FEFEFE006969 + 6900FEFEFE006969690000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000080808000FEFEFE0080808000B2B2 + B200B2B2B200B2B2B200B2B2B200B2B2B200B2B2B200B2B2B200B2B2B200B2B2 + B200B2B2B20080808000696969000000000000000000FEFEFE00000000008080 + 80000000000000000000FEFEFE00FEFEFE0080808000FEFEFE00E1E1E100E1E1 + E100FEFEFE0000000000808080000000000000000000000000001D1D1D001D1D + 1D001D1D1D00000000000000000000000000000000000F0F0F00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000080808000FEFEFE0080808000B2B2 + B200B2B2B200B2B2B20026262600262626002626260026262600B2B2B200B2B2 + B200B2B2B2008080800069696900000000000000000000000000000000000000 + 0000696969000000000080808000E1E1E100E1E1E10080808000000000000000 + 0000FEFEFE00000000008080800000000000000000000F0F0F001D1D1D001D1D + 1D001D1D1D004B4B4B004B4B4B004B4B4B004B4B4B001D1D1D000F0F0F008080 + 8000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000080808000FEFEFE0080808000B2B2 + B200B2B2B2004C4C4C004C4C4C0026262600262626002626260026262600B2B2 + B200B2B2B20080808000696969000000000000000000000000001D1D1D006969 + 69001D1D1D006969690000000000000000000000000080808000FEFEFE00E1E1 + E100E1E1E100FEFEFE000000000000000000000000001D1D1D001D1D1D001D1D + 1D001D1D1D004B4B4B004B4B4B004B4B4B004B4B4B005A5A5A001D1D1D000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000080808000FEFEFE0080808000B2B2 + B200B2B2B2004C4C4C004C4C4C0026262600B2B2B200B2B2B200B2B2B200B2B2 + B200B2B2B2008080800069696900000000000000000000000000000000001D1D + 1D00696969001D1D1D000000000080808000FEFEFE00FEFEFE00808080000000 + 000000000000FEFEFE000000000000000000000000001D1D1D001D1D1D004B4B + 4B004B4B4B004B4B4B004B4B4B004B4B4B004B4B4B001D1D1D001D1D1D000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000080808000FEFEFE0080808000B2B2 + B200B2B2B200B2B2B2004C4C4C0026262600B2B2B2002626260026262600B2B2 + B200B2B2B2008080800069696900000000000000000000000000000000006969 + 69001D1D1D00696969001D1D1D0000000000FEFEFE00FEFEFE00FEFEFE00FEFE + FE00E1E1E100E1E1E100FEFEFE0000000000000000001D1D1D004B4B4B004B4B + 4B004B4B4B004B4B4B004B4B4B000F0F0F005A5A5A000F0F0F004B4B4B000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000080808000FEFEFE0080808000B2B2 + B200B2B2B200B2B2B200B2B2B200B2B2B200B2B2B200B2B2B200B2B2B200B2B2 + B200B2B2B2008080800069696900000000000000000000000000000000000000 + 0000696969001D1D1D00696969000000000080808000FEFEFE00FEFEFE00FEFE + FE0000000000000000000000000000000000000000001D1D1D00696969004B4B + 4B004B4B4B000F0F0F004B4B4B004B4B4B001D1D1D004B4B4B004B4B4B000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000080808000FEFEFE00696969008080 + 8000808080008080800080808000808080008080800080808000808080008080 + 8000808080008080800069696900000000000000000000000000000000000000 + 00001D1D1D00696969001D1D1D00696969000000000000000000000000000000 + 00000000000000000000000000000000000000000000000000001D1D1D00FEFE + FE00696969001D1D1D001D1D1D001D1D1D001D1D1D004B4B4B004B4B4B008080 + 8000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000080808000FEFEFE00FEFEFE00FEFE + FE00FEFEFE00FEFEFE00FEFEFE00FEFEFE00FEFEFE00FEFEFE00FEFEFE00FEFE + FE00FEFEFE00FEFEFE0069696900000000000000000000000000000000000000 + 0000000000001D1D1D00696969001D1D1D000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000FEFEFE006969 + 6900FEFEFE004B4B4B004B4B4B004B4B4B004B4B4B004B4B4B00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000080808000FEFEFE00FEFEFE00FEFE + FE00FEFEFE00FEFEFE00FEFEFE00FEFEFE00FEFEFE00FEFEFE00FEFEFE00FEFE + FE00FEFEFE00FEFEFE00FEFEFE00808080000000000000000000000000000000 + 000000000000696969001D1D1D00696969000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00005A5A5A00696969004B4B4B004B4B4B004B4B4B0000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000008080800080808000808080008080 + 8000808080008080800080808000808080008080800080808000808080008080 + 8000808080008080800080808000808080000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000F0F0F000F0F0F000F0F0F000F0F0F000F0F + 0F000F0F0F000F0F0F000F0F0F000F0F0F000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000717171006969690000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000006969690000000000FEFE + FE00000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000F0F0F00FEFEFE00FEFEFE00FEFEFE00FEFE + FE00FEFEFE00FEFEFE00FEFEFE000F0F0F000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000007171 + 71006969690000000000E1E1E100000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000005A5A + 5A005A5A5A005A5A5A005A5A5A00000000000000000000000000000000000000 + 0000000000000000000000000000000000006969690000000000FEFEFE00FEFE + FE00FEFEFE0000000000000000000000000000000000BFBFBF0000000000BFBF + BF0000000000BFBFBF00000000000F0F0F00FEFEFE0000000000000000000000 + 00000000000000000000FEFEFE000F0F0F000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000E1E1E1006969 + 690000000000E1E1E100E1E1E100000000000000000080808000808080008080 + 80008080800080808000808080008080800080808000000000005A5A5A00B2B2 + B200B2B2B200FEFEFE0000000000000000000000000000000000000000000000 + 00000000000000000000000000006969690000000000FEFEFE001D1D1D00FEFE + FE00FEFEFE00FEFEFE000000000000000000BFBFBF00FEFEFE00FEFEFE00FEFE + FE00FEFEFE00FEFEFE00FEFEFE000F0F0F00FEFEFE00FEFEFE00FEFEFE00FEFE + FE00FEFEFE00FEFEFE00FEFEFE000F0F0F000000000000000000000000000000 + 0000000000000000000000000000717171007171710071717100696969000000 + 0000E1E1E100E1E1E10000000000000000000000000000000000B2B2B2005A5A + 5A005A5A5A005A5A5A005A5A5A005A5A5A00000000005A5A5A00B2B2B200B2B2 + B200FEFEFE000000000000000000000000000000000000000000000000000000 + 000000000000000000006969690000000000FEFEFE001D1D1D00FEFEFE001D1D + 1D004C4C4C0026262600FEFEFE000000000000000000FEFEFE00BFBFBF00FEFE + FE00BFBFBF00FEFEFE00BFBFBF000F0F0F00FEFEFE0000000000000000000000 + 00000000000000000000FEFEFE000F0F0F000000000000000000717171007171 + 710071717100E1E1E1000000000071717100E1E1E1006969690000000000E1E1 + E100E1E1E100000000000000000000000000000000000000000000000000B2B2 + B2005A5A5A005A5A5A005A5A5A00000000005A5A5A00B2B2B200B2B2B200FEFE + FE00000000005A5A5A0000000000000000000000000000000000000000000000 + 0000000000006969690000000000FEFEFE001D1D1D00FEFEFE001D1D1D00FEFE + FE0026262600262626000000000069696900BFBFBF00FEFEFE00FEFEFE00BFBF + BF00FEFEFE00BFBFBF00FEFEFE000F0F0F00FEFEFE00FEFEFE00FEFEFE00FEFE + FE00FEFEFE00FEFEFE00FEFEFE000F0F0F00000000007171710071717100E1E1 + E100E1E1E100E1E1E100E1E1E100E1E1E1006969690000000000E1E1E100E1E1 + E100000000000000000000000000000000000000000000000000000000000000 + 0000B2B2B2005A5A5A00000000005A5A5A00B2B2B200B2B2B200FEFEFE000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00006969690000000000FEFEFE00FEFEFE00FEFEFE001D1D1D00FEFEFE00FEFE + FE00FEFEFE0000000000000000000000000000000000FEFEFE00BFBFBF00FEFE + FE00BFBFBF00FEFEFE00BFBFBF000F0F0F00FEFEFE000000000000000000FEFE + FE000F0F0F000F0F0F000F0F0F000F0F0F000000000071717100E1E1E100E1E1 + E10071717100E1E1E100E1E1E1006969690000000000E1E1E100E1E1E1000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000005A5A5A00B2B2B200B2B2B200FEFEFE00000000000000 + 0000000000000000000000000000000000000000000069696900000000008080 + 8000000000006969690000000000696969006969690069696900696969006969 + 690000000000000000007171710000000000BFBFBF00FEFEFE00FEFEFE00BFBF + BF00FEFEFE00BFBFBF00FEFEFE000F0F0F00FEFEFE00FEFEFE00FEFEFE00FEFE + FE000F0F0F00FEFEFE000F0F0F00000000000000000071717100E1E1E100E1E1 + E100E1E1E10071717100E1E1E100E1E1E10071717100E1E1E100000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000005A5A5A00B2B2B200B2B2B200FEFEFE0000000000000000000000 + 00000000000000000000000000000000000000000000E1E1E100717171000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000071717100717171000000000000000000FEFEFE00BFBFBF00FEFE + FE00BFBFBF00FEFEFE00BFBFBF000F0F0F00FEFEFE00FEFEFE00FEFEFE00FEFE + FE000F0F0F000F0F0F0000000000000000008080800080808000808080000000 + 0000E1E1E100E1E1E10071717100E1E1E100E1E1E10071717100000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00005A5A5A00B2B2B200B2B2B200FEFEFE00000000005A5A5A00808080000000 + 000000000000000000000000000000000000000000006969690000000000FEFE + FE00E1E1E100FEFEFE00E1E1E100FEFEFE00E1E1E100FEFEFE00E1E1E100FEFE + FE00E1E1E100000000007171710000000000BFBFBF00BFBFBF00FEFEFE00BFBF + BF00FEFEFE00BFBFBF00FEFEFE000F0F0F000F0F0F000F0F0F000F0F0F000F0F + 0F000F0F0F0000000000000000000000000000000000E1E1E100000000006969 + 690000000000E1E1E100E1E1E10071717100E1E1E100E1E1E100000000000000 + 0000000000000000000000000000000000000000000000000000000000005A5A + 5A00B2B2B200B2B2B200FEFEFE0000000000B2B2B2005A5A5A005A5A5A008080 + 8000000000000000000000000000000000000000000000000000FEFEFE00E1E1 + E100FEFEFE00E1E1E100FEFEFE00E1E1E100FEFEFE00E1E1E100FEFEFE00E1E1 + E100FEFEFE00E1E1E100000000000000000000000000FEFEFE00BFBFBF00FEFE + FE00BFBFBF00FEFEFE0000000000BFBFBF000000000000000000000000000000 + 0000000000000000000000000000000000000000000071717100E1E1E1000000 + 00008080800000000000E1E1E100E1E1E100E1E1E100E1E1E100000000000000 + 00000000000000000000000000000000000000000000000000005A5A5A00B2B2 + B200B2B2B200FEFEFE00000000000000000000000000B2B2B2005A5A5A005A5A + 5A00808080000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000BFBFBF00FEFEFE00FEFEFE00FEFE + FE00FEFEFE00FEFEFE00BFBFBF0069696900BFBFBF0000000000000000000000 + 000000000000000000000000000000000000000000000000000071717100E1E1 + E1000000000080808000E1E1E100E1E1E100E1E1E10071717100000000000000 + 00000000000000000000000000000000000000000000FEFEFE00FEFEFE00FEFE + FE00FEFEFE000000000000000000000000000000000000000000B2B2B200B2B2 + B200B2B2B200B2B2B20000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000BFBFBF0000000000BFBF + BF0000000000BFBFBF0000000000BFBFBF000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000007171 + 7100E1E1E10080808000E1E1E100E1E1E1007171710000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000008080800000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000424D3E000000000000003E000000 + 2800000040000000200000000100010000000000000100000000000000000000 + 000000000000000000000000FFFFFF00FFFFFFFFF8030000FFFFFF0FF0010000 + 0000E007E000000000008007E000000000000003E000000000000003C0010000 + 000000018003000000008001800F000000008001800F00000000C001800F0000 + 0000C000800F00000000E000800F00000000E00FC00F00000000F07FC01F0000 + 0000F07FF03F00000000F8FFFFFF0000FFFFFFFFFFFFFFFFFFFFFFE1FFFFFFAF + FE00FFE0FFE0FF07FE00FF800000FE030000FE000001FC010000C0018003F800 + 00008003C001F00000000007E00100000000000FF01F00000001001FF01F0000 + 0003001FE00F00000007001FC0070000007F001F81030000007F801F0381FFFF + 00FFC03F07C1FFFFFFFFE07FFFFFFFFF00000000000000000000000000000000 + 000000000000} + end +end diff --git a/components/nicesidebar/Demo1/common/Unit1.lfm b/components/nicesidebar/Demo1/common/Unit1.lfm new file mode 100644 index 000000000..bc7253476 --- /dev/null +++ b/components/nicesidebar/Demo1/common/Unit1.lfm @@ -0,0 +1,327 @@ +object Form1: TForm1 + Left = 262 + Height = 484 + Top = 98 + Width = 623 + BorderStyle = bsNone + Caption = 'NiceSideBar Demo - priyatna.org' + ClientHeight = 484 + ClientWidth = 623 + Color = clWhite + Position = poDesktopCenter + LCLVersion = '2.3.0.0' + object Shape1: TShape + Left = 0 + Height = 113 + Top = 0 + Width = 623 + Align = alTop + Brush.Color = 11626823 + Pen.Color = 11626823 + end + object Shape2: TShape + Left = 0 + Height = 8 + Top = 113 + Width = 623 + Align = alTop + Brush.Color = clBlack + end + object Label1: TLabel + Left = 121 + Height = 59 + Top = 24 + Width = 483 + Alignment = taRightJustify + Anchors = [akTop, akRight] + Caption = 'NiceSideBar Demo' + Font.Color = 16766894 + Font.Height = -53 + Font.Name = 'Bookman Old Style' + ParentFont = False + end + object Label2: TLabel + Left = 373 + Height = 36 + Top = 72 + Width = 228 + Alignment = taRightJustify + Anchors = [akTop, akRight] + Caption = 'priyatna.org' + Font.Color = clWhite + Font.Height = -32 + Font.Name = 'Courier New' + ParentFont = False + end + object Label3: TLabel + Left = 216 + Height = 15 + Top = 432 + Width = 75 + Caption = 'Hovered Item:' + end + object Label4: TLabel + Left = 216 + Height = 15 + Top = 448 + Width = 74 + Caption = 'Selected Item:' + end + object Label5: TLabel + Left = 216 + Height = 15 + Top = 184 + Width = 268 + Caption = 'Click on red button in the right top corner to close.' + end + object Label6: TLabel + Left = 216 + Height = 15 + Top = 200 + Width = 248 + Caption = 'Click on green button to maximize and restore.' + end + object Label7: TLabel + Left = 216 + Height = 15 + Top = 216 + Width = 188 + Caption = 'Click on yellow button to minimize.' + end + object NiceSideBar1: TNiceSideBar + Left = 0 + Height = 356 + Top = 121 + Width = 193 + ItemStyle.NormalFont.Color = clWindowText + ItemStyle.NormalFont.Height = -11 + ItemStyle.NormalFont.Name = 'Arial' + ItemStyle.NormalFont.Style = [fsBold] + ItemStyle.HoverFont.Color = clRed + ItemStyle.HoverFont.Height = -11 + ItemStyle.HoverFont.Name = 'Arial' + ItemStyle.HoverFont.Style = [fsBold] + ItemStyle.SelectedFont.Color = clWindowText + ItemStyle.SelectedFont.Height = -11 + ItemStyle.SelectedFont.Name = 'Arial' + ItemStyle.SelectedFont.Style = [fsBold] + ItemStyle.DisabledFont.Color = clGrayText + ItemStyle.DisabledFont.Height = -11 + ItemStyle.DisabledFont.Name = 'Arial' + ItemStyle.DisabledFont.Style = [fsBold] + ItemStyle.NormalColor = 14145495 + SubItemStyle.NormalFont.Color = clWindowText + SubItemStyle.NormalFont.Height = -11 + SubItemStyle.NormalFont.Name = 'Arial' + SubItemStyle.HoverFont.Color = clRed + SubItemStyle.HoverFont.Height = -11 + SubItemStyle.HoverFont.Name = 'Arial' + SubItemStyle.SelectedFont.Color = clWindowText + SubItemStyle.SelectedFont.Height = -11 + SubItemStyle.SelectedFont.Name = 'Arial' + SubItemStyle.DisabledFont.Color = clGrayText + SubItemStyle.DisabledFont.Height = -11 + SubItemStyle.DisabledFont.Name = 'Arial' + SubItemStyle.NormalColor = 14145495 + Items = < + item + Caption = 'First Item' + ImageIndex = 5 + Items.Strings = ( + 'Ini Sub Item' + 'Ini Juga Sub Item' + 'Kalau Ini Memang' + 'Sub Item Juga' + ) + end + item + Caption = 'Second Item' + ImageIndex = 1 + Items.Strings = ( + 'Ini Apaan Aja' + 'Pokoknya Sub Item' + 'Terserah Mau' + 'Apa Saja Boleh' + ) + end + item + Caption = 'Third Item' + ImageIndex = 2 + Items.Strings = ( + 'Yang Penting' + 'Ini Sub Item' + 'Anda Jangan' + 'Protes Segala' + ) + end + item + Caption = 'Fourth Item' + ImageIndex = 3 + Items.Strings = ( + 'Ini Mah Dua Aja' + 'Itemnya Jangan' + 'Banyak-banyak, yah!' + ) + end> + ItemIndex = 1 + SubItemIndex = 2 + ItemHeight = 32 + AlwaysExpand = False + Images = ImageList2 + HoverImages = ImageList1 + SelectedImages = ImageList1 + OnHover = NiceSideBar1Hover + OnSelect = NiceSideBar1Select + BorderStyle = bsNone + ParentBackground = False + ParentColor = False + Color = 14145495 + TabStop = True + TabOrder = 0 + end + object Panel1: TPanel + Cursor = crHandPoint + Left = 537 + Height = 17 + Top = 16 + Width = 17 + Anchors = [akTop, akRight] + BevelOuter = bvNone + Color = 8454143 + ParentBackground = False + ParentColor = False + TabOrder = 1 + OnClick = Panel1Click + end + object Panel2: TPanel + Cursor = crHandPoint + Left = 561 + Height = 17 + Top = 16 + Width = 17 + Anchors = [akTop, akRight] + BevelOuter = bvNone + Color = 8454016 + ParentBackground = False + ParentColor = False + TabOrder = 2 + OnClick = Panel2Click + end + object Panel3: TPanel + Cursor = crHandPoint + Left = 585 + Height = 17 + Top = 16 + Width = 17 + Anchors = [akTop, akRight] + BevelOuter = bvNone + Color = clRed + ParentBackground = False + ParentColor = False + TabOrder = 3 + OnClick = Panel3Click + end + object Panel4: TPanel + Left = 0 + Height = 7 + Top = 477 + Width = 623 + Align = alBottom + BevelOuter = bvNone + Caption = ' ' + Color = clBlack + ParentBackground = False + ParentColor = False + TabOrder = 4 + end + object Button1: TButton + Left = 216 + Height = 25 + Top = 264 + Width = 209 + Caption = 'Toggle Item "Enable" Property' + OnClick = Button1Click + TabOrder = 5 + end + object Button2: TButton + Left = 216 + Height = 25 + Top = 296 + Width = 209 + Caption = 'Toggle Sub Item "Enable" Property' + OnClick = Button2Click + TabOrder = 6 + end + object Button3: TButton + Left = 216 + Height = 25 + Top = 328 + Width = 209 + Caption = 'Toggle Item "Visible" Property' + OnClick = Button3Click + TabOrder = 7 + end + object Button4: TButton + Left = 216 + Height = 25 + Top = 360 + Width = 209 + Caption = 'Toggle Sub Item "Visible" Property' + OnClick = Button4Click + TabOrder = 8 + end + object ImageList1: TImageList + Left = 240 + Top = 136 + Bitmap = { + 4C7A0700000010000000100000005A0200000000000078DAED990D72ED200885 + 5DBA4BBB3BA3D7EB4F80801CE2B4D3CED4199EED4BBE031A44939672DCE8F57A + D1A6DFB6768FD5260B68ACFB79CFE388FC6B76F6F5CD5A86F86F7D1DD778D31A + 7CFC967F8B9F3DEA7FCC8139A6AC7F1D4BC63FB7C97BCF3FE3DFCB3FC4FF2E37 + 40FF5B3EB2F2BB5A9FB75AF57C616CE3DABC8CFE639716C42EFF938F35EE6CFB + 3FCE5F3960F3F2BAF41BF0CDDF349745E3F7D8287EEBFECEC8F1D81A9DD1313C + D5E0F15E3F631ADAB826A6E16BE271F83A3A8EFCFA951A4FF8FCBAFC919A01C4 + E5DD77ABABC5DC63A5A97BDEEB8F5F27A5DFAF7773D7A2A901B25B0D908DC642 + B91AEECE477096EA6C1087FB8CAEB9F235E6B51D1B69C8F9AA5B8BF203352BB6 + 6F5A2BFFED6C4ED3462B33B0DEAB6330CBCF58F28C10DBB5270AFFAAC610B097 + 613559FD1EE4AFD450FDFBC4346C5F473D8DF663E3819A666BF87B4CAC91634D + 8D876B3E7AA68F5B543B117BDA4E789EF3F3F74CCC9AEF7D810CE1AF3C2D2BE7 + 51BEB324988C7FCE73CBC56FB328FF64FE4E9EDF49FE9CEC3D3553B7FFCEFE7F + 121F8D7F9ED62C22A941076CF69DE9C6EAFCDAE80996D8B942F0FC2CA0CFC08A + E5BE799E91FCD6118E7BD548E5BBDEDF45E5BA18F787BEF5B717366EC4B73E8F + 27C6ADF70068CE8D35BF3D17D29EDDEEA5F777885CBD71EADEB7B4A0D682EC78 + 8EAD9F167D27657BF8A7E76CA0B1CE10577EF00DB0AF8BA1618D65B23CE6CA18 + CE5B312CDE88B9CE77C612F39EC68CC1AB859CF7746ADDF335E0697EAFF67341 + F23AE7B17D8FDF57443EF067CBBFE3EDCFC9C8BE6BFE2DC77897BAEDF7DE77AA + 43FFE570FCBBEF84E6FC7F01D4EF61DA + } + end + object ImageList2: TImageList + Left = 320 + Top = 136 + Bitmap = { + 4C7A0700000010000000100000008C0200000000000078DAED58DB91C2300C4C + 0754C02FCD400574C0271D50130D500B8D901B656E998DA2677277C3C7656647 + 907857B223CB768661F3353E1E8F31B0E1256D5EAFD70272FF72B95434DEEDD9 + 721C997FCD85DDED76262AFEC54A5BDD2FADC1FDB7FC5B7CD8AAFFEF3130FBD4 + F5AF63E9F86780EFBDFF8E7F2FFF2AFEA3DC28FA0FF91986CFBAA6B1B9DD6E7A + BC4ADCEBF53A3E9FCF892F5620F70A1A6F2EFC835FD05870C5321FCF3C3E9E4B + BD612E7423BEF8033C6E357E8F9BC56FB517E8FE381A1347C7B05683E3C5EFAA + 86066B16355CCD461CAE8E8EA3C19F8D1334D6F057CCCB3FA91985B8BC768BBA + 6A688CF7FB7D06D5663C9FCFEF674A63BA27CF0554DB16F1591A456EA851E466 + 7D69E56A301E2117FD4DE270DF11C62AD2C0B3889B6930976BB0852C3FAAB062 + FBA5B9F27F6D1BD3362427A4A6572D7351CF3B5CDA13E83D420AAC89DA3F721D + FFC56AB086A5CD7D01F6FBBD559FDD3ACA1AE0C21E0E8709D46EE8689C4EA789 + 5FA869A646B0C6A41A4DAEA9B172CE8FCAFED895D5CE0AA23352842D7CCE79FC + EFC4ACF962F51EC343858F3C95DFC8F92A5FB8CCEFFA673EA313BFC7ADF2D78C + DF96F7B7257FAC3A59817356EEE2D3D7D43657C646EA2DAD372D3EB862BBB596 + B9EA9C55FA0EA1B93ABF02BD1917B1EBBCC3D9D3DAC76A2EFBE63CCBB8BADFD0 + 897C5B7B09B4B77C7FDF1B8C7BB37E7BBE2DBE35E689EF81DB6BDFDE982BFE90 + ED0BF9DD1BDC702DD57A11BFA2F9E99B713917C97B3C1E8F6F54E6306AB258E6 + 5635B0BFC31C6040C31B3FCC19B493EFB2F8CD7C2F066EC3101D190FE8457C4F + 033144B5D0EB2F2031447C892FE2CB3D6913E4DF8CAF731EDFE9B37303DA210F + 60310FF97E76F6C8E0682C6A99B7DE7BDFA936FA1F36F6DFAC67D13AF805E341 + 0DB9 + } + end +end diff --git a/components/nicesidebar/Demo1/common/Unit1.pas b/components/nicesidebar/Demo1/common/Unit1.pas new file mode 100644 index 000000000..8d826e357 --- /dev/null +++ b/components/nicesidebar/Demo1/common/Unit1.pas @@ -0,0 +1,154 @@ +unit Unit1; + +{$IFDEF FPC} + {$MODE Delphi} +{$ENDIF} + +interface + +uses + {$IFDEF FPC} + LCLIntf, LCLType, LMessages, + {$ELSE} + Windows, Messages, + {$ENDIF} + SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, ExtCtrls, NiceSideBar, ImgList; + +type + TForm1 = class(TForm) + Shape1: TShape; + Shape2: TShape; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + NiceSideBar1: TNiceSideBar; + ImageList1: TImageList; + ImageList2: TImageList; + Label5: TLabel; + Panel1: TPanel; + Panel2: TPanel; + Panel3: TPanel; + Panel4: TPanel; + Label6: TLabel; + Label7: TLabel; + Button1: TButton; + Button2: TButton; + Button3: TButton; + Button4: TButton; + procedure Image1Click(Sender: TObject); + procedure ImageButton1Click(Sender: TObject); + procedure NiceSideBar1Hover(Sender: TObject; Index, SubIndex: Integer; + Caption: String); + procedure NiceSideBar1Select(Sender: TObject; Index, SubIndex: Integer; + Caption: String); + procedure Panel1Click(Sender: TObject); + procedure Panel2Click(Sender: TObject); + procedure Panel3Click(Sender: TObject); + procedure Button1Click(Sender: TObject); + procedure Button2Click(Sender: TObject); + procedure Button3Click(Sender: TObject); + procedure Button4Click(Sender: TObject); + private + { Private declarations } + {$IFDEF FPC} + procedure WMNCHittest(var Msg: TLMessage); message LM_NCHITTEST; + {$ELSE} + procedure WMNCHittest(var Msg: TMessage); message WM_NCHITTEST; + {$ENDIF} + protected + procedure CreateParams(var Params: TCreateParams); override; + public + + end; + +var + Form1: TForm1; + +implementation + +{$IFDEF FPC} + {$R *.lfm} +{$ELSE} + {$R *.dfm} +{$ENDIF} + +procedure TForm1.CreateParams(var Params: TCreateParams); +begin + inherited; + Params.Style := (Params.Style and WS_POPUP or WS_BORDER) and not WS_DLGFRAME; +end; + +procedure TForm1.Image1Click(Sender: TObject); +begin // not used + //ShowMessage('Wah, gampang sekali!!!!'); +end; + +procedure TForm1.ImageButton1Click(Sender: TObject); +begin // not used + //ShowMessage('Ngapain, sih?'); +end; + +procedure TForm1.WMNCHittest(var Msg: {$IFDEF FPC}TLMessage{$ELSE}TMessage{$ENDIF}); +begin + Msg.Result := HTCAPTION; +end; + +procedure TForm1.NiceSideBar1Hover(Sender: TObject; Index, + SubIndex: Integer; Caption: String); +begin + Label3.Caption := 'Hovered Item: ' + Caption; +end; + +procedure TForm1.NiceSideBar1Select(Sender: TObject; Index, + SubIndex: Integer; Caption: String); +begin + Label4.Caption := 'Selected Item: ' + Caption; +end; + +procedure TForm1.Panel1Click(Sender: TObject); +begin +// WindowState := wsMinimized; + SendMessage(Handle, {$IFDEF FPC}LM_SYSCOMMAND{$ELSE}WM_SYSCOMMAND{$ENDIF}, SC_MINIMIZE, 0); +end; + +procedure TForm1.Panel2Click(Sender: TObject); +begin + if (WindowState = wsMaximized) then + WindowState := wsNormal + else + WindowState := wsMaximized; + (* + if (WindowState = wsMaximized) + then SendMessage(Handle, {$IFDEF FPC}LM_SYSCOMMAND{$ELSE}WM_SYSCOMMAND{$ENDIF}, SC_RESTORE, 0) + else SendMessage(Handle, {$IFDEF FPC}LM_SYSCOMMAND{$ELSE}WM_SYSCOMMAND{$ENDIF}, SC_MAXIMIZE, 0); + *) +end; + +procedure TForm1.Panel3Click(Sender: TObject); +begin + Close; +end; + +procedure TForm1.Button1Click(Sender: TObject); +begin + NiceSideBar1.Items[1].Enabled := not NiceSideBar1.Items[1].Enabled; +end; + +procedure TForm1.Button2Click(Sender: TObject); +begin + NiceSideBar1.Items[1].ItemEnabled[2] := not NiceSideBar1.Items[1].ItemEnabled[2]; +end; + +procedure TForm1.Button3Click(Sender: TObject); +begin + NiceSideBar1.Items[1].Visible := not NiceSideBar1.Items[1].Visible; +end; + +procedure TForm1.Button4Click(Sender: TObject); +begin + NiceSideBar1.Items[1].ItemVisible[2] := not NiceSideBar1.Items[1].ItemVisible[2]; +end; + +end. diff --git a/components/nicesidebar/Demo3/Project_Delphi/Project1.dof b/components/nicesidebar/Demo3/Project_Delphi/Project1.dof new file mode 100644 index 000000000..3076efb5f --- /dev/null +++ b/components/nicesidebar/Demo3/Project_Delphi/Project1.dof @@ -0,0 +1,147 @@ +[FileVersion] +Version=7.0 +[Compiler] +A=8 +B=0 +C=1 +D=1 +E=0 +F=0 +G=1 +H=1 +I=1 +J=0 +K=0 +L=1 +M=0 +N=1 +O=1 +P=1 +Q=0 +R=0 +S=0 +T=0 +U=0 +V=1 +W=0 +X=1 +Y=1 +Z=1 +ShowHints=1 +ShowWarnings=1 +UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; +NamespacePrefix= +SymbolDeprecated=1 +SymbolLibrary=1 +SymbolPlatform=1 +UnitLibrary=1 +UnitPlatform=1 +UnitDeprecated=1 +HResultCompat=1 +HidingMember=1 +HiddenVirtual=1 +Garbage=1 +BoundsError=1 +ZeroNilCompat=1 +StringConstTruncated=1 +ForLoopVarVarPar=1 +TypedConstVarPar=1 +AsgToTypedConst=1 +CaseLabelRange=1 +ForVariable=1 +ConstructingAbstract=1 +ComparisonFalse=1 +ComparisonTrue=1 +ComparingSignedUnsigned=1 +CombiningSignedUnsigned=1 +UnsupportedConstruct=1 +FileOpen=1 +FileOpenUnitSrc=1 +BadGlobalSymbol=1 +DuplicateConstructorDestructor=1 +InvalidDirective=1 +PackageNoLink=1 +PackageThreadVar=1 +ImplicitImport=1 +HPPEMITIgnored=1 +NoRetVal=1 +UseBeforeDef=1 +ForLoopVarUndef=1 +UnitNameMismatch=1 +NoCFGFileFound=1 +MessageDirective=1 +ImplicitVariants=1 +UnicodeToLocale=1 +LocaleToUnicode=1 +ImagebaseMultiple=1 +SuspiciousTypecast=1 +PrivatePropAccessor=1 +UnsafeType=0 +UnsafeCode=0 +UnsafeCast=0 +[Linker] +MapFile=0 +OutputObjs=0 +ConsoleApp=1 +DebugInfo=0 +RemoteSymbols=0 +MinStackSize=16384 +MaxStackSize=1048576 +ImageBase=4194304 +ExeDescription= +[Directories] +OutputDir= +UnitOutputDir= +PackageDLLOutputDir= +PackageDCPOutputDir= +SearchPath=..\..\source +Packages=vcl;rtl;vclx;indy;vclie;xmlrtl;inetdbbde;inet;inetdbxpress;dbrtl;soaprtl;dsnap;VclSmp;dbexpress;vcldb;dbxcds;inetdb;bdertl;vcldbx;adortl;teeui;teedb;tee;ibxpress;visualclx;visualdbclx;vclactnband;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP;vclshlctrls +Conditionals= +DebugSourceDirs= +UsePackages=0 +[Parameters] +RunParams= +HostApplication= +Launcher= +UseLauncher=0 +DebugCWD= +[Language] +ActiveLang= +ProjectLang= +RootDir=D:\Programme\Borland\Delphi7\Bin\ +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1031 +CodePage=1252 +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= +[HistoryLists\hlUnitAliases] +Count=1 +Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; +[HistoryLists\hlSearchPath] +Count=1 +Item0=..\..\source +[HistoryLists\hlUnitOutputDirectory] +Count=3 +Item0=..\source +Item1=..\..\..\source\ +Item2=..\..\source\ diff --git a/components/nicesidebar/Demo3/Project_Delphi/Project1.dpr b/components/nicesidebar/Demo3/Project_Delphi/Project1.dpr new file mode 100644 index 000000000..74baed530 --- /dev/null +++ b/components/nicesidebar/Demo3/Project_Delphi/Project1.dpr @@ -0,0 +1,13 @@ +program Project1; + +uses + Forms, + Unit1 in '..\common\Unit1.pas' {Form1}; + +{$R *.res} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/components/nicesidebar/Demo3/Project_Delphi/Project1.dproj b/components/nicesidebar/Demo3/Project_Delphi/Project1.dproj new file mode 100644 index 000000000..fcb0a1703 --- /dev/null +++ b/components/nicesidebar/Demo3/Project_Delphi/Project1.dproj @@ -0,0 +1,139 @@ +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <ProjectGuid>{7C6E3E82-EC0A-4CC8-B8B5-17A84A245976}</ProjectGuid> + <MainSource>Project1.dpr</MainSource> + <Base>True</Base> + <Config Condition="'$(Config)'==''">Debug</Config> + <TargetedPlatforms>1</TargetedPlatforms> + <AppType>Application</AppType> + <FrameworkType>VCL</FrameworkType> + <ProjectVersion>19.5</ProjectVersion> + <Platform Condition="'$(Platform)'==''">Win32</Platform> + </PropertyGroup> + <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''"> + <Base>true</Base> + </PropertyGroup> + <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''"> + <Base_Win32>true</Base_Win32> + <CfgParent>Base</CfgParent> + <Base>true</Base> + </PropertyGroup> + <PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''"> + <Base_Win64>true</Base_Win64> + <CfgParent>Base</CfgParent> + <Base>true</Base> + </PropertyGroup> + <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''"> + <Cfg_1>true</Cfg_1> + <CfgParent>Base</CfgParent> + <Base>true</Base> + </PropertyGroup> + <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''"> + <Cfg_1_Win32>true</Cfg_1_Win32> + <CfgParent>Cfg_1</CfgParent> + <Cfg_1>true</Cfg_1> + <Base>true</Base> + </PropertyGroup> + <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''"> + <Cfg_2>true</Cfg_2> + <CfgParent>Base</CfgParent> + <Base>true</Base> + </PropertyGroup> + <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''"> + <Cfg_2_Win32>true</Cfg_2_Win32> + <CfgParent>Cfg_2</CfgParent> + <Cfg_2>true</Cfg_2> + <Base>true</Base> + </PropertyGroup> + <PropertyGroup Condition="'$(Base)'!=''"> + <DCC_E>false</DCC_E> + <DCC_F>false</DCC_F> + <DCC_K>false</DCC_K> + <DCC_N>true</DCC_N> + <DCC_S>false</DCC_S> + <DCC_ImageBase>00400000</DCC_ImageBase> + <DCC_DebugInformation>1</DCC_DebugInformation> + <DCC_SymbolReferenceInfo>1</DCC_SymbolReferenceInfo> + <DCC_UnitSearchPath>..\..\source;$(DCC_UnitSearchPath)</DCC_UnitSearchPath> + <DCC_UsePackage>vcl;rtl;vclx;indy;vclie;xmlrtl;inetdbbde;inet;inetdbxpress;dbrtl;soaprtl;dsnap;VclSmp;dbexpress;vcldb;dbxcds;inetdb;bdertl;vcldbx;adortl;teeui;teedb;tee;ibxpress;visualclx;visualdbclx;vclactnband;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP;vclshlctrls;$(DCC_UsePackage)</DCC_UsePackage> + <SanitizedProjectName>Project1</SanitizedProjectName> + <DCC_Namespace>Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)</DCC_Namespace> + <VerInfo_Locale>1031</VerInfo_Locale> + <VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys> + </PropertyGroup> + <PropertyGroup Condition="'$(Base_Win32)'!=''"> + <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace> + <BT_BuildType>Debug</BT_BuildType> + <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo> + <VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName)</VerInfo_Keys> + <VerInfo_Locale>1033</VerInfo_Locale> + <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File> + <Icon_MainIcon>Project1_Icon.ico</Icon_MainIcon> + <UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44> + <UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150> + </PropertyGroup> + <PropertyGroup Condition="'$(Base_Win64)'!=''"> + <Icon_MainIcon>Project1_Icon.ico</Icon_MainIcon> + <UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44> + <UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150> + </PropertyGroup> + <PropertyGroup Condition="'$(Cfg_1)'!=''"> + <DCC_Define>RELEASE;$(DCC_Define)</DCC_Define> + <DCC_DebugInformation>0</DCC_DebugInformation> + <DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols> + <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo> + </PropertyGroup> + <PropertyGroup Condition="'$(Cfg_1_Win32)'!=''"> + <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode> + </PropertyGroup> + <PropertyGroup Condition="'$(Cfg_2)'!=''"> + <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define> + <DCC_Optimize>false</DCC_Optimize> + <DCC_GenerateStackFrames>true</DCC_GenerateStackFrames> + <DCC_RangeChecking>true</DCC_RangeChecking> + <DCC_IntegerOverflowCheck>true</DCC_IntegerOverflowCheck> + </PropertyGroup> + <PropertyGroup Condition="'$(Cfg_2_Win32)'!=''"> + <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode> + </PropertyGroup> + <ItemGroup> + <DelphiCompile Include="$(MainSource)"> + <MainSource>MainSource</MainSource> + </DelphiCompile> + <DCCReference Include="..\common\Unit1.pas"> + <Form>Form1</Form> + </DCCReference> + <BuildConfiguration Include="Base"> + <Key>Base</Key> + </BuildConfiguration> + <BuildConfiguration Include="Release"> + <Key>Cfg_1</Key> + <CfgParent>Base</CfgParent> + </BuildConfiguration> + <BuildConfiguration Include="Debug"> + <Key>Cfg_2</Key> + <CfgParent>Base</CfgParent> + </BuildConfiguration> + </ItemGroup> + <ProjectExtensions> + <Borland.Personality>Delphi.Personality.12</Borland.Personality> + <Borland.ProjectType/> + <BorlandProject> + <Delphi.Personality> + <Source> + <Source Name="MainSource">Project1.dpr</Source> + </Source> + <Language> + <Language Name="RootDir">..\..\..\..\Prog_Lazarus\svn\lazarus-ccr\components\nicesidebar\Demo3\Project_Delphi\</Language> + </Language> + </Delphi.Personality> + <Platforms> + <Platform value="Win32">True</Platform> + <Platform value="Win64">False</Platform> + </Platforms> + </BorlandProject> + <ProjectFileVersion>12</ProjectFileVersion> + </ProjectExtensions> + <Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/> + <Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/> +</Project> diff --git a/components/nicesidebar/Demo3/Project_Delphi/Project1_Icon.ico b/components/nicesidebar/Demo3/Project_Delphi/Project1_Icon.ico new file mode 100644 index 0000000000000000000000000000000000000000..cfd8992a5b8ff4b89478d89e93ae9205bb8125ef GIT binary patch literal 766 zcmZvaJxjw-6o%h^fPsh~i*;)WQr#qE6x5;U{}5?bDU!Qs#KAy@{*{(2!dc?v-w<3J zyH!xUzUL;X9X!dK+~<6Tdjqt14F+APeYAl+zK^H@bxyTV#lYDAmIAzyrqzp2E~yk{ zSu$YV4Qq8p@lqEbez>c)L$@<uB3ig&FU!@jVkkwsO*)WenaKQ)T|$WNXjJ=hDdy;2 zBuVWchq#R6adPf5vb+e}!z790YsWt0ZDZoA<aWizm`M<iU4fTL=s2kxh(!AgH*qvP ztn$GD`^E$&2wXip4w#zB;W|Gp89s3HpaUjs_|>gg8}<%Oa6GG-Tha@RIgpyYyx3_6 z0sK0F9J)}Gz=q1c)CrmBhWa9M<MO!aOdtb=Ztsa>&IR0YL{dad6xMSUMJ!a-f}CrS zObTrz@|^QLXnD=E3VB8v_nQw=P@5rbS=*@WSgTre9_?ZacCm^3g@?0G70_3Gujz+t p>P*GoN!7Oxk5il4S6hB}Y<btRZ>QS~ZBQNRfhwsN>Ye}J@)z3c!&m?S literal 0 HcmV?d00001 diff --git a/components/nicesidebar/Demo3/Project_Lazarus/Project1.lpi b/components/nicesidebar/Demo3/Project_Lazarus/Project1.lpi new file mode 100644 index 000000000..fd91ad47e --- /dev/null +++ b/components/nicesidebar/Demo3/Project_Lazarus/Project1.lpi @@ -0,0 +1,87 @@ +<?xml version="1.0" encoding="UTF-8"?> +<CONFIG> + <ProjectOptions> + <Version Value="12"/> + <PathDelim Value="\"/> + <General> + <Flags> + <UseDefaultCompilerOptions Value="True"/> + </Flags> + <SessionStorage Value="InProjectDir"/> + <Title Value="Project1"/> + <Scaled Value="True"/> + <ResourceType Value="res"/> + <UseXPManifest Value="True"/> + <XPManifest> + <DpiAware Value="True"/> + </XPManifest> + <Icon Value="0"/> + </General> + <BuildModes> + <Item Name="Default" Default="True"/> + </BuildModes> + <PublishOptions> + <Version Value="2"/> + <UseFileFilters Value="True"/> + </PublishOptions> + <RunParams> + <FormatVersion Value="2"/> + </RunParams> + <RequiredPackages> + <Item> + <PackageName Value="NiceSidebarLaz"/> + </Item> + <Item> + <PackageName Value="LCL"/> + </Item> + </RequiredPackages> + <Units> + <Unit> + <Filename Value="Project1.lpr"/> + <IsPartOfProject Value="True"/> + </Unit> + <Unit> + <Filename Value="..\common\Unit1.pas"/> + <IsPartOfProject Value="True"/> + <ComponentName Value="Form1"/> + <HasResources Value="True"/> + <ResourceBaseClass Value="Form"/> + </Unit> + </Units> + </ProjectOptions> + <CompilerOptions> + <Version Value="11"/> + <PathDelim Value="\"/> + <Target> + <Filename Value="Project1"/> + </Target> + <SearchPaths> + <IncludeFiles Value="$(ProjOutDir)"/> + <OtherUnitFiles Value="..\common"/> + <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> + </SearchPaths> + <Linking> + <Debugging> + <DebugInfoType Value="dsDwarf3"/> + </Debugging> + <Options> + <Win32> + <GraphicApplication Value="True"/> + </Win32> + </Options> + </Linking> + </CompilerOptions> + <Debugging> + <Exceptions> + <Item> + <Name Value="EAbort"/> + </Item> + <Item> + <Name Value="ECodetoolError"/> + </Item> + <Item> + <Name Value="EFOpenError"/> + </Item> + </Exceptions> + </Debugging> +</CONFIG> diff --git a/components/nicesidebar/Demo3/Project_Lazarus/Project1.lpr b/components/nicesidebar/Demo3/Project_Lazarus/Project1.lpr new file mode 100644 index 000000000..94d37a6af --- /dev/null +++ b/components/nicesidebar/Demo3/Project_Lazarus/Project1.lpr @@ -0,0 +1,15 @@ +program Project1; + +uses + Interfaces, + Forms, + Unit1; + +{$R *.res} + +begin + Application.Scaled:=True; + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/components/nicesidebar/Demo3/common/Unit1.dfm b/components/nicesidebar/Demo3/common/Unit1.dfm new file mode 100644 index 000000000..f34d34024 --- /dev/null +++ b/components/nicesidebar/Demo3/common/Unit1.dfm @@ -0,0 +1,34 @@ +object Form1: TForm1 + Left = 369 + Top = 174 + Caption = 'NiceSideBar Demo - priyatna.org' + ClientHeight = 442 + ClientWidth = 586 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = 'Segoe UI' + Font.Style = [] + Position = poDesktopCenter + OnCreate = FormCreate + TextHeight = 15 + object Button1: TButton + Left = 312 + Top = 120 + Width = 129 + Height = 25 + Caption = 'Set ItemIndex' + TabOrder = 0 + OnClick = Button1Click + end + object Button2: TButton + Left = 312 + Top = 160 + Width = 129 + Height = 25 + Caption = 'Set SubItemIndex' + TabOrder = 1 + OnClick = Button2Click + end +end diff --git a/components/nicesidebar/Demo3/common/Unit1.lfm b/components/nicesidebar/Demo3/common/Unit1.lfm new file mode 100644 index 000000000..b319290f0 --- /dev/null +++ b/components/nicesidebar/Demo3/common/Unit1.lfm @@ -0,0 +1,30 @@ +object Form1: TForm1 + Left = 369 + Height = 480 + Top = 174 + Width = 598 + Caption = 'NiceSideBar Demo - priyatna.org' + ClientHeight = 480 + ClientWidth = 598 + Color = clBtnFace + OnCreate = FormCreate + LCLVersion = '2.3.0.0' + object Button1: TButton + Left = 312 + Height = 25 + Top = 120 + Width = 129 + Caption = 'Set ItemIndex' + OnClick = Button1Click + TabOrder = 0 + end + object Button2: TButton + Left = 312 + Height = 25 + Top = 160 + Width = 129 + Caption = 'Set SubItemIndex' + OnClick = Button2Click + TabOrder = 1 + end +end diff --git a/components/nicesidebar/Demo3/common/Unit1.pas b/components/nicesidebar/Demo3/common/Unit1.pas new file mode 100644 index 000000000..6401e9411 --- /dev/null +++ b/components/nicesidebar/Demo3/common/Unit1.pas @@ -0,0 +1,90 @@ +unit Unit1; + +{$IFDEF FPC} + {$MODE Delphi} +{$ENDIF} + +interface + +uses + SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, NiceSidebar, ExtCtrls, StdCtrls; + +type + + { TForm1 } + + TForm1 = class(TForm) + Button1: TButton; + Button2: TButton; + procedure FormCreate(Sender: TObject); + procedure Button1Click(Sender: TObject); + procedure Button2Click(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + SideBar: TNiceSideBar; + end; + +var + Form1: TForm1; + +implementation + +{$IFDEF FPC} + {$R *.lfm} +{$ELSE} + {$R *.dfm} +{$ENDIF} + +procedure TForm1.FormCreate(Sender: TObject); +var + Item: TSideBarItem; +begin + SideBar := TNiceSideBar.Create(Self); + with SideBar do + begin + BeginUpdate; + Parent := Self; + + //GroupSeparator := 0; + + Item := Items.Add; + Item.Caption := 'Test Item 1'; + Item.Items.CommaText := '"Sub Item 1","Sub Item 2","Sub Item 3","Sub Item 4"'; + + Item := Items.Add; + Item.Caption := 'Test Item 2'; + Item.Items.CommaText := '"Sub Item 1","Sub Item 2","Sub Item 3","Sub Item 4"'; + + ItemIndex := Item.Index; + SubItemIndex := 2; + + Item := Items.Add; + Item.Caption := 'Test Item 3'; + Item.Items.CommaText := '"Sub Item 1","Sub Item 2","Sub Item 3","Sub Item 4"'; + + Item := Items.Add; + Item.Caption := 'Test Item 4'; + Item.Items.CommaText := '"Sub Item 1","Sub Item 2","Sub Item 3","Sub Item 4"'; + + Item := Items.Add; + Item.Caption := 'Test Item 5'; + Item.Items.CommaText := '"Sub Item 1","Sub Item 2","Sub Item 3","Sub Item 4"'; + + EndUpdate; + end; +end; + +procedure TForm1.Button1Click(Sender: TObject); +begin + SideBar.ItemIndex := 0; +end; + +procedure TForm1.Button2Click(Sender: TObject); +begin + SideBar.SubItemIndex := 2; +end; + +end. diff --git a/components/nicesidebar/License.txt b/components/nicesidebar/License.txt new file mode 100644 index 000000000..18f8109b7 --- /dev/null +++ b/components/nicesidebar/License.txt @@ -0,0 +1,567 @@ + MOZILLA PUBLIC LICENSE + Version 1.1 + + --------------- + +1. Definitions. + + 1.0.1. "Commercial Use" means distribution or otherwise making the + Covered Code available to a third party. + + 1.1. "Contributor" means each entity that creates or contributes to + the creation of Modifications. + + 1.2. "Contributor Version" means the combination of the Original + Code, prior Modifications used by a Contributor, and the Modifications + made by that particular Contributor. + + 1.3. "Covered Code" means the Original Code or Modifications or the + combination of the Original Code and Modifications, in each case + including portions thereof. + + 1.4. "Electronic Distribution Mechanism" means a mechanism generally + accepted in the software development community for the electronic + transfer of data. + + 1.5. "Executable" means Covered Code in any form other than Source + Code. + + 1.6. "Initial Developer" means the individual or entity identified + as the Initial Developer in the Source Code notice required by Exhibit + A. + + 1.7. "Larger Work" means a work which combines Covered Code or + portions thereof with code not governed by the terms of this License. + + 1.8. "License" means this document. + + 1.8.1. "Licensable" means having the right to grant, to the maximum + extent possible, whether at the time of the initial grant or + subsequently acquired, any and all of the rights conveyed herein. + + 1.9. "Modifications" means any addition to or deletion from the + substance or structure of either the Original Code or any previous + Modifications. When Covered Code is released as a series of files, a + Modification is: + A. Any addition to or deletion from the contents of a file + containing Original Code or previous Modifications. + + B. Any new file that contains any part of the Original Code or + previous Modifications. + + 1.10. "Original Code" means Source Code of computer software code + which is described in the Source Code notice required by Exhibit A as + Original Code, and which, at the time of its release under this + License is not already Covered Code governed by this License. + + 1.10.1. "Patent Claims" means any patent claim(s), now owned or + hereafter acquired, including without limitation, method, process, + and apparatus claims, in any patent Licensable by grantor. + + 1.11. "Source Code" means the preferred form of the Covered Code for + making modifications to it, including all modules it contains, plus + any associated interface definition files, scripts used to control + compilation and installation of an Executable, or source code + differential comparisons against either the Original Code or another + well known, available Covered Code of the Contributor's choice. The + Source Code can be in a compressed or archival form, provided the + appropriate decompression or de-archiving software is widely available + for no charge. + + 1.12. "You" (or "Your") means an individual or a legal entity + exercising rights under, and complying with all of the terms of, this + License or a future version of this License issued under Section 6.1. + For legal entities, "You" includes any entity which controls, is + controlled by, or is under common control with You. For purposes of + this definition, "control" means (a) the power, direct or indirect, + to cause the direction or management of such entity, whether by + contract or otherwise, or (b) ownership of more than fifty percent + (50%) of the outstanding shares or beneficial ownership of such + entity. + +2. Source Code License. + + 2.1. The Initial Developer Grant. + The Initial Developer hereby grants You a world-wide, royalty-free, + non-exclusive license, subject to third party intellectual property + claims: + (a) under intellectual property rights (other than patent or + trademark) Licensable by Initial Developer to use, reproduce, + modify, display, perform, sublicense and distribute the Original + Code (or portions thereof) with or without Modifications, and/or + as part of a Larger Work; and + + (b) under Patents Claims infringed by the making, using or + selling of Original Code, to make, have made, use, practice, + sell, and offer for sale, and/or otherwise dispose of the + Original Code (or portions thereof). + + (c) the licenses granted in this Section 2.1(a) and (b) are + effective on the date Initial Developer first distributes + Original Code under the terms of this License. + + (d) Notwithstanding Section 2.1(b) above, no patent license is + granted: 1) for code that You delete from the Original Code; 2) + separate from the Original Code; or 3) for infringements caused + by: i) the modification of the Original Code or ii) the + combination of the Original Code with other software or devices. + + 2.2. Contributor Grant. + Subject to third party intellectual property claims, each Contributor + hereby grants You a world-wide, royalty-free, non-exclusive license + + (a) under intellectual property rights (other than patent or + trademark) Licensable by Contributor, to use, reproduce, modify, + display, perform, sublicense and distribute the Modifications + created by such Contributor (or portions thereof) either on an + unmodified basis, with other Modifications, as Covered Code + and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, using, or + selling of Modifications made by that Contributor either alone + and/or in combination with its Contributor Version (or portions + of such combination), to make, use, sell, offer for sale, have + made, and/or otherwise dispose of: 1) Modifications made by that + Contributor (or portions thereof); and 2) the combination of + Modifications made by that Contributor with its Contributor + Version (or portions of such combination). + + (c) the licenses granted in Sections 2.2(a) and 2.2(b) are + effective on the date Contributor first makes Commercial Use of + the Covered Code. + + (d) Notwithstanding Section 2.2(b) above, no patent license is + granted: 1) for any code that Contributor has deleted from the + Contributor Version; 2) separate from the Contributor Version; + 3) for infringements caused by: i) third party modifications of + Contributor Version or ii) the combination of Modifications made + by that Contributor with other software (except as part of the + Contributor Version) or other devices; or 4) under Patent Claims + infringed by Covered Code in the absence of Modifications made by + that Contributor. + +3. Distribution Obligations. + + 3.1. Application of License. + The Modifications which You create or to which You contribute are + governed by the terms of this License, including without limitation + Section 2.2. The Source Code version of Covered Code may be + distributed only under the terms of this License or a future version + of this License released under Section 6.1, and You must include a + copy of this License with every copy of the Source Code You + distribute. You may not offer or impose any terms on any Source Code + version that alters or restricts the applicable version of this + License or the recipients' rights hereunder. However, You may include + an additional document offering the additional rights described in + Section 3.5. + + 3.2. Availability of Source Code. + Any Modification which You create or to which You contribute must be + made available in Source Code form under the terms of this License + either on the same media as an Executable version or via an accepted + Electronic Distribution Mechanism to anyone to whom you made an + Executable version available; and if made available via Electronic + Distribution Mechanism, must remain available for at least twelve (12) + months after the date it initially became available, or at least six + (6) months after a subsequent version of that particular Modification + has been made available to such recipients. You are responsible for + ensuring that the Source Code version remains available even if the + Electronic Distribution Mechanism is maintained by a third party. + + 3.3. Description of Modifications. + You must cause all Covered Code to which You contribute to contain a + file documenting the changes You made to create that Covered Code and + the date of any change. You must include a prominent statement that + the Modification is derived, directly or indirectly, from Original + Code provided by the Initial Developer and including the name of the + Initial Developer in (a) the Source Code, and (b) in any notice in an + Executable version or related documentation in which You describe the + origin or ownership of the Covered Code. + + 3.4. Intellectual Property Matters + (a) Third Party Claims. + If Contributor has knowledge that a license under a third party's + intellectual property rights is required to exercise the rights + granted by such Contributor under Sections 2.1 or 2.2, + Contributor must include a text file with the Source Code + distribution titled "LEGAL" which describes the claim and the + party making the claim in sufficient detail that a recipient will + know whom to contact. If Contributor obtains such knowledge after + the Modification is made available as described in Section 3.2, + Contributor shall promptly modify the LEGAL file in all copies + Contributor makes available thereafter and shall take other steps + (such as notifying appropriate mailing lists or newsgroups) + reasonably calculated to inform those who received the Covered + Code that new knowledge has been obtained. + + (b) Contributor APIs. + If Contributor's Modifications include an application programming + interface and Contributor has knowledge of patent licenses which + are reasonably necessary to implement that API, Contributor must + also include this information in the LEGAL file. + + (c) Representations. + Contributor represents that, except as disclosed pursuant to + Section 3.4(a) above, Contributor believes that Contributor's + Modifications are Contributor's original creation(s) and/or + Contributor has sufficient rights to grant the rights conveyed by + this License. + + 3.5. Required Notices. + You must duplicate the notice in Exhibit A in each file of the Source + Code. If it is not possible to put such notice in a particular Source + Code file due to its structure, then You must include such notice in a + location (such as a relevant directory) where a user would be likely + to look for such a notice. If You created one or more Modification(s) + You may add your name as a Contributor to the notice described in + Exhibit A. You must also duplicate this License in any documentation + for the Source Code where You describe recipients' rights or ownership + rights relating to Covered Code. You may choose to offer, and to + charge a fee for, warranty, support, indemnity or liability + obligations to one or more recipients of Covered Code. However, You + may do so only on Your own behalf, and not on behalf of the Initial + Developer or any Contributor. You must make it absolutely clear than + any such warranty, support, indemnity or liability obligation is + offered by You alone, and You hereby agree to indemnify the Initial + Developer and every Contributor for any liability incurred by the + Initial Developer or such Contributor as a result of warranty, + support, indemnity or liability terms You offer. + + 3.6. Distribution of Executable Versions. + You may distribute Covered Code in Executable form only if the + requirements of Section 3.1-3.5 have been met for that Covered Code, + and if You include a notice stating that the Source Code version of + the Covered Code is available under the terms of this License, + including a description of how and where You have fulfilled the + obligations of Section 3.2. The notice must be conspicuously included + in any notice in an Executable version, related documentation or + collateral in which You describe recipients' rights relating to the + Covered Code. You may distribute the Executable version of Covered + Code or ownership rights under a license of Your choice, which may + contain terms different from this License, provided that You are in + compliance with the terms of this License and that the license for the + Executable version does not attempt to limit or alter the recipient's + rights in the Source Code version from the rights set forth in this + License. If You distribute the Executable version under a different + license You must make it absolutely clear that any terms which differ + from this License are offered by You alone, not by the Initial + Developer or any Contributor. You hereby agree to indemnify the + Initial Developer and every Contributor for any liability incurred by + the Initial Developer or such Contributor as a result of any such + terms You offer. + + 3.7. Larger Works. + You may create a Larger Work by combining Covered Code with other code + not governed by the terms of this License and distribute the Larger + Work as a single product. In such a case, You must make sure the + requirements of this License are fulfilled for the Covered Code. + +4. Inability to Comply Due to Statute or Regulation. + + If it is impossible for You to comply with any of the terms of this + License with respect to some or all of the Covered Code due to + statute, judicial order, or regulation then You must: (a) comply with + the terms of this License to the maximum extent possible; and (b) + describe the limitations and the code they affect. Such description + must be included in the LEGAL file described in Section 3.4 and must + be included with all distributions of the Source Code. Except to the + extent prohibited by statute or regulation, such description must be + sufficiently detailed for a recipient of ordinary skill to be able to + understand it. + +5. Application of this License. + + This License applies to code to which the Initial Developer has + attached the notice in Exhibit A and to related Covered Code. + +6. Versions of the License. + + 6.1. New Versions. + Netscape Communications Corporation ("Netscape") may publish revised + and/or new versions of the License from time to time. Each version + will be given a distinguishing version number. + + 6.2. Effect of New Versions. + Once Covered Code has been published under a particular version of the + License, You may always continue to use it under the terms of that + version. You may also choose to use such Covered Code under the terms + of any subsequent version of the License published by Netscape. No one + other than Netscape has the right to modify the terms applicable to + Covered Code created under this License. + + 6.3. Derivative Works. + If You create or use a modified version of this License (which you may + only do in order to apply it to code which is not already Covered Code + governed by this License), You must (a) rename Your license so that + the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", + "MPL", "NPL" or any confusingly similar phrase do not appear in your + license (except to note that your license differs from this License) + and (b) otherwise make it clear that Your version of the license + contains terms which differ from the Mozilla Public License and + Netscape Public License. (Filling in the name of the Initial + Developer, Original Code or Contributor in the notice described in + Exhibit A shall not of themselves be deemed to be modifications of + this License.) + +7. DISCLAIMER OF WARRANTY. + + COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF + DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. + THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE + IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, + YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE + COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER + OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF + ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +8. TERMINATION. + + 8.1. This License and the rights granted hereunder will terminate + automatically if You fail to comply with terms herein and fail to cure + such breach within 30 days of becoming aware of the breach. All + sublicenses to the Covered Code which are properly granted shall + survive any termination of this License. Provisions which, by their + nature, must remain in effect beyond the termination of this License + shall survive. + + 8.2. If You initiate litigation by asserting a patent infringement + claim (excluding declatory judgment actions) against Initial Developer + or a Contributor (the Initial Developer or Contributor against whom + You file such action is referred to as "Participant") alleging that: + + (a) such Participant's Contributor Version directly or indirectly + infringes any patent, then any and all rights granted by such + Participant to You under Sections 2.1 and/or 2.2 of this License + shall, upon 60 days notice from Participant terminate prospectively, + unless if within 60 days after receipt of notice You either: (i) + agree in writing to pay Participant a mutually agreeable reasonable + royalty for Your past and future use of Modifications made by such + Participant, or (ii) withdraw Your litigation claim with respect to + the Contributor Version against such Participant. If within 60 days + of notice, a reasonable royalty and payment arrangement are not + mutually agreed upon in writing by the parties or the litigation claim + is not withdrawn, the rights granted by Participant to You under + Sections 2.1 and/or 2.2 automatically terminate at the expiration of + the 60 day notice period specified above. + + (b) any software, hardware, or device, other than such Participant's + Contributor Version, directly or indirectly infringes any patent, then + any rights granted to You by such Participant under Sections 2.1(b) + and 2.2(b) are revoked effective as of the date You first made, used, + sold, distributed, or had made, Modifications made by that + Participant. + + 8.3. If You assert a patent infringement claim against Participant + alleging that such Participant's Contributor Version directly or + indirectly infringes any patent where such claim is resolved (such as + by license or settlement) prior to the initiation of patent + infringement litigation, then the reasonable value of the licenses + granted by such Participant under Sections 2.1 or 2.2 shall be taken + into account in determining the amount or value of any payment or + license. + + 8.4. In the event of termination under Sections 8.1 or 8.2 above, + all end user license agreements (excluding distributors and resellers) + which have been validly granted by You or any distributor hereunder + prior to termination shall survive termination. + +9. LIMITATION OF LIABILITY. + + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT + (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL + DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, + OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR + ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY + CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, + WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER + COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN + INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF + LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY + RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW + PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE + EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO + THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +10. U.S. GOVERNMENT END USERS. + + The Covered Code is a "commercial item," as that term is defined in + 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer + software" and "commercial computer software documentation," as such + terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 + C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), + all U.S. Government End Users acquire Covered Code with only those + rights set forth herein. + +11. MISCELLANEOUS. + + This License represents the complete agreement concerning subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. This License shall be governed by + California law provisions (except to the extent applicable law, if + any, provides otherwise), excluding its conflict-of-law provisions. + With respect to disputes in which at least one party is a citizen of, + or an entity chartered or registered to do business in the United + States of America, any litigation relating to this License shall be + subject to the jurisdiction of the Federal Courts of the Northern + District of California, with venue lying in Santa Clara County, + California, with the losing party responsible for costs, including + without limitation, court costs and reasonable attorneys' fees and + expenses. The application of the United Nations Convention on + Contracts for the International Sale of Goods is expressly excluded. + Any law or regulation which provides that the language of a contract + shall be construed against the drafter shall not apply to this + License. + +12. RESPONSIBILITY FOR CLAIMS. + + As between Initial Developer and the Contributors, each party is + responsible for claims and damages arising, directly or indirectly, + out of its utilization of rights under this License and You agree to + work with Initial Developer and Contributors to distribute such + responsibility on an equitable basis. Nothing herein is intended or + shall be deemed to constitute any admission of liability. + +13. MULTIPLE-LICENSED CODE. + + Initial Developer may designate portions of the Covered Code as + "Multiple-Licensed". "Multiple-Licensed" means that the Initial + Developer permits you to utilize portions of the Covered Code under + Your choice of the NPL or the alternative licenses, if any, specified + by the Initial Developer in the file described in Exhibit A. + +EXHIBIT A -Mozilla Public License. + + ``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/ + + Software distributed under the License is distributed on an "AS IS" + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + License for the specific language governing rights and limitations + under the License. + + The Original Code is ______________________________________. + + The Initial Developer of the Original Code is ________________________. + Portions created by ______________________ are Copyright (C) ______ + _______________________. All Rights Reserved. + + Contributor(s): ______________________________________. + + Alternatively, the contents of this file may be used under the terms + of the _____ license (the "[___] License"), in which case the + provisions of [______] License are applicable instead of those + above. If you wish to allow use of your version of this file only + under the terms of the [____] License and not to allow others to use + your version of this file under the MPL, indicate your decision by + deleting the provisions above and replace them with the notice and + other provisions required by the [___] License. If you do not delete + the provisions above, a recipient may use your version of this file + under either the MPL or the [___] License." + + [NOTE: The text of this Exhibit A may differ slightly from the text of + the notices in the Source Code files of the Original Code. You should + use the text of this Exhibit A rather than the text found in the + Original Code Source Code for Your Modifications.] + + ---------------------------------------------------------------------- + + AMENDMENTS + + The Netscape Public License Version 1.1 ("NPL") consists of the + Mozilla Public License Version 1.1 with the following Amendments, + including Exhibit A-Netscape Public License. Files identified with + "Exhibit A-Netscape Public License" are governed by the Netscape + Public License Version 1.1. + + Additional Terms applicable to the Netscape Public License. + I. Effect. + These additional terms described in this Netscape Public + License -- Amendments shall apply to the Mozilla Communicator + client code and to all Covered Code under this License. + + II. "Netscape's Branded Code" means Covered Code that Netscape + distributes and/or permits others to distribute under one or more + trademark(s) which are controlled by Netscape but which are not + licensed for use under this License. + + III. Netscape and logo. + This License does not grant any rights to use the trademarks + "Netscape", the "Netscape N and horizon" logo or the "Netscape + lighthouse" logo, "Netcenter", "Gecko", "Java" or "JavaScript", + "Smart Browsing" even if such marks are included in the Original + Code or Modifications. + + IV. Inability to Comply Due to Contractual Obligation. + Prior to licensing the Original Code under this License, Netscape + has licensed third party code for use in Netscape's Branded Code. + To the extent that Netscape is limited contractually from making + such third party code available under this License, Netscape may + choose to reintegrate such code into Covered Code without being + required to distribute such code in Source Code form, even if + such code would otherwise be considered "Modifications" under + this License. + + V. Use of Modifications and Covered Code by Initial Developer. + V.1. In General. + The obligations of Section 3 apply to Netscape, except to + the extent specified in this Amendment, Section V.2 and V.3. + + V.2. Other Products. + Netscape may include Covered Code in products other than the + Netscape's Branded Code which are released by Netscape + during the two (2) years following the release date of the + Original Code, without such additional products becoming + subject to the terms of this License, and may license such + additional products on different terms from those contained + in this License. + + V.3. Alternative Licensing. + Netscape may license the Source Code of Netscape's Branded + Code, including Modifications incorporated therein, without + such Netscape Branded Code becoming subject to the terms of + this License, and may license such Netscape Branded Code on + different terms from those contained in this License. + + VI. Litigation. + Notwithstanding the limitations of Section 11 above, the + provisions regarding litigation in Section 11(a), (b) and (c) of + the License shall apply to all disputes relating to this License. + + EXHIBIT A-Netscape Public License. + + "The contents of this file are subject to the Netscape 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/NPL/ + + Software distributed under the License is distributed on an "AS + IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + implied. See the License for the specific language governing + rights and limitations under the License. + + The Original Code is Mozilla Communicator client code, released + March 31, 1998. + + The Initial Developer of the Original Code is Netscape + Communications Corporation. Portions created by Netscape are + Copyright (C) 1998-1999 Netscape Communications Corporation. All + Rights Reserved. + + Contributor(s): ______________________________________. + + Alternatively, the contents of this file may be used under the + terms of the _____ license (the "[___] License"), in which case + the provisions of [______] License are applicable instead of + those above. If you wish to allow use of your version of this + file only under the terms of the [____] License and not to allow + others to use your version of this file under the NPL, indicate + your decision by deleting the provisions above and replace them + with the notice and other provisions required by the [___] + License. If you do not delete the provisions above, a recipient + may use your version of this file under either the NPL or the + [___] License." diff --git a/components/nicesidebar/Readme.html b/components/nicesidebar/Readme.html new file mode 100644 index 000000000..76211bdaa --- /dev/null +++ b/components/nicesidebar/Readme.html @@ -0,0 +1,211 @@ +<html> +<title>NiceSideBar Component + + + +

NiceSideBar + v1.20
+ © 2008, Priyatna
+ Bandung - Indonesia

+

http://www.priyatna.org/
+ mailto:me@priyatna.org

+

Introduction
+ Version History
+ License
+ Installation
+ Methods

+ Properties
+ Contacts

+

Version: 1.2
+ Release Date: January 12, 2008
+

+

 

+ +
+

+

Introduction

+

NiceSideBar is a visual component for Delphi that can be used as a menu. It + mimics side menu that usually used in websites. It has flat design and highly + customizable. It supports two menu levels (menu and sub menu). Each menu can + have a glyph that is supplied by an image list. It has hover state effect too.

+

 

+

+

+
+

+

Version History

+

+ Version 1.2 (January 12, 2008)
+ - Added properties to items and subitems: Enabled, Visible, ItemEnabled, ItemVisible
+ - Added properties: disabled colors, disabled images
+ - Keyboard control: PgUp, PgDown, Up and Down arrows
+ - Reported bugs fixed
+
+ Version 1.1 (June 28, 2007)
+ Reported bugs fixed
+
+ Version 1.0 (May 26th, 2007)
+ Initial Release

+

 

+

+

+
+

 

+

License

+

This library is released under Mozilla Public License. You can use it in your + freeware, shareware or commercial softwares. You can send your modification + to me, and if I decide to include it in the main distribution, I will add your + name as a contributor. You can read full licensing information here. +

+

 

+ +
+

Installation

+

There is no special process to install it on Delphi. Just open NiceSideBarD7.dpk + on Delphi IDE and press Install button. I use Delphi 7. If you use another Delphi + version, you may have to make some minor changes.

+

The component will appear in priyatna.org tab.

+

 

+

+

+
+

Methods

+

There are some main methods of the component:

+
    +
  • procedure BeginUpdate;
    + Call this method to temporarily prevent the control from updating its content. + This is useful when you want to add bulky items to the control.
    +
    +
  • +
  • procedure EndUpdate;
    + This method is used to re-enable update after calling BeginUpdate. You must + call BeginUpdate prior to call this method.
  • +
+

 

+

+

+
+

Properties

+

There are some main properties of the component:

+
    +
  • property Items: TSideBarItems;
    + A collection of items. Each item usually have subitems. You can associate + item as a menu group. Item can have a glyph supplied from an image list, while + sub items use bullets.
    +
    +
  • +
  • property ItemIndex: Integer;
    + Specifies which item is currently selected.
    +
    +
  • +
  • property SubItemIndex: Integer;
    + Specifies which sub item is currently selected.
    +
    +
  • +
  • property ItemStyle: TSideBarItemStyle;
    + This is where you can customize item: normal state font and color, selected + state font and color, hover state font and color, and also line color.
    +
    +
  • +
  • property SubItemStyle: TSideBarItemStyle;
    + This is where you can customize sub items: normal state font and color, selected + state font and color, hover state font and color, and also line color.
    +
    +
  • +
  • property Bullets: TSideBarBulletStyle;
    + This is where you can customize bullets: visibility, normal hover and selected + state colors, outline colors and size. Currently it has three bullet style: + round, rectangle and diamond.
    +
    +
  • +
  • property Scrollers: TSideBarScrollerStyle;
    + This is where you can customize scroller arrow: normal, hover and selected + colors and outline colors.
    +
    +
  • +
  • property ItemHeight: Integer;
    + Specifies item height in pixel.
    +
    +
  • +
  • property SubItemHeight: Integer;
    + Specifies sub item height in pixel.
    +
    +
  • +
  • property Alignment: TSideBarAlign;
    + Specifies caption alignment: left, right or centered.
    +
    +
  • +
  • property Margin: Integer;
    + Specifies margin in pixel.
    +
    +
  • +
  • property GroupSeparator: Integer;
    + Specifies vertical margin between group (item) in pixel.
    +
    +
  • +
  • property Indent: Integer;
    + Specifies indent value for sub items in pixel.
    +
    +
  • +
  • property AlwaysExpand: Boolean;
    + Set to True if you want the control to always expands its subitems.
    +
    +
  • +
  • property Images: TImageList;
    + Specifies image list to use for items.
    +
    +
  • +
  • property HoverImages: TImageList;
    + Specifies image list to use for items when in in hover mode.
    +
    +
  • +
  • property SelectedImages: TImageList;
    + Specifies image list to use for items when in selected mode.
    +
    +
  • +
  • property HandPointCursor: Boolean;
    + Set to True to use handpoint cursor instead the default one.
    +
    +
  • +
  • property OnHover: TSideBarEvent;
    + An event that is fired everytime user hovers it mouse over an item or sub + item.
    +
    +
  • +
  • property OnSelect: TSideBarEvent;
    + An event that is fired everytime user select an item or sub item.
    +
    +
  • +
  • property OnCustomDrawItem: TSideBarCustomDrawItem;
    + You can customize item drawing by handling this event.
    +
    +
  • +
  • property OnCustomDrawSubItem: TSideBarCustomDrawSubItem;
    + You can customize sub item drawing by handling this event.
    +
    +
  • +
  • property OnCustomDrawNonItem: TSideBarCustomDrawNonItem;
    + You can customize background drawing by handling this event.
    +
    +
  • +
  • property OnCustomDrawScroller: TSideBarCustomDrawScroller;
    + You can customize scroller drawing by handling this event.
    +
  • +
+

 

+

+

+
+

Contacts

+

Don't hesitate to report any bug or whish to me:
+

+

Priyatna
+ Bandung - Indonesia

+

http://www.priyatna.org/
+ mailto:me@priyatna.org

+

 

+ diff --git a/components/nicesidebar/images/make_res.bat b/components/nicesidebar/images/make_res.bat new file mode 100644 index 000000000..7709a1651 --- /dev/null +++ b/components/nicesidebar/images/make_res.bat @@ -0,0 +1 @@ +lazres ../source/nicesidebar_images.res tnicesidebar.bmp \ No newline at end of file diff --git a/components/nicesidebar/images/tnicesidebar.bmp b/components/nicesidebar/images/tnicesidebar.bmp new file mode 100644 index 0000000000000000000000000000000000000000..ed545ceb8b5ccd711f230ffba1aeb494903aa9b3 GIT binary patch literal 1654 zcmb8u!ExI#5Czb6CX>m*1?0$MD##g=dwO6MK5r>3g@yRw3ev*QgG@`Z#vV;zJ&GR& zu^>qO{`2&$PVLv%s-Mn&93JZXsegPqeZ3wYF6YB(6Kbg%G@*tMO{i6-3G>216Ka!b zLhUk5m_-Inj)FtcCe*U1FB9fs22H3{rU`SQgC^7_(}db(nlNu_(B!zm;U=3#6go|Lx)XmLM^NMGGT7^pb53gG+{o7K@)0|X+rHX zO_&dD(Byc4L-qL=YH9T)!hE=cCe$j^g!$kHO{h(#3AM{K!65Zza=b9ZOVfl}HuYtK z$<&t#waPR>A@yZKZ8A-$U8V^-)tAZff(|cf6KdJjmkBObUnbNl(*zT%FB58$X+rHX zO>j_OCdUtAoOV8reh`bdkR}+czD%f9rU@oeUnbNh(}db(nxLpDWx`86f6(gX=zqL! z&(G)nn`_Sf*TWz0jej>-cpLxsrrqoRY@VA%isyCS{OjERZmO&Cw(8QZ`ac{0zw>`M d{@vulTiwe_UeE6Je>TreQSt6R++0#G{{Sm4wGRLQ literal 0 HcmV?d00001 diff --git a/components/nicesidebar/packages/Delphi XE11 Alexandria/NiceSideBarDXE11.dpk b/components/nicesidebar/packages/Delphi XE11 Alexandria/NiceSideBarDXE11.dpk new file mode 100644 index 000000000..a3ae7a593 --- /dev/null +++ b/components/nicesidebar/packages/Delphi XE11 Alexandria/NiceSideBarDXE11.dpk @@ -0,0 +1,40 @@ +package NiceSideBarDXE11; + +{$R *.res} +{$R 'NiceSideBar.dcr'} +{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION OFF} +{$OVERFLOWCHECKS ON} +{$RANGECHECKS ON} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES ON} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$DEFINE DEBUG} +{$ENDIF IMPLICITBUILDING} +{$DESCRIPTION 'priyatna.org - NiceSideBar'} +{$IMPLICITBUILD OFF} + +requires + rtl, + DesignIDE; + +contains + NiceSideBarReg in '..\..\source\NiceSideBarReg.pas', + NiceSideBar in '..\..\source\NiceSideBar.pas'; + +end. diff --git a/components/nicesidebar/packages/Delphi XE11 Alexandria/NiceSideBarDXE11.dproj b/components/nicesidebar/packages/Delphi XE11 Alexandria/NiceSideBarDXE11.dproj new file mode 100644 index 000000000..435c02e47 --- /dev/null +++ b/components/nicesidebar/packages/Delphi XE11 Alexandria/NiceSideBarDXE11.dproj @@ -0,0 +1,873 @@ + + + {B4C401AA-D18A-40E9-A4B0-DE9E522B22B8} + NiceSideBarDXE11.dpk + True + Debug + 1 + Package + None + 19.5 + Win32 + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_2 + true + true + + + false + false + false + true + false + 00400000 + 1 + priyatna.org - NiceSideBar + ..\..\source;$(DCC_UnitSearchPath) + vcl;rtl;dbrtl;vcldb;vclx;bdertl;vcldbx;ibxpress;dsnap;cds;bdecds;teeui;teedb;tee;dss;dsnapcrba;dsnapcon;VclSmp;vclie;xmlrtl;inet;inetdbbde;inetdbxpress;inetdb;webdsnap;websnap;dbexpress;dbxcds;Commons;$(DCC_UsePackage) + true + true + NiceSideBarDXE11 + true + true + 2 + 1033 + System;Xml;Data;Datasnap;Web;Soap;Winapi;Vcl;$(DCC_Namespace) + CompanyName=;FileDescription=;FileVersion=2.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + + + System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + Debug + true + CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName) + 1033 + + + RELEASE;$(DCC_Define) + 0 + false + 0 + + + DEBUG;$(DCC_Define) + false + true + true + true + + + 1 + CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName) + + + + MainSource + + + + + + + + Base + + + Cfg_1 + Base + + + Cfg_2 + Base + + + + Delphi.Personality.12 + Package + + + + NiceSideBarDXE11.dpk + + + Microsoft Office 2000 Beispiele für gekapselte Komponenten für Automatisierungsserver + Microsoft Office XP Beispiele für gekapselte Komponenten für Automation Server + Datei C:\Users\Werner-3\Documents\Embarcadero\Studio\22.0\Bpl\Win32\JclBaseExpert280.bpl nicht gefunden + Datei C:\Users\Werner-3\Documents\Embarcadero\Studio\22.0\Bpl\Win32\JclDebugExpert280.bpl nicht gefunden + Datei C:\Users\Werner-3\Documents\Embarcadero\Studio\22.0\Bpl\Win32\JclProjectAnalysisExpert280.bpl nicht gefunden + Datei C:\Users\Werner-3\Documents\Embarcadero\Studio\22.0\Bpl\Win32\JclFavoriteFoldersExpert280.bpl nicht gefunden + Datei C:\Users\Werner-3\Documents\Embarcadero\Studio\22.0\Bpl\Win32\JclRepositoryExpert280.bpl nicht gefunden + Datei C:\Users\Werner-3\Documents\Embarcadero\Studio\22.0\Bpl\Win32\JclSIMDViewExpert280.bpl nicht gefunden + Datei C:\Users\Werner-3\Documents\Embarcadero\Studio\22.0\Bpl\Win32\JclStackTraceViewerExpert280.bpl nicht gefunden + + + + True + False + + + + + true + + + + + true + + + + + true + + + + + 1 + + + 0 + + + + + classes + 64 + + + classes + 64 + + + + + res\xml + 1 + + + res\xml + 1 + + + + + library\lib\armeabi-v7a + 1 + + + + + library\lib\armeabi + 1 + + + library\lib\armeabi + 1 + + + + + library\lib\armeabi-v7a + 1 + + + + + library\lib\mips + 1 + + + library\lib\mips + 1 + + + + + library\lib\armeabi-v7a + 1 + + + library\lib\arm64-v8a + 1 + + + + + library\lib\armeabi-v7a + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\values + 1 + + + res\values + 1 + + + + + res\values-v21 + 1 + + + res\values-v21 + 1 + + + + + res\values + 1 + + + res\values + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable-xxhdpi + 1 + + + res\drawable-xxhdpi + 1 + + + + + res\drawable-xxxhdpi + 1 + + + res\drawable-xxxhdpi + 1 + + + + + res\drawable-ldpi + 1 + + + res\drawable-ldpi + 1 + + + + + res\drawable-mdpi + 1 + + + res\drawable-mdpi + 1 + + + + + res\drawable-hdpi + 1 + + + res\drawable-hdpi + 1 + + + + + res\drawable-xhdpi + 1 + + + res\drawable-xhdpi + 1 + + + + + res\drawable-mdpi + 1 + + + res\drawable-mdpi + 1 + + + + + res\drawable-hdpi + 1 + + + res\drawable-hdpi + 1 + + + + + res\drawable-xhdpi + 1 + + + res\drawable-xhdpi + 1 + + + + + res\drawable-xxhdpi + 1 + + + res\drawable-xxhdpi + 1 + + + + + res\drawable-xxxhdpi + 1 + + + res\drawable-xxxhdpi + 1 + + + + + res\drawable-small + 1 + + + res\drawable-small + 1 + + + + + res\drawable-normal + 1 + + + res\drawable-normal + 1 + + + + + res\drawable-large + 1 + + + res\drawable-large + 1 + + + + + res\drawable-xlarge + 1 + + + res\drawable-xlarge + 1 + + + + + res\values + 1 + + + res\values + 1 + + + + + 1 + + + 1 + + + 0 + + + + + 1 + .framework + + + 1 + .framework + + + 1 + .framework + + + 0 + + + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 0 + .dll;.bpl + + + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 0 + .bpl + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 1 + + + 1 + + + + + + + + Contents\Resources + 1 + + + Contents\Resources + 1 + + + Contents\Resources + 1 + + + + + library\lib\armeabi-v7a + 1 + + + library\lib\arm64-v8a + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 0 + + + + + library\lib\armeabi-v7a + 1 + + + + + 1 + + + 1 + + + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + + + + + + 1 + + + 1 + + + 1 + + + + + Assets + 1 + + + Assets + 1 + + + + + Assets + 1 + + + Assets + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + + + + + + + + + + + + 12 + + + + + diff --git a/components/nicesidebar/packages/Delphi7/NiceSideBarD7.dof b/components/nicesidebar/packages/Delphi7/NiceSideBarD7.dof new file mode 100644 index 000000000..3402150f9 --- /dev/null +++ b/components/nicesidebar/packages/Delphi7/NiceSideBarD7.dof @@ -0,0 +1,142 @@ +[FileVersion] +Version=7.0 +[Compiler] +A=8 +B=0 +C=1 +D=1 +E=0 +F=0 +G=1 +H=1 +I=1 +J=0 +K=0 +L=1 +M=0 +N=1 +O=1 +P=1 +Q=0 +R=0 +S=0 +T=0 +U=0 +V=1 +W=0 +X=1 +Y=1 +Z=1 +ShowHints=1 +ShowWarnings=1 +UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; +NamespacePrefix= +SymbolDeprecated=1 +SymbolLibrary=1 +SymbolPlatform=1 +UnitLibrary=1 +UnitPlatform=1 +UnitDeprecated=1 +HResultCompat=1 +HidingMember=1 +HiddenVirtual=1 +Garbage=1 +BoundsError=1 +ZeroNilCompat=1 +StringConstTruncated=1 +ForLoopVarVarPar=1 +TypedConstVarPar=1 +AsgToTypedConst=1 +CaseLabelRange=1 +ForVariable=1 +ConstructingAbstract=1 +ComparisonFalse=1 +ComparisonTrue=1 +ComparingSignedUnsigned=1 +CombiningSignedUnsigned=1 +UnsupportedConstruct=1 +FileOpen=1 +FileOpenUnitSrc=1 +BadGlobalSymbol=1 +DuplicateConstructorDestructor=1 +InvalidDirective=1 +PackageNoLink=1 +PackageThreadVar=1 +ImplicitImport=1 +HPPEMITIgnored=1 +NoRetVal=1 +UseBeforeDef=1 +ForLoopVarUndef=1 +UnitNameMismatch=1 +NoCFGFileFound=1 +MessageDirective=1 +ImplicitVariants=1 +UnicodeToLocale=1 +LocaleToUnicode=1 +ImagebaseMultiple=1 +SuspiciousTypecast=1 +PrivatePropAccessor=1 +UnsafeType=0 +UnsafeCode=0 +UnsafeCast=0 +[Linker] +MapFile=0 +OutputObjs=0 +ConsoleApp=1 +DebugInfo=0 +RemoteSymbols=0 +MinStackSize=16384 +MaxStackSize=1048576 +ImageBase=4194304 +ExeDescription=priyatna.org - NiceSideBar +[Directories] +OutputDir= +UnitOutputDir= +PackageDLLOutputDir= +PackageDCPOutputDir= +SearchPath=..\..\source +Packages=vcl;rtl;dbrtl;vcldb;vclx;bdertl;vcldbx;ibxpress;dsnap;cds;bdecds;teeui;teedb;tee;dss;dsnapcrba;dsnapcon;VclSmp;vclie;xmlrtl;inet;inetdbbde;inetdbxpress;inetdb;webdsnap;websnap;dbexpress;dbxcds;Commons +Conditionals= +DebugSourceDirs= +UsePackages=0 +[Parameters] +RunParams= +HostApplication= +Launcher= +UseLauncher=0 +DebugCWD= +[Language] +ActiveLang= +ProjectLang= +RootDir=C:\PROGRAM FILES\BORLAND\DELPHI6\BIN\ +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=0 +MajorVer=2 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=2.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= +[HistoryLists\hlUnitAliases] +Count=1 +Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; +[HistoryLists\hlSearchPath] +Count=1 +Item0=..\..\source diff --git a/components/nicesidebar/packages/Delphi7/NiceSideBarD7.dpk b/components/nicesidebar/packages/Delphi7/NiceSideBarD7.dpk new file mode 100644 index 000000000..c810562cf --- /dev/null +++ b/components/nicesidebar/packages/Delphi7/NiceSideBarD7.dpk @@ -0,0 +1,37 @@ +package NiceSideBarD7; + +{$R *.res} +{$R 'NiceSideBar.dcr'} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$DESCRIPTION 'priyatna.org - NiceSideBar'} +{$IMPLICITBUILD OFF} + +requires + rtl, + DesignIDE; + +contains + NiceSideBarReg in '..\..\source\NiceSideBarReg.pas', + NiceSideBar in '..\..\source\NiceSideBar.pas'; + +end. diff --git a/components/nicesidebar/packages/Lazarus/nicesidebarlaz.lpk b/components/nicesidebar/packages/Lazarus/nicesidebarlaz.lpk new file mode 100644 index 000000000..ea25118a6 --- /dev/null +++ b/components/nicesidebar/packages/Lazarus/nicesidebarlaz.lpk @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/components/nicesidebar/packages/Lazarus/nicesidebarlaz.pas b/components/nicesidebar/packages/Lazarus/nicesidebarlaz.pas new file mode 100644 index 000000000..bd344898a --- /dev/null +++ b/components/nicesidebar/packages/Lazarus/nicesidebarlaz.pas @@ -0,0 +1,22 @@ +{ This file was automatically created by Lazarus. Do not edit! + This source is only used to compile and install the package. + } + +unit NiceSidebarLaz; + +{$warn 5023 off : no warning about unused units} +interface + +uses + NiceSideBar, NiceSideBarReg, LazarusPackageIntf; + +implementation + +procedure Register; +begin + RegisterUnit('NiceSideBarReg', @NiceSideBarReg.Register); +end; + +initialization + RegisterPackage('NiceSidebarLaz', @Register); +end. diff --git a/components/nicesidebar/source/NiceSideBar.dcr b/components/nicesidebar/source/NiceSideBar.dcr new file mode 100644 index 0000000000000000000000000000000000000000..687beb91a44ab831065a0f2dcde223b7d26164c0 GIT binary patch literal 1728 zcmb8uJ#y1P7zW^v48y=oij#S27SEWNr}lYlT(xW zGEETFmkBk?G+~?Qpb53eG@(|RCTuq~XtLknFoP!4B+-QJ<_ArvS*8iw!VH>Fi%b)0 zm1)AZh=V5kf)0z?gqmjcWx}@DgC^80(}e9o44P1jOcQFAX~Oo<22J({I8@(0p{7<} zB5V(L(1e<0ny@|iK@)0`X+o_sP0&ewnd~pj@X|D)rbT_3U@-M%Ld`NwP)L25P>W0x zYL#h%M)hT~zo5fQ+Ju@`^<{#K)t3o1%QV5j>dS;$WSUT`OcVU5FO&TbG45ABe*GyX zZy`<4S$&yMvrH2Vq`pk3MWzY0$}~YyL&}7^x_x4+yS@GTbi2JhwqIOxY(MRO{Zjw4 z&cdPp-;3>~_UFdAn51}|=f$aG``J(@{VmnwcGCV_|NkBT$^K`93x~RoGkG|Asr|We OE{cjTuEWJ8b@va8MZP5f literal 0 HcmV?d00001 diff --git a/components/nicesidebar/source/NiceSideBar.pas b/components/nicesidebar/source/NiceSideBar.pas new file mode 100644 index 000000000..bdf7fad27 --- /dev/null +++ b/components/nicesidebar/source/NiceSideBar.pas @@ -0,0 +1,2166 @@ +{------------------------------------------------------------------------------- + +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/ + +Software distributed under the License is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for +the specific language governing rights and limitations under the License. + + The Original Code is NiceSideBar.pas released at May 26th, 2007. + The Initial Developer of the Original Code is Priyatna. + (Website: http://www.priyatna.org Email: me@priyatna.org) + All Rights Reserved. + + Contributors: + - Carl Stuffer (cstuffer@hotmail.com), fixing some mouse hover bugs + +Alternatively, the contents of this file may be used under the terms of the +GNU General Public License Version 2 or later (the "GPL"), in which case +the provisions of the GPL are applicable instead of those above. +If you wish to allow use of your version of this file only under the terms +of the GPL and not to allow others to use your version of this file +under the MPL, indicate your decision by deleting the provisions above and +replace them with the notice and other provisions required by the GPL. +If you do not delete the provisions above, a recipient may use your version +of this file under either the MPL or the GPL. + +-------------------------------------------------------------------------------} + +unit NiceSideBar; + +{$IFDEF FPC} + {$MODE Delphi} +{$ENDIF} + +interface + +uses + Windows, Messages, Graphics, SysUtils, Controls, Classes, ImgList, Math, + ExtCtrls, Forms; + +const + clDefaultHover = $00AAFFFF; //clYellow; + clDefaultSelected = clBtnHighlight; + clDefaultHoverFont = clRed; + +type + TSideBarState = (ssNormal, ssHover, ssSelected, ssDisabled); + + TSideBarStates = set of TSideBarState; + + TSideBarAlign = (saLeft, saCenter, saRight); + + TSideBarBullet = (sbRound, sbRectangle, sbDiamond); + + TSideBarEvent = procedure (Sender: TObject; Index, SubIndex: Integer; + Caption: string) of object; + + TSideBarCustomDrawItem = procedure (Sender: TObject; ACanvas: TCanvas; + Rc: TRect; Str: string; States: TSideBarStates; ImageIndex: Integer) of object; + + TSideBarCustomDrawSubItem = procedure (Sender: TObject; ACanvas: TCanvas; + Rc: TRect; Str: string; States: TSideBarStates) of object; + + TSideBarCustomDrawNonItem = procedure (Sender: TObject; ACanvas: TCanvas; + Rc: TRect) of object; + + TSideBarCustomDrawScroller= procedure (Sender: TObject; ACanvas: TCanvas; + Rc: TRect; Up: Boolean; Hover: Boolean) of object; + + TNiceSideBar = class; + + TSideBarItem = class(TCollectionItem) + private + FCaption: string; + FImageIndex: TImageIndex; + FItems: TStringList; + FTag: Integer; + FExpanded: Boolean; + FStates: TList; + FVisible: Boolean; + FEnabled: Boolean; + function GetSideBar: TNiceSideBar; + procedure SetCaption(Value: string); + procedure SetImageIndex(Value: TImageIndex); + procedure SetItems(Value: TStringList); + procedure SetExpanded(const Value: Boolean); + procedure ItemsChange(Sender: TObject); + function GetItemEnabled(Index: Integer): Boolean; + function GetItemVisible(Index: Integer): Boolean; + procedure SetEnabled(const Value: Boolean); + procedure SetItemEnabled(Index: Integer; const Value: Boolean); + procedure SetItemVisible(Index: Integer; const Value: Boolean); + procedure SetVisible(const Value: Boolean); + public + constructor Create(Collection: TCollection); override; + destructor Destroy; override; + procedure Assign(Source: TPersistent); override; + function GetDisplayName: string; override; + procedure Expand; + procedure Collapse; + property ItemEnabled[Index: Integer]: Boolean read GetItemEnabled write SetItemEnabled; + property ItemVisible[Index: Integer]: Boolean read GetItemVisible write SetItemVisible; + published + property SideBar: TNiceSideBar read GetSideBar; + property Caption: string read FCaption write SetCaption; + property ImageIndex: TImageIndex read FImageIndex write SetImageIndex default -1; + property Items: TStringList read FItems write SetItems; + property Tag: Integer read FTag write FTag default 0; + property Expanded: Boolean read FExpanded write SetExpanded default True; + property Enabled: Boolean read FEnabled write SetEnabled default True; + property Visible: Boolean read FVisible write SetVisible default True; + end; + + TSideBarItems = class(TCollection) + private + FSideBar: TNiceSideBar; + function GetItem(Index: Integer): TSideBarItem; + procedure SetItem(Index: Integer; Value: TSideBarItem); + protected + function GetOwner: TPersistent; override; + procedure Update(Item: TCollectionItem); override; + public + constructor Create(ASideBar: TNiceSideBar); + property SideBar: TNiceSideBar read FSideBar; + property Items[Index: Integer]: TSideBarItem read GetItem write SetItem; default; + function Add: TSideBarItem; + function AddItem(Item: TSideBarItem; Index: Integer): TSideBarItem; + function Insert(Index: Integer): TSideBarItem; + end; + + TSideBarItemStyle = class(TPersistent) + private + FSideBar: TNiceSideBar; + FSelectedColor: TColor; + FHoverColor: TColor; + FNormalColor: TColor; + FSelectedFont: TFont; + FDisabledFont: TFont; + FHoverFont: TFont; + FNormalFont: TFont; + FLineColor: TColor; + procedure FontChange(Sender: TObject); + procedure SetHoverFont(const Value: TFont); + procedure SetNormalColor(const Value: TColor); + procedure SetNormalFont(const Value: TFont); + procedure SetSelectedColor(const Value: TColor); + procedure SetSelectedFont(const Value: TFont); + procedure SetLineColor(const Value: TColor); + procedure Deactivate; + procedure SetDisabledFont(const Value: TFont); + protected + procedure AssignTo(Dest: TPersistent); override; + public + constructor Create(SideBar: TNiceSideBar); + destructor Destroy; override; + procedure Activate; + published + property NormalFont: TFont read FNormalFont write SetNormalFont; + property HoverFont: TFont read FHoverFont write SetHoverFont; + property SelectedFont: TFont read FSelectedFont write SetSelectedFont; + property DisabledFont: TFont read FDisabledFont write SetDisabledFont; + property NormalColor: TColor read FNormalColor write SetNormalColor default clBtnFace; + property HoverColor: TColor read FHoverColor write FHoverColor default clDefaultHover; + property SelectedColor: TColor read FSelectedColor write SetSelectedColor default clDefaultSelected; + property LineColor: TColor read FLineColor write SetLineColor default clWindowText; + end; + + TSideBarBulletStyle = class(TPersistent) + private + FSideBar: TNiceSideBar; + FHoverColor: TColor; + FSelectedPenColor: TColor; + FNormalColor: TColor; + FHoverPenColor: TColor; + FNormalPenColor: TColor; + FSelectedColor: TColor; + FVisible: Boolean; + FKind: TSideBarBullet; + FSize: Integer; + FDisabledPenColor: TColor; + FDisabledColor: TColor; + procedure SetNormalColor(const Value: TColor); + procedure SetNormalPenColor(const Value: TColor); + procedure SetSelectedColor(const Value: TColor); + procedure SetSelectedPenColor(const Value: TColor); + procedure SetKind(const Value: TSideBarBullet); + procedure SetVisible(const Value: Boolean); + procedure SetSize(const Value: Integer); + procedure SetDisabledColor(const Value: TColor); + procedure SetDisabledPenColor(const Value: TColor); + protected + procedure AssignTo(Dest: TPersistent); override; + public + constructor Create(SideBar: TNiceSideBar); + published + property Visible: Boolean read FVisible write SetVisible default True; + property Size: Integer read FSize write SetSize default 5; + property Kind: TSideBarBullet read FKind write SetKind default sbRound; + property NormalColor: TColor read FNormalColor write SetNormalColor default clWindowText; + property HoverColor: TColor read FHoverColor write FHoverColor default clDefaultHoverFont; + property SelectedColor: TColor read FSelectedColor write SetSelectedColor default clWindowText; + property DisabledColor: TColor read FDisabledColor write SetDisabledColor default clGrayText; + property NormalPenColor: TColor read FNormalPenColor write SetNormalPenColor default clWindowText; + property HoverPenColor: TColor read FHoverPenColor write FHoverPenColor default clDefaultHoverFont; + property SelectedPenColor: TColor read FSelectedPenColor write SetSelectedPenColor default clWindowText; + property DisabledPenColor: TColor read FDisabledPenColor write SetDisabledPenColor default clGrayText; + end; + + TSideBarScrollerStyle = class(TPersistent) + private + FSideBar: TNiceSideBar; + FHoverColor: TColor; + FNormalArrowColor: TColor; + FNormalColor: TColor; + FHoverArrowColor: TColor; + procedure SetNormalArrowColor(const Value: TColor); + procedure SetNormalColor(const Value: TColor); + protected + procedure AssignTo(Dest: TPersistent); override; + public + constructor Create(SideBar: TNiceSideBar); + published + property NormalColor: TColor read FNormalColor write SetNormalColor default clBlack; + property HoverColor: TColor read FHoverColor write FHoverColor default clWhite; + property NormalArrowColor: TColor read FNormalArrowColor write SetNormalArrowColor default clWhite; + property HoverArrowColor: TColor read FHoverArrowColor write FHoverArrowColor default clBlack; + end; + + TNiceSideBar = class(TCustomPanel) + private + FList: TList; + FItems: TSideBarItems; + FAlignment: TSideBarAlign; + FHandPointCursor: Boolean; + FItemIndex: Integer; + FSubItemIndex: Integer; + FItemHeight: Integer; + FSubItemHeight: Integer; + FImages: TImageList; + FHoverImages: TImageList; + FSelectedImages: TImageList; + FDisabledImages: TImageList; + FOnHover: TSideBarEvent; + FOnSelect: TSideBarEvent; + FOnCustomDrawItem: TSideBarCustomDrawItem; + FOnCustomDrawSubItem: TSideBarCustomDrawSubItem; + FOnCustomDrawNonItem: TSideBarCustomDrawNonItem; + FOnCustomDrawScroller: TSideBarCustomDrawScroller; + TopIndex, BottomIndex: Integer; + DeltaY: Integer; + LastIndex: Integer; + LastSubIndex: Integer; + LastHover, HoverIndex: Integer; + ScTop, ScBottom: TRect; + ScTopVisible, ScBottomVisible: Boolean; + FMargin: Integer; + FGroupSeparator: Integer; + IsUpdating: Boolean; + FIndent: Integer; + FAlwaysExpand: Boolean; + FItemStyle: TSideBarItemStyle; + FSubItemStyle: TSideBarItemStyle; + FBullets: TSideBarBulletStyle; + FScrollers: TSideBarScrollerStyle; + procedure CMColorChanged(var Msg: TMessage); message CM_COLORCHANGED; + procedure CMMouseLeave(var Msg: TMessage); message CM_MOUSELEAVE; + procedure WMEraseBkgnd(var Msg: TMessage); message WM_ERASEBKGND; + procedure WMSize(var Msg: TWMSize); message WM_SIZE; + procedure WMMouseWheel(var Msg: TWMMouseWheel); message WM_MOUSEWHEEL; + procedure SetItems(Value: TSideBarItems); + procedure SetItemIndex(Value: Integer); + procedure SetSubItemIndex(Value: Integer); + procedure SetItemHeight(Value: Integer); + procedure SetAlignment(Value: TSideBarAlign); + procedure SetSubItemHeight(Value: Integer); + procedure SetImages(Value: TImageList); + procedure SetHoverImages(Value: TImageList); + procedure SetSelectedImages(Value: TImageList); + procedure SetDisabledImages(Value: TImageList); + procedure SetHandPointCursor(Value: Boolean); + procedure ClearList; + procedure ListChange(RebuildItems: Boolean); + procedure DoDrawItem(Index: Integer); + function GetIndexAtPos(X, Y: Integer): Integer; + function CreateItem: TSideBarItem; + procedure UpdateItem(Index: Integer); + procedure UpdateItems; + procedure SetMargin(const Value: Integer); + procedure SetGroupSeparator(const Value: Integer); + procedure SetIndent(const Value: Integer); + procedure SetAlwaysExpand(const Value: Boolean); + procedure SetItemStyle(const Value: TSideBarItemStyle); + procedure SetSubItemStyle(const Value: TSideBarItemStyle); + procedure SetBullets(const Value: TSideBarBulletStyle); + procedure SetScrollers(const Value: TSideBarScrollerStyle); + procedure CMWantSpecialKey(var Message: TWMKey); message CM_WANTSPECIALKEY; + protected + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; + procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; + procedure Paint; override; + procedure DrawItem(ACanvas: TCanvas; Rc: TRect; Str: string; States: TSideBarStates; + ImageIndex: Integer); virtual; + procedure DrawSubItem(ACanvas: TCanvas; Rc: TRect; Str: string; States: TSideBarStates); virtual; + procedure DrawNonItem(ACanvas: TCanvas; Rc: TRect); virtual; + procedure DrawScroller(ACanvas: TCanvas; Rc: TRect; Up: Boolean; Hover: Boolean); virtual; + procedure KeyDown(var Key: Word; Shift: TShiftState); override; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure BeginUpdate; + procedure EndUpdate; + published + property ItemStyle: TSideBarItemStyle read FItemStyle write SetItemStyle; + property SubItemStyle: TSideBarItemStyle read FSubItemStyle write SetSubItemStyle; + property Bullets: TSideBarBulletStyle read FBullets write SetBullets; + property Scrollers: TSideBarScrollerStyle read FScrollers write SetScrollers; + property Items: TSideBarItems read FItems write SetItems; + property ItemIndex: Integer read FItemIndex write SetItemIndex default -1; + property SubItemIndex: Integer read FSubItemIndex write SetSubItemIndex default -1; + property ItemHeight: Integer read FItemHeight write SetItemHeight default 30; + property SubItemHeight: Integer read FSubItemHeight write SetSubItemHeight default 18; + property Alignment: TSideBarAlign read FAlignment write SetAlignment default saLeft; + property Margin: Integer read FMargin write SetMargin default 8; + property GroupSeparator: Integer read FGroupSeparator write SetGroupSeparator default 10; + property Indent: Integer read FIndent write SetIndent default 10; + property AlwaysExpand: Boolean read FAlwaysExpand write SetAlwaysExpand; + property Images: TImageList read FImages write SetImages; + property HoverImages: TImageList read FHoverImages write SetHoverImages; + property SelectedImages: TImageList read FSelectedImages write SetSelectedImages; + property DisabledImages: TImageList read FDisabledImages write SetDisabledImages; + property HandPointCursor: Boolean read FHandPointCursor write SetHandPointCursor default False; + property OnHover: TSideBarEvent read FOnHover write FOnHover; + property OnSelect: TSideBarEvent read FOnSelect write FOnSelect; + property OnCustomDrawItem: TSideBarCustomDrawItem read FOnCustomDrawItem write FOnCustomDrawItem; + property OnCustomDrawSubItem: TSideBarCustomDrawSubItem read FOnCustomDrawSubItem write FOnCustomDrawSubItem; + property OnCustomDrawNonItem: TSideBarCustomDrawNonItem read FOnCustomDrawNonItem write FOnCustomDrawNonItem; + property OnCustomDrawScroller: TSideBarCustomDrawScroller read FOnCustomDrawScroller write FOnCustomDrawScroller; + property Anchors; + property BevelInner; + property BevelOuter; + {$IFDEF FPC} + property BorderSpacing; + {$ELSE} + property BevelKind; + {$ENDIF} + property BorderStyle default bsSingle; + property ParentBackground; + property ParentColor; + property Color; + property Align default alLeft; + property TabStop; + property TabOrder; + end; + + +implementation + +type + TSBInfo = record + ItemIndex: Integer; + SubIndex: Integer; + Level: Integer; + Rc: TRect; + Disabled: Boolean; + Caption: string; + end; + PSBInfo = ^TSBInfo; + +const + SCTOPINDEX = MaxInt; + SCBOTTOMINDEX = MaxInt-1; + + SBITEM_STATE_DISABLED = $00000001; + SBITEM_STATE_HIDDEN = $00000004; + + +{ TSideBarItem } + +constructor TSideBarItem.Create(Collection: TCollection); +begin + FItems := TStringList.Create; + FItems.OnChange := ItemsChange; + FStates := TList.Create; + FImageIndex := -1; + FExpanded := True; + FEnabled := True; + FVisible := True; + FTag := 0; + inherited Create(Collection); +end; + +destructor TSideBarItem.Destroy; +begin + inherited Destroy; + FItems.Free; + FStates.Free; +end; + +procedure TSideBarItem.Assign(Source: TPersistent); +begin + if (Source is TSideBarItem) then + begin + FCaption := TSideBarItem(Source).Caption; + FImageIndex := TSideBarItem(Source).ImageIndex; + FTag := TSideBarItem(Source).Tag; + FExpanded := TSideBarItem(Source).Expanded; + FItems.Assign(TSideBarItem(Source).Items); + FStates.Assign(TSideBarItem(Source).FStates); + Changed(True); + end; +end; + +procedure TSideBarItem.ItemsChange(Sender: TObject); +begin + if (FItems.Count = 0) + then FStates.Clear; + Changed(True); +end; + +function TSideBarItem.GetSideBar: TNiceSideBar; +begin + Result := TSideBarItems(Collection).FSideBar; +end; + +function TSideBarItem.GetDisplayName: string; +begin + if (FCaption <> '') + then Result := FCaption + else Result := inherited GetDisplayName; +end; + +procedure TSideBarItem.SetCaption(Value: string); +begin + if (FCaption <> Value) then + begin + FCaption := Value; + Changed(True); + end; +end; + +procedure TSideBarItem.SetImageIndex(Value: TImageIndex); +begin + if (FImageIndex <> Value) then + begin + FImageIndex := Value; + Changed(False); + end; +end; + +procedure TSideBarItem.SetItems(Value: TStringList); +begin + FItems.Assign(Value); + Changed(GetSideBar.ItemIndex = Index); +end; + +procedure TSideBarItem.Collapse; +begin + SetExpanded(False); +end; + +procedure TSideBarItem.Expand; +begin + SetExpanded(True); +end; + +procedure TSideBarItem.SetExpanded(const Value: Boolean); +begin + if (FExpanded <> Value) then + begin + FExpanded := Value; + Changed(True); + end; +end; + +function TSideBarItem.GetItemEnabled(Index: Integer): Boolean; +begin + Result := True; + if (FStates.Count > Index) + then Result := (Integer(FStates[Index]) and SBITEM_STATE_DISABLED) = 0; +end; + +procedure TSideBarItem.SetItemEnabled(Index: Integer; const Value: Boolean); +var + State: Integer; +begin + while (FStates.Count <= Index) + do FStates.Add(nil); + State := Integer(FStates[Index]); + if Value + then State := State and not SBITEM_STATE_DISABLED + else State := State or SBITEM_STATE_DISABLED; + FStates[Index] := Pointer(State); + Changed(True); +end; + +function TSideBarItem.GetItemVisible(Index: Integer): Boolean; +begin + Result := True; + if (FStates.Count > Index) + then Result := (Integer(FStates[Index]) and SBITEM_STATE_HIDDEN) = 0; +end; + +procedure TSideBarItem.SetItemVisible(Index: Integer; const Value: Boolean); +var + State: Integer; +begin + while (FStates.Count <= Index) + do FStates.Add(nil); + State := Integer(FStates[Index]); + if Value + then State := State and not SBITEM_STATE_HIDDEN + else State := State or SBITEM_STATE_HIDDEN; + FStates[Index] := Pointer(State); + if (not Value) and (SideBar.FItemIndex = Self.Index) and (SideBar.FSubItemIndex = Index) then + begin + SideBar.FSubItemIndex := -1; + SideBar.LastSubIndex := -1; + SideBar.LastHover := -1; + SideBar.HoverIndex := -1; + end; + Changed(True); +end; + +procedure TSideBarItem.SetEnabled(const Value: Boolean); +begin + if (FEnabled <> Value) then + begin + FEnabled := Value; + Changed(True); + end; +end; + +procedure TSideBarItem.SetVisible(const Value: Boolean); +begin + if (FVisible <> Value) then + begin + FVisible := Value; + if (not FVisible) and (SideBar.FItemIndex = Self.Index) then + begin + SideBar.LastIndex := -1; + SideBar.LastSubIndex := -1; + SideBar.LastHover := -1; + SideBar.HoverIndex := -1; + SideBar.FItemIndex := -1; + SideBar.FSubItemIndex := -1; + end; + Changed(True); + end; +end; + +{ TSideBarItems } + +constructor TSideBarItems.Create(ASideBar: TNiceSideBar); +begin + inherited Create(TSideBarItem); + FSideBar := ASideBar; +end; + +function TSideBarItems.Add: TSideBarItem; +begin + Result := TSideBarItem(inherited Add); +end; + +function TSideBarItems.AddItem(Item: TSideBarItem; + Index: Integer): TSideBarItem; +begin + if (Item = nil) + then Result := FSideBar.CreateItem + else + begin + Result := Item; + if Assigned(Item) then + begin + Result.Collection := Self; + if (Index < 0) + then Index := Count - 1; + Result.Index := Index; + end; + end; +end; + +function TSideBarItems.GetItem(Index: Integer): TSideBarItem; +begin + Result := TSideBarItem(inherited GetItem(Index)); +end; + +function TSideBarItems.GetOwner: TPersistent; +begin + Result := FSideBar; +end; + +function TSideBarItems.Insert(Index: Integer): TSideBarItem; +begin + Result := AddItem(nil, Index); +end; + +procedure TSideBarItems.SetItem(Index: Integer; Value: TSideBarItem); +begin + inherited SetItem(Index, Value); +end; + +procedure TSideBarItems.Update(Item: TCollectionItem); +begin + if (Count = 0) then + begin + FSideBar.LastIndex := -1; + FSideBar.LastSubIndex := -1; + FSideBar.LastHover := -1; + end; + if (Item <> nil) + then FSideBar.UpdateItem(Item.Index) + else FSideBar.UpdateItems; +end; + + +{ TNiceSidebar } + +constructor TNiceSidebar.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + + IsUpdating := True; + Width := 200; + Align := alLeft; + Color := clBtnFace; + BorderStyle := bsSingle; + ParentBackground := False; + ParentColor := False; + ParentFont := False; + TabStop := True; + + LastIndex := -1; + LastSubIndex := -1; + LastHover := -1; + HoverIndex := -1; + ScTop := Rect(0, 0, 0, 0); + ScBottom := Rect(0, 0, 0, 0); + ScTopVisible := False; + ScBottomVisible := False; + TopIndex := 0; + BottomIndex := -1; + DeltaY := 0; + + FItemIndex := -1; + FSubItemIndex := -1; + FItemHeight := 30; + FSubItemHeight := 18; + FAlignment := saLeft; + FHandPointCursor := False; + FMargin := 8; + FGroupSeparator := 10; + FIndent := 10; + FAlwaysExpand := True; + + FItemStyle := TSideBarItemStyle.Create(Self); + FItemStyle.FNormalFont.Style := [fsBold]; + FItemStyle.FHoverFont.Style := [fsBold]; + FItemStyle.FSelectedFont.Style := [fsBold]; + FItemStyle.FDisabledFont.Style := [fsBold]; + FItemStyle.Activate; + + FSubItemStyle := TSideBarItemStyle.Create(Self); + FSubItemStyle.Activate; + + FBullets := TSideBarBulletStyle.Create(Self); + FScrollers := TSideBarScrollerStyle.Create(Self); + + FList := TList.Create; + FItems := TSideBarItems.Create(Self); + + IsUpdating := False; +end; + +destructor TNiceSidebar.Destroy; +begin + FItems.Free; + ClearList; + FList.Free; + FScrollers.Free; + FBullets.Free; + FSubItemStyle.Free; + FItemStyle.Free; + inherited Destroy; +end; + +procedure TNiceSidebar.MouseDown(Button: TMouseButton; Shift: TShiftState; + X, Y: Integer); +var + i: Integer; + P: PSBInfo; + Str: string; + Changed: Boolean; + +begin + + Windows.SetFocus(Handle); + + if ScTopVisible then + begin + if PtInRect(ScTop, Point(X, Y)) then + begin + TopIndex := TopIndex - 1; + ListChange(False); + Invalidate; + Exit; + end; + end; + + if ScBottomVisible then + begin + if PtInRect(ScBottom, Point(X, Y)) then + begin + TopIndex := TopIndex + 1; + ListChange(False); + Invalidate; + Exit; + end; + end; + + i := GetIndexAtPos(X, Y); + if (i = -1) then + begin + inherited; + Exit; + end; + + P := PSBInfo(FList[i]); + if (P^.Level = 0) and FAlwaysExpand then + begin + inherited; + Exit; + end; + if P^.Disabled then + begin + inherited; + Exit; + end; + + Changed := True; + Str := P^.Caption; + if (P^.ItemIndex = FItemIndex) then + begin + // on header + if (P^.SubIndex = -1) and not FAlwaysExpand then + begin + FSubItemIndex := -1; + FItems[P^.ItemIndex].Expanded := not FItems[P^.ItemIndex].Expanded; + LastSubIndex := -1; + end else + // on sub items + begin + Changed := P^.SubIndex <> FSubItemIndex; + if Changed then + begin + FItemIndex := P^.ItemIndex; + FSubItemIndex := P^.SubIndex; + DoDrawItem(LastSubIndex); + DoDrawItem(i); + LastSubIndex := i; + end; + end; + end else + begin + FItemIndex := P^.ItemIndex; + FSubItemIndex := P^.SubIndex; + // on header + if (FSubItemIndex = -1) then + begin + if FItems[FItemIndex].FExpanded then + begin + DoDrawItem(LastIndex); + DoDrawItem(LastSubIndex); + DoDrawItem(i); + LastIndex := i; + LastSubIndex := -1; + end else + begin + LastIndex := i; + LastSubIndex := -1; + FItems[FItemIndex].FExpanded := True; + ListChange(True); + Invalidate; + end; + end else + // on sub items + begin + DoDrawItem(LastIndex); + DoDrawItem(LastSubIndex); + DoDrawItem(i); + DoDrawItem(i - FSubItemIndex - 1); + LastSubIndex := i; + LastIndex := i - FSubItemIndex - 1; + end; + end; + if Changed then + begin + if Assigned(FOnSelect) + then FOnSelect(Self, FItemIndex, FSubItemIndex, Str); + end; + inherited; +end; + +procedure TNiceSidebar.MouseMove(Shift: TShiftState; X, Y: Integer); +var + i: Integer; + P: PSBInfo; +begin + + if ScTopVisible then + begin + if PtInRect(ScTop, Point(X, Y)) then + begin + if (HoverIndex <> SCTOPINDEX) then + begin + HoverIndex := SCTOPINDEX; + DoDrawItem(LastHover); + DoDrawItem(HoverIndex); + LastHover := SCTOPINDEX; + end; + Exit; + end; + end; + + if ScBottomVisible then + begin + if PtInRect(ScBottom, Point(X, Y)) then + begin + if (HoverIndex <> SCBOTTOMINDEX) then + begin + HoverIndex := SCBOTTOMINDEX; + DoDrawItem(LastHover); + DoDrawItem(HoverIndex); + LastHover := SCBOTTOMINDEX; + end; + Exit; + end; + end; + + i := GetIndexAtPos(X, Y); + + if (i > -1) then + begin + P := PSBInfo(FList[i]); + if (P^.Level = 0) and FAlwaysExpand + then i := -1; + end; + + if FHandPointCursor then + begin + if (i = -1) + then Cursor := crDefault + else Cursor := crHandPoint; + end; + + if (i <> HoverIndex) then + begin + HoverIndex := i; + if (LastHover >= 0) and (LastHover < FList.Count) + then DoDrawItem(LastHover); + if (HoverIndex > -1) then + begin + DoDrawItem(HoverIndex); + P := PSBInfo(FList[i]); + if Assigned(FOnHover) + then FOnHover(Self, P^.ItemIndex, P^.SubIndex, P^.Caption); + end; + LastHover := HoverIndex; + end; + + inherited; + +end; + +procedure TNiceSideBar.CMMouseLeave(var Msg: TMessage); +begin + if (HoverIndex <> -1) then + begin + HoverIndex := -1; + if (LastHover >= 0) and (LastHover < FList.Count) + then DoDrawItem(LastHover); + LastHover := -1; + end; + if Assigned(FOnHover) + then FOnHover(Self, -1, -1, ''); +end; + +procedure TNiceSideBar.ClearList; +var + x: Integer; +begin + for x := 0 to FList.Count-1 + do Dispose(PSBInfo(FList[x])); + FList.Clear; +end; + +procedure TNiceSideBar.ListChange(RebuildItems: Boolean); +var + P: PSBInfo; + x, y, v: Integer; + Item: TSideBarItem; +begin + if IsUpdating + then Exit; + DeltaY := 0; + BottomIndex := -1; + ScTopVisible := False; + ScBottomVisible := False; + if RebuildItems then + begin + ClearList; + v := 0; + for x := 0 to FItems.Count-1 do + begin + Item := FItems[x]; + if not Item.FVisible + then Continue; + P := New(PSBInfo); + P^.Caption := Item.FCaption; + P^.ItemIndex := x; + P^.SubIndex := -1; + P^.Level := 0; + P^.Rc := Rect(FMargin, v, Width - FMargin, v + FItemHeight + FGroupSeparator); + P^.Disabled := not Item.FEnabled; + FList.Add(P); + Inc(v, FItemHeight + 1 + FGroupSeparator); + if Item.FExpanded then + begin + for y := 0 to Item.FItems.Count-1 do + begin + if not Item.GetItemVisible(y) + then Continue; + P := New(PSBInfo); + P^.Caption := Item.FItems[y]; + P^.Level := 1; + P^.ItemIndex := x; + P^.SubIndex := y; + P^.Rc := Rect(FMargin, v, Width - FMargin, v + FSubItemHeight); + P^.Disabled := not Item.GetItemEnabled(y); + FList.Add(P); + Inc(v, FSubItemHeight+1); + end; + end; + end; + end; + if (FList.Count > 0) then + begin + ScTopVisible := TopIndex > 0; + DeltaY := PSBInfo(FList[TopIndex])^.Rc.Top; + for x := TopIndex to FList.Count-1 do + begin + P := PSBInfo(FList[x]); + v := P^.Rc.Bottom - DeltaY; + if (v > ClientHeight) then + begin + BottomIndex := x; + ScBottomVisible := True; + Break; + end; + end; + if (BottomIndex = -1) then + begin + BottomIndex := FList.Count-1; + ScBottomVisible := False; + end; + if (FAlignment = saRight) then + begin + ScTop := Rect(FMargin + 10, 10, FMargin + 21, 21); + ScBottom := Rect(FMargin + 10, ClientHeight - 21, FMargin + 21, ClientHeight - 10); + end else + begin + ScTop := Rect(ClientWidth - FMargin - 21, 10, ClientWidth - FMargin - 10, 21); + ScBottom := Rect(ClientWidth - FMargin - 21, ClientHeight - 21, ClientWidth - FMargin - 10, ClientHeight - 10); + end; + end; +end; + +procedure TNiceSideBar.DoDrawItem(Index: Integer); +var + Info: PSBInfo; + States: TSideBarStates; + Rc, Tmp: TRect; + +begin + + if (Index = SCTOPINDEX) then + begin + if ScTopVisible then + begin + if Assigned(FOnCustomDrawScroller) + then FOnCustomDrawScroller(Self, Canvas, ScTop, True, HoverIndex = SCTOPINDEX) + else DrawScroller(Canvas, ScTop, True, HoverIndex = SCTOPINDEX); + end; + Exit; + end; + + if (Index = SCBOTTOMINDEX) then + begin + if ScBottomVisible then + begin + if Assigned(FOnCustomDrawScroller) + then FOnCustomDrawScroller(Self, Canvas, ScBottom, False, HoverIndex = SCBOTTOMINDEX) + else DrawScroller(Canvas, ScBottom, False, HoverIndex = SCBOTTOMINDEX); + end; + Exit; + end; + + if (Index < 0) + then Exit; + + Info := PSBInfo(FList[Index]); + CopyRect(Rc, Info^.Rc); + OffsetRect(Rc, 0, -DeltaY); + + if (Index = HoverIndex) + then States := [ssHover] + else States := [ssNormal]; + if (Info^.Level = 1) then + begin + if (Info^.SubIndex = FSubItemIndex) and (Info^.ItemIndex = FItemIndex) + then Include(States, ssSelected); + end else + begin + if (Info^.ItemIndex = FItemIndex) + then Include(States, ssSelected); + end; + if Info^.Disabled + then Include(States, ssDisabled); + + if (Info^.Level = 1) then + begin + if Assigned(FOnCustomDrawSubItem) + then FOnCustomDrawSubItem(Self, Canvas, Rc, Info^.Caption, States) + else DrawSubItem(Canvas, Rc, Info^.Caption, States); + end else + begin + if Assigned(FOnCustomDrawItem) + then FOnCustomDrawItem(Self, Canvas, Rc, Info^.Caption, States, FItems[Info^.ItemIndex].FImageIndex) + else DrawItem(Canvas, Rc, Info^.Caption, States, FItems[Info^.ItemIndex].FImageIndex); + end; + + if IntersectRect(Tmp, Rc, ScTop) and ScTopVisible then + begin + if Assigned(FOnCustomDrawScroller) + then FOnCustomdrawScroller(Self, Canvas, ScTop, True, HoverIndex = SCTOPINDEX) + else DrawScroller(Canvas, ScTop, True, HoverIndex = SCTOPINDEX); + end; + + if IntersectRect(Tmp, Rc, ScBottom) and ScBottomVisible then + begin + if Assigned(FOnCustomDrawScroller) + then FOnCustomDrawScroller(Self, Canvas, ScBottom, False, HoverIndex = SCBOTTOMINDEX) + else DrawScroller(Canvas, ScBottom, False, HoverIndex = SCBOTTOMINDEX); + end; + +end; + +procedure TNiceSideBar.DrawItem(ACanvas: TCanvas; Rc: TRect; Str: string; + States: TSideBarStates; ImageIndex: Integer); +var + w, h, x, y: Integer; + Img: TImageList; + RcItem: TRect; +begin + CopyRect(RcItem, Rc); + with ACanvas do + begin + Brush.Style := bsSolid; + Brush.Color := Color; + FillRect(Rect(RcItem.Left, RcItem.Top, RcItem.Right, RcItem.Top + FGroupSeparator)); + RcItem.Top := RcItem.Top + FGroupSeparator; + + if (ssDisabled in States) then + begin + Brush.Color := FItemStyle.FNormalColor; + Font.Assign(FItemStyle.FDisabledFont); + end else + if (ssNormal in States) then + begin + if (ssSelected in States) then + begin + Brush.Color := FItemStyle.FSelectedColor; + Font.Assign(FItemStyle.FSelectedFont); + end else + begin + Brush.Color := FItemStyle.FNormalColor; + Font.Assign(FItemStyle.FNormalFont); + end; + end else + if (ssHover in States) then + begin + if (ssSelected in States) + then Brush.Color := FItemStyle.FSelectedColor + else Brush.Color := FItemStyle.FHoverColor; + Font.Assign(FItemStyle.FHoverFont); + end; + + FillRect(RcItem); + Brush.Style := bsClear; + Pen.Color := FItemStyle.FLineColor; + MoveTo(RcItem.Left, RcItem.Bottom); + LineTo(RcItem.Right, RcItem.Bottom); + MoveTo(RcItem.Left, RcItem.Bottom-1); + LineTo(RcItem.Right, RcItem.Bottom-1); + + InflateRect(RcItem, -8, 0); + + Img := nil; + if (ssDisabled in States) then + begin + if Assigned(FDisabledImages) + then Img := FDisabledImages else + if Assigned(FImages) + then Img := FImages; + end else + if (ssSelected in States) then + begin + if Assigned(FSelectedImages) + then Img := FSelectedImages else + if Assigned(FImages) + then Img := FImages; + end else + if (ssNormal in States) then + begin + if Assigned(FImages) + then Img := FImages; + end else + if (ssHover in States) then + begin + if Assigned(FHoverImages) + then Img := FHoverImages else + if Assigned(FImages) + then Img := FImages; + end; + + w := TextWidth(Str); + h := TextHeight('Ag'); + x := 0; + + if Assigned(Img) and (ImageIndex > -1) + then w := w + Img.Width + FIndent; + + case FAlignment of + saLeft: x := RcItem.Left; + saCenter: x := RcItem.Left + (((RcItem.Right - RcItem.Left) - w) div 2); + saRight: x := RcItem.Right - w; + end; + + if Assigned(Img) then + begin + if (ImageIndex > -1) then + begin + y := RcItem.Top + ((FItemHeight - Img.Height) div 2); + if (FAlignment <> saRight) then + begin + Img.Draw(ACanvas, x, y, ImageIndex, dsTransparent, itImage); + Inc(x, Img.Width + FIndent); + end else + Img.Draw(ACanvas, RcItem.Right - Img.Width, y, ImageIndex, dsTransparent, itImage); + end; + end; + + y := RcItem.Top + (((RcItem.Bottom - RcItem.Top) - h) div 2); + TextRect(RcItem, x, y, Str); + + end; + +end; + +procedure TNiceSideBar.DrawSubItem(ACanvas: TCanvas; Rc: TRect; + Str: string; States: TSideBarStates); +const + Separator = 7; +var + RcItem, Rc2: TRect; + x, y, w, h, i: Integer; + Old: TColor; +begin + CopyRect(RcItem, Rc); + CopyRect(Rc2, Rc); + Rc2.Bottom := Rc2.Bottom + 1; + case FAlignment of + saLeft: + begin + Rc2.Right := Rc2.Left + FIndent; + RcItem.Left := Rc2.Right; + end; + saCenter: ; + saRight: + begin + Rc2.Left := Rc2.Right - FIndent; + RcItem.Right := Rc2.Left; + end; + end; + with ACanvas do + begin + Brush.Style := bsSolid; + if (FAlignment <> saCenter) then + begin + Brush.Color := Color; + FillRect(Rc2); + end; + + if (ssDisabled in States) then + begin + Brush.Color := FSubItemStyle.FNormalColor; + Font.Assign(FSubItemStyle.FDisabledFont); + end else + if (ssNormal in States) then + begin + if (ssSelected in States) then + begin + Brush.Color := FSubItemStyle.FSelectedColor; + Font.Assign(FSubItemStyle.FSelectedFont); + end else + begin + Brush.Color := FSubItemStyle.FNormalColor; + Font.Assign(FSubItemStyle.FNormalFont); + end; + end else + if (ssHover in States) then + begin + if (ssSelected in States) + then Brush.Color := FSubItemStyle.FSelectedColor + else Brush.Color := FSubItemStyle.FHoverColor; + Font.Assign(FSubItemStyle.FHoverFont); + end; + + FillRect(RcItem); + Brush.Style := bsClear; + Pen.Color := FSubItemStyle.FLineColor; + MoveTo(RcItem.Left, RcItem.Bottom); + LineTo(RcItem.Right, RcItem.Bottom); + InflateRect(RcItem, -8, 0); + + w := TextWidth(Str); + h := TextHeight('Ag'); + x := 0; + + if FBullets.Visible + then w := w + FBullets.Size + Separator; + + case FAlignment of + saLeft: x := RcItem.Left; + saCenter: x := RcItem.Left + (((RcItem.Right - RcItem.Left) - w) div 2); + saRight: x := RcItem.Right - w; + end; + + if FBullets.Visible then + begin + y := RcItem.Top + ((FSubItemHeight - FBullets.Size) div 2); + if (FAlignment <> saRight) then + begin + Rc2 := Rect(x, y, x + FBullets.Size, y + FBullets.Size); + Inc(x, FBullets.Size + Separator); + end else + begin + i := RcItem.Right - FBullets.Size; + Rc2 := Rect(i, y, i + FBullets.Size, y + FBullets.Size); + end; + + Old := Pen.Color; + Brush.Style := bsSolid; + + if (ssDisabled in States) then + begin + Brush.Color := FBullets.FDisabledColor; + Pen.Color := FBullets.FDisabledPenColor; + end else + if (ssHover in States) then + begin + Brush.Color := FBullets.FHoverColor; + Pen.Color := FBullets.FHoverPenColor; + end else + if (ssSelected in States) then + begin + Brush.Color := FBullets.FSelectedColor; + Pen.Color := FBullets.FSelectedPenColor; + end else + if (ssNormal in States) then + begin + Brush.Color := FBullets.FNormalColor; + Pen.Color := FBullets.FNormalPenColor; + end; + + case FBullets.Kind of + sbRound: + Ellipse(Rc2); + sbRectangle: + Rectangle(Rc2); + sbDiamond: + begin + i := FBullets.Size div 2; + Polygon([ + Point(Rc2.Left + i, Rc2.Top), + Point(Rc2.Left, Rc2.Top + i), + Point(Rc2.Left + i, Rc2.Top + (i * 2)), + Point(Rc2.Left + (i * 2), Rc2.Top + i) + ]); + end; + end; + + Pen.Color := Old; + Brush.Style := bsClear; + end; + + y := RcItem.Top + (((RcItem.Bottom - RcItem.Top) - h) div 2); + TextRect(RcItem, x, y, Str); + + end; +end; + +procedure TNiceSideBar.DrawNonItem(ACanvas: TCanvas; Rc: TRect); +begin + with ACanvas do + begin + Brush.Style := bsSolid; + Brush.Color := Color; + FillRect(Rc); + end; +end; + +procedure TNiceSideBar.DrawScroller(ACanvas: TCanvas; Rc: TRect; + Up: Boolean; Hover: Boolean); +var + Old: TColor; +begin + with ACanvas do + begin + Old := Pen.Color; + Brush.Style := bsSolid; + if Hover then + begin + Brush.Color := FScrollers.FHoverColor; + Pen.Color := FScrollers.FHoverColor; + end else + begin + Brush.Color := FScrollers.FNormalColor; + Pen.Color := FScrollers.FNormalColor; + end; + RoundRect(Rc.Left, Rc.Top, Rc.Right, Rc.Bottom, 3, 3); + if Hover then + begin + Brush.Color := FScrollers.FHoverArrowColor; + Pen.Color := FScrollers.FHoverArrowColor; + end else + begin + Brush.Color := FScrollers.FNormalArrowColor; + Pen.Color := FScrollers.FNormalArrowColor; + end; + if Up then + begin + Polygon([ + Point(Rc.Left+3, Rc.Bottom-5), + Point(Rc.Right-4, Rc.Bottom-5), + Point(Rc.Left+5, Rc.Top+3) + ]); + end else + begin + Polygon([ + Point(Rc.Left+3, Rc.Top+4), + Point(Rc.Right-4, Rc.Top+4), + Point(Rc.Left+5, Rc.Bottom-4) + ]); + end; + Pen.Color := Old; + end; +end; + +procedure TNiceSideBar.Paint; +var + x, v: Integer; + Rc: TRect; + +begin + + if IsUpdating + then Exit; + + if (FMargin > 0) then + begin + with Canvas do + begin + Brush.Style := bsSolid; + Brush.Color := Color; + FillRect(Rect(0, 0, FMargin, ClientHeight)); + FillRect(Rect(ClientWidth-FMargin, 0, ClientWidth, ClientHeight)); + end; + end; + + v := 0; + if (FList.Count > 0) then + begin + for x := TopIndex to BottomIndex + do DoDrawItem(x); + v := PSBInfo(FList[FList.Count-1])^.Rc.Bottom + 1 - DeltaY; + end; + if (ClientHeight > v) then + begin + Rc := Rect(0, v, ClientWidth, ClientHeight); + if Assigned(FOnCustomDrawNonItem) + then FOnCustomDrawNonItem(Self, Canvas, Rc) + else DrawNonItem(Canvas, Rc); + end; + DoDrawItem(SCTOPINDEX); + DoDrawItem(SCBOTTOMINDEX); + +end; + +function TNiceSideBar.GetIndexAtPos(X, Y: Integer): Integer; +var + i: Integer; + Pt: TPoint; +begin + Result := -1; + Pt := Point(X, Y + DeltaY); + for i := 0 to FList.Count-1 do + begin + if PtInRect(PSBInfo(FList[i])^.Rc, Pt) then + begin + Result := i; + Break; + end; + end; +end; + +procedure TNiceSideBar.WMEraseBkgnd(var Msg: TMessage); +begin + Msg.Result := 1; +end; + +procedure TNiceSideBar.WMSize(var Msg: TWMSize); +begin + TopIndex := 0; + ListChange(False); + Invalidate; +end; + +procedure TNiceSidebar.CMColorChanged(var Msg: TMessage); +begin + Invalidate; +end; + +procedure TNiceSideBar.Notification(AComponent: TComponent; + Operation: TOperation); +begin + inherited; + if (AComponent = FImages) then + begin + if (Operation = opRemove) then + begin + FImages := nil; + Invalidate; + end; + end else + if (AComponent = FHoverImages) then + begin + if (Operation = opRemove) then + begin + FHoverImages := nil; + Invalidate; + end; + end else + if (AComponent = FSelectedImages) then + begin + if (Operation = opRemove) then + begin + FSelectedImages := nil; + Invalidate; + end; + end else + if (AComponent = FDisabledImages) then + begin + if (Operation = opRemove) then + begin + FDisabledImages := nil; + Invalidate; + end; + end; +end; + +function TNiceSideBar.CreateItem: TSideBarItem; +begin + Result := TSideBarItem.Create(FItems); +end; + +procedure TNiceSideBar.UpdateItem(Index: Integer); +var + x, i: Integer; + P: PSBInfo; +begin + i := -1; + for x := 0 to FList.Count-1 do + begin + P := PSBInfo(FList[x]); + if (P^.ItemIndex = Index) and (P^.SubIndex = -1) then + begin + i := x; + Break; + end; + end; + DoDrawItem(i); +end; + +procedure TNiceSideBar.UpdateItems; +begin + ListChange(True); + Invalidate; +end; + +procedure TNiceSideBar.SetItemIndex(Value: Integer); +var + x: Integer; + Redraw: Boolean; +begin + if (FItemIndex <> Value) then + begin + FItemIndex := Value; + FSubItemIndex := -1; + + Redraw := True; + if (FItemIndex <> -1) then + begin + if FItems[FItemIndex].FExpanded then + begin + DoDrawItem(LastIndex); + DoDrawItem(LastSubIndex); + end else + begin + FItems[FItemIndex].Expand; + Redraw := False; + end; + end else + begin + DoDrawItem(LastIndex); + DoDrawItem(LastSubIndex); + end; + + if IsUpdating then + begin + IsUpdating := False; + ListChange(False); + IsUpdating := True; + end; + + LastSubIndex := -1; + LastIndex := -1; + for x := 0 to FList.Count-1 do + begin + if (PSBInfo(FList[x])^.ItemIndex = FItemIndex) then + begin + LastIndex := x; + Break; + end; + end; + if Redraw + then DoDrawItem(LastIndex); + end; +end; + +procedure TNiceSideBar.SetSubItemIndex(Value: Integer); +var + x, i: Integer; + P: PSBInfo; +begin + if (FItemIndex = -1) + then Exit; + if (FSubItemIndex <> Value) then + begin + FSubItemIndex := Value; + if IsUpdating then + begin + IsUpdating := False; + ListChange(False); + IsUpdating := True; + end; + i := -1; + for x := 0 to FList.Count-1 do + begin + P := PSBInfo(FList[x]); + if (P^.ItemIndex = FItemIndex) then + begin + if (P^.SubIndex = Value) then + begin + i := x; + Break; + end; + end; + end; + DoDrawItem(LastSubIndex); + LastSubIndex := i; + if (i > -1) + then DoDrawItem(i); + end; +end; + +procedure TNiceSideBar.SetItemHeight(Value: Integer); +begin + if (FItemHeight <> Value) then + begin + FItemHeight := Value; + ListChange(True); + Invalidate; + end; +end; + +procedure TNiceSideBar.SetSubItemHeight(Value: Integer); +begin + if (FSubItemHeight <> Value) then + begin + FSubItemHeight := Value; + ListChange(True); + Invalidate; + end; +end; + +procedure TNiceSideBar.SetAlignment(Value: TSideBarAlign); +begin + if (FAlignment <> Value) then + begin + FAlignment := Value; + Invalidate; + end; +end; + +procedure TNiceSidebar.SetItems(Value: TSideBarItems); +begin + FItems.Assign(Value); +end; + +procedure TNiceSideBar.SetImages(Value: TImageList); +begin + if (FImages <> Value) then + begin + FImages := Value; + Invalidate; + end; +end; + +procedure TNiceSideBar.SetHoverImages(Value: TImageList); +begin + if (FHoverImages <> Value) then + begin + FHoverImages := Value; + Invalidate; + end; +end; + +procedure TNiceSideBar.SetSelectedImages(Value: TImageList); +begin + if (FSelectedImages <> Value) then + begin + FSelectedImages := Value; + Invalidate; + end; +end; + +procedure TNiceSideBar.SetDisabledImages(Value: TImageList); +begin + if (FDisabledImages <> Value) then + begin + FDisabledImages := Value; + Invalidate; + end; +end; + +procedure TNiceSideBar.SetHandPointCursor(Value: Boolean); +begin + if (FHandPointCursor <> Value) then + begin + FHandPointCursor := Value; + Cursor := crDefault; + end; +end; + +procedure TNiceSideBar.SetMargin(const Value: Integer); +begin + if (FMargin <> Value) then + begin + FMargin := Value; + ListChange(True); + Invalidate; + end; +end; + +procedure TNiceSideBar.SetGroupSeparator(const Value: Integer); +begin + if (FGroupSeparator <> Value) then + begin + FGroupSeparator := Value; + ListChange(True); + Invalidate; + end; +end; + +procedure TNiceSideBar.BeginUpdate; +begin + IsUpdating := True; +end; + +procedure TNiceSideBar.EndUpdate; +begin + IsUpdating := False; + FItemIndex := -1; + FSubItemIndex := -1; + LastIndex := -1; + LastSubIndex := -1; + LastHover := -1; + HoverIndex := -1; + TopIndex := 0; + ListChange(True); + Invalidate; +end; + +procedure TNiceSideBar.SetIndent(const Value: Integer); +begin + if (FIndent <> Value) then + begin + FIndent := Value; + Invalidate; + end; +end; + +procedure TNiceSideBar.SetAlwaysExpand(const Value: Boolean); +begin + if (FAlwaysExpand <> Value) then + begin + FAlwaysExpand := Value; + if FAlwaysExpand then + begin + ListChange(True); + Invalidate; + end; + end; +end; + +procedure TNiceSideBar.SetItemStyle(const Value: TSideBarItemStyle); +begin + FItemStyle.Assign(Value); +end; + +procedure TNiceSideBar.SetSubItemStyle(const Value: TSideBarItemStyle); +begin + FSubItemStyle.Assign(Value); +end; + +procedure TNiceSideBar.SetBullets(const Value: TSideBarBulletStyle); +begin + FBullets := Value; +end; + +procedure TNiceSideBar.SetScrollers(const Value: TSideBarScrollerStyle); +begin + FScrollers := Value; +end; + +procedure TNiceSideBar.WMMouseWheel(var Msg: TWMMouseWheel); +begin + if (Msg.WheelDelta > 0) and ScTopVisible then + begin + TopIndex := TopIndex - 1; + ListChange(False); + Invalidate; + Exit; + end else + if (Msg.WheelDelta < 0) and ScBottomVisible then + begin + TopIndex := TopIndex + 1; + ListChange(False); + Invalidate; + end else + inherited; +end; + +procedure TNiceSideBar.CMWantSpecialKey(var Message: TWMKey); +begin + inherited; + with Message do + case CharCode of + VK_LEFT, VK_UP, VK_RIGHT, VK_DOWN: + Result := 1; + end; +end; + +procedure TNiceSideBar.KeyDown(var Key: Word; Shift: TShiftState); +var + Rc: TRect; + x, y, i: Integer; + Info: PSBInfo; +begin + if (Key = VK_NEXT) and ScBottomVisible then + begin + Info := PSBInfo(FList[BottomIndex]); + if ((Info^.Rc.Bottom - DeltaY) <= Height) + then TopIndex := BottomIndex + 1 + else TopIndex := BottomIndex; + ListChange(False); + Invalidate; + end else + if (Key = VK_PRIOR) and ScTopVisible then + begin + y := Height; + i := TopIndex-1; + for x := TopIndex-1 downto 0 do + begin + Info := PSBInfo(FList[x]); + y := y - (Info^.Rc.Bottom - Info^.Rc.Top + 1); + if (y <= 0) + then Break + else i := x; + end; + TopIndex := i; + ListChange(False); + Invalidate; + end else + if (Key = VK_DOWN) then + begin + if (HoverIndex = FList.Count-1) + then Exit; + if (HoverIndex < TopIndex) or (HoverIndex > BottomIndex) then + begin + LastHover := TopIndex; + HoverIndex := TopIndex; + DoDrawItem(HoverIndex); + end else + begin + HoverIndex := Min(FList.Count-1, HoverIndex + 1); + if (LastHover >= 0) and (LastHover < FList.Count) + then DoDrawItem(LastHover); + DoDrawItem(HoverIndex); + LastHover := HoverIndex; + end; + if (HoverIndex >= BottomIndex-1) and ScBottomVisible then + begin + TopIndex := TopIndex + 1; + ListChange(False); + Invalidate; + end; + end else + if (Key = VK_UP) then + begin + if (HoverIndex = 0) + then Exit; + if (HoverIndex = TopIndex) and ScTopVisible then + begin + TopIndex := TopIndex - 1; + ListChange(False); + Invalidate; + end; + if (HoverIndex < TopIndex) or (HoverIndex > BottomIndex) then + begin + LastHover := BottomIndex; + HoverIndex := BottomIndex; + DoDrawItem(HoverIndex); + end else + begin + HoverIndex := Max(0, HoverIndex - 1); + if (LastHover >= 0) and (LastHover < FList.Count) + then DoDrawItem(LastHover); + DoDrawItem(HoverIndex); + LastHover := HoverIndex; + end; + end else + if (Key = VK_RETURN) then + begin + if (HoverIndex < TopIndex) or (HoverIndex > BottomIndex) + or (HoverIndex < 0) or (HoverIndex >= FList.Count) + then Exit; + CopyRect(Rc, PSBInfo(FList[HoverIndex])^.Rc); + OffsetRect(Rc, 0, -DeltaY); + MouseDown(mbLeft, [], Rc.Left + 1, Rc.Top + 1); + end; + inherited; +end; + +{ TSideBarItemStyle } + +constructor TSideBarItemStyle.Create(SideBar: TNiceSideBar); +begin + inherited Create; + FSideBar := SideBar; + FNormalFont := TFont.Create; + FNormalFont.Name := 'Arial'; + FHoverFont := TFont.Create; + FHoverFont.Name := 'Arial'; + FHoverFont.Color := clDefaultHoverFont; + FSelectedFont := TFont.Create; + FSelectedFont.Name := 'Arial'; + FDisabledFont := TFont.Create; + FDisabledFont.Name := 'Arial'; + FDisabledFont.Color := clGrayText; + FNormalColor := clBtnFace; + FHoverColor := clDefaultHover; + FSelectedColor := clDefaultSelected; + FLineColor := clWindowText; +end; + +destructor TSideBarItemStyle.Destroy; +begin + FNormalFont.Free; + FHoverFont.Free; + FSelectedFont.Free; + inherited Destroy; +end; + +procedure TSideBarItemStyle.AssignTo(Dest: TPersistent); +begin + if (Dest is TSideBarItemStyle) then + begin + with TSideBarItemStyle(Dest) do + begin + Deactivate; + FNormalFont.Assign(Self.FNormalFont); + FHoverFont.Assign(Self.FHoverFont); + FSelectedFont.Assign(Self.FSelectedFont); + FNormalColor := Self.FNormalColor; + FHoverColor := Self.FHoverColor; + FSelectedColor := Self.FSelectedColor; + FLineColor := Self.FLineColor; + Activate; + FSideBar.Invalidate; + end; + end else + inherited AssignTo(Dest); +end; + +procedure TSideBarItemStyle.Activate; +begin + FNormalFont.OnChange := FontChange; + FSelectedFont.OnChange := FontChange; + FDisabledFont.OnChange := FontChange; +end; + +procedure TSideBarItemStyle.Deactivate; +begin + FNormalFont.OnChange := nil; + FSelectedFont.OnChange := nil; + FDisabledFont.OnChange := nil; +end; + +procedure TSideBarItemStyle.FontChange(Sender: TObject); +begin + FSideBar.Invalidate; +end; + +procedure TSideBarItemStyle.SetHoverFont(const Value: TFont); +begin + FHoverFont.Assign(Value); +end; + +procedure TSideBarItemStyle.SetLineColor(const Value: TColor); +begin + if (FLineColor <> Value) then + begin + FLineColor := Value; + FSideBar.Invalidate; + end; +end; + +procedure TSideBarItemStyle.SetNormalColor(const Value: TColor); +begin + if (FNormalColor <> Value) then + begin + FNormalColor := Value; + FSideBar.Invalidate; + end; +end; + +procedure TSideBarItemStyle.SetNormalFont(const Value: TFont); +begin + FNormalFont.Assign(Value); +end; + +procedure TSideBarItemStyle.SetSelectedColor(const Value: TColor); +begin + if (FSelectedColor <> Value) then + begin + FSelectedColor := Value; + FSideBar.Invalidate; + end; +end; + +procedure TSideBarItemStyle.SetSelectedFont(const Value: TFont); +begin + FSelectedFont.Assign(Value); +end; + +procedure TSideBarItemStyle.SetDisabledFont(const Value: TFont); +begin + FDisabledFont.Assign(Value); +end; + +{ TSideBarBulletStyle } + +constructor TSideBarBulletStyle.Create(SideBar: TNiceSideBar); +begin + inherited Create; + FSideBar := SideBar; + FKind := sbRound; + FVisible := True; + FSize := 5; + FNormalColor := clWindowText; + FHoverColor := clDefaultHoverFont; + FSelectedColor := clWindowText; + FDisabledColor := clGrayText; + FNormalPenColor := clWindowText; + FHoverPenColor := clDefaultHoverFont; + FSelectedPenColor := clWindowText; + FDisabledPenColor := clGrayText; +end; + +procedure TSideBarBulletStyle.AssignTo(Dest: TPersistent); +begin + if (Dest is TSideBarBulletStyle) then + begin + with TSideBarBulletStyle(Dest) do + begin + FKind := Self.FKind; + FVisible := Self.FVisible; + FSize := Self.FSize; + FNormalColor := Self.FNormalColor; + FHoverColor := Self.FHoverColor; + FSelectedColor := Self.FSelectedColor; + FDisabledColor := Self.FDisabledColor; + FNormalPenColor := Self.FNormalPenColor; + FHoverPenColor := Self.FHoverPenColor; + FSelectedPenColor := Self.FSelectedPenColor; + FDisabledPenColor := Self.FDisabledPenColor; + FSideBar.Invalidate; + end; + end else + inherited AssignTo(Dest); +end; + +procedure TSideBarBulletStyle.SetKind(const Value: TSideBarBullet); +begin + if (FKind <> Value) then + begin + FKind := Value; + FSideBar.Invalidate; + end; +end; + +procedure TSideBarBulletStyle.SetNormalColor(const Value: TColor); +begin + if (FNormalColor <> Value) then + begin + FNormalColor := Value; + FSideBar.Invalidate; + end; +end; + +procedure TSideBarBulletStyle.SetNormalPenColor(const Value: TColor); +begin + if (FNormalPenColor <> Value) then + begin + FNormalPenColor := Value; + FSideBar.Invalidate; + end; +end; + +procedure TSideBarBulletStyle.SetSelectedColor(const Value: TColor); +begin + if (FSelectedColor <> Value) then + begin + FSelectedColor := Value; + FSideBar.Invalidate; + end; +end; + +procedure TSideBarBulletStyle.SetSelectedPenColor(const Value: TColor); +begin + if (FSelectedPenColor <> Value) then + begin + FSelectedPenColor := Value; + FSideBar.Invalidate; + end; +end; + +procedure TSideBarBulletStyle.SetDisabledColor(const Value: TColor); +begin + if (FDisabledColor <> Value) then + begin + FDisabledColor := Value; + FSideBar.Invalidate; + end; +end; + +procedure TSideBarBulletStyle.SetDisabledPenColor(const Value: TColor); +begin + if (FDisabledPenColor <> Value) then + begin + FDisabledPenColor := Value; + FSideBar.Invalidate; + end; +end; + +procedure TSideBarBulletStyle.SetSize(const Value: Integer); +begin + if (FSize <> Value) then + begin + FSize := Value; + FSideBar.Invalidate; + end; +end; + +procedure TSideBarBulletStyle.SetVisible(const Value: Boolean); +begin + if (FVisible <> Value) then + begin + FVisible := Value; + FSideBar.Invalidate; + end; +end; + +{ TSideBarScrollerStyle } + +constructor TSideBarScrollerStyle.Create(SideBar: TNiceSideBar); +begin + inherited Create; + FSideBar := SideBar; + FNormalColor := clBlack; + FNormalArrowColor := clWhite; + FHoverColor := clWhite; + FHoverArrowColor := clBlack; +end; + +procedure TSideBarScrollerStyle.AssignTo(Dest: TPersistent); +begin + if (Dest is TSideBarScrollerStyle) then + begin + with TSideBarScrollerStyle(Dest) do + begin + FNormalColor := Self.FNormalColor; + FNormalArrowColor := Self.FNormalArrowColor; + FHoverColor := Self.FHoverColor; + FHoverArrowColor := Self.FHoverArrowColor; + FSideBar.Invalidate; + end; + end else + inherited AssignTo(Dest); +end; + +procedure TSideBarScrollerStyle.SetNormalArrowColor(const Value: TColor); +begin + if (FNormalArrowColor <> Value) then + begin + FNormalArrowColor := Value; + FSideBar.Invalidate; + end; +end; + +procedure TSideBarScrollerStyle.SetNormalColor(const Value: TColor); +begin + if (FNormalColor <> Value) then + begin + FNormalColor := Value; + FSideBar.Invalidate; + end; +end; + +end. + diff --git a/components/nicesidebar/source/NiceSideBarReg.pas b/components/nicesidebar/source/NiceSideBarReg.pas new file mode 100644 index 000000000..0549d4ef1 --- /dev/null +++ b/components/nicesidebar/source/NiceSideBarReg.pas @@ -0,0 +1,78 @@ +unit NiceSideBarReg; + +{$IFDEF FPC} + {$MODE Delphi} +{$ENDIF} + +interface + + procedure Register; + +implementation + +{$IFDEF FPC} + {$R nicesidebar_images.res} +{$ENDIF} + +uses + {$IFDEF FPC} + PropEdits, ComponentEditors, + {$ELSE} + DesignIntf, DesignEditors, ColnEdit, + {$ENDIF} + Dialogs, Classes, NiceSideBar; + +type + TNiceSideBarEditor = class(TComponentEditor) + protected + function GetVerbCount: Integer; override; + function GetVerb(Index: Integer): string; override; + procedure ExecuteVerb(Index: Integer); override; + end; + + +{ TNiceSideBarEditor } + +procedure TNiceSideBarEditor.ExecuteVerb(Index: Integer); +begin + case Index of + + 0: {$IFDEF FPC} + EditCollection(Component, TNiceSideBar(Component).Items, 'Items'); + {$ELSE} + ShowCollectionEditorClass(Designer, TCollectionEditor, Component, + TNiceSideBar(Component).Items, 'Items', [coAdd, coDelete, coMove]); + {$ENDIF} + + 1: ShowMessage( + 'TNiceSideBar v1.00'#13 + + '(c) Priyatna, 2003'#13 + + 'Bandung - Indonesia'#13 + + 'http://www.priyatna.org/'#13 + + 'mailto:me@priyatna.org' + ); + + end; +end; + +function TNiceSideBarEditor.GetVerb(Index: Integer): string; +begin + case Index of + 0: Result := 'Edit Items ...'; + 1: Result := 'About'; + end; +end; + +function TNiceSideBarEditor.GetVerbCount: Integer; +begin + Result := 2; +end; + + +procedure Register; +begin + RegisterComponents('priyatna.org', [TNiceSideBar]); + RegisterComponentEditor(TNiceSideBar, TNiceSideBarEditor); +end; + +end. diff --git a/components/nicesidebar/source/nicesidebar_images.res b/components/nicesidebar/source/nicesidebar_images.res new file mode 100644 index 0000000000000000000000000000000000000000..7a4c73249cab769e4aa666b0443a9a2c9f136ee2 GIT binary patch literal 1728 zcmb8uJ95-O6a~;{0*b(aLqdftfw1`nBm}?$6taxB6fH#yao`oOh0BpG&#&y7LiU;I z+iLY|wKP>#6Uh_Jv*XX(s*ie-H}$)I)c5*Q-|Cm|uf9Lmr}}vqe|L9i)(6e^yPJCV zcw)Rcp0Ar@duTS6@VJ;U$%GpIX+q61P1r6RG@%xmCe$j^gssS+5BEDMF_~s^YEoaO z34;1Ep=OyTYzrMUp%$4Y)GE`2?WP7z_8S~l(1e;Kny}scpb0h0G-2DAK@)0`X+o_s zP1rVZ&}84xVN;t>)2zNs*fx96gqmfVusw)D6KauZLaj1Q*dE%T$^HO`>f2wasnwSV z+ru3+p=OyTY!80Wgj!^pP^(N63{qbv`wKI?G)<^!QC}vQOnsS9vrH2dQeP(2BGZIg zWtyNS=BT=%$=r`EOp*XFq> MDqh`(i%aU^A3est82|tP literal 0 HcmV?d00001