| 70 |
TOleControl(FChild).Parent := nil; |
TOleControl(FChild).Parent := nil; |
| 71 |
FChild.NavigateBlank; |
FChild.NavigateBlank; |
| 72 |
FChild.OnEnter := GikoForm.BrowserEnter; |
FChild.OnEnter := GikoForm.BrowserEnter; |
| 73 |
|
FChild.OnBeforeNavigate2 := GikoForm.BrowserBeforeNavigate2; |
| 74 |
FChild.OnStatusTextChange := GikoForm.BrowserStatusTextChange; |
FChild.OnStatusTextChange := GikoForm.BrowserStatusTextChange; |
| 75 |
FChild.OnNewWindow2 := GikoForm.BrowserNewWindow2; |
FChild.OnNewWindow2 := GikoForm.BrowserNewWindow2; |
| 76 |
ShowWindow(FChild.Handle, SW_HIDE); |
ShowWindow(FChild.Handle, SW_HIDE); |
| 80 |
TOleControl(Self).Parent := nil; |
TOleControl(Self).Parent := nil; |
| 81 |
Self.NavigateBlank; |
Self.NavigateBlank; |
| 82 |
Self.OnEnter := GikoForm.BrowserEnter; |
Self.OnEnter := GikoForm.BrowserEnter; |
| 83 |
|
Self.OnBeforeNavigate2 := GikoForm.BrowserBeforeNavigate2; |
| 84 |
Self.OnStatusTextChange := GikoForm.BrowserStatusTextChange; |
Self.OnStatusTextChange := GikoForm.BrowserStatusTextChange; |
| 85 |
Self.OnNewWindow2 := GikoForm.BrowserNewWindow2; |
Self.OnNewWindow2 := GikoForm.BrowserNewWindow2; |
| 86 |
Result := Self; |
Result := Self; |
| 102 |
doc: Variant; |
doc: Variant; |
| 103 |
ARect: TRect; |
ARect: TRect; |
| 104 |
begin |
begin |
|
Self.Visible := True; |
|
|
ShowWindow(Self.Handle, SW_SHOW); |
|
| 105 |
try |
try |
| 106 |
doc := Idispatch( olevariant(Self.ControlInterface).Document) as IHTMLDocument2; |
doc := Idispatch( olevariant(Self.ControlInterface).Document) as IHTMLDocument2; |
| 107 |
doc.open; |
doc.open; |
| 119 |
end; |
end; |
| 120 |
|
|
| 121 |
ARect := CalcRect(Screen.Width); |
ARect := CalcRect(Screen.Width); |
| 122 |
SetWindowPos(Self.Handle, HWND_TOPMOST, |
SetWindowPos(Self.Handle, HWND_TOP, |
| 123 |
ARect.Left, ARect.Top, |
ARect.Left, ARect.Top, |
| 124 |
(ARect.Right - ARect.Left) , |
(ARect.Right - ARect.Left) , |
| 125 |
(ARect.Bottom - ARect.Top), |
(ARect.Bottom - ARect.Top), |
| 126 |
SWP_NOACTIVATE or SWP_HIDEWINDOW); |
SWP_NOACTIVATE or SWP_HIDEWINDOW); |
| 127 |
|
Self.Visible := True; |
| 128 |
ShowWindow(Self.Handle, SW_SHOWNOACTIVATE); |
ShowWindow(Self.Handle, SW_SHOWNOACTIVATE); |
| 129 |
|
|
| 130 |
except |
except |
| 176 |
function TResPopupBrowser.CalcRect(MaxWidth: Integer): TRect; |
function TResPopupBrowser.CalcRect(MaxWidth: Integer): TRect; |
| 177 |
var |
var |
| 178 |
p: TPoint; |
p: TPoint; |
|
doc: Variant; |
|
| 179 |
ele: IHTMLElement2; |
ele: IHTMLElement2; |
| 180 |
begin |
begin |
| 181 |
GetCursorpos(p); |
GetCursorpos(p); |
| 184 |
ele.scrollWidth + 15, |
ele.scrollWidth + 15, |
| 185 |
ele.scrollHeight + 15); |
ele.scrollHeight + 15); |
| 186 |
case GikoSys.Setting.PopupPosition of |
case GikoSys.Setting.PopupPosition of |
| 187 |
gppRightTop: OffsetRect(Result, p.x - (Result.Right - Result.Left), p.y - (Result.Bottom - Result.Top)); |
gppRightTop: OffsetRect(Result, p.x - (Result.Right - Result.Left) - 2, p.y - (Result.Bottom - Result.Top) - 2); |
| 188 |
gppRight: OffsetRect(Result, p.x - (Result.Right - Result.Left), p.y - ((Result.Bottom - Result.Top) div 2)); |
gppRight: OffsetRect(Result, p.x - (Result.Right - Result.Left) - 2, p.y - ((Result.Bottom - Result.Top) div 2)); |
| 189 |
gppRightBottom: OffsetRect(Result, p.x - (Result.Right - Result.Left), p.y); |
gppRightBottom: OffsetRect(Result, p.x - (Result.Right - Result.Left) -2, p.y + 2); |
| 190 |
gppTop: OffsetRect(Result, p.x - ((Result.Right - Result.Left) div 2), p.y - (Result.Bottom - Result.Top)); |
gppTop: OffsetRect(Result, p.x - ((Result.Right - Result.Left) div 2), p.y - (Result.Bottom - Result.Top) - 2); |
| 191 |
gppCenter: OffsetRect(Result, p.x - ((Result.Right - Result.Left) div 2), p.y - ((Result.Bottom - Result.Top) div 2)); |
gppCenter: OffsetRect(Result, p.x - ((Result.Right - Result.Left) div 2), p.y - ((Result.Bottom - Result.Top) div 2)); |
| 192 |
gppBottom: OffsetRect(Result, p.x - ((Result.Right - Result.Left) div 2), p.y); |
gppBottom: OffsetRect(Result, p.x - ((Result.Right - Result.Left) div 2), p.y + 2); |
| 193 |
gppLeftTop: OffsetRect(Result, p.x, p.y - (Result.Bottom - Result.Top)); |
gppLeftTop: OffsetRect(Result, p.x + 2, p.y - (Result.Bottom - Result.Top) - 2); |
| 194 |
gppLeft: OffsetRect(Result, p.x, p.y - ((Result.Bottom - Result.Top) div 2)); |
gppLeft: OffsetRect(Result, p.x + 2, p.y - ((Result.Bottom - Result.Top) div 2)); |
| 195 |
gppLeftBottom: OffsetRect(Result, p.x, p.y); |
gppLeftBottom: OffsetRect(Result, p.x + 2, p.y + 2); |
| 196 |
end; |
end; |
| 197 |
if (Result.Left < 0) then begin |
if (Result.Left < 0) then begin |
| 198 |
OffsetRect(Result, -Result.Left, 0); |
OffsetRect(Result, -Result.Left, 0); |