* Add new demos. patch by Werner Pamler
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2448 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
e8feb4830b
commit
66fca396af
101
components/spktoolbar/demos/actions/project1.lpi
Normal file
101
components/spktoolbar/demos/actions/project1.lpi
Normal file
@ -0,0 +1,101 @@
|
||||
<?xml version="1.0"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="9"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="project1"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
</General>
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
|
||||
<ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="SpkToolbarPackage"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="project1"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Unit1"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="bin\project1"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
<SmartLinkUnit Value="True"/>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<StripSymbols Value="True"/>
|
||||
<UseExternalDbgSyms Value="True"/>
|
||||
</Debugging>
|
||||
<LinkSmart Value="True"/>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerMessages>
|
||||
<MsgFileName Value=""/>
|
||||
</CompilerMessages>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
||||
<Item1>
|
||||
<Name Value="EAbort"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Name Value="ECodetoolError"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Name Value="EFOpenError"/>
|
||||
</Item3>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
21
components/spktoolbar/demos/actions/project1.lpr
Normal file
21
components/spktoolbar/demos/actions/project1.lpr
Normal file
@ -0,0 +1,21 @@
|
||||
program project1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, Unit1
|
||||
{ you can add units after this };
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
RequireDerivedFormResource := True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
1798
components/spktoolbar/demos/actions/unit1.lfm
Normal file
1798
components/spktoolbar/demos/actions/unit1.lfm
Normal file
File diff suppressed because it is too large
Load Diff
219
components/spktoolbar/demos/actions/unit1.pas
Normal file
219
components/spktoolbar/demos/actions/unit1.pas
Normal file
@ -0,0 +1,219 @@
|
||||
unit Unit1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ActnList,
|
||||
StdActns, StdCtrls, Menus, ComCtrls, ExtCtrls,
|
||||
SpkToolbar, spkt_Buttons, spkt_Checkboxes, spkt_Pane, spkt_Tab, spkt_Appearance;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
AcOpen: TAction;
|
||||
AcClassicalGUI: TAction;
|
||||
AcRibbonGUI: TAction;
|
||||
AcSave: TAction;
|
||||
AcQuit: TAction;
|
||||
AcAutoSave: TAction;
|
||||
AcSaveNow: TAction;
|
||||
ActionList: TActionList;
|
||||
AcEditCopy: TEditCopy;
|
||||
AcEditCut: TEditCut;
|
||||
AcEditPaste: TEditPaste;
|
||||
ImageList: TImageList;
|
||||
Label1: TLabel;
|
||||
LargeImageList: TImageList;
|
||||
MainMenu: TMainMenu;
|
||||
MenuItem1: TMenuItem;
|
||||
MenuItem10: TMenuItem;
|
||||
MenuItem11: TMenuItem;
|
||||
MenuItem12: TMenuItem;
|
||||
MenuItem13: TMenuItem;
|
||||
MenuItem14: TMenuItem;
|
||||
MenuItem15: TMenuItem;
|
||||
MenuItem16: TMenuItem;
|
||||
MenuItem2: TMenuItem;
|
||||
MenuItem3: TMenuItem;
|
||||
MenuItem4: TMenuItem;
|
||||
MenuItem5: TMenuItem;
|
||||
MenuItem6: TMenuItem;
|
||||
MenuItem7: TMenuItem;
|
||||
MenuItem8: TMenuItem;
|
||||
MenuItem9: TMenuItem;
|
||||
Panel1: TPanel;
|
||||
SpkCheckbox1: TSpkCheckbox;
|
||||
SpkLargeButton1: TSpkLargeButton;
|
||||
SpkLargeButton2: TSpkLargeButton;
|
||||
SpkLargeButton3: TSpkLargeButton;
|
||||
SpkPane1: TSpkPane;
|
||||
SpkPane2: TSpkPane;
|
||||
SpkPane5: TSpkPane;
|
||||
SpkPane6: TSpkPane;
|
||||
SpkRadioButton1: TSpkRadioButton;
|
||||
SpkRadioButton2: TSpkRadioButton;
|
||||
SpkSmallButton1: TSpkSmallButton;
|
||||
SpkSmallButton2: TSpkSmallButton;
|
||||
SpkSmallButton5: TSpkSmallButton;
|
||||
SpkSmallButton7: TSpkSmallButton;
|
||||
SpkTab1: TSpkTab;
|
||||
SpkTab2: TSpkTab;
|
||||
SpkTab3: TSpkTab;
|
||||
SpkToolbar1: TSpkToolbar;
|
||||
ToolBar1: TToolBar;
|
||||
ToolButton1: TToolButton;
|
||||
ToolButton2: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
ToolButton4: TToolButton;
|
||||
ToolButton5: TToolButton;
|
||||
ToolButton6: TToolButton;
|
||||
ToolButton7: TToolButton;
|
||||
ToolButton8: TToolButton;
|
||||
procedure AcAutoSaveExecute(Sender: TObject);
|
||||
procedure AcClassicalGUIExecute(Sender: TObject);
|
||||
procedure AcEditCopyExecute(Sender: TObject);
|
||||
procedure AcEditCutExecute(Sender: TObject);
|
||||
procedure AcEditPasteExecute(Sender: TObject);
|
||||
procedure AcOpenExecute(Sender: TObject);
|
||||
procedure AcQuitExecute(Sender: TObject);
|
||||
procedure AcRibbonGUIExecute(Sender: TObject);
|
||||
procedure AcSaveExecute(Sender: TObject);
|
||||
procedure AcSaveNowExecute(Sender: TObject);
|
||||
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
procedure LoadFromIni;
|
||||
procedure SaveToIni;
|
||||
procedure SetUserInterface(Ribbon:boolean);
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
inifiles;
|
||||
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.AcClassicalGUIExecute(Sender: TObject);
|
||||
begin
|
||||
SetUserInterface(false);
|
||||
end;
|
||||
|
||||
procedure TForm1.AcAutoSaveExecute(Sender: TObject);
|
||||
begin
|
||||
// Checked is handled by "AutoCheck". Need this method to have the action enabled.
|
||||
end;
|
||||
|
||||
procedure TForm1.AcEditCopyExecute(Sender: TObject);
|
||||
begin
|
||||
Label1.Caption := '"Copy" clicked';
|
||||
end;
|
||||
|
||||
procedure TForm1.AcEditCutExecute(Sender: TObject);
|
||||
begin
|
||||
Label1.Caption := '"Cut" clicked';
|
||||
end;
|
||||
|
||||
procedure TForm1.AcEditPasteExecute(Sender: TObject);
|
||||
begin
|
||||
Label1.Caption := '"Paste" clicked';
|
||||
end;
|
||||
|
||||
procedure TForm1.AcOpenExecute(Sender: TObject);
|
||||
begin
|
||||
Label1.Caption := '"Open" clicked';
|
||||
end;
|
||||
|
||||
procedure TForm1.AcQuitExecute(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TForm1.AcRibbonGUIExecute(Sender: TObject);
|
||||
begin
|
||||
SetUserInterface(true);
|
||||
end;
|
||||
|
||||
procedure TForm1.AcSaveExecute(Sender: TObject);
|
||||
begin
|
||||
Label1.Caption := '"Save" clicked';
|
||||
end;
|
||||
|
||||
procedure TForm1.AcSaveNowExecute(Sender: TObject);
|
||||
begin
|
||||
SaveToIni;
|
||||
end;
|
||||
|
||||
procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: boolean);
|
||||
begin
|
||||
if CanClose then
|
||||
if MessageDlg('Do you really want to close this application?', mtConfirmation,
|
||||
[mbYes, mbNo], 0) <> mrYes
|
||||
then
|
||||
CanClose := false;
|
||||
if CanClose then
|
||||
if AcAutoSave.Checked then
|
||||
SaveToIni;
|
||||
end;
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
begin
|
||||
SetUserInterface(true);
|
||||
Label1.Caption := '';
|
||||
LoadFromIni;
|
||||
end;
|
||||
|
||||
procedure TForm1.LoadFromIni;
|
||||
var
|
||||
ini: TCustomIniFile;
|
||||
begin
|
||||
ini := TMemIniFile.Create(ChangeFileExt(ParamStr(0), '.ini'));
|
||||
try
|
||||
SetUserInterface(ini.ReadBool('MainForm', 'RibbonInterface', AcRibbonGUI.Checked));
|
||||
finally
|
||||
ini.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm1.SaveToIni;
|
||||
var
|
||||
ini: TCustomIniFile;
|
||||
begin
|
||||
ini := TMemIniFile.Create(ChangeFileExt(ParamStr(0), '.ini'));
|
||||
try
|
||||
ini.WriteBool('MainForm', 'RibbonInterface', AcRibbonGUI.Checked);
|
||||
finally
|
||||
ini.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm1.SetUserInterface(Ribbon: boolean);
|
||||
begin
|
||||
if Ribbon then begin
|
||||
Menu := nil;
|
||||
Toolbar1.Hide;
|
||||
SpkToolbar1.Show;
|
||||
AcRibbonGUI.Checked := true;
|
||||
end else begin
|
||||
SpkToolbar1.Hide;
|
||||
Menu := MainMenu;
|
||||
Toolbar1.Show;
|
||||
AcClassicalGUI.Checked := true;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
104
components/spktoolbar/demos/runtime/project1.lpi
Normal file
104
components/spktoolbar/demos/runtime/project1.lpi
Normal file
@ -0,0 +1,104 @@
|
||||
<?xml version="1.0"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="9"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="project1"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
|
||||
<ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="SpkToolbarPackage"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="project1"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Unit1"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="bin\project1"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="..\..\SpkToolbar"/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
<SmartLinkUnit Value="True"/>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<DebugInfoType Value="dsDwarf2"/>
|
||||
<StripSymbols Value="True"/>
|
||||
<UseExternalDbgSyms Value="True"/>
|
||||
</Debugging>
|
||||
<LinkSmart Value="True"/>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerMessages>
|
||||
<MsgFileName Value=""/>
|
||||
</CompilerMessages>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
||||
<Item1>
|
||||
<Name Value="EAbort"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Name Value="ECodetoolError"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Name Value="EFOpenError"/>
|
||||
</Item3>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
21
components/spktoolbar/demos/runtime/project1.lpr
Normal file
21
components/spktoolbar/demos/runtime/project1.lpr
Normal file
@ -0,0 +1,21 @@
|
||||
program project1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, Unit1
|
||||
{ you can add units after this };
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
RequireDerivedFormResource := True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
1102
components/spktoolbar/demos/runtime/unit1.lfm
Normal file
1102
components/spktoolbar/demos/runtime/unit1.lfm
Normal file
File diff suppressed because it is too large
Load Diff
203
components/spktoolbar/demos/runtime/unit1.pas
Normal file
203
components/spktoolbar/demos/runtime/unit1.pas
Normal file
@ -0,0 +1,203 @@
|
||||
unit Unit1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, SpkToolbar,
|
||||
SpkGUITools, SpkMath, SpkGraphTools, spkt_Tab, spkt_Pane, spkt_Types,
|
||||
spkt_Tools, ImgList, ComCtrls, Menus, Grids, ExtCtrls, spkt_BaseItem,
|
||||
spkt_Buttons, spkt_Checkboxes;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
ImageList: TImageList;
|
||||
LargeImageList: TImageList;
|
||||
MenuItem1: TMenuItem;
|
||||
MenuItem2: TMenuItem;
|
||||
MenuItem3: TMenuItem;
|
||||
Panel1: TPanel;
|
||||
RecentFilesPopupMenu: TPopupMenu;
|
||||
StatusBar1: TStatusBar;
|
||||
StringGrid1: TStringGrid;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
SpkToolbar : TSpkToolbar;
|
||||
CbHorizGrid : TSpkCheckbox;
|
||||
CbVertGrid: TSpkCheckbox;
|
||||
CbRowSelect: TSpkCheckbox;
|
||||
procedure FileOpenHandler(Sender: TObject);
|
||||
procedure FileSaveHandler(Sender: TObject);
|
||||
procedure FileQuitHandler(Sender: TObject);
|
||||
procedure HorizontalGridLinesHandler(Sender: TObject);
|
||||
procedure VerticalGridLinesHandler(Sender: TObject);
|
||||
procedure RowSelectHandler(Sender: TObject);
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.FileOpenHandler(Sender: TObject);
|
||||
begin
|
||||
Statusbar1.SimpleText := '"File" / "Open" clicked';
|
||||
end;
|
||||
|
||||
procedure TForm1.FileSaveHandler(Sender: TObject);
|
||||
begin
|
||||
Statusbar1.SimpleText := '"File" / "Save" clicked';
|
||||
end;
|
||||
|
||||
procedure TForm1.FileQuitHandler(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TForm1.HorizontalGridLinesHandler(Sender: TObject);
|
||||
begin
|
||||
if CbHorizGrid.Checked then
|
||||
StringGrid1.Options := StringGrid1.Options + [goHorzLine]
|
||||
else
|
||||
StringGrid1.Options := StringGrid1.Options - [goHorzLine];
|
||||
end;
|
||||
|
||||
procedure TForm1.VerticalGridLinesHandler(Sender: TObject);
|
||||
begin
|
||||
if CbVertGrid.Checked then
|
||||
StringGrid1.Options := StringGrid1.Options + [goVertLine]
|
||||
else
|
||||
StringGrid1.Options := StringGrid1.Options - [goVertLine];
|
||||
end;
|
||||
|
||||
procedure TForm1.RowSelectHandler(Sender: TObject);
|
||||
begin
|
||||
if CbRowSelect.Checked then
|
||||
StringGrid1.Options := StringGrid1.Options + [goRowSelect]
|
||||
else
|
||||
StringGrid1.Options := StringGrid1.Options - [goRowSelect];
|
||||
end;
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
begin
|
||||
SpkToolbar := TSpkToolbar.Create(self);
|
||||
with SpkToolbar do begin
|
||||
Parent := self;
|
||||
Appearance.Pane.CaptionFont.Style := [fsBold, fsItalic];
|
||||
Color := clSkyBlue;
|
||||
Images := ImageList;
|
||||
LargeImages := LargeImageList;
|
||||
ShowHint := true;
|
||||
with Tabs.Add do begin
|
||||
Caption := 'File';
|
||||
with Panes.Add do begin
|
||||
Caption := 'File commands';
|
||||
with Items.AddLargeButton do begin
|
||||
Caption := 'Open';
|
||||
ButtonKind := bkButtonDropdown;
|
||||
DropdownMenu := RecentFilesPopupMenu;
|
||||
LargeImageIndex := 1;
|
||||
// Hint := 'Open a file';
|
||||
OnClick := @FileOpenHandler;
|
||||
end;
|
||||
with Items.AddLargeButton do begin
|
||||
Caption := 'Save';
|
||||
LargeImageIndex := 2;
|
||||
// Hint := 'Save file';
|
||||
OnClick := @FileSaveHandler;
|
||||
end;
|
||||
with Items.AddLargeButton do begin
|
||||
Caption := 'Quit';
|
||||
LargeImageIndex := 0;
|
||||
// Hint := 'Close application';
|
||||
OnClick := @FileQuitHandler;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
with Tabs.Add do begin
|
||||
Caption := 'Edit';
|
||||
with Panes.Add do begin
|
||||
Caption := 'Edit commands';
|
||||
with Items.AddSmallButton do begin
|
||||
Caption := 'Cut';
|
||||
HideFrameWhenIdle := true;
|
||||
TableBehaviour := tbBeginsRow;
|
||||
ImageIndex := 3;
|
||||
// Hint := 'Cut to clipboard';
|
||||
end;
|
||||
with Items.AddSmallButton do begin
|
||||
Caption := 'Copy';
|
||||
HideFrameWhenIdle := true;
|
||||
TableBehaviour := tbBeginsRow;
|
||||
ImageIndex := 4;
|
||||
// Hint := 'Copy to clipboard';
|
||||
end;
|
||||
with Items.AddSmallButton do begin
|
||||
Caption := 'Paste';
|
||||
HideFrameWhenIdle := true;
|
||||
TableBehaviour := tbBeginsColumn;
|
||||
ImageIndex := 5;
|
||||
// Hint := 'Paste from clipboard';
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
with Tabs.Add do begin
|
||||
Caption := 'Options';
|
||||
with Panes.Add do begin
|
||||
Caption := 'Grid settings';
|
||||
CbHorizGrid := Items.AddCheckbox;
|
||||
with CbHorizGrid do begin
|
||||
Caption := 'Horizontal grid lines';
|
||||
TableBehaviour := tbBeginsRow;
|
||||
Checked := true;
|
||||
// Hint := 'Show/hide horizontal grid lines';
|
||||
OnClick := @HorizontalGridLinesHandler;
|
||||
end;
|
||||
CbVertGrid := Items.AddCheckbox;
|
||||
with CbVertGrid do begin
|
||||
Caption := 'Vertical grid lines';
|
||||
// Hint := 'Show/hide vertical grid lines';
|
||||
TableBehaviour := tbBeginsRow;
|
||||
Checked := true;
|
||||
OnClick := @VerticalGridLinesHandler;
|
||||
end;
|
||||
CbRowSelect := Items.AddCheckbox;
|
||||
with CbRowSelect do begin
|
||||
Caption := 'Row select';
|
||||
TableBehaviour := tbBeginsRow;
|
||||
Checked := false;
|
||||
// Hint := 'Select entire row';
|
||||
OnClick := @RowSelectHandler;
|
||||
end;
|
||||
end;
|
||||
with Panes.Add do begin
|
||||
Caption := 'Save settings';
|
||||
with Items.AddSmallButton do begin
|
||||
Caption := 'Save now';
|
||||
// Hint := 'Save settings now';
|
||||
ImageIndex := 2;
|
||||
end;
|
||||
with Items.AddCheckbox do begin
|
||||
Caption := 'Auto-save settings';
|
||||
Checked := true;
|
||||
// Hint := 'Automatically save settings when program closes';
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user