Changeset 4
- Timestamp:
- Feb 9, 2012, 1:43:33 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LazFuckIDE.lpi
r2 r4 39 39 </Item2> 40 40 </RequiredPackages> 41 <Units Count=" 4">41 <Units Count="5"> 42 42 <Unit0> 43 43 <Filename Value="LazFuckIDE.lpr"/> … … 64 64 <UnitName Value="UInterpreterForm"/> 65 65 </Unit3> 66 <Unit4> 67 <Filename Value="UApplicationInfo.pas"/> 68 <IsPartOfProject Value="True"/> 69 <UnitName Value="UApplicationInfo"/> 70 </Unit4> 66 71 </Units> 67 72 </ProjectOptions> -
trunk/LazFuckIDE.lpr
r2 r4 8 8 {$ENDIF}{$ENDIF} 9 9 Interfaces, // this includes the LCL widgetset 10 Forms, UMainForm, UBrainFuck, UInterpreterForm 10 Forms, UMainForm, UBrainFuck, UInterpreterForm, UApplicationInfo 11 11 { you can add units after this }; 12 12 -
trunk/LazFuckIDE.lps
r3 r4 5 5 <Version Value="9"/> 6 6 <BuildModes Active="Default"/> 7 <Units Count=" 6">7 <Units Count="7"> 8 8 <Unit0> 9 9 <Filename Value="LazFuckIDE.lpr"/> … … 18 18 <ResourceBaseClass Value="Form"/> 19 19 <UnitName Value="UMainForm"/> 20 <IsVisibleTab Value="True"/> 20 21 <EditorIndex Value="0"/> 21 22 <WindowIndex Value="0"/> 22 <TopLine Value=" 40"/>23 <CursorPos X=" 35" Y="98"/>23 <TopLine Value="133"/> 24 <CursorPos X="10" Y="146"/> 24 25 <UsageCount Value="23"/> 25 26 <Loaded Value="True"/> … … 30 31 <IsPartOfProject Value="True"/> 31 32 <UnitName Value="UBrainFuck"/> 32 <IsVisibleTab Value="True"/> 33 <EditorIndex Value="2"/> 34 <WindowIndex Value="0"/> 35 <TopLine Value="67"/> 36 <CursorPos X="42" Y="71"/> 33 <EditorIndex Value="3"/> 34 <WindowIndex Value="0"/> 35 <TopLine Value="104"/> 36 <CursorPos X="1" Y="117"/> 37 37 <UsageCount Value="23"/> 38 38 <Loaded Value="True"/> … … 44 44 <ResourceBaseClass Value="Form"/> 45 45 <UnitName Value="UInterpreterForm"/> 46 <EditorIndex Value=" 1"/>46 <EditorIndex Value="2"/> 47 47 <WindowIndex Value="0"/> 48 48 <TopLine Value="11"/> … … 54 54 <Unit4> 55 55 <Filename Value="H:\Lazarus\0.9.31_2.7.1\fpc\2.7.1\source\rtl\objpas\classes\classesh.inc"/> 56 <EditorIndex Value=" 3"/>56 <EditorIndex Value="4"/> 57 57 <WindowIndex Value="0"/> 58 58 <TopLine Value="636"/> 59 59 <CursorPos X="14" Y="649"/> 60 <UsageCount Value="1 1"/>60 <UsageCount Value="12"/> 61 61 <Loaded Value="True"/> 62 62 </Unit4> 63 63 <Unit5> 64 64 <Filename Value="H:\Lazarus\0.9.31_2.7.1\fpc\2.7.1\source\rtl\objpas\classes\stringl.inc"/> 65 <EditorIndex Value=" 4"/>65 <EditorIndex Value="5"/> 66 66 <WindowIndex Value="0"/> 67 67 <TopLine Value="434"/> 68 68 <CursorPos X="3" Y="441"/> 69 <UsageCount Value="1 1"/>69 <UsageCount Value="12"/> 70 70 <Loaded Value="True"/> 71 71 </Unit5> 72 <Unit6> 73 <Filename Value="UApplicationInfo.pas"/> 74 <IsPartOfProject Value="True"/> 75 <UnitName Value="UApplicationInfo"/> 76 <EditorIndex Value="1"/> 77 <WindowIndex Value="0"/> 78 <TopLine Value="46"/> 79 <CursorPos X="47" Y="65"/> 80 <UsageCount Value="20"/> 81 <Loaded Value="True"/> 82 </Unit6> 72 83 </Units> 73 84 <General> … … 89 100 <Position4> 90 101 <Filename Value="UBrainFuck.pas"/> 91 <Caret Line="12 5" Column="1" TopLine="104"/>102 <Caret Line="123" Column="1" TopLine="104"/> 92 103 </Position4> 93 104 <Position5> 94 105 <Filename Value="UBrainFuck.pas"/> 95 <Caret Line="12 1" Column="1" TopLine="104"/>106 <Caret Line="125" Column="1" TopLine="104"/> 96 107 </Position5> 97 108 <Position6> 98 109 <Filename Value="UBrainFuck.pas"/> 99 <Caret Line="1 25" Column="1" TopLine="104"/>110 <Caret Line="130" Column="1" TopLine="117"/> 100 111 </Position6> 101 112 <Position7> 102 113 <Filename Value="UBrainFuck.pas"/> 103 <Caret Line="12 1" Column="1" TopLine="104"/>114 <Caret Line="123" Column="14" TopLine="117"/> 104 115 </Position7> 105 116 <Position8> 106 117 <Filename Value="UBrainFuck.pas"/> 107 <Caret Line="1 25" Column="1" TopLine="104"/>118 <Caret Line="117" Column="1" TopLine="104"/> 108 119 </Position8> 109 120 <Position9> 110 121 <Filename Value="UBrainFuck.pas"/> 111 <Caret Line="12 1" Column="1" TopLine="104"/>122 <Caret Line="123" Column="1" TopLine="104"/> 112 123 </Position9> 113 124 <Position10> … … 117 128 <Position11> 118 129 <Filename Value="UBrainFuck.pas"/> 119 <Caret Line=" 121" Column="1" TopLine="104"/>130 <Caret Line="71" Column="42" TopLine="67"/> 120 131 </Position11> 121 132 <Position12> 122 <Filename Value="U BrainFuck.pas"/>123 <Caret Line=" 125" Column="1" TopLine="104"/>133 <Filename Value="UMainForm.pas"/> 134 <Caret Line="98" Column="35" TopLine="40"/> 124 135 </Position12> 125 136 <Position13> 126 <Filename Value="U BrainFuck.pas"/>127 <Caret Line=" 121" Column="1" TopLine="104"/>137 <Filename Value="UMainForm.pas"/> 138 <Caret Line="99" Column="35" TopLine="74"/> 128 139 </Position13> 129 140 <Position14> 130 <Filename Value="U BrainFuck.pas"/>131 <Caret Line="1 25" Column="1" TopLine="104"/>141 <Filename Value="UMainForm.pas"/> 142 <Caret Line="101" Column="35" TopLine="76"/> 132 143 </Position14> 133 144 <Position15> 134 <Filename Value="U BrainFuck.pas"/>135 <Caret Line="1 21" Column="1" TopLine="104"/>145 <Filename Value="UMainForm.pas"/> 146 <Caret Line="114" Column="1" TopLine="91"/> 136 147 </Position15> 137 148 <Position16> 138 <Filename Value="U BrainFuck.pas"/>139 <Caret Line=" 125" Column="1" TopLine="104"/>149 <Filename Value="UMainForm.pas"/> 150 <Caret Line="68" Column="31" TopLine="48"/> 140 151 </Position16> 141 152 <Position17> 142 <Filename Value="U BrainFuck.pas"/>143 <Caret Line=" 121" Column="1" TopLine="104"/>153 <Filename Value="UMainForm.pas"/> 154 <Caret Line="90" Column="29" TopLine="77"/> 144 155 </Position17> 145 156 <Position18> 146 <Filename Value="U BrainFuck.pas"/>147 <Caret Line=" 125" Column="1" TopLine="104"/>157 <Filename Value="UMainForm.pas"/> 158 <Caret Line="79" Column="37" TopLine="61"/> 148 159 </Position18> 149 160 <Position19> 150 <Filename Value="U BrainFuck.pas"/>151 <Caret Line=" 121" Column="1" TopLine="104"/>161 <Filename Value="UMainForm.pas"/> 162 <Caret Line="70" Column="13" TopLine="63"/> 152 163 </Position19> 153 164 <Position20> 154 <Filename Value="U BrainFuck.pas"/>155 <Caret Line="1 25" Column="1" TopLine="104"/>165 <Filename Value="UMainForm.pas"/> 166 <Caret Line="118" Column="1" TopLine="116"/> 156 167 </Position20> 157 168 <Position21> 158 <Filename Value="U BrainFuck.pas"/>159 <Caret Line="1 21" Column="1" TopLine="104"/>169 <Filename Value="UMainForm.pas"/> 170 <Caret Line="130" Column="1" TopLine="124"/> 160 171 </Position21> 161 172 <Position22> 162 <Filename Value="U BrainFuck.pas"/>163 <Caret Line="1 25" Column="1" TopLine="104"/>173 <Filename Value="UMainForm.pas"/> 174 <Caret Line="140" Column="3" TopLine="132"/> 164 175 </Position22> 165 176 <Position23> 166 <Filename Value="U BrainFuck.pas"/>167 <Caret Line="12 1" Column="1" TopLine="104"/>177 <Filename Value="UMainForm.pas"/> 178 <Caret Line="129" Column="10" TopLine="126"/> 168 179 </Position23> 169 180 <Position24> 170 <Filename Value="U BrainFuck.pas"/>171 <Caret Line=" 123" Column="1" TopLine="104"/>181 <Filename Value="UMainForm.pas"/> 182 <Caret Line="72" Column="15" TopLine="59"/> 172 183 </Position24> 173 184 <Position25> 174 <Filename Value="U BrainFuck.pas"/>175 <Caret Line="1 25" Column="1" TopLine="104"/>185 <Filename Value="UMainForm.pas"/> 186 <Caret Line="130" Column="3" TopLine="127"/> 176 187 </Position25> 177 188 <Position26> 178 <Filename Value="U BrainFuck.pas"/>179 <Caret Line="1 30" Column="1" TopLine="117"/>189 <Filename Value="UMainForm.pas"/> 190 <Caret Line="157" Column="42" TopLine="132"/> 180 191 </Position26> 181 192 <Position27> 182 <Filename Value="U BrainFuck.pas"/>183 <Caret Line=" 123" Column="14" TopLine="117"/>193 <Filename Value="UMainForm.pas"/> 194 <Caret Line="59" Column="15" TopLine="46"/> 184 195 </Position27> 185 196 <Position28> 186 <Filename Value="U BrainFuck.pas"/>187 <Caret Line="1 17" Column="1" TopLine="104"/>197 <Filename Value="UMainForm.pas"/> 198 <Caret Line="106" Column="24" TopLine="89"/> 188 199 </Position28> 189 200 <Position29> 190 <Filename Value="U BrainFuck.pas"/>191 <Caret Line=" 123" Column="1" TopLine="104"/>201 <Filename Value="UMainForm.pas"/> 202 <Caret Line="97" Column="19" TopLine="94"/> 192 203 </Position29> 193 204 <Position30> 194 <Filename Value="U BrainFuck.pas"/>195 <Caret Line="1 25" Column="1" TopLine="104"/>205 <Filename Value="UMainForm.pas"/> 206 <Caret Line="110" Column="54" TopLine="100"/> 196 207 </Position30> 197 208 </JumpHistory> 198 209 </ProjectSession> 199 <Debugging>200 <BreakPoints Count="2">201 <Item1>202 <Kind Value="bpkSource"/>203 <WatchScope Value="wpsLocal"/>204 <WatchKind Value="wpkWrite"/>205 <Source Value="UBrainFuck.pas"/>206 <Line Value="117"/>207 </Item1>208 <Item2>209 <Kind Value="bpkSource"/>210 <WatchScope Value="wpsLocal"/>211 <WatchKind Value="wpkWrite"/>212 <Source Value="UBrainFuck.pas"/>213 <Line Value="123"/>214 </Item2>215 </BreakPoints>216 </Debugging>217 210 </CONFIG> -
trunk/UMainForm.lfm
r3 r4 8 8 ClientWidth = 643 9 9 Menu = MainMenu1 10 OnCloseQuery = FormCloseQuery 10 11 OnCreate = FormCreate 11 12 OnDestroy = FormDestroy … … 18 19 Width = 643 19 20 Align = alClient 20 Lines.Strings = ( 21 '++++++++++[>+++++++>++++++++++>+++>+<<<<' 22 '-]>++.>+.+++++++..+++.>++.<<++++++++++++' 23 '+++.>.+++.------.--------.>+.>.' 24 ) 21 OnChange = MemoSourceChange 25 22 TabOrder = 0 26 23 end … … 465 462 Caption = 'Open' 466 463 ImageIndex = 7 464 OnExecute = AProjectOpenExecute 467 465 ShortCut = 16463 468 466 end … … 470 468 Caption = 'Save' 471 469 ImageIndex = 0 470 OnExecute = AProjectSaveExecute 472 471 ShortCut = 16467 473 472 end … … 475 474 Caption = 'Close' 476 475 ImageIndex = 4 476 OnExecute = AProjectCloseExecute 477 477 ShortCut = 16465 478 478 end … … 480 480 Caption = 'Save as...' 481 481 ImageIndex = 0 482 OnExecute = AProjectSaveAsExecute 482 483 ShortCut = 24659 483 484 end … … 485 486 Caption = 'New' 486 487 ImageIndex = 9 488 OnExecute = AProjectNewExecute 487 489 ShortCut = 16462 488 490 end … … 837 839 } 838 840 end 841 object OpenDialog1: TOpenDialog 842 DefaultExt = '.bf' 843 Filter = 'BrainFuck (*.bf)|*.bf|Any file (*.*)|*.*' 844 left = 192 845 top = 157 846 end 847 object SaveDialog1: TSaveDialog 848 DefaultExt = '.bf' 849 Filter = 'BrainFuck (*.bf)|*.bf|Any file (*.*)|*.*' 850 left = 192 851 top = 208 852 end 839 853 end -
trunk/UMainForm.pas
r3 r4 42 42 MenuItem8: TMenuItem; 43 43 MenuItem9: TMenuItem; 44 OpenDialog1: TOpenDialog; 45 SaveDialog1: TSaveDialog; 44 46 StatusBar1: TStatusBar; 45 47 TabControl1: TTabControl; … … 53 55 ToolButton7: TToolButton; 54 56 procedure AExitExecute(Sender: TObject); 57 procedure AProjectCloseExecute(Sender: TObject); 58 procedure AProjectNewExecute(Sender: TObject); 59 procedure AProjectOpenExecute(Sender: TObject); 60 procedure AProjectSaveAsExecute(Sender: TObject); 61 procedure AProjectSaveExecute(Sender: TObject); 55 62 procedure ARunExecute(Sender: TObject); 63 procedure FormCloseQuery(Sender: TObject; var CanClose: boolean); 56 64 procedure FormCreate(Sender: TObject); 57 65 procedure FormDestroy(Sender: TObject); 58 66 procedure FormShow(Sender: TObject); 67 procedure MemoSourceChange(Sender: TObject); 59 68 private 60 69 { private declarations } 61 70 public 71 Modified: Boolean; 72 ProjectFileName: string; 62 73 BrainFuckInterpreter: TBrainFuckInterpreter; 74 procedure UpdateInterface; 63 75 end; 64 76 … … 71 83 72 84 uses 73 UInterpreterForm ;85 UInterpreterForm, UApplicationInfo; 74 86 75 87 { TMainForm } … … 77 89 procedure TMainForm.FormShow(Sender: TObject); 78 90 begin 91 UpdateInterface; 92 end; 79 93 94 procedure TMainForm.MemoSourceChange(Sender: TObject); 95 begin 96 Modified := True; 97 UpdateInterface; 98 end; 99 100 procedure TMainForm.UpdateInterface; 101 var 102 Title: string; 103 begin 104 AProjectSave.Enabled := Modified; 105 Title := ApplicationInfo.Name; 106 if ProjectFileName <> '' then Title := ProjectFileName + ' - ' + Title; 107 if Modified then Title := Title + ' *'; 108 Caption := Title; 109 MemoSource.Enabled := ProjectFileName <> ''; 110 AProjectClose.Enabled := ProjectFileName <> ''; 111 ARun.Enabled := ProjectFileName <> ''; 112 ACompile.Enabled := ProjectFileName <> ''; 80 113 end; 81 114 … … 99 132 end; 100 133 134 procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: boolean); 135 begin 136 end; 137 101 138 procedure TMainForm.AExitExecute(Sender: TObject); 102 139 begin … … 104 141 end; 105 142 143 procedure TMainForm.AProjectCloseExecute(Sender: TObject); 144 begin 145 Modified := False; 146 ProjectFileName := ''; 147 MemoSource.Clear; 148 UpdateInterface; 149 end; 150 151 procedure TMainForm.AProjectNewExecute(Sender: TObject); 152 begin 153 ProjectFileName := 'Project.bf'; 154 MemoSource.Clear; 155 UpdateInterface; 156 end; 157 158 procedure TMainForm.AProjectOpenExecute(Sender: TObject); 159 begin 160 OpenDialog1.FileName := ProjectFileName; 161 if OpenDialog1.Execute then begin 162 MemoSource.Lines.LoadFromFile(OpenDialog1.FileName); 163 ProjectFileName := OpenDialog1.FileName; 164 UpdateInterface; 165 end; 166 end; 167 168 procedure TMainForm.AProjectSaveAsExecute(Sender: TObject); 169 begin 170 SaveDialog1.FileName := ProjectFileName; 171 if SaveDialog1.Execute then begin 172 MemoSource.Lines.SaveToFile(SaveDialog1.FileName); 173 ProjectFileName := SaveDialog1.FileName; 174 Modified := False; 175 UpdateInterface; 176 end; 177 end; 178 179 procedure TMainForm.AProjectSaveExecute(Sender: TObject); 180 begin 181 if Modified then AProjectSaveAs.Execute; 182 end; 183 106 184 end. 107 185
Note:
See TracChangeset
for help on using the changeset viewer.