ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/oup/current/Main.pas
(Generate patch)

Comparing oup/current/Main.pas (file contents):
Revision 45 by alloc, Sat Dec 23 00:03:50 2006 UTC vs.
Revision 46 by alloc, Sat Dec 23 16:26:43 2006 UTC

# Line 7 | Line 7 | uses
7    Dialogs, StdCtrls, StrUtils, Clipbrd, ExtCtrls, ComCtrls, Menus, Grids,
8    MPHexEditor, ToolWin, ImgList, Tabs,
9    MDITab, TB2Item, TB2Dock, TB2Toolbar, TB2MDI,
10 <  Code_Functions, Data, Code_DataStructures, Code_OniDataClass,
11 <  Helper_LevelDB, Code_Exporters, Settings, Tool_Template,
12 <  Tool_BinEdit, Tool_Extractor, Tool_Preview, Tool_RawEdit, Tool_TxmpReplace;
10 >  Data, Functions, DataStructures, OniDataClass, Exporters,
11 >  Helper_LevelDB, Settings, Template,
12 >  BinEdit, Extractor, Preview, RawEdit, TxmpReplace;
13  
14   type
15    TForm_Main = class(TForm)
# Line 65 | Line 65 | type
65      tb_txmpreplacer: TTBItem;
66      tb_rawedit: TTBItem;
67      tb_datedit: TTBItem;
68 +    menu_windows_tilevert: TTBItem;
69      function TryCloseAll: Boolean;
70      procedure menu_AboutClick(Sender: TObject);
71      procedure menu_settingsClick(Sender: TObject);
# Line 76 | Line 77 | type
77      procedure menu_windows_previousClick(Sender: TObject);
78      procedure menu_windows_nextClick(Sender: TObject);
79      procedure menu_windows_tileClick(Sender: TObject);
80 <    function open_child(window_context: String; fileid: Integer): Boolean;
80 >    function open_child(window_context: String; fileid: Integer): TForm_ToolTemplate;
81      procedure menu_windows_closeallClick(Sender: TObject);
82      procedure menu_windows_cascadeClick(Sender: TObject);
83      procedure menu_bineditClick(Sender: TObject);
# Line 96 | Line 97 | type
97      procedure ActivateTools(active: Boolean);
98      procedure MDITabMouseUp(Sender: TObject; Button: TMouseButton;
99        Shift: TShiftState; X, Y: Integer);
100 +    procedure menu_windows_tilevertClick(Sender: TObject);
101    private
102    public
103    end;
# Line 474 | Line 476 | begin
476    Self.Tile;
477   end;
478  
479 + procedure TForm_Main.menu_windows_tilevertClick(Sender: TObject);
480 + begin
481 +  Self.TileMode := tbVertical;
482 +  Self.Tile;
483 + end;
484  
485  
486   procedure TForm_Main.menu_windows_closeallClick(Sender: TObject);
# Line 516 | Line 523 | end;
523  
524  
525  
526 < function TForm_Main.open_child(window_context: String; fileid: Integer): Boolean;
526 > function TForm_Main.open_child(window_context: String; fileid: Integer): TForm_ToolTemplate;
527   var
528    toolform: TForm_ToolTemplate;
529    i:       Integer;
530    tag:     Integer;
531    iconindex: Integer;
532   begin
533 <  Result := True;
533 >  Result := nil;
534  
535    tag := 1;
536    if MDIChildCount > 0 then
# Line 537 | Line 544 | begin
544    begin
545      toolform         := TForm_BinEdit.Create(Self);
546      toolform.Caption := 'Binary .dat-Editor ' + IntToStr(tag);
547 <    iconindex        := 0;
547 >    iconindex        := 4;
548    end;
549    if window_context = 'extractor' then
550    begin
551      toolform         := TForm_Extractor.Create(Self);
552      toolform.Caption := 'Extractor ' + IntToStr(tag);
553 +    iconindex        := 7;
554    end;
555    if window_context = 'preview' then
556    begin
557      toolform         := TForm_Preview.Create(Self);
558      toolform.Caption := 'Preview-Window ' + IntToStr(tag);
559 +    iconindex        := 3;
560    end;
561    if window_context = 'rawedit' then
562    begin
563      toolform         := TForm_RawEdit.Create(Self);
564      toolform.Caption := 'Binary .raw-Editor ' + IntToStr(tag);
565 +    iconindex        := 5;
566    end;
567    if window_context = 'txmpreplace' then
568    begin
569      toolform         := TForm_TxmpReplace.Create(Application);
570      toolform.Caption := 'TXMP Replacer ' + IntToStr(tag);
571 +    iconindex        := 6;
572    end;
573  
574    if Assigned(toolform) then
# Line 567 | Line 578 | begin
578      MDITab.AddTab(TForm(toolform), iconindex);
579      if fileid > -1 then
580        toolform.SelectFileID(fileid);
581 +    Result := toolform;
582    end;
583   end;
584  

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)