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

Side by Side Diff: core/fpdfdoc/cpdf_apsettings.h

Issue 2183313004: Split fpdfdoc/include/fpdf_doc.h into individual classes. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: review feedback Created 4 years, 4 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
« no previous file with comments | « core/fpdfdoc/cpdf_annotlist.cpp ('k') | core/fpdfdoc/cpdf_pagelabel.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #ifndef CORE_FPDFDOC_CPDF_APSETTINGS_H_
8 #define CORE_FPDFDOC_CPDF_APSETTINGS_H_
9
10 #include "core/fxcrt/include/fx_string.h"
11 #include "core/fxcrt/include/fx_system.h"
12 #include "core/fxge/include/fx_dib.h"
13 #include "core/fpdfdoc/include/cpdf_iconfit.h"
14
15 class CPDF_Dictionary;
16 class CPDF_FormControl;
17 class CPDF_Stream;
18
19 class CPDF_ApSettings {
20 public:
21 explicit CPDF_ApSettings(CPDF_Dictionary* pDict);
22
23 bool HasMKEntry(const CFX_ByteString& csEntry) const;
24 int GetRotation() const;
25
26 FX_ARGB GetBorderColor(int& iColorType) const {
27 return GetColor(iColorType, "BC");
28 }
29
30 FX_FLOAT GetOriginalBorderColor(int index) const {
31 return GetOriginalColor(index, "BC");
32 }
33
34 void GetOriginalBorderColor(int& iColorType, FX_FLOAT fc[4]) const {
35 GetOriginalColor(iColorType, fc, "BC");
36 }
37
38 FX_ARGB GetBackgroundColor(int& iColorType) const {
39 return GetColor(iColorType, "BG");
40 }
41
42 FX_FLOAT GetOriginalBackgroundColor(int index) const {
43 return GetOriginalColor(index, "BG");
44 }
45
46 void GetOriginalBackgroundColor(int& iColorType, FX_FLOAT fc[4]) const {
47 GetOriginalColor(iColorType, fc, "BG");
48 }
49
50 CFX_WideString GetNormalCaption() const { return GetCaption("CA"); }
51 CFX_WideString GetRolloverCaption() const { return GetCaption("RC"); }
52 CFX_WideString GetDownCaption() const { return GetCaption("AC"); }
53 CPDF_Stream* GetNormalIcon() const { return GetIcon("I"); }
54 CPDF_Stream* GetRolloverIcon() const { return GetIcon("RI"); }
55 CPDF_Stream* GetDownIcon() const { return GetIcon("IX"); }
56 CPDF_IconFit GetIconFit() const;
57 int GetTextPosition() const;
58
59 private:
60 friend class CPDF_FormControl;
61
62 FX_ARGB GetColor(int& iColorType, const CFX_ByteString& csEntry) const;
63 FX_FLOAT GetOriginalColor(int index, const CFX_ByteString& csEntry) const;
64 void GetOriginalColor(int& iColorType,
65 FX_FLOAT fc[4],
66 const CFX_ByteString& csEntry) const;
67
68 CFX_WideString GetCaption(const CFX_ByteString& csEntry) const;
69 CPDF_Stream* GetIcon(const CFX_ByteString& csEntry) const;
70
71 CPDF_Dictionary* const m_pDict;
72 };
73
74 #endif // CORE_FPDFDOC_CPDF_APSETTINGS_H_
OLDNEW
« no previous file with comments | « core/fpdfdoc/cpdf_annotlist.cpp ('k') | core/fpdfdoc/cpdf_pagelabel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698