| 533 |
TreeSelectNamePupupMenu: TMenuItem; |
TreeSelectNamePupupMenu: TMenuItem; |
| 534 |
Browser: TWebBrowser; |
Browser: TWebBrowser; |
| 535 |
BrowserPanel: TPanel; |
BrowserPanel: TPanel; |
| 536 |
|
SetFocusForBrowserAction: TAction; |
| 537 |
|
SetFocusForThreadListAction: TAction; |
| 538 |
|
SetFocusForCabinetAction: TAction; |
| 539 |
procedure FormCreate(Sender: TObject); |
procedure FormCreate(Sender: TObject); |
| 540 |
procedure FormDestroy(Sender: TObject); |
procedure FormDestroy(Sender: TObject); |
| 541 |
procedure CabinetPanelHide(Sender: TObject); |
procedure CabinetPanelHide(Sender: TObject); |
| 854 |
procedure FavoriteTreeViewMouseUp(Sender: TObject; |
procedure FavoriteTreeViewMouseUp(Sender: TObject; |
| 855 |
Button: TMouseButton; Shift: TShiftState; X, Y: Integer); |
Button: TMouseButton; Shift: TShiftState; X, Y: Integer); |
| 856 |
procedure OnlyAHundredResUpdate(Sender: TObject); |
procedure OnlyAHundredResUpdate(Sender: TObject); |
| 857 |
procedure test1Click(Sender: TObject); |
procedure SetFocusForBrowserActionExecute(Sender: TObject); |
| 858 |
|
procedure SetFocusForBrowserActionUpdate(Sender: TObject); |
| 859 |
|
procedure SetFocusForThreadListActionExecute(Sender: TObject); |
| 860 |
|
procedure SetFocusForCabinetActionExecute(Sender: TObject); |
| 861 |
private |
private |
| 862 |
{ Private 宣言 } |
{ Private 宣言 } |
| 863 |
//RoundList : TRoundList; |
//RoundList : TRoundList; |
| 1004 |
function BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean; |
function BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean; |
| 1005 |
// 各所にあるキャビネット・ BBS メニューをセット/更新 |
// 各所にあるキャビネット・ BBS メニューをセット/更新 |
| 1006 |
procedure SetBBSMenu; |
procedure SetBBSMenu; |
| 1007 |
|
function WebBrowserClick(Sender: TObject): WordBool; |
| 1008 |
protected |
protected |
| 1009 |
procedure CreateParams(var Params: TCreateParams); override; |
procedure CreateParams(var Params: TCreateParams); override; |
| 1010 |
procedure WndProc(var Message: TMessage); override; |
procedure WndProc(var Message: TMessage); override; |
| 1208 |
Application.OnDeactivate := AppFormDeactivate; |
Application.OnDeactivate := AppFormDeactivate; |
| 1209 |
Self.OnDeactivate := AppFormDeactivate; |
Self.OnDeactivate := AppFormDeactivate; |
| 1210 |
Application.HookMainWindow(Hook); |
Application.HookMainWindow(Hook); |
| 1211 |
Application.OnMessage := HandleAppMessage; |
//Application.OnMessage := HandleAppMessage; //なんか無くても大丈夫になった by もじゅ |
| 1212 |
|
|
| 1213 |
FTreeType := gttNone; |
FTreeType := gttNone; |
| 1214 |
|
|
| 1731 |
|
|
| 1732 |
procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean); |
procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean); |
| 1733 |
begin |
begin |
| 1734 |
SaveCoolBarSettings; |
if GikoForm.WindowState <> wsMinimized then |
| 1735 |
|
SaveCoolBarSettings; |
| 1736 |
if ( GikoSys.Setting.ShowDialogForEnd ) and |
if ( GikoSys.Setting.ShowDialogForEnd ) and |
| 1737 |
(MessageDlg('ギコナビを終了してよろしいですか?', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then begin |
(MessageDlg('ギコナビを終了してよろしいですか?', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then begin |
| 1738 |
CanClose := false; |
CanClose := false; |
| 1998 |
begin |
begin |
| 1999 |
//タブクローズ |
//タブクローズ |
| 2000 |
NotSelectTabCloseAction.Execute; |
NotSelectTabCloseAction.Execute; |
|
//if BrowserTab.Tabs.Count >= 1 then |
|
|
// for i := BrowserTab.Tabs.Count - 1 downto 0 do |
|
|
// DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[i])); |
|
| 2001 |
BrowserTabCloseAction.Execute; |
BrowserTabCloseAction.Execute; |
| 2002 |
//TreeViewクリア(BBS2ch.Freeの後にクリアするとXPスタイル時にエラー出る) |
//TreeViewクリア(BBS2ch.Freeの後にクリアするとXPスタイル時にエラー出る) |
| 2003 |
TreeView.Items.Clear; |
TreeView.Items.Clear; |
| 3271 |
end; |
end; |
| 3272 |
newBrowser.Browser := TWebBrowser(FBrowsers[4]); |
newBrowser.Browser := TWebBrowser(FBrowsers[4]); |
| 3273 |
FBrowsers.Move(4, 0); |
FBrowsers.Move(4, 0); |
| 3274 |
newBrowser.Browser.Navigate(BLANK_HTML); |
//newBrowser.Browser.Navigate(BLANK_HTML); |
| 3275 |
newBrowser.thread := ThreadItem; |
newBrowser.thread := ThreadItem; |
| 3276 |
newBrowser.Repaint := true; |
newBrowser.Repaint := true; |
| 3277 |
newBrowser.OnlyHundred := GikoSys.OnlyAHundredRes; |
newBrowser.OnlyHundred := GikoSys.OnlyAHundredRes; |
| 3295 |
end; |
end; |
| 3296 |
newBrowser.Browser := TWebBrowser(FBrowsers[4]); |
newBrowser.Browser := TWebBrowser(FBrowsers[4]); |
| 3297 |
FBrowsers.Move(4, 0); |
FBrowsers.Move(4, 0); |
| 3298 |
newBrowser.Browser.Navigate(BLANK_HTML); |
//newBrowser.Browser.Navigate(BLANK_HTML); |
| 3299 |
newBrowser.thread := ThreadItem; |
newBrowser.thread := ThreadItem; |
| 3300 |
newBrowser.OnlyHundred := GikoSys.OnlyAHundredRes; |
newBrowser.OnlyHundred := GikoSys.OnlyAHundredRes; |
| 3301 |
newBrowser.Repaint := true; |
newBrowser.Repaint := true; |
| 3524 |
ListView.ItemFocused := ListView.Items.Item[ idx ]; |
ListView.ItemFocused := ListView.Items.Item[ idx ]; |
| 3525 |
end; |
end; |
| 3526 |
// end; |
// end; |
|
|
|
|
if Obj is TBoard then begin |
|
|
if GikoSys.Setting.ListOrientation = gloHorizontal then begin |
|
|
if GikoSys.Setting.ListWidthState = glsMax then begin |
|
|
BrowserMinAction.Execute; |
|
|
if GikoForm.Visible then |
|
|
ListView.SetFocus; |
|
|
end; |
|
|
end else begin |
|
|
if GikoSys.Setting.ListHeightState = glsMax then begin |
|
|
BrowserMinAction.Execute; |
|
|
if GikoForm.Visible then |
|
|
ListView.SetFocus; |
|
|
end; |
|
|
end; |
|
|
end; |
|
| 3527 |
end; |
end; |
| 3528 |
|
|
| 3529 |
|
|
| 4187 |
InsertBrowserTab(ThreadItem); |
InsertBrowserTab(ThreadItem); |
| 4188 |
end; |
end; |
| 4189 |
|
|
| 4190 |
if ListView.Selected = nil then |
|
|
Exit; |
|
|
if ListView.Selected.Data = nil then |
|
|
Exit; |
|
|
if TThreadItem( ListView.Selected.Data ).IsLogFile then begin |
|
|
if GikoSys.Setting.ListOrientation = gloHorizontal then begin |
|
|
if GikoSys.Setting.ListWidthState = glsMin then begin |
|
|
BrowserMaxAction.Execute; |
|
|
if GikoForm.Visible then |
|
|
Browser.SetFocus; |
|
|
end; |
|
|
end else begin |
|
|
if GikoSys.Setting.ListHeightState = glsMin then begin |
|
|
BrowserMaxAction.Execute; |
|
|
if GikoForm.Visible then |
|
|
Browser.SetFocus; |
|
|
end; |
|
|
end; |
|
|
end; |
|
| 4191 |
end; |
end; |
| 4192 |
|
|
| 4193 |
procedure TGikoForm.ListDoubleClick(Shift: TShiftState); |
procedure TGikoForm.ListDoubleClick(Shift: TShiftState); |
| 5925 |
AddressComboBox.Text := ThreadItem.URL; |
AddressComboBox.Text := ThreadItem.URL; |
| 5926 |
end; |
end; |
| 5927 |
|
|
|
if ThreadItem = nil then Exit; |
|
|
if ThreadItem.IsLogFile then begin |
|
|
if GikoSys.Setting.ListOrientation = gloHorizontal then begin |
|
|
if GikoSys.Setting.ListWidthState = glsMin then begin |
|
|
BrowserMaxAction.Execute; |
|
|
if GikoForm.Visible then |
|
|
SetContent(TBrowserRecord(BrowserTab.Tabs.Objects[idx])); |
|
|
end; |
|
|
end else begin |
|
|
if GikoSys.Setting.ListHeightState = glsMin then begin |
|
|
BrowserMaxAction.Execute; |
|
|
if GikoForm.Visible then |
|
|
SetContent(TBrowserRecord(BrowserTab.Tabs.Objects[idx])); |
|
|
end; |
|
|
end; |
|
|
end; |
|
| 5928 |
end; |
end; |
| 5929 |
|
|
| 5930 |
end; |
end; |
| 6103 |
FDispHtmlDocument := Idispatch(OleVariant(BrowserRecord.Browser.ControlInterface).Document) as DispHTMLDocument; |
FDispHtmlDocument := Idispatch(OleVariant(BrowserRecord.Browser.ControlInterface).Document) as DispHTMLDocument; |
| 6104 |
BrowserRecord.FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2); |
BrowserRecord.FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2); |
| 6105 |
BrowserRecord.FEvent.OnContextMenu := OnDocumentContextMenu; |
BrowserRecord.FEvent.OnContextMenu := OnDocumentContextMenu; |
| 6106 |
|
BrowserRecord.FEvent.OnClick := WebBrowserClick; //追加したOnClickイベント |
| 6107 |
end; |
end; |
| 6108 |
end; |
end; |
| 6109 |
end; |
end; |
| 6765 |
Exit; |
Exit; |
| 6766 |
|
|
| 6767 |
InsertBrowserTab(ThreadItem, ActiveTab); |
InsertBrowserTab(ThreadItem, ActiveTab); |
|
|
|
|
if ThreadItem.IsLogFile then begin |
|
|
if GikoSys.Setting.ListOrientation = gloHorizontal then begin |
|
|
if GikoSys.Setting.ListWidthState = glsMin then begin |
|
|
BrowserMaxAction.Execute; |
|
|
if GikoForm.Visible then |
|
|
Browser.SetFocus; |
|
|
end; |
|
|
end else begin |
|
|
if GikoSys.Setting.ListHeightState = glsMin then begin |
|
|
BrowserMaxAction.Execute; |
|
|
if GikoForm.Visible then |
|
|
Browser.SetFocus; |
|
|
end; |
|
|
end; |
|
|
end; |
|
| 6768 |
end; |
end; |
| 6769 |
end; |
end; |
| 6770 |
|
|
| 9374 |
if GikoForm.Visible then |
if GikoForm.Visible then |
| 9375 |
Browser.SetFocus; |
Browser.SetFocus; |
| 9376 |
end; |
end; |
| 9377 |
end; |
end; |
| 9378 |
end; |
end; |
| 9379 |
end; |
end; |
| 9380 |
|
|
| 9883 |
end; |
end; |
| 9884 |
end; |
end; |
| 9885 |
|
|
| 9886 |
// ブラウザのキーダウンイベント |
// ブラウザのキーダウンイベント //なんか使わなくても動いてる気がする byもじゅ |
| 9887 |
// イベントを取り扱った場合は True を返す |
// イベントを取り扱った場合は True を返す |
| 9888 |
function TGikoForm.BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean; |
function TGikoForm.BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean; |
| 9889 |
var |
var |
| 9922 |
var |
var |
| 9923 |
key : Word; |
key : Word; |
| 9924 |
begin |
begin |
| 9925 |
|
{ |
| 9926 |
case Msg.message of |
case Msg.message of |
| 9927 |
WM_KEYDOWN: |
WM_KEYDOWN: |
| 9928 |
if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin |
if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin |
| 9947 |
XBUTTON2: |
XBUTTON2: |
| 9948 |
end; |
end; |
| 9949 |
end; |
end; |
| 9950 |
|
} |
| 9951 |
end; |
end; |
| 9952 |
|
|
| 9953 |
procedure TGikoForm.FavoriteTreeViewMouseDown(Sender: TObject; |
procedure TGikoForm.FavoriteTreeViewMouseDown(Sender: TObject; |
| 10042 |
OnlyAHundredRes.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile); |
OnlyAHundredRes.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile); |
| 10043 |
end; |
end; |
| 10044 |
|
|
| 10045 |
procedure TGikoForm.test1Click(Sender: TObject); |
function TGikoForm.WebBrowserClick(Sender: TObject): WordBool; |
| 10046 |
begin |
begin |
| 10047 |
TOleControl(FActiveContent.Browser).Visible := not TOleControl(FActiveContent.Browser).Visible; |
result := true; |
| 10048 |
|
if (Sender <> nil) and (Sender is TWebBrowser) then |
| 10049 |
|
try |
| 10050 |
|
TWebBrowser(Sender).SetFocus; |
| 10051 |
|
except |
| 10052 |
|
end; |
| 10053 |
|
end; |
| 10054 |
|
|
| 10055 |
|
procedure TGikoForm.SetFocusForBrowserActionExecute(Sender: TObject); |
| 10056 |
|
begin |
| 10057 |
|
FActiveContent.FBrowser.SetFocus; |
| 10058 |
|
end; |
| 10059 |
|
|
| 10060 |
|
procedure TGikoForm.SetFocusForBrowserActionUpdate(Sender: TObject); |
| 10061 |
|
begin |
| 10062 |
|
if( FActiveContent <> nil) and (FActiveContent.Browser <> nil) and |
| 10063 |
|
(FActiveContent.Browser <> BrowserNullTab.Browser) then |
| 10064 |
|
SetFocusForBrowserAction.Enabled := true |
| 10065 |
|
else |
| 10066 |
|
SetFocusForBrowserAction.Enabled := false; |
| 10067 |
|
end; |
| 10068 |
|
|
| 10069 |
|
procedure TGikoForm.SetFocusForThreadListActionExecute(Sender: TObject); |
| 10070 |
|
begin |
| 10071 |
|
if FActiveContent <> nil then |
| 10072 |
|
WebBrowserClick(FActiveContent.Browser); //一回Browserに当てないと動かないときがある |
| 10073 |
|
ListView.SetFocus; |
| 10074 |
|
if( ListView.Items.Count > 0 ) and (ListView.ItemFocused = nil) then |
| 10075 |
|
ListView.Items.Item[0].Selected := true; //選択アイテムが無いときは先頭のを選択する |
| 10076 |
|
end; |
| 10077 |
|
|
| 10078 |
|
procedure TGikoForm.SetFocusForCabinetActionExecute(Sender: TObject); |
| 10079 |
|
begin |
| 10080 |
|
if FActiveContent <> nil then |
| 10081 |
|
WebBrowserClick(FActiveContent.Browser); //一回Browserに当てないと動かないときがある |
| 10082 |
|
TreeView.SetFocus; |
| 10083 |
end; |
end; |
| 10084 |
|
|
| 10085 |
initialization |
initialization |