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.635 by h677, Sun Apr 15 16:21:29 2007 UTC revision 1.635.2.11 by h677, Sun May 20 16:28:59 2007 UTC
# Line 16  uses Line 16  uses
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;
# Line 560  type Line 560  type
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;
# Line 604  type Line 603  type
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);
# Line 620  type Line 619  type
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;
# Line 686  type Line 684  type
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;
# Line 910  begin Line 910  begin
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    
# Line 1244  begin Line 1245  begin
1245          //最終巡回時間          //最終巡回時間
1246  //      FLastRoundTime := 0;  //      FLastRoundTime := 0;
1247    
         //ResHint  
         FHint := TResPopup.Create(Self);  
   
1248          ListView.OnData := TListViewUtils.ListViewData;          ListView.OnData := TListViewUtils.ListViewData;
1249    
1250          // 最後に選択されたキャビネットの復元          // 最後に選択されたキャビネットの復元
# Line 1686  begin Line 1684  begin
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;
# Line 1866  var Line 1867  var
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:.. になるので、置換する(投げやり)
# Line 1900  begin Line 1902  begin
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    
# Line 1945  begin Line 1962  begin
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
# Line 2011  begin Line 2029  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    
# Line 2181  var Line 2206  var
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                                    
# Line 2189  begin Line 2216  begin
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
# Line 2826  end; Line 2856  end;
2856  function TGikoForm.GetActiveContent: TThreadItem;  function TGikoForm.GetActiveContent: 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 (FResPopupBrowser <> nil) and (FResPopupBrowser.CurrentBrowser.Visible = True) then
2862                    if (FResPopupBrowser.CurrentBrowser.Thread <> nil) then begin
2863                        Result := FResPopupBrowser.CurrentBrowser.Thread;
2864                    end;
2865                    end else
2866                          Result := nil;                          Result := nil;
2867          except          except
2868                  Result := nil;                  Result := nil;
# Line 3709  var Line 3743  var
3743      BNum, BRes: string;      BNum, BRes: string;
3744      threadItem: TThreadItem;      threadItem: TThreadItem;
3745      aElement : IHTMLElement;      aElement : IHTMLElement;
3746        rect: TRect;
3747        purl, pflag, pdata, ptarget, handler: OleVariant;
3748  begin  begin
3749    {$IFDEF DEBUG}
3750            Writeln(IntToStr(Integer(ppDisp)));
3751    {$ENDIF}
3752          Cancel := True;          Cancel := True;
3753      aElement := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement;      aElement := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement;
3754          if ( aElement <> nil) then begin          if ( aElement <> nil) then begin
# Line 3740  begin Line 3779  begin
3779                                  end;                                  end;
3780    
3781                                  if wkIntSt <> 0 then begin                                  if wkIntSt <> 0 then begin
3782                                          FActiveContent.IDAnchorPopup('');                      if (Sender is TResPopupBrowser) then begin
3783                            TResPopupBrowser(Sender).ChildClear
3784                        end;
3785                            FActiveContent.IDAnchorPopup('');
3786                      MoveHisotryManager.pushItem(FActiveContent);                      MoveHisotryManager.pushItem(FActiveContent);
3787                                          BrowserMovement(IntToStr(wkIntSt));                                          BrowserMovement(IntToStr(wkIntSt));
3788                                  end;                  end;
   
   
3789                          end;                          end;
3790                  end else begin                  end else begin
3791              ////'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
# Line 3775  begin Line 3815  begin
3815                                                  AddressComboBox.Items.Insert(0, URL);                                                  AddressComboBox.Items.Insert(0, URL);
3816                                          end;                                          end;
3817                                  end;                                  end;
3818                    if (Sender is TResPopupBrowser) then begin
3819                        TResPopupBrowser(Sender).ChildClear
3820                    end;
3821    
3822                  MoveHisotryManager.pushItem(FActiveContent);                  MoveHisotryManager.pushItem(FActiveContent);
3823                                  MoveToURL( URL );                                  MoveToURL( URL );
3824                          end;                          end;
3825                  end;                  end;
3826          end;      end;
3827    
3828  end;  end;
3829    
# Line 4614  end; Line 4658  end;
4658    
4659  procedure TGikoForm.BrowserEnter(Sender: TObject);  procedure TGikoForm.BrowserEnter(Sender: TObject);
4660  begin  begin
4661          Browser.DoObjectVerb(OLEIVERB_UIACTIVATE);      Browser.DoObjectVerb(OLEIVERB_UIACTIVATE);
4662  end;  end;
4663    
4664  procedure TGikoForm.WMCopyData(var Message: TWMCopyData);  procedure TGikoForm.WMCopyData(var Message: TWMCopyData);
# Line 4759  procedure TGikoForm.WMSetCursor(var Mess Line 4803  procedure TGikoForm.WMSetCursor(var Mess
4803  var  var
4804          Pos : TPoint;          Pos : TPoint;
4805  begin  begin
   
