diff options
author | Andrew Haines <andrewd207@aol.com> | 2010-08-15 09:22:59 -0400 |
---|---|---|
committer | Andrew Haines <andrewd207@aol.com> | 2010-08-15 09:22:59 -0400 |
commit | 917a2daf4ff769ad27631e6c71a7b919c47e4ecb (patch) | |
tree | c524983404bd70c97c17395995f962cdf41899cc /extras/tiopf/demos | |
parent | 77245bbf79e8568ba143cd7654e8aba352253a81 (diff) | |
parent | 59df247d7a5ff46cc8ac697526510b2ff6cbe5d2 (diff) | |
download | fpGUI-917a2daf4ff769ad27631e6c71a7b919c47e4ecb.tar.xz |
Merge branch 'master' of ssh://fpgui.git.sourceforge.net/gitroot/fpgui/fpgui
Diffstat (limited to 'extras/tiopf/demos')
29 files changed, 122 insertions, 136 deletions
diff --git a/extras/tiopf/demos/Common/Model_View.pas b/extras/tiopf/demos/Common/Model_View.pas index ad027534..ceac389f 100644 --- a/extras/tiopf/demos/Common/Model_View.pas +++ b/extras/tiopf/demos/Common/Model_View.pas @@ -13,7 +13,7 @@ uses type { TMemo - Name } - TPerson_Name_Memo_Mediator = class(TMediatorMemoView) + TPerson_Name_Memo_Mediator = class(TtiMemoMediatorView) protected procedure SetupGUIandObject; override; end; @@ -40,7 +40,7 @@ end; procedure TPerson_Name_Memo_Mediator.SetupGUIandObject; begin inherited SetupGUIandObject; - EditControl.Enabled := False; // fpGUI doesn't have a ReadOnly property yet + View.Enabled := False; // fpGUI doesn't have a ReadOnly property yet end; diff --git a/extras/tiopf/demos/Common/frm_pickdatabase.pas b/extras/tiopf/demos/Common/frm_pickdatabase.pas index de215829..7dcee309 100644 --- a/extras/tiopf/demos/Common/frm_pickdatabase.pas +++ b/extras/tiopf/demos/Common/frm_pickdatabase.pas @@ -226,7 +226,6 @@ begin ImageMargin := 3; ImageName := ''; ImageSpacing := -1; - ModalResult := 0; ParentShowHint := True; ShowImage := True; TabOrder := 0; @@ -349,7 +348,6 @@ begin ImageMargin := 3; ImageName := ''; ImageSpacing := -1; - ModalResult := 0; ParentShowHint := True; ShowImage := True; TabOrder := 11; diff --git a/extras/tiopf/demos/Demo_04_CreateDatabase/demo_04.lpi b/extras/tiopf/demos/Demo_04_CreateDatabase/demo_04.lpi index d2059b58..34df30b5 100644 --- a/extras/tiopf/demos/Demo_04_CreateDatabase/demo_04.lpi +++ b/extras/tiopf/demos/Demo_04_CreateDatabase/demo_04.lpi @@ -1,11 +1,11 @@ <?xml version="1.0"?> <CONFIG> <ProjectOptions> - <PathDelim Value="/"/> - <Version Value="6"/> + <Version Value="7"/> <General> <Flags> <SaveOnlyProjectUnits Value="True"/> + <LRSInOutputDirectory Value="False"/> </Flags> <SessionStorage Value="InProjectDir"/> <MainUnit Value="0"/> @@ -56,6 +56,7 @@ <Version Value="8"/> <SearchPaths> <OtherUnitFiles Value="../Common/"/> + <UnitOutputDirectory Value="units/$(TargetCPU)-$(TargetOS)"/> </SearchPaths> <Parsing> <SyntaxOptions> @@ -63,8 +64,6 @@ </SyntaxOptions> </Parsing> <Other> - <CustomOptions Value="-FUunits -"/> <CompilerPath Value="$(CompPath)"/> </Other> </CompilerOptions> diff --git a/extras/tiopf/demos/Demo_04_CreateDatabase/frm_main.pas b/extras/tiopf/demos/Demo_04_CreateDatabase/frm_main.pas index 4bd0c9ab..cee11cd0 100644 --- a/extras/tiopf/demos/Demo_04_CreateDatabase/frm_main.pas +++ b/extras/tiopf/demos/Demo_04_CreateDatabase/frm_main.pas @@ -108,7 +108,6 @@ begin ImageMargin := 3; ImageName := ''; ImageSpacing := -1; - ModalResult := 0; ParentShowHint := True; ShowImage := True; TabOrder := 0; @@ -131,7 +130,6 @@ begin ImageMargin := 3; ImageName := ''; ImageSpacing := -1; - ModalResult := 0; ParentShowHint := True; ShowImage := True; TabOrder := 1; @@ -154,7 +152,6 @@ begin ImageMargin := 3; ImageName := ''; ImageSpacing := -1; - ModalResult := 0; ParentShowHint := True; ShowImage := True; TabOrder := 2; diff --git a/extras/tiopf/demos/Demo_06_CreateTable/demo_06.lpi b/extras/tiopf/demos/Demo_06_CreateTable/demo_06.lpi index 3e2e075a..4a8402a2 100644 --- a/extras/tiopf/demos/Demo_06_CreateTable/demo_06.lpi +++ b/extras/tiopf/demos/Demo_06_CreateTable/demo_06.lpi @@ -1,17 +1,16 @@ <?xml version="1.0"?> <CONFIG> <ProjectOptions> - <PathDelim Value="/"/> - <Version Value="6"/> + <Version Value="7"/> <General> <Flags> <SaveOnlyProjectUnits Value="True"/> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <LRSInOutputDirectory Value="False"/> </Flags> <SessionStorage Value="InProjectDir"/> <MainUnit Value="0"/> - <IconPath Value="./"/> <TargetFileExt Value=""/> </General> <VersionInfo> @@ -48,6 +47,9 @@ </ProjectOptions> <CompilerOptions> <Version Value="8"/> + <SearchPaths> + <UnitOutputDirectory Value="units/$(TargetCPU)-$(TargetOS)"/> + </SearchPaths> <Parsing> <SyntaxOptions> <AllowLabel Value="False"/> @@ -55,8 +57,7 @@ </SyntaxOptions> </Parsing> <Other> - <CustomOptions Value="-FUunits --dUseCThreads"/> + <CustomOptions Value="-dUseCThreads"/> <CompilerPath Value="$(CompPath)"/> </Other> </CompilerOptions> diff --git a/extras/tiopf/demos/Demo_07_VisitorBasics/demo_07.lpi b/extras/tiopf/demos/Demo_07_VisitorBasics/demo_07.lpi index a4d89aea..10179042 100644 --- a/extras/tiopf/demos/Demo_07_VisitorBasics/demo_07.lpi +++ b/extras/tiopf/demos/Demo_07_VisitorBasics/demo_07.lpi @@ -1,17 +1,16 @@ <?xml version="1.0"?> <CONFIG> <ProjectOptions> - <PathDelim Value="/"/> - <Version Value="6"/> + <Version Value="7"/> <General> <Flags> <SaveOnlyProjectUnits Value="True"/> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <LRSInOutputDirectory Value="False"/> </Flags> <SessionStorage Value="InProjectDir"/> <MainUnit Value="0"/> - <IconPath Value="./"/> <TargetFileExt Value=""/> </General> <VersionInfo> @@ -54,6 +53,9 @@ </ProjectOptions> <CompilerOptions> <Version Value="8"/> + <SearchPaths> + <UnitOutputDirectory Value="units/$(TargetCPU)-$(TargetOS)"/> + </SearchPaths> <Parsing> <SyntaxOptions> <AllowLabel Value="False"/> @@ -61,8 +63,7 @@ </SyntaxOptions> </Parsing> <Other> - <CustomOptions Value="-FUunits --dUseCThreads"/> + <CustomOptions Value="-dUseCThreads"/> <CompilerPath Value="$(CompPath)"/> </Other> </CompilerOptions> diff --git a/extras/tiopf/demos/Demo_08_Collection/demo_08.lpi b/extras/tiopf/demos/Demo_08_Collection/demo_08.lpi index f8e27367..04d2b379 100644 --- a/extras/tiopf/demos/Demo_08_Collection/demo_08.lpi +++ b/extras/tiopf/demos/Demo_08_Collection/demo_08.lpi @@ -1,17 +1,16 @@ <?xml version="1.0"?> <CONFIG> <ProjectOptions> - <PathDelim Value="/"/> - <Version Value="6"/> + <Version Value="7"/> <General> <Flags> <SaveOnlyProjectUnits Value="True"/> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <LRSInOutputDirectory Value="False"/> </Flags> <SessionStorage Value="InProjectDir"/> <MainUnit Value="0"/> - <IconPath Value="./"/> <TargetFileExt Value=""/> </General> <VersionInfo> @@ -68,6 +67,9 @@ </ProjectOptions> <CompilerOptions> <Version Value="8"/> + <SearchPaths> + <UnitOutputDirectory Value="units/$(TargetCPU)-$(TargetOS)"/> + </SearchPaths> <Parsing> <SyntaxOptions> <AllowLabel Value="False"/> @@ -75,8 +77,7 @@ </SyntaxOptions> </Parsing> <Other> - <CustomOptions Value="-FUunits --dUseCThreads"/> + <CustomOptions Value="-dUseCThreads"/> <CompilerPath Value="$(CompPath)"/> </Other> </CompilerOptions> diff --git a/extras/tiopf/demos/Demo_08_Collection/frm_main.pas b/extras/tiopf/demos/Demo_08_Collection/frm_main.pas index 170ef96b..34241b17 100644 --- a/extras/tiopf/demos/Demo_08_Collection/frm_main.pas +++ b/extras/tiopf/demos/Demo_08_Collection/frm_main.pas @@ -10,7 +10,7 @@ uses fpg_listbox, fpg_memo, fpg_combobox, fpg_grid, fpg_dialogs, fpg_checkbox, fpg_tree, fpg_trackbar, fpg_progressbar, fpg_radiobutton, fpg_tab, fpg_menu, - fpg_panel, Client_BOM, tiFormMediator; + fpg_panel, Client_BOM, tiModelMediator; type @@ -31,7 +31,7 @@ type grdCollection: TfpgStringGrid; {@VFD_HEAD_END: MainForm} FClients: TClients; - FMediator: TFormMediator; + FMediator: TtiModelMediator; procedure MainFormShow(Sender: TObject); procedure CreateTable; procedure DropTable; @@ -112,7 +112,7 @@ procedure TMainForm.CreateMediators; begin if not Assigned(FMediator) then begin - FMediator := TFormMediator.Create(self); + FMediator := TtiModelMediator.Create(self); FMediator.AddComposite('ClientName(200,"Client name");ClientID(80,"Client ID")', grdCollection); end; FMediator.Subject := FClients; @@ -327,6 +327,6 @@ begin end; initialization - gMediatorManager.RegisterMediator(TStringGridMediator, TClients); + gMediatorManager.RegisterMediator(TtiStringGridMediatorView, TClients); end. diff --git a/extras/tiopf/demos/Demo_20_ListMediators/demo_listmediators.lpi b/extras/tiopf/demos/Demo_20_ListMediators/demo_listmediators.lpi index 5cfa02ee..ece8df27 100644 --- a/extras/tiopf/demos/Demo_20_ListMediators/demo_listmediators.lpi +++ b/extras/tiopf/demos/Demo_20_ListMediators/demo_listmediators.lpi @@ -1,15 +1,14 @@ <?xml version="1.0"?> <CONFIG> <ProjectOptions> - <PathDelim Value="/"/> - <Version Value="6"/> + <Version Value="7"/> <General> <Flags> <SaveOnlyProjectUnits Value="True"/> + <LRSInOutputDirectory Value="False"/> </Flags> <SessionStorage Value="InProjectDir"/> <MainUnit Value="0"/> - <IconPath Value="./"/> <TargetFileExt Value=""/> </General> <VersionInfo> @@ -64,6 +63,7 @@ <Version Value="8"/> <SearchPaths> <OtherUnitFiles Value="../Common/"/> + <UnitOutputDirectory Value="units/$(TargetCPU)-$(TargetOS)"/> </SearchPaths> <Parsing> <SyntaxOptions> @@ -77,8 +77,6 @@ <LinkSmart Value="True"/> </Linking> <Other> - <CustomOptions Value="-FUunits -"/> <CompilerPath Value="$(CompPath)"/> </Other> </CompilerOptions> diff --git a/extras/tiopf/demos/Demo_20_ListMediators/frmMain.pas b/extras/tiopf/demos/Demo_20_ListMediators/frmMain.pas index 85a51e30..f186340b 100644 --- a/extras/tiopf/demos/Demo_20_ListMediators/frmMain.pas +++ b/extras/tiopf/demos/Demo_20_ListMediators/frmMain.pas @@ -7,7 +7,7 @@ interface uses SysUtils, Classes, fpg_base, fpg_main, fpg_widget, fpg_form, fpg_button, fpg_grid, fpg_checkbox, fpg_panel, fpg_listview, fpg_listbox, fpg_combobox, - Model, tiFormMediator, tiMediators; + Model, tiModelMediator, tiMediators; type @@ -15,9 +15,8 @@ type private { The object we will be working with. } FPersonList: TPersonList; - FMediator: TFormMediator; - medCombo: TMediatorComboBoxView; - + FMediator: TtiModelMediator; + medCombo: TtiComboBoxMediatorView; procedure btnViaCodeChangeClick(Sender: TObject); procedure btnQuitClicked(Sender: TObject); procedure btnViaCodeAddClick(Sender: TObject); @@ -89,17 +88,17 @@ end; procedure TMainForm.btnShowDeletedClick(Sender: TObject); var - med: TMediatorView; + med: TtiMediatorView; begin med := FMediator.FindByComponent(grdName1).Mediator; - tiShowString(TStringGridMediator(med).SelectedObject.AsDebugString); + tiShowString(TtiStringGridMediatorView(med).SelectedObject.AsDebugString); end; procedure TMainForm.SetupMediators; begin if not Assigned(FMediator) then begin - FMediator := TFormMediator.Create(self); + FMediator := TtiModelMediator.Create(self); FMediator.Name := 'DemoFormMediator'; FMediator.AddComposite('Name(150,"Name",<);Age(50,"Age",>);GenderGUI(80,"Gender",|)', grdName1); // FMediator.AddComposite('Name(150,"Name",<);Age(75,"Age",>);GenderGUI(50,"Gender",|)', lvName1); @@ -271,7 +270,7 @@ end; initialization - gMediatorManager.RegisterMediator(TStringGridMediator, TtiObjectList); + gMediatorManager.RegisterMediator(TtiStringGridMediatorView, TtiObjectList); // gMediatorManager.RegisterMediator(TListBoxMediator, TPersonList); // gMediatorManager.RegisterMediator(TListViewMediator, TtiObjectList); diff --git a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/demo_adrsbook_mgm.lpi b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/demo_adrsbook_mgm.lpi index b497cf84..6f88bb12 100644 --- a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/demo_adrsbook_mgm.lpi +++ b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/demo_adrsbook_mgm.lpi @@ -81,6 +81,9 @@ </ProjectOptions> <CompilerOptions> <Version Value="8"/> + <SearchPaths> + <UnitOutputDirectory Value="units/$(TargetCPU)-$(TargetOS)"/> + </SearchPaths> <Parsing> <SyntaxOptions> <CStyleOperator Value="False"/> @@ -89,7 +92,7 @@ </SyntaxOptions> </Parsing> <Other> - <CustomOptions Value="-FUunits + <CustomOptions Value=" "/> <CompilerPath Value="$(CompPath)"/> </Other> diff --git a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmaddressmaint.pas b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmaddressmaint.pas index b8212b3d..931b36c5 100644 --- a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmaddressmaint.pas +++ b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmaddressmaint.pas @@ -8,7 +8,7 @@ uses SysUtils, Classes, fpg_base, fpg_main, fpg_edit, fpg_widget, fpg_form, fpg_label, fpg_button, fpg_combobox, fpg_dialogs, fpg_menu, - model, tiFormMediator; + model, tiModelMediator; type TAddressEditForm = class(TfpgForm) @@ -32,7 +32,7 @@ type btnCancel: TfpgButton; {@VFD_HEAD_END: AddressEditForm} FData: TAddress; - FMediator: TFormMediator; + FMediator: TtiModelMediator; procedure SetData(const AValue: TAddress); procedure SetupMediators; public @@ -76,7 +76,7 @@ procedure TAddressEditForm.SetupMediators; begin if not Assigned(FMediator) then begin - FMediator := TFormMediator.Create(self); + FMediator := TtiModelMediator.Create(self); FMediator.AddProperty('AddressType', cbType).ValueList := gContactManager.AddressTypeList; FMediator.AddProperty('Nr', edNo); FMediator.AddProperty('Street', edStreet); diff --git a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcitylist.pas b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcitylist.pas index f14c13ee..522362d1 100644 --- a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcitylist.pas +++ b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcitylist.pas @@ -9,7 +9,7 @@ uses fpg_widget, fpg_form, fpg_button, fpg_grid, fpg_dialogs, fpg_menu, fpg_panel, - tiFormMediator, model; + tiModelMediator, model; type @@ -24,7 +24,7 @@ type btnCancel: TfpgButton; {@VFD_HEAD_END: CityListForm} FData: TCityList; - FMediator: TFormMediator; + FMediator: TtiModelMediator; procedure SetData(const AValue: TCityList); procedure SetupMediators; procedure btnEditClicked(Sender: TObject); @@ -63,7 +63,7 @@ procedure TCityListForm.SetupMediators; begin if not Assigned(FMediator) then begin - FMediator := TFormMediator.Create(self); + FMediator := TtiModelMediator.Create(self); FMediator.AddComposite('Name(110);Zip(80);CountryAsString(150)', grdName1); end; FMediator.Subject := FData; @@ -74,7 +74,7 @@ procedure TCityListForm.btnEditClicked(Sender: TObject); var c: TCity; begin - c := TCity(TStringGridMediator(FMediator.FindByComponent(grdName1).Mediator).SelectedObject); + c := TCity(TtiStringGridMediatorView(FMediator.FindByComponent(grdName1).Mediator).SelectedObject); // tiShowString(c.AsDebugString); if not Assigned(c) then diff --git a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcitymaint.pas b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcitymaint.pas index 31a6326d..1b6f27f7 100644 --- a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcitymaint.pas +++ b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcitymaint.pas @@ -8,7 +8,7 @@ uses SysUtils, Classes, fpg_base, fpg_main, fpg_edit, fpg_widget, fpg_form, fpg_label, fpg_button, fpg_dialogs, fpg_combobox, - model, tiFormMediator; + model, tiModelMediator; type @@ -25,7 +25,7 @@ type btnCancel: TfpgButton; btnDebug: TfpgButton; {@VFD_HEAD_END: CityEditForm} - FMediator: TFormMediator; + FMediator: TtiModelMediator; FData: TCity; procedure SetData(const AValue: TCity); procedure SetupMediators; @@ -72,7 +72,7 @@ procedure TCityEditForm.SetupMediators; begin if not Assigned(FMediator) then begin - FMediator := TFormMediator.Create(self); + FMediator := TtiModelMediator.Create(self); FMediator.AddProperty('Name', edName); FMediator.AddProperty('ZIP', edZIP); FMediator.AddProperty('Country', cbCountry).ValueList := gContactManager.CountryList; diff --git a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcontactmaint.pas b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcontactmaint.pas index 5832af55..8bd46e31 100644 --- a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcontactmaint.pas +++ b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcontactmaint.pas @@ -8,7 +8,7 @@ uses SysUtils, Classes, fpg_base, fpg_main, fpg_edit, fpg_widget, fpg_form, fpg_label, fpg_button, fpg_listview, fpg_memo, - model, tiFormMediator; + model, tiModelMediator; type @@ -35,8 +35,8 @@ type btnDebug: TfpgButton; {@VFD_HEAD_END: ContactEditForm} FData: TContact; - FMediator: TFormMediator; - FAdrsMediator: TFormMediator; + FMediator: TtiModelMediator; + FAdrsMediator: TtiModelMediator; procedure SetData(const AValue: TContact); procedure SetupMediators; procedure btnDebugClicked(Sender: TObject); @@ -77,7 +77,7 @@ procedure TContactEditForm.SetupMediators; begin if not Assigned(FMediator) then begin - FMediator := TFormMediator.Create(self); + FMediator := TtiModelMediator.Create(self); FMediator.AddProperty('FirstName', edFName); FMediator.AddProperty('LastName', edLName); FMediator.AddProperty('EMail', edEmail); @@ -89,7 +89,7 @@ begin if not Assigned(FAdrsMediator) then begin - FAdrsMediator := TFormMediator.Create(self); + FAdrsMediator := TtiModelMediator.Create(self); FAdrsMediator.AddComposite({'AddressType.Name;}'AddressType4GUI(50,"Type");Nr;Street;Telephone1', lvAddresses); end; FAdrsMediator.Subject := FData.AddressList; @@ -105,7 +105,7 @@ procedure TContactEditForm.btnEditClicked(Sender: TObject); var obj: TAddress; begin - obj := TAddress(TListViewMediator(FAdrsMediator.FindByComponent(lvAddresses).Mediator).SelectedObject); + obj := TAddress(TtiListViewMediatorView(FAdrsMediator.FindByComponent(lvAddresses).Mediator).SelectedObject); tiShowString(obj.AsDebugString); if not Assigned(obj) then diff --git a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcountrylist.pas b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcountrylist.pas index 0a6a6332..c9f54537 100644 --- a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcountrylist.pas +++ b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcountrylist.pas @@ -9,7 +9,7 @@ uses fpg_widget, fpg_form, fpg_button, fpg_grid, fpg_dialogs, fpg_menu, fpg_panel, - model, tiFormMediator; + model, tiModelMediator; type @@ -24,7 +24,7 @@ type btnCancel: TfpgButton; {@VFD_HEAD_END: CountryListForm} FData: TCountryList; - FMediator: TFormMediator; + FMediator: TtiModelMediator; procedure SetData(const AValue: TCountryList); procedure SetupMediators; procedure btnEditClicked(Sender: TObject); @@ -62,7 +62,7 @@ procedure TCountryListForm.SetupMediators; begin if not Assigned(FMediator) then begin - FMediator := TFormMediator.Create(self); + FMediator := TtiModelMediator.Create(self); FMediator.AddComposite('ISO(60);Name(110)', grdName1); end; FMediator.Subject := FData; diff --git a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmmain.pas b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmmain.pas index 374a971a..979e6592 100644 --- a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmmain.pas +++ b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmmain.pas @@ -10,7 +10,7 @@ uses fpg_base, fpg_main, fpg_widget, fpg_form, fpg_button, fpg_grid, fpg_dialogs, fpg_menu, { tiOPF } - tiFormMediator; + tiModelMediator; type { The main application window } @@ -26,7 +26,7 @@ type miEdit: TfpgPopupMenu; miSystem: TfpgPopupMenu; {@VFD_HEAD_END: MainForm} - FMediator: TFormMediator; + FMediator: TtiModelMediator; procedure FormShow(Sender: TObject); procedure GridDoubleClicked(Sender: TObject; AButton: TMouseButton; AShift: TShiftState; const AMousePos: TPoint); procedure SetupMediators; @@ -68,7 +68,7 @@ procedure TMainForm.SetupMediators; begin if not Assigned(FMediator) then begin - FMediator := TFormMediator.Create(self); + FMediator := TtiModelMediator.Create(self); FMediator.AddComposite('FirstName;LastName(130);EMail(180);Mobile(130);Comments(200)', grdContacts); end; FMediator.Subject := gContactManager.ContactList; @@ -95,7 +95,7 @@ begin tiAppError('You need to select a Contact first'); Exit; end; - c := TContact(TStringGridMediator(FMediator.FindByComponent(grdContacts).Mediator).SelectedObject); + c := TContact(TtiStringGridMediatorView(FMediator.FindByComponent(grdContacts).Mediator).SelectedObject); if not Assigned(c) then Exit; //==> @@ -115,7 +115,7 @@ begin tiAppError('You need to select a Contact first'); Exit; end; - c := TContact(TStringGridMediator(FMediator.FindByComponent(grdContacts).Mediator).SelectedObject); + c := TContact(TtiStringGridMediatorView(FMediator.FindByComponent(grdContacts).Mediator).SelectedObject); if tiAppConfirmation('Are you sure you want to delete <%s>', [c.FirstName + ' ' + c.LastName]) then begin @@ -266,11 +266,11 @@ end; initialization RegisterFallBackMediators; - gMediatorManager.RegisterMediator(TStringGridMediator, TContactList); - gMediatorManager.RegisterMediator(TListViewMediator, TAddressList); - gMediatorManager.RegisterMediator(TStringGridMediator, TCityList); - gMediatorManager.RegisterMediator(TStringGridMediator, TCountryList); - gMediatorManager.RegisterMediator(TMediatorDynamicComboBoxView, TCity, 'Country'); - gMediatorManager.RegisterMediator(TMediatorDynamicComboBoxView, TAddressType, 'AddressType'); + gMediatorManager.RegisterMediator(TtiStringGridMediatorView, TContactList); + gMediatorManager.RegisterMediator(TtiListViewMediatorView, TAddressList); + gMediatorManager.RegisterMediator(TtiStringGridMediatorView, TCityList); + gMediatorManager.RegisterMediator(TtiStringGridMediatorView, TCountryList); + gMediatorManager.RegisterMediator(TtiDynamicComboBoxMediatorView, TCity, 'Country'); + gMediatorManager.RegisterMediator(TtiDynamicComboBoxMediatorView, TAddressType, 'AddressType'); end. diff --git a/extras/tiopf/demos/Demo_TtiBaseObject/PerformanceTesting.lpi b/extras/tiopf/demos/Demo_TtiBaseObject/PerformanceTesting.lpi index 08c1bbe6..047ccf7a 100644 --- a/extras/tiopf/demos/Demo_TtiBaseObject/PerformanceTesting.lpi +++ b/extras/tiopf/demos/Demo_TtiBaseObject/PerformanceTesting.lpi @@ -1,15 +1,14 @@ <?xml version="1.0"?> <CONFIG> <ProjectOptions> - <PathDelim Value="/"/> - <Version Value="6"/> + <Version Value="7"/> <General> <Flags> <SaveOnlyProjectUnits Value="True"/> + <LRSInOutputDirectory Value="False"/> </Flags> <SessionStorage Value="InProjectDir"/> <MainUnit Value="0"/> - <IconPath Value="./"/> <TargetFileExt Value=""/> </General> <VersionInfo> @@ -48,9 +47,11 @@ </ProjectOptions> <CompilerOptions> <Version Value="8"/> + <SearchPaths> + <UnitOutputDirectory Value="units/$(TargetCPU)-$(TargetOS)"/> + </SearchPaths> <Other> - <CustomOptions Value="-FUunits --dUseCThreads + <CustomOptions Value="-dUseCThreads "/> <CompilerPath Value="$(CompPath)"/> </Other> diff --git a/extras/tiopf/demos/Demo_TtiBaseObject/performancetest.lpi b/extras/tiopf/demos/Demo_TtiBaseObject/performancetest.lpi index a7940dba..cf7d5e86 100644 --- a/extras/tiopf/demos/Demo_TtiBaseObject/performancetest.lpi +++ b/extras/tiopf/demos/Demo_TtiBaseObject/performancetest.lpi @@ -1,11 +1,12 @@ <?xml version="1.0"?> <CONFIG> <ProjectOptions> - <PathDelim Value="/"/> - <Version Value="6"/> + <Version Value="7"/> <General> + <Flags> + <LRSInOutputDirectory Value="False"/> + </Flags> <MainUnit Value="0"/> - <IconPath Value="./"/> <TargetFileExt Value=""/> <ActiveEditorIndexAtStart Value="0"/> </General> @@ -32,7 +33,7 @@ <IsPartOfProject Value="True"/> <UnitName Value="performancetest"/> <CursorPos X="1" Y="13"/> - <TopLine Value="43"/> + <TopLine Value="13"/> <EditorIndex Value="0"/> <UsageCount Value="20"/> <Loaded Value="True"/> @@ -42,12 +43,12 @@ <UnitName Value="frm_main"/> <CursorPos X="37" Y="85"/> <TopLine Value="65"/> - <EditorIndex Value="4"/> + <EditorIndex Value="2"/> <UsageCount Value="10"/> <Loaded Value="True"/> </Unit1> <Unit2> - <Filename Value="../../../../../../../../opt/fpc_2.2.0/src/packages/fcl-base/src/inc/custapp.pp"/> + <Filename Value="/opt/fpc_2.2.0/src/packages/fcl-base/src/inc/custapp.pp"/> <UnitName Value="CustApp"/> <CursorPos X="3" Y="26"/> <TopLine Value="11"/> @@ -72,25 +73,21 @@ <UnitName Value="tiBaseObject"/> <CursorPos X="1" Y="128"/> <TopLine Value="94"/> - <EditorIndex Value="3"/> + <EditorIndex Value="1"/> <UsageCount Value="10"/> <Loaded Value="True"/> </Unit5> <Unit6> - <Filename Value="../../../../../../../../opt/fpc_2.2.0/src/rtl/inc/objpash.inc"/> + <Filename Value="/opt/fpc_2.2.0/src/rtl/inc/objpash.inc"/> <CursorPos X="29" Y="220"/> <TopLine Value="212"/> - <EditorIndex Value="1"/> <UsageCount Value="10"/> - <Loaded Value="True"/> </Unit6> <Unit7> - <Filename Value="../../../../../../../../opt/fpc_2.2.0/src/rtl/inc/objpas.inc"/> + <Filename Value="/opt/fpc_2.2.0/src/rtl/inc/objpas.inc"/> <CursorPos X="9" Y="709"/> <TopLine Value="705"/> - <EditorIndex Value="2"/> <UsageCount Value="10"/> - <Loaded Value="True"/> </Unit7> <Unit8> <Filename Value="FMain.pas"/> diff --git a/extras/tiopf/demos/EditControlsDemo/editmediators.lpi b/extras/tiopf/demos/EditControlsDemo/editmediators.lpi index bceed7e6..0f0543c7 100644 --- a/extras/tiopf/demos/EditControlsDemo/editmediators.lpi +++ b/extras/tiopf/demos/EditControlsDemo/editmediators.lpi @@ -1,15 +1,14 @@ <?xml version="1.0"?> <CONFIG> <ProjectOptions> - <PathDelim Value="/"/> - <Version Value="6"/> + <Version Value="7"/> <General> <Flags> <SaveOnlyProjectUnits Value="True"/> + <LRSInOutputDirectory Value="False"/> </Flags> <SessionStorage Value="InProjectDir"/> <MainUnit Value="0"/> - <IconPath Value="./"/> <TargetFileExt Value=""/> <UseAppBundle Value="False"/> </General> @@ -65,10 +64,9 @@ <Version Value="8"/> <SearchPaths> <OtherUnitFiles Value="../Common/"/> + <UnitOutputDirectory Value="units/$(TargetCPU)-$(TargetOS)"/> </SearchPaths> <Other> - <CustomOptions Value="-FUunits -"/> <CompilerPath Value="$(CompPath)"/> </Other> </CompilerOptions> diff --git a/extras/tiopf/demos/EditControlsDemo/frmMain.pas b/extras/tiopf/demos/EditControlsDemo/frmMain.pas index 75719922..03749901 100644 --- a/extras/tiopf/demos/EditControlsDemo/frmMain.pas +++ b/extras/tiopf/demos/EditControlsDemo/frmMain.pas @@ -6,7 +6,7 @@ interface uses Classes, SysUtils, fpg_form, fpg_button, fpg_label, fpg_edit, fpg_trackbar, - fpg_combobox, fpg_memo, Model, tiFormMediator, Model_View; + fpg_combobox, fpg_memo, Model, tiModelMediator, Model_View; type TMainForm = class(TfpgForm) @@ -25,7 +25,7 @@ type { The object we will be working with. } FPerson: TPerson; { Form Mediator } - FMediator: TFormMediator; + FMediator: TtiModelMediator; procedure btnCloseClick(Sender: TObject); procedure btnShowModelClick(Sender: TObject); @@ -183,7 +183,7 @@ begin } if not Assigned(FMediator) then begin - FMediator := TFormMediator.Create(self); + FMediator := TtiModelMediator.Create(self); FMediator.Name := 'DemoFormMediator'; FMediator.AddProperty('Name', edtName); FMediator.AddProperty('Age', AgeTrackBar); diff --git a/extras/tiopf/demos/ListControlDemo/frmMain.pas b/extras/tiopf/demos/ListControlDemo/frmMain.pas index b95924e0..551a6b18 100644 --- a/extras/tiopf/demos/ListControlDemo/frmMain.pas +++ b/extras/tiopf/demos/ListControlDemo/frmMain.pas @@ -5,8 +5,8 @@ unit frmMain; interface uses - Classes, SysUtils, gui_form, gui_button, gui_label, gui_edit, gui_trackbar, - gui_combobox, gui_checkbox, gui_listbox, Model, + Classes, SysUtils, fpg_form, fpg_button, fpg_label, fpg_edit, fpg_trackbar, + fpg_combobox, fpg_checkbox, fpg_listbox, Model, tiGenericEditMediators, tiGenericListMediators; type diff --git a/extras/tiopf/demos/ListControlDemo/listcontroldemo.lpi b/extras/tiopf/demos/ListControlDemo/listcontroldemo.lpi index 57dc14b8..6faa819b 100644 --- a/extras/tiopf/demos/ListControlDemo/listcontroldemo.lpi +++ b/extras/tiopf/demos/ListControlDemo/listcontroldemo.lpi @@ -1,15 +1,14 @@ <?xml version="1.0"?> <CONFIG> <ProjectOptions> - <PathDelim Value="/"/> - <Version Value="6"/> + <Version Value="7"/> <General> <Flags> <SaveOnlyProjectUnits Value="True"/> + <LRSInOutputDirectory Value="False"/> </Flags> <SessionStorage Value="InProjectDir"/> <MainUnit Value="0"/> - <IconPath Value="./"/> <TargetFileExt Value=""/> </General> <VersionInfo> @@ -61,15 +60,13 @@ </Units> </ProjectOptions> <CompilerOptions> - <Version Value="5"/> + <Version Value="8"/> <SearchPaths> <OtherUnitFiles Value="../Common/"/> + <UnitOutputDirectory Value="units/$(TargetCPU)-$(TargetOS)"/> </SearchPaths> - <CodeGeneration> - <Generate Value="Faster"/> - </CodeGeneration> <Other> - <CustomOptions Value="-FUunits + <CustomOptions Value=" "/> <CompilerPath Value="$(CompPath)"/> </Other> diff --git a/extras/tiopf/demos/ListControlDemo/listcontroldemo.lpr b/extras/tiopf/demos/ListControlDemo/listcontroldemo.lpr index 0761498e..6455aa9b 100644 --- a/extras/tiopf/demos/ListControlDemo/listcontroldemo.lpr +++ b/extras/tiopf/demos/ListControlDemo/listcontroldemo.lpr @@ -6,7 +6,7 @@ uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} - Classes, fpgfx, frmMain, Model, Constants, Model_View; + Classes, fpg_base, fpg_main, frmMain, Model, Constants, Model_View; procedure MainProc; diff --git a/extras/tiopf/demos/StringGridMediatorDemo/frm_main.pas b/extras/tiopf/demos/StringGridMediatorDemo/frm_main.pas index 7adc3145..3878ad61 100644 --- a/extras/tiopf/demos/StringGridMediatorDemo/frm_main.pas +++ b/extras/tiopf/demos/StringGridMediatorDemo/frm_main.pas @@ -5,17 +5,17 @@ unit frm_main; interface uses - SysUtils, Classes, gfxbase, fpgfx, gui_edit, - gfx_widget, gui_form, gui_label, gui_button, - gui_basegrid, gui_grid, gui_menu, - gui_panel, gui_popupcalendar, gui_gauge, Model, tiCompositeMediators; + SysUtils, Classes, fpg_base, fpg_main, fpg_edit, + fpg_widget, fpg_form, fpg_label, fpg_button, + fpg_basegrid, fpg_grid, fpg_menu, + fpg_panel, fpg_popupcalendar, fpg_gauge, Model, tiListMediators; type TMainForm = class(TfpgForm) private FList: TPersonList; - medGrid: TCompositeStringGridMediator; + medGrid: TtiStringGridMediatorView; procedure SetupMediators; procedure ValidateData; procedure btnAddClicked(Sender: TObject); @@ -49,13 +49,13 @@ type implementation uses - gui_dialogs, frm_personmaint; + fpg_dialogs, frm_personmaint; {@VFD_NEWFORM_IMPL} procedure TMainForm.SetupMediators; begin - medGrid := TCompositeStringGridMediator.CreateCustom(FList, grdName1, 'Name(200);Age'); + medGrid := TtiStringGridMediatorView.CreateCustom(FList, grdName1, 'Name(200);Age'); end; procedure TMainForm.ValidateData; diff --git a/extras/tiopf/demos/StringGridMediatorDemo/frm_personmaint.pas b/extras/tiopf/demos/StringGridMediatorDemo/frm_personmaint.pas index 00296e96..96620e92 100644 --- a/extras/tiopf/demos/StringGridMediatorDemo/frm_personmaint.pas +++ b/extras/tiopf/demos/StringGridMediatorDemo/frm_personmaint.pas @@ -5,12 +5,9 @@ unit frm_personmaint; interface uses - SysUtils, Classes, gfxbase, fpgfx, gui_edit, - gfx_widget, gui_form, gui_label, gui_button, - gui_listbox, gui_memo, gui_combobox, gui_basegrid, gui_grid, - gui_dialogs, gui_checkbox, gui_tree, gui_trackbar, - gui_progressbar, gui_radiobutton, gui_tab, gui_menu, - gui_panel, gui_popupcalendar, gui_gauge, model, model_view; + SysUtils, Classes, fpg_base, fpg_main, fpg_edit, + fpg_form, fpg_label, fpg_button, + model, model_view; type diff --git a/extras/tiopf/demos/StringGridMediatorDemo/stringgridmediatordemo.lpi b/extras/tiopf/demos/StringGridMediatorDemo/stringgridmediatordemo.lpi index c7b38fd4..b18e4bf3 100644 --- a/extras/tiopf/demos/StringGridMediatorDemo/stringgridmediatordemo.lpi +++ b/extras/tiopf/demos/StringGridMediatorDemo/stringgridmediatordemo.lpi @@ -1,15 +1,14 @@ <?xml version="1.0"?> <CONFIG> <ProjectOptions> - <PathDelim Value="/"/> - <Version Value="6"/> + <Version Value="7"/> <General> <Flags> <SaveOnlyProjectUnits Value="True"/> + <LRSInOutputDirectory Value="False"/> </Flags> <SessionStorage Value="InProjectDir"/> <MainUnit Value="0"/> - <IconPath Value="./"/> <TargetFileExt Value=""/> </General> <VersionInfo> @@ -66,20 +65,18 @@ </Units> </ProjectOptions> <CompilerOptions> - <Version Value="5"/> + <Version Value="8"/> <SearchPaths> <OtherUnitFiles Value="../Common/"/> + <UnitOutputDirectory Value="units/$(TargetCPU)-$(TargetOS)"/> </SearchPaths> - <CodeGeneration> - <Generate Value="Faster"/> - </CodeGeneration> <Linking> <Debugging> <GenerateDebugInfo Value="True"/> </Debugging> </Linking> <Other> - <CustomOptions Value="-FUunits + <CustomOptions Value=" "/> <CompilerPath Value="$(CompPath)"/> </Other> diff --git a/extras/tiopf/demos/StringGridMediatorDemo/stringgridmediatordemo.lpr b/extras/tiopf/demos/StringGridMediatorDemo/stringgridmediatordemo.lpr index 2a0a31e3..366718b0 100644 --- a/extras/tiopf/demos/StringGridMediatorDemo/stringgridmediatordemo.lpr +++ b/extras/tiopf/demos/StringGridMediatorDemo/stringgridmediatordemo.lpr @@ -6,7 +6,7 @@ uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} - Classes, fpgfx, frm_main, Model, Constants, tiOPFfpGUI, frm_personmaint, + Classes, fpg_main, frm_main, Model, Constants, tiOPFfpGUI, frm_personmaint, Model_View; diff --git a/extras/tiopf/demos/rtf_reporting/demoproject.lpi b/extras/tiopf/demos/rtf_reporting/demoproject.lpi index ac6d8c87..dd154d16 100644 --- a/extras/tiopf/demos/rtf_reporting/demoproject.lpi +++ b/extras/tiopf/demos/rtf_reporting/demoproject.lpi @@ -1,11 +1,11 @@ <?xml version="1.0"?> <CONFIG> <ProjectOptions> - <PathDelim Value="/"/> - <Version Value="6"/> + <Version Value="7"/> <General> <Flags> <SaveOnlyProjectUnits Value="True"/> + <LRSInOutputDirectory Value="False"/> </Flags> <SessionStorage Value="InProjectDir"/> <MainUnit Value="0"/> @@ -46,8 +46,10 @@ </ProjectOptions> <CompilerOptions> <Version Value="8"/> + <SearchPaths> + <UnitOutputDirectory Value="units/$(TargetCPU)-$(TargetOS)"/> + </SearchPaths> <Other> - <CustomOptions Value="-FUunits"/> <CompilerPath Value="$(CompPath)"/> </Other> </CompilerOptions> |