diff options
Diffstat (limited to 'extras')
-rw-r--r-- | extras/contributed/ats/ats_editor.lpi | 27 | ||||
-rw-r--r-- | extras/contributed/ats/ats_editor.pas | 278 | ||||
-rw-r--r-- | extras/contributed/ats/ats_main.pas | 18 | ||||
-rw-r--r-- | extras/contributed/ats/ptrparsefunc.pas | 2 | ||||
-rw-r--r-- | extras/contributed/ats/readme.txt | 31 | ||||
-rw-r--r-- | extras/contributed/editgrid/u_editgrid.pas | 20 | ||||
-rw-r--r-- | extras/contributed/nicegrid/extrafpc.cfg | 10 | ||||
-rw-r--r-- | extras/contributed/nicegrid/fpg_nicegrid.pas | 6 | ||||
-rw-r--r-- | extras/contributed/nicegrid/main1.pas | 10 | ||||
-rw-r--r-- | extras/contributed/nicegrid/nicegrid1.project | 68 |
10 files changed, 388 insertions, 82 deletions
diff --git a/extras/contributed/ats/ats_editor.lpi b/extras/contributed/ats/ats_editor.lpi index 16f21757..f84d4956 100644 --- a/extras/contributed/ats/ats_editor.lpi +++ b/extras/contributed/ats/ats_editor.lpi @@ -1,7 +1,7 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="7"/> + <Version Value="9"/> <General> <Flags> <SaveOnlyProjectUnits Value="True"/> @@ -11,12 +11,14 @@ </Flags> <SessionStorage Value="InProjectDir"/> <MainUnit Value="0"/> - <TargetFileExt Value=""/> <ResourceType Value="res"/> </General> <VersionInfo> - <ProjectVersion Value=""/> + <StringTable ProductVersion=""/> </VersionInfo> + <BuildModes Count="1"> + <Item1 Name="default" Default="True"/> + </BuildModes> <PublishOptions> <Version Value="2"/> <IgnoreBinaries Value="False"/> @@ -57,10 +59,17 @@ </Units> </ProjectOptions> <CompilerOptions> - <Version Value="8"/> - <Other> - <CustomOptions Value="-FUunits/$(TargetCPU)-$(TargetOS)/"/> - <CompilerPath Value="$(CompPath)"/> - </Other> + <Version Value="11"/> + <Target> + <Filename Value="ats_editor"/> + </Target> + <SearchPaths> + <UnitOutputDirectory Value="units/$(TargetCPU)-$(TargetOS)/"/> + </SearchPaths> + <Parsing> + <SyntaxOptions> + <UseAnsiStrings Value="False"/> + </SyntaxOptions> + </Parsing> </CompilerOptions> </CONFIG> diff --git a/extras/contributed/ats/ats_editor.pas b/extras/contributed/ats/ats_editor.pas index 92d5ce3e..876aab71 100644 --- a/extras/contributed/ats/ats_editor.pas +++ b/extras/contributed/ats/ats_editor.pas @@ -5,32 +5,29 @@ program ats_editor; uses SysUtils, Classes, fpg_base, fpg_main, fpg_customgrid, fpg_basegrid, ats_main, fpg_grid, fpg_form, fpg_button, fpg_edit, fpg_menu, fpg_label, - fpg_combobox, fpg_dialogs, fpg_utils; + fpg_combobox, fpg_dialogs, fpg_utils, fpg_panel; const - langtabledata: - {$I atstable.inc} + langtabledata: {$I atstable.inc} type - { TLangGrid } - TLangGrid = class(TfpgCustomGrid) protected procedure DrawCell(ARow, ACol: Integer; ARect: TfpgRect; AFlags: TfpgGridDrawState); override; procedure HandleKeyPress(var keycode: word; var shiftstate: TShiftState; var consumed: boolean); override; - function GetRowCount: Integer; override; + function GetRowCount: Integer; override; public atstable: TatsTextTable; procedure UpdateColumns; + published + property FocusCol; + property FocusRow; end; - { TfrmLangTable } TfrmLangTable = class(TfpgForm) - public - menuFile: TfpgPopupMenu; - + private {@VFD_HEAD_BEGIN: frmLangTable} mainmenu: TfpgMenuBar; grid: TLangGrid; @@ -38,23 +35,26 @@ type btnCopyRow: TfpgButton; btnDeleteRow: TfpgButton; btnEdit: TfpgButton; + pmActions: TfpgPopupMenu; + pmFile: TfpgPopupMenu; {@VFD_HEAD_END: frmLangTable} - - procedure AfterCreate; override; - + procedure btnShowTestUsage(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure btnCopyRowClicked(Sender: TObject); + procedure btnDeleteRowClicked(Sender: TObject); + procedure btnNewRowClicked(Sender: TObject); procedure menuProcExit(Sender: TObject); procedure menuProcSave(Sender: TObject); procedure menuProcOpen(Sender: TObject); procedure menuProcNew(Sender: TObject); - - procedure EditClick(Sender : TObject); - + procedure btnEditClicked(Sender : TObject); + public + procedure AfterCreate; override; end; - { TfrmTextEdit } TfrmTextEdit = class(TfpgForm) - public + private {@VFD_HEAD_BEGIN: frmTextEdit} Label1: TfpgLabel; edID: TfpgEdit; @@ -65,18 +65,31 @@ type btnOK: TfpgButton; btnCancel: TfpgButton; {@VFD_HEAD_END: frmTextEdit} - textrow : TatsTextRow; - - procedure AfterCreate; override; - procedure OnLangChange(sender : TObject); - + protected procedure HandleKeyPress(var keycode: word; var shiftstate: TShiftState; var consumed: boolean); override; - + public + procedure AfterCreate; override; procedure LoadTexts; end; + TTestUsageForm = class(TfpgForm) + procedure FormShow(Sender: TObject); + private + {@VFD_HEAD_BEGIN: TestUsageForm} + gbTestArea: TfpgGroupBox; + btnFetch: TfpgButton; + edtResource: TfpgEdit; + cbLanguage: TfpgComboBox; + Label1: TfpgLabel; + Label2: TfpgLabel; + {@VFD_HEAD_END: TestUsageForm} + procedure btnFetchClicked(Sender: TObject); + public + procedure AfterCreate; override; + end; + {@VFD_NEWFORM_DECL} var @@ -84,6 +97,102 @@ var {@VFD_NEWFORM_IMPL} +procedure TTestUsageForm.FormShow(Sender: TObject); +begin + cbLanguage.Items.Assign(frmMain.grid.atstable.LangList); + cbLanguage.FocusItem := 0; + edtResource.Text := 'rsLanguage'; +end; + +procedure TTestUsageForm.btnFetchClicked(Sender: TObject); +begin + frmMain.grid.atstable.SelectLang(cbLanguage.Text); + ShowMessage(edtResource.Text + ': '+atsText(edtResource.Text)); +end; + +procedure TTestUsageForm.AfterCreate; +begin + {%region 'Auto-generated GUI code'} + {@VFD_BODY_BEGIN: TestUsageForm} + Name := 'TestUsageForm'; + SetPosition(814, 244, 297, 184); + WindowTitle := 'Test Usage'; + Hint := ''; + IconName := ''; + OnShow := @FormShow; + + gbTestArea := TfpgGroupBox.Create(self); + with gbTestArea do + begin + Name := 'gbTestArea'; + SetPosition(8, 8, 280, 169); + FontDesc := '#Label1'; + Hint := ''; + Text := 'Test Area'; + end; + + btnFetch := TfpgButton.Create(gbTestArea); + with btnFetch do + begin + Name := 'btnFetch'; + SetPosition(126, 130, 147, 24); + Text := 'Fetch Translation'; + FontDesc := '#Label1'; + Hint := ''; + ImageName := ''; + TabOrder := 9; + OnClick := @btnFetchClicked; + end; + + edtResource := TfpgEdit.Create(gbTestArea); + with edtResource do + begin + Name := 'edtResource'; + SetPosition(8, 86, 265, 24); + ExtraHint := ''; + FontDesc := '#Edit1'; + Hint := ''; + TabOrder := 10; + Text := ''; + end; + + cbLanguage := TfpgComboBox.Create(gbTestArea); + with cbLanguage do + begin + Name := 'cbLanguage'; + SetPosition(8, 41, 110, 24); + ExtraHint := ''; + FontDesc := '#List'; + Hint := ''; + FocusItem := -1; + TabOrder := 11; + end; + + Label1 := TfpgLabel.Create(gbTestArea); + with Label1 do + begin + Name := 'Label1'; + SetPosition(8, 25, 145, 15); + FontDesc := '#Label1'; + Hint := ''; + Text := 'Set Language:'; + end; + + Label2 := TfpgLabel.Create(gbTestArea); + with Label2 do + begin + Name := 'Label2'; + SetPosition(8, 70, 140, 15); + FontDesc := '#Label1'; + Hint := ''; + Text := 'Text ID to retrieve:'; + end; + + {@VFD_BODY_END: TestUsageForm} + {%endregion} +end; + + { TLangGrid } procedure TLangGrid.DrawCell(ARow, ACol: Integer; ARect: TfpgRect; AFlags: TfpgGridDrawState); @@ -119,10 +228,10 @@ procedure TLangGrid.HandleKeyPress(var keycode: word; var shiftstate: TShiftStat begin if keycode = keyEnter then begin + consumed := True; frmMain.btnEdit.Click; - end - else - inherited HandleKeyPress(keycode, shiftstate, consumed); + end; + inherited HandleKeyPress(keycode, shiftstate, consumed); end; procedure TLangGrid.UpdateColumns; @@ -155,6 +264,7 @@ begin SetPosition(326, 139, 466, 168); WindowTitle := 'Edit Text'; Hint := ''; + IconName := ''; Label1 := TfpgLabel.Create(self); with Label1 do @@ -172,10 +282,10 @@ begin Name := 'edID'; SetPosition(8, 28, 228, 24); ExtraHint := ''; + FontDesc := '#Edit1'; Hint := ''; TabOrder := 1; Text := ''; - FontDesc := '#Edit1'; end; cmbLang1 := TfpgComboBox.Create(self); @@ -183,8 +293,10 @@ begin begin Name := 'cmbLang1'; SetPosition(8, 65, 80, 22); + ExtraHint := ''; FontDesc := '#List'; Hint := ''; + FocusItem := -1; TabOrder := 3; OnChange := @OnLangChange; end; @@ -195,10 +307,10 @@ begin Name := 'edLang1'; SetPosition(100, 64, 356, 24); ExtraHint := ''; + FontDesc := '#Edit1'; Hint := ''; TabOrder := 3; Text := ''; - FontDesc := '#Edit1'; end; cmbLang2 := TfpgComboBox.Create(self); @@ -206,8 +318,10 @@ begin begin Name := 'cmbLang2'; SetPosition(8, 97, 80, 22); + ExtraHint := ''; FontDesc := '#List'; Hint := ''; + FocusItem := -1; TabOrder := 4; OnChange := @OnLangChange; end; @@ -218,10 +332,10 @@ begin Name := 'edLang2'; SetPosition(100, 96, 356, 24); ExtraHint := ''; + FontDesc := '#Edit1'; Hint := ''; TabOrder := 4; Text := ''; - FontDesc := '#Edit1'; end; btnOK := TfpgButton.Create(self); @@ -270,9 +384,12 @@ end; procedure TfrmTextEdit.HandleKeyPress(var keycode: word; var shiftstate: TShiftState; var consumed: boolean); begin - if keycode = keyEnter then btnOK.Click - else if keycode = keyEscape then btnCancel.Click - else inherited HandleKeyPress(keycode, shiftstate, consumed); + if keycode = keyEnter then + btnOK.Click + else if keycode = keyEscape then + btnCancel.Click + else + inherited HandleKeyPress(keycode, shiftstate, consumed); end; procedure TfrmTextEdit.LoadTexts; @@ -283,6 +400,44 @@ begin edLang2.Text := textrow.GetText(cmbLang2.Text, b); end; +procedure TfrmLangTable.btnShowTestUsage(Sender: TObject); +var + frm: TTestUsageForm; +begin + frm := TTestUsageForm.Create(nil); + try + frm.ShowModal; + finally + frm.Free; + end; +end; + +procedure TfrmLangTable.FormShow(Sender: TObject); +begin + grid.SetFocus; +end; + +procedure TfrmLangTable.btnCopyRowClicked(Sender: TObject); +begin + ShowMessage('Copy row to be implemented.'); +end; + +procedure TfrmLangTable.btnDeleteRowClicked(Sender: TObject); +begin + ShowMessage('Delete row to be implemented.'); +end; + +procedure TfrmLangTable.btnNewRowClicked(Sender: TObject); +var + s: string; +begin + if not fpgInputQuery('New row', 'Enter the name of the new Text ID', s) then + Exit; + Grid.atstable.AddRow(s); + Grid.SetFocus; + Grid.FocusRow := Grid.GetRowCount-1; + Grid.FocusCol := 1; +end; procedure TfrmLangTable.AfterCreate; var @@ -290,9 +445,11 @@ var begin {@VFD_BODY_BEGIN: frmLangTable} Name := 'frmLangTable'; - SetPosition(282, 304, 619, 513); + SetPosition(282, 304, 619, 515); WindowTitle := 'ATS Table Editor'; Hint := ''; + IconName := ''; + OnShow := @FormShow; mainmenu := TfpgMenuBar.Create(self); with mainmenu do @@ -306,7 +463,7 @@ begin with grid do begin Name := 'grid'; - SetPosition(0, 28, 619, 447); + SetPosition(0, 28, 619, 448); Anchors := [anLeft,anRight,anTop,anBottom]; end; @@ -314,65 +471,88 @@ begin with btnNewRow do begin Name := 'btnNewRow'; - SetPosition(8, 482, 75, 24); + SetPosition(8, 486, 75, 24); Anchors := [anLeft,anBottom]; Text := 'New Row'; FontDesc := '#Label1'; Hint := ''; ImageName := ''; TabOrder := 2; + OnClick := @btnNewRowClicked; end; btnCopyRow := TfpgButton.Create(self); with btnCopyRow do begin Name := 'btnCopyRow'; - SetPosition(92, 482, 71, 24); + SetPosition(87, 486, 71, 24); Anchors := [anLeft,anBottom]; Text := 'Copy Row'; FontDesc := '#Label1'; Hint := ''; ImageName := ''; TabOrder := 3; + OnClick := @btnCopyRowClicked; end; btnDeleteRow := TfpgButton.Create(self); with btnDeleteRow do begin Name := 'btnDeleteRow'; - SetPosition(292, 482, 83, 24); + SetPosition(247, 486, 83, 24); Anchors := [anLeft,anBottom]; Text := 'Delete Row'; FontDesc := '#Label1'; Hint := ''; ImageName := ''; TabOrder := 4; + OnClick := @btnDeleteRowClicked; end; btnEdit := TfpgButton.Create(self); with btnEdit do begin Name := 'btnEdit'; - SetPosition(188, 482, 79, 24); + SetPosition(163, 486, 79, 24); Anchors := [anLeft,anBottom]; Text := 'Edit Item'; FontDesc := '#Label1'; Hint := ''; ImageName := ''; TabOrder := 5; - OnClick := @EditClick; + OnClick := @btnEditClicked; + end; + + pmActions := TfpgPopupMenu.Create(self); + with pmActions do + begin + Name := 'pmActions'; + SetPosition(400, 130, 180, 22); + AddMenuItem('New Row', 'Ctrl+Ins', @btnNewRowClicked); + AddMenuItem('Copy Row', 'Ctrl+C', @btnCopyRowClicked); + AddMenuItem('Edit Item', 'Enter', @btnEditClicked); + AddMenuItem('Delete Row', 'Ctrl+Del', @btnDeleteRowClicked); + AddSeparator; + AddMenuItem('Test Usage', '', @btnShowTestUsage); + end; + + pmFile := TfpgPopupMenu.Create(self); + with pmFile do + begin + Name := 'pmFile'; + SetPosition(400, 108, 180, 22); + AddMenuItem('&New', 'Ctrl+N', @menuProcNew); + AddMenuItem('&Open...', 'Ctrl+O', @menuProcOpen); + AddMenuItem('&Save...', 'Ctrl+S', @menuProcSave); + AddMenuItem('-', '', nil); + AddMenuItem('&Exit', '', @menuProcExit); end; {@VFD_BODY_END: frmLangTable} - - menuFile := TfpgPopupMenu.Create(self); - menuFile.AddMenuItem('&New', '', @menuProcNew); - menuFile.AddMenuItem('&Open...', '', @menuProcOpen); - menuFile.AddMenuItem('&Save...', '', @menuProcSave); - menuFile.AddMenuItem('-', '', nil); - menuFile.AddMenuItem('&Exit', '', @menuProcExit); - mainmenu.AddMenuItem('&File', nil).SubMenu := menuFile; + // Hook up the menus to the mainmenu + mainmenu.AddMenuItem('&File', nil).SubMenu := pmFile; + mainmenu.AddMenuItem('&Actions', nil).SubMenu := pmActions; grid.atstable := atsTexts; grid.UpdateColumns; @@ -462,7 +642,7 @@ begin grid.Update; end; -procedure TfrmLangTable.EditClick(Sender: TObject); +procedure TfrmLangTable.btnEditClicked(Sender: TObject); var frm : TfrmTextEdit; tr : TatsTextRow; diff --git a/extras/contributed/ats/ats_main.pas b/extras/contributed/ats/ats_main.pas index e8efb251..767d9774 100644 --- a/extras/contributed/ats/ats_main.pas +++ b/extras/contributed/ats/ats_main.pas @@ -45,43 +45,29 @@ type protected function FindRow(const atextid : string) : TatsTextRow; - - function AddRow(const atextid : string) : TatsTextRow; - public constructor Create; destructor Destroy; override; - procedure Clear; - procedure AddLang(const alangid : string); - procedure SetText(const atextid, alangid, atext : string); function GetText(const atextid, alangid : string; var found : boolean) : string; overload; function GetText(const atextid : string) : string; overload; - // later this can prepare a fast search table too: procedure SelectLang(const alangid : string); - //procedure SetFallbackOrder(const alangids : string); - property CurrentLang : string read FCurrentLangId; - public - function LoadFromFile(const afilename : string) : boolean; - function LoadFromPascalFile(const afilename : string) : boolean; - function LoadFromArray(const aarr : array of string) : boolean; - procedure LoadPureText(const fdata : string); - procedure SaveToFile(const afilename : string; aformat : TatsFormat); - + // utility functions function RowCount : integer; function GetRow(arow : integer) : TatsTextRow; + function AddRow(const atextid : string) : TatsTextRow; property LangList : TStringList read FLangIds; end; diff --git a/extras/contributed/ats/ptrparsefunc.pas b/extras/contributed/ats/ptrparsefunc.pas index 7c2c0790..a1e514b7 100644 --- a/extras/contributed/ats/ptrparsefunc.pas +++ b/extras/contributed/ats/ptrparsefunc.pas @@ -1,5 +1,7 @@ unit ptrparsefunc; +{$mode objfpc}{$H+} + interface procedure ppSkipSpaces(var ReadPtr : PChar; bufend : PChar); diff --git a/extras/contributed/ats/readme.txt b/extras/contributed/ats/readme.txt index 9e6941e6..55213279 100644 --- a/extras/contributed/ats/readme.txt +++ b/extras/contributed/ats/readme.txt @@ -8,3 +8,34 @@ use the ats editor to edit that *.ats file. The editor was planned to support *.ats, *.inc and *.csv file formats, but not all of them are implemented. + +Usage (2015-04-02): +I modified the project a bit to make it more user friendly and to show +how it is used. Basically it maintains a list of Resource/Text ID's and +then the translation for each of those in a language column. Any number +of languages can be added. The editor is optimised for quick keyboard +usage, so translation can be done very quickly. You will have to include +a few of the ats units in your own project to use it - just like the +ats_editor project does itself. + +The editor maintains an "atstable.inc" file which is just an array of +text strings. To add a new language, it still needs to be done manually +by editing the atstable.inc file (improving the editor to do this should +be easy) and just adding one or more new language codes. + +I did the following change in the atstable.inc: + + ,' RU="Русский" HU="Magyar"' + +After that you run the ats_editor and edit the Resource ID's for those +new languages. + +You set the current language by calling atstable.SelectLang(<LangID>) + +You retrieve the translated text for a specific Resource ID by calling + + atsText(<ResourceID>) + +eg: ShowMessage(atsText('rsCancel'); + + --------[ end ]--------- diff --git a/extras/contributed/editgrid/u_editgrid.pas b/extras/contributed/editgrid/u_editgrid.pas index 17446fa6..30193580 100644 --- a/extras/contributed/editgrid/u_editgrid.pas +++ b/extras/contributed/editgrid/u_editgrid.pas @@ -551,6 +551,7 @@ begin IniCalendarCell; end; FEditing := True; + Enabled:= False; end; procedure TfpgCustomEditGrid.EditGridMouseDown(Sender: TObject; AButton: TMouseButton; AShift: TShiftState; @@ -736,17 +737,26 @@ procedure TfpgCustomEditGrid.SetReturnWay; begin case FEditWay of edNone: + begin FEditing:= False; + Enabled:= True; + end; edColumn: if FocusCol < Pred(ColumnCount) then FocusCol := FocusCol + 1 else + begin FEditing:= False; + Enabled:= True; + end; edRow: if FocusRow < Pred(RowCount) then FocusRow := FocusRow + 1 else + begin FEditing:= False; + Enabled:= True; + end; end; SetFocus; if FEditing then @@ -764,6 +774,7 @@ begin if FocusCol < Pred(ColumnCount) then FocusCol := FocusCol + 1; FEditing := False; + Enabled:= True; SetFocus; end; @@ -811,6 +822,7 @@ begin FCellEditText.Text := ''; FCellEditText.Visible := False; FEditing := False; + Enabled:= True; SetFocus; end; end; @@ -937,6 +949,7 @@ begin FCellEditInteger.Text := ''; FCellEditInteger.Visible := False; FEditing := False; + Enabled:= True; SetFocus; end; end; @@ -1051,6 +1064,7 @@ begin FCellEditFloat.Text := ''; FCellEditFloat.Visible := False; FEditing := False; + Enabled:= True; SetFocus; end; end; @@ -1151,6 +1165,7 @@ begin FCellEditCurrency.Text := ''; FCellEditCurrency.Visible := False; FEditing := False; + Enabled:= True; SetFocus; end; end; @@ -1239,6 +1254,7 @@ begin FCellComboBox.Text := ''; FCellComboBox.Visible := False; FEditing := False; + Enabled:= True; SetFocus; end; end; @@ -1307,6 +1323,7 @@ begin FCellEditCombo.Text := ''; FCellEditCombo.Visible := False; FEditing := False; + Enabled:= True; SetFocus; end; end; @@ -1393,6 +1410,7 @@ begin FCellCheckBox.Text := ''; FCellCheckBox.Visible := False; FEditing := False; + Enabled:= True; SetFocus; end; end; @@ -1482,6 +1500,7 @@ begin //FCellCalendar.Text := ''; FCellCalendar.Visible := False; FEditing := False; + Enabled:= True; SetFocus; end; end; @@ -1671,6 +1690,7 @@ begin IniCalendarCell; end; FEditing := True; + Enabled:= False; end; keyTab: begin diff --git a/extras/contributed/nicegrid/extrafpc.cfg b/extras/contributed/nicegrid/extrafpc.cfg new file mode 100644 index 00000000..49dd2ec7 --- /dev/null +++ b/extras/contributed/nicegrid/extrafpc.cfg @@ -0,0 +1,10 @@ +-FUunits +-Fu../../../lib/$fpctarget +-Fi. +-Xs +-XX +-CX +#ifdef mswindows +-WG +#endif + diff --git a/extras/contributed/nicegrid/fpg_nicegrid.pas b/extras/contributed/nicegrid/fpg_nicegrid.pas index 2a27f771..233f9962 100644 --- a/extras/contributed/nicegrid/fpg_nicegrid.pas +++ b/extras/contributed/nicegrid/fpg_nicegrid.pas @@ -386,7 +386,7 @@ type property HeaderFontColor: TfpgColor read FHeaderFontColor write SetHeaderFontColor; property FooterFont: string read FFooterFont write SetFooterFont; property FooterFontColor: TfpgColor read FFooterFontColor write SetFooterFontColor; - property SelectionColor: TfpgColor read FSelectionColor write SetSelectionColor default $00CAFFFF; + property SelectionColor: TfpgColor read FSelectionColor write SetSelectionColor default $FFCAFFFF; property FitToWidth: Boolean read FFitToWidth write SetFitToWidth default False; property AutoColWidth: Boolean read FAutoColWidth write SetAutoColWidth default False; property ReadOnly: Boolean read FReadOnly write SetReadOnly default False; @@ -491,7 +491,7 @@ begin FHeaderLightColor := clHilite1; FHeaderDarkColor := clShadow1; FHeaderFont:='Arial-8'; - FSelectionColor := $00CAFFFF; + FSelectionColor := $FFCAFFFF; FFooterFont := 'Arial-8'; FooterFontColor := clRed; FDefRowHeight := 18; @@ -3417,7 +3417,7 @@ end; constructor TfpgMergeCell.Create; begin inherited Create; - Font := fpgApplication.DefaultFont.FontDesc; + Font := fpgStyle.DefaultFont.FontDesc; end; destructor TfpgMergeCell.Destroy; diff --git a/extras/contributed/nicegrid/main1.pas b/extras/contributed/nicegrid/main1.pas index 67a39621..27d7a3bd 100644 --- a/extras/contributed/nicegrid/main1.pas +++ b/extras/contributed/nicegrid/main1.pas @@ -78,7 +78,7 @@ begin RowCount := 20; AutoAddRow := True; DefColWidth := 100; - Color:=$ECE9D8; + Color := $ffece9d8; GridColor := clSilver; HeaderLine := 2; HeaderColor := clButtonFace; @@ -87,7 +87,7 @@ begin HeaderFontColor := clWhite; HeaderFont := 'MS Sans Serif'; FooterFontColor := clRed; - SelectionColor := 13816575; + SelectionColor := $ffD2D2FF; BeginUpdate; // JP with Columns.Add do begin @@ -105,7 +105,7 @@ begin Width:=100; Font:='Arial-8'; FontColor:=clRed; - Color:=$FFFACD;//14024703; + Color:=$FFFFFACD;//14024703; HorzAlign:=haCenter; end; with Columns.Add do @@ -302,9 +302,9 @@ begin begin BeginUpdate; GridColor := clGray; - HeaderColor := $000000DF; + HeaderColor := $FF0000DF; HeaderDarkColor := clBlack; - HeaderLightColor := $000080FF; + HeaderLightColor := $FF0080FF; HeaderFontColor := clWhite; GutterFontColor:=clWhite; EndUpdate; diff --git a/extras/contributed/nicegrid/nicegrid1.project b/extras/contributed/nicegrid/nicegrid1.project new file mode 100644 index 00000000..580224ad --- /dev/null +++ b/extras/contributed/nicegrid/nicegrid1.project @@ -0,0 +1,68 @@ +[ProjectOptions] +ProjectName=nicegrid1.project +MainUnit=nicegrid1.lpr +TargetFile=nicegrid1${EXEEXT} +DefaultMake=0 +MakeOptionsCount=7 +MakeOptionEnabled1=1,1,1,1,1,1 +MakeOptionEnabled2=1,1,1,1,1,0 +MakeOptionEnabled3=1,1,0,0,0,1 +MakeOptionEnabled4=0,0,0,0,1,1 +MacroCount=4 +Macro1=TargetCPU=i386 +Macro2=TargetOS=win32 +Macro3=FPGUI_DIR=/home/graemeg/programming/fpgui/ +Macro4=tiOPF_fpGUI_Dir=/home/graemeg/programming/3rdParty/tiOPF2/src/ +Macro5=FPGUI_DIR=/home/graemeg/programming/fpgui/ +Macro6=tiOPF_fpGUI_Dir=/home/graemeg/programming/3rdParty/tiOPF2/src/ +UnitDirsCount=8 +UnitDirEnabled1=1,1,1,1,0,0,0,1,0,0 +UnitDirEnabled2=1,1,1,1,0,0,1,1,0,0 +UnitDirEnabled3=1,1,1,0,0,0,1,1,0,0 +UnitDirEnabled4=0,0,0,1,0,0,1,1,0,0 +UnitDirEnabled5=1,1,1,1,0,0,1,1,0,0 +UnitDirEnabled6=1,1,1,1,0,0,1,0,0,0 +UnitDirEnabled7=0,0,0,0,1,1,1,0,0,0 +UnitDirEnabled8=1,0,0,0,0,0,1,1,0,0 +UnitOutputDir=units/${TARGET}/ +MakeOptionEnabled5=1,0,0,0,0,0 +MakeOptionEnabled6=1,0,0,0,0,0 +MakeOptionEnabled7=0,0,0,0,0,0 +MakeOption1=-l -Mobjfpc -Sch +MakeOption2=-g -gl -O- -gw2 -godwarfsets +MakeOption3=-B +MakeOption4=-O2 -XX -Xs -CX +MakeOption5=-veiw +MakeOption6=-dDEBUGSVR +MakeOption7=-dAGGCanvas +UnitDir1=${FPGUIDIR}src/ +UnitDir2=${FPGUIDIR}src/corelib/ +UnitDir3=${FPGUIDIR}src/corelib/x11/ +UnitDir4=${FPGUIDIR}src/corelib/gdi/ +UnitDir5=${FPGUIDIR}src/gui/ +UnitDir6=${FPGUIDIR}src/gui/db/ +UnitDir7=${FPGUILIBDIR} +UnitDir8=${FPGUIDIR}src/corelib/render/software/ + +[Units] +UnitCount=20 +Unit1=builderthread.pas,0 +Unit2=filemonitor.pas,0 +Unit3=fpg_textedit.pas,-1 +Unit4=frm_configureide.pas,0 +Unit5=frm_debug.pas,0 +Unit6=frm_find.pas,-1 +Unit7=frm_main.pas,-1 +Unit8=frm_procedurelist.pas,-1 +Unit9=frm_projectoptions.pas,-1 +Unit10=ideconst.pas,0 +Unit11=ideimages.pas,0 +Unit12=idemacros.pas,-1 +Unit13=ideutils.pas,0 +Unit14=maximus.lpr,0 +Unit15=mPasLex.pas,0 +Unit16=project.pas,-1 +Unit17=sha1.pas,0 +Unit18=stringhelpers.pas,0 +Unit19=synregexpr.pas,0 +Unit20=unitlist.pas,0 |