From f1a223473d660b7234236e6af7d2582c2fdd6717 Mon Sep 17 00:00:00 2001 From: Wizzup? Date: Tue, 22 Sep 2009 08:14:43 +0000 Subject: [PATCH] DTM shell with some comments. git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@75 3f818213-9676-44b0-a9b4-5e4c4e03d09d --- Units/MMLCore/client.pas | 6 ++++- Units/MMLCore/dtm.pas | 57 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 Units/MMLCore/dtm.pas diff --git a/Units/MMLCore/client.pas b/Units/MMLCore/client.pas index 84bb6e4..51813ae 100644 --- a/Units/MMLCore/client.pas +++ b/Units/MMLCore/client.pas @@ -5,7 +5,7 @@ unit Client; interface uses - Classes, SysUtils, MufasaTypes, Window, Input, Files, Finder,Bitmaps; + Classes, SysUtils, MufasaTypes, Window, Input, Files, Finder, Bitmaps, dtm; type TClient = class(TObject) @@ -18,6 +18,7 @@ type MFiles: TMFiles; MFinder: TMFinder; MBitmaps : TMBitmaps; + MDTM: TMDTM; end; @@ -33,10 +34,12 @@ begin MFiles := TMFiles.Create; MFinder := TMFinder.Create(Self); MBitmaps := TMBitmaps.Create(self); + MDTM := MDTM.Create(self); end; destructor TClient.Destroy; begin + MDTM.Free; MBitmaps.Free; MFinder.Free; MFiles.Free; @@ -44,6 +47,7 @@ begin MWindow.Free; + inherited; end; diff --git a/Units/MMLCore/dtm.pas b/Units/MMLCore/dtm.pas new file mode 100644 index 0000000..766dd95 --- /dev/null +++ b/Units/MMLCore/dtm.pas @@ -0,0 +1,57 @@ +unit dtm; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils; + +type + TMDTM = class(TObject) + constructor Create(Owner: TObject); + destructor Destroy; override; + private + Client: TObject; + + end; + +{ + I am not sure wether I should simply copy and paste the old DTM implementation, + or rewrite it from scratch. + + I recall there was something partially wrong with SCAR-alike DTM conversions + to Mufasa DTM's... + + The old DTM system problaby doesn't perform that well, but seems to be quite + stable and complete. + + If I would rewrite it from scratch, it would probably be faster, and + hopefully more efficient.That won't be too hard, especially since I have + direct data access now. (TClient FTW!) + + Rewrite from scratch it will be, I guess. + And AreaShape will be turned into a {$I }, inline simply doesn't cut it. + + ~Wizz +} + +implementation +uses + Client; + +constructor TMDTM.Create(Owner: TObject); +begin + inherited Create; + Self.Client := Owner; +end; + +destructor TMDTM.Destroy; + +begin + //Something + inherited Destroy; +end; + +end. +