4806          if PreviewTimer.Enabled then          if PreviewTimer.Enabled then
4807                  PreviewTimer.Enabled := False;                  PreviewTimer.Enabled := False;
4808          if (FHint <> nil) and (IsWindowVisible(FHint.Handle)) then begin  
4809                  FHint.ReleaseHandle;          if (FResPopupBrowser <> nil) and (IsWindowVisible(FResPopupBrowser.Handle)) then begin
4810                  FHint.ClearAllRes;          FResPopupBrowser.Clear;
4811          end;          end;
4812    
4813          if (FPreviewBrowser <> nil)          if (FPreviewBrowser <> nil)
# Line 4806  begin Line 4849  begin
4849                  s := CustomStringReplace(Range.text, ' ', ' ');//全角空白を半角空白に                  s := CustomStringReplace(Range.text, ' ', ' ');//全角空白を半角空白に
4850                  s := ZenToHan(Trim(s));                  s := ZenToHan(Trim(s));
4851                  if GikoSys.IsNumeric(s) then begin                  if GikoSys.IsNumeric(s) then begin
4852                            Num := StrToInt64(s);
4853                          ThreadItem := GetActiveContent;                          ThreadItem := GetActiveContent;
4854                          if ThreadItem <> nil then begin                          if (ThreadItem <> nil) and (Num <= ThreadItem.Count)
4855                                  Num := StrToInt64(s);                  and (Num > 0)then begin
4856                                  FHint.PopupType := gptThread;                  CreateResPopupBrowser;
4857                                  HTMLCreater.SetResPopupText(FHint, ThreadItem, Num, Num, False, False);                  FResPopupBrowser.CreateNewBrowser.PopupType := gptThread;
4858                                  if FHint.ResCount <> 0 then                                  HTMLCreater.SetResPopupText(FResPopupBrowser.CreateNewBrowser, ThreadItem, Num, Num, False, False);
4859                                          ShowTextPopup;                  FResPopupBrowser.Popup;
4860                                  Result := False;                                  Result := False;
4861                          end else                          end else
4862                                  Result := True;                                  Result := True;
# Line 4823  begin Line 4866  begin
4866          end;          end;
4867  end;  end;
4868    
 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;  
   
