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

Unified 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, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfdoc/cpdf_annotlist.cpp ('k') | core/fpdfdoc/cpdf_pagelabel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfdoc/cpdf_apsettings.h
diff --git a/core/fpdfdoc/cpdf_apsettings.h b/core/fpdfdoc/cpdf_apsettings.h
new file mode 100644
index 0000000000000000000000000000000000000000..d2bca5c5ee1a821528a58deb5df2d330bdac367c
--- /dev/null
+++ b/core/fpdfdoc/cpdf_apsettings.h
@@ -0,0 +1,74 @@
+// Copyright 2016 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef CORE_FPDFDOC_CPDF_APSETTINGS_H_
+#define CORE_FPDFDOC_CPDF_APSETTINGS_H_
+
+#include "core/fxcrt/include/fx_string.h"
+#include "core/fxcrt/include/fx_system.h"
+#include "core/fxge/include/fx_dib.h"
+#include "core/fpdfdoc/include/cpdf_iconfit.h"
+
+class CPDF_Dictionary;
+class CPDF_FormControl;
+class CPDF_Stream;
+
+class CPDF_ApSettings {
+ public:
+ explicit CPDF_ApSettings(CPDF_Dictionary* pDict);
+
+ bool HasMKEntry(const CFX_ByteString& csEntry) const;
+ int GetRotation() const;
+
+ FX_ARGB GetBorderColor(int& iColorType) const {
+ return GetColor(iColorType, "BC");
+ }
+
+ FX_FLOAT GetOriginalBorderColor(int index) const {
+ return GetOriginalColor(index, "BC");
+ }
+
+ void GetOriginalBorderColor(int& iColorType, FX_FLOAT fc[4]) const {
+ GetOriginalColor(iColorType, fc, "BC");
+ }
+
+ FX_ARGB GetBackgroundColor(int& iColorType) const {
+ return GetColor(iColorType, "BG");
+ }
+
+ FX_FLOAT GetOriginalBackgroundColor(int index) const {
+ return GetOriginalColor(index, "BG");
+ }
+
+ void GetOriginalBackgroundColor(int& iColorType, FX_FLOAT fc[4]) const {
+ GetOriginalColor(iColorType, fc, "BG");
+ }
+
+ CFX_WideString GetNormalCaption() const { return GetCaption("CA"); }
+ CFX_WideString GetRolloverCaption() const { return GetCaption("RC"); }
+ CFX_WideString GetDownCaption() const { return GetCaption("AC"); }
+ CPDF_Stream* GetNormalIcon() const { return GetIcon("I"); }
+ CPDF_Stream* GetRolloverIcon() const { return GetIcon("RI"); }
+ CPDF_Stream* GetDownIcon() const { return GetIcon("IX"); }
+ CPDF_IconFit GetIconFit() const;
+ int GetTextPosition() const;
+
+ private:
+ friend class CPDF_FormControl;
+
+ FX_ARGB GetColor(int& iColorType, const CFX_ByteString& csEntry) const;
+ FX_FLOAT GetOriginalColor(int index, const CFX_ByteString& csEntry) const;
+ void GetOriginalColor(int& iColorType,
+ FX_FLOAT fc[4],
+ const CFX_ByteString& csEntry) const;
+
+ CFX_WideString GetCaption(const CFX_ByteString& csEntry) const;
+ CPDF_Stream* GetIcon(const CFX_ByteString& csEntry) const;
+
+ CPDF_Dictionary* const m_pDict;
+};
+
+#endif // CORE_FPDFDOC_CPDF_APSETTINGS_H_
« 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