本文整理汇总了C++中FX_WSTRC函数的典型用法代码示例。如果您正苦于以下问题:C++ FX_WSTRC函数的具体用法?C++ FX_WSTRC怎么用?C++ FX_WSTRC使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了FX_WSTRC函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FXSYS_assert
void CXFA_ResolveProcessor::XFA_ResolveNode_DoPredicateFilter(
int32_t iCurIndex,
CFX_WideString wsCondition,
int32_t iFoundCount,
CXFA_ResolveNodesData& rnd) {
CXFA_NodeArray& findNodes = (CXFA_NodeArray&)rnd.m_Nodes;
FXSYS_assert(iFoundCount == findNodes.GetSize());
CFX_WideString wsExpression;
IXFA_ScriptContext* pContext = NULL;
XFA_SCRIPTLANGTYPE eLangType = XFA_SCRIPTLANGTYPE_Unkown;
if (wsCondition.Left(2) == FX_WSTRC(L".[") &&
wsCondition.Right(1) == FX_WSTRC(L"]")) {
eLangType = XFA_SCRIPTLANGTYPE_Formcalc;
} else if (wsCondition.Left(2) == FX_WSTRC(L".(") &&
wsCondition.Right(1) == FX_WSTRC(L")")) {
eLangType = XFA_SCRIPTLANGTYPE_Javascript;
} else {
return;
}
pContext = rnd.m_pSC;
wsExpression = wsCondition.Mid(2, wsCondition.GetLength() - 3);
for (int32_t i = iFoundCount - 1; i >= 0; i--) {
CXFA_Object* node = findNodes[i];
FX_BOOL bRet = FALSE;
FXJSE_HVALUE pRetValue = FXJSE_Value_Create(rnd.m_pSC->GetRuntime());
bRet = pContext->RunScript(eLangType, wsExpression, pRetValue, node);
if (!bRet || !FXJSE_Value_ToBoolean(pRetValue)) {
findNodes.RemoveAt(i);
}
FXJSE_Value_Release(pRetValue);
}
}
示例2: DoDeactivate
FX_BOOL CFWL_NoteDriver::DoDeactivate(CFWL_MsgDeactivate* pMsg,
IFWL_Widget* pMessageForm) {
if (m_bFullScreen) {
return FALSE;
}
int32_t iTrackLoop = m_noteLoopQueue.GetSize();
if (iTrackLoop <= 0)
return FALSE;
if (iTrackLoop == 1) {
if (pMessageForm->IsInstance(FX_WSTRC(L"FWL_FORMPROXY"))) {
return FALSE;
}
if (pMsg->m_pSrcTarget &&
pMsg->m_pSrcTarget->IsInstance(FX_WSTRC(L"FWL_FORMPROXY"))) {
return FALSE;
}
if (pMsg->m_pSrcTarget && pMsg->m_pSrcTarget->GetClassID() == 1111984755) {
return FALSE;
}
return TRUE;
}
IFWL_Widget* pDst = pMsg->m_pDstTarget;
if (!pDst)
return FALSE;
#if (_FX_OS_ == _FX_MACOSX_)
if (pDst == pMessageForm && pDst->IsInstance(L"FWL_FORMPROXY")) {
return TRUE;
}
#endif
return pDst != pMessageForm &&
!pDst->IsInstance(FX_WSTRC(L"FWL_FORMPROXY")) &&
!pMessageForm->IsInstance(FX_WSTRC(L"FWL_FORMPROXY"));
}
示例3: switch
void CXFA_FMRelationalExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
switch (m_op) {
case TOKlt:
case TOKkslt:
javascript << gs_lpStrExpFuncName[LESS];
break;
case TOKgt:
case TOKksgt:
javascript << gs_lpStrExpFuncName[GREATER];
break;
case TOKle:
case TOKksle:
javascript << gs_lpStrExpFuncName[LESSEQUAL];
break;
case TOKge:
case TOKksge:
javascript << gs_lpStrExpFuncName[GREATEREQUAL];
break;
default:
ASSERT(FALSE);
break;
}
javascript << FX_WSTRC(L"(");
m_pExp1->ToJavaScript(javascript);
javascript << FX_WSTRC(L", ");
m_pExp2->ToJavaScript(javascript);
javascript << FX_WSTRC(L")");
}
示例4: tempStr
void CXFA_FMStringExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
CFX_WideString tempStr(m_wsString);
if (tempStr.GetLength() > 2) {
javascript.AppendChar(L'\"');
FX_WCHAR oneChar;
for (int16_t i = 1; i < tempStr.GetLength() - 1; i++) {
oneChar = tempStr[i];
switch (oneChar) {
case L'\"': {
i++;
javascript << FX_WSTRC(L"\\\"");
} break;
case 0x0d:
break;
case 0x0a: {
javascript << FX_WSTRC(L"\\n");
} break;
default: { javascript.AppendChar(oneChar); } break;
}
}
javascript.AppendChar(L'\"');
} else {
javascript << tempStr;
}
}
示例5: GetFontInfo
FX_BOOL CXFA_FFConfigAcc::GetFontInfo(int32_t index,
CFX_WideString& wsFontFamily,
CFX_WideString& wsPsName,
FX_BOOL bBold,
FX_BOOL bItalic) {
if (index < 0 || index >= CountChildren()) {
return FALSE;
}
CXFA_Node* pFontNode = m_pPsMapNode->GetChild(index, XFA_ELEMENT_Font);
if (pFontNode == NULL) {
return FALSE;
}
wsFontFamily.Empty();
wsPsName.Empty();
bBold = FALSE;
bItalic = FALSE;
pFontNode->GetAttribute(XFA_ATTRIBUTE_Typeface, wsFontFamily);
pFontNode->GetAttribute(XFA_ATTRIBUTE_PsName, wsPsName);
CFX_WideString wsValue;
pFontNode->GetAttribute(XFA_ATTRIBUTE_Weight, wsValue);
wsValue.MakeLower();
if (wsValue == FX_WSTRC(L"bold")) {
bBold = TRUE;
}
pFontNode->GetAttribute(XFA_ATTRIBUTE_Posture, wsValue);
wsValue.MakeLower();
if (wsValue == FX_WSTRC(L"italic")) {
bItalic = TRUE;
}
return wsFontFamily.GetLength() > 0;
}
示例6: FX_WSTRC
void CXFA_FFDocView::ShowNullTestMsg() {
int32_t iCount = m_arrNullTestMsg.GetSize();
CXFA_FFApp* pApp = m_pDoc->GetApp();
IXFA_AppProvider* pAppProvider = pApp->GetAppProvider();
if (pAppProvider && iCount) {
int32_t iRemain = iCount > 7 ? iCount - 7 : 0;
iCount -= iRemain;
CFX_WideString wsMsg;
for (int32_t i = 0; i < iCount; i++) {
wsMsg += m_arrNullTestMsg[i] + FX_WSTRC(L"\n");
}
if (iRemain > 0) {
CFX_WideString wsLimit;
pAppProvider->LoadString(XFA_IDS_ValidateLimit, wsLimit);
if (!wsLimit.IsEmpty()) {
CFX_WideString wsTemp;
wsTemp.Format((const FX_WCHAR*)wsLimit, iRemain);
wsMsg += FX_WSTRC(L"\n") + wsTemp;
}
}
CFX_WideString wsTitle;
pAppProvider->LoadString(XFA_IDS_AppName, wsTitle);
pAppProvider->MsgBox(wsMsg, wsTitle, XFA_MBICON_Status, XFA_MB_OK);
}
m_arrNullTestMsg.RemoveAll();
}
示例7: FX_WSTRC
void CXFA_FMWhileExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
javascript << RUNTIMEFUNCTIONRETURNVALUE;
javascript << FX_WSTRC(L" = 0;\n");
javascript << FX_WSTRC(L"while (");
m_pCondition->ToJavaScript(javascript);
javascript << FX_WSTRC(L")\n");
m_pExpression->ToImpliedReturnJS(javascript);
}
示例8: FX_WSTRC
void CXFA_FMLogicalAndExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
javascript << gs_lpStrExpFuncName[LOGICALAND];
javascript << FX_WSTRC(L"(");
m_pExp1->ToJavaScript(javascript);
javascript << FX_WSTRC(L", ");
m_pExp2->ToJavaScript(javascript);
javascript << FX_WSTRC(L")");
}
示例9: FXCRT_GetFileModeString
void FXCRT_GetFileModeString(FX_DWORD dwModes, CFX_WideString &wsMode)
{
if (dwModes & FX_FILEMODE_ReadOnly) {
wsMode = FX_WSTRC(L"rb");
} else if (dwModes & FX_FILEMODE_Truncate) {
wsMode = FX_WSTRC(L"w+b");
} else {
wsMode = FX_WSTRC(L"a+b");
}
}
示例10: FX_WSTRC
void CXFA_FMBlockExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
javascript << FX_WSTRC(L"{\n");
if (m_pExpressionList) {
for (int i = 0; i < m_pExpressionList->GetSize(); ++i) {
CXFA_FMExpression* e =
reinterpret_cast<CXFA_FMExpression*>(m_pExpressionList->GetAt(i));
e->ToJavaScript(javascript);
}
}
javascript << FX_WSTRC(L"}\n");
}
示例11: ThrowScriptErrorMessage
FX_BOOL CScript_HostPseudoModel::Script_HostPseudoModel_ValidateArgsForMsg(
CFXJSE_Arguments* pArguments,
int32_t iArgIndex,
CFX_WideString& wsValue) {
if (pArguments == NULL || iArgIndex < 0) {
return FALSE;
}
FX_BOOL bIsJsType = FALSE;
if (m_pDocument->GetScriptContext()->GetType() ==
XFA_SCRIPTLANGTYPE_Javascript) {
bIsJsType = TRUE;
}
FXJSE_HVALUE hValueArg = pArguments->GetValue(iArgIndex);
if (!FXJSE_Value_IsUTF8String(hValueArg) && bIsJsType) {
ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
FXJSE_Value_Release(hValueArg);
return FALSE;
}
if (FXJSE_Value_IsNull(hValueArg)) {
wsValue = FX_WSTRC(L"");
} else {
CFX_ByteString byMessage;
FXJSE_Value_ToUTF8String(hValueArg, byMessage);
wsValue = CFX_WideString::FromUTF8(byMessage, byMessage.GetLength());
}
FXJSE_Value_Release(hValueArg);
return TRUE;
}
示例12: XFA_DataDescription_MaybeCreateDataNode
CXFA_Node* XFA_DataDescription_MaybeCreateDataNode(
CXFA_Document* pDocument,
CXFA_Node* pDataParent,
XFA_Element eNodeType,
const CFX_WideString& wsName) {
if (!pDataParent) {
return nullptr;
}
CXFA_Node* pParentDDNode = pDataParent->GetDataDescriptionNode();
if (!pParentDDNode) {
CXFA_Node* pDataNode =
pDocument->CreateNode(XFA_XDPPACKET_Datasets, eNodeType);
ASSERT(pDataNode);
pDataNode->SetCData(XFA_ATTRIBUTE_Name, wsName);
pDataNode->CreateXMLMappingNode();
pDataParent->InsertChild(pDataNode);
pDataNode->SetFlag(XFA_NodeFlag_Initialized, false);
return pDataNode;
} else {
CXFA_NodeIteratorTemplate<CXFA_Node, CXFA_TraverseStrategy_DDGroup>
sIterator(pParentDDNode);
for (CXFA_Node* pDDGroupNode = sIterator.GetCurrent(); pDDGroupNode;
pDDGroupNode = sIterator.MoveToNext()) {
if (pDDGroupNode != pParentDDNode) {
if (pDDGroupNode->GetElementType() != XFA_Element::DataGroup) {
continue;
}
CFX_WideString wsNamespace;
if (!pDDGroupNode->TryNamespace(wsNamespace) ||
wsNamespace != FX_WSTRC(L"http://ns.adobe.com/data-description/")) {
continue;
}
}
CXFA_Node* pDDNode =
pDDGroupNode->GetFirstChildByName(wsName.AsStringC());
if (!pDDNode) {
continue;
}
if (pDDNode->GetElementType() != eNodeType) {
break;
}
CXFA_Node* pDataNode =
pDocument->CreateNode(XFA_XDPPACKET_Datasets, eNodeType);
ASSERT(pDataNode);
pDataNode->SetCData(XFA_ATTRIBUTE_Name, wsName);
pDataNode->CreateXMLMappingNode();
if (eNodeType == XFA_Element::DataValue &&
pDDNode->GetEnum(XFA_ATTRIBUTE_Contains) ==
XFA_ATTRIBUTEENUM_MetaData) {
pDataNode->SetEnum(XFA_ATTRIBUTE_Contains, XFA_ATTRIBUTEENUM_MetaData);
}
pDataParent->InsertChild(pDataNode);
pDataNode->SetDataDescriptionNode(pDDNode);
pDataNode->SetFlag(XFA_NodeFlag_Initialized, false);
return pDataNode;
}
return nullptr;
}
}
示例13: XFA_GetRelevant
FX_DWORD XFA_GetRelevant(CXFA_Node* pFormItem, FX_DWORD dwParentRelvant) {
FX_DWORD dwRelevant = XFA_LAYOUTSTATUS_Viewable | XFA_LAYOUTSTATUS_Printable;
CFX_WideStringC wsRelevant;
if (pFormItem->TryCData(XFA_ATTRIBUTE_Relevant, wsRelevant)) {
if (wsRelevant == FX_WSTRC(L"+print") || wsRelevant == FX_WSTRC(L"print")) {
dwRelevant &= ~XFA_LAYOUTSTATUS_Viewable;
} else if (wsRelevant == FX_WSTRC(L"-print")) {
dwRelevant &= ~XFA_LAYOUTSTATUS_Printable;
}
}
if (!(dwParentRelvant & XFA_LAYOUTSTATUS_Viewable) &&
(dwRelevant != XFA_LAYOUTSTATUS_Viewable)) {
dwRelevant &= ~XFA_LAYOUTSTATUS_Viewable;
}
if (!(dwParentRelvant & XFA_LAYOUTSTATUS_Printable) &&
(dwRelevant != XFA_LAYOUTSTATUS_Printable)) {
dwRelevant &= ~XFA_LAYOUTSTATUS_Printable;
}
return dwRelevant;
}
示例14: IsAbleNative
FX_BOOL CFWL_WidgetMgr::IsAbleNative(IFWL_Widget* pWidget) const {
if (!pWidget)
return FALSE;
if (!pWidget->IsInstance(FX_WSTRC(FWL_CLASS_Form))) {
return FALSE;
}
uint32_t dwStyles = pWidget->GetStyles();
return ((dwStyles & FWL_WGTSTYLE_WindowTypeMask) ==
FWL_WGTSTYLE_OverLapper) ||
(dwStyles & FWL_WGTSTYLE_Popup);
}
示例15: InitTTO
FX_ERR CFWL_WidgetTP::InitTTO() {
if (m_pTextOut) {
return FWL_ERR_Succeeded;
}
m_pFDEFont =
CFWL_FontManager::GetInstance()->FindFont(FX_WSTRC(L"Helvetica"), 0, 0);
m_pTextOut = IFDE_TextOut::Create();
m_pTextOut->SetFont(m_pFDEFont);
m_pTextOut->SetFontSize(FWLTHEME_CAPACITY_FontSize);
m_pTextOut->SetTextColor(FWLTHEME_CAPACITY_TextColor);
m_pTextOut->SetEllipsisString(L"...");
return FWL_ERR_Succeeded;
}