mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-27 23:11:38 +01:00
converted todolist to lfm from Darius
git-svn-id: trunk@8419 -
This commit is contained in:
parent
02d9d81ee8
commit
ad4cc7ea32
6
.gitattributes
vendored
6
.gitattributes
vendored
@ -1078,6 +1078,8 @@ ide/startlazarus.lpr svneol=native#text/pascal
|
|||||||
ide/startlazarus.rc svneol=native#text/plain
|
ide/startlazarus.rc svneol=native#text/plain
|
||||||
ide/startlazopts.pas svneol=native#text/pascal
|
ide/startlazopts.pas svneol=native#text/pascal
|
||||||
ide/sysvaruseroverridedlg.pas svneol=native#text/pascal
|
ide/sysvaruseroverridedlg.pas svneol=native#text/pascal
|
||||||
|
ide/todolist.lfm svneol=native#text/plain
|
||||||
|
ide/todolist.lrs svneol=native#text/plain
|
||||||
ide/todolist.pp svneol=native#text/pascal
|
ide/todolist.pp svneol=native#text/pascal
|
||||||
ide/transfermacros.pp svneol=native#text/pascal
|
ide/transfermacros.pp svneol=native#text/pascal
|
||||||
ide/unitdependencies.lrs svneol=native#text/pascal
|
ide/unitdependencies.lrs svneol=native#text/pascal
|
||||||
@ -1480,6 +1482,10 @@ images/sourceeditor/bookmark8.xpm -text svneol=native#image/x-xpixmap
|
|||||||
images/sourceeditor/bookmark9.ico -text svneol=unset#image/x-icon
|
images/sourceeditor/bookmark9.ico -text svneol=unset#image/x-icon
|
||||||
images/sourceeditor/bookmark9.xpm -text svneol=native#image/x-xpixmap
|
images/sourceeditor/bookmark9.xpm -text svneol=native#image/x-xpixmap
|
||||||
images/splash_logo.xpm -text svneol=native#image/x-xpixmap
|
images/splash_logo.xpm -text svneol=native#image/x-xpixmap
|
||||||
|
images/todo_goto.bmp -text
|
||||||
|
images/todo_options.bmp -text
|
||||||
|
images/todo_print.bmp -text
|
||||||
|
images/todo_refresh.bmp -text
|
||||||
images/unitdependencies/srctype_circle_22x22.xpm -text svneol=native#image/x-xpixmap
|
images/unitdependencies/srctype_circle_22x22.xpm -text svneol=native#image/x-xpixmap
|
||||||
images/unitdependencies/srctype_filenotfound_22x22.xpm -text svneol=native#image/x-xpixmap
|
images/unitdependencies/srctype_filenotfound_22x22.xpm -text svneol=native#image/x-xpixmap
|
||||||
images/unitdependencies/srctype_forbiddencircle_22x22.xpm -text svneol=native#image/x-xpixmap
|
images/unitdependencies/srctype_forbiddencircle_22x22.xpm -text svneol=native#image/x-xpixmap
|
||||||
|
|||||||
161
ide/todolist.lfm
Normal file
161
ide/todolist.lfm
Normal file
@ -0,0 +1,161 @@
|
|||||||
|
object frmTodo: TfrmTodo
|
||||||
|
ActiveControl = lvTodo
|
||||||
|
Caption = 'frmTodo'
|
||||||
|
ClientHeight = 300
|
||||||
|
ClientWidth = 500
|
||||||
|
KeyPreview = True
|
||||||
|
OnKeyDown = FormKeyDown
|
||||||
|
PixelsPerInch = 96
|
||||||
|
Position = poScreenCenter
|
||||||
|
HorzScrollBar.Page = 499
|
||||||
|
VertScrollBar.Page = 299
|
||||||
|
Left = 313
|
||||||
|
Height = 300
|
||||||
|
Top = 610
|
||||||
|
Width = 500
|
||||||
|
object StatusBar: TStatusBar
|
||||||
|
Panels = <>
|
||||||
|
Height = 23
|
||||||
|
Top = 277
|
||||||
|
Width = 500
|
||||||
|
end
|
||||||
|
object lvTodo: TListView
|
||||||
|
Align = alClient
|
||||||
|
Columns = <
|
||||||
|
item
|
||||||
|
AutoSize = True
|
||||||
|
Caption = 'Caption'
|
||||||
|
end
|
||||||
|
item
|
||||||
|
AutoSize = True
|
||||||
|
Caption = 'Caption'
|
||||||
|
end
|
||||||
|
item
|
||||||
|
AutoSize = True
|
||||||
|
Caption = 'Caption'
|
||||||
|
end
|
||||||
|
item
|
||||||
|
AutoSize = True
|
||||||
|
Caption = 'Caption'
|
||||||
|
end>
|
||||||
|
RowSelect = True
|
||||||
|
ScrollBars = ssAutoBoth
|
||||||
|
ViewStyle = vsReport
|
||||||
|
OnDblClick = tbGotoClick
|
||||||
|
Height = 229
|
||||||
|
Top = 48
|
||||||
|
Width = 500
|
||||||
|
end
|
||||||
|
object ToolBar: TToolBar
|
||||||
|
ButtonHeight = 46
|
||||||
|
ButtonWidth = 47
|
||||||
|
Caption = 'ToolBar'
|
||||||
|
Flat = True
|
||||||
|
Height = 48
|
||||||
|
Images = ImageList1
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowCaptions = True
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 1
|
||||||
|
Height = 48
|
||||||
|
Width = 500
|
||||||
|
object tbOptions: TToolButton
|
||||||
|
Caption = 'Options'
|
||||||
|
ImageIndex = 3
|
||||||
|
Visible = False
|
||||||
|
Left = 142
|
||||||
|
Height = 46
|
||||||
|
Top = 2
|
||||||
|
Width = 47
|
||||||
|
end
|
||||||
|
object tbPrint: TToolButton
|
||||||
|
Caption = 'Print'
|
||||||
|
ImageIndex = 2
|
||||||
|
Visible = False
|
||||||
|
Left = 95
|
||||||
|
Height = 46
|
||||||
|
Top = 2
|
||||||
|
Width = 47
|
||||||
|
end
|
||||||
|
object tbRefresh: TToolButton
|
||||||
|
Caption = 'Refresh'
|
||||||
|
ImageIndex = 0
|
||||||
|
OnClick = tbRefreshClick
|
||||||
|
Left = 1
|
||||||
|
Height = 46
|
||||||
|
Top = 2
|
||||||
|
Width = 47
|
||||||
|
end
|
||||||
|
object tbGoto: TToolButton
|
||||||
|
Caption = 'Goto'
|
||||||
|
ImageIndex = 1
|
||||||
|
OnClick = tbGotoClick
|
||||||
|
Left = 48
|
||||||
|
Height = 46
|
||||||
|
Top = 2
|
||||||
|
Width = 47
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ImageList1: TImageList
|
||||||
|
left = 121
|
||||||
|
top = 42
|
||||||
|
Bitmap = {
|
||||||
|
6C690400000010000000100000009C0100002F2A2058504D202A2F0A73746174
|
||||||
|
69632063686172202A677261706869635B5D203D207B0A223136203136203320
|
||||||
|
31222C0A222E2063204E6F6E65222C0A222C20632023333133313331222C0A22
|
||||||
|
2D20632023354141444646222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E22
|
||||||
|
2C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E
|
||||||
|
2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2C2C2C2C2C2C2E2E2E222C0A222E
|
||||||
|
2E2E2E2E2C2C2D2D2D2C2C2C2C2E2E222C0A222E2E2E2E2C2C2D2D2C2C2C2E2E
|
||||||
|
2E2E2E222C0A222E2E2E2E2C2D2D2C2E2E2E2E2E2E2E2E222C0A222E2E2E2C2C
|
||||||
|
2D2D2C2E2E2E2E2E2E2E2E222C0A222E2E2E2C2D2D2C2E2E2E2E2E2E2E2E2E22
|
||||||
|
2C0A222E2E2E2C2D2D2C2E2E2E2E2E2E2E2E2E222C0A222E2E2E2C2D2D2C2E2E
|
||||||
|
2E2E2E2E2E2E2E222C0A222E2C2C2D2D2D2C2C2C2C2E2E2E2E2E2E222C0A222E
|
||||||
|
2E2C2D2D2D2D2D2C2E2E2E2E2E2E2E222C0A222E2E2E2C2C2D2C2C2E2E2E2E2E
|
||||||
|
2E2E2E222C0A222E2E2E2E2C2C2C2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E
|
||||||
|
2C2E2E2E2E2E2E2E2E2E2E227D0AAB0100002F2A2058504D202A2F0A73746174
|
||||||
|
69632063686172202A677261706869635B5D203D207B0A223136203136203420
|
||||||
|
31222C0A222E2063204E6F6E65222C0A222C20632023333133313331222C0A22
|
||||||
|
2D20632023464646464646222C0A222A20632023464630303030222C0A222E2E
|
||||||
|
2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E
|
||||||
|
2E2E222C0A222E2E2E2C2C2C2C2C2C2C2E2E2E2E2E2E222C0A222E2E2E2C2D2D
|
||||||
|
2D2D2D2D2C2E2E2E2E2E222C0A222E2E2E2C2D2D2D2D2D2D2D2C2E2E2E2E222C
|
||||||
|
0A222E2E2E2C2D2D2D2D2D2D2D2D2C2E2E2E222C0A222E2E2E2C2D2D2D2D2D2D
|
||||||
|
2D2D2C2E2E2E222C0A222E2E2E2C2D2D2D2D2D2D2D2D2C2E2E2E222C0A222E2A
|
||||||
|
2E2C2D2D2D2D2D2D2D2D2C2E2E2E222C0A222E2E2A2A2A2A2A2A2A2A2A2A2A2E
|
||||||
|
2E2E222C0A222E2A2E2C2D2D2D2D2D2D2D2D2C2E2E2E222C0A222E2E2E2C2D2D
|
||||||
|
2D2D2D2D2D2D2C2E2E2E222C0A222E2E2E2C2D2D2D2D2D2D2D2D2C2E2E2E222C
|
||||||
|
0A222E2E2E2C2C2C2C2C2C2C2C2C2C2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E
|
||||||
|
2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E227D0AC90100
|
||||||
|
002F2A2058504D202A2F0A7374617469632063686172202A677261706869635B
|
||||||
|
5D203D207B0A22313620313620362031222C0A222E2063202330303030303022
|
||||||
|
2C0A222C20632023383438343834222C0A222D20632023333133313331222C0A
|
||||||
|
222A2063204E6F6E65222C0A226120632023433743374337222C0A2262206320
|
||||||
|
23303046463030222C0A222E2E2C2E2D2E2E2E2E2E2E2E2E2E2E2E222C0A222E
|
||||||
|
2E2C2E2D2E2E2E2E2E2E2E2E2E2E2E222C0A222A2A2A2A2A2A2A2A2A2A2A2A2A
|
||||||
|
2A2A2A222C0A222A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A222C0A222A2A2A2A2A
|
||||||
|
2A2A2D2D2D2D2D2D2D2A2A222C0A222A2A2A2A2A2A2D2E2E2E2E2E2D2A2A2A22
|
||||||
|
2C0A222A2A2A2A2A2D2E2E2E2E2E2D2A2A2A2A222C0A222A2A2A2A2D2E2E2E2E
|
||||||
|
2E2D2D2D2D2D2A222C0A222A2A2A2D2D2D2D2D2D2D2D61612D2D2A222C0A222A
|
||||||
|
2A2D6161616161616161612D2C2D2A222C0A222A2A2D2D2D2D2D2D2D2D2D2D2C
|
||||||
|
2C2D2A222C0A222A2A2D612E61626161612D2C2C2D2D2A222C0A222A2A2D2D2D
|
||||||
|
2D2D2D2D2D2D2D2D2D2A2A222C0A222A2A2D61616161616161612D2D2A2A2A22
|
||||||
|
2C0A222A2A2A2D2D2D2D2D2D2D2D2D2A2A2A2A222C0A222A2A2A2A2A2A2A2A2A
|
||||||
|
2A2A2A2A2A2A2A227D0ABA0100002F2A2058504D202A2F0A7374617469632063
|
||||||
|
686172202A677261706869635B5D203D207B0A22313620313620352031222C0A
|
||||||
|
222E2063204E6F6E65222C0A222C20632023333133313331222C0A222D206320
|
||||||
|
23303035414336222C0A222A20632023464646464646222C0A22612063202346
|
||||||
|
4630303030222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2C2C
|
||||||
|
2C2C2C2C2C2C2C2C2C2C2C2C2E222C0A222E2C2D2D2D2D2D2D2D2D2D2D2D2D2C
|
||||||
|
2E222C0A222E2C2C2C2C2C2C2C2C2C2C2C2C2C2C2E222C0A222E2C2A2A2A2A2A
|
||||||
|
2A2A2A2A2A2A2A2C2E222C0A222E2C2A612A2A2A61612A2A2A2A2A2C2E222C0A
|
||||||
|
222E2C2A61612A61612A2A2A2A2A2A2C2E222C0A222E2C2A2A6161612A2A2A2A
|
||||||
|
2A2A2A2C2E222C0A222E2C2A2A2A612A2A2A2A2A2A2A2A2C2E222C0A222E2C2A
|
||||||
|
612A2A2A61612A2A2A2A2A2C2E222C0A222E2C2A61612A61612A2A2A2A2A2A2C
|
||||||
|
2E222C0A222E2C2A2A6161612A2A2A2A2A2A2A2C2E222C0A222E2C2A2A2A612A
|
||||||
|
2A2A2A2A2A2A2A2C2E222C0A222E2C2A2A2A2A2A2A2A2A2A2A2A2A2C2E222C0A
|
||||||
|
222E2C2C2C2C2C2C2C2C2C2C2C2C2C2C2E222C0A222E2E2E2E2E2E2E2E2E2E2E
|
||||||
|
2E2E2E2E2E227D0A
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
||||||
57
ide/todolist.lrs
Normal file
57
ide/todolist.lrs
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
{ This is an automatically generated lazarus resource file }
|
||||||
|
|
||||||
|
LazarusResources.Add('TfrmTodo','FORMDATA',[
|
||||||
|
'TPF0'#8'TfrmTodo'#7'frmTodo'#13'ActiveControl'#7#6'lvTodo'#7'Caption'#6#7'fr'
|
||||||
|
+'mTodo'#12'ClientHeight'#3','#1#11'ClientWidth'#3#244#1#10'KeyPreview'#9#9'O'
|
||||||
|
+'nKeyDown'#7#11'FormKeyDown'#13'PixelsPerInch'#2'`'#8'Position'#7#14'poScree'
|
||||||
|
+'nCenter'#18'HorzScrollBar.Page'#3#243#1#18'VertScrollBar.Page'#3'+'#1#4'Lef'
|
||||||
|
+'t'#3'9'#1#6'Height'#3','#1#3'Top'#3'b'#2#5'Width'#3#244#1#0#10'TStatusBar'#9
|
||||||
|
+'StatusBar'#6'Panels'#14#0#6'Height'#2#23#3'Top'#3#21#1#5'Width'#3#244#1#0#0
|
||||||
|
+#9'TListView'#6'lvTodo'#5'Align'#7#8'alClient'#7'Columns'#14#1#8'AutoSize'#9
|
||||||
|
+#7'Caption'#6#7'Caption'#0#1#8'AutoSize'#9#7'Caption'#6#7'Caption'#0#1#8'Aut'
|
||||||
|
+'oSize'#9#7'Caption'#6#7'Caption'#0#1#8'AutoSize'#9#7'Caption'#6#7'Caption'#0
|
||||||
|
+#0#9'RowSelect'#9#10'ScrollBars'#7#10'ssAutoBoth'#9'ViewStyle'#7#8'vsReport'
|
||||||
|
+#10'OnDblClick'#7#11'tbGotoClick'#6'Height'#3#229#0#3'Top'#2'0'#5'Width'#3
|
||||||
|
+#244#1#0#0#8'TToolBar'#7'ToolBar'#12'ButtonHeight'#2'.'#11'ButtonWidth'#2'/'
|
||||||
|
+#7'Caption'#6#7'ToolBar'#4'Flat'#9#6'Height'#2'0'#6'Images'#7#10'ImageList1'
|
||||||
|
+#14'ParentShowHint'#8#12'ShowCaptions'#9#8'ShowHint'#9#8'TabOrder'#2#1#6'Hei'
|
||||||
|
+'ght'#2'0'#5'Width'#3#244#1#0#11'TToolButton'#9'tbOptions'#7'Caption'#6#7'Op'
|
||||||
|
+'tions'#10'ImageIndex'#2#3#7'Visible'#8#4'Left'#3#142#0#6'Height'#2'.'#3'Top'
|
||||||
|
+#2#2#5'Width'#2'/'#0#0#11'TToolButton'#7'tbPrint'#7'Caption'#6#5'Print'#10'I'
|
||||||
|
+'mageIndex'#2#2#7'Visible'#8#4'Left'#2'_'#6'Height'#2'.'#3'Top'#2#2#5'Width'
|
||||||
|
+#2'/'#0#0#11'TToolButton'#9'tbRefresh'#7'Caption'#6#7'Refresh'#10'ImageIndex'
|
||||||
|
+#2#0#7'OnClick'#7#14'tbRefreshClick'#4'Left'#2#1#6'Height'#2'.'#3'Top'#2#2#5
|
||||||
|
+'Width'#2'/'#0#0#11'TToolButton'#6'tbGoto'#7'Caption'#6#4'Goto'#10'ImageInde'
|
||||||
|
+'x'#2#1#7'OnClick'#7#11'tbGotoClick'#4'Left'#2'0'#6'Height'#2'.'#3'Top'#2#2#5
|
||||||
|
+'Width'#2'/'#0#0#0#10'TImageList'#10'ImageList1'#4'left'#2'y'#3'top'#2'*'#6
|
||||||
|
+'Bitmap'#10#232#6#0#0'li'#4#0#0#0#16#0#0#0#16#0#0#0#156#1#0#0'/* XPM */'#10
|
||||||
|
+'static char *graphic[] = {'#10'"16 16 3 1",'#10'". c None",'#10'", c #31313'
|
||||||
|
+'1",'#10'"- c #5AADFF",'#10'"................",'#10'"................",'#10
|
||||||
|
+'"................",'#10'".......,,,,,,...",'#10'".....,,---,,,,..",'#10'"..'
|
||||||
|
+'..,,--,,,.....",'#10'"....,--,........",'#10'"...,,--,........",'#10'"...,-'
|
||||||
|
+'-,.........",'#10'"...,--,.........",'#10'"...,--,.........",'#10'".,,---,,'
|
||||||
|
+',,......",'#10'"..,-----,.......",'#10'"...,,-,,........",'#10'"....,,,....'
|
||||||
|
+'.....",'#10'".....,.........."}'#10#171#1#0#0'/* XPM */'#10'static char *gr'
|
||||||
|
+'aphic[] = {'#10'"16 16 4 1",'#10'". c None",'#10'", c #313131",'#10'"- c #F'
|
||||||
|
+'FFFFF",'#10'"* c #FF0000",'#10'"................",'#10'"................",'
|
||||||
|
+#10'"...,,,,,,,......",'#10'"...,------,.....",'#10'"...,-------,....",'#10
|
||||||
|
+'"...,--------,...",'#10'"...,--------,...",'#10'"...,--------,...",'#10'".*'
|
||||||
|
+'.,--------,...",'#10'"..***********...",'#10'".*.,--------,...",'#10'"...,-'
|
||||||
|
+'-------,...",'#10'"...,--------,...",'#10'"...,,,,,,,,,,...",'#10'"........'
|
||||||
|
+'........",'#10'"................"}'#10#201#1#0#0'/* XPM */'#10'static char '
|
||||||
|
+'*graphic[] = {'#10'"16 16 6 1",'#10'". c #000000",'#10'", c #848484",'#10'"'
|
||||||
|
+'- c #313131",'#10'"* c None",'#10'"a c #C7C7C7",'#10'"b c #00FF00",'#10'"..'
|
||||||
|
+',.-...........",'#10'"..,.-...........",'#10'"****************",'#10'"*****'
|
||||||
|
+'***********",'#10'"*******-------**",'#10'"******-.....-***",'#10'"*****-..'
|
||||||
|
+'...-****",'#10'"****-.....-----*",'#10'"***--------aa--*",'#10'"**-aaaaaaaa'
|
||||||
|
+'a-,-*",'#10'"**----------,,-*",'#10'"**-a.abaaa-,,--*",'#10'"**------------'
|
||||||
|
+'**",'#10'"**-aaaaaaaa--***",'#10'"***---------****",'#10'"****************"'
|
||||||
|
+'}'#10#186#1#0#0'/* XPM */'#10'static char *graphic[] = {'#10'"16 16 5 1",'
|
||||||
|
+#10'". c None",'#10'", c #313131",'#10'"- c #005AC6",'#10'"* c #FFFFFF",'#10
|
||||||
|
+'"a c #FF0000",'#10'"................",'#10'".,,,,,,,,,,,,,,.",'#10'".,-----'
|
||||||
|
+'-------,.",'#10'".,,,,,,,,,,,,,,.",'#10'".,************,.",'#10'".,*a***aa*'
|
||||||
|
+'****,.",'#10'".,*aa*aa******,.",'#10'".,**aaa*******,.",'#10'".,***a*******'
|
||||||
|
+'*,.",'#10'".,*a***aa*****,.",'#10'".,*aa*aa******,.",'#10'".,**aaa*******,.'
|
||||||
|
+'",'#10'".,***a********,.",'#10'".,************,.",'#10'".,,,,,,,,,,,,,,.",'
|
||||||
|
+#10'"................"}'#10#0#0#0
|
||||||
|
]);
|
||||||
345
ide/todolist.pp
345
ide/todolist.pp
@ -67,9 +67,20 @@ type
|
|||||||
TOnOpenFile = procedure(Sender: TObject; const Filename: string;
|
TOnOpenFile = procedure(Sender: TObject; const Filename: string;
|
||||||
const LineNumber: integer) of object;
|
const LineNumber: integer) of object;
|
||||||
|
|
||||||
TfrmToDo = class(TForm)
|
{ TfrmTodo }
|
||||||
StatusBar:TStatusBar;
|
|
||||||
lvTodo:TListView;
|
TfrmTodo = class(TForm)
|
||||||
|
ImageList1: TImageList;
|
||||||
|
lvTodo: TListView;
|
||||||
|
StatusBar: TStatusBar;
|
||||||
|
ToolBar: TToolBar;
|
||||||
|
tbGoto: TToolButton;
|
||||||
|
tbOptions: TToolButton;
|
||||||
|
tbPrint: TToolButton;
|
||||||
|
tbRefresh: TToolButton;
|
||||||
|
procedure tbGotoClick(Sender: TObject);
|
||||||
|
procedure tbRefreshClick(Sender: TObject);
|
||||||
|
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift:TShiftState);
|
||||||
private
|
private
|
||||||
{ private declarations }
|
{ private declarations }
|
||||||
fBuild : Boolean;
|
fBuild : Boolean;
|
||||||
@ -78,14 +89,8 @@ type
|
|||||||
fRootCBuffer : TCodeBuffer;
|
fRootCBuffer : TCodeBuffer;
|
||||||
fScannedFile : TStringList;
|
fScannedFile : TStringList;
|
||||||
|
|
||||||
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift:TShiftState);
|
|
||||||
procedure SetFileName(const AValue: String);
|
procedure SetFileName(const AValue: String);
|
||||||
|
|
||||||
procedure actFileRefresh(Sender : TObject);
|
|
||||||
procedure actEditGoto(Sender : TObject);
|
|
||||||
procedure actFilePrint(Sender : TObject);
|
|
||||||
procedure actOptionsCfg(Sender : TObject);
|
|
||||||
|
|
||||||
procedure ParseComment(const aFileName: string; const SComment, EComment: string;
|
procedure ParseComment(const aFileName: string; const SComment, EComment: string;
|
||||||
const TokenString: string; LineNumber: Integer);
|
const TokenString: string; LineNumber: Integer);
|
||||||
procedure ParseDirective(aDirective : String);
|
procedure ParseDirective(aDirective : String);
|
||||||
@ -101,7 +106,7 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
frmToDo: TfrmToDo;
|
frmTodo: TfrmTodo;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@ -109,268 +114,35 @@ uses
|
|||||||
StrUtils,
|
StrUtils,
|
||||||
FileUtil;
|
FileUtil;
|
||||||
|
|
||||||
Type
|
{ TfrmTodo }
|
||||||
PCharArray = Array[0..16+5] of PChar;
|
|
||||||
const
|
|
||||||
//Images of ToolBar
|
|
||||||
cImg_ToDoRefresh : PCharArray=
|
|
||||||
('16 16 5 1',
|
|
||||||
'. c None',
|
|
||||||
'# c #303030',
|
|
||||||
'a c #58a8ff',
|
|
||||||
' ',
|
|
||||||
' ',
|
|
||||||
'................',
|
|
||||||
'................',
|
|
||||||
'................',
|
|
||||||
'.......######...',
|
|
||||||
'.....##aaa####..',
|
|
||||||
'....##aa###.....',
|
|
||||||
'....#aa#........',
|
|
||||||
'...##aa#........',
|
|
||||||
'...#aa#.........',
|
|
||||||
'...#aa#.........',
|
|
||||||
'...#aa#.........',
|
|
||||||
'.##aaa####......',
|
|
||||||
'..#aaaaa#.......',
|
|
||||||
'...##a##........',
|
|
||||||
'....###.........',
|
|
||||||
'.....#..........');
|
|
||||||
|
|
||||||
cImg_ToDoGotoLine : PCharArray=
|
|
||||||
('16 16 5 1',
|
|
||||||
'. c None',
|
|
||||||
'# c #303030',
|
|
||||||
'b c #ff0000',
|
|
||||||
'a c #ffffff',
|
|
||||||
' ',
|
|
||||||
'................',
|
|
||||||
'................',
|
|
||||||
'...#######......',
|
|
||||||
'...#aaaaaa#.....',
|
|
||||||
'...#aaaaaaa#....',
|
|
||||||
'...#aaaaaaaa#...',
|
|
||||||
'...#aaaaaaaa#...',
|
|
||||||
'...#aaaaaaaa#...',
|
|
||||||
'.b.#aaaaaaaa#...',
|
|
||||||
'..bbbbbbbbbbb...',
|
|
||||||
'.b.#aaaaaaaa#...',
|
|
||||||
'...#aaaaaaaa#...',
|
|
||||||
'...#aaaaaaaa#...',
|
|
||||||
'...##########...',
|
|
||||||
'................',
|
|
||||||
'................');
|
|
||||||
|
|
||||||
cImg_ToDoOptions : PCharArray=
|
|
||||||
('16 16 5 1',
|
|
||||||
'. c None',
|
|
||||||
'a c #0058c0',
|
|
||||||
'# c #303030',
|
|
||||||
'c c #ff0000',
|
|
||||||
'b c #ffffff',
|
|
||||||
'................',
|
|
||||||
'.##############.',
|
|
||||||
'.#aaaaaaaaaaaa#.',
|
|
||||||
'.##############.',
|
|
||||||
'.#bbbbbbbbbbbb#.',
|
|
||||||
'.#bcbbbccbbbbb#.',
|
|
||||||
'.#bccbccbbbbbb#.',
|
|
||||||
'.#bbcccbbbbbbb#.',
|
|
||||||
'.#bbbcbbbbbbbb#.',
|
|
||||||
'.#bcbbbccbbbbb#.',
|
|
||||||
'.#bccbccbbbbbb#.',
|
|
||||||
'.#bbcccbbbbbbb#.',
|
|
||||||
'.#bbbcbbbbbbbb#.',
|
|
||||||
'.#bbbbbbbbbbbb#.',
|
|
||||||
'.##############.',
|
|
||||||
'................');
|
|
||||||
|
|
||||||
cImg_ToDoPrint : PCharArray=
|
|
||||||
('16 16 5 1',
|
|
||||||
'. c None',
|
|
||||||
'e c #00ff00',
|
|
||||||
'# c #303030',
|
|
||||||
'c c #808080',
|
|
||||||
'b c #c3c3c3',
|
|
||||||
'd c #ff0000',
|
|
||||||
'a c #ffffff',
|
|
||||||
'................',
|
|
||||||
'................',
|
|
||||||
'.......#######..',
|
|
||||||
'......#aaaaa#...',
|
|
||||||
'.....#aaaaa#....',
|
|
||||||
'....#aaaaa#####.',
|
|
||||||
'...########bb##.',
|
|
||||||
'..#bbbbbbbbb#c#.',
|
|
||||||
'..##########cc#.',
|
|
||||||
'..#bdbebbb#cc##.',
|
|
||||||
'..############..',
|
|
||||||
'..#bbbbbbbb##...',
|
|
||||||
'...#########....',
|
|
||||||
'................');
|
|
||||||
|
|
||||||
|
|
||||||
{ TfrmToDo }
|
|
||||||
|
|
||||||
constructor TfrmToDo.Create(AOwner: TComponent);
|
|
||||||
var C : TListColumn;
|
|
||||||
Btn : TSpeedButton;
|
|
||||||
Bar :TPanel;
|
|
||||||
Bmp : TBitMap;
|
|
||||||
|
|
||||||
procedure AssignResImg(SpdBtn: TSpeedButton; const ResName: string);
|
|
||||||
Var PixM : TBitMap;
|
|
||||||
begin
|
|
||||||
if LazarusResources.Find(ResName)<>nil then
|
|
||||||
begin
|
|
||||||
PixM:=TBitMap.Create;
|
|
||||||
try
|
|
||||||
PixM.LoadFromLazarusResource(ResName);
|
|
||||||
SpdBtn.Glyph.Assign(PixM);
|
|
||||||
finally
|
|
||||||
PixM.Free;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
constructor TfrmTodo.Create(AOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited Create(AOwner);
|
inherited Create(AOwner);
|
||||||
fBuild:=False;
|
fBuild:=False;
|
||||||
fScannedFile:=TStringList.Create;
|
fScannedFile:=TStringList.Create;
|
||||||
Left := 456;
|
|
||||||
Top := 116;
|
|
||||||
Width := 477;
|
|
||||||
Height := 307;
|
|
||||||
Caption := lisTodoListCaption;
|
Caption := lisTodoListCaption;
|
||||||
KeyPreview := True;
|
|
||||||
Position := poScreenCenter;
|
|
||||||
OnKeyDown :=@FormKeyDown;
|
|
||||||
|
|
||||||
StatusBar:=TStatusBar.Create(Self);
|
tbRefresh.Hint := lisTodolistRefresh;
|
||||||
with StatusBar do
|
tbGoto.Hint := listodoListGotoLine;
|
||||||
begin
|
tbPrint.Hint :=listodoListPrintList;
|
||||||
parent:=self;
|
tbOptions.Hint := lisToDoListOptions;
|
||||||
Left := 0;
|
|
||||||
Top := 259;
|
|
||||||
Width := 469;
|
|
||||||
Height := 19;
|
|
||||||
SimplePanel := True;
|
|
||||||
end;
|
|
||||||
|
|
||||||
//Tool bar
|
|
||||||
Bar:=TPanel.Create(Self);
|
|
||||||
with Bar do
|
|
||||||
begin
|
|
||||||
parent:=self;
|
|
||||||
Left := 0;
|
|
||||||
Top := 0;
|
|
||||||
Height := 22;
|
|
||||||
Caption := '';
|
|
||||||
Align:=alTop;
|
|
||||||
ParentShowHint:=False;
|
|
||||||
BevelOuter:=bvNone;
|
|
||||||
BevelInner:=bvNone;
|
|
||||||
end;
|
|
||||||
|
|
||||||
//Button refresh
|
|
||||||
Btn:=TSpeedButton.Create(Bar);
|
|
||||||
btn.Parent:=Bar;
|
|
||||||
Btn.Flat :=True;
|
|
||||||
Btn.Width :=20;
|
|
||||||
Btn.Height:=20;
|
|
||||||
Btn.Left :=0;
|
|
||||||
Btn.Top :=0;
|
|
||||||
Bmp:=TBitMap.Create;
|
|
||||||
Bmp.Handle:=CreatePixmapIndirect(@cImg_ToDoRefresh[0], GetSysColor(COLOR_BTNFACE));
|
|
||||||
Btn.Glyph.Assign(Bmp);
|
|
||||||
Bmp.Free;
|
|
||||||
Btn.ShowHint:=True;
|
|
||||||
Btn.Hint := lisTodolistRefresh;
|
|
||||||
Btn.OnClick:=@actFileRefresh;
|
|
||||||
|
|
||||||
//button Goto
|
|
||||||
Btn:=TSpeedButton.Create(Bar);
|
|
||||||
btn.Parent:=Bar;
|
|
||||||
Btn.Flat :=True;
|
|
||||||
Btn.Width :=20;
|
|
||||||
Btn.Height:=20;
|
|
||||||
Btn.Left :=22;
|
|
||||||
Btn.Top :=0;
|
|
||||||
Btn.ShowHint:=True;
|
|
||||||
Bmp:=TBitMap.Create;
|
|
||||||
Bmp.Handle:=CreatePixmapIndirect(@cImg_ToDoGotoLine[0], GetSysColor(COLOR_BTNFACE));
|
|
||||||
Btn.Glyph.Assign(Bmp);
|
|
||||||
Bmp.Free;
|
|
||||||
Btn.Hint := listodoListGotoLine;
|
|
||||||
Btn.OnClick:=@actEditGoto;
|
|
||||||
|
|
||||||
//button Print
|
|
||||||
Btn:=TSpeedButton.Create(Bar);
|
|
||||||
btn.Parent:=Bar;
|
|
||||||
Btn.Flat :=True;
|
|
||||||
Btn.Width :=20;
|
|
||||||
Btn.Height:=20;
|
|
||||||
Btn.Left :=42;
|
|
||||||
Btn.Top :=0;
|
|
||||||
Btn.ShowHint:=True;
|
|
||||||
Btn.Hint :=listodoListPrintList;
|
|
||||||
Bmp:=TBitMap.Create;
|
|
||||||
Bmp.Handle:=CreatePixmapIndirect(@cImg_ToDoPrint[0], GetSysColor(COLOR_BTNFACE));
|
|
||||||
Btn.Glyph.Assign(Bmp);
|
|
||||||
Bmp.Free;
|
|
||||||
Btn.OnClick:=@actFilePrint;
|
|
||||||
|
|
||||||
//button Options
|
|
||||||
Btn:=TSpeedButton.Create(Bar);
|
|
||||||
btn.Parent:=Bar;
|
|
||||||
Btn.Flat :=True;
|
|
||||||
Btn.Width :=20;
|
|
||||||
Btn.Height:=20;
|
|
||||||
Btn.Left :=62;
|
|
||||||
Btn.Top :=0;
|
|
||||||
Btn.ShowHint:=True;
|
|
||||||
Bmp:=TBitMap.Create;
|
|
||||||
Bmp.Handle:=CreatePixmapIndirect(@cImg_ToDoOptions[0], GetSysColor(COLOR_BTNFACE));
|
|
||||||
Btn.Glyph.Assign(Bmp);
|
|
||||||
Bmp.Free;
|
|
||||||
Btn.Hint := lisToDoListOptions;
|
|
||||||
Btn.OnClick:=@actOptionsCfg;
|
|
||||||
|
|
||||||
|
|
||||||
lvTodo:=TListView.Create(Self);
|
|
||||||
with lvTodo do
|
with lvTodo do
|
||||||
begin
|
begin
|
||||||
parent := self;
|
Column[0].Caption := ' !';
|
||||||
Left := 0;
|
Column[0].Width := 25;
|
||||||
Top := 22;
|
Column[1].Caption := lisToDoLDescription;
|
||||||
Width := 469;
|
Column[1].Width := 250;
|
||||||
Height := 237;
|
Column[2].Caption := lisToDoLFile;
|
||||||
Align := alClient;
|
Column[2].Width := 150;
|
||||||
RowSelect := True;
|
Column[3].Caption := lisToDoLLine;
|
||||||
ViewStyle := vsReport;
|
Column[3].Width := 50;
|
||||||
lvToDo.OnDblClick := @actEditGoto;
|
|
||||||
//priority column
|
|
||||||
C:=Columns.Add;
|
|
||||||
C.Caption := ' !';
|
|
||||||
C.Width := 15;
|
|
||||||
//Description column
|
|
||||||
C:=Columns.Add;
|
|
||||||
C.Caption := lisToDoLDescription;
|
|
||||||
C.Width := 250;
|
|
||||||
//File column
|
|
||||||
C:=Columns.Add;
|
|
||||||
C.Caption := lisToDoLFile;
|
|
||||||
C.Width := 150;
|
|
||||||
//Line column
|
|
||||||
C:=Columns.Add;
|
|
||||||
C.Caption := lisToDoLLine;
|
|
||||||
C.Width := 28;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
ActiveControl := lvTodo;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TfrmToDo.Destroy;
|
destructor TfrmTodo.Destroy;
|
||||||
begin
|
begin
|
||||||
fScannedFile.Free;
|
fScannedFile.Free;
|
||||||
|
|
||||||
@ -378,7 +150,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
//Load project main file and scan all files for find the syntax todo
|
//Load project main file and scan all files for find the syntax todo
|
||||||
procedure TfrmToDo.actFileRefresh(Sender: TObject);
|
procedure TfrmTodo.tbRefreshClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
UsedInterfaceFilenames,
|
UsedInterfaceFilenames,
|
||||||
UsedImplementationFilenames: TStrings;
|
UsedImplementationFilenames: TStrings;
|
||||||
@ -386,7 +158,7 @@ var
|
|||||||
St : String;
|
St : String;
|
||||||
begin
|
begin
|
||||||
if fBuild then Exit;
|
if fBuild then Exit;
|
||||||
|
|
||||||
Screen.Cursor:=crHourGlass;
|
Screen.Cursor:=crHourGlass;
|
||||||
Try
|
Try
|
||||||
fBuild:=True;
|
fBuild:=True;
|
||||||
@ -425,21 +197,21 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmToDo.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
procedure TfrmTodo.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||||
begin
|
begin
|
||||||
if Key=VK_ESCAPE then
|
if Key=VK_ESCAPE then
|
||||||
Close;
|
Close;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//Initialise then todo project and find them
|
//Initialise then todo project and find them
|
||||||
procedure TfrmToDo.SetFileName(const AValue: String);
|
procedure TfrmTodo.SetFileName(const AValue: String);
|
||||||
begin
|
begin
|
||||||
if fFileName=AValue then exit;
|
if fFileName=AValue then exit;
|
||||||
fFileName:=AValue;
|
fFileName:=AValue;
|
||||||
actFileRefresh(nil);
|
tbRefreshClick(nil);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmToDo.actEditGoto(Sender: TObject);
|
procedure TfrmTodo.tbGotoClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
CurFilename: String;
|
CurFilename: String;
|
||||||
TheItem: TListItem;
|
TheItem: TListItem;
|
||||||
@ -449,8 +221,6 @@ var
|
|||||||
i: integer;
|
i: integer;
|
||||||
Found: boolean;
|
Found: boolean;
|
||||||
begin
|
begin
|
||||||
//showMessage('not implemented');
|
|
||||||
//exit;
|
|
||||||
CurFilename:='';
|
CurFilename:='';
|
||||||
TheItem:= lvtodo.Selected;
|
TheItem:= lvtodo.Selected;
|
||||||
Found:= false;
|
Found:= false;
|
||||||
@ -476,8 +246,8 @@ begin
|
|||||||
CurFileName:= UsedInterFaceFileNames[i];
|
CurFileName:= UsedInterFaceFileNames[i];
|
||||||
Found:= true;
|
Found:= true;
|
||||||
break;
|
break;
|
||||||
end;//end
|
end;
|
||||||
end;//for
|
end;
|
||||||
if not Found then
|
if not Found then
|
||||||
begin
|
begin
|
||||||
for i:=0 to UsedImplementationFilenames.Count-1 do
|
for i:=0 to UsedImplementationFilenames.Count-1 do
|
||||||
@ -487,32 +257,22 @@ begin
|
|||||||
begin
|
begin
|
||||||
CurFileName:= UsedImplementationFilenames[i];
|
CurFileName:= UsedImplementationFilenames[i];
|
||||||
break;
|
break;
|
||||||
end;//if
|
end;
|
||||||
end;//for
|
end;
|
||||||
end;//if
|
end;
|
||||||
finally
|
finally
|
||||||
UsedImplementationFilenames.Free;
|
UsedImplementationFilenames.Free;
|
||||||
UsedInterfaceFilenames.Free;
|
UsedInterfaceFilenames.Free;
|
||||||
end;//try-finally
|
end;
|
||||||
end;//if
|
end;
|
||||||
end;//if
|
end;
|
||||||
end;//if
|
end;
|
||||||
if Assigned(OnOpenFile) then OnOpenFile(Self,CurFilename,TheLine);
|
if Assigned(OnOpenFile) then OnOpenFile(Self,CurFilename,TheLine);
|
||||||
end;//if
|
end;
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmToDo.actFilePrint(Sender: TObject);
|
|
||||||
begin
|
|
||||||
//showMessage('not implemented');
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmToDo.actOptionsCfg(Sender: TObject);
|
|
||||||
begin
|
|
||||||
//showMessage('not implemented');
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//Find the {$I filename} directive. If exists, call LoadFile()
|
//Find the {$I filename} directive. If exists, call LoadFile()
|
||||||
procedure TfrmToDo.ParseDirective(aDirective : String);
|
procedure TfrmTodo.ParseDirective(aDirective : String);
|
||||||
Var N : Integer;
|
Var N : Integer;
|
||||||
ParsingString : string;
|
ParsingString : string;
|
||||||
begin
|
begin
|
||||||
@ -529,7 +289,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
//Find in comment the ToDo message
|
//Find in comment the ToDo message
|
||||||
procedure TfrmToDo.ParseComment(const aFileName: string; const SComment, EComment: string;
|
procedure TfrmTodo.ParseComment(const aFileName: string; const SComment, EComment: string;
|
||||||
const TokenString: string; LineNumber: Integer);
|
const TokenString: string; LineNumber: Integer);
|
||||||
Var
|
Var
|
||||||
N,J : Integer;
|
N,J : Integer;
|
||||||
@ -602,7 +362,7 @@ end;
|
|||||||
//Load an FileName and find {#todox yyyyyy} where
|
//Load an FileName and find {#todox yyyyyy} where
|
||||||
// x is the priority (0 by default)
|
// x is the priority (0 by default)
|
||||||
// yyyy it's the message one line only
|
// yyyy it's the message one line only
|
||||||
procedure TfrmToDo.LoadFile(const aFileName: string);
|
procedure TfrmTodo.LoadFile(const aFileName: string);
|
||||||
var
|
var
|
||||||
Parser : TmwPasLex;
|
Parser : TmwPasLex;
|
||||||
EStream : TMemoryStream;
|
EStream : TMemoryStream;
|
||||||
@ -656,9 +416,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
{.$I ufrmtodo.lrs}
|
{$i todolist.lrs}
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|||||||
BIN
images/todo_goto.bmp
Normal file
BIN
images/todo_goto.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 822 B |
BIN
images/todo_options.bmp
Normal file
BIN
images/todo_options.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 822 B |
BIN
images/todo_print.bmp
Normal file
BIN
images/todo_print.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 822 B |
BIN
images/todo_refresh.bmp
Normal file
BIN
images/todo_refresh.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 822 B |
Loading…
Reference in New Issue
Block a user