Skip to content

Commit 9f520c7

Browse files
author
joachim.marder
committed
No longer using deprecated TUIRibbonForm but a TUIRibbon control placed on the form.
1 parent e9204c5 commit 9f520c7

File tree

3 files changed

+45
-24
lines changed

3 files changed

+45
-24
lines changed

Designer/FPreview.dfm

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ object FormPreview: TFormPreview
1515
TextHeight = 13
1616
object PageControl: TPageControl
1717
Left = 0
18-
Top = 0
18+
Top = 117
1919
Width = 635
2020
Height = 462
2121
ActivePage = TabSheetColorize
@@ -26,7 +26,7 @@ object FormPreview: TFormPreview
2626
object LabelAppModes: TLabel
2727
Left = 0
2828
Top = 0
29-
Width = 198
29+
Width = 627
3030
Height = 13
3131
Align = alTop
3232
Caption = '* There are no application modes defined'
@@ -54,7 +54,7 @@ object FormPreview: TFormPreview
5454
object LabelContextTabs: TLabel
5555
Left = 0
5656
Top = 0
57-
Width = 188
57+
Width = 627
5858
Height = 13
5959
Align = alTop
6060
Caption = '* There are no contextual tabs defined'
@@ -82,7 +82,7 @@ object FormPreview: TFormPreview
8282
object LabelContextPopups: TLabel
8383
Left = 0
8484
Top = 0
85-
Width = 182
85+
Width = 627
8686
Height = 13
8787
Align = alTop
8888
Caption = '* There are no context popus defined'
@@ -712,4 +712,12 @@ object FormPreview: TFormPreview
712712
end
713713
end
714714
end
715+
object Ribbon: TUIRibbon
716+
Left = 0
717+
Top = 0
718+
Width = 635
719+
Height = 117
720+
ResourceName = 'APPLICATION'
721+
OnCommandCreate = CommandCreated
722+
end
715723
end

Designer/FPreview.pas

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interface
88
StdCtrls, CheckLst, RibbonMarkup, BasicXml, Generics.Collections, ExtCtrls;
99

1010
type
11-
TFormPreview = class(TUIRibbonForm)
11+
TFormPreview = class(TForm)
1212
PageControl: TPageControl;
1313
TabSheetAppModes: TTabSheet;
1414
TabSheetContextTabs: TTabSheet;
@@ -75,13 +75,15 @@ TFormPreview = class(TUIRibbonForm)
7575
UpDownTextS: TUpDown;
7676
EditTextB: TEdit;
7777
UpDownTextB: TUpDown;
78+
Ribbon: TUIRibbon;
7879
procedure CheckListBoxAppModesClickCheck(Sender: TObject);
7980
procedure CheckListBoxContextTabsClickCheck(Sender: TObject);
8081
procedure ListBoxContextPopupsClick(Sender: TObject);
8182
procedure PanelSampleClick(Sender: TObject);
8283
procedure EditBackgroundColorChange(Sender: TObject);
8384
procedure EditHighlightColorChange(Sender: TObject);
8485
procedure EditTextColorChange(Sender: TObject);
86+
procedure CommandCreated(const Sender: TUIRibbon; const Command: TUICommand);
8587
private
8688
{ Private declarations }
8789
FInstance: THandle;
@@ -98,15 +100,10 @@ TFormPreview = class(TUIRibbonForm)
98100
procedure InitializeContextualTabs;
99101
procedure InitializeContextPopups;
100102
procedure InitializeColorization;
101-
strict protected
102-
procedure CommandCreated(const Sender: TUIRibbon;
103-
const Command: TUICommand); override;
104103
public
105104
{ Public declarations }
106105
constructor Create(const Instance: THandle; const Document: TRibbonDocument); reintroduce;
107106
destructor Destroy; override;
108-
109-
function RibbonInstance: THandle; override;
110107
end;
111108

