📄 spreg.pas
字号:
{*******************************************************************}
{ }
{ Almediadev Visual Component Library }
{ DynamicSkinForm }
{ Version 9.15 }
{ }
{ Copyright (c) 2000-2008 Almediadev }
{ ALL RIGHTS RESERVED }
{ }
{ Home: http://www.almdev.com }
{ Support: support@almdev.com }
{ }
{*******************************************************************}
unit spreg;
{$P+,S-,W-,R-}
{$WARNINGS OFF}
{$HINTS OFF}
interface
uses Classes, Menus, Dialogs, Forms, Controls,
{$IFNDEF VER130} DesignEditors, DesignIntf {$ELSE} DsgnIntf {$ENDIF};
type
TspSkinStatusBarEditor = class(TDefaultEditor)
public
procedure ExecuteVerb(Index: Integer); override;
function GetVerb(Index: Integer): string; override;
function GetVerbCount: Integer; override;
end;
TspSkinToolBarEditor = class(TDefaultEditor)
public
procedure ExecuteVerb(Index: Integer); override;
function GetVerb(Index: Integer): string; override;
function GetVerbCount: Integer; override;
end;
TspSkinPageControlEditor = class(TDefaultEditor)
public
procedure ExecuteVerb(Index: Integer); override;
function GetVerb(Index: Integer): string; override;
function GetVerbCount: Integer; override;
end;
procedure Register;
implementation
uses
SPUtils, SPEffBMP, DynamicSkinForm, SkinData, SkinCtrls, SkinExCtrls, SkinHint, SkinGrids,
SkinTabs, SysUtils, SkinBoxCtrls, SkinMenus, spTrayIcon, spMessages,
spSkinZip, spSkinUnZip, spFileCtrl, spSkinShellCtrls, spNBPagesEditor,
spCalendar, spColorCtrls, spDialogs, spRootEdit, SkinPrinter,
spCategoryButtons, spButtonGroup;
{ TFilenameProperty }
type
TspFilenameProperty = class(TStringProperty)
public
procedure Edit; override;
function GetAttributes: TPropertyAttributes; override;
end;
TspSkinDataNameProperty = class(TStringProperty)
public
function GetAttributes: TPropertyAttributes; override;
procedure GetValueList(List: TStrings); virtual;
procedure GetValues(Proc: TGetStrProc); override;
end;
TspToolBarSkinDataNameProperty = class(TspSkinDataNameProperty)
public
procedure GetValueList(List: TStrings); override;
end;
TspButtonSkinDataNameProperty = class(TspSkinDataNameProperty)
public
procedure GetValueList(List: TStrings); override;
end;
TspCategoryButtonSkinDataNameProperty = class(TspSkinDataNameProperty)
public
procedure GetValueList(List: TStrings); override;
end;
TspCategorySkinDataNameProperty = class(TspSkinDataNameProperty)
public
procedure GetValueList(List: TStrings); override;
end;
TspEditSkinDataNameProperty = class(TspSkinDataNameProperty)
public
procedure GetValueList(List: TStrings); override;
end;
TspSpinEditSkinDataNameProperty = class(TspSkinDataNameProperty)
public
procedure GetValueList(List: TStrings); override;
end;
TspGaugeSkinDataNameProperty = class(TspSkinDataNameProperty)
public
procedure GetValueList(List: TStrings); override;
end;
TspCalendarSkinDataNameProperty = class(TspSkinDataNameProperty)
public
procedure GetValueList(List: TStrings); override;
end;
TspMenuButtonSkinDataNameProperty = class(TspSkinDataNameProperty)
public
procedure GetValueList(List: TStrings); override;
end;
TspPanelSkinDataNameProperty = class(TspSkinDataNameProperty)
public
procedure GetValueList(List: TStrings); override;
end;
TspListBoxSkinDataNameProperty = class(TspSkinDataNameProperty)
public
procedure GetValueList(List: TStrings); override;
end;
TspCheckListBoxSkinDataNameProperty = class(TspSkinDataNameProperty)
public
procedure GetValueList(List: TStrings); override;
end;
TspComboBoxSkinDataNameProperty = class(TspSkinDataNameProperty)
public
procedure GetValueList(List: TStrings); override;
end;
TspSplitterSkinDataNameProperty = class(TspSkinDataNameProperty)
public
procedure GetValueList(List: TStrings); override;
end;
procedure TspSkinDataNameProperty.GetValueList(List: TStrings);
begin
end;
procedure TspSkinDataNameProperty.GetValues(Proc: TGetStrProc);
var
I: Integer;
Values: TStringList;
begin
Values := TStringList.Create;
try
GetValueList(Values);
for I := 0 to Values.Count - 1 do Proc(Values[I]);
finally
Values.Free;
end;
end;
function TspSkinDataNameProperty.GetAttributes: TPropertyAttributes;
begin
Result := [paValueList, paMultiSelect];
end;
procedure TspEditSkinDataNameProperty.GetValueList(List: TStrings);
begin
List.Add('edit');
List.Add('buttonedit');
List.Add('statusedit');
List.Add('statusbuttonedit');
end;
procedure TspSpinEditSkinDataNameProperty.GetValueList(List: TStrings);
begin
List.Add('spinedit');
List.Add('statusspinedit');
end;
procedure TspButtonSkinDataNameProperty.GetValueList(List: TStrings);
begin
List.Add('button');
List.Add('resizebutton');
List.Add('toolbutton');
List.Add('bigtoolbutton');
List.Add('resizetoolbutton');
end;
procedure TspCategoryButtonSkinDataNameProperty.GetValueList(List: TStrings);
begin
List.Add('button');
List.Add('resizebutton');
List.Add('toolbutton');
List.Add('bigtoolbutton');
List.Add('resizetoolbutton');
end;
procedure TspCategorySkinDataNameProperty.GetValueList(List: TStrings);
begin
List.Add('resizetoolpanel');
List.Add('panel');
end;
procedure TspGaugeSkinDataNameProperty.GetValueList(List: TStrings);
begin
List.Add('gauge');
List.Add('vgauge');
List.Add('statusgauge');
end;
procedure TspMenuButtonSkinDataNameProperty.GetValueList(List: TStrings);
begin
List.Add('toolmenubutton');
List.Add('bigtoolmenubutton');
List.Add('toolmenutrackbutton');
List.Add('bigtoolmenutrackbutton');
List.Add('resizebutton');
List.Add('resizetoolbutton');
end;
procedure TspToolBarSkinDataNameProperty.GetValueList(List: TStrings);
begin
List.Add('toolpanel');
List.Add('bigtoolpanel');
List.Add('resizetoolpanel');
List.Add('panel');
end;
procedure TspPanelSkinDataNameProperty.GetValueList(List: TStrings);
begin
List.Add('panel');
List.Add('resizetoolpanel');
List.Add('toolpanel');
List.Add('bigtoolpanel');
List.Add('statusbar');
List.Add('groupbox');
end;
procedure TspListBoxSkinDataNameProperty.GetValueList(List: TStrings);
begin
List.Add('listbox');
List.Add('captionlistbox');
end;
procedure TspCheckListBoxSkinDataNameProperty.GetValueList(List: TStrings);
begin
List.Add('checklistbox');
List.Add('captionchecklistbox');
end;
procedure TspCalendarSkinDataNameProperty.GetValueList(List: TStrings);
begin
List.Add('panel');
List.Add('groupbox');
List.Add('resizetoolpanel');
end;
procedure TspComboBoxSkinDataNameProperty.GetValueList(List: TStrings);
begin
List.Add('combobox');
List.Add('captioncombobox');
List.Add('statuscombobox');
end;
procedure TspSplitterSkinDataNameProperty.GetValueList(List: TStrings);
begin
List.Add('vsplitter');
List.Add('hsplitter');
end;
procedure TspFilenameProperty.Edit;
var
FileOpen: TOpenDialog;
begin
FileOpen := TOpenDialog.Create(Application);
try
FileOpen.Filename := '';
FileOpen.InitialDir := ExtractFilePath(FileOpen.Filename);
FileOpen.Filter := '*.*|*.*';
FileOpen.Options := FileOpen.Options + [ofHideReadOnly];
if FileOpen.Execute then SetValue(FileOpen.Filename);
finally
FileOpen.Free;
end;
end;
function TspFilenameProperty.GetAttributes: TPropertyAttributes;
begin
Result := [paDialog , paRevertable];
end;
type
TspSetPagesProperty = class(TPropertyEditor)
public
procedure Edit; override;
function GetAttributes: TPropertyAttributes; override;
function GetValue: string; override;
procedure SetValue(const Value: string); override;
end;
procedure TspSetPagesProperty.Edit;
var
NB: TspSkinNoteBook;
begin
try
NB := TspSkinNoteBook(GetComponent(0));
spNBPagesEditor.Execute(NB);
finally
end;
end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -