7#include "fpdfsdk/cpdfsdk_annotiteration.h"
11#include "fpdfsdk/cpdfsdk_annot.h"
12#include "fpdfsdk/cpdfsdk_pageview.h"
16 CPDFSDK_PageView* page_view) {
25 bool put_focused_annot_at_end) {
27 std::vector<CPDFSDK_Annot*> copied_list = page_view->GetAnnotList();
28 std::stable_sort(copied_list.begin(), copied_list.end(),
35 auto it =
std::find(copied_list.begin(), copied_list.end(), pTopMostAnnot);
36 if (it != copied_list.end()) {
37 copied_list.erase(it);
39 put_focused_annot_at_end ? copied_list.end() : copied_list.begin();
40 copied_list.insert(insert_it, pTopMostAnnot);
44 list_.reserve(copied_list.size());
45 for (
auto* pAnnot : copied_list)
46 list_.emplace_back(pAnnot);
CPDFSDK_AnnotIteration(CPDFSDK_PageView *page_view)
~CPDFSDK_AnnotIteration()
static CPDFSDK_AnnotIteration CreateForDrawing(CPDFSDK_PageView *page_view)
virtual int GetLayoutOrder() const
CPDFSDK_Annot * GetFocusAnnot()