| 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 |
|
|
| 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 ); |
| 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 |
| 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); |
| 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; |
| 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); |
| 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; |
| 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 |
| 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; |
| 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 |
|
|
| 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} |
| 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 |