From 2f213dcee2b03477adb752c7f0e623c72ed3814a Mon Sep 17 00:00:00 2001 From: mattias Date: Sat, 13 Sep 2003 13:26:20 +0000 Subject: [PATCH] started doceditor git-svn-id: trunk@4613 - --- .gitattributes | 3 ++ components/codetools/codetoolsstrconsts.pas | 1 + components/codetools/definetemplates.pas | 14 ++++++ doceditor/doceditor.lfm | 48 ++++++++++++++++++++ doceditor/doceditor.lfm.bak | 11 +++++ doceditor/doceditor.lrs | 19 ++++++++ doceditor/doceditor.lrs.bak | 7 +++ doceditor/doceditor.pas | 49 +++++++++++++++++++++ doceditor/doceditor.pas.bak | 27 ++++++++++++ ide/ideoptiondefs.pas | 6 ++- ide/lazarusidestrconsts.pas | 3 ++ 11 files changed, 186 insertions(+), 2 deletions(-) create mode 100644 doceditor/doceditor.lfm create mode 100644 doceditor/doceditor.lfm.bak create mode 100644 doceditor/doceditor.lrs create mode 100644 doceditor/doceditor.lrs.bak create mode 100644 doceditor/doceditor.pas create mode 100644 doceditor/doceditor.pas.bak diff --git a/.gitattributes b/.gitattributes index 926fb5b5f2..62b8b38563 100644 --- a/.gitattributes +++ b/.gitattributes @@ -197,6 +197,9 @@ designer/sizecompsdlg.pp svneol=native#text/pascal designer/taborderdlg.lfm svneol=native#text/plain designer/taborderdlg.lrs svneol=native#text/pascal designer/taborderdlg.pas svneol=native#text/pascal +doceditor/doceditor.lfm svneol=native#text/plain +doceditor/doceditor.lrs svneol=native#text/pascal +doceditor/doceditor.pas svneol=native#text/pascal docs/CrossCompile.txt svneol=native#text/plain docs/ExtendingTheIDE.txt svneol=native#text/plain docs/ForDelphians.txt svneol=native#text/plain diff --git a/components/codetools/codetoolsstrconsts.pas b/components/codetools/codetoolsstrconsts.pas index 6304878d68..1f78b58784 100644 --- a/components/codetools/codetoolsstrconsts.pas +++ b/components/codetools/codetoolsstrconsts.pas @@ -199,6 +199,7 @@ ResourceString ctsPackagerUnitsDirectory = 'Packager Units Directory'; ctsLazarusMainDirectory = 'lazarus main directory'; ctsDebuggerDirectory = 'Debugger Directory'; + ctsDocEditorDirectory = 'Doc Editor Directory'; ctsLazarusSources = 'Lazarus Sources'; ctsAnLCLProject = 'an LCL project'; ctsOtherCompilerDefines = '%s Compiler Defines'; diff --git a/components/codetools/definetemplates.pas b/components/codetools/definetemplates.pas index 37e00718d9..ed994995ad 100644 --- a/components/codetools/definetemplates.pas +++ b/components/codetools/definetemplates.pas @@ -3222,6 +3222,20 @@ begin ,da_DefineRecurse)); MainDir.AddChild(DirTempl); + // doceditor + DirTempl:=TDefineTemplate.Create('Doc Editor',ctsDocEditorDirectory, + '','doceditor',da_Directory); + DirTempl.AddChild(TDefineTemplate.Create('Unit path addition', + Format(ctsAddsDirToSourcePath,['lcl, components']), + ExternalMacroStart+'SrcPath', + '..' + +';..'+ds+'components'+ds+'codetools' + +';..'+ds+'lcl' + +';..'+ds+'lcl'+ds+'interfaces'+ds+WidgetType + +';'+SrcPath + ,da_DefineRecurse)); + MainDir.AddChild(DirTempl); + // packager DirTempl:=TDefineTemplate.Create('Packager',ctsDesignerDirectory, '','packager',da_Directory); diff --git a/doceditor/doceditor.lfm b/doceditor/doceditor.lfm new file mode 100644 index 0000000000..d3a3479135 --- /dev/null +++ b/doceditor/doceditor.lfm @@ -0,0 +1,48 @@ +object DocEditorWnd: TDocEditorWnd + CAPTION = 'DocEditorWnd' + CLIENTHEIGHT = 396 + CLIENTWIDTH = 598 + ONCREATE = DocEditorWndCREATE + HORZSCROLLBAR.PAGE = 599 + VERTSCROLLBAR.PAGE = 397 + LEFT = 291 + HEIGHT = 396 + TOP = 167 + WIDTH = 598 + object ButtonsPanel: TPANEL + ALIGN = altop + CAPTION = 'ButtonsPanel' + CLIENTHEIGHT = 28 + CLIENTWIDTH = 598 + TABORDER = 0 + TABSTOP = True + HEIGHT = 28 + WIDTH = 598 + end + object ContextTreeview: TTREEVIEW + ALIGN = alleft + BACKGROUNDCOLOR = 16777215 + BORDERWIDTH = 2 + DEFAULTITEMHEIGHT = 17 + DRAGCURSOR = 0 + INDENT = 15 + PARENTCTL3D = False + SELECTIONCOLOR = -2147483635 + TABORDER = 1 + OPTIONS = [tvoautoitemheight, tvohideselection, tvokeepcollapsednodes, tvoshowbuttons, tvoshowlines, tvoshowroot, tvotooltips] + HEIGHT = 368 + TOP = 28 + WIDTH = 121 + end + object FilesNotebook: TNOTEBOOK + ALIGN = alclient + LEFT = 121 + HEIGHT = 368 + TOP = 28 + WIDTH = 477 + end + object ButtonImagelist: TIMAGELIST + left = 56 + top = 40 + end +end diff --git a/doceditor/doceditor.lfm.bak b/doceditor/doceditor.lfm.bak new file mode 100644 index 0000000000..76ebd69183 --- /dev/null +++ b/doceditor/doceditor.lfm.bak @@ -0,0 +1,11 @@ +object Form2: TForm2 + CAPTION = 'Form2' + CLIENTHEIGHT = 300 + CLIENTWIDTH = 400 + HORZSCROLLBAR.PAGE = 401 + VERTSCROLLBAR.PAGE = 301 + LEFT = 291 + HEIGHT = 300 + TOP = 167 + WIDTH = 400 +end diff --git a/doceditor/doceditor.lrs b/doceditor/doceditor.lrs new file mode 100644 index 0000000000..a5bbd159fe --- /dev/null +++ b/doceditor/doceditor.lrs @@ -0,0 +1,19 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('TDocEditorWnd','FORMDATA',[ + 'TPF0'#13'TDocEditorWnd'#12'DocEditorWnd'#7'CAPTION'#6#12'DocEditorWnd'#12'CL' + +'IENTHEIGHT'#3#140#1#11'CLIENTWIDTH'#3'V'#2#8'ONCREATE'#7#18'DocEditorWndCRE' + +'ATE'#18'HORZSCROLLBAR.PAGE'#3'W'#2#18'VERTSCROLLBAR.PAGE'#3#141#1#4'LEFT'#3 + +'#'#1#6'HEIGHT'#3#140#1#3'TOP'#3#167#0#5'WIDTH'#3'V'#2#0#6'TPANEL'#12'Button' + +'sPanel'#5'ALIGN'#7#5'altop'#7'CAPTION'#6#12'ButtonsPanel'#12'CLIENTHEIGHT'#2 + +#28#11'CLIENTWIDTH'#3'V'#2#8'TABORDER'#2#0#7'TABSTOP'#9#6'HEIGHT'#2#28#5'WID' + +'TH'#3'V'#2#0#0#9'TTREEVIEW'#15'ContextTreeview'#5'ALIGN'#7#6'alleft'#15'BAC' + +'KGROUNDCOLOR'#4#255#255#255#0#11'BORDERWIDTH'#2#2#17'DEFAULTITEMHEIGHT'#2#17 + +#10'DRAGCURSOR'#2#0#6'INDENT'#2#15#11'PARENTCTL3D'#8#14'SELECTIONCOLOR'#4#13 + +#0#0#128#8'TABORDER'#2#1#7'OPTIONS'#11#17'tvoautoitemheight'#16'tvohideselec' + +'tion'#21'tvokeepcollapsednodes'#14'tvoshowbuttons'#12'tvoshowlines'#11'tvos' + +'howroot'#11'tvotooltips'#0#6'HEIGHT'#3'p'#1#3'TOP'#2#28#5'WIDTH'#2'y'#0#0#9 + +'TNOTEBOOK'#13'FilesNotebook'#5'ALIGN'#7#8'alclient'#4'LEFT'#2'y'#6'HEIGHT'#3 + +'p'#1#3'TOP'#2#28#5'WIDTH'#3#221#1#0#0#10'TIMAGELIST'#15'ButtonImagelist'#4 + +'left'#2'8'#3'top'#2'('#0#0#0 +]); diff --git a/doceditor/doceditor.lrs.bak b/doceditor/doceditor.lrs.bak new file mode 100644 index 0000000000..77b1acf5bd --- /dev/null +++ b/doceditor/doceditor.lrs.bak @@ -0,0 +1,7 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('TForm2','FORMDATA',[ + 'TPF0'#6'TForm2'#5'Form2'#7'CAPTION'#6#5'Form2'#12'CLIENTHEIGHT'#3','#1#11'CL' + +'IENTWIDTH'#3#144#1#18'HORZSCROLLBAR.PAGE'#3#145#1#18'VERTSCROLLBAR.PAGE'#3 + +'-'#1#4'LEFT'#3'#'#1#6'HEIGHT'#3','#1#3'TOP'#3#167#0#5'WIDTH'#3#144#1#0#0 +]); diff --git a/doceditor/doceditor.pas b/doceditor/doceditor.pas new file mode 100644 index 0000000000..797d0bfc61 --- /dev/null +++ b/doceditor/doceditor.pas @@ -0,0 +1,49 @@ +unit DocEditor; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ExtCtrls, + ComCtrls, + LazarusIDEStrConsts, IDEProcs, EnvironmentOpts, IDEOptionDefs; + +type + TDocEditorWnd = class(TForm) + ButtonsPanel: TPANEL; + ContextTreeview: TTREEVIEW; + FilesNotebook: TNOTEBOOK; + ButtonImagelist: TIMAGELIST; + procedure DocEditorWndCREATE(Sender: TObject); + private + public + end; + +var + DocEditorWnd: TDocEditorWnd; + +implementation + +{ TDocEditorWnd } + +procedure TDocEditorWnd.DocEditorWndCREATE(Sender: TObject); +begin + Name:=NonModalIDEWindowNames[nmiwDocEditor]; + Caption := lisDocumentationEditor; + EnvironmentOptions.IDEWindowLayoutList.Apply(Self,Name); + + ButtonImageList:=TImageList.Create(Self); + with ButtonImageList do + begin + Name:='ButtonImageList'; + Width:=24 + Height:=24; + end; +end; + +initialization + {$I doceditor.lrs} + +end. + diff --git a/doceditor/doceditor.pas.bak b/doceditor/doceditor.pas.bak new file mode 100644 index 0000000000..6231d8464b --- /dev/null +++ b/doceditor/doceditor.pas.bak @@ -0,0 +1,27 @@ +unit DocEditor; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs; + +type + TForm2 = class(TForm) + private + { private declarations } + public + { public declarations } + end; + +var + Form2: TForm2; + +implementation + +initialization + {$I doceditor.lrs} + +end. + diff --git a/ide/ideoptiondefs.pas b/ide/ideoptiondefs.pas index 8b031288fd..dc7777ad39 100644 --- a/ide/ideoptiondefs.pas +++ b/ide/ideoptiondefs.pas @@ -38,8 +38,7 @@ uses type TNonModalIDEWindow = ( - // empty/none/undefined - nmiwNone, + nmiwNone, // empty/none/undefined nmiwMainIDEName, nmiwSourceNoteBookName, nmiwMessagesViewName, @@ -48,6 +47,7 @@ type nmiwClipbrdHistoryName, nmiwPkgGraphExplorer, nmiwProjectInspector, + nmiwDocEditor, // debugger nmiwDbgOutput, nmiwBreakPoints, @@ -68,6 +68,8 @@ const 'ClipBrdHistory', 'PkgGraphExplorer', 'ProjectInspector', + 'DocumentEditor', + // debugger 'DbgOutput', 'BreakPoints', 'Watches', diff --git a/ide/lazarusidestrconsts.pas b/ide/lazarusidestrconsts.pas index edece240de..bbf41dcc12 100644 --- a/ide/lazarusidestrconsts.pas +++ b/ide/lazarusidestrconsts.pas @@ -1249,6 +1249,9 @@ resourcestring dlgUnitDepCaption = 'Unit dependencies'; dlgUnitDepBrowse = 'Browse...'; dlgUnitDepRefresh = 'Refresh'; + + // Doc Editor + lisDocumentationEditor = 'Documentation Editor'; // Build lazarus dialog lisCleanLazarusSource = 'Clean Lazarus Source';