TreeSelectNamePupupMenu: TMenuItem;
Browser: TWebBrowser;
BrowserPanel: TPanel;
+ SetFocusForBrowserAction: TAction;
+ SetFocusForThreadListAction: TAction;
+ SetFocusForCabinetAction: TAction;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure CabinetPanelHide(Sender: TObject);
procedure FavoriteTreeViewMouseUp(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure OnlyAHundredResUpdate(Sender: TObject);
- procedure test1Click(Sender: TObject);
+ procedure SetFocusForBrowserActionExecute(Sender: TObject);
+ procedure SetFocusForBrowserActionUpdate(Sender: TObject);
+ procedure SetFocusForThreadListActionExecute(Sender: TObject);
+ procedure SetFocusForCabinetActionExecute(Sender: TObject);
private
{ Private \90é\8c¾ }
//RoundList : TRoundList;
function BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean;
// \8ae\8f\8a\82É\82 \82é\83L\83\83\83r\83l\83b\83g\81E BBS \83\81\83j\83\85\81[\82ð\83Z\83b\83g\81^\8dX\90V
procedure SetBBSMenu;
-
+ function WebBrowserClick(Sender: TObject): WordBool;
protected
procedure CreateParams(var Params: TCreateParams); override;
procedure WndProc(var Message: TMessage); override;
Application.OnDeactivate := AppFormDeactivate;
Self.OnDeactivate := AppFormDeactivate;
Application.HookMainWindow(Hook);
- Application.OnMessage := HandleAppMessage;
+ //Application.OnMessage := HandleAppMessage; //\82È\82ñ\82©\96³\82\82Ä\82à\91å\8fä\95v\82É\82È\82Á\82½\81@by\81@\82à\82¶\82ã
FTreeType := gttNone;
procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
- SaveCoolBarSettings;
+ if GikoForm.WindowState <> wsMinimized then
+ SaveCoolBarSettings;
if ( GikoSys.Setting.ShowDialogForEnd ) and
(MessageDlg('\83M\83R\83i\83r\82ð\8fI\97¹\82µ\82Ä\82æ\82ë\82µ\82¢\82Å\82·\82©\81H', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then begin
CanClose := false;
begin
//\83^\83u\83N\83\8d\81[\83Y
NotSelectTabCloseAction.Execute;
- //if BrowserTab.Tabs.Count >= 1 then
- // for i := BrowserTab.Tabs.Count - 1 downto 0 do
- // DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[i]));
BrowserTabCloseAction.Execute;
//TreeView\83N\83\8a\83A\81iBBS2ch.Free\82Ì\8cã\82É\83N\83\8a\83A\82·\82é\82ÆXP\83X\83^\83C\83\8b\8e\9e\82É\83G\83\89\81[\8fo\82é\81j
TreeView.Items.Clear;
end;
newBrowser.Browser := TWebBrowser(FBrowsers[4]);
FBrowsers.Move(4, 0);
- newBrowser.Browser.Navigate(BLANK_HTML);
+ //newBrowser.Browser.Navigate(BLANK_HTML);
newBrowser.thread := ThreadItem;
newBrowser.Repaint := true;
newBrowser.OnlyHundred := GikoSys.OnlyAHundredRes;
end;
newBrowser.Browser := TWebBrowser(FBrowsers[4]);
FBrowsers.Move(4, 0);
- newBrowser.Browser.Navigate(BLANK_HTML);
+ //newBrowser.Browser.Navigate(BLANK_HTML);
newBrowser.thread := ThreadItem;
newBrowser.OnlyHundred := GikoSys.OnlyAHundredRes;
newBrowser.Repaint := true;
ListView.ItemFocused := ListView.Items.Item[ idx ];
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;
end;
InsertBrowserTab(ThreadItem);
end;
- 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;
+
end;
procedure TGikoForm.ListDoubleClick(Shift: TShiftState);
AddressComboBox.Text := ThreadItem.URL;
end;
- 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;
end;
end;
FDispHtmlDocument := Idispatch(OleVariant(BrowserRecord.Browser.ControlInterface).Document) as DispHTMLDocument;
BrowserRecord.FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
BrowserRecord.FEvent.OnContextMenu := OnDocumentContextMenu;
+ BrowserRecord.FEvent.OnClick := WebBrowserClick; //\92Ç\89Á\82µ\82½OnClick\83C\83x\83\93\83g
end;
end;
end;
Exit;
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;
end;
end;
if GikoForm.Visible then
Browser.SetFocus;
end;
- end;
+ end;
end;
end;
end;
end;
-// \83u\83\89\83E\83U\82Ì\83L\81[\83_\83E\83\93\83C\83x\83\93\83g
+// \83u\83\89\83E\83U\82Ì\83L\81[\83_\83E\83\93\83C\83x\83\93\83g //\82È\82ñ\82©\8eg\82í\82È\82\82Ä\82à\93®\82¢\82Ä\82é\8bC\82ª\82·\82é\81@by\82à\82¶\82ã
// \83C\83x\83\93\83g\82ð\8eæ\82è\88µ\82Á\82½\8fê\8d\87\82Í True \82ð\95Ô\82·
function TGikoForm.BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean;
var
var
key : Word;
begin
-
+{
case Msg.message of
WM_KEYDOWN:
if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
XBUTTON2:
end;
end;
-
+}
end;
procedure TGikoForm.FavoriteTreeViewMouseDown(Sender: TObject;
OnlyAHundredRes.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
end;
-procedure TGikoForm.test1Click(Sender: TObject);
+function TGikoForm.WebBrowserClick(Sender: TObject): WordBool;
begin
- TOleControl(FActiveContent.Browser).Visible := not TOleControl(FActiveContent.Browser).Visible;
+ result := true;
+ if (Sender <> nil) and (Sender is TWebBrowser) then
+ try
+ TWebBrowser(Sender).SetFocus;
+ except
+ end;
+end;
+
+procedure TGikoForm.SetFocusForBrowserActionExecute(Sender: TObject);
+begin
+ FActiveContent.FBrowser.SetFocus;
+end;
+
+procedure TGikoForm.SetFocusForBrowserActionUpdate(Sender: TObject);
+begin
+ if( FActiveContent <> nil) and (FActiveContent.Browser <> nil) and
+ (FActiveContent.Browser <> BrowserNullTab.Browser) then
+ SetFocusForBrowserAction.Enabled := true
+ else
+ SetFocusForBrowserAction.Enabled := false;
+end;
+
+procedure TGikoForm.SetFocusForThreadListActionExecute(Sender: TObject);
+begin
+ if FActiveContent <> nil then
+ WebBrowserClick(FActiveContent.Browser); //\88ê\89ñBrowser\82É\93\96\82Ä\82È\82¢\82Æ\93®\82©\82È\82¢\82Æ\82«\82ª\82 \82é
+ ListView.SetFocus;
+ if( ListView.Items.Count > 0 ) and (ListView.ItemFocused = nil) then
+ ListView.Items.Item[0].Selected := true; //\91I\91ð\83A\83C\83e\83\80\82ª\96³\82¢\82Æ\82«\82Í\90æ\93ª\82Ì\82ð\91I\91ð\82·\82é
+end;
+
+procedure TGikoForm.SetFocusForCabinetActionExecute(Sender: TObject);
+begin
+ if FActiveContent <> nil then
+ WebBrowserClick(FActiveContent.Browser); //\88ê\89ñBrowser\82É\93\96\82Ä\82È\82¢\82Æ\93®\82©\82È\82¢\82Æ\82«\82ª\82 \82é
+ TreeView.SetFocus;
end;
initialization