Changeset 83


Ignore:
Timestamp:
Jan 14, 2007, 2:30:12 AM (18 years ago)
Author:
alloc
Message:
 
Location:
oup/current
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • oup/current/Main.dfm

    r82 r83  
    7070          Caption = 'Open level-&db ...'
    7171          ImageIndex = 1
    72           ShortCut = 16452
    7372          OnClick = menu_loaddbClick
    7473        end
     
    109108        end
    110109        object menu_binedit: TTBItem
    111           Caption = '&Binary .dat editor ...'
     110          Caption = 'Binary .&dat editor ...'
    112111          ImageIndex = 5
    113           ShortCut = 16450
     112          ShortCut = 16452
    114113          OnClick = menu_bineditClick
    115114        end
     
    332331        ShowOnChange = True
    333332        TabOrder = 0
     333        OnMouseMove = MDITabMouseMove
    334334        OnMouseUp = MDITabMouseUp
    335335      end
  • oup/current/Main.pas

    r82 r83  
    111111    procedure ToolbarDockChanged(Sender: TObject);
    112112    procedure menu_loaddbClick(Sender: TObject);
     113    procedure MDITabMouseMove(Sender: TObject; Shift: TShiftState; X,
     114      Y: Integer);
    113115  private
    114116  public
     
    213215
    214216
    215 
    216 
    217 
     217procedure TForm_Main.MDITabMouseMove(Sender: TObject; Shift: TShiftState; X,
     218  Y: Integer);
     219var
     220  pt: TPoint;
     221  tabIndex: Integer;
     222  hint: String;
     223begin
     224  pt.X := X;
     225  pt.Y := Y;
     226  tabIndex := MDITab.GetTabAtPos(pt);
     227
     228  if tabIndex >= 0 then
     229  begin
     230    if MDITab.MDIChildren[tabIndex] is TForm_ToolTemplate then
     231      hint := 'Window: ' + MDITab.MDIChildren[tabIndex].Caption + #13+#10 +
     232            'Selected File: ' +
     233            TForm_ToolTemplate(MDITab.MDIChildren[tabIndex]).SelectedFile.FileName
     234    else
     235      hint := 'Window: ' + MDITab.MDIChildren[tabIndex].Caption;
     236    if hint <> MDITab.Hint then
     237    begin
     238      MDITab.Hint := hint;
     239      MDITab.ShowHint := True;
     240    end;
     241  end
     242  else
     243  begin
     244    MDITab.ShowHint := False;
     245    MDITab.Hint := '';
     246  end;
     247end;
    218248
    219249procedure TForm_Main.MDITabMouseUp(Sender: TObject; Button: TMouseButton;
     
    242272  end;
    243273end;
     274
     275
     276
    244277
    245278procedure TForm_Main.FormClose(Sender: TObject; var Action: TCloseAction);
  • oup/current/Tools/Template.pas

    r70 r83  
    6161    FAllowedExts: String;
    6262    FAllowMultiSelect: Boolean;
     63    FSelectedFile: TFileInfo;
    6364    procedure SetAllowedExts(exts: String);
    6465    procedure SetMultiSelect(allow: Boolean);
     
    7071    property AllowedExts: String read FAllowedExts write SetAllowedExts;
    7172    property AllowMultiSelect: Boolean read FAllowMultiSelect write SetMultiSelect;
     73    property SelectedFile: TFileInfo read FSelectedFile;
    7274  end;
    7375
     
    203205  inherited;
    204206  RecreateList;
     207  FSelectedFile.ID := -1;
     208  FSelectedFile.FileName := '';
     209  FSelectedFile.FileNameHex := '';
    205210  if Length(ToolList) > 0 then
    206211  begin
     
    267272    fileid := OniDataConnection.ExtractFileID(
    268273          filelist.Items.Strings[filelist.ItemIndex]);
     274    FSelectedFile := OniDataConnection.GetFileInfo(fileid);
    269275    if Assigned(FOnNewFileSelected) then
    270       FOnNewFileSelected(OniDataConnection.GetFileInfo(fileid));
     276      FOnNewFileSelected(FSelectedFile);
    271277  end;
    272278end;
Note: See TracChangeset for help on using the changeset viewer.