本文整理汇总了C++中IFWL_Widget::GetOwnerApp方法的典型用法代码示例。如果您正苦于以下问题:C++ IFWL_Widget::GetOwnerApp方法的具体用法?C++ IFWL_Widget::GetOwnerApp怎么用?C++ IFWL_Widget::GetOwnerApp使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IFWL_Widget
的用法示例。
在下文中一共展示了IFWL_Widget::GetOwnerApp方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadWidget
bool CXFA_FFComboBox::LoadWidget() {
CFWL_ComboBox* pComboBox = new CFWL_ComboBox(GetFWLApp());
pComboBox->Initialize();
m_pNormalWidget = (CFWL_Widget*)pComboBox;
m_pNormalWidget->SetLayoutItem(this);
IFWL_Widget* pWidget = m_pNormalWidget->GetWidget();
CFWL_NoteDriver* pNoteDriver = pWidget->GetOwnerApp()->GetNoteDriver();
pNoteDriver->RegisterEventTarget(pWidget, pWidget);
m_pOldDelegate = m_pNormalWidget->GetDelegate();
m_pNormalWidget->SetDelegate(this);
m_pNormalWidget->LockUpdate();
CFX_WideStringArray wsLabelArray;
m_pDataAcc->GetChoiceListItems(wsLabelArray, false);
int32_t iItems = wsLabelArray.GetSize();
for (int32_t i = 0; i < iItems; i++) {
pComboBox->AddString(wsLabelArray[i].AsStringC());
}
CFX_Int32Array iSelArray;
m_pDataAcc->GetSelectedItems(iSelArray);
int32_t iSelCount = iSelArray.GetSize();
if (iSelCount > 0) {
pComboBox->SetCurSel(iSelArray[0]);
} else {
CFX_WideString wsText;
m_pDataAcc->GetValue(wsText, XFA_VALUEPICTURE_Raw);
pComboBox->SetEditText(wsText);
}
UpdateWidgetProperty();
m_pNormalWidget->UnlockUpdate();
return CXFA_FFField::LoadWidget();
}
示例2:
CXFA_FFListBox::~CXFA_FFListBox() {
if (m_pNormalWidget) {
IFWL_Widget* pWidget = m_pNormalWidget->GetWidget();
CFWL_NoteDriver* pNoteDriver = pWidget->GetOwnerApp()->GetNoteDriver();
pNoteDriver->UnregisterEventTarget(pWidget);
}
}
示例3: LoadWidget
bool CXFA_FFDateTimeEdit::LoadWidget() {
CFWL_DateTimePicker* pWidget = new CFWL_DateTimePicker(GetFWLApp());
pWidget->Initialize();
m_pNormalWidget = pWidget;
m_pNormalWidget->SetLayoutItem(this);
IFWL_Widget* pIWidget = m_pNormalWidget->GetWidget();
CFWL_NoteDriver* pNoteDriver = pIWidget->GetOwnerApp()->GetNoteDriver();
pNoteDriver->RegisterEventTarget(pIWidget, pIWidget);
m_pOldDelegate = m_pNormalWidget->GetDelegate();
m_pNormalWidget->SetDelegate(this);
m_pNormalWidget->LockUpdate();
CFX_WideString wsText;
m_pDataAcc->GetValue(wsText, XFA_VALUEPICTURE_Display);
pWidget->SetEditText(wsText);
if (CXFA_Value value = m_pDataAcc->GetFormValue()) {
switch (value.GetChildValueClassID()) {
case XFA_Element::Date: {
if (!wsText.IsEmpty()) {
CXFA_LocaleValue lcValue = XFA_GetLocaleValue(m_pDataAcc);
CFX_Unitime date = lcValue.GetDate();
if ((FX_UNITIME)date != 0) {
pWidget->SetCurSel(date.GetYear(), date.GetMonth(), date.GetDay());
}
}
} break;
default:
break;
}
}
UpdateWidgetProperty();
m_pNormalWidget->UnlockUpdate();
return CXFA_FFField::LoadWidget();
}
示例4: OnProcessMessageToForm
void CFWL_WidgetMgrDelegate::OnProcessMessageToForm(CFWL_Message* pMessage) {
if (!pMessage)
return;
if (!pMessage->m_pDstTarget)
return;
IFWL_Widget* pDstWidget = pMessage->m_pDstTarget;
IFWL_App* pApp = pDstWidget->GetOwnerApp();
if (!pApp)
return;
CFWL_NoteDriver* pNoteDriver =
static_cast<CFWL_NoteDriver*>(pApp->GetNoteDriver());
if (!pNoteDriver)
return;
if (m_pWidgetMgr->IsThreadEnabled())
pMessage = static_cast<CFWL_Message*>(pMessage->Clone());
if (m_pWidgetMgr->IsFormDisabled())
pNoteDriver->ProcessMessage(pMessage);
else
pNoteDriver->QueueMessage(pMessage);
#if (_FX_OS_ == _FX_MACOSX_)
CFWL_NoteLoop* pTopLoop = pNoteDriver->GetTopLoop();
if (pTopLoop)
pNoteDriver->UnqueueMessage(pTopLoop);
#endif
if (m_pWidgetMgr->IsThreadEnabled())
pMessage->Release();
return;
}
示例5: LoadWidget
bool CXFA_FFPushButton::LoadWidget() {
ASSERT(!m_pNormalWidget);
CFWL_PushButton* pPushButton = new CFWL_PushButton(GetFWLApp());
pPushButton->Initialize();
m_pOldDelegate = pPushButton->GetDelegate();
pPushButton->SetDelegate(this);
m_pNormalWidget = pPushButton;
m_pNormalWidget->SetLayoutItem(this);
IFWL_Widget* pWidget = m_pNormalWidget->GetWidget();
CFWL_NoteDriver* pNoteDriver = pWidget->GetOwnerApp()->GetNoteDriver();
pNoteDriver->RegisterEventTarget(pWidget, pWidget);
m_pNormalWidget->LockUpdate();
UpdateWidgetProperty();
LoadHighlightCaption();
m_pNormalWidget->UnlockUpdate();
return CXFA_FFField::LoadWidget();
}
示例6: LoadWidget
bool CXFA_FFCheckButton::LoadWidget() {
CFWL_CheckBox* pCheckBox = new CFWL_CheckBox(GetFWLApp());
pCheckBox->Initialize();
m_pNormalWidget = pCheckBox;
m_pNormalWidget->SetLayoutItem(this);
IFWL_Widget* pWidget = m_pNormalWidget->GetWidget();
CFWL_NoteDriver* pNoteDriver = pWidget->GetOwnerApp()->GetNoteDriver();
pNoteDriver->RegisterEventTarget(pWidget, pWidget);
m_pOldDelegate = m_pNormalWidget->GetDelegate();
m_pNormalWidget->SetDelegate(this);
if (m_pDataAcc->IsRadioButton())
pCheckBox->ModifyStylesEx(FWL_STYLEEXT_CKB_RadioButton, 0xFFFFFFFF);
m_pNormalWidget->LockUpdate();
UpdateWidgetProperty();
SetFWLCheckState(m_pDataAcc->GetCheckState());
m_pNormalWidget->UnlockUpdate();
return CXFA_FFField::LoadWidget();
}