Develop and Download Open Source Software

Browse CVS Repository

Diff of /gikonavigoeson/gikonavi/Giko.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.79 by h677, Wed Oct 1 12:06:08 2003 UTC revision 1.80 by h677, Thu Oct 2 10:12:16 2003 UTC
# Line 799  type Line 799  type
799      procedure LinkToolBarDragOver(Sender, Source: TObject; X, Y: Integer;      procedure LinkToolBarDragOver(Sender, Source: TObject; X, Y: Integer;
800        State: TDragState; var Accept: Boolean);        State: TDragState; var Accept: Boolean);
801      procedure OnlyAHundredResExecute(Sender: TObject);      procedure OnlyAHundredResExecute(Sender: TObject);
     procedure LinkToolBarClick(Sender: TObject);  
802          private          private
803                  { Private 宣言 }                  { Private 宣言 }
804    
# Line 904  type Line 903  type
903      procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);      procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
904      procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);      procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
905      procedure LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);      procedure LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
906            procedure LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
907                  function TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;                  function TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
908      procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );      procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
909      procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );      procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
# Line 5012  begin Line 5012  begin
5012                  if GikoSys.Setting.URLDisplay then                  if GikoSys.Setting.URLDisplay then
5013                          AddressComboBox.Text := GikoSys.GetURL(ThreadItem.ParentBoard.BBSID, ThreadItem.FileName);                          AddressComboBox.Text := GikoSys.GetURL(ThreadItem.ParentBoard.BBSID, ThreadItem.FileName);
5014          end;          end;
   
5015  end;  end;
5016  procedure TGikoForm.BrowserTabClick(Sender: TObject);  procedure TGikoForm.BrowserTabClick(Sender: TObject);
5017  var  var
# Line 5041  var Line 5040  var
5040          idx: Integer;          idx: Integer;
5041          OldIndex: Integer;          OldIndex: Integer;
5042  begin  begin
 //      if Button = mbLeft then begin  
 //      if (Button = mbLeft) and (Shift = [ssLeft]) then begin  
                 // マウス左ボタン  
 //              BrowserTab.BeginDrag(False, 5);  
 //              BrowserTabClick(Sender);  
 //    {$IFDEF DEBUG}  
 //      Writeln( 'TabMouseDown: FTabIsDragging = ' + IntToStr( FTabIsDragging ) );  
 //    {$ENDIF}  
 //              if FTabIsDragging <> 3 then begin  
 //      {$IFDEF DEBUG}  
 //        Writeln( '-> 1' );  
 //      {$ENDIF}  
 //      FTabIsDragging := 1;  
 //      FTabMouseDownX := X;  
 //      FTabMouseDownY := Y;  
 //    end;  
 //      end else  
5043      if Button = mbMiddle then begin      if Button = mbMiddle then begin
5044                  // マウス中ボタン                  // マウス中ボタン
5045                  GetCursorPos(p);                  GetCursorPos(p);
# Line 5176  var Line 5158  var
5158          ThreadItem: TThreadItem;          ThreadItem: TThreadItem;
5159  begin  begin
5160          if ( ssLeft in Shift )then begin          if ( ssLeft in Shift )then begin
5161            BrowserTab.EndDrag(false);
5162          BrowserTab.BeginDrag(false, DandD_THRESHOLD);          BrowserTab.BeginDrag(false, DandD_THRESHOLD);
5163      end;      end;
 //  
 //      if FTabIsDragging = 1 then begin  
 //      if (Abs( FTabMouseDownX - X ) >= Mouse.DragThreshold) or  
 //       (Abs( FTabMouseDownY - Y ) >= Mouse.DragThreshold) then begin  
 //      {$IFDEF DEBUG}  
 //        Writeln( 'TabMouseMove: FTabIsDragging = ' + IntToStr( FTabIsDragging ) + ' -> 2' );  
 //      {$ENDIF}  
 //      FTabIsDragging := 2;  
 //      BrowserTab.BeginDrag( True );  
 //    end;  
 //  end else if MilliSecondsBetween( Now, FTabMouseUpTime ) >= 1000 then begin  
 //      FTabIsDragging := 0;  
 //  end;  
5164          TabIdx := BrowserTab.IndexOfTabAt(x, y);          TabIdx := BrowserTab.IndexOfTabAt(x, y);
5165          if (FTabHintIndex <> TabIdx) and (TabIdx <> -1) then begin          if (FTabHintIndex <> TabIdx) and (TabIdx <> -1) then begin
5166                  Application.CancelHint;                  Application.CancelHint;
# Line 5214  var Line 5184  var
5184  begin  begin
5185  //      AddMessageList('DocumentComplete', nil);  //      AddMessageList('DocumentComplete', nil);
5186          FBrowserComplete := True;          FBrowserComplete := True;
   
