| 16 |
ToolWin, Buttons, IdComponent, UrlMon, Tabs, IdGlobal, StrUtils, |
ToolWin, Buttons, IdComponent, UrlMon, Tabs, IdGlobal, StrUtils, |
| 17 |
CommCtrl, Dialogs, GikoSystem, Setting, BoardGroup, ThreadControl, ItemDownload, |
CommCtrl, Dialogs, GikoSystem, Setting, BoardGroup, ThreadControl, ItemDownload, |
| 18 |
Editor, RoundData, GikoPanel, Favorite, HTMLDocumentEvent, |
Editor, RoundData, GikoPanel, Favorite, HTMLDocumentEvent, |
| 19 |
HintWindow, GikoCoolBar, GikoListView, Search, ExternalBoardManager, |
{HintWindow,} GikoCoolBar, GikoListView, Search, ExternalBoardManager, |
| 20 |
ExternalBoardPlugInMain, StdActns, Variants, ExtActns,IdTCPConnection, |
ExternalBoardPlugInMain, StdActns, Variants, ExtActns,IdTCPConnection, |
| 21 |
IdBaseComponent, IdTCPClient, AppEvnts, BrowserRecord, MoveHistoryItem, |
IdBaseComponent, IdTCPClient, AppEvnts, BrowserRecord, MoveHistoryItem, |
| 22 |
ShellAPI,Preview, HistoryList; |
ShellAPI,Preview, HistoryList, ResPopupBrowser; |
| 23 |
|
|
| 24 |
const |
const |
| 25 |
NGWORDNAME_PANEL = 3; |
NGWORDNAME_PANEL = 3; |
| 560 |
FEnabledCloseButton: Boolean; |
FEnabledCloseButton: Boolean; |
| 561 |
FClickNode: TTreeNode; |
FClickNode: TTreeNode; |
| 562 |
FHttpState: Boolean; |
FHttpState: Boolean; |
|
FHint: TResPopup; |
|
| 563 |
FPreviewBrowser: TPreviewBrowser; |
FPreviewBrowser: TPreviewBrowser; |
| 564 |
FPreviewURL: string; |
FPreviewURL: string; |
| 565 |
FBrowserSizeHeight: Integer; |
FBrowserSizeHeight: Integer; |
| 603 |
FOrigenCaption: String; //お気に入りツリーのアイテム編集時の編集前の文字列 |
FOrigenCaption: String; //お気に入りツリーのアイテム編集時の編集前の文字列 |
| 604 |
FPreviewBrowserRect: TRect; ///< プレビューの表示位置を記憶する |
FPreviewBrowserRect: TRect; ///< プレビューの表示位置を記憶する |
| 605 |
FActionListGroupIndexes: array of Integer; ///<GikoDM上のアクションリストの各アクションに設定されたGroupIndexを保存する配列 |
FActionListGroupIndexes: array of Integer; ///<GikoDM上のアクションリストの各アクションに設定されたGroupIndexを保存する配列 |
| 606 |
|
FResPopupBrowser: TResPopupBrowser; |
| 607 |
procedure DownloadEnd(Sender: TObject; Item: TDownloadItem); |
procedure DownloadEnd(Sender: TObject; Item: TDownloadItem); |
| 608 |
procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon); |
procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon); |
| 609 |
procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string); |
procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string); |
| 619 |
procedure FavoriteClick(Sender: TObject); overload; |
procedure FavoriteClick(Sender: TObject); overload; |
| 620 |
procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); |
procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); |
| 621 |
function OnDocumentContextMenu(Sender: TObject): WordBool; |
function OnDocumentContextMenu(Sender: TObject): WordBool; |
|
procedure ShowTextPopup; |
|
| 622 |
function GetWidthAllToolButton(ToolBar: TToolBar): Integer; |
function GetWidthAllToolButton(ToolBar: TToolBar): Integer; |
| 623 |
procedure MenuBarChevronMenu; |
procedure MenuBarChevronMenu; |
| 624 |
procedure LinkBarChevronMenu; |
procedure LinkBarChevronMenu; |
| 684 |
procedure AddMenuSameBoardThread; |
procedure AddMenuSameBoardThread; |
| 685 |
//! アクティブなタブと同じ板の開いているスレッドクリックイベント |
//! アクティブなタブと同じ板の開いているスレッドクリックイベント |
| 686 |
procedure SameBoardThreadSubItemOnClick(Sender: TObject); |
procedure SameBoardThreadSubItemOnClick(Sender: TObject); |
| 687 |
|
//! ポップアップブラウザ作成 |
| 688 |
|
procedure CreateResPopupBrowser; |
| 689 |
protected |
protected |
| 690 |
procedure CreateParams(var Params: TCreateParams); override; |
procedure CreateParams(var Params: TCreateParams); override; |
| 691 |
procedure WndProc(var Message: TMessage); override; |
procedure WndProc(var Message: TMessage); override; |
| 725 |
property ActiveBBS : TBBS read FActiveBBS write FActiveBBS; |
property ActiveBBS : TBBS read FActiveBBS write FActiveBBS; |
| 726 |
property WorkCount: Integer read FWorkCount write FWorkCount; |
property WorkCount: Integer read FWorkCount write FWorkCount; |
| 727 |
procedure SetContent(inThread: TBrowserRecord); |
procedure SetContent(inThread: TBrowserRecord); |
| 728 |
function GetActiveContent: TThreadItem; |
function GetActiveContent(popup :Boolean = false): TThreadItem; |
| 729 |
function GetActiveList: TObject; |
function GetActiveList: TObject; |
| 730 |
|
|
| 731 |
procedure SetListViewType(AViewType: TGikoViewType); overload; |
procedure SetListViewType(AViewType: TGikoViewType); overload; |
| 910 |
//これ以後Set〜で再設定するまで、ActionのCheckedをいじるときは注意! |
//これ以後Set〜で再設定するまで、ActionのCheckedをいじるときは注意! |
| 911 |
GetGroupIndex(GikoDM.GikoFormActionList); |
GetGroupIndex(GikoDM.GikoFormActionList); |
| 912 |
FSearchDialog := nil; |
FSearchDialog := nil; |
| 913 |
|
FResPopupBrowser := nil; |
| 914 |
CreateBrowsers(BROWSER_COUNT); |
CreateBrowsers(BROWSER_COUNT); |
| 915 |
FIconData.uID := 0; |
FIconData.uID := 0; |
| 916 |
|
|
| 917 |
//メニューフォント |
//メニューフォント |
| 918 |
SetMenuFont; |
SetMenuFont; |
| 919 |
|
|
| 1245 |
//最終巡回時間 |
//最終巡回時間 |
| 1246 |
// FLastRoundTime := 0; |
// FLastRoundTime := 0; |
| 1247 |
|
|
|
//ResHint |
|
|
FHint := TResPopup.Create(Self); |
|
|
|
|
| 1248 |
ListView.OnData := TListViewUtils.ListViewData; |
ListView.OnData := TListViewUtils.ListViewData; |
| 1249 |
|
|
| 1250 |
// 最後に選択されたキャビネットの復元 |
// 最後に選択されたキャビネットの復元 |
| 1684 |
if FEvent <> nil then |
if FEvent <> nil then |
| 1685 |
FEvent.Free; |
FEvent.Free; |
| 1686 |
|
|
| 1687 |
//Hint破棄 |
// TODO レスポップアップの破棄 |
| 1688 |
if FHint <> nil then begin |
try |
| 1689 |
FHint.ReleaseHandle; |
if FResPopupBrowser <> nil then begin |
| 1690 |
FHint.Free; |
TOleControl(FResPopupBrowser).Parent := nil; |
| 1691 |
FHint := nil; |
FResPopupBrowser.Free; |
| 1692 |
end; |
end; |
| 1693 |
|
|
| 1694 |
|
except |
| 1695 |
|
end; |
| 1696 |
//Preview破棄 |
//Preview破棄 |
| 1697 |
if TPreviewBrowser <> nil then begin |
if FPreviewBrowser <> nil then begin |
| 1698 |
FPreviewBrowser.Free; |
FPreviewBrowser.Free; |
| 1699 |
FPreviewBrowser := nil; |
FPreviewBrowser := nil; |
| 1700 |
end; |
end; |
| 1867 |
Ext: string; |
Ext: string; |
| 1868 |
PathRec: TPathRec; |
PathRec: TPathRec; |
| 1869 |
Text2: string; |
Text2: string; |
| 1870 |
|
cResPopup: TResPopupBrowser; |
| 1871 |
begin |
begin |
| 1872 |
// ギコナビはレスアンカーが about:blank.. で始まることを期待しているが |
// ギコナビはレスアンカーが about:blank.. で始まることを期待しているが |
| 1873 |
// IE 7 では about:blank.. ではなく about:.. になるので、置換する(投げやり) |
// IE 7 では about:blank.. ではなく about:.. になるので、置換する(投げやり) |
| 1902 |
end; |
end; |
| 1903 |
// 前回と同じ場合終了 |
// 前回と同じ場合終了 |
| 1904 |
if (StatusBar.Panels[1].Text = Text2) then begin |
if (StatusBar.Panels[1].Text = Text2) then begin |
| 1905 |
{$IFDEF DEBUG} |
if Text2 = '' then begin |
| 1906 |
Writeln('Status Text is not changed!'); |
if FResPopupBrowser <> nil then begin |
| 1907 |
{$ENDIF} |
if not(Sender is TResPopupBrowser) then |
| 1908 |
|
FResPopupBrowser.Clear |
| 1909 |
|
else begin |
| 1910 |
|
TResPopupBrowser(Sender).ChildClear; |
| 1911 |
|
end; |
| 1912 |
|
end; |
| 1913 |
|
end; |
| 1914 |
Exit; |
Exit; |
| 1915 |
end; |
end; |
| 1916 |
StatusBar.Panels[1].Text := Text2; |
StatusBar.Panels[1].Text := Text2; |
| 1917 |
|
|
| 1918 |
if FHint <> nil then begin |
|
|
FHint.ReleaseHandle; |
|
|
FHint.ClearAllRes; |
|
|
end; |
|
| 1919 |
if FPreviewBrowser <> nil then |
if FPreviewBrowser <> nil then |
| 1920 |
ShowWindow(FPreviewBrowser.Handle, SW_HIDE); |
ShowWindow(FPreviewBrowser.Handle, SW_HIDE); |
| 1921 |
|
|
| 1922 |
if not GikoSys.Setting.UnActivePopup then |
if FResPopupBrowser <> nil then begin |
| 1923 |
if not GikoForm.Active then |
if not(Sender is TResPopupBrowser) then begin |
| 1924 |
Exit; |
if (FResPopupBrowser.Visible) then begin |
| 1925 |
|
FResPopupBrowser.Clear; |
| 1926 |
|
end; |
| 1927 |
|
end else begin |
| 1928 |
|
TResPopupBrowser(Sender).ChildClear; |
| 1929 |
|
end; |
| 1930 |
|
end; |
| 1931 |
|
cResPopup := nil; |
| 1932 |
|
|
| 1933 |
|
if not(Sender is TResPopupBrowser) then |
| 1934 |
|
if not GikoSys.Setting.UnActivePopup then |
| 1935 |
|
if not GikoForm.Active then |
| 1936 |
|
Exit; |
| 1937 |
|
|
| 1938 |
|
|
| 1939 |
|
|
| 1962 |
p.y := p.y - TWebBrowser(Sender).ClientOrigin.y; |
p.y := p.y - TWebBrowser(Sender).ClientOrigin.y; |
| 1963 |
e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y); |
e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y); |
| 1964 |
if (Assigned(e)) then begin |
if (Assigned(e)) then begin |
| 1965 |
|
CreateResPopupBrowser; |
| 1966 |
|
cResPopup := FResPopupBrowser.CreateNewBrowser; |
| 1967 |
tmp2 := ZenToHan(e.Get_outerText); |
tmp2 := ZenToHan(e.Get_outerText); |
| 1968 |
if (GikoSys.IsNumeric(tmp2)) then begin |
if (GikoSys.IsNumeric(tmp2)) then begin |
| 1969 |
//sはレス番号っぽいっす。 |
//sはレス番号っぽいっす。 |
| 1970 |
wkIntSt := StrToInt64(tmp2); |
wkIntSt := StrToInt64(tmp2); |
| 1971 |
wkIntTo := StrToInt64(tmp2); |
wkIntTo := StrToInt64(tmp2); |
| 1972 |
//s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False); |
cResPopup.PopupType := gptThread; |
| 1973 |
FHint.PopupType := gptThread; |
HTMLCreater.SetResPopupText(cResPopup, GetActiveContent, wkIntSt, wkIntTo, False, False); |
|
HTMLCreater.SetResPopupText(FHint, GetActiveContent, wkIntSt, wkIntTo, False, False); |
|
| 1974 |
end else begin |
end else begin |
| 1975 |
FHint.PopupType := gptRaw; |
cResPopup.PopupType := gptRaw; |
| 1976 |
FHint.Caption := s; |
cResPopup.Title := s; |
| 1977 |
end; |
end; |
| 1978 |
end; |
end; |
| 1979 |
end else begin |
end else begin |
| 2029 |
wkIntSt := 1; |
wkIntSt := 1; |
| 2030 |
wkIntTo := 1; |
wkIntTo := 1; |
| 2031 |
end; |
end; |
| 2032 |
FHint.PopupType := gptThread; |
CreateResPopupBrowser; |
| 2033 |
HTMLCreater.SetResPopupText(FHint, threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst ); |
cResPopup := FResPopupBrowser.CreateNewBrowser; |
| 2034 |
|
cResPopup.PopupType := gptThread; |
| 2035 |
|
HTMLCreater.SetResPopupText(cResPopup, threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst ); |
| 2036 |
end; |
end; |
| 2037 |
end; |
end; |
| 2038 |
end; |
end; |
| 2039 |
|
if (cResPopup <> nil) then begin |
| 2040 |
if FHint.PopupType = gptRaw then begin |
if cResPopup.PopupType = gptRaw then begin |
| 2041 |
if FHint.Caption <> '' then |
if cResPopup.Title <> '' then begin |
| 2042 |
ShowTextPopup; |
cResPopup.TitlePopup; |
| 2043 |
end else begin |
end; |
| 2044 |
if (FHint.ResCount <> 0) or (FHint.Title <> '') then |
end else begin |
| 2045 |
ShowTextPopup; |
if cResPopup.RawDocument <> '' then begin |
| 2046 |
end; |
cResPopup.Popup; |
| 2047 |
|
end else if cResPopup.Title <> '' then begin |
| 2048 |
|
cResPopup.TitlePopup; |
| 2049 |
|
end; |
| 2050 |
|
end; |
| 2051 |
|
end; |
| 2052 |
end; |
end; |
| 2053 |
end; |
end; |
| 2054 |
|
|
| 2206 |
const |
const |
| 2207 |
kMenuName: string = 'menu:'; |
kMenuName: string = 'menu:'; |
| 2208 |
begin |
begin |
| 2209 |
|
{$IFDEF DEBUG} |
| 2210 |
|
Writeln(URL); |
| 2211 |
|
{$ENDIF} |
| 2212 |
if Pos(kMenuName, URL) <> 0 then begin |
if Pos(kMenuName, URL) <> 0 then begin |
| 2213 |
sNo := Copy( URL, Pos( kMenuName, URL ) + Length( kMenuName ), Length( URL ) ); |
sNo := Copy( URL, Pos( kMenuName, URL ) + Length( kMenuName ), Length( URL ) ); |
| 2214 |
|
|
| 2216 |
|
|
| 2217 |
Cancel := True; |
Cancel := True; |
| 2218 |
GetCursorpos(p); |
GetCursorpos(p); |
| 2219 |
|
KokoPopupMenu.PopupComponent := nil; |
| 2220 |
|
if (Sender is TComponent) then |
| 2221 |
|
KokoPopupMenu.PopupComponent := TComponent(Sender); |
| 2222 |
KokoPopupMenu.Tag := StrToInt(sNo); |
KokoPopupMenu.Tag := StrToInt(sNo); |
| 2223 |
KokoPopupMenu.Popup(p.x, p.y); |
KokoPopupMenu.Popup(p.x, p.y); |
| 2224 |
end else if Pos('mailto', LowerCase(URL)) <> 0 then begin |
end else if Pos('mailto', LowerCase(URL)) <> 0 then begin |
| 2853 |
end; |
end; |
| 2854 |
end; |
end; |
| 2855 |
|
|
| 2856 |
function TGikoForm.GetActiveContent: TThreadItem; |
function TGikoForm.GetActiveContent(popup :Boolean = false): TThreadItem; |
| 2857 |
begin |
begin |
| 2858 |
try |
try |
| 2859 |
if FActiveContent <> nil then |
if FActiveContent <> nil then begin |
| 2860 |
Result := FActiveContent.Thread |
Result := FActiveContent.Thread; |
| 2861 |
else |
if (popup) and |
| 2862 |
|
(FResPopupBrowser <> nil) and (FResPopupBrowser.CurrentBrowser.Visible = True) then |
| 2863 |
|
if (FResPopupBrowser.CurrentBrowser.Thread <> nil) then begin |
| 2864 |
|
Result := FResPopupBrowser.CurrentBrowser.Thread; |
| 2865 |
|
end; |
| 2866 |
|
end else |
| 2867 |
Result := nil; |
Result := nil; |
| 2868 |
except |
except |
| 2869 |
Result := nil; |
Result := nil; |
| 3745 |
threadItem: TThreadItem; |
threadItem: TThreadItem; |
| 3746 |
aElement : IHTMLElement; |
aElement : IHTMLElement; |
| 3747 |
begin |
begin |
| 3748 |
|
{$IFDEF DEBUG} |
| 3749 |
|
Writeln(IntToStr(Integer(ppDisp))); |
| 3750 |
|
{$ENDIF} |
| 3751 |
Cancel := True; |
Cancel := True; |
| 3752 |
aElement := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement; |
aElement := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement; |
| 3753 |
if ( aElement <> nil) then begin |
if ( aElement <> nil) then begin |
| 3778 |
end; |
end; |
| 3779 |
|
|
| 3780 |
if wkIntSt <> 0 then begin |
if wkIntSt <> 0 then begin |
| 3781 |
FActiveContent.IDAnchorPopup(''); |
if (Sender is TResPopupBrowser) then begin |
| 3782 |
|
TResPopupBrowser(Sender).ChildClear |
| 3783 |
|
end; |
| 3784 |
|
FActiveContent.IDAnchorPopup(''); |
| 3785 |
MoveHisotryManager.pushItem(FActiveContent); |
MoveHisotryManager.pushItem(FActiveContent); |
| 3786 |
BrowserMovement(IntToStr(wkIntSt)); |
BrowserMovement(IntToStr(wkIntSt)); |
| 3787 |
end; |
end; |
|
|
|
|
|
|
| 3788 |
end; |
end; |
| 3789 |
end else begin |
end else begin |
| 3790 |
////'http://be.2ch.net/test/p.php?i='+id+'&u=d:'+bas+num |
////'http://be.2ch.net/test/p.php?i='+id+'&u=d:'+bas+num |
| 3814 |
AddressComboBox.Items.Insert(0, URL); |
AddressComboBox.Items.Insert(0, URL); |
| 3815 |
end; |
end; |
| 3816 |
end; |
end; |
| 3817 |
|
if (Sender is TResPopupBrowser) then begin |
| 3818 |
|
TResPopupBrowser(Sender).ChildClear |
| 3819 |
|
end; |
| 3820 |
|
|
| 3821 |
MoveHisotryManager.pushItem(FActiveContent); |
MoveHisotryManager.pushItem(FActiveContent); |
| 3822 |
MoveToURL( URL ); |
MoveToURL( URL ); |
| 3823 |
end; |
end; |
| 3824 |
end; |
end; |
| 3825 |
end; |
end; |
| 3826 |
|
|
| 3827 |
end; |
end; |
| 3828 |
|
|
| 4657 |
|
|
| 4658 |
procedure TGikoForm.BrowserEnter(Sender: TObject); |
procedure TGikoForm.BrowserEnter(Sender: TObject); |
| 4659 |
begin |
begin |
| 4660 |
Browser.DoObjectVerb(OLEIVERB_UIACTIVATE); |
Browser.DoObjectVerb(OLEIVERB_UIACTIVATE); |
| 4661 |
end; |
end; |
| 4662 |
|
|
| 4663 |
procedure TGikoForm.WMCopyData(var Message: TWMCopyData); |
procedure TGikoForm.WMCopyData(var Message: TWMCopyData); |
| 4802 |
var |
var |
| 4803 |
Pos : TPoint; |
Pos : TPoint; |
| 4804 |
begin |
begin |
|
|
|
| 4805 |
if PreviewTimer.Enabled then |
if PreviewTimer.Enabled then |
| 4806 |
PreviewTimer.Enabled := False; |
PreviewTimer.Enabled := False; |
| 4807 |
if (FHint <> nil) and (IsWindowVisible(FHint.Handle)) then begin |
|
| 4808 |
FHint.ReleaseHandle; |
if (FResPopupBrowser <> nil) and (IsWindowVisible(FResPopupBrowser.Handle)) then begin |
| 4809 |
FHint.ClearAllRes; |
FResPopupBrowser.Clear; |
| 4810 |
end; |
end; |
| 4811 |
|
|
| 4812 |
if (FPreviewBrowser <> nil) |
if (FPreviewBrowser <> nil) |
| 4848 |
s := CustomStringReplace(Range.text, ' ', ' ');//全角空白を半角空白に |
s := CustomStringReplace(Range.text, ' ', ' ');//全角空白を半角空白に |
| 4849 |
s := ZenToHan(Trim(s)); |
s := ZenToHan(Trim(s)); |
| 4850 |
if GikoSys.IsNumeric(s) then begin |
if GikoSys.IsNumeric(s) then begin |
| 4851 |
|
Num := StrToInt64(s); |
| 4852 |
ThreadItem := GetActiveContent; |
ThreadItem := GetActiveContent; |
| 4853 |
if ThreadItem <> nil then begin |
if (ThreadItem <> nil) and (Num <= ThreadItem.Count) |
| 4854 |
Num := StrToInt64(s); |
and (Num > 0)then begin |
| 4855 |
FHint.PopupType := gptThread; |
CreateResPopupBrowser; |
| 4856 |
HTMLCreater.SetResPopupText(FHint, ThreadItem, Num, Num, False, False); |
FResPopupBrowser.CreateNewBrowser.PopupType := gptThread; |
| 4857 |
if FHint.ResCount <> 0 then |
HTMLCreater.SetResPopupText(FResPopupBrowser.CreateNewBrowser, ThreadItem, Num, Num, False, False); |
| 4858 |
ShowTextPopup; |
FResPopupBrowser.Popup; |
| 4859 |
Result := False; |
Result := False; |
| 4860 |
end else |
end else |
| 4861 |
Result := True; |
Result := True; |
| 4865 |
end; |
end; |
| 4866 |
end; |
end; |
| 4867 |
|
|
|
procedure TGikoForm.ShowTextPopup; |
|
|
var |
|
|
p: TPoint; |
|
|
ARect: TRect; |
|
|
begin |
|
|
// if Trim(s) = '' then |
|
|
// Exit; |
|
|
try |
|
|
FHint.Font.Name := GikoSys.Setting.HintFontName; |
|
|
FHint.Font.Size := GikoSys.Setting.HintFontSize; |
|
|
FHint.Font.Color := GikoSys.Setting.HintFontColor; |
|
|
FHint.Color := GikoSys.Setting.HintBackColor; |
|
|
FHint.HeaderBold := GikoSys.Setting.ResPopupHeaderBold; |
|
|
GetCursorpos(p); |
|
|
if FHint.PopupType = gptRaw then |
|
|
ARect := FHint.CalcHintRect(Screen.Width, FHint.Caption, nil) |
|
|
else |
|
|
ARect := FHint.CalcHintRect(Screen.Width, '', nil); |
|
|
case GikoSys.Setting.PopupPosition of |
|
|
gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15); |
|
|
gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2)); |
|
|
gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15); |
|
|
gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15); |
|
|
gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2)); |
|
|
gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15); |
|
|
gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15); |
|
|
gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2)); |
|
|
gppLeftBottom: OffsetRect(ARect, p.x + 15, p.y + 15); //ギコナビスレ パート1の453氏に感謝 |
|
|
end; |
|
|
//FHint.ActivateHint(ARect, s); |
|
|
if FHint.PopupType = gptRaw then |
|
|
FHint.ActivateHint(ARect, FHint.Caption) |
|
|
else |
|
|
FHint.ActivateHint(ARect, ''); |
|
|
except |
|
|
FHint.ReleaseHandle; |
|
|
FHint.ClearAllRes; |
|
|
end; |
|
|
end; |
|
|
|
|
| 4868 |
procedure TGikoForm.HistoryAllClearToolButtonClick(Sender: TObject); |
procedure TGikoForm.HistoryAllClearToolButtonClick(Sender: TObject); |
| 4869 |
const |
const |
| 4870 |
DEL_MSG = '全履歴を削除します。よろしいですか?'; |
DEL_MSG = '全履歴を削除します。よろしいですか?'; |
| 6179 |
boardPlugIn : TBoardPlugIn; |
boardPlugIn : TBoardPlugIn; |
| 6180 |
begin |
begin |
| 6181 |
if Number = 0 then Exit; |
if Number = 0 then Exit; |
| 6182 |
ThreadItem := GetActiveContent; |
ThreadItem := GetActiveContent(True); |
| 6183 |
|
|
| 6184 |
if ThreadItem <> nil then begin |
if ThreadItem <> nil then begin |
| 6185 |
//if ThreadItem.IsBoardPlugInAvailable then begin |
//if ThreadItem.IsBoardPlugInAvailable then begin |
| 6603 |
i, count: Integer; |
i, count: Integer; |
| 6604 |
body : String; |
body : String; |
| 6605 |
limited : Integer; |
limited : Integer; |
| 6606 |
|
FOleInPlaceActiveObject: IOleInPlaceActiveObject; |
| 6607 |
begin |
begin |
| 6608 |
result := true; |
result := true; |
| 6609 |
try |
try |
| 6610 |
if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then |
if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then |
| 6611 |
FActiveContent.Browser.SetFocus; |
FOleInPlaceActiveObject := FActiveContent.Browser.ControlInterface as IOleInPlaceActiveObject; |
| 6612 |
|
FOleInPlaceActiveObject.OnFrameWindowActivate(True); |
| 6613 |
try |
try |
| 6614 |
GetCursorPos(p); |
GetCursorPos(p); |
| 6615 |
p.x := p.x - FActiveContent.Browser.ClientOrigin.x; |
p.x := p.x - FActiveContent.Browser.ClientOrigin.x; |
| 7048 |
ReadList : TStringList; |
ReadList : TStringList; |
| 7049 |
wordCount : TWordCount; |
wordCount : TWordCount; |
| 7050 |
begin |
begin |
| 7051 |
ThreadItem := GetActiveContent; |
ThreadItem := GetActiveContent(True); |
| 7052 |
ReadList := TStringList.Create; |
ReadList := TStringList.Create; |
| 7053 |
wordCount := TWordCount.Create; |
wordCount := TWordCount.Create; |
| 7054 |
try |
try |
| 7082 |
begin |
begin |
| 7083 |
No := KokoPopupMenu.Tag; |
No := KokoPopupMenu.Tag; |
| 7084 |
if No = 0 then Exit; |
if No = 0 then Exit; |
| 7085 |
ThreadItem := GetActiveContent; |
ThreadItem := GetActiveContent(True); |
| 7086 |
if ThreadItem = nil then Exit; |
if ThreadItem = nil then Exit; |
| 7087 |
body := TStringList.Create; |
body := TStringList.Create; |
| 7088 |
try |
try |
| 7129 |
if Assigned(firstElement) then |
if Assigned(firstElement) then |
| 7130 |
if firstElement.style.visibility <> 'hidden' then |
if firstElement.style.visibility <> 'hidden' then |
| 7131 |
firstElement.style.visibility := 'hidden'; |
firstElement.style.visibility := 'hidden'; |
|
|
|
| 7132 |
end; |
end; |
| 7133 |
|
|
| 7134 |
procedure TGikoForm.RepaintAllTabsBrowser(); |
procedure TGikoForm.RepaintAllTabsBrowser(); |
| 7250 |
Application.ProcessMessages; |
Application.ProcessMessages; |
| 7251 |
if not Application.Terminated then begin |
if not Application.Terminated then begin |
| 7252 |
if PreviewTimer.Enabled then |
if PreviewTimer.Enabled then |
| 7253 |
PreviewTimer.Enabled := False; |
PreviewTimer.Enabled := False; |
| 7254 |
//フォーカスが他のアプリに変わったときにヒントを消去 |
//フォーカスが他のアプリに変わったときにポップアップ消去 |
| 7255 |
if FHint <> nil then begin |
if (FResPopupBrowser <> nil) then |
| 7256 |
FHint.ReleaseHandle; |
FResPopupBrowser.Clear; |
| 7257 |
FHint.ClearAllRes; |
|
|
end; |
|
| 7258 |
//プレビューを隠す |
//プレビューを隠す |
| 7259 |
if FPreviewBrowser <> nil then |
if FPreviewBrowser <> nil then |
| 7260 |
ShowWindow(FPreviewBrowser.Handle, SW_HIDE); |
ShowWindow(FPreviewBrowser.Handle, SW_HIDE); |
| 7303 |
BrowserNullTab := TBrowserRecord.Create; |
BrowserNullTab := TBrowserRecord.Create; |
| 7304 |
BrowserNullTab.Browser := Browser; |
BrowserNullTab.Browser := Browser; |
| 7305 |
BrowserNullTab.Browser.Navigate(BLANK_HTML); |
BrowserNullTab.Browser.Navigate(BLANK_HTML); |
| 7306 |
|
|
| 7307 |
FBrowsers := TList.Create; |
FBrowsers := TList.Create; |
| 7308 |
for i := 0 to count -1 do begin |
for i := 0 to count -1 do begin |
| 7309 |
FBrowsers.Add(TWebBrowser.Create(BrowserPanel)); |
FBrowsers.Add(TWebBrowser.Create(BrowserPanel)); |
| 7323 |
end; |
end; |
| 7324 |
BrowserNullTab.Browser.BringToFront; |
BrowserNullTab.Browser.BringToFront; |
| 7325 |
ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW); |
ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW); |
| 7326 |
|
|
| 7327 |
//起動時にタブ自動復元を入れていると、空ページ用のBrowserの |
//起動時にタブ自動復元を入れていると、空ページ用のBrowserの |
| 7328 |
//描画が終わっていなくて、クリックイベントの設定等に突入するので |
//描画が終わっていなくて、クリックイベントの設定等に突入するので |
| 7329 |
//ここで終わらせておく |
//ここで終わらせておく |
| 7554 |
|
|
| 7555 |
end; |
end; |
| 7556 |
end; |
end; |
| 7557 |
|
//! ポップアップブラウザ作成 |
| 7558 |
|
procedure TGikoForm.CreateResPopupBrowser; |
| 7559 |
|
begin |
| 7560 |
|
if (FResPopupBrowser = nil) then begin |
| 7561 |
|
FResPopupBrowser := TResPopupBrowser.Create(BrowserPanel); |
| 7562 |
|
end; |
| 7563 |
|
end; |
| 7564 |
|
|
| 7565 |
initialization |
initialization |
| 7566 |
OleInitialize(nil); |
OleInitialize(nil); |