Changeset 233 for oup/current/Tools
- Timestamp:
- Jun 29, 2007, 2:38:24 PM (17 years ago)
- Location:
- oup/current/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
oup/current/Tools/MetaEditor.dfm
r232 r233 12 12 ExplicitTop = 25 13 13 ExplicitWidth = 598 14 ExplicitHeight = 53214 ExplicitHeight = 424 15 15 object splitter: TSplitter 16 16 Left = 190 … … 48 48 OnPaintText = VSTPaintText 49 49 OnInitChildren = VSTInitChildren 50 ExplicitWidth = 50251 ExplicitHeight = 53252 50 Columns = < 53 51 item … … 80 78 Caption = 'Meta Edit' 81 79 ImageIndex = 1 82 ExplicitWidth = 192 83 ExplicitHeight = 504 80 ExplicitLeft = 0 81 ExplicitTop = 0 82 ExplicitWidth = 0 83 ExplicitHeight = 0 84 84 end 85 85 object tab_hex: TTabSheet 86 86 Caption = 'Binary Edit' 87 ExplicitWidth = 19288 ExplicitHeight = 50489 87 object splitter_hex_1: TSplitter 90 88 Left = 0 … … 102 100 object splitter_hex_2: TSplitter 103 101 Left = 0 104 Top = 25 0102 Top = 256 105 103 Width = 392 106 104 Height = 8 … … 115 113 object panel_hex_actions: TPanel 116 114 Left = 0 117 Top = 3 55118 Width = 392 119 Height = 41115 Top = 361 116 Width = 392 117 Height = 35 120 118 Align = alBottom 121 119 BevelOuter = bvNone 122 120 Caption = 'panel_hex_actions' 123 121 TabOrder = 0 124 ExplicitLeft = 3 125 ExplicitTop = 354 126 ExplicitWidth = 192 122 object btn_export: TButton 123 Left = 2 124 Top = 6 125 Width = 117 126 Height = 25 127 Caption = 'Export to file...' 128 TabOrder = 0 129 end 130 object btn_import: TButton 131 Left = 125 132 Top = 6 133 Width = 117 134 Height = 25 135 Caption = 'Import from file...' 136 TabOrder = 1 137 end 127 138 end 128 139 object hex: TMPHexEditor … … 151 162 Colors.EvenColumn = clNavy 152 163 Colors.CurrentOffsetBackground = clBtnShadow 153 Colors.OffsetBack ground = clBtnFace164 Colors.OffsetBackGround = clBtnFace 154 165 Colors.CurrentOffset = clBtnHighlight 155 166 Colors.Grid = clBtnFace … … 160 171 AllowInsertMode = False 161 172 DrawGridLines = False 162 Version = ' december 06, 2006; '#169' markus stephany, vcl[at]mirkes[dot]de'173 Version = 'May 23, 2005; '#169' markus stephany, vcl[at]mirkes[dot]de' 163 174 ShowPositionIfNotFocused = True 164 ExplicitWidth = 192165 175 end 166 176 object value_viewer: TWrapGrid … … 168 178 Top = 108 169 179 Width = 392 170 Height = 14 2180 Height = 148 171 181 Align = alClient 172 182 ColCount = 1 … … 179 189 ScrollBars = ssVertical 180 190 TabOrder = 2 181 ExplicitTop = 363182 ExplicitWidth = 192183 ExplicitHeight = 0184 191 end 185 192 object structviewer: TVirtualStringTree 186 193 Left = 0 187 Top = 2 58194 Top = 264 188 195 Width = 392 189 196 Height = 97 … … 225 232 OnFocusChanged = VSTFocusChanged 226 233 OnGetText = VSTGetText 227 ExplicitLeft = -6228 ExplicitTop = 161229 ExplicitWidth = 192230 234 Columns = < 231 235 item … … 280 284 end 281 285 end 286 object value_viewer_context: TPopupMenu 287 AutoHotkeys = maManual 288 AutoLineReduction = maManual 289 Left = 300 290 Top = 196 291 object value_viewer_context_copy: TMenuItem 292 Caption = 'Copy to &clipboard' 293 end 294 object value_viewer_context_copyasdec: TMenuItem 295 Caption = 'Copy to clipboard (as &dec)' 296 end 297 object value_viewer_context_copyasfloat: TMenuItem 298 Caption = 'Copy to clipboard (as &float)' 299 end 300 object value_viewer_context_copyasbitset: TMenuItem 301 Caption = 'Copy to clipboard (as &bitset)' 302 end 303 object value_viewer_context_copyasstring: TMenuItem 304 Caption = 'Copy to clipboard (as &string)' 305 end 306 object value_viewer_context_copyashex: TMenuItem 307 Caption = 'Copy to clipboard (as &hex)' 308 end 309 end 310 object VTHPopup: TVTHeaderPopupMenu 311 Left = 292 312 Top = 340 313 end 282 314 end -
oup/current/Tools/MetaEditor.pas
r232 r233 6 6 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 7 Dialogs, _BaseTemplate, ExtCtrls, VirtualTrees, StdCtrls, ComCtrls, Grids, 8 MPHexEditor, Wrapgrid ;8 MPHexEditor, Wrapgrid, VTHeaderPopup, Menus, _TreeElement; 9 9 10 10 type … … 21 21 splitter_hex_2: TSplitter; 22 22 structviewer: TVirtualStringTree; 23 value_viewer_context: TPopupMenu; 24 value_viewer_context_copy: TMenuItem; 25 value_viewer_context_copyasdec: TMenuItem; 26 value_viewer_context_copyasfloat: TMenuItem; 27 value_viewer_context_copyasbitset: TMenuItem; 28 value_viewer_context_copyasstring: TMenuItem; 29 value_viewer_context_copyashex: TMenuItem; 30 VTHPopup: TVTHeaderPopupMenu; 31 btn_export: TButton; 32 btn_import: TButton; 23 33 procedure FormCreate(Sender: TObject); 24 34 procedure VSTInitChildren(Sender: TBaseVirtualTree; Node: PVirtualNode; … … 36 46 TextType: TVSTTextType); 37 47 private 48 root: TTreeElement; 38 49 procedure NewCon(ID: Integer); 39 50 public … … 49 60 50 61 TNodeData = record 51 Field: T Object;62 Field: TTreeElement; 52 63 end; 53 64 … … 70 81 node: PVirtualNode; 71 82 Meta: TMetaManager; 72 root: T Extensions;83 root: TTreeElement; 73 84 begin 74 85 if ID >= 0 then … … 78 89 VST.BeginUpdate; 79 90 root := ConManager.Connection[FConnectionID].MetaData.Root; 80 for i := 0 to High(root)do81 begin 82 data.Field := root [i];91 for i := 0 to root.ChildCount - 1 do 92 begin 93 data.Field := root.Child[i]; 83 94 node := AddVSTEntry(VST, nil, data); 84 95 VST.HasChildren[node] := True; … … 96 107 newnode: PVirtualNode; 97 108 i: Integer; 98 id: Integer;99 109 Meta: TMetaManager; 100 110 begin 101 111 data := Sender.GetNodeData(node); 102 112 Meta := ConManager.Connection[ConnectionID].MetaData; 103 if data.Field is TFile then104 begin105 if TFile(data.Field).ChildCount > 0 then106 begin107 for i := 0 to TFile(data.Field).ChildCount - 1 do108 begin109 id := TFile(data.Field).LinkByIndex[i].DestID;110 Meta.InitFile(id);111 newdata.Field := Meta.FileById[id];112 newnode := AddVSTEntry(TCustomVirtualStringTree(Sender), Node, newdata);113 if Meta.FileById[id].ChildCount > 0 then114 Sender.HasChildren[newnode] := True;115 end;116 end;117 if TFile(data.Field).RawCount > 0 then118 begin119 for i := 0 to TFile(data.Field).RawCount - 1 do120 begin121 // Exit;122 end;123 end;124 end;125 113 if data.Field is TExtension then 126 begin 127 if TExtension(data.Field).FileCount = 0 then 114 if TExtension(data.Field).ChildCount = 0 then 128 115 TExtension(data.Field).InitList; 129 for i := 0 to TExtension(data.Field).FileCount - 1 do 130 begin 131 id := TExtension(data.Field).Files[i]; 132 Meta.InitFile(id); 133 newdata.Field := Meta.FileById[id]; 116 117 if data.Field.ChildCount > 0 then 118 begin 119 for i := 0 to data.Field.ChildCount - 1 do 120 begin 121 newdata.Field := data.Field.Child[i]; 134 122 newnode := AddVSTEntry(TCustomVirtualStringTree(Sender), Node, newdata); 135 if Meta.FileById[id].ChildCount > 0 then123 if newdata.Field.ChildCount > 0 then 136 124 Sender.HasChildren[newnode] := True; 137 125 end; … … 205 193 0: 206 194 begin 207 if Data.Field is TFile then 208 begin 209 CellText := TFile(Data.Field).FileInfo.Name; 210 if CellText = '' then 211 CellText := 'Unnamed'; 212 end; 213 if Data.Field is TExtension then 214 CellText := TExtension(Data.Field).Ext; 195 CellText := Data.Field.GetCaption; 215 196 end; 216 197 1: -
oup/current/Tools/_TemplateFileList.dfm
r231 r233 269 269 Caption = 'Tree' 270 270 ImageIndex = 1 271 ExplicitLeft = 0 272 ExplicitTop = 0 273 ExplicitWidth = 0 274 ExplicitHeight = 0 271 275 object filelist_meta: TVirtualStringTree 272 276 Left = 0 -
oup/current/Tools/_TemplateFileList.pas
r231 r233 173 173 filelist_meta.Clear; 174 174 filelist_meta.BeginUpdate; 175 root := ConManager.Connection[FConnectionID].MetaData.Root;175 { root := ConManager.Connection[FConnectionID].MetaData.Root; 176 176 for i := 0 to High(root) do 177 177 begin … … 181 181 end; 182 182 filelist_meta.EndUpdate; 183 end;183 } end; 184 184 end; 185 185 … … 453 453 begin 454 454 inherited; 455 data := Sender.GetNodeData(Node);455 { data := Sender.GetNodeData(Node); 456 456 if data.Field is TExtension then 457 457 begin … … 465 465 CellText := TFile(data.Field).FileInfo.Extension + ': ' + TFile(data.Field).FileInfo.Name; 466 466 end; 467 end;467 }end; 468 468 469 469 … … 481 481 Self.Cursor := crHourGlass; 482 482 Application.ProcessMessages; 483 if data.Field is TExtension then483 { if data.Field is TExtension then 484 484 begin 485 485 if TExtension(data.Field).FileCount = 0 then … … 509 509 ChildCount := filelist_meta.ChildCount[node]; 510 510 end; 511 Self.Cursor := crDefault;511 } Self.Cursor := crDefault; 512 512 end; 513 513
Note:
See TracChangeset
for help on using the changeset viewer.