|
@@ -9,6 +9,7 @@
|
|
|
|
|
|
package com.compdfkit.tools.common.contextmenu;
|
|
|
|
|
|
+import android.graphics.Bitmap;
|
|
|
import android.graphics.PointF;
|
|
|
import android.graphics.RectF;
|
|
|
import android.os.Bundle;
|
|
@@ -32,6 +33,7 @@ import com.compdfkit.tools.common.contextmenu.impl.CLongPressContextMenuView;
|
|
|
import com.compdfkit.tools.common.contextmenu.impl.CMarkupContextMenuView;
|
|
|
import com.compdfkit.tools.common.contextmenu.impl.CPushButtonContextMenuView;
|
|
|
import com.compdfkit.tools.common.contextmenu.impl.CRadioButtonContextMenuView;
|
|
|
+import com.compdfkit.tools.common.contextmenu.impl.CScreenShotContextMenuView;
|
|
|
import com.compdfkit.tools.common.contextmenu.impl.CSearchReplaceContextMenuView;
|
|
|
import com.compdfkit.tools.common.contextmenu.impl.CSelectContentContextMenuView;
|
|
|
import com.compdfkit.tools.common.contextmenu.impl.CShapeContextMenuView;
|
|
@@ -52,6 +54,7 @@ import com.compdfkit.tools.common.contextmenu.interfaces.ContextMenuListBoxProvi
|
|
|
import com.compdfkit.tools.common.contextmenu.interfaces.ContextMenuLongPressProvider;
|
|
|
import com.compdfkit.tools.common.contextmenu.interfaces.ContextMenuMarkupProvider;
|
|
|
import com.compdfkit.tools.common.contextmenu.interfaces.ContextMenuRadioButtonProvider;
|
|
|
+import com.compdfkit.tools.common.contextmenu.interfaces.ContextMenuScreenShotProvider;
|
|
|
import com.compdfkit.tools.common.contextmenu.interfaces.ContextMenuSearchReplaceProvider;
|
|
|
import com.compdfkit.tools.common.contextmenu.interfaces.ContextMenuSelectContentProvider;
|
|
|
import com.compdfkit.tools.common.contextmenu.interfaces.ContextMenuSoundContentProvider;
|
|
@@ -287,6 +290,14 @@ public class CPDFContextMenuHelper extends CPDFContextMenuShowHelper {
|
|
|
return super.getSearchReplaceContentView(cpdfPageView, layoutInflater);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public View getScreenShotContentView(CPDFPageView cpdfPageView, LayoutInflater layoutInflater, RectF rectF) {
|
|
|
+ if (helperParams.screenShotProvider != null){
|
|
|
+ return helperParams.screenShotProvider.getScreenShotContentView(this, cpdfPageView, layoutInflater, rectF);
|
|
|
+ }
|
|
|
+ return super.getScreenShotContentView(cpdfPageView, layoutInflater, rectF);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public void dismissContextMenu() {
|
|
|
if (popupWindow != null) {
|
|
@@ -451,6 +462,11 @@ public class CPDFContextMenuHelper extends CPDFContextMenuShowHelper {
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
+ public Builder setScreenShotContextMenu(ContextMenuScreenShotProvider screenShotProvider){
|
|
|
+ this.params.screenShotProvider = screenShotProvider;
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
public CPDFContextMenuHelper create(CPDFViewCtrl pdfView){
|
|
|
return new CPDFContextMenuHelper(pdfView, params);
|
|
|
}
|
|
@@ -466,6 +482,7 @@ public class CPDFContextMenuHelper extends CPDFContextMenuShowHelper {
|
|
|
params.stampProvider = new CStampContextMenuView();
|
|
|
params.linkProvider = new CLinkContextMenuView();
|
|
|
params.searchReplaceProvider = new CSearchReplaceContextMenuView();
|
|
|
+ params.screenShotProvider = new CScreenShotContextMenuView();
|
|
|
return this;
|
|
|
}
|
|
|
|
|
@@ -478,6 +495,7 @@ public class CPDFContextMenuHelper extends CPDFContextMenuShowHelper {
|
|
|
params.formSignatureProvider = new CSignatureContextMenuView();
|
|
|
params.pushButtonProvider = new CPushButtonContextMenuView();
|
|
|
params.selectContentProvider = new CopyContextMenuView();
|
|
|
+ params.screenShotProvider = new CScreenShotContextMenuView();
|
|
|
return this;
|
|
|
}
|
|
|
}
|