18 namespace uiextensions {
20 interface class IPDFTextManager;
21 interface class IPDFTextManagerOverrides;
22 interface class ISearchOnePage;
23 interface class ITextSearchDataItem;
24 ref class TextSearchDataItem;
25 ref class UIExtensionsManager;
34 namespace uiextensions
41 _OnePageData = ref
new Platform::Collections::Vector<ITextSearchDataItem^>();
43 property int PageIndex
50 property Windows::Foundation::Collections::IVector<ITextSearchDataItem^>^ OnePageData
52 virtual Windows::Foundation::Collections::IVector<ITextSearchDataItem^>^
get()
59 Platform::Collections::Vector<ITextSearchDataItem^>^ _OnePageData;
68 bool LoadTextPageHandle();
69 void ReleaseTextHandle();
70 void LoadTextPageRects();
75 bool IsPageHandleInitByExternalModule;
77 foxit::pdf::PDFPage^ pageHandle;
78 foxit::pdf::TextPage^ textpageHandle;
80 Platform::Array<Windows::Foundation::Rect>^ TextRect;
82 void CheckPageIndex();
86 Platform::WeakReference m_DocumentWeakRef;
87 int m_TextPageRefCount;
96 property int SelectMode;
97 property int StartIndex;
98 property Windows::Foundation::Point StartPoint;
99 property int EndIndex;
100 property Windows::Foundation::Point EndPoint;
105 [Windows::Foundation::Metadata::WebHostHidden]
114 property int StartIndex;
115 property int StartCharIndex;
116 property int EndIndex;
117 property int EndCharIndex;
127 property Platform::String^ FindTextString
129 virtual Platform::String^
get()
131 return m_SearchTextString;
135 virtual bool GetIsSingleSearching();
137 virtual bool GetIsFoundText();
139 virtual void StartSearchString(
int pageindex, Platform::String^ pwsFindwhat);
141 virtual void StopSearchString();
143 virtual void SearchPrev();
145 virtual void SearchNext();
146 virtual void NotifyByTextSearchDataItem(ITextSearchDataItem^ item);
147 property SingleSearchOnePage^ CurSearchTextInfo
149 virtual SingleSearchOnePage^
get()
151 return m_CurSearchOnePage;
154 property Windows::Foundation::Collections::IObservableVector<ITextSearchDataItem^>^ SearchData
156 virtual Windows::Foundation::Collections::IObservableVector<ITextSearchDataItem^>^
get()
161 virtual event SearchResultEventHandler^ SearchResult;
163 virtual bool IsInitText(
int pageindex);
165 virtual Platform::String^ GetTextByPosition(
int pageindex,
int start,
int count);
167 virtual Platform::String^ GetTextByBounded(
int pageindex, Windows::Foundation::Rect rect);
168 virtual Platform::String^ GetTextByBoundedSegments(
int pageindex, Windows::Foundation::Rect rect);\
170 virtual Platform::String^ GetWordsByPoint(
int pageindex, Windows::Foundation::Point point);
172 virtual bool IsHitText(
int pageindex, Windows::Foundation::Point pt);
174 virtual bool IsHitSelectedText(
int pageindex, Windows::Foundation::Point pt);
176 virtual bool AddSelectText(
int startindex, Windows::Foundation::Point startpt,
int endindex, Windows::Foundation::Point endpt);
177 property Platform::String^ SelectedTextString
179 virtual Platform::String^
get()
181 return _SelectedTextString;
184 property Windows::Foundation::Collections::IObservableVector<IPageSelectText^>^ SelectedText
186 virtual Windows::Foundation::Collections::IObservableVector<IPageSelectText^>^
get()
188 return _SelectedText;
191 property double TextSelectTolerance
193 virtual double get();
194 virtual void set(
double value);
196 virtual event TextSelectChangedEventHandler^ TextSelectChanged;
198 virtual void SetOption(ITextSelectOption^ opt);
199 ITextSelectOption^ GetOption();
200 void UpdateTextSelectOption();
203 virtual bool OnLoaded();
204 virtual void OnDelete();
210 virtual bool LoadPdfTextResource(
int pageindex);
211 virtual Platform::Array<Windows::Foundation::Rect>^ GetPageCoordinateRects(
int pageindex);
213 virtual foxit::pdf::PDFPage^ GetPageHandle(
int pageindex);
214 virtual bool IsResourcesReleased();
215 virtual void ReleaseExtraResources();
216 virtual void ForceReleaseResources();
218 virtual void ClearTextSelect();
220 virtual Windows::Foundation::Rect GetHitTextRect(
int pageindex, Windows::Foundation::Point pt);
221 virtual IPageSelectText^ GetTextRect(
int startindex, Windows::Foundation::Point startpt);
224 void AddTextSelect(Windows::Foundation::Collections::IVector<IPageSelectText^>^ pageTextVect);
225 bool InitPageTextArry(
int pageindex);
226 bool PointInRectangleByPageCoordiation(Windows::Foundation::Point pt, Windows::Foundation::Rect rc);
229 Windows::Foundation::IAsyncOperationWithProgress<int, SearchOnePage^>^ GetSearchResultAsync(Platform::String^ pwsFindwhat);
233 bool LoadPageHandle(
int pageIndex, foxit::pdf::PDFPage^ pPage =
nullptr, foxit::pdf::TextPage^ pTextPage =
nullptr);
234 std::shared_ptr<TextHandleContext> LoadPageHandle_Sp(
int pageIndex);
235 bool SearchLoadHandle(
int pageIndex, foxit::pdf::PDFPage^ pPage, foxit::pdf::TextPage^ pTextPage, foxit::pdf::TextSearch^& pSearchHandle, Platform::String^ pwsFindwhat,
int findOption = 0,
int findMode = 0);
236 Platform::String^ GetShowTextFromPage(
int page,
int count,
int mode);
237 bool GetSearchItemData(
int pageIndex, foxit::pdf::TextPage^ pTextPage, foxit::pdf::TextSearch^ pSeachHandle, TextSearchDataItem^ item,
int findMode = 0);
238 void GetSearchItemContextString(
int pageIndex, foxit::pdf::TextPage^ pTextPage, TextSearchDataItem^ item);
239 bool SearchCheckStringValid(Platform::String^ findstr);
241 bool IsHasFinded(
int pageindex);
242 Concurrency::task<SingleSearchOnePage^> SingleSearchString();
243 void NotifyToView(SingleSearchOnePage^ data);
246 std::shared_ptr<CritSec> m_Critsec;
249 Platform::WeakReference m_WeakfpdfDocument;
250 Platform::WeakReference m_PageViewWeakRef;
251 Platform::WeakReference m_UIViewWeakRef;
252 std::map<int, std::shared_ptr<TextHandleContext>> m_PageHandleVect;
253 HANDLE m_EventCancelFind;
254 Windows::Foundation::IAsyncOperationWithProgress<int, SearchOnePage^>^ m_AsyncOperation;
257 bool m_IsHadReleasedResources;
259 bool m_IsForceReleaseResources;
263 std::vector<int> m_HasSearchedPage;
264 std::map<int, ISearchOnePage^> m_SearchOnePageData;
265 std::shared_ptr<CritSec> m_MapCritsec;
266 SingleSearchOnePage^ m_CurSearchOnePage;
268 Platform::String^ m_SearchTextString;
269 int m_CurSearchIndex;
270 foxit::pdf::PDFPage^ m_pCurPageHandle;
271 foxit::pdf::TextPage^ m_pCurTextPageHandle;
272 foxit::pdf::TextSearch^ m_pCurSeachHandle;
273 bool m_IsSingleSearching;
275 Concurrency::cancellation_token_source m_SingleSearchCts;
278 ITextSelectOption^ m_Option;
279 std::vector<int> m_RefPageIndexVector;
280 std::vector<int> m_PrevOpraRefPageIndexVector;
281 std::shared_ptr<CritSec> m_PageIndexVectorCritsec;
283 Windows::Foundation::Collections::IObservableVector<ITextSearchDataItem^>^ _SearchData;
284 Windows::Foundation::Collections::IObservableVector<IPageSelectText^>^ _SelectedText;
285 Platform::String^ _SelectedTextString;
286 double _TextSelectTolerance;
287 Windows::Foundation::EventRegistrationToken m_textRenderToken;
289 void UpdateSelectContext();
296 bool m_IsShowSelHandleBtn;
297 bool m_IsHitSelHandleBtn;
298 bool m_IsHitStartSelHandleBtn;
300 bool m_IsPointerOverText;
301 Windows::UI::Xaml::DispatcherTimer^ m_PointerOverTextTimer;
305 virtual void OnPointerPressed(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e);
306 virtual void OnPointerReleased(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e);
307 virtual void OnPointerMoved(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e);
308 virtual void OnPointerEntered(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e);
309 virtual void OnPointerExited(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e);
310 virtual void OnTapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e);
311 virtual void OnHolding(Platform::Object^ sender, Windows::UI::Xaml::Input::HoldingRoutedEventArgs^ e);
312 virtual void OnSelHandleClick(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
313 virtual bool GetIsShowSelHandleBtn();
314 virtual void SetIsShowSelHandleBtn(
bool bIsShow);
317 void ClearSelectedText();
324 void OutputCompositeTransformInfo(Windows::UI::Xaml::FrameworkElement^ framework);
325 bool IsSelectedPageIndex(
int pageindex,
unsigned int* index);
326 void OnClearTextSelect();
328 bool IsHadRefPageIndex(
int pageindex);
329 bool IsPrevRefPageIndex(
int pageindex);
330 void AddPageIndexRef(
int pageindex);
331 void RemovePageIndexRef(
int pageindex);
332 void AddPageIndexRef(
int startindex,
int endindex);
333 void RemovePageIndexRef(
int startindex,
int endindex);
336 Platform::String^ StandardizationDealWithString(Platform::String^ source);
337 Platform::String^ LimitDealWithString(Platform::String^ source);
338 void OnPointerOverTick(Platform::Object ^sender, Platform::Object ^args);
339 bool IsSpaceCharacter(
unsigned short unicode);
342 virtual void ChangePageIndex(
int srcIndex,
int dstIndex);
343 virtual void ChangePageIndex(Windows::Foundation::Collections::IVector<int>^ srcIndexs,
int dstIndex);
344 virtual void PageDeleteBefore(Windows::Foundation::Collections::IVector<int>^ pageIndexs);
345 virtual void PageDeleteAfter(Windows::Foundation::Collections::IVector<int>^ pageIndexs);
346 virtual void CheckPageIndex(
int startIndex);
347 void GotoExactlyPage(SingleSearchOnePage^ pageinfo);
Definition: PDFTextManager.h:90
The PDF view control, which is able to open/display/save/...etc the PDF document. ...
Definition: FoxitRdkComponentViewCtrl.h:95
Definition: PDFTextManager.h:108
Definition: PDFTextManager.h:36
Definition: UIExtensions.h:113
Definition: PDFTextManager.h:106
Definition: PDFTextManager.h:63
Definition: FoxitRdkComponentViewCtrl.h:3