ギコナビ
Revision | c94d79bb131771c5f8823c8bce21f4f58f2408aa (tree) |
---|---|
Time | 2007-05-13 23:49:06 |
Author | h677 <h677> |
Commiter | h677 |
レスポップアップのメソッドを新設
ポップアップ中でメル欄のポップアップが利かない不具合の修正
@@ -1908,6 +1908,7 @@ begin | ||
1908 | 1908 | end; |
1909 | 1909 | StatusBar.Panels[1].Text := Text2; |
1910 | 1910 | |
1911 | + | |
1911 | 1912 | if FPreviewBrowser <> nil then |
1912 | 1913 | ShowWindow(FPreviewBrowser.Handle, SW_HIDE); |
1913 | 1914 |
@@ -1962,8 +1963,8 @@ begin | ||
1962 | 1963 | FResPopupBrowser.PopupType := gptThread; |
1963 | 1964 | HTMLCreater.SetResPopupText(FResPopupBrowser.CreateNewBrowser, GetActiveContent, wkIntSt, wkIntTo, False, False); |
1964 | 1965 | end else begin |
1965 | - FResPopupBrowser.PopupType := gptRaw; | |
1966 | - FResPopupBrowser.Title := s; | |
1966 | + FResPopupBrowser.CreateNewBrowser.PopupType := gptRaw; | |
1967 | + FResPopupBrowser.CreateNewBrowser.Title := s; | |
1967 | 1968 | end; |
1968 | 1969 | end; |
1969 | 1970 | end else begin |
@@ -2023,7 +2024,7 @@ begin | ||
2023 | 2024 | FResPopupBrowser := TResPopupBrowser.Create(BrowserPanel); |
2024 | 2025 | ShowWindow(FResPopupBrowser.Handle, SW_HIDE); |
2025 | 2026 | end; |
2026 | - FResPopupBrowser.PopupType := gptThread; | |
2027 | + FResPopupBrowser.CreateNewBrowser.PopupType := gptThread; | |
2027 | 2028 | HTMLCreater.SetResPopupText(FResPopupBrowser.CreateNewBrowser, threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst ); |
2028 | 2029 | end; |
2029 | 2030 | end; |
@@ -2032,10 +2033,17 @@ begin | ||
2032 | 2033 | FResPopupBrowser := TResPopupBrowser.Create(BrowserPanel); |
2033 | 2034 | ShowWindow(FResPopupBrowser.Handle, SW_HIDE); |
2034 | 2035 | end; |
2035 | - if FResPopupBrowser.PopupType = gptRaw then begin | |
2036 | - if FResPopupBrowser.Title <> '' then | |
2036 | + if FResPopupBrowser.CreateNewBrowser.PopupType = gptRaw then begin | |
2037 | + if FResPopupBrowser.CreateNewBrowser.Title <> '' then begin | |
2037 | 2038 | FResPopupBrowser.CreateNewBrowser.TitlePopup; |
2038 | - end; | |
2039 | + end; | |
2040 | + end else begin | |
2041 | + if FResPopupBrowser.CreateNewBrowser.RawDocument <> '' then begin | |
2042 | + FResPopupBrowser.CreateNewBrowser.Popup; | |
2043 | + end else if FResPopupBrowser.CreateNewBrowser.Title <> '' then begin | |
2044 | + FResPopupBrowser.CreateNewBrowser.TitlePopup; | |
2045 | + end; | |
2046 | + end; | |
2039 | 2047 | end; |
2040 | 2048 | end; |
2041 | 2049 |
@@ -1281,7 +1281,8 @@ begin | ||
1281 | 1281 | ToNum := StNum + MAX_POPUP_RES; |
1282 | 1282 | |
1283 | 1283 | Hint.Title := ''; |
1284 | - | |
1284 | + Hint.RawDocument := ''; | |
1285 | + | |
1285 | 1286 | //^Cg\¦ |
1286 | 1287 | if Title then |
1287 | 1288 | if ThreadItem <> nil then |
@@ -1317,11 +1318,7 @@ begin | ||
1317 | 1318 | end; |
1318 | 1319 | end; |
1319 | 1320 | if (Html.Count > 0) then begin |
1320 | - Hint.Write('<DL>' + Html.Text + '</DL>'); | |
1321 | - end else begin | |
1322 | - if (Title) and (Hint.Title <> '') then begin | |
1323 | - Hint.TitlePopup; | |
1324 | - end; | |
1321 | + Hint.RawDocument := '<DL>' + Html.Text + '</DL>'; | |
1325 | 1322 | end; |
1326 | 1323 | end; |
1327 | 1324 | finally |
@@ -18,8 +18,9 @@ type | ||
18 | 18 | TResPopupBrowser = class(TWebBrowser) |
19 | 19 | private |
20 | 20 | FChild :TResPopupBrowser; |
21 | - FParent:TResPopupBrowser; | |
21 | + FParentBrowser :TResPopupBrowser; | |
22 | 22 | FTitle :String; |
23 | + FRawDocument: String; | |
23 | 24 | FPopupType: TGikoPopupType; |
24 | 25 | function GetBodyStyle(OnlyTitle: Boolean = False): string; |
25 | 26 | function GetWindowHeight : Integer; |
@@ -31,15 +32,18 @@ type | ||
31 | 32 | constructor Create(AOwner: TComponent); override; |
32 | 33 | destructor Destroy; override; |
33 | 34 | property Child: TResPopupBrowser read FChild; |
34 | - property Parent:TResPopupBrowser read FParent write FParent; | |
35 | + property ParentBrowser:TResPopupBrowser read FParentBrowser write FParentBrowser; | |
35 | 36 | property Title: String read FTitle write FTitle; |
37 | + property RawDocument: String read FRawDocument write FRawDocument; | |
36 | 38 | function CreateNewBrowser: TResPopupBrowser; |
39 | + function CurrentBrowser: TResPopupBrowser; | |
37 | 40 | procedure Write(ADocument: String; OnlyTitle: Boolean = False); |
38 | 41 | procedure Clear; |
39 | 42 | procedure ChildClear; |
40 | 43 | procedure NavigateBlank; |
41 | 44 | property PopupType: TGikoPopupType read FPopupType write FPopupType; |
42 | 45 | procedure TitlePopup; |
46 | + procedure Popup; | |
43 | 47 | end; |
44 | 48 | |
45 | 49 | implementation |
@@ -52,6 +56,7 @@ begin | ||
52 | 56 | FChild := nil; |
53 | 57 | Visible := False; |
54 | 58 | Title := ''; |
59 | + RawDocument := ''; | |
55 | 60 | end; |
56 | 61 | |
57 | 62 | destructor TResPopupBrowser.Destroy; |
@@ -73,20 +78,20 @@ begin | ||
73 | 78 | Result := FChild; |
74 | 79 | end; |
75 | 80 | end else begin |
76 | - FChild := TResPopupBrowser.Create(Self); | |
77 | - TOleControl(FChild).Parent := nil; | |
78 | - FChild.Parent := Self; | |
79 | - FChild.NavigateBlank; | |
80 | - FChild.OnEnter := GikoForm.BrowserEnter; | |
81 | - FChild.OnBeforeNavigate2 := GikoForm.BrowserBeforeNavigate2; | |
82 | - FChild.OnStatusTextChange := GikoForm.BrowserStatusTextChange; | |
83 | - FChild.OnNewWindow2 := GikoForm.BrowserNewWindow2; | |
84 | - ShowWindow(FChild.Handle, SW_HIDE); | |
81 | + FChild := TResPopupBrowser.Create(Self); | |
82 | + TOleControl(FChild).Parent := nil; | |
83 | + FChild.ParentBrowser := Self; | |
84 | + FChild.NavigateBlank; | |
85 | + FChild.OnEnter := GikoForm.BrowserEnter; | |
86 | + FChild.OnBeforeNavigate2 := GikoForm.BrowserBeforeNavigate2; | |
87 | + FChild.OnStatusTextChange := GikoForm.BrowserStatusTextChange; | |
88 | + FChild.OnNewWindow2 := GikoForm.BrowserNewWindow2; | |
89 | + ShowWindow(FChild.Handle, SW_HIDE); | |
85 | 90 | Result := FChild; |
86 | 91 | end; |
87 | 92 | end else begin |
88 | 93 | TOleControl(Self).Parent := nil; |
89 | - FParent := nil; | |
94 | + FParentBrowser := nil; | |
90 | 95 | Self.NavigateBlank; |
91 | 96 | Self.OnEnter := GikoForm.BrowserEnter; |
92 | 97 | Self.OnBeforeNavigate2 := GikoForm.BrowserBeforeNavigate2; |
@@ -94,7 +99,12 @@ begin | ||
94 | 99 | Self.OnNewWindow2 := GikoForm.BrowserNewWindow2; |
95 | 100 | Result := Self; |
96 | 101 | end; |
97 | - | |
102 | +end; | |
103 | +function TResPopupBrowser.CurrentBrowser: TResPopupBrowser; | |
104 | +begin | |
105 | + Result := Self.CreateNewBrowser; | |
106 | + if (Result.Parent <> nil) then | |
107 | + Result := Result.ParentBrowser; | |
98 | 108 | end; |
99 | 109 | procedure TResPopupBrowser.NavigateBlank; |
100 | 110 | begin |
@@ -110,6 +120,10 @@ procedure TResPopupBrowser.TitlePopup; | ||
110 | 120 | begin |
111 | 121 | Write('', True); |
112 | 122 | end; |
123 | +procedure TResPopupBrowser.Popup; | |
124 | +begin | |
125 | + Write(Self.RawDocument, false); | |
126 | +end; | |
113 | 127 | procedure TResPopupBrowser.Write(ADocument: String; OnlyTitle: Boolean = False); |
114 | 128 | var |
115 | 129 | doc: Variant; |
@@ -192,6 +206,7 @@ begin | ||
192 | 206 | ChildClear; |
193 | 207 | if (Self.Visible) then begin |
194 | 208 | Self.Title := ''; |
209 | + Self.RawDocument := ''; | |
195 | 210 | NavigateBlank; |
196 | 211 | ShowWindow(Self.Handle, SW_HIDE); |
197 | 212 | Self.Visible := False; |