aboutsummaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorJuha Vehviläinen <jusu@users.sourceforge.net>2002-12-30 23:06:56 +0000
committerJuha Vehviläinen <jusu@users.sourceforge.net>2002-12-30 23:06:56 +0000
commit72f80b51c2c698221ced908abb9aba53c987f4a4 (patch)
tree143376fe11a9952ddfd22ba6349089f95d924c1c /Source
parentaa901783a0dc07f0dc08628d3ca091a9164b0629 (diff)
*** empty log message ***
svn path=/trunk/Framestein/; revision=313
Diffstat (limited to 'Source')
-rw-r--r--Source/Framestein.cfg8
-rw-r--r--Source/Framestein.dof16
-rw-r--r--Source/pluginunit.pas2
-rw-r--r--Source/toolbarunit.dfm178
-rw-r--r--Source/toolbarunit.pas65
5 files changed, 163 insertions, 106 deletions
diff --git a/Source/Framestein.cfg b/Source/Framestein.cfg
index d487870..42e96f3 100644
--- a/Source/Framestein.cfg
+++ b/Source/Framestein.cfg
@@ -34,7 +34,7 @@
-E"e:\fs\Framestein"
-LE"c:\program files\borland\delphi5\Projects\Bpl"
-LN"c:\program files\borland\delphi5\Projects\Bpl"
--U"E:\lab\common\DelphiX2000_0717-2\Source;E:\lab\common\fastlib;E:\lab\common\pshost;E:\lab\common\G32"
--O"E:\lab\common\DelphiX2000_0717-2\Source;E:\lab\common\fastlib;E:\lab\common\pshost;E:\lab\common\G32"
--I"E:\lab\common\DelphiX2000_0717-2\Source;E:\lab\common\fastlib;E:\lab\common\pshost;E:\lab\common\G32"
--R"E:\lab\common\DelphiX2000_0717-2\Source;E:\lab\common\fastlib;E:\lab\common\pshost;E:\lab\common\G32"
+-U"E:\lab\common\DelphiX2000_0717-2\Source;E:\lab\common\fastlib;E:\lab\common\pshost;E:\lab\common\G32;E:\fs\Framestein\Source"
+-O"E:\lab\common\DelphiX2000_0717-2\Source;E:\lab\common\fastlib;E:\lab\common\pshost;E:\lab\common\G32;E:\fs\Framestein\Source"
+-I"E:\lab\common\DelphiX2000_0717-2\Source;E:\lab\common\fastlib;E:\lab\common\pshost;E:\lab\common\G32;E:\fs\Framestein\Source"
+-R"E:\lab\common\DelphiX2000_0717-2\Source;E:\lab\common\fastlib;E:\lab\common\pshost;E:\lab\common\G32;E:\fs\Framestein\Source"
diff --git a/Source/Framestein.dof b/Source/Framestein.dof
index 26929b1..ef8795e 100644
--- a/Source/Framestein.dof
+++ b/Source/Framestein.dof
@@ -43,7 +43,7 @@ OutputDir=e:\fs\Framestein
UnitOutputDir=
PackageDLLOutputDir=
PackageDCPOutputDir=
-SearchPath=E:\lab\common\DelphiX2000_0717-2\Source;E:\lab\common\fastlib;E:\lab\common\pshost;E:\lab\common\G32
+SearchPath=E:\lab\common\DelphiX2000_0717-2\Source;E:\lab\common\fastlib;E:\lab\common\pshost;E:\lab\common\G32;E:\fs\Framestein\Source
Packages=Vcl50;Vclx50;VclSmp50;Qrpt50;Vcldb50;Vclbde50;ibevnt50;vcldbx50;TeeUI50;TeeDB50;Tee50;TeeQR50;VCLIB50;vclie50;Inetdb50;Inet50;NMFast50;dclocx50;dclaxserver50;DelphiX_for5;fspak
Conditionals=
DebugSourceDirs=
@@ -84,12 +84,14 @@ Comments=
Count=1
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
[HistoryLists\hlSearchPath]
-Count=5
-Item0=E:\lab\common\DelphiX2000_0717-2\Source;E:\lab\common\fastlib;E:\lab\common\pshost;E:\lab\common\G32
-Item1=E:\lab\common\DelphiX2000_0717-2\Source;E:\lab\common\fastlib;E:\lab\common\pshost;E:\lab\common\G32\Packages
-Item2=E:\lab\common\DelphiX2000_0717-2\Source;E:\lab\common\fastlib;E:\lab\common\pshost
-Item3=E:\lab\common\DelphiX2000_0717-2\Source;E:\lab\common\fastlib
-Item4=E:\lab\common\DelphiX2000_0717-2\Source
+Count=7
+Item0=e:\lab\common\fastlib;e:\lab\common\pshost;e:\lab\common\G32;e:\fs\framestein\source
+Item1=E:\lab\common\DelphiX2000_0717-2\Source;E:\lab\common\fastlib;E:\lab\common\pshost;E:\lab\common\G32;e:\fs\framestein\source
+Item2=e:\lab\common\fastlib;e:\lab\common\pshost;e:\lab\common\G32
+Item3=g:\lab\common\fastlib;G:\lab\common\pshost;G:\lab\common\G32
+Item4=g:\lab\common\fastlib;G:\lab\common\pshost
+Item5=g:\lab\common\fastlib
+Item6=g:\lab\common;g:\lab\common\DelphiX2000_0717-2\Source;g:\lab\common\fastlib;g:\lab\common\pshost;g:\lab\common\G32;g:\lab\common\fastlib
[HistoryLists\hlOutputDirectorry]
Count=1
Item0=e:\fs\Framestein
diff --git a/Source/pluginunit.pas b/Source/pluginunit.pas
index f331ed8..12d7465 100644
--- a/Source/pluginunit.pas
+++ b/Source/pluginunit.pas
@@ -159,7 +159,7 @@ begin
if s<>'' then s:=s+' ';
s:=s+Names[i];
end;
- main.Post('Plugins ('+IntToStr(Names.Count)+' loaded): '+s);
+// main.Post('Plugins ('+IntToStr(Names.Count)+' loaded): '+s);
end;
end;
diff --git a/Source/toolbarunit.dfm b/Source/toolbarunit.dfm
index 5cd6673..aa778f0 100644
--- a/Source/toolbarunit.dfm
+++ b/Source/toolbarunit.dfm
@@ -1,10 +1,9 @@
object toolbar: Ttoolbar
Left = 264
- Top = 454
- Width = 567
- Height = 282
+ Top = 234
+ Width = 325
+ Height = 493
BorderStyle = bsSizeToolWin
- Caption = 'Toolbar'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@@ -15,90 +14,113 @@ object toolbar: Ttoolbar
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
- object Splitter1: TSplitter
- Left = 0
- Top = 97
- Width = 559
- Height = 6
- Cursor = crVSplit
- Align = alTop
- Beveled = True
- end
- object Panel1: TPanel
+ object bar: TStatusBar
Left = 0
- Top = 103
- Width = 559
- Height = 133
- Align = alClient
- BevelOuter = bvNone
- Caption = 'Panel1'
- TabOrder = 0
- object LVFilters: TListView
- Left = 0
- Top = 0
- Width = 559
- Height = 133
- Align = alClient
- BorderStyle = bsNone
- Color = clBtnFace
- Columns = <
- item
- AutoSize = True
- Caption = 'Name'
- end
- item
- AutoSize = True
- Caption = 'Info'
- end>
- ReadOnly = True
- TabOrder = 0
- ViewStyle = vsList
- OnChange = LVFiltersChange
- OnCustomDrawItem = LVFiltersCustomDrawItem
- OnSelectItem = LVFiltersSelectItem
- end
+ Top = 447
+ Width = 317
+ Height = 19
+ Panels = <>
+ SimplePanel = False
end
- object Panel2: TPanel
+ object Panel3: TPanel
Left = 0
Top = 0
- Width = 559
- Height = 97
- Align = alTop
+ Width = 317
+ Height = 447
+ Align = alClient
BevelOuter = bvNone
- Caption = 'Panel2'
+ Caption = 'Panel3'
TabOrder = 1
- object LVTools: TListView
+ object PageControl1: TPageControl
Left = 0
Top = 0
- Width = 559
- Height = 97
- Align = alClient
- BorderStyle = bsNone
- Color = clBtnFace
- Columns = <>
- ReadOnly = True
+ Width = 318
+ Height = 448
+ ActivePage = TabSheet1
+ Anchors = [akLeft, akTop, akRight, akBottom]
TabOrder = 0
- ViewStyle = vsList
- OnChange = LVFiltersChange
- OnCustomDrawItem = LVFiltersCustomDrawItem
- OnSelectItem = LVToolsSelectItem
- end
- object m1: TMemo
- Left = 144
- Top = 8
- Width = 129
- Height = 33
- TabOrder = 1
- Visible = False
- WordWrap = False
+ object TabSheet1: TTabSheet
+ Caption = 'Tools'
+ object Panel2: TPanel
+ Left = 0
+ Top = 0
+ Width = 310
+ Height = 420
+ Align = alClient
+ BevelOuter = bvNone
+ Caption = 'Panel2'
+ TabOrder = 0
+ object LVTools: TListView
+ Left = 0
+ Top = 0
+ Width = 310
+ Height = 420
+ Align = alClient
+ BorderStyle = bsNone
+ Color = clBtnFace
+ Columns = <>
+ ReadOnly = True
+ TabOrder = 0
+ ViewStyle = vsList
+ OnChange = LVFiltersChange
+ OnCustomDrawItem = LVFiltersCustomDrawItem
+ OnSelectItem = LVToolsSelectItem
+ end
+ object m1: TMemo
+ Left = 16
+ Top = 8
+ Width = 129
+ Height = 33
+ TabOrder = 1
+ Visible = False
+ WordWrap = False
+ end
+ end
+ end
+ object TabSheet2: TTabSheet
+ Caption = 'Filters'
+ ImageIndex = 1
+ object Panel1: TPanel
+ Left = 0
+ Top = 0
+ Width = 310
+ Height = 420
+ Align = alClient
+ BevelOuter = bvNone
+ Caption = 'Panel1'
+ TabOrder = 0
+ object LVFilters: TListView
+ Left = 0
+ Top = 0
+ Width = 310
+ Height = 420
+ Align = alClient
+ BorderStyle = bsNone
+ Color = clBtnFace
+ Columns = <
+ item
+ AutoSize = True
+ Caption = 'Name'
+ end
+ item
+ AutoSize = True
+ Caption = 'Info'
+ end>
+ ReadOnly = True
+ SortType = stText
+ TabOrder = 0
+ ViewStyle = vsList
+ OnChange = LVFiltersChange
+ OnCustomDrawItem = LVFiltersCustomDrawItem
+ OnSelectItem = LVFiltersSelectItem
+ end
+ end
+ end
end
end
- object bar: TStatusBar
- Left = 0
- Top = 236
- Width = 559
- Height = 19
- Panels = <>
- SimplePanel = False
+ object sd: TScanDir
+ OnHandleFile = sdHandleFile
+ Left = 104
+ Top = 7
end
end
diff --git a/Source/toolbarunit.pas b/Source/toolbarunit.pas
index 5449b53..c479260 100644
--- a/Source/toolbarunit.pas
+++ b/Source/toolbarunit.pas
@@ -4,17 +4,22 @@ interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- ComCtrls, ToolWin, Buttons, ExtCtrls, StdCtrls, ImgList;
+ ComCtrls, ToolWin, Buttons, ExtCtrls, StdCtrls, ImgList,
+ SendKeys, Filez;
type
Ttoolbar = class(TForm)
- Panel1: TPanel;
- LVFilters: TListView;
+ bar: TStatusBar;
+ sd: TScanDir;
+ Panel3: TPanel;
+ PageControl1: TPageControl;
+ TabSheet1: TTabSheet;
+ TabSheet2: TTabSheet;
Panel2: TPanel;
LVTools: TListView;
- Splitter1: TSplitter;
- bar: TStatusBar;
m1: TMemo;
+ Panel1: TPanel;
+ LVFilters: TListView;
procedure FormCreate(Sender: TObject);
procedure LVFiltersCustomDrawItem(Sender: TCustomListView;
Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
@@ -24,8 +29,11 @@ type
Selected: Boolean);
procedure LVToolsSelectItem(Sender: TObject; Item: TListItem;
Selected: Boolean);
+ procedure sdHandleFile(const SearchRec: TSearchRec;
+ const FullPath: String);
private
{ Private declarations }
+ SendKey: TSendKey;
public
{ Public declarations }
end;
@@ -40,6 +48,18 @@ uses
{$R *.DFM}
+procedure Ttoolbar.sdHandleFile(const SearchRec: TSearchRec;
+ const FullPath: String);
+begin
+ if ExtractFileExt(UpperCase(FullPath))<>'.8BF' then Exit;
+
+ with LVFilters.Items.Add do begin
+ Caption := ExtractFileName(FullPath);
+ Caption := Copy(Caption, 1, Length(Caption)-4);
+ Data := Pointer(-1);
+ end;
+end;
+
procedure Ttoolbar.FormCreate(Sender: TObject);
var
i: Integer;
@@ -56,7 +76,7 @@ begin
end;
end;
- // Load filters
+ // Load plugins
if main.Plugins.Names.Count>0 then
for i:=0 to main.Plugins.Names.Count-1 do begin
with LVFilters.Items.Add do begin
@@ -65,6 +85,11 @@ begin
Data := Pointer(i);
end;
end;
+
+ // Load photoshop-filters
+ sd.Scan(main.FSFolder+'\Filters');
+
+ SendKey := TSendKey.Create(Self);
Show;
end;
@@ -83,7 +108,7 @@ procedure Ttoolbar.LVFiltersCustomDrawItem(Sender: TCustomListView;
Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
var
Title: array[0..255] of Char;
- s, cmd: String;
+ s: String;
h: THandle;
begin
if (it=nil) or (Item.Caption='') then Exit;
@@ -97,10 +122,13 @@ begin
if Pos('*', S)>0 then Delete(S, Pos('*', S), 255);
// main.Post(Item.Caption+' -> '+S);
if Item.ListView=LVFilters then
- cmd := 'msg'
- else
- cmd := 'obj';
- main.SendReturnValues('obj pd-'+S+'='+cmd+' 10 10 '+Item.Caption+';');
+ main.SendReturnValues('obj pd-'+S+'=msg 10 10 '+Item.Caption+';')
+ else begin
+ SendKey.Delay := 100;
+ SendKey.TitleText := S;
+ SendKey.Keys := '{^1}'+Item.Caption;
+ SendKey.execute;
+ end;
Item.ListView.Selected := nil;
end;
end;
@@ -110,13 +138,18 @@ end;
procedure Ttoolbar.LVFiltersSelectItem(Sender: TObject; Item: TListItem;
Selected: Boolean);
var
+ i: Longint;
S: String;
begin
- S := main.Plugins.Info(Integer(Item.Data));
- if S='' then
- bar.SimpleText := '<no info available>'
- else
- bar.SimpleText := Item.Caption+': '+S;
+ i := Longint(Item.Data);
+ if i=-1 then bar.SimpleText := Item.Caption+': Photoshop-filter'
+ else begin
+ S := main.Plugins.Info(i);
+ if S='' then
+ bar.SimpleText := Item.Caption+': <no info available>'
+ else
+ bar.SimpleText := Item.Caption+': '+S;
+ end;
end;
procedure Ttoolbar.LVToolsSelectItem(Sender: TObject; Item: TListItem;