4869  procedure TGikoForm.HistoryAllClearToolButtonClick(Sender: TObject);  procedure TGikoForm.HistoryAllClearToolButtonClick(Sender: TObject);
4870  const  const
4871          DEL_MSG = '全履歴を削除します。よろしいですか?';          DEL_MSG = '全履歴を削除します。よろしいですか?';
# Line 6601  var Line 6604  var
6604          i, count: Integer;          i, count: Integer;
6605          body : String;          body : String;
6606      limited : Integer;      limited : Integer;
6607        FOleInPlaceActiveObject: IOleInPlaceActiveObject;
6608  begin  begin
6609    result := true;    result := true;
6610    try    try
6611          if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then          if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then
6612                  FActiveContent.Browser.SetFocus;          FOleInPlaceActiveObject := FActiveContent.Browser.ControlInterface as IOleInPlaceActiveObject;
6613            FOleInPlaceActiveObject.OnFrameWindowActivate(True);
6614                  try                  try
6615                          GetCursorPos(p);                          GetCursorPos(p);
6616                          p.x := p.x - FActiveContent.Browser.ClientOrigin.x;                          p.x := p.x - FActiveContent.Browser.ClientOrigin.x;
# Line 7125  begin Line 7130  begin
7130                  if Assigned(firstElement) then                  if Assigned(firstElement) then
7131                          if firstElement.style.visibility <> 'hidden' then                          if firstElement.style.visibility <> 'hidden' then
7132                                  firstElement.style.visibility := 'hidden';                                  firstElement.style.visibility := 'hidden';
   
7133  end;  end;
7134    
7135  procedure TGikoForm.RepaintAllTabsBrowser();  procedure TGikoForm.RepaintAllTabsBrowser();
# Line 7247  begin Line 7251  begin
7251          Application.ProcessMessages;          Application.ProcessMessages;
7252          if not Application.Terminated then begin          if not Application.Terminated then begin
7253                  if PreviewTimer.Enabled then                  if PreviewTimer.Enabled then
7254                          PreviewTimer.Enabled := False;                  PreviewTimer.Enabled := False;
7255                  //フォーカスが他のアプリに変わったときにヒントを消去                  //フォーカスが他のアプリに変わったときにポップアップ消去
7256                  if FHint <> nil then begin          if (FResPopupBrowser <> nil) then
7257                          FHint.ReleaseHandle;              FResPopupBrowser.Clear;
7258                          FHint.ClearAllRes;  
                 end;  
7259                  //プレビューを隠す                  //プレビューを隠す
7260                  if FPreviewBrowser <> nil then                  if FPreviewBrowser <> nil then
7261                          ShowWindow(FPreviewBrowser.Handle, SW_HIDE);                          ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
# Line 7301  begin Line 7304  begin
7304          BrowserNullTab := TBrowserRecord.Create;          BrowserNullTab := TBrowserRecord.Create;
7305          BrowserNullTab.Browser := Browser;          BrowserNullTab.Browser := Browser;
7306          BrowserNullTab.Browser.Navigate(BLANK_HTML);          BrowserNullTab.Browser.Navigate(BLANK_HTML);
7307    
7308          FBrowsers := TList.Create;          FBrowsers := TList.Create;
7309          for i := 0 to count -1 do begin          for i := 0 to count -1 do begin
7310                  FBrowsers.Add(TWebBrowser.Create(BrowserPanel));                  FBrowsers.Add(TWebBrowser.Create(BrowserPanel));
# Line 7320  begin Line 7324  begin
7324          end;          end;
7325          BrowserNullTab.Browser.BringToFront;          BrowserNullTab.Browser.BringToFront;
7326          ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW);          ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW);
7327    
7328          //起動時にタブ自動復元を入れていると、空ページ用のBrowserの          //起動時にタブ自動復元を入れていると、空ページ用のBrowserの
7329          //描画が終わっていなくて、クリックイベントの設定等に突入するので          //描画が終わっていなくて、クリックイベントの設定等に突入するので
7330          //ここで終わらせておく          //ここで終わらせておく
# Line 7550  begin Line 7555  begin
7555    
7556      end;      end;
7557  end;  end;
7558    //! ポップアップブラウザ作成
7559    procedure TGikoForm.CreateResPopupBrowser;
7560    begin
7561        if (FResPopupBrowser = nil) then begin
7562            FResPopupBrowser := TResPopupBrowser.Create(BrowserPanel);
7563        end;
7564    end;
7565    
7566  initialization  initialization
7567                                  OleInitialize(nil);                                  OleInitialize(nil);

Legend:
Removed from v.1.635  
changed lines
  Added in v.1.635.2.11

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