Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(473)

Side by Side Diff: pdf/pdfium/pdfium_page.h

Issue 2924343005: Add functionality for copying text within form text fields and form combobox text fields (Closed)
Patch Set: Changed combobox selection and fix for text selection bug Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PDF_PDFIUM_PDFIUM_PAGE_H_ 5 #ifndef PDF_PDFIUM_PDFIUM_PAGE_H_
6 #define PDF_PDFIUM_PDFIUM_PAGE_H_ 6 #define PDF_PDFIUM_PDFIUM_PAGE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 uint32_t* out_len, 44 uint32_t* out_len,
45 double* out_font_size, 45 double* out_font_size,
46 pp::FloatRect* out_bounds); 46 pp::FloatRect* out_bounds);
47 // Get a unicode character from the page. 47 // Get a unicode character from the page.
48 uint32_t GetCharUnicode(int char_index); 48 uint32_t GetCharUnicode(int char_index);
49 // Get the bounds of a character in page pixels. 49 // Get the bounds of a character in page pixels.
50 pp::FloatRect GetCharBounds(int char_index); 50 pp::FloatRect GetCharBounds(int char_index);
51 51
52 enum Area { 52 enum Area {
53 NONSELECTABLE_AREA, 53 NONSELECTABLE_AREA,
54 TEXT_AREA, 54 TEXT_AREA, // Area contains regular, selectable text not
55 WEBLINK_AREA, // Area is a hyperlink. 55 // within form fields.
56 DOCLINK_AREA, // Area is a link to a different part of the same document. 56 WEBLINK_AREA, // Area is a hyperlink.
57 DOCLINK_AREA, // Area is a link to a different part of the same
58 // document.
59 FORM_TEXT_AREA, // Area is a form text field or form combobox text
60 // field.
57 }; 61 };
58 62
59 struct LinkTarget { 63 struct LinkTarget {
60 // We are using std::string here which have a copy contructor. 64 // We are using std::string here which have a copy contructor.
61 // That prevents us from using union here. 65 // That prevents us from using union here.
62 std::string url; // Valid for WEBLINK_AREA only. 66 std::string url; // Valid for WEBLINK_AREA only.
63 int page; // Valid for DOCLINK_AREA only. 67 int page; // Valid for DOCLINK_AREA only.
64 }; 68 };
65 69
66 // Given a point in the document that's in this page, returns its character 70 // Given a point in the document that's in this page, returns its character
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 int loading_count_; 143 int loading_count_;
140 pp::Rect rect_; 144 pp::Rect rect_;
141 bool calculated_links_; 145 bool calculated_links_;
142 std::vector<Link> links_; 146 std::vector<Link> links_;
143 bool available_; 147 bool available_;
144 }; 148 };
145 149
146 } // namespace chrome_pdf 150 } // namespace chrome_pdf
147 151
148 #endif // PDF_PDFIUM_PDFIUM_PAGE_H_ 152 #endif // PDF_PDFIUM_PDFIUM_PAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698