Changeset 232 for oup/current/Tools
- Timestamp:
- Jun 28, 2007, 11:24:08 AM (17 years ago)
- Location:
- oup/current/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
oup/current/Tools/MetaEditor.dfm
r229 r232 1 1 inherited Form_Meta: TForm_Meta 2 2 Caption = 'Form_Meta' 3 ClientHeight = 449 3 4 OnCreate = FormCreate 5 ExplicitWidth = 606 6 ExplicitHeight = 476 4 7 PixelsPerInch = 96 5 8 TextHeight = 13 6 9 inherited panel_basecontent: TPanel 10 Height = 424 7 11 ExplicitLeft = 0 8 12 ExplicitTop = 25 … … 10 14 ExplicitHeight = 532 11 15 object splitter: TSplitter 12 Left = 50216 Left = 190 13 17 Top = 0 14 18 Width = 8 15 Height = 53219 Height = 424 16 20 Align = alRight 17 21 AutoSnap = False 18 22 Beveled = True 19 23 MinSize = 200 20 ExplicitLeft = 353 24 ExplicitLeft = 287 25 ExplicitTop = 16 26 ExplicitHeight = 532 21 27 end 22 28 object VST: TVirtualStringTree 23 29 Left = 0 24 30 Top = 0 25 Width = 50226 Height = 53231 Width = 190 32 Height = 424 27 33 Align = alClient 28 34 AnimationDuration = 0 … … 42 48 OnPaintText = VSTPaintText 43 49 OnInitChildren = VSTInitChildren 50 ExplicitWidth = 502 51 ExplicitHeight = 532 44 52 Columns = < 45 53 item … … 61 69 end> 62 70 end 63 object Panel2: TPanel64 Left = 51071 object rightPages: TPageControl 72 Left = 198 65 73 Top = 0 66 Width = 88 67 Height = 532 74 Width = 400 75 Height = 424 76 ActivePage = tab_hex 68 77 Align = alRight 69 BevelOuter = bvNone70 Caption = 'Panel2'71 78 TabOrder = 1 79 object tab_meta: TTabSheet 80 Caption = 'Meta Edit' 81 ImageIndex = 1 82 ExplicitWidth = 192 83 ExplicitHeight = 504 84 end 85 object tab_hex: TTabSheet 86 Caption = 'Binary Edit' 87 ExplicitWidth = 192 88 ExplicitHeight = 504 89 object splitter_hex_1: TSplitter 90 Left = 0 91 Top = 100 92 Width = 392 93 Height = 8 94 Cursor = crVSplit 95 Align = alTop 96 AutoSnap = False 97 Beveled = True 98 MinSize = 40 99 ExplicitTop = 209 100 ExplicitWidth = 192 101 end 102 object splitter_hex_2: TSplitter 103 Left = 0 104 Top = 250 105 Width = 392 106 Height = 8 107 Cursor = crVSplit 108 Align = alBottom 109 AutoSnap = False 110 Beveled = True 111 MinSize = 40 112 ExplicitTop = 300 113 ExplicitWidth = 192 114 end 115 object panel_hex_actions: TPanel 116 Left = 0 117 Top = 355 118 Width = 392 119 Height = 41 120 Align = alBottom 121 BevelOuter = bvNone 122 Caption = 'panel_hex_actions' 123 TabOrder = 0 124 ExplicitLeft = 3 125 ExplicitTop = 354 126 ExplicitWidth = 192 127 end 128 object hex: TMPHexEditor 129 Left = 0 130 Top = 0 131 Width = 392 132 Height = 100 133 Cursor = crIBeam 134 Align = alTop 135 Font.Charset = DEFAULT_CHARSET 136 Font.Color = clWindowText 137 Font.Height = -16 138 Font.Name = 'Courier' 139 Font.Style = [] 140 ParentFont = False 141 TabOrder = 1 142 BytesPerRow = 16 143 Translation = tkASCII 144 OffsetFormat = '6!10:0x|' 145 Colors.Background = clWindow 146 Colors.ChangedBackground = clWindow 147 Colors.ChangedText = clRed 148 Colors.CursorFrame = clNavy 149 Colors.Offset = clBlack 150 Colors.OddColumn = clBlue 151 Colors.EvenColumn = clNavy 152 Colors.CurrentOffsetBackground = clBtnShadow 153 Colors.OffsetBackground = clBtnFace 154 Colors.CurrentOffset = clBtnHighlight 155 Colors.Grid = clBtnFace 156 Colors.NonFocusCursorFrame = clAqua 157 Colors.ActiveFieldBackground = clWindow 158 FocusFrame = True 159 NoSizeChange = True 160 AllowInsertMode = False 161 DrawGridLines = False 162 Version = 'december 06, 2006; '#169' markus stephany, vcl[at]mirkes[dot]de' 163 ShowPositionIfNotFocused = True 164 ExplicitWidth = 192 165 end 166 object value_viewer: TWrapGrid 167 Left = 0 168 Top = 108 169 Width = 392 170 Height = 142 171 Align = alClient 172 ColCount = 1 173 DefaultColWidth = 80 174 DefaultRowHeight = 18 175 FixedCols = 0 176 RowCount = 8 177 FixedRows = 0 178 Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goColSizing] 179 ScrollBars = ssVertical 180 TabOrder = 2 181 ExplicitTop = 363 182 ExplicitWidth = 192 183 ExplicitHeight = 0 184 end 185 object structviewer: TVirtualStringTree 186 Left = 0 187 Top = 258 188 Width = 392 189 Height = 97 190 Align = alBottom 191 AnimationDuration = 0 192 AutoExpandDelay = 300 193 BiDiMode = bdLeftToRight 194 Colors.UnfocusedSelectionColor = clGradientActiveCaption 195 Colors.UnfocusedSelectionBorderColor = clGradientActiveCaption 196 Ctl3D = True 197 DragOperations = [] 198 DrawSelectionMode = smBlendedRectangle 199 EditDelay = 200 200 Font.Charset = DEFAULT_CHARSET 201 Font.Color = clWindowText 202 Font.Height = -11 203 Font.Name = 'Tahoma' 204 Font.Style = [] 205 Header.AutoSizeIndex = 0 206 Header.Font.Charset = DEFAULT_CHARSET 207 Header.Font.Color = clWindowText 208 Header.Font.Height = -11 209 Header.Font.Name = 'Tahoma' 210 Header.Font.Style = [] 211 Header.Options = [hoColumnResize, hoDblClickResize, hoDrag, hoVisible] 212 Header.Style = hsFlatButtons 213 HintAnimation = hatNone 214 HintMode = hmTooltip 215 Indent = 14 216 ParentBiDiMode = False 217 ParentCtl3D = False 218 ParentFont = False 219 ParentShowHint = False 220 ShowHint = True 221 TabOrder = 3 222 TreeOptions.MiscOptions = [toAcceptOLEDrop, toCheckSupport, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning] 223 TreeOptions.PaintOptions = [toShowButtons, toShowDropmark, toShowHorzGridLines, toShowRoot, toShowTreeLines, toShowVertGridLines, toUseBlendedImages] 224 TreeOptions.SelectionOptions = [toExtendedFocus, toFullRowSelect, toRightClickSelect] 225 OnFocusChanged = VSTFocusChanged 226 OnGetText = VSTGetText 227 ExplicitLeft = -6 228 ExplicitTop = 161 229 ExplicitWidth = 192 230 Columns = < 231 item 232 MaxWidth = 300 233 MinWidth = 100 234 Options = [coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coVisible] 235 Position = 0 236 Spacing = 20 237 Width = 150 238 WideText = 'Name' 239 WideHint = 'Name of the item.' 240 end 241 item 242 MaxWidth = 110 243 MinWidth = 80 244 Options = [coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coVisible] 245 Position = 1 246 Spacing = 20 247 Width = 85 248 WideText = 'Offset' 249 WideHint = 'Offset of the data-item.' 250 end 251 item 252 MaxWidth = 110 253 MinWidth = 75 254 Options = [coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coVisible] 255 Position = 2 256 Width = 75 257 WideText = 'Type' 258 WideHint = 'Data type of the item.' 259 end 260 item 261 MaxWidth = 250 262 MinWidth = 80 263 Options = [coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coVisible] 264 Position = 3 265 Width = 100 266 WideText = 'Value' 267 WideHint = 'Value of the item.' 268 end 269 item 270 MaxWidth = 400 271 MinWidth = 80 272 Options = [coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coVisible] 273 Position = 4 274 Width = 400 275 WideText = 'Description' 276 end> 277 WideDefaultText = '' 278 end 279 end 72 280 end 73 281 end -
oup/current/Tools/MetaEditor.pas
r231 r232 5 5 uses 6 6 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 Dialogs, _BaseTemplate, ExtCtrls, VirtualTrees, StdCtrls; 7 Dialogs, _BaseTemplate, ExtCtrls, VirtualTrees, StdCtrls, ComCtrls, Grids, 8 MPHexEditor, Wrapgrid; 8 9 9 10 type 10 11 TForm_Meta = class(TForm_BaseTemplate) 11 12 VST: TVirtualStringTree; 12 Panel2: TPanel;13 13 splitter: TSplitter; 14 rightPages: TPageControl; 15 tab_hex: TTabSheet; 16 tab_meta: TTabSheet; 17 panel_hex_actions: TPanel; 18 hex: TMPHexEditor; 19 splitter_hex_1: TSplitter; 20 value_viewer: TWrapGrid; 21 splitter_hex_2: TSplitter; 22 structviewer: TVirtualStringTree; 14 23 procedure FormCreate(Sender: TObject); 15 24 procedure VSTInitChildren(Sender: TBaseVirtualTree; Node: PVirtualNode; … … 34 43 implementation 35 44 {$R *.dfm} 36 uses _MetaManager, _MetaTypes, ConnectionManager, Data ;45 uses _MetaManager, _MetaTypes, ConnectionManager, Data, _FileTypes; 37 46 38 47 type … … 61 70 node: PVirtualNode; 62 71 Meta: TMetaManager; 72 root: TExtensions; 63 73 begin 64 74 if ID >= 0 then 65 75 begin 76 //VST 66 77 VST.Clear; 67 78 VST.BeginUpdate; 68 Meta := ConManager.Connection[ID].MetaData; 69 for i := 0 to Meta.FileCount - 1 do 70 begin 71 if Assigned(Meta.FileById[i]) then 72 begin 73 data.Field := Meta.FileById[i]; 74 node := AddVSTEntry(VST, nil, data); 75 if Meta.FileById[i].ChildCount > 0 then 76 VST.HasChildren[node] := True; 77 end; 79 root := ConManager.Connection[FConnectionID].MetaData.Root; 80 for i := 0 to High(root) do 81 begin 82 data.Field := root[i]; 83 node := AddVSTEntry(VST, nil, data); 84 VST.HasChildren[node] := True; 78 85 end; 79 86 VST.EndUpdate; … … 93 100 begin 94 101 data := Sender.GetNodeData(node); 95 Meta := ConManager.Connection[ID].MetaData; 96 for i := 0 to TFile(data.Field).ChildCount - 1 do 97 begin 98 id := TFile(data.Field).LinkByIndex[i].DestID; 99 Meta.InitFile(id); 100 newdata.Field := Meta.FileById[id]; 101 newnode := AddVSTEntry(TCustomVirtualStringTree(Sender), Node, newdata); 102 if Meta.FileById[id].ChildCount > 0 then 103 Sender.HasChildren[newnode] := True; 102 Meta := ConManager.Connection[ConnectionID].MetaData; 103 if data.Field is TFile then 104 begin 105 if TFile(data.Field).ChildCount > 0 then 106 begin 107 for i := 0 to TFile(data.Field).ChildCount - 1 do 108 begin 109 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 then 114 Sender.HasChildren[newnode] := True; 115 end; 116 end; 117 if TFile(data.Field).RawCount > 0 then 118 begin 119 for i := 0 to TFile(data.Field).RawCount - 1 do 120 begin 121 // Exit; 122 end; 123 end; 124 end; 125 if data.Field is TExtension then 126 begin 127 if TExtension(data.Field).FileCount = 0 then 128 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]; 134 newnode := AddVSTEntry(TCustomVirtualStringTree(Sender), Node, newdata); 135 if Meta.FileById[id].ChildCount > 0 then 136 Sender.HasChildren[newnode] := True; 137 end; 104 138 end; 105 139 ChildCount := Sender.ChildCount[Node]; … … 118 152 if Assigned(TFile(data.Field).Editor) then 119 153 begin 120 panel2.InsertControl(TFile(data.Field).Editor); 154 TFile(data.Field).Editor.Align := alClient; 155 tab_meta.InsertControl(TFile(data.Field).Editor); 121 156 TFile(data.Field).Opened := True; 122 157 end; … … 148 183 if TFile(data.Field).Opened then 149 184 begin 150 if panel2.ControlCount > 0 then151 for i := 0 to panel2.ControlCount - 1 do152 panel2.RemoveControl(panel2.Controls[i]);185 if tab_meta.ControlCount > 0 then 186 for i := 0 to tab_meta.ControlCount - 1 do 187 tab_meta.RemoveControl(tab_meta.Controls[i]); 153 188 TFile(data.Field).Opened := False; 154 189 end; … … 176 211 CellText := 'Unnamed'; 177 212 end; 213 if Data.Field is TExtension then 214 CellText := TExtension(Data.Field).Ext; 178 215 end; 179 216 1: -
oup/current/Tools/TxmpReplace.dfm
r224 r232 1 1 inherited Form_TxmpReplace: TForm_TxmpReplace 2 2 Caption = 'Form_TxmpReplace' 3 ClientHeight = 5733 ClientHeight = 438 4 4 OnCreate = FormCreate 5 ExplicitHeight = 6005 ExplicitHeight = 465 6 6 PixelsPerInch = 96 7 7 TextHeight = 13 8 8 inherited panel_basecontent: TPanel 9 Height = 548 9 Height = 413 10 ExplicitHeight = 548 10 11 inherited splitter_content: TSplitter 11 Height = 54812 Height = 413 12 13 OnMoved = Splitter1Moved 14 ExplicitHeight = 548 13 15 end 14 16 inherited panel_files: TPanel 15 Height = 548 17 Height = 413 18 ExplicitHeight = 548 16 19 inherited FilePages: TPageControl 17 Height = 54720 Height = 412 18 21 Constraints.MinHeight = 250 19 ExplicitHeight = 28022 ExplicitHeight = 547 20 23 inherited tab_files: TTabSheet 21 inherited panel_extension: TPanel 22 inherited edit_filtername: TEdit 23 ExplicitWidth = 189 24 end 25 end 24 ExplicitHeight = 467 26 25 inherited filelist: TListBox 27 Height = 394 26 Height = 259 27 ExplicitHeight = 342 28 28 end 29 29 end … … 32 32 ExplicitTop = 24 33 33 ExplicitWidth = 190 34 ExplicitHeight = 424 34 ExplicitHeight = 519 35 inherited filelist_meta: TVirtualStringTree 36 Height = 384 37 ExplicitHeight = 519 38 end 35 39 end 36 40 end 37 41 end 38 42 inherited panel_content: TPanel 39 Height = 548 43 Height = 413 44 ExplicitHeight = 548 40 45 object Splitter1: TSplitter 41 46 Left = 0 42 Top = 2 2047 Top = 200 43 48 Width = 390 44 49 Height = 8 … … 53 58 object group_options: TGroupBox 54 59 Left = 0 55 Top = 46960 Top = 334 56 61 Width = 390 57 62 Height = 79 … … 60 65 Enabled = False 61 66 TabOrder = 0 62 ExplicitTop = 441 63 ExplicitWidth = 492 67 ExplicitTop = 469 64 68 object btn_replace: TButton 65 69 Left = 4 … … 89 93 end 90 94 end 91 object GroupBox1: TGroupBox95 object group_txmp: TGroupBox 92 96 Left = 0 93 97 Top = 0 94 98 Width = 390 95 Height = 2 2099 Height = 200 96 100 Align = alTop 97 101 Caption = '1. Select a TXMP to be replaced' … … 101 105 Top = 15 102 106 Width = 386 103 Height = 1 73107 Height = 153 104 108 Align = alClient 105 109 ExplicitLeft = 0 … … 110 114 object panel_txmppreview: TPanel 111 115 Left = 2 112 Top = 1 88116 Top = 168 113 117 Width = 386 114 118 Height = 30 … … 116 120 BevelOuter = bvNone 117 121 TabOrder = 0 118 ExplicitLeft = 0 119 ExplicitTop = 411 120 ExplicitWidth = 200 122 ExplicitTop = 188 121 123 object btn_save: TButton 122 124 Left = 2 … … 132 134 object group_bmpselect: TGroupBox 133 135 Left = 0 134 Top = 2 28136 Top = 208 135 137 Width = 390 136 Height = 241138 Height = 126 137 139 Align = alClient 138 140 Caption = '2. Open BMP to replace with' 139 141 Enabled = False 140 142 TabOrder = 2 141 ExplicitTop = 0 142 ExplicitWidth = 283 143 ExplicitHeight = 441 143 ExplicitLeft = -2 144 ExplicitTop = 206 144 145 object image_bmppreview: TImage 145 146 AlignWithMargins = True … … 147 148 Top = 48 148 149 Width = 380 149 Height = 188150 Height = 73 150 151 Align = alClient 151 152 ExplicitLeft = 2 … … 184 185 Options = [ofOverwritePrompt, ofHideReadOnly, ofPathMustExist, ofEnableSizing] 185 186 Left = 352 186 Top = 212187 Top = 196 187 188 end 188 189 object opend: TOpenDialog 189 190 Options = [ofPathMustExist, ofFileMustExist, ofEnableSizing] 190 191 Left = 352 191 Top = 2 64192 Top = 248 192 193 end 193 194 end -
oup/current/Tools/TxmpReplace.pas
r224 r232 6 6 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 7 Dialogs, _TemplateFileList, Menus, StdCtrls, Buttons, ComCtrls, ExtCtrls, 8 OniImgClass, TypeDefs ;8 OniImgClass, TypeDefs, VirtualTrees; 9 9 10 10 type … … 14 14 check_transparency: TCheckBox; 15 15 check_fading: TCheckBox; 16 GroupBox1: TGroupBox;16 group_txmp: TGroupBox; 17 17 Splitter1: TSplitter; 18 18 group_bmpselect: TGroupBox;
Note:
See TracChangeset
for help on using the changeset viewer.