Home
last modified time | relevance | path

Searched refs:selection (Results 1 – 25 of 43) sorted by relevance

12

/pdf/pdf-viewer/src/main/java/androidx/pdf/viewer/
DSelectedMatchValueObserver.java73 private void lookAtSelection(SelectedMatch selection) { in lookAtSelection() argument
74 if (selection == null || selection.isEmpty()) { in lookAtSelection()
77 if (selection.getPage() >= mPaginatedView.getModel().getSize()) { in lookAtSelection()
78 mLayoutHandler.layoutPages(selection.getPage() + 1); in lookAtSelection()
81 Rect rect = selection.getPageMatches().getFirstRect(selection.getSelected()); in lookAtSelection()
82 int x = mPaginatedView.getModel().getLookAtX(selection.getPage(), rect.centerX()); in lookAtSelection()
83 int y = mPaginatedView.getModel().getLookAtY(selection.getPage(), rect.centerY()); in lookAtSelection()
87 selection.getPage(), in lookAtSelection()
89 mPaginatedView.getModel().getPageSize(selection.getPage())); in lookAtSelection()
90 pageView.setOverlay(selection.getOverlay()); in lookAtSelection()
DPdfHighlightOverlay.java36 public PdfHighlightOverlay(@NonNull PageSelection selection) { in PdfHighlightOverlay() argument
37 super(new RectDrawSpec(HighlightPaint.SELECTION, selection.getRects())); in PdfHighlightOverlay()
DPdfViewer.java299 mSelectionModel.selection().addObserver(mSelectionObserver); in onContentsAvailable()
356 mSelectionModel.selection().removeObserver(mSelectionObserver); in destroyContentModel()
527 private void lookAtSelection(SelectedMatch selection) { in lookAtSelection() argument
528 if (selection == null || selection.isEmpty()) { in lookAtSelection()
531 if (selection.getPage() >= mPaginationModel.getSize()) { in lookAtSelection()
532 mLayoutHandler.layoutPages(selection.getPage() + 1); in lookAtSelection()
535 Rect rect = selection.getPageMatches().getFirstRect(selection.getSelected()); in lookAtSelection()
536 int x = mPaginationModel.getLookAtX(selection.getPage(), rect.centerX()); in lookAtSelection()
537 int y = mPaginationModel.getLookAtY(selection.getPage(), rect.centerY()); in lookAtSelection()
541 selection.getPage(), in lookAtSelection()
[all …]
/pdf/pdf-viewer/src/main/java/androidx/pdf/data/
DTextSelection.java115 TextSelection selection, in writeToParcel() argument
119 parcel.writeParcelable(selection.mStart, flags); in writeToParcel()
120 parcel.writeParcelable(selection.mStop, flags); in writeToParcel()
140 TextSelection selection, in writeToParcel() argument
144 selection.mStart.writeToParcel(parcel, flags); in writeToParcel()
145 selection.mStop.writeToParcel(parcel, flags); in writeToParcel()
/pdf/pdf-viewer/src/main/java/androidx/pdf/viewer/loader/
DPdfLoaderCallbacksImpl.kt109 private fun lookAtSelection(selection: SelectedMatch?) { in lookAtSelection()
110 if (selection == null || selection.isEmpty) { in lookAtSelection()
114 if (selection.page >= paginatedView.model.size) { in lookAtSelection()
115 layoutHandler!!.layoutPages(selection.page + 1) in lookAtSelection()
119 val rect = selection.pageMatches.getFirstRect(selection.selected) in lookAtSelection()
120 val x: Int = paginatedView.model.getLookAtX(selection.page, rect.centerX()) in lookAtSelection()
121 val y: Int = paginatedView.model.getLookAtY(selection.page, rect.centerY()) in lookAtSelection()
126 selection.page, in lookAtSelection()
128 paginatedView.model.getPageSize(selection.page) in lookAtSelection()
130 .setOverlay(selection.overlay) in lookAtSelection()
[all …]
/pdf/pdf-viewer/src/main/kotlin/androidx/pdf/view/
DSelectionModel.kt32 val selection: Selection, constant in androidx.pdf.view.SelectionModel
39 selection = textSelectionFromParcel(parcel, TextSelection::class.java.classLoader),
47 (selection as TextSelection).writeToParcel(dest, flags) in describeContents()
56 if (other.selection != selection) return false in equals()
63 var result = selection.hashCode() in hashCode()
/pdf/pdf-viewer/src/test/kotlin/androidx/pdf/view/
DSelectionStateManagerTest.kt103 assertThat(selectionModel?.selection).isInstanceOf(TextSelection::class.java) in <lambda>()
104 val selection = requireNotNull(selectionModel?.selection as TextSelection) in <lambda>() constant
105 assertThat(selection.bounds) in <lambda>()
119 assertThat(selection.text) in <lambda>()
150 assertThat(selectionModel?.selection).isInstanceOf(TextSelection::class.java) in <lambda>()
151 val selection = requireNotNull(selectionModel?.selection as TextSelection) in <lambda>() constant
152 assertThat(selection.bounds) in <lambda>()
166 assertThat(selection.text) in <lambda>()
297 val selection = selectionStateManager.selectionModel.value?.selection in <lambda>() constant
298 assertThat(selection).isInstanceOf(TextSelection::class.java) in <lambda>()
[all …]
DSelectionRendererTest.kt72 val selection = SelectionModel(textSelection, startBoundary, endBoundary) in drawSelectionOnPage_rtl() constant
76 renderer.drawSelectionOnPage(selection, pageNum = 0, canvasSpy, locationInView, currentZoom) in drawSelectionOnPage_rtl()
141 val selection = SelectionModel(textSelection, startBoundary, endBoundary) in drawSelectionOnPage_ltr() constant
145 renderer.drawSelectionOnPage(selection, pageNum = 0, canvasSpy, locationInView, currentZoom) in drawSelectionOnPage_ltr()
/pdf/pdf-document-service/src/main/kotlin/androidx/pdf/utils/
DcontentExtensions.kt38 android.graphics.pdf.models.selection.SelectionBoundary { in toAndroidClass()
40 point?.let { android.graphics.pdf.models.selection.SelectionBoundary(it) } in toAndroidClass()
41 ?: android.graphics.pdf.models.selection.SelectionBoundary(index) in toAndroidClass()
46 public fun android.graphics.pdf.models.selection.SelectionBoundary.toContentClass(): in toContentClass()
57 public fun android.graphics.pdf.models.selection.PageSelection.toContentClass(): PageSelection = in toContentClass()
/pdf/pdf-viewer/api/aidlRelease/current/androidx/pdf/models/
DPdfDocumentProvider.aidl44selection.PageSelection selectPageText(int pageNum, in android.graphics.pdf.models.selection.Selec… in selectPageText()
/pdf/pdf-document-service/api/aidlRelease/current/androidx/pdf/
DPdfDocumentRemote.aidl44selection.PageSelection selectPageText(int pageNum, in android.graphics.pdf.models.selection.Selec… in selectPageText()
/pdf/pdf-document-service/src/androidTest/kotlin/androidx/pdf/
DSandboxedPdfDocumentTest.kt194 val selection = document.getSelectionBounds(pageNumber, start, stop) in <lambda>() constant
197 assertThat(selection != null).isTrue() in <lambda>()
198 assertThat(selection!!.page == pageNumber).isTrue() in <lambda>()
199 assertThat(selection.selectedTextContents.size == 1).isTrue() in <lambda>()
200 assertThat(selection.selectedTextContents[0].text == expectedSelectedText).isTrue() in <lambda>()
223 val selection = document.getSelectionBounds(pageNumber, start, stop) in <lambda>() constant
225 assertThat(selection == null).isTrue() in <lambda>()
235 val selection = document.getSelectAllSelectionBounds(pageNumber)?.selectedTextContents in <lambda>() constant
238 assertNotNull(selection) in <lambda>()
240 assertThat(selection?.size == expectedSelection?.size) in <lambda>()
[all …]
/pdf/pdf-viewer/src/main/java/androidx/pdf/models/
DSelectionBoundary.java138 android.graphics.pdf.models.selection.@NonNull SelectionBoundary selectionBoundary, in convert()
155 public static android.graphics.pdf.models.selection.@NonNull SelectionBoundary convert( in convert()
159 return new android.graphics.pdf.models.selection.SelectionBoundary( in convert()
162 return new android.graphics.pdf.models.selection.SelectionBoundary( in convert()
/pdf/pdf-document-service/src/main/kotlin/androidx/pdf/adapter/
DPdfPage.kt26 import android.graphics.pdf.models.selection.PageSelection
27 import android.graphics.pdf.models.selection.SelectionBoundary
DPdfPagePreVAdapter.kt27 import android.graphics.pdf.models.selection.PageSelection
28 import android.graphics.pdf.models.selection.SelectionBoundary
DPdfPageAdapter.kt27 import android.graphics.pdf.models.selection.PageSelection
28 import android.graphics.pdf.models.selection.SelectionBoundary
/pdf/pdf-viewer/src/test/java/androidx/pdf/select/
DSelectionActionModeTest.java81 public @NonNull ObservableValue<PageSelection> selection() { in testStartActionMode()
118 when(mSelectionModel.selection()).thenReturn(mSelection); in testDestroyRemoveObserver()
125 verify(mSelectionModel.selection()).removeObserver(any()); in testDestroyRemoveObserver()
/pdf/pdf-viewer/src/main/java/androidx/pdf/select/
DSelectionActionMode.java69 mSelectionObserverKey = selectionModel.selection().addObserver( in SelectionActionMode()
89 mSelectionModel.selection().removeObserver(mSelectionObserverKey); in destroy()
194 PageSelection selection = Objects.requireNonNull(mSelectionModel.mSelection.get()); in chooseContentLocationForMenu() local
195 int selectionPage = selection.getPage(); in chooseContentLocationForMenu()
199 List<Rect> selectionBounds = selection.getRects(); in chooseContentLocationForMenu()
DSelectionModel.java41 public @NonNull ObservableValue<S> selection() { in selection() method in SelectionModel
/pdf/pdf-document-service/src/main/stableAidl/androidx/pdf/
DPdfDocumentRemote.aidl26 import android.graphics.pdf.models.selection.PageSelection;
27 import android.graphics.pdf.models.selection.SelectionBoundary;
/pdf/pdf-viewer/src/main/stableAidl/androidx/pdf/models/
DPdfDocumentProvider.aidl26 import android.graphics.pdf.models.selection.PageSelection;
27 import android.graphics.pdf.models.selection.SelectionBoundary;
/pdf/pdf-viewer/src/main/kotlin/androidx/pdf/service/
DPdfPageWrapper.kt27 import android.graphics.pdf.models.selection.PageSelection
28 import android.graphics.pdf.models.selection.SelectionBoundary
DPdfPageWrapperPreV.kt26 import android.graphics.pdf.models.selection.PageSelection
27 import android.graphics.pdf.models.selection.SelectionBoundary
DPdfPageWrapperPostV.kt26 import android.graphics.pdf.models.selection.PageSelection
27 import android.graphics.pdf.models.selection.SelectionBoundary
/pdf/pdf-document-service/src/main/kotlin/androidx/pdf/service/
DPdfDocumentRemoteImpl.kt26 import android.graphics.pdf.models.selection.PageSelection in <lambda>()
27 import android.graphics.pdf.models.selection.SelectionBoundary in <lambda>()

12