5187          if FEvent <> nil then          if FEvent <> nil then
5188                  FEvent.Free;                  FEvent.Free;
5189          FDispHtmlDocument := Browser.Document as DispHTMLDocument;          FDispHtmlDocument := Browser.Document as DispHTMLDocument;
5190          FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);          FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
5191          FEvent.OnContextMenu := OnDocumentContextMenu;          FEvent.OnContextMenu := OnDocumentContextMenu;
5192    
5193  end;  end;
5194    
5195  procedure TGikoForm.SelectReservActionUpdate(Sender: TObject);  procedure TGikoForm.SelectReservActionUpdate(Sender: TObject);
# Line 6511  begin Line 6481  begin
6481            ToolButton.OnMouseDown := LinkToolButtonOnMouseDown;            ToolButton.OnMouseDown := LinkToolButtonOnMouseDown;
6482            ToolButton.OnMouseMove := LinkToolButtonOnMouseMove;            ToolButton.OnMouseMove := LinkToolButtonOnMouseMove;
6483            ToolButton.OnMouseUp := LinkToolButtonOnMouseUp;            ToolButton.OnMouseUp := LinkToolButtonOnMouseUp;
6484              ToolButton.OnStartDrag := LinkToolButtonStartDrag;
6485            //ToolButton.DragMode := dmAutomatic;            //ToolButton.DragMode := dmAutomatic;
6486              ToolButton.DragMode := dmManual;
6487    
6488                                          LinkToolBar.InsertControl(ToolButton);                                          LinkToolBar.InsertControl(ToolButton);
6489                                  end;                                  end;
6490                                  break;                                  break;
# Line 6587  begin Line 6560  begin
6560          FavoriteDragOver( Sender, Source, X, Y, State, Accept );          FavoriteDragOver( Sender, Source, X, Y, State, Accept );
6561    
6562  end;  end;
6563    procedure TGikoForm.LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
6564    begin
6565    end;
6566    
6567  procedure TGikoForm.LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);  procedure TGikoForm.LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
6568  var  var
# Line 6603  end; Line 6579  end;
6579    
6580  procedure TGikoForm.LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);  procedure TGikoForm.LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
6581  begin  begin
6582            if ssLeft in Shift then begin
6583          if (Button = mbLeft) and (Shift = [ssLeft]) then begin          TLinkToolButton( Sender ).EndDrag( False );
6584      {$IFDEF DEBUG}          TToolButton(Sender).BeginDrag(false ,5);
       Writeln('LinkMouseDown');  
     {$ENDIF}  
                 // マウス左ボタン  
                 if FLinkToolButtonIsDragging <> 3 then begin  
       {$IFDEF DEBUG}  
         Writeln(' -> 1');  
       {$ENDIF}  
       FLinkToolButtonIsDragging := 1;  
       FLinkToolButtonMouseDownX := X;  
       FLinkToolButtonMouseDownY := Y;  
6585      end;      end;
   end;  
   
6586  end;  end;
6587    
6588  procedure TGikoForm.LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);  procedure TGikoForm.LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
6589  begin  begin
   
         if FLinkToolButtonIsDragging = 1 then begin  
         if (Abs( FlinkToolButtonMouseDownX - X ) >= Mouse.DragThreshold) or  
        (Abs( FlinkToolButtonMouseDownY - Y ) >= Mouse.DragThreshold) then begin  
       {$IFDEF DEBUG}  
         Writeln('LinkMouseMove: 2');  
       {$ENDIF}  
       FLinkToolButtonIsDragging := 2;  
       TLinkToolButton( Sender ).BeginDrag( True );  
     end;  
   end else if MilliSecondsBetween( Now, FLinkToolButtonMouseUpTime ) >= 1000 then begin  
         FLinkToolButtonIsDragging := 0;  
   end;  
   
6590  end;  end;
6591    
6592  procedure TGikoForm.LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);  procedure TGikoForm.LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
6593  begin  begin
   
   {$IFDEF DEBUG}  
     Writeln('LinkMouseUp: 3');  
   {$ENDIF}  
         if FLinkToolButtonIsDragging = 3 then begin  
     {$IFDEF DEBUG}  
       Writeln('Cancelled.');  
     {$ENDIF}  
         TLinkToolButton( Sender ).EndDrag( False );  
   end;  
   FLinkToolButtonIsDragging := 3;  
   FLinkToolButtonMouseUpTime := Now;  
   
6594  end;  end;
6595    
6596  function TGikoForm.GetWidthAllToolButton(ToolBar: TToolBar): Integer;  function TGikoForm.GetWidthAllToolButton(ToolBar: TToolBar): Integer;
# Line 7680  begin Line 7617  begin
7617    end else if Source is TLinkToolButton then begin    end else if Source is TLinkToolButton then begin
7618    
7619          LinkToolButton := TLinkToolButton( Source );          LinkToolButton := TLinkToolButton( Source );
7620        //ShowMessage(LinkToolButton.Text);
7621      SourceNode := TreeNodeDataFind( FavoriteTreeView.TopItem, LinkToolButton.Data );      SourceNode := TreeNodeDataFind( FavoriteTreeView.TopItem, LinkToolButton.Data );
7622      FavoriteMoveTo( SenderNode, SourceNode );      FavoriteMoveTo( SenderNode, SourceNode );
7623    
# Line 8138  end; Line 8076  end;
8076  procedure TGikoForm.BrowserTabMouseUp(Sender: TObject;  procedure TGikoForm.BrowserTabMouseUp(Sender: TObject;
8077    Button: TMouseButton; Shift: TShiftState; X, Y: Integer);    Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8078  begin  begin
   
8079    {$IFDEF DEBUG}    {$IFDEF DEBUG}
8080  //    Writeln( 'TabMouseUp: FTabIsDragging = ' + IntToStr( FTabIsDragging ) + ' -> 3' );  //    Writeln( 'TabMouseUp: FTabIsDragging = ' + IntToStr( FTabIsDragging ) + ' -> 3' );
8081    {$ENDIF}    {$ENDIF}
# Line 8165  begin Line 8102  begin
8102                  SetContent( ThreadItem );                  SetContent( ThreadItem );
8103  end;  end;
8104    
 procedure TGikoForm.LinkToolBarClick(Sender: TObject);  
 begin  
         LinkToolBar.BeginDrag(false,DandD_THRESHOLD);  
 end;  
   
8105  initialization  initialization
8106                                  OleInitialize(nil);                                  OleInitialize(nil);
8107  finalization  finalization

Legend:
Removed from v.1.79  
changed lines
  Added in v.1.80

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26