Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cfx_csscomputedstyle.h
Go to the documentation of this file.
1// Copyright 2017 The PDFium Authors
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_FXCRT_CSS_CFX_CSSCOMPUTEDSTYLE_H_
8#define CORE_FXCRT_CSS_CFX_CSSCOMPUTEDSTYLE_H_
9
10#include <vector>
11
12#include "core/fxcrt/css/cfx_css.h"
13#include "core/fxcrt/css/cfx_csscustomproperty.h"
14#include "core/fxcrt/mask.h"
15#include "core/fxcrt/retain_ptr.h"
16#include "core/fxcrt/widestring.h"
17#include "core/fxge/dib/fx_dib.h"
18#include "third_party/abseil-cpp/absl/types/optional.h"
19
20class CFX_CSSValueList;
21
22class CFX_CSSComputedStyle final : public Retainable {
23 public:
41
61
63
65 uint16_t GetFontWeight() const;
68 float GetFontSize() const;
69 FX_ARGB GetColor() const;
70 void SetFontWeight(uint16_t wFontWeight);
71 void SetFontVariant(CFX_CSSFontVariant eFontVariant);
72 void SetFontStyle(CFX_CSSFontStyle eFontStyle);
73 void SetFontSize(float fFontSize);
74 void SetColor(FX_ARGB dwFontColor);
75
76 const CFX_CSSRect* GetBorderWidth() const;
77 const CFX_CSSRect* GetMarginWidth() const;
78 const CFX_CSSRect* GetPaddingWidth() const;
79 void SetMarginWidth(const CFX_CSSRect& rect);
80 void SetPaddingWidth(const CFX_CSSRect& rect);
81
83
84 float GetLineHeight() const;
85 const CFX_CSSLength& GetTextIndent() const;
88 float GetNumberVerticalAlign() const;
90 const CFX_CSSLength& GetLetterSpacing() const;
91 void SetLineHeight(float fLineHeight);
92 void SetTextIndent(const CFX_CSSLength& textIndent);
93 void SetTextAlign(CFX_CSSTextAlign eTextAlign);
94 void SetNumberVerticalAlign(float fAlign);
95 void SetTextDecoration(Mask<CFX_CSSTEXTDECORATION> dwTextDecoration);
96 void SetLetterSpacing(const CFX_CSSLength& letterSpacing);
97 void AddCustomStyle(const CFX_CSSCustomProperty& prop);
98
99 bool GetCustomStyle(const WideString& wsName, WideString* pValue) const;
100
103
104 private:
105 CFX_CSSComputedStyle();
107
108 std::vector<CFX_CSSCustomProperty> m_CustomProperties;
109};
110
111#endif // CORE_FXCRT_CSS_CFX_CSSCOMPUTEDSTYLE_H_
CFX_CSSFontVariant
Definition cfx_css.h:82
CFX_CSSFontStyle
Definition cfx_css.h:57
CFX_CSSDisplay
Definition cfx_css.h:48
CFX_CSSVerticalAlign
Definition cfx_css.h:70
CFX_CSSTextAlign
Definition cfx_css.h:62
CFX_CSSLengthUnit
Definition cfx_css.h:40
CFX_CSSTEXTDECORATION
Definition cfx_css.h:87
RetainPtr< CFX_CSSValueList > m_pFontFamily
Mask< CFX_CSSTEXTDECORATION > m_dwTextDecoration
void SetTextAlign(CFX_CSSTextAlign eTextAlign)
void SetNumberVerticalAlign(float fAlign)
void SetMarginWidth(const CFX_CSSRect &rect)
void SetTextDecoration(Mask< CFX_CSSTEXTDECORATION > dwTextDecoration)
void SetTextIndent(const CFX_CSSLength &textIndent)
const CFX_CSSRect * GetBorderWidth() const
void SetPaddingWidth(const CFX_CSSRect &rect)
void SetFontWeight(uint16_t wFontWeight)
void SetFontVariant(CFX_CSSFontVariant eFontVariant)
void SetFontStyle(CFX_CSSFontStyle eFontStyle)
void SetColor(FX_ARGB dwFontColor)
void SetFontSize(float fFontSize)
const CFX_CSSLength & GetTextIndent() const
void AddCustomStyle(const CFX_CSSCustomProperty &prop)
NonInheritedData m_NonInheritedData
CFX_CSSVerticalAlign GetVerticalAlign() const
Mask< CFX_CSSTEXTDECORATION > GetTextDecoration() const
CFX_CSSFontStyle GetFontStyle() const
CFX_CSSFontVariant GetFontVariant() const
const CFX_CSSRect * GetMarginWidth() const
absl::optional< WideString > GetLastFontFamily() const
~CFX_CSSComputedStyle() override
const CFX_CSSLength & GetLetterSpacing() const
CFX_CSSTextAlign GetTextAlign() const
bool GetCustomStyle(const WideString &wsName, WideString *pValue) const
CFX_CSSDisplay GetDisplay() const
void SetLetterSpacing(const CFX_CSSLength &letterSpacing)
const CFX_CSSRect * GetPaddingWidth() const
void SetLineHeight(float fLineHeight)
CFX_CSSLength(CFX_CSSLengthUnit eUnit, float fValue)
Definition cfx_css.h:100
CFX_CSSRect(CFX_CSSLengthUnit eUnit, float val)
Definition cfx_css.h:128
#define CONSTRUCT_VIA_MAKE_RETAIN
Definition retain_ptr.h:224