153 CFWL_Barcode* pFWLBarcode = cppgc::MakeGarbageCollected<CFWL_Barcode>(
154 GetFWLApp()->GetHeap()->GetAllocationHandle(), GetFWLApp());
158 CFWL_NoteDriver* pNoteDriver = pFWLBarcode
->GetFWLApp()->GetNoteDriver();
160 m_pOldDelegate = pFWLBarcode->GetDelegate();
165 pFWLBarcode->SetText(m_pNode->GetValue(XFA_ValuePicture::kDisplay));
194 BC_TYPE bc_type = GetBarcodeTypeByName(barcode_->GetBarcodeType());
198 auto* pBarCodeWidget =
static_cast<CFWL_Barcode*>(GetNormalWidget());
199 pBarCodeWidget->SetType(bc_type);
201 absl::optional<WideString> encoding_string = barcode_->GetCharEncoding();
202 if (encoding_string.has_value()) {
203 absl::optional<BC_CHAR_ENCODING> encoding =
204 CharEncodingFromString(encoding_string.value());
205 if (encoding.has_value())
206 pBarCodeWidget->SetCharEncoding(encoding.value());
209 absl::optional<
bool> calcChecksum = barcode_->GetChecksum();
210 if (calcChecksum.has_value())
211 pBarCodeWidget->SetCalChecksum(calcChecksum.value());
213 absl::optional<int32_t> dataLen = barcode_->GetDataLength();
214 if (dataLen.has_value())
215 pBarCodeWidget->SetDataLength(dataLen.value());
217 absl::optional<
char> startChar = barcode_->GetStartChar();
218 if (startChar.has_value())
219 pBarCodeWidget->SetStartChar(startChar.value());
221 absl::optional<
char> endChar = barcode_->GetEndChar();
222 if (endChar.has_value())
223 pBarCodeWidget->SetEndChar(endChar.value());
225 absl::optional<int32_t> ecLevel = barcode_->GetECLevel();
226 if (ecLevel.has_value())
227 pBarCodeWidget->SetErrorCorrectionLevel(ecLevel.value());
229 absl::optional<int32_t> width = barcode_->GetModuleWidth();
230 if (width.has_value())
231 pBarCodeWidget->SetModuleWidth(width.value());
233 absl::optional<int32_t> height = barcode_->GetModuleHeight();
234 if (height.has_value())
235 pBarCodeWidget->SetModuleHeight(height.value());
237 absl::optional<
bool> printCheck = barcode_->GetPrintChecksum();
238 if (printCheck.has_value())
239 pBarCodeWidget->SetPrintChecksum(printCheck.value());
241 absl::optional<XFA_AttributeValue> text_attr = barcode_->GetTextLocation();
242 if (text_attr.has_value()) {
243 absl::optional<BC_TEXT_LOC> textLoc =
244 TextLocFromAttribute(text_attr.value());
245 if (textLoc.has_value())
246 pBarCodeWidget->SetTextLocation(textLoc.value());
251 absl::optional<int8_t> ratio = barcode_->GetWideNarrowRatio();
252 if (ratio.has_value())
253 pBarCodeWidget->SetWideNarrowRatio(ratio.value());
257 pBarCodeWidget->SetPrintChecksum(
true);
bool AcceptsFocusOnButtonDown(Mask< XFA_FWL_KeyFlag > dwFlags, const CFX_PointF &point, CFWL_MessageMouse::MouseCommand command) override
CXFA_FFTextEdit(CXFA_Node *pNode)
void UpdateWidgetProperty() override