diff options
Diffstat (limited to 'xfa/src/fwl')
-rw-r--r-- | xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp | 155 | ||||
-rw-r--r-- | xfa/src/fwl/src/basewidget/fwl_datetimepickerimp.cpp | 34 | ||||
-rw-r--r-- | xfa/src/fwl/src/basewidget/include/fwl_comboboximp.h | 52 | ||||
-rw-r--r-- | xfa/src/fwl/src/basewidget/include/fwl_datetimepickerimp.h | 20 | ||||
-rw-r--r-- | xfa/src/fwl/src/core/fwl_formimp.cpp | 32 | ||||
-rw-r--r-- | xfa/src/fwl/src/core/fwl_gridimp.cpp | 16 | ||||
-rw-r--r-- | xfa/src/fwl/src/core/include/fwl_formimp.h | 8 | ||||
-rw-r--r-- | xfa/src/fwl/src/core/include/fwl_gridimp.h | 6 |
8 files changed, 166 insertions, 157 deletions
diff --git a/xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp b/xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp index 0390ef60cc..9e389800ed 100644 --- a/xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp +++ b/xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp @@ -135,20 +135,22 @@ FWL_ERR IFWL_ComboBox::EditModifyStylesEx(FX_DWORD dwStylesExAdded, return ((CFWL_ComboBoxImp*)m_pImpl)
->EditModifyStylesEx(dwStylesExAdded, dwStylesExRemoved);
}
-CFWL_ComboEdit::CFWL_ComboEdit(IFWL_Widget* pOuter) : CFWL_EditImp(pOuter) {
+CFWL_ComboEditImp::CFWL_ComboEditImp(IFWL_Widget* pOuter)
+ : CFWL_EditImp(pOuter) {
FXSYS_assert(pOuter != NULL);
m_pOuter = (CFWL_ComboBoxImp*)(((IFWL_TargetData*)pOuter)->GetData());
}
-CFWL_ComboEdit::CFWL_ComboEdit(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter)
+CFWL_ComboEditImp::CFWL_ComboEditImp(const CFWL_WidgetImpProperties& properties,
+ IFWL_Widget* pOuter)
: CFWL_EditImp(properties, pOuter) {
FXSYS_assert(pOuter != NULL);
m_pOuter = (CFWL_ComboBoxImp*)(((IFWL_TargetData*)pOuter)->GetData());
}
-CFWL_ComboEditDelegate::CFWL_ComboEditDelegate(CFWL_ComboEdit* pOwner)
- : CFWL_EditImpDelegate(pOwner), m_pOwner(pOwner) {}
-int32_t CFWL_ComboEditDelegate::OnProcessMessage(CFWL_Message* pMessage) {
+CFWL_ComboEditImpDelegate::CFWL_ComboEditImpDelegate(CFWL_ComboEditImp* pOwner)
+ : CFWL_EditImpDelegate(pOwner), m_pOwner(pOwner) {
+}
+int32_t CFWL_ComboEditImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
_FWL_RETURN_VALUE_IF_FAIL(pMessage, 0);
FX_DWORD dwMsgCode = pMessage->GetClassID();
FX_BOOL backDefault = TRUE;
@@ -179,19 +181,19 @@ int32_t CFWL_ComboEditDelegate::OnProcessMessage(CFWL_Message* pMessage) { }
return CFWL_EditImpDelegate::OnProcessMessage(pMessage);
}
-void CFWL_ComboEdit::ClearSelected() {
+void CFWL_ComboEditImp::ClearSelected() {
ClearSelections();
Repaint(&m_rtClient);
}
-void CFWL_ComboEdit::SetSelected() {
+void CFWL_ComboEditImp::SetSelected() {
FlagFocus(TRUE);
EndCaret();
AddSelRange(0);
}
-void CFWL_ComboEdit::EndCaret() {
+void CFWL_ComboEditImp::EndCaret() {
m_pEdtEngine->MoveCaretPos(MC_End);
}
-void CFWL_ComboEdit::FlagFocus(FX_BOOL bSet) {
+void CFWL_ComboEditImp::FlagFocus(FX_BOOL bSet) {
if (bSet) {
m_pProperties->m_dwStates |= FWL_WGTSTATE_Focused;
} else {
@@ -199,36 +201,36 @@ void CFWL_ComboEdit::FlagFocus(FX_BOOL bSet) { ShowCaret(FALSE);
}
};
-void CFWL_ComboEdit::SetComboBoxFocus(FX_BOOL bSet) {
+void CFWL_ComboEditImp::SetComboBoxFocus(FX_BOOL bSet) {
m_pOuter->SetFocus(bSet);
}
-CFWL_ComboList::CFWL_ComboList(IFWL_Widget* pOuter)
+CFWL_ComboListImp::CFWL_ComboListImp(IFWL_Widget* pOuter)
: CFWL_ListBoxImp(pOuter), m_bNotifyOwner(TRUE) {
FXSYS_assert(pOuter != NULL);
}
-CFWL_ComboList::CFWL_ComboList(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter)
+CFWL_ComboListImp::CFWL_ComboListImp(const CFWL_WidgetImpProperties& properties,
+ IFWL_Widget* pOuter)
: CFWL_ListBoxImp(properties, pOuter), m_bNotifyOwner(TRUE) {
FXSYS_assert(pOuter != NULL);
}
-FWL_ERR CFWL_ComboList::Initialize() {
+FWL_ERR CFWL_ComboListImp::Initialize() {
_FWL_ERR_CHECK_RETURN_VALUE_IF_FAIL(CFWL_ListBoxImp::Initialize(),
FWL_ERR_Indefinite);
if (m_pDelegate) {
- delete (CFWL_ComboListDelegate*)m_pDelegate;
+ delete (CFWL_ComboListImpDelegate*)m_pDelegate;
m_pDelegate = NULL;
}
- m_pDelegate = (IFWL_WidgetDelegate*)new CFWL_ComboListDelegate(this);
+ m_pDelegate = (IFWL_WidgetDelegate*)new CFWL_ComboListImpDelegate(this);
return FWL_ERR_Succeeded;
}
-FWL_ERR CFWL_ComboList::Finalize() {
+FWL_ERR CFWL_ComboListImp::Finalize() {
if (m_pDelegate) {
- delete (CFWL_ComboListDelegate*)m_pDelegate;
+ delete (CFWL_ComboListImpDelegate*)m_pDelegate;
m_pDelegate = NULL;
}
return CFWL_ListBoxImp::Finalize();
}
-int32_t CFWL_ComboList::MatchItem(const CFX_WideString& wsMatch) {
+int32_t CFWL_ComboListImp::MatchItem(const CFX_WideString& wsMatch) {
if (wsMatch.IsEmpty()) {
return -1;
}
@@ -246,7 +248,7 @@ int32_t CFWL_ComboList::MatchItem(const CFX_WideString& wsMatch) { }
return -1;
}
-void CFWL_ComboList::ChangeSelected(int32_t iSel) {
+void CFWL_ComboListImp::ChangeSelected(int32_t iSel) {
_FWL_RETURN_IF_FAIL(m_pProperties->m_pDataProvider);
IFWL_ListBoxDP* pData = (IFWL_ListBoxDP*)m_pProperties->m_pDataProvider;
FWL_HLISTITEM hItem = pData->GetItem(m_pInterface, iSel);
@@ -271,28 +273,29 @@ void CFWL_ComboList::ChangeSelected(int32_t iSel) { Repaint(&rtInvalidate);
}
}
-int32_t CFWL_ComboList::CountItems() {
+int32_t CFWL_ComboListImp::CountItems() {
_FWL_RETURN_VALUE_IF_FAIL(m_pProperties->m_pDataProvider, 0);
IFWL_ListBoxDP* pData = (IFWL_ListBoxDP*)m_pProperties->m_pDataProvider;
return pData->CountItems(m_pInterface);
}
-void CFWL_ComboList::GetItemRect(int32_t nIndex, CFX_RectF& rtItem) {
+void CFWL_ComboListImp::GetItemRect(int32_t nIndex, CFX_RectF& rtItem) {
IFWL_ListBoxDP* pData = (IFWL_ListBoxDP*)m_pProperties->m_pDataProvider;
FWL_HLISTITEM hItem = pData->GetItem(m_pInterface, nIndex);
pData->GetItemRect(m_pInterface, hItem, rtItem);
}
-void CFWL_ComboList::ClientToOuter(FX_FLOAT& fx, FX_FLOAT& fy) {
+void CFWL_ComboListImp::ClientToOuter(FX_FLOAT& fx, FX_FLOAT& fy) {
fx += m_pProperties->m_rtWidget.left, fy += m_pProperties->m_rtWidget.top;
IFWL_Widget* pOwner = GetOwner();
_FWL_RETURN_IF_FAIL(pOwner);
pOwner->TransformTo(m_pOuter, fx, fy);
}
-void CFWL_ComboList::SetFocus(FX_BOOL bSet) {
+void CFWL_ComboListImp::SetFocus(FX_BOOL bSet) {
CFWL_WidgetImp::SetFocus(bSet);
}
-CFWL_ComboListDelegate::CFWL_ComboListDelegate(CFWL_ComboList* pOwner)
- : CFWL_ListBoxImpDelegate(pOwner), m_pOwner(pOwner) {}
-int32_t CFWL_ComboListDelegate::OnProcessMessage(CFWL_Message* pMessage) {
+CFWL_ComboListImpDelegate::CFWL_ComboListImpDelegate(CFWL_ComboListImp* pOwner)
+ : CFWL_ListBoxImpDelegate(pOwner), m_pOwner(pOwner) {
+}
+int32_t CFWL_ComboListImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
_FWL_RETURN_VALUE_IF_FAIL(pMessage, 0);
FX_DWORD dwHashCode = pMessage->GetClassID();
FX_BOOL backDefault = TRUE;
@@ -340,8 +343,8 @@ int32_t CFWL_ComboListDelegate::OnProcessMessage(CFWL_Message* pMessage) { }
return CFWL_ListBoxImpDelegate::OnProcessMessage(pMessage);
}
-void CFWL_ComboListDelegate::OnDropListFocusChanged(CFWL_Message* pMsg,
- FX_BOOL bSet) {
+void CFWL_ComboListImpDelegate::OnDropListFocusChanged(CFWL_Message* pMsg,
+ FX_BOOL bSet) {
if (!bSet) {
CFWL_MsgKillFocus* pKill = (CFWL_MsgKillFocus*)pMsg;
CFWL_ComboBoxImp* pOuter =
@@ -352,7 +355,7 @@ void CFWL_ComboListDelegate::OnDropListFocusChanged(CFWL_Message* pMsg, }
}
}
-int32_t CFWL_ComboListDelegate::OnDropListMouseMove(CFWL_MsgMouse* pMsg) {
+int32_t CFWL_ComboListImpDelegate::OnDropListMouseMove(CFWL_MsgMouse* pMsg) {
if (m_pOwner->m_rtClient.Contains(pMsg->m_fx, pMsg->m_fy)) {
if (m_pOwner->m_bNotifyOwner) {
m_pOwner->m_bNotifyOwner = FALSE;
@@ -384,7 +387,7 @@ int32_t CFWL_ComboListDelegate::OnDropListMouseMove(CFWL_MsgMouse* pMsg) { }
return 1;
}
-int32_t CFWL_ComboListDelegate::OnDropListLButtonDown(CFWL_MsgMouse* pMsg) {
+int32_t CFWL_ComboListImpDelegate::OnDropListLButtonDown(CFWL_MsgMouse* pMsg) {
if (m_pOwner->m_rtClient.Contains(pMsg->m_fx, pMsg->m_fy)) {
return 0;
}
@@ -393,7 +396,7 @@ int32_t CFWL_ComboListDelegate::OnDropListLButtonDown(CFWL_MsgMouse* pMsg) { pOuter->ShowDropList(FALSE);
return 1;
}
-int32_t CFWL_ComboListDelegate::OnDropListLButtonUp(CFWL_MsgMouse* pMsg) {
+int32_t CFWL_ComboListImpDelegate::OnDropListLButtonUp(CFWL_MsgMouse* pMsg) {
CFWL_ComboBoxImp* pOuter =
(CFWL_ComboBoxImp*)((IFWL_TargetData*)m_pOwner->m_pOuter)->GetData();
if (m_pOwner->m_bNotifyOwner) {
@@ -415,7 +418,7 @@ int32_t CFWL_ComboListDelegate::OnDropListLButtonUp(CFWL_MsgMouse* pMsg) { }
return 1;
}
-int32_t CFWL_ComboListDelegate::OnDropListKey(CFWL_MsgKey* pKey) {
+int32_t CFWL_ComboListImpDelegate::OnDropListKey(CFWL_MsgKey* pKey) {
CFWL_ComboBoxImp* pOuter =
(CFWL_ComboBoxImp*)((IFWL_TargetData*)m_pOwner->m_pOuter)->GetData();
FX_BOOL bPropagate = FALSE;
@@ -446,7 +449,7 @@ int32_t CFWL_ComboListDelegate::OnDropListKey(CFWL_MsgKey* pKey) { }
return 0;
}
-void CFWL_ComboListDelegate::OnDropListKeyDown(CFWL_MsgKey* pKey) {
+void CFWL_ComboListImpDelegate::OnDropListKeyDown(CFWL_MsgKey* pKey) {
FX_DWORD dwKeyCode = pKey->m_dwKeyCode;
switch (dwKeyCode) {
case FWL_VKEY_Up:
@@ -534,13 +537,13 @@ FWL_ERR CFWL_ComboBoxImp::Initialize() { prop.m_dwStyleExes |= FWL_STYLEEXT_LTB_Icon;
}
prop.m_pDataProvider = m_pProperties->m_pDataProvider;
- CFWL_ComboList* pList = new CFWL_ComboList(prop, m_pInterface);
+ CFWL_ComboListImp* pList = new CFWL_ComboListImp(prop, m_pInterface);
m_pListBox = IFWL_ListBox::Create();
pList->SetInterface(m_pListBox);
((IFWL_TargetData*)m_pListBox)->SetData(pList);
pList->Initialize();
if ((m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CMB_DropDown) && !m_pEdit) {
- CFWL_ComboEdit* pEdit = new CFWL_ComboEdit(m_pInterface);
+ CFWL_ComboEditImp* pEdit = new CFWL_ComboEditImp(m_pInterface);
m_pEdit = IFWL_Edit::Create();
pEdit->SetInterface(m_pEdit);
((IFWL_TargetData*)m_pEdit)->SetData(pEdit);
@@ -595,7 +598,7 @@ FWL_ERR CFWL_ComboBoxImp::ModifyStylesEx(FX_DWORD dwStylesExAdded, FX_BOOL bAddDropDown = dwStylesExAdded & FWL_STYLEEXT_CMB_DropDown;
FX_BOOL bRemoveDropDown = dwStylesExRemoved & FWL_STYLEEXT_CMB_DropDown;
if (bAddDropDown && !m_pEdit) {
- CFWL_ComboEdit* pEdit = new CFWL_ComboEdit(m_pInterface);
+ CFWL_ComboEditImp* pEdit = new CFWL_ComboEditImp(m_pInterface);
m_pEdit = IFWL_Edit::Create();
pEdit->SetInterface(m_pEdit);
((IFWL_TargetData*)m_pEdit)->SetData(pEdit);
@@ -665,9 +668,8 @@ FWL_ERR CFWL_ComboBoxImp::DrawWidget(CFX_Graphics* pGraphics, param.m_rtPart = rtTextBk;
if (m_iCurSel >= 0) {
IFWL_ListBoxDP* pData =
- (IFWL_ListBoxDP*)((CFWL_ComboList*)((IFWL_TargetData*)m_pListBox)
- ->GetData())
- ->m_pProperties->m_pDataProvider;
+ (IFWL_ListBoxDP*)((CFWL_ComboListImp*)((IFWL_TargetData*)m_pListBox)
+ ->GetData())->m_pProperties->m_pDataProvider;
void* p =
pData->GetItemData(m_pListBox, pData->GetItem(m_pListBox, m_iCurSel));
if (p != NULL) {
@@ -688,7 +690,7 @@ FWL_ERR CFWL_ComboBoxImp::DrawWidget(CFX_Graphics* pGraphics, CFX_WideString wsText;
IFWL_ComboBoxDP* pData = (IFWL_ComboBoxDP*)m_pProperties->m_pDataProvider;
FWL_HLISTITEM hItem = pData->GetItem(m_pInterface, m_iCurSel);
- ((CFWL_ComboList*)((IFWL_TargetData*)m_pListBox)->GetData())
+ ((CFWL_ComboListImp*)((IFWL_TargetData*)m_pListBox)->GetData())
->GetItemText(hItem, wsText);
CFWL_ThemeText param;
param.m_pWidget = m_pInterface;
@@ -735,8 +737,8 @@ int32_t CFWL_ComboBoxImp::GetCurSel() { return m_iCurSel;
}
FWL_ERR CFWL_ComboBoxImp::SetCurSel(int32_t iSel) {
- int32_t iCount = ((CFWL_ComboList*)((IFWL_TargetData*)m_pListBox)->GetData())
- ->CountItems();
+ int32_t iCount = ((CFWL_ComboListImp*)((IFWL_TargetData*)m_pListBox)
+ ->GetData())->CountItems();
FX_BOOL bClearSel = iSel < 0 || iSel >= iCount;
FX_BOOL bDropDown = IsDropDownStyle();
if (bDropDown && m_pEdit) {
@@ -746,7 +748,7 @@ FWL_ERR CFWL_ComboBoxImp::SetCurSel(int32_t iSel) { CFX_WideString wsText;
IFWL_ComboBoxDP* pData = (IFWL_ComboBoxDP*)m_pProperties->m_pDataProvider;
FWL_HLISTITEM hItem = pData->GetItem(m_pInterface, iSel);
- ((CFWL_ComboList*)((IFWL_TargetData*)m_pListBox)->GetData())
+ ((CFWL_ComboListImp*)((IFWL_TargetData*)m_pListBox)->GetData())
->GetItemText(hItem, wsText);
m_pEdit->SetText(wsText);
}
@@ -788,7 +790,7 @@ FWL_ERR CFWL_ComboBoxImp::GetEditText(CFX_WideString& wsText, }
FWL_ERR CFWL_ComboBoxImp::SetEditSelRange(int32_t nStart, int32_t nCount) {
_FWL_RETURN_VALUE_IF_FAIL(m_pEdit, FWL_ERR_Indefinite);
- ((CFWL_ComboEdit*)((IFWL_TargetData*)m_pEdit)->GetData())->ClearSelected();
+ ((CFWL_ComboEditImp*)((IFWL_TargetData*)m_pEdit)->GetData())->ClearSelected();
m_pEdit->AddSelRange(nStart, nCount);
return FWL_ERR_Succeeded;
}
@@ -928,7 +930,7 @@ void CFWL_ComboBoxImp::ShowDropList(FX_BOOL bActivate) { }
m_pListProxyDelegate->Reset();
if (bActivate) {
- ((CFWL_ComboList*)((IFWL_TargetData*)m_pListBox)->GetData())
+ ((CFWL_ComboListImp*)((IFWL_TargetData*)m_pListBox)->GetData())
->ChangeSelected(m_iCurSel);
ReSetListItemAlignment();
FX_DWORD dwStyleAdd = m_pProperties->m_dwStyleExes &
@@ -974,12 +976,12 @@ void CFWL_ComboBoxImp::ShowDropList(FX_BOOL bActivate) { CFWL_EvtCmbPreDropDown ev;
ev.m_pSrcTarget = m_pInterface;
DispatchEvent(&ev);
- m_fItemHeight = ((CFWL_ComboList*)((IFWL_TargetData*)m_pListBox)->GetData())
- ->m_fItemHeight;
- ((CFWL_ComboList*)((IFWL_TargetData*)m_pListBox)->GetData())
+ m_fItemHeight = ((CFWL_ComboListImp*)((IFWL_TargetData*)m_pListBox)
+ ->GetData())->m_fItemHeight;
+ ((CFWL_ComboListImp*)((IFWL_TargetData*)m_pListBox)->GetData())
->SetFocus(TRUE);
m_pForm->DoModal();
- ((CFWL_ComboList*)((IFWL_TargetData*)m_pListBox)->GetData())
+ ((CFWL_ComboListImp*)((IFWL_TargetData*)m_pListBox)->GetData())
->SetFocus(FALSE);
} else {
m_pForm->EndDoModal();
@@ -987,7 +989,7 @@ void CFWL_ComboBoxImp::ShowDropList(FX_BOOL bActivate) { ev.m_pSrcTarget = m_pInterface;
DispatchEvent(&ev);
m_bLButtonDown = FALSE;
- ((CFWL_ComboList*)((IFWL_TargetData*)m_pListBox)->GetData())
+ ((CFWL_ComboListImp*)((IFWL_TargetData*)m_pListBox)->GetData())
->m_bNotifyOwner = TRUE;
SetFocus(TRUE);
}
@@ -1001,16 +1003,16 @@ FX_BOOL CFWL_ComboBoxImp::IsDropDownStyle() const { void CFWL_ComboBoxImp::MatchEditText() {
CFX_WideString wsText;
m_pEdit->GetText(wsText);
- int32_t iMatch = ((CFWL_ComboList*)((IFWL_TargetData*)m_pListBox)->GetData())
- ->MatchItem(wsText);
+ int32_t iMatch = ((CFWL_ComboListImp*)((IFWL_TargetData*)m_pListBox)
+ ->GetData())->MatchItem(wsText);
if (iMatch != m_iCurSel) {
- ((CFWL_ComboList*)((IFWL_TargetData*)m_pListBox)->GetData())
+ ((CFWL_ComboListImp*)((IFWL_TargetData*)m_pListBox)->GetData())
->ChangeSelected(iMatch);
if (iMatch >= 0) {
SynchrEditText(iMatch);
}
} else if (iMatch >= 0) {
- ((CFWL_ComboEdit*)((IFWL_TargetData*)m_pEdit)->GetData())->SetSelected();
+ ((CFWL_ComboEditImp*)((IFWL_TargetData*)m_pEdit)->GetData())->SetSelected();
}
m_iCurSel = iMatch;
}
@@ -1018,11 +1020,11 @@ void CFWL_ComboBoxImp::SynchrEditText(int32_t iListItem) { CFX_WideString wsText;
IFWL_ComboBoxDP* pData = (IFWL_ComboBoxDP*)m_pProperties->m_pDataProvider;
FWL_HLISTITEM hItem = pData->GetItem(m_pInterface, iListItem);
- ((CFWL_ComboList*)((IFWL_TargetData*)m_pListBox)->GetData())
+ ((CFWL_ComboListImp*)((IFWL_TargetData*)m_pListBox)->GetData())
->GetItemText(hItem, wsText);
m_pEdit->SetText(wsText);
m_pEdit->Update();
- ((CFWL_ComboEdit*)((IFWL_TargetData*)m_pEdit)->GetData())->SetSelected();
+ ((CFWL_ComboEditImp*)((IFWL_TargetData*)m_pEdit)->GetData())->SetSelected();
}
void CFWL_ComboBoxImp::Layout() {
if (m_pWidgetMgr->IsFormDisabled()) {
@@ -1045,7 +1047,7 @@ void CFWL_ComboBoxImp::Layout() { CFX_WideString wsText;
IFWL_ComboBoxDP* pData = (IFWL_ComboBoxDP*)m_pProperties->m_pDataProvider;
FWL_HLISTITEM hItem = pData->GetItem(m_pInterface, m_iCurSel);
- ((CFWL_ComboList*)((IFWL_TargetData*)m_pListBox)->GetData())
+ ((CFWL_ComboListImp*)((IFWL_TargetData*)m_pListBox)->GetData())
->GetItemText(hItem, wsText);
m_pEdit->LockUpdate();
m_pEdit->SetText(wsText);
@@ -1135,7 +1137,7 @@ void CFWL_ComboBoxImp::ProcessSelChanged(FX_BOOL bLButtonUp) { if (m_pEdit) {
m_pEdit->SetText(wsText);
m_pEdit->Update();
- ((CFWL_ComboEdit*)((IFWL_TargetData*)m_pEdit)->GetData())
+ ((CFWL_ComboEditImp*)((IFWL_TargetData*)m_pEdit)->GetData())
->SetSelected();
}
CFWL_EvtCmbSelChanged ev;
@@ -1182,7 +1184,7 @@ void CFWL_ComboBoxImp::DisForm_InitComboList() { prop.m_dwStates = FWL_WGTSTATE_Invisible;
prop.m_pDataProvider = m_pProperties->m_pDataProvider;
prop.m_pThemeProvider = m_pProperties->m_pThemeProvider;
- CFWL_ComboList* pList = new CFWL_ComboList(prop, m_pInterface);
+ CFWL_ComboListImp* pList = new CFWL_ComboListImp(prop, m_pInterface);
m_pListBox = IFWL_ListBox::Create();
pList->SetInterface(m_pListBox);
((IFWL_TargetData*)m_pListBox)->SetData(pList);
@@ -1197,7 +1199,7 @@ void CFWL_ComboBoxImp::DisForm_InitComboEdit() { prop.m_pThemeProvider = m_pProperties->m_pThemeProvider;
if ((m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CMB_DropDown) == 0) {
}
- CFWL_ComboEdit* pEdit = new CFWL_ComboEdit(prop, m_pInterface);
+ CFWL_ComboEditImp* pEdit = new CFWL_ComboEditImp(prop, m_pInterface);
m_pEdit = IFWL_Edit::Create();
pEdit->SetInterface(m_pEdit);
((IFWL_TargetData*)m_pEdit)->SetData(pEdit);
@@ -1213,8 +1215,8 @@ void CFWL_ComboBoxImp::DisForm_ShowDropList(FX_BOOL bActivate) { CFWL_EvtCmbPreDropDown preEvent;
preEvent.m_pSrcTarget = m_pInterface;
DispatchEvent(&preEvent);
- CFWL_ComboList* pComboList =
- (CFWL_ComboList*)(((IFWL_TargetData*)m_pListBox)->GetData());
+ CFWL_ComboListImp* pComboList =
+ (CFWL_ComboListImp*)(((IFWL_TargetData*)m_pListBox)->GetData());
int32_t iItems = pComboList->CountItems();
if (iItems < 1) {
return;
@@ -1375,7 +1377,7 @@ void CFWL_ComboBoxImp::DisForm_Layout() { CFX_WideString wsText;
IFWL_ComboBoxDP* pData = (IFWL_ComboBoxDP*)m_pProperties->m_pDataProvider;
FWL_HLISTITEM hItem = pData->GetItem(m_pInterface, m_iCurSel);
- ((CFWL_ComboList*)((IFWL_TargetData*)m_pListBox)->GetData())
+ ((CFWL_ComboListImp*)((IFWL_TargetData*)m_pListBox)->GetData())
->GetItemText(hItem, wsText);
m_pEdit->LockUpdate();
m_pEdit->SetText(wsText);
@@ -1472,7 +1474,7 @@ void CFWL_ComboBoxImpDelegate::OnFocusChanged(CFWL_Message* pMsg, m_pOwner->m_pProperties->m_dwStates |= FWL_WGTSTATE_Focused;
if (bDropDown && pSrcTarget != (IFWL_Widget*)m_pOwner->m_pListBox) {
_FWL_RETURN_IF_FAIL(m_pOwner->m_pEdit);
- ((CFWL_ComboEdit*)((IFWL_TargetData*)m_pOwner->m_pEdit)->GetData())
+ ((CFWL_ComboEditImp*)((IFWL_TargetData*)m_pOwner->m_pEdit)->GetData())
->SetSelected();
} else {
m_pOwner->Repaint(&m_pOwner->m_rtClient);
@@ -1481,9 +1483,9 @@ void CFWL_ComboBoxImpDelegate::OnFocusChanged(CFWL_Message* pMsg, m_pOwner->m_pProperties->m_dwStates &= ~FWL_WGTSTATE_Focused;
if (bDropDown && pDstTarget != (IFWL_Widget*)m_pOwner->m_pListBox) {
_FWL_RETURN_IF_FAIL(m_pOwner->m_pEdit);
- ((CFWL_ComboEdit*)((IFWL_TargetData*)m_pOwner->m_pEdit)->GetData())
+ ((CFWL_ComboEditImp*)((IFWL_TargetData*)m_pOwner->m_pEdit)->GetData())
->FlagFocus(FALSE);
- ((CFWL_ComboEdit*)((IFWL_TargetData*)m_pOwner->m_pEdit)->GetData())
+ ((CFWL_ComboEditImp*)((IFWL_TargetData*)m_pOwner->m_pEdit)->GetData())
->ClearSelected();
} else {
m_pOwner->Repaint(&m_pOwner->m_rtClient);
@@ -1558,8 +1560,8 @@ void CFWL_ComboBoxImpDelegate::DoSubCtrlKey(CFWL_MsgKey* pMsg) { FX_BOOL bDown = dwKeyCode == FWL_VKEY_Down;
if (bUp || bDown) {
int32_t iCount =
- ((CFWL_ComboList*)((IFWL_TargetData*)m_pOwner->m_pListBox)->GetData())
- ->CountItems();
+ ((CFWL_ComboListImp*)((IFWL_TargetData*)m_pOwner->m_pListBox)
+ ->GetData())->CountItems();
if (iCount < 1) {
return;
}
@@ -1569,16 +1571,15 @@ void CFWL_ComboBoxImpDelegate::DoSubCtrlKey(CFWL_MsgKey* pMsg) { if (bDropDown && m_pOwner->m_pEdit) {
CFX_WideString wsText;
m_pOwner->m_pEdit->GetText(wsText);
- iCurSel =
- ((CFWL_ComboList*)((IFWL_TargetData*)m_pOwner->m_pListBox)->GetData())
- ->MatchItem(wsText);
+ iCurSel = ((CFWL_ComboListImp*)((IFWL_TargetData*)m_pOwner->m_pListBox)
+ ->GetData())->MatchItem(wsText);
if (iCurSel >= 0) {
CFX_WideString wsTemp;
IFWL_ComboBoxDP* pData =
(IFWL_ComboBoxDP*)m_pOwner->m_pProperties->m_pDataProvider;
FWL_HLISTITEM hItem = pData->GetItem(m_pOwner->m_pInterface, iCurSel);
- ((CFWL_ComboList*)((IFWL_TargetData*)m_pOwner->m_pListBox)->GetData())
- ->GetItemText(hItem, wsTemp);
+ ((CFWL_ComboListImp*)((IFWL_TargetData*)m_pOwner->m_pListBox)
+ ->GetData())->GetItemText(hItem, wsTemp);
bMatchEqual = wsText.Equal(wsTemp);
}
}
@@ -1709,8 +1710,8 @@ void CFWL_ComboBoxImpDelegate::DisForm_OnKey(CFWL_MsgKey* pMsg) { FX_BOOL bUp = dwKeyCode == FWL_VKEY_Up;
FX_BOOL bDown = dwKeyCode == FWL_VKEY_Down;
if (bUp || bDown) {
- CFWL_ComboList* pComboList =
- ((CFWL_ComboList*)((IFWL_TargetData*)(m_pOwner->m_pListBox))
+ CFWL_ComboListImp* pComboList =
+ ((CFWL_ComboListImp*)((IFWL_TargetData*)(m_pOwner->m_pListBox))
->GetData());
int32_t iCount = pComboList->CountItems();
if (iCount < 1) {
diff --git a/xfa/src/fwl/src/basewidget/fwl_datetimepickerimp.cpp b/xfa/src/fwl/src/basewidget/fwl_datetimepickerimp.cpp index d125f0235c..8de52a800d 100644 --- a/xfa/src/fwl/src/basewidget/fwl_datetimepickerimp.cpp +++ b/xfa/src/fwl/src/basewidget/fwl_datetimepickerimp.cpp @@ -145,21 +145,23 @@ CFWL_DateTimeEdit::CFWL_DateTimeEdit(const CFWL_WidgetImpProperties& properties, IFWL_Widget* pOuter)
: CFWL_EditImp(properties, pOuter) {}
FWL_ERR CFWL_DateTimeEdit::Initialize() {
- m_pDelegate = (IFWL_WidgetDelegate*)new CFWL_DateTimeEditDelegate(this);
+ m_pDelegate = (IFWL_WidgetDelegate*)new CFWL_DateTimeEditImpDelegate(this);
_FWL_ERR_CHECK_RETURN_VALUE_IF_FAIL(CFWL_EditImp::Initialize(),
FWL_ERR_Indefinite);
return FWL_ERR_Succeeded;
}
FWL_ERR CFWL_DateTimeEdit::Finalize() {
if (m_pDelegate) {
- delete (CFWL_DateTimeEditDelegate*)m_pDelegate;
+ delete (CFWL_DateTimeEditImpDelegate*)m_pDelegate;
m_pDelegate = NULL;
}
return CFWL_EditImp::Finalize();
}
-CFWL_DateTimeEditDelegate::CFWL_DateTimeEditDelegate(CFWL_DateTimeEdit* pOwner)
- : CFWL_EditImpDelegate(pOwner), m_pOwner(pOwner) {}
-int32_t CFWL_DateTimeEditDelegate::OnProcessMessage(CFWL_Message* pMessage) {
+CFWL_DateTimeEditImpDelegate::CFWL_DateTimeEditImpDelegate(
+ CFWL_DateTimeEdit* pOwner)
+ : CFWL_EditImpDelegate(pOwner), m_pOwner(pOwner) {
+}
+int32_t CFWL_DateTimeEditImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
if (m_pOwner->m_pWidgetMgr->IsFormDisabled()) {
return DisForm_OnProcessMessage(pMessage);
}
@@ -172,7 +174,7 @@ int32_t CFWL_DateTimeEditDelegate::OnProcessMessage(CFWL_Message* pMessage) { }
return 1;
}
-int32_t CFWL_DateTimeEditDelegate::DisForm_OnProcessMessage(
+int32_t CFWL_DateTimeEditImpDelegate::DisForm_OnProcessMessage(
CFWL_Message* pMessage) {
FX_DWORD dwHashCode = pMessage->GetClassID();
if (m_pOwner->m_pWidgetMgr->IsFormDisabled()) {
@@ -210,22 +212,23 @@ FWL_ERR CFWL_DateTimeCalendar::Initialize() { if (m_pDelegate) {
delete (CFWL_MonthCalendarImpDelegate*)m_pDelegate;
}
- m_pDelegate = (IFWL_WidgetDelegate*)new CFWL_DateTimeCalendarDelegate(this);
+ m_pDelegate =
+ (IFWL_WidgetDelegate*)new CFWL_DateTimeCalendarImpDelegate(this);
return FWL_ERR_Succeeded;
}
FWL_ERR CFWL_DateTimeCalendar::Finalize() {
if (m_pDelegate) {
- delete (CFWL_DateTimeCalendarDelegate*)m_pDelegate;
+ delete (CFWL_DateTimeCalendarImpDelegate*)m_pDelegate;
m_pDelegate = NULL;
}
return CFWL_MonthCalendarImp::Finalize();
}
-CFWL_DateTimeCalendarDelegate::CFWL_DateTimeCalendarDelegate(
+CFWL_DateTimeCalendarImpDelegate::CFWL_DateTimeCalendarImpDelegate(
CFWL_DateTimeCalendar* pOwner)
: CFWL_MonthCalendarImpDelegate(pOwner), m_pOwner(pOwner) {
m_bFlag = FALSE;
}
-int32_t CFWL_DateTimeCalendarDelegate::OnProcessMessage(
+int32_t CFWL_DateTimeCalendarImpDelegate::OnProcessMessage(
CFWL_Message* pMessage) {
FX_DWORD dwCode = pMessage->GetClassID();
if (dwCode == FWL_MSGHASH_SetFocus || dwCode == FWL_MSGHASH_KillFocus) {
@@ -244,7 +247,7 @@ int32_t CFWL_DateTimeCalendarDelegate::OnProcessMessage( }
return CFWL_MonthCalendarImpDelegate::OnProcessMessage(pMessage);
}
-void CFWL_DateTimeCalendarDelegate::OnLButtonDownEx(CFWL_MsgMouse* pMsg) {
+void CFWL_DateTimeCalendarImpDelegate::OnLButtonDownEx(CFWL_MsgMouse* pMsg) {
if (m_pOwner->m_rtLBtn.Contains(pMsg->m_fx, pMsg->m_fy)) {
m_pOwner->m_iLBtnPartStates = FWL_PARTSTATE_MCD_Pressed;
m_pOwner->PrevMonth();
@@ -268,7 +271,7 @@ void CFWL_DateTimeCalendarDelegate::OnLButtonDownEx(CFWL_MsgMouse* pMsg) { }
}
}
-void CFWL_DateTimeCalendarDelegate::OnLButtonUpEx(CFWL_MsgMouse* pMsg) {
+void CFWL_DateTimeCalendarImpDelegate::OnLButtonUpEx(CFWL_MsgMouse* pMsg) {
if (m_pOwner->m_pWidgetMgr->IsFormDisabled()) {
return DisForm_OnLButtonUpEx(pMsg);
}
@@ -317,7 +320,7 @@ void CFWL_DateTimeCalendarDelegate::OnLButtonUpEx(CFWL_MsgMouse* pMsg) { }
m_bFlag = 0;
}
-void CFWL_DateTimeCalendarDelegate::OnMouseMoveEx(CFWL_MsgMouse* pMsg) {
+void CFWL_DateTimeCalendarImpDelegate::OnMouseMoveEx(CFWL_MsgMouse* pMsg) {
if (m_pOwner->m_pProperties->m_dwStyleExes & FWL_STYLEEXT_MCD_MultiSelect) {
return;
}
@@ -356,7 +359,7 @@ void CFWL_DateTimeCalendarDelegate::OnMouseMoveEx(CFWL_MsgMouse* pMsg) { m_pOwner->Repaint(&rtInvalidate);
}
}
-int32_t CFWL_DateTimeCalendarDelegate::DisForm_OnProcessMessage(
+int32_t CFWL_DateTimeCalendarImpDelegate::DisForm_OnProcessMessage(
CFWL_Message* pMessage) {
if (pMessage->GetClassID() == FWL_MSGHASH_Mouse) {
CFWL_MsgMouse* pMsg = (CFWL_MsgMouse*)pMessage;
@@ -367,7 +370,8 @@ int32_t CFWL_DateTimeCalendarDelegate::DisForm_OnProcessMessage( }
return CFWL_MonthCalendarImpDelegate::OnProcessMessage(pMessage);
}
-void CFWL_DateTimeCalendarDelegate::DisForm_OnLButtonUpEx(CFWL_MsgMouse* pMsg) {
+void CFWL_DateTimeCalendarImpDelegate::DisForm_OnLButtonUpEx(
+ CFWL_MsgMouse* pMsg) {
if (m_pOwner->m_rtLBtn.Contains(pMsg->m_fx, pMsg->m_fy)) {
m_pOwner->m_iLBtnPartStates = 0;
m_pOwner->Repaint(&(m_pOwner->m_rtLBtn));
diff --git a/xfa/src/fwl/src/basewidget/include/fwl_comboboximp.h b/xfa/src/fwl/src/basewidget/include/fwl_comboboximp.h index 86b26f2bd7..e0c19118b5 100644 --- a/xfa/src/fwl/src/basewidget/include/fwl_comboboximp.h +++ b/xfa/src/fwl/src/basewidget/include/fwl_comboboximp.h @@ -15,18 +15,18 @@ class CFWL_ListBoxImp; class CFWL_ListBoxImpDelegate;
class CFWL_FormProxyImp;
class IFWL_Widget;
-class CFWL_ComboEdit;
-class CFWL_ComboEditDelegate;
-class CFWL_ComboList;
-class CFWL_ComboListDelegate;
+class CFWL_ComboEditImp;
+class CFWL_ComboEditImpDelegate;
+class CFWL_ComboListImp;
+class CFWL_ComboListImpDelegate;
class CFWL_ComboBoxImp;
class CFWL_ComboBoxImpDelegate;
class CFWL_ComboProxyImpDelegate;
-class CFWL_ComboEdit : public CFWL_EditImp {
+class CFWL_ComboEditImp : public CFWL_EditImp {
public:
- CFWL_ComboEdit(IFWL_Widget* pOuter);
- CFWL_ComboEdit(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter = NULL);
+ CFWL_ComboEditImp(IFWL_Widget* pOuter);
+ CFWL_ComboEditImp(const CFWL_WidgetImpProperties& properties,
+ IFWL_Widget* pOuter = NULL);
void ClearSelected();
void SetSelected();
@@ -36,21 +36,21 @@ class CFWL_ComboEdit : public CFWL_EditImp { protected:
void SetComboBoxFocus(FX_BOOL bSet);
CFWL_ComboBoxImp* m_pOuter;
- friend class CFWL_ComboEditDelegate;
+ friend class CFWL_ComboEditImpDelegate;
};
-class CFWL_ComboEditDelegate : public CFWL_EditImpDelegate {
+class CFWL_ComboEditImpDelegate : public CFWL_EditImpDelegate {
public:
- CFWL_ComboEditDelegate(CFWL_ComboEdit* pOwner);
+ CFWL_ComboEditImpDelegate(CFWL_ComboEditImp* pOwner);
virtual int32_t OnProcessMessage(CFWL_Message* pMessage);
protected:
- CFWL_ComboEdit* m_pOwner;
+ CFWL_ComboEditImp* m_pOwner;
};
-class CFWL_ComboList : public CFWL_ListBoxImp {
+class CFWL_ComboListImp : public CFWL_ListBoxImp {
public:
- CFWL_ComboList(IFWL_Widget* pOuter);
- CFWL_ComboList(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
+ CFWL_ComboListImp(IFWL_Widget* pOuter);
+ CFWL_ComboListImp(const CFWL_WidgetImpProperties& properties,
+ IFWL_Widget* pOuter);
virtual FWL_ERR Initialize();
virtual FWL_ERR Finalize();
int32_t MatchItem(const CFX_WideString& wsMatch);
@@ -60,12 +60,12 @@ class CFWL_ComboList : public CFWL_ListBoxImp { void ClientToOuter(FX_FLOAT& fx, FX_FLOAT& fy);
void SetFocus(FX_BOOL bSet);
FX_BOOL m_bNotifyOwner;
- friend class CFWL_ComboListDelegate;
+ friend class CFWL_ComboListImpDelegate;
friend class CFWL_ComboBoxImp;
};
-class CFWL_ComboListDelegate : public CFWL_ListBoxImpDelegate {
+class CFWL_ComboListImpDelegate : public CFWL_ListBoxImpDelegate {
public:
- CFWL_ComboListDelegate(CFWL_ComboList* pOwner);
+ CFWL_ComboListImpDelegate(CFWL_ComboListImp* pOwner);
virtual int32_t OnProcessMessage(CFWL_Message* pMessage);
protected:
@@ -75,7 +75,7 @@ class CFWL_ComboListDelegate : public CFWL_ListBoxImpDelegate { int32_t OnDropListLButtonUp(CFWL_MsgMouse* pMsg);
int32_t OnDropListKey(CFWL_MsgKey* pKey);
void OnDropListKeyDown(CFWL_MsgKey* pKey);
- CFWL_ComboList* m_pOwner;
+ CFWL_ComboListImp* m_pOwner;
};
class CFWL_ComboBoxImp : public CFWL_WidgetImp {
public:
@@ -180,10 +180,10 @@ class CFWL_ComboBoxImp : public CFWL_WidgetImp { CFWL_FormProxyImp* m_pProxy;
CFWL_ComboProxyImpDelegate* m_pListProxyDelegate;
- friend class CFWL_ComboList;
- friend class CFWL_ComboEdit;
- friend class CFWL_ComboEditDelegate;
- friend class CFWL_ComboListDelegate;
+ friend class CFWL_ComboListImp;
+ friend class CFWL_ComboEditImp;
+ friend class CFWL_ComboEditImpDelegate;
+ friend class CFWL_ComboListImpDelegate;
friend class CFWL_ComboBoxImpDelegate;
friend class CFWL_ComboProxyImpDelegate;
};
@@ -212,8 +212,8 @@ class CFWL_ComboBoxImpDelegate : public CFWL_WidgetImpDelegate { protected:
CFWL_ComboBoxImp* m_pOwner;
- friend class CFWL_ComboEditDelegate;
- friend class CFWL_ComboListDelegate;
+ friend class CFWL_ComboEditImpDelegate;
+ friend class CFWL_ComboListImpDelegate;
};
class CFWL_ComboProxyImpDelegate : public CFWL_WidgetImpDelegate {
public:
diff --git a/xfa/src/fwl/src/basewidget/include/fwl_datetimepickerimp.h b/xfa/src/fwl/src/basewidget/include/fwl_datetimepickerimp.h index 13beecdd8c..8730e55f43 100644 --- a/xfa/src/fwl/src/basewidget/include/fwl_datetimepickerimp.h +++ b/xfa/src/fwl/src/basewidget/include/fwl_datetimepickerimp.h @@ -15,9 +15,9 @@ class CFWL_MonthCalendarImp; class CFWL_MonthCalendarImpDelegate;
class CFWL_FormProxyImp;
class CFWL_DateTimeEdit;
-class CFWL_DateTimeEditDelegate;
+class CFWL_DateTimeEditImpDelegate;
class CFWL_DateTimeCalendar;
-class CFWL_DateTimeCalendarDelegate;
+class CFWL_DateTimeCalendarImpDelegate;
class CFWL_DateTimePickerImp;
class CFWL_DateTimePickerImpDelegate;
class IFWL_DateTimeForm : public IFWL_Form {
@@ -43,11 +43,11 @@ class CFWL_DateTimeEdit : public CFWL_EditImp { virtual FWL_ERR Finalize();
protected:
- friend class CFWL_DateTimeEditDelegate;
+ friend class CFWL_DateTimeEditImpDelegate;
};
-class CFWL_DateTimeEditDelegate : public CFWL_EditImpDelegate {
+class CFWL_DateTimeEditImpDelegate : public CFWL_EditImpDelegate {
public:
- CFWL_DateTimeEditDelegate(CFWL_DateTimeEdit* pOwner);
+ CFWL_DateTimeEditImpDelegate(CFWL_DateTimeEdit* pOwner);
virtual int32_t OnProcessMessage(CFWL_Message* pMessage);
private:
@@ -64,11 +64,11 @@ class CFWL_DateTimeCalendar : public CFWL_MonthCalendarImp { virtual FWL_ERR Finalize();
protected:
- friend class CFWL_DateTimeCalendarDelegate;
+ friend class CFWL_DateTimeCalendarImpDelegate;
};
-class CFWL_DateTimeCalendarDelegate : public CFWL_MonthCalendarImpDelegate {
+class CFWL_DateTimeCalendarImpDelegate : public CFWL_MonthCalendarImpDelegate {
public:
- CFWL_DateTimeCalendarDelegate(CFWL_DateTimeCalendar* pOwner);
+ CFWL_DateTimeCalendarImpDelegate(CFWL_DateTimeCalendar* pOwner);
virtual int32_t OnProcessMessage(CFWL_Message* pMessage);
void OnLButtonDownEx(CFWL_MsgMouse* pMsg);
void OnLButtonUpEx(CFWL_MsgMouse* pMsg);
@@ -187,9 +187,9 @@ class CFWL_DateTimePickerImp : public CFWL_WidgetImp { };
CFWL_MonthCalendarImpDP m_MonthCalendarDP;
- friend class CFWL_DateTimeEditDelegate;
+ friend class CFWL_DateTimeEditImpDelegate;
friend class CFWL_DateTimeCalendar;
- friend class CFWL_DateTimeCalendarDelegate;
+ friend class CFWL_DateTimeCalendarImpDelegate;
friend class CFWL_DateTimePickerImpDelegate;
};
class CFWL_DateTimePickerImpDelegate : public CFWL_WidgetImpDelegate {
diff --git a/xfa/src/fwl/src/core/fwl_formimp.cpp b/xfa/src/fwl/src/core/fwl_formimp.cpp index d34dcd2157..6a1391b4c2 100644 --- a/xfa/src/fwl/src/core/fwl_formimp.cpp +++ b/xfa/src/fwl/src/core/fwl_formimp.cpp @@ -152,12 +152,12 @@ FWL_ERR CFWL_FormImp::Initialize() { FWL_ERR_Indefinite);
RegisterForm();
RegisterEventTarget();
- m_pDelegate = (IFWL_WidgetDelegate*)new CFWL_FormDelegate(this);
+ m_pDelegate = (IFWL_WidgetDelegate*)new CFWL_FormImpDelegate(this);
return FWL_ERR_Succeeded;
}
FWL_ERR CFWL_FormImp::Finalize() {
if (m_pDelegate) {
- delete (CFWL_FormDelegate*)m_pDelegate;
+ delete (CFWL_FormImpDelegate*)m_pDelegate;
m_pDelegate = NULL;
}
UnregisterEventTarget();
@@ -960,8 +960,10 @@ void CFWL_FormImp::DoHeightLimit(FX_FLOAT& fTop, }
}
}
-CFWL_FormDelegate::CFWL_FormDelegate(CFWL_FormImp* pOwner) : m_pOwner(pOwner) {}
-int32_t CFWL_FormDelegate::OnProcessMessage(CFWL_Message* pMessage) {
+CFWL_FormImpDelegate::CFWL_FormImpDelegate(CFWL_FormImp* pOwner)
+ : m_pOwner(pOwner) {
+}
+int32_t CFWL_FormImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
#ifdef FWL_UseMacSystemBorder
_FWL_RETURN_VALUE_IF_FAIL(pMessage, 0);
FX_DWORD dwMsgCode = pMessage->GetClassID();
@@ -1079,18 +1081,18 @@ int32_t CFWL_FormDelegate::OnProcessMessage(CFWL_Message* pMessage) { return iRet;
#endif
}
-FWL_ERR CFWL_FormDelegate::OnProcessEvent(CFWL_Event* pEvent) {
+FWL_ERR CFWL_FormImpDelegate::OnProcessEvent(CFWL_Event* pEvent) {
_FWL_RETURN_VALUE_IF_FAIL(pEvent, FWL_ERR_Indefinite);
if (pEvent->GetClassID() == FWL_EVTHASH_Close &&
pEvent->m_pSrcTarget == m_pOwner->m_pInterface) {
}
return FWL_ERR_Succeeded;
}
-FWL_ERR CFWL_FormDelegate::OnDrawWidget(CFX_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
+FWL_ERR CFWL_FormImpDelegate::OnDrawWidget(CFX_Graphics* pGraphics,
+ const CFX_Matrix* pMatrix) {
return m_pOwner->DrawWidget(pGraphics, pMatrix);
}
-void CFWL_FormDelegate::OnLButtonDown(CFWL_MsgMouse* pMsg) {
+void CFWL_FormImpDelegate::OnLButtonDown(CFWL_MsgMouse* pMsg) {
m_pOwner->SetGrab(TRUE);
m_pOwner->m_bLButtonDown = TRUE;
m_pOwner->m_eResizeType = FORM_RESIZETYPE_None;
@@ -1118,7 +1120,7 @@ void CFWL_FormDelegate::OnLButtonDown(CFWL_MsgMouse* pMsg) { m_pOwner->m_pProperties->m_rtWidget.width,
m_pOwner->m_pProperties->m_rtWidget.height);
}
-void CFWL_FormDelegate::OnLButtonUp(CFWL_MsgMouse* pMsg) {
+void CFWL_FormImpDelegate::OnLButtonUp(CFWL_MsgMouse* pMsg) {
m_pOwner->SetGrab(FALSE);
m_pOwner->m_bLButtonDown = FALSE;
CFWL_SysBtn* pPointBtn = m_pOwner->GetSysBtnAtPoint(pMsg->m_fx, pMsg->m_fy);
@@ -1150,7 +1152,7 @@ void CFWL_FormDelegate::OnLButtonUp(CFWL_MsgMouse* pMsg) { m_pOwner->DispatchEvent(&eClose);
}
}
-void CFWL_FormDelegate::OnMouseMove(CFWL_MsgMouse* pMsg) {
+void CFWL_FormImpDelegate::OnMouseMove(CFWL_MsgMouse* pMsg) {
CFWL_WidgetMgr* pWidgetMgr = (CFWL_WidgetMgr*)FWL_GetWidgetMgr();
if (m_pOwner->m_bLButtonDown) {
IFWL_AdapterNative* pNative = FWL_GetAdapterNative();
@@ -1400,10 +1402,10 @@ void CFWL_FormDelegate::OnMouseMove(CFWL_MsgMouse* pMsg) { m_pOwner->Repaint(&rtInvalidate);
}
}
-void CFWL_FormDelegate::OnMouseHover(CFWL_MsgMouse* pMsg) {
+void CFWL_FormImpDelegate::OnMouseHover(CFWL_MsgMouse* pMsg) {
m_pOwner->SetCursor(pMsg->m_fx, pMsg->m_fy);
}
-void CFWL_FormDelegate::OnMouseLeave(CFWL_MsgMouse* pMsg) {
+void CFWL_FormImpDelegate::OnMouseLeave(CFWL_MsgMouse* pMsg) {
CFWL_SysBtn* pHover = m_pOwner->GetSysBtnByState(FWL_SYSBUTTONSTATE_Hover);
if (pHover) {
pHover->SetNormal();
@@ -1414,7 +1416,7 @@ void CFWL_FormDelegate::OnMouseLeave(CFWL_MsgMouse* pMsg) { m_pOwner->SetCursor(pMsg->m_fx, pMsg->m_fy);
}
}
-void CFWL_FormDelegate::OnLButtonDblClk(CFWL_MsgMouse* pMsg) {
+void CFWL_FormImpDelegate::OnLButtonDblClk(CFWL_MsgMouse* pMsg) {
if ((m_pOwner->m_pProperties->m_dwStyleExes & FWL_STYLEEXT_FRM_Resize) &&
m_pOwner->HitTest(pMsg->m_fx, pMsg->m_fy) == FWL_WGTHITTEST_Titlebar) {
if (m_pOwner->m_bMaximized) {
@@ -1426,11 +1428,11 @@ void CFWL_FormDelegate::OnLButtonDblClk(CFWL_MsgMouse* pMsg) { m_pOwner->m_bMaximized = !m_pOwner->m_bMaximized;
}
}
-void CFWL_FormDelegate::OnWindowMove(CFWL_MsgWindowMove* pMsg) {
+void CFWL_FormImpDelegate::OnWindowMove(CFWL_MsgWindowMove* pMsg) {
m_pOwner->m_pProperties->m_rtWidget.left = pMsg->m_fx;
m_pOwner->m_pProperties->m_rtWidget.top = pMsg->m_fy;
}
-void CFWL_FormDelegate::OnClose(CFWL_MsgClose* pMsg) {
+void CFWL_FormImpDelegate::OnClose(CFWL_MsgClose* pMsg) {
CFWL_EvtClose eClose;
eClose.m_pSrcTarget = m_pOwner->m_pInterface;
m_pOwner->DispatchEvent(&eClose);
diff --git a/xfa/src/fwl/src/core/fwl_gridimp.cpp b/xfa/src/fwl/src/core/fwl_gridimp.cpp index 480dc904cf..95dbfe5219 100644 --- a/xfa/src/fwl/src/core/fwl_gridimp.cpp +++ b/xfa/src/fwl/src/core/fwl_gridimp.cpp @@ -173,7 +173,7 @@ CFWL_GridImp::~CFWL_GridImp() { }
m_mapWidgetInfo.RemoveAll();
if (m_pDelegate) {
- delete (CFWL_GridDelegate*)m_pDelegate;
+ delete (CFWL_GridImpDelegate*)m_pDelegate;
m_pDelegate = NULL;
}
}
@@ -187,14 +187,14 @@ FX_DWORD CFWL_GridImp::GetClassID() const { FWL_ERR CFWL_GridImp::Initialize() {
_FWL_ERR_CHECK_RETURN_VALUE_IF_FAIL(CFWL_ContentImp::Initialize(),
FWL_ERR_Indefinite);
- m_pDelegate = (IFWL_WidgetDelegate*)new CFWL_GridDelegate(this);
+ m_pDelegate = (IFWL_WidgetDelegate*)new CFWL_GridImpDelegate(this);
return FWL_ERR_Succeeded;
}
FWL_ERR CFWL_GridImp::Finalize() {
_FWL_ERR_CHECK_RETURN_VALUE_IF_FAIL(CFWL_ContentImp::Finalize(),
FWL_ERR_Indefinite);
if (m_pDelegate) {
- delete (CFWL_GridDelegate*)m_pDelegate;
+ delete (CFWL_GridImpDelegate*)m_pDelegate;
m_pDelegate = NULL;
}
return FWL_ERR_Succeeded;
@@ -1359,8 +1359,10 @@ void CFWL_GridImp::SetScaledColRowsSize(const CFX_PtrArray& spanScaleds, } else {
}
}
-CFWL_GridDelegate::CFWL_GridDelegate(CFWL_GridImp* pOwner) : m_pOwner(pOwner) {}
-int32_t CFWL_GridDelegate::OnProcessMessage(CFWL_Message* pMessage) {
+CFWL_GridImpDelegate::CFWL_GridImpDelegate(CFWL_GridImp* pOwner)
+ : m_pOwner(pOwner) {
+}
+int32_t CFWL_GridImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
if (pMessage->GetClassID() != FWL_MSGHASH_Mouse) {
return 0;
}
@@ -1370,7 +1372,7 @@ int32_t CFWL_GridDelegate::OnProcessMessage(CFWL_Message* pMessage) { }
return 1;
}
-FWL_ERR CFWL_GridDelegate::OnDrawWidget(CFX_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
+FWL_ERR CFWL_GridImpDelegate::OnDrawWidget(CFX_Graphics* pGraphics,
+ const CFX_Matrix* pMatrix) {
return m_pOwner->DrawWidget(pGraphics, pMatrix);
}
diff --git a/xfa/src/fwl/src/core/include/fwl_formimp.h b/xfa/src/fwl/src/core/include/fwl_formimp.h index 16d626461e..186052d6e8 100644 --- a/xfa/src/fwl/src/core/include/fwl_formimp.h +++ b/xfa/src/fwl/src/core/include/fwl_formimp.h @@ -15,7 +15,7 @@ class IFWL_Widget; class IFWL_ThemeProvider;
class CFWL_SysBtn;
class CFWL_FormImp;
-class CFWL_FormDelegate;
+class CFWL_FormImpDelegate;
#define FWL_SYSBUTTONSTATE_Hover 0x0001
#define FWL_SYSBUTTONSTATE_Pressed 0x0002
#define FWL_SYSBUTTONSTATE_Disabled 0x0010
@@ -166,11 +166,11 @@ class CFWL_FormImp : public CFWL_PanelImp { CFX_DIBitmap* m_pBigIcon;
CFX_DIBitmap* m_pSmallIcon;
FX_BOOL m_bMouseIn;
- friend class CFWL_FormDelegate;
+ friend class CFWL_FormImpDelegate;
};
-class CFWL_FormDelegate : public CFWL_WidgetImpDelegate {
+class CFWL_FormImpDelegate : public CFWL_WidgetImpDelegate {
public:
- CFWL_FormDelegate(CFWL_FormImp* pOwner);
+ CFWL_FormImpDelegate(CFWL_FormImp* pOwner);
virtual int32_t OnProcessMessage(CFWL_Message* pMessage);
virtual FWL_ERR OnProcessEvent(CFWL_Event* pEvent);
virtual FWL_ERR OnDrawWidget(CFX_Graphics* pGraphics,
diff --git a/xfa/src/fwl/src/core/include/fwl_gridimp.h b/xfa/src/fwl/src/core/include/fwl_gridimp.h index 693aac24f9..56910c57e0 100644 --- a/xfa/src/fwl/src/core/include/fwl_gridimp.h +++ b/xfa/src/fwl/src/core/include/fwl_gridimp.h @@ -178,11 +178,11 @@ class CFWL_GridImp : public CFWL_ContentImp { CFX_PtrArray m_Widgets;
CFX_MapPtrToPtr m_mapWidgetInfo;
CFWL_GridLength m_Size[6];
- friend class CFWL_GridDelegate;
+ friend class CFWL_GridImpDelegate;
};
-class CFWL_GridDelegate : public CFWL_WidgetImpDelegate {
+class CFWL_GridImpDelegate : public CFWL_WidgetImpDelegate {
public:
- CFWL_GridDelegate(CFWL_GridImp* pOwner);
+ CFWL_GridImpDelegate(CFWL_GridImp* pOwner);
virtual int32_t OnProcessMessage(CFWL_Message* pMessage);
virtual FWL_ERR OnDrawWidget(CFX_Graphics* pGraphics,
const CFX_Matrix* pMatrix = NULL);
|