summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/cfwl_barcode.h
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-10-31 12:50:04 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-31 12:50:04 -0700
commit42cb64572198bf8a72de9b18eae9f9dd9a07beb7 (patch)
treec27bd79fe9e1f6c79842c48ea07c9feb1faceb58 /xfa/fwl/core/cfwl_barcode.h
parent461b1d93f717e248ceb3c1e1bbb8285ba3258f8c (diff)
downloadpdfium-42cb64572198bf8a72de9b18eae9f9dd9a07beb7.tar.xz
Remove GetWidget() overrides
This Cl removes the various CFWL_*::GetWidget overrides and adds anonymous To* methods as needed. Review-Url: https://codereview.chromium.org/2467503003
Diffstat (limited to 'xfa/fwl/core/cfwl_barcode.h')
-rw-r--r--xfa/fwl/core/cfwl_barcode.h73
1 files changed, 14 insertions, 59 deletions
diff --git a/xfa/fwl/core/cfwl_barcode.h b/xfa/fwl/core/cfwl_barcode.h
index b610a27f51..06b52c2112 100644
--- a/xfa/fwl/core/cfwl_barcode.h
+++ b/xfa/fwl/core/cfwl_barcode.h
@@ -19,70 +19,25 @@ class CFWL_Barcode : public CFWL_Edit {
CFWL_Barcode(const IFWL_App*);
~CFWL_Barcode() override;
- IFWL_Barcode* GetWidget() override;
- const IFWL_Barcode* GetWidget() const override;
-
void Initialize();
void SetType(BC_TYPE type);
FX_BOOL IsProtectedType();
- void SetCharEncoding(BC_CHAR_ENCODING encoding) {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_CHARENCODING;
- m_barcodeData.m_eCharEncoding = encoding;
- }
- void SetModuleHeight(int32_t height) {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_MODULEHEIGHT;
- m_barcodeData.m_nModuleHeight = height;
- }
- void SetModuleWidth(int32_t width) {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_MODULEWIDTH;
- m_barcodeData.m_nModuleWidth = width;
- }
- void SetDataLength(int32_t dataLength) {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_DATALENGTH;
- m_barcodeData.m_nDataLength = dataLength;
- GetWidget()->SetLimit(dataLength);
- }
- void SetCalChecksum(FX_BOOL calChecksum) {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_CALCHECKSUM;
- m_barcodeData.m_bCalChecksum = calChecksum;
- }
- void SetPrintChecksum(FX_BOOL printChecksum) {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_PRINTCHECKSUM;
- m_barcodeData.m_bPrintChecksum = printChecksum;
- }
- void SetTextLocation(BC_TEXT_LOC location) {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_TEXTLOCATION;
- m_barcodeData.m_eTextLocation = location;
- }
- void SetWideNarrowRatio(int32_t ratio) {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_WIDENARROWRATIO;
- m_barcodeData.m_nWideNarrowRatio = ratio;
- }
- void SetStartChar(FX_CHAR startChar) {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_STARTCHAR;
- m_barcodeData.m_cStartChar = startChar;
- }
- void SetEndChar(FX_CHAR endChar) {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_ENDCHAR;
- m_barcodeData.m_cEndChar = endChar;
- }
- void SetVersion(int32_t version) {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_VERSION;
- m_barcodeData.m_nVersion = version;
- }
- void SetErrorCorrectionLevel(int32_t ecLevel) {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_ECLEVEL;
- m_barcodeData.m_nECLevel = ecLevel;
- }
- void SetTruncated(FX_BOOL truncated) {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_TRUNCATED;
- m_barcodeData.m_bTruncated = truncated;
- }
- void ResetBarcodeAttributes() {
- m_barcodeData.m_dwAttributeMask = FWL_BCDATTRIBUTE_NONE;
- }
+ void SetCharEncoding(BC_CHAR_ENCODING encoding);
+ void SetModuleHeight(int32_t height);
+ void SetModuleWidth(int32_t width);
+ void SetDataLength(int32_t dataLength);
+ void SetCalChecksum(FX_BOOL calChecksum);
+ void SetPrintChecksum(FX_BOOL printChecksum);
+ void SetTextLocation(BC_TEXT_LOC location);
+ void SetWideNarrowRatio(int32_t ratio);
+ void SetStartChar(FX_CHAR startChar);
+ void SetEndChar(FX_CHAR endChar);
+ void SetVersion(int32_t version);
+ void SetErrorCorrectionLevel(int32_t ecLevel);
+ void SetTruncated(FX_BOOL truncated);
+ void ResetBarcodeAttributes();
protected:
class CFWL_BarcodeDP : public IFWL_BarcodeDP {