112109
resourcestring
@@ -488,9 +485,5 @@ procedure TFormPreview.CommandCreated(const Sender: TUIRibbon;
488485
end;
489486
end;
490487

491-
function TFormPreview.RibbonInstance: THandle;
492-
begin
493-
Result := FInstance;
494-
end;
495488

496489
end.

Designer/RibbonDesigner.dproj

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
1-
 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<PropertyGroup>
33
<ProjectGuid>{453097E8-48A7-46E6-A57F-BDD6E5BE0E90}</ProjectGuid>
44
<MainSource>RibbonDesigner.dpr</MainSource>
5-
<ProjectVersion>12.3</ProjectVersion>
5+
<ProjectVersion>16.0</ProjectVersion>
66
<Base>True</Base>
7-
<Config Condition="'$(Config)'==''">Release</Config>
8-
<Platform>Win32</Platform>
7+
<Config Condition="'$(Config)'==''">Debug</Config>
98
<AppType>Application</AppType>
109
<FrameworkType>VCL</FrameworkType>
1110
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
11+
<TargetedPlatforms>1</TargetedPlatforms>
12+
<Platform Condition="'$(Platform)'==''">Win32</Platform>
1213
</PropertyGroup>
1314
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
1415
<Base>true</Base>
1516
</PropertyGroup>
17+
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
18+
<Base_Win32>true</Base_Win32>
19+
<CfgParent>Base</CfgParent>
20+
<Base>true</Base>
21+
</PropertyGroup>
1622
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
1723
<Cfg_1>true</Cfg_1>
1824
<CfgParent>Base</CfgParent>
@@ -24,6 +30,14 @@
2430
<Base>true</Base>
2531
</PropertyGroup>
2632
<PropertyGroup Condition="'$(Base)'!=''">
33+
<VerInfo_MajorVer>2</VerInfo_MajorVer>
34+
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
35+
<VerInfo_Build>70</VerInfo_Build>
36+
<DCC_Namespace>Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;System.Win;$(DCC_Namespace)</DCC_Namespace>
37+
<VerInfo_Locale>1033</VerInfo_Locale>
38+
<SanitizedProjectName>RibbonDesigner</SanitizedProjectName>
39+
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
40+
<VerInfo_Keys>CompanyName=Erik van Bilsen AudioVisuality;FileDescription=Ribbon Designer;FileVersion=2.0.0.70;InternalName=;LegalCopyright=© 2011 Erik van Bilsen, Joachim Marder e.K.;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=2.0;Comments=</VerInfo_Keys>
2741
<DCC_UnitSearchPath>..\Lib;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
2842
<DCC_DependencyCheckOutputName>RibbonDesigner.exe</DCC_DependencyCheckOutputName>
2943
<DCC_ImageBase>00400000</DCC_ImageBase>
@@ -34,6 +48,10 @@
3448
<DCC_F>false</DCC_F>
3549
<DCC_K>false</DCC_K>
3650
</PropertyGroup>
51+
<PropertyGroup Condition="'$(Base_Win32)'!=''">
52+
<DCC_Namespace>Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
53+
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
54+
</PropertyGroup>
3755
<PropertyGroup Condition="'$(Cfg_1)'!=''">
3856
<DCC_DependencyCheckOutputName>Bin\RibbonDesigner.exe</DCC_DependencyCheckOutputName>
3957
<DCC_DebugDCUs>true</DCC_DebugDCUs>
@@ -49,10 +67,10 @@
4967
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
5068
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
5169
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
52-
<DCC_DebugInformation>false</DCC_DebugInformation>
70+
<DCC_DebugInformation>0</DCC_DebugInformation>
5371
</PropertyGroup>
5472
<ItemGroup>
55-
<DelphiCompile Include="RibbonDesigner.dpr">
73+
<DelphiCompile Include="$(MainSource)">
5674
<MainSource>MainSource</MainSource>
5775
</DelphiCompile>
5876
<RcCompile Include="..\Lib\UIRibbon.rc">
@@ -249,13 +267,13 @@
249267
<Form>FormNewFile</Form>
250268
</DCCReference>
251269
<DCCReference Include="Classes\BasicZip.pas"/>
252-
<BuildConfiguration Include="Base">
253-
<Key>Base</Key>
254-
</BuildConfiguration>
255270
<BuildConfiguration Include="Release">
256271
<Key>Cfg_2</Key>
257272
<CfgParent>Base</CfgParent>
258273
</BuildConfiguration>
274+
<BuildConfiguration Include="Base">
275+
<Key>Base</Key>
276+
</BuildConfiguration>
259277
<BuildConfiguration Include="Debug">
260278
<Key>Cfg_1</Key>
261279
<CfgParent>Base</CfgParent>
@@ -305,8 +323,10 @@
305323
</Delphi.Personality>
306324
<Platforms>
307325
<Platform value="Win32">True</Platform>
326+
<Platform value="Win64">False</Platform>
308327
</Platforms>
309328
</BorlandProject>
310329
<ProjectFileVersion>12</ProjectFileVersion>
311330
</ProjectExtensions>
312-
</Project>
331+
<Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
332+
</Project>

0 commit comments

Comments
 (0)