summaryrefslogtreecommitdiff
path: root/xfa/fwl
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-11-16 07:01:26 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-16 07:01:26 -0800
commit72f957a0bafaf7c9628980e404c471b54f42de8f (patch)
tree1b6764bfdb0f87c01843397f16f191906d6810ec /xfa/fwl
parentf35650c8778522345d8a639f42add2874ffe44dd (diff)
downloadpdfium-chromium/2922.tar.xz
Cleaning up nits in fwl/core files.chromium/2922
This Cl cleans up the nits in the first set of cfwl_* files. The unused Event and Message classes are removed. Review-Url: https://codereview.chromium.org/2505703003
Diffstat (limited to 'xfa/fwl')
-rw-r--r--xfa/fwl/core/cfwl_combobox.cpp10
-rw-r--r--xfa/fwl/core/cfwl_datetimepicker.cpp2
-rw-r--r--xfa/fwl/core/cfwl_datetimepicker.h3
-rw-r--r--xfa/fwl/core/cfwl_event.h22
-rw-r--r--xfa/fwl/core/cfwl_listbox.cpp15
-rw-r--r--xfa/fwl/core/cfwl_message.h87
-rw-r--r--xfa/fwl/core/fwl_noteimp.cpp92
-rw-r--r--xfa/fwl/core/fwl_noteimp.h10
-rw-r--r--xfa/fwl/core/ifwl_checkbox.cpp8
-rw-r--r--xfa/fwl/core/ifwl_checkbox.h1
-rw-r--r--xfa/fwl/core/ifwl_comboboxproxy.cpp7
-rw-r--r--xfa/fwl/core/ifwl_comboboxproxy.h1
-rw-r--r--xfa/fwl/core/ifwl_datetimepicker.h4
-rw-r--r--xfa/fwl/core/ifwl_edit.cpp16
-rw-r--r--xfa/fwl/core/ifwl_edit.h4
-rw-r--r--xfa/fwl/core/ifwl_form.cpp86
-rw-r--r--xfa/fwl/core/ifwl_form.h4
-rw-r--r--xfa/fwl/core/ifwl_monthcalendar.h12
18 files changed, 27 insertions, 357 deletions
diff --git a/xfa/fwl/core/cfwl_combobox.cpp b/xfa/fwl/core/cfwl_combobox.cpp
index d1f95035d6..a8211e9773 100644
--- a/xfa/fwl/core/cfwl_combobox.cpp
+++ b/xfa/fwl/core/cfwl_combobox.cpp
@@ -47,9 +47,9 @@ int32_t CFWL_ComboBox::AddString(const CFX_WideStringC& wsText) {
}
bool CFWL_ComboBox::RemoveAt(int32_t iIndex) {
- if (iIndex < 0 || static_cast<size_t>(iIndex) >= m_ItemArray.size()) {
+ if (iIndex < 0 || static_cast<size_t>(iIndex) >= m_ItemArray.size())
return false;
- }
+
m_ItemArray.erase(m_ItemArray.begin() + iIndex);
return true;
}
@@ -167,7 +167,6 @@ CFWL_ListItem* CFWL_ComboBox::GetItem(const IFWL_Widget* pWidget,
int32_t nIndex) const {
if (nIndex < 0 || static_cast<size_t>(nIndex) >= m_ItemArray.size())
return nullptr;
-
return m_ItemArray[nIndex].get();
}
@@ -183,9 +182,7 @@ int32_t CFWL_ComboBox::GetItemIndex(IFWL_Widget* pWidget,
uint32_t CFWL_ComboBox::GetItemStyles(IFWL_Widget* pWidget,
CFWL_ListItem* pItem) {
- if (!pItem)
- return 0;
- return static_cast<CFWL_ListItem*>(pItem)->m_dwStyles;
+ return pItem ? static_cast<CFWL_ListItem*>(pItem)->m_dwStyles : 0;
}
void CFWL_ComboBox::GetItemText(IFWL_Widget* pWidget,
@@ -200,6 +197,7 @@ void CFWL_ComboBox::GetItemRect(IFWL_Widget* pWidget,
CFX_RectF& rtItem) {
if (!pItem)
return;
+
CFWL_ListItem* pComboItem = static_cast<CFWL_ListItem*>(pItem);
rtItem.Set(pComboItem->m_rtItem.left, pComboItem->m_rtItem.top,
pComboItem->m_rtItem.width, pComboItem->m_rtItem.height);
diff --git a/xfa/fwl/core/cfwl_datetimepicker.cpp b/xfa/fwl/core/cfwl_datetimepicker.cpp
index cead9045d9..809392d949 100644
--- a/xfa/fwl/core/cfwl_datetimepicker.cpp
+++ b/xfa/fwl/core/cfwl_datetimepicker.cpp
@@ -59,7 +59,7 @@ void CFWL_DateTimePicker::SetCurSel(int32_t iYear,
void CFWL_DateTimePicker::GetCaption(IFWL_Widget* pWidget,
CFX_WideString& wsCaption) {
- wsCaption = m_wsData;
+ wsCaption = L"";
}
void CFWL_DateTimePicker::GetToday(IFWL_Widget* pWidget,
diff --git a/xfa/fwl/core/cfwl_datetimepicker.h b/xfa/fwl/core/cfwl_datetimepicker.h
index f27082fa60..a43f69cf4c 100644
--- a/xfa/fwl/core/cfwl_datetimepicker.h
+++ b/xfa/fwl/core/cfwl_datetimepicker.h
@@ -36,9 +36,6 @@ class CFWL_DateTimePicker : public CFWL_Widget, public IFWL_DateTimePickerDP {
void GetBBox(CFX_RectF& rect);
void SetEditLimit(int32_t nLimit);
void ModifyEditStylesEx(uint32_t dwStylesExAdded, uint32_t dwStylesExRemoved);
-
- private:
- CFX_WideString m_wsData;
};
#endif // XFA_FWL_CORE_CFWL_DATETIMEPICKER_H_
diff --git a/xfa/fwl/core/cfwl_event.h b/xfa/fwl/core/cfwl_event.h
index 0052c4e097..4b74c02930 100644
--- a/xfa/fwl/core/cfwl_event.h
+++ b/xfa/fwl/core/cfwl_event.h
@@ -34,18 +34,12 @@ enum class CFWL_EventType {
Click,
Close,
CloseUp,
- ContextMenu,
- DataSelected,
- DateChanged,
- Draw,
DrawItem,
DropDown,
EditChanged,
HoverChanged,
- Idle,
Key,
KillFocus,
- MenuCommand,
Mouse,
MouseWheel,
PostDropDown,
@@ -144,9 +138,6 @@ FWL_EVENT_DEF(CFWL_EvtKillFocus,
CFWL_EventType::KillFocus,
IFWL_Widget* m_pKillFocus;)
-FWL_EVENT_DEF(CFWL_EvtDraw, CFWL_EventType::Draw, CFX_Graphics* m_pGraphics;
- IFWL_Widget * m_pWidget;)
-
FWL_EVENT_DEF(CFWL_EvtClick, CFWL_EventType::Click)
FWL_EVENT_DEF(CFWL_EvtScroll, CFWL_EventType::Scroll, FWL_SCBCODE m_iScrollCode;
@@ -155,23 +146,10 @@ FWL_EVENT_DEF(CFWL_EvtScroll, CFWL_EventType::Scroll, FWL_SCBCODE m_iScrollCode;
FWL_EVENT_DEF(CFWL_EvtClose, CFWL_EventType::Close)
-FWL_EVENT_DEF(CFWL_EvtContextMenu,
- CFWL_EventType::ContextMenu,
- FX_FLOAT m_fPosX;
- FX_FLOAT m_fPosY;
- IFWL_Widget * m_pOwner;)
-
-FWL_EVENT_DEF(CFWL_EvtMenuCommand,
- CFWL_EventType::MenuCommand,
- int32_t m_iCommand;
- void* m_pData;)
-
FWL_EVENT_DEF(CFWL_EvtSizeChanged,
CFWL_EventType::SizeChanged,
IFWL_Widget* m_pWidget;
CFX_RectF m_rtOld;
CFX_RectF m_rtNew;)
-FWL_EVENT_DEF(CFWL_EvtIdle, CFWL_EventType::Idle)
-
#endif // XFA_FWL_CORE_CFWL_EVENT_H_
diff --git a/xfa/fwl/core/cfwl_listbox.cpp b/xfa/fwl/core/cfwl_listbox.cpp
index 8742729080..c5bf881074 100644
--- a/xfa/fwl/core/cfwl_listbox.cpp
+++ b/xfa/fwl/core/cfwl_listbox.cpp
@@ -44,16 +44,15 @@ CFWL_ListItem* CFWL_ListBox::AddString(const CFX_WideStringC& wsAdd,
bool CFWL_ListBox::DeleteString(CFWL_ListItem* pItem) {
int32_t nIndex = GetItemIndex(GetWidget(), pItem);
- if (nIndex < 0 || static_cast<size_t>(nIndex) >= m_ItemArray.size()) {
+ if (nIndex < 0 || static_cast<size_t>(nIndex) >= m_ItemArray.size())
return false;
- }
+
int32_t iCount = CountItems(m_pIface.get());
int32_t iSel = nIndex + 1;
if (iSel >= iCount) {
iSel = nIndex - 1;
- if (iSel < 0) {
+ if (iSel < 0)
iSel = -1;
- }
}
if (iSel >= 0) {
CFWL_ListItem* pSel =
@@ -77,9 +76,7 @@ CFWL_ListItem* CFWL_ListBox::GetSelItem(int32_t nIndexSel) {
}
int32_t CFWL_ListBox::GetSelIndex(int32_t nIndex) {
- if (!GetWidget())
- return 0;
- return ToListBox(GetWidget())->GetSelIndex(nIndex);
+ return GetWidget() ? ToListBox(GetWidget())->GetSelIndex(nIndex) : 0;
}
void CFWL_ListBox::SetSelItem(CFWL_ListItem* pItem, bool bSelect) {
@@ -95,15 +92,13 @@ void CFWL_ListBox::GetItemText(CFWL_ListItem* pItem, CFX_WideString& wsText) {
CFWL_ListItem* CFWL_ListBox::GetItem(int32_t nIndex) {
if (nIndex < 0 || nIndex >= CountItems(nullptr))
return nullptr;
-
return m_ItemArray[nIndex].get();
}
uint32_t CFWL_ListBox::GetItemStates(CFWL_ListItem* pItem) {
if (!pItem)
return 0;
- CFWL_ListItem* pListItem = static_cast<CFWL_ListItem*>(pItem);
- return pListItem->m_dwStates | pListItem->m_dwCheckState;
+ return pItem->m_dwStates | pItem->m_dwCheckState;
}
void CFWL_ListBox::GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption) {
diff --git a/xfa/fwl/core/cfwl_message.h b/xfa/fwl/core/cfwl_message.h
index 0bfafb5a89..56e8185c29 100644
--- a/xfa/fwl/core/cfwl_message.h
+++ b/xfa/fwl/core/cfwl_message.h
@@ -14,22 +14,11 @@
enum class CFWL_MessageType {
None = 0,
-
- Activate,
- Close,
- Cursor,
- Deactivate,
- DropFiles,
Key,
KillFocus,
Mouse,
MouseWheel,
- Post,
- SetFocus,
- Size,
- TaskClicked,
- WindowMove,
- WindowWillMove
+ SetFocus
};
enum class FWL_MouseCommand {
@@ -39,9 +28,6 @@ enum class FWL_MouseCommand {
RightButtonDown,
RightButtonUp,
RightButtonDblClk,
- MiddleButtonDown,
- MiddleButtonUp,
- MiddleButtonDblClk,
Move,
Enter,
Leave,
@@ -100,30 +86,19 @@ inline CFWL_Message* CFWL_Message::Retain() {
return this;
}
-#define FWL_MESSAGE_CLASS_DEF(classname, msgType, ...) \
- class classname : public CFWL_Message { \
- public: \
- classname(); \
- ~classname() override; \
- CFWL_Message* Clone() override; \
- CFWL_MessageType GetClassID() const override; \
- __VA_ARGS__ \
- };
-
-#define FWL_MESSAGE_FUNCTION_DEF(classname, msgType, ...) \
- inline classname::classname() {} \
- inline classname::~classname() {} \
- inline CFWL_Message* classname::Clone() { return new classname(*this); } \
- inline CFWL_MessageType classname::GetClassID() const { return msgType; } \
- __VA_ARGS__
-
-#define FWL_MESSAGE_DEF(classname, msgType, ...) \
- FWL_MESSAGE_CLASS_DEF(classname, msgType, __VA_ARGS__) \
- FWL_MESSAGE_FUNCTION_DEF(classname, msgType)
-
-FWL_MESSAGE_DEF(CFWL_MsgActivate, CFWL_MessageType::Activate)
-
-FWL_MESSAGE_DEF(CFWL_MsgDeactivate, CFWL_MessageType::Deactivate)
+#define FWL_MESSAGE_DEF(classname, msgType, ...) \
+ class classname : public CFWL_Message { \
+ public: \
+ classname(); \
+ ~classname() override; \
+ CFWL_Message* Clone() override; \
+ CFWL_MessageType GetClassID() const override; \
+ __VA_ARGS__ \
+ }; \
+ inline classname::classname() {} \
+ inline classname::~classname() {} \
+ inline CFWL_Message* classname::Clone() { return new classname(*this); } \
+ inline CFWL_MessageType classname::GetClassID() const { return msgType; }
FWL_MESSAGE_DEF(CFWL_MsgMouse, CFWL_MessageType::Mouse, FX_FLOAT m_fx;
FX_FLOAT m_fy;
@@ -148,38 +123,4 @@ FWL_MESSAGE_DEF(CFWL_MsgKey, CFWL_MessageType::Key, uint32_t m_dwKeyCode;
uint32_t m_dwFlags;
FWL_KeyCommand m_dwCmd;)
-FWL_MESSAGE_DEF(CFWL_MsgCursor, CFWL_MessageType::Cursor)
-
-FWL_MESSAGE_DEF(CFWL_MsgSize, CFWL_MessageType::Size, int32_t m_iWidth;
- int32_t m_iHeight;)
-
-FWL_MESSAGE_DEF(CFWL_MsgWindowMove, CFWL_MessageType::WindowMove, FX_FLOAT m_fx;
- FX_FLOAT m_fy;)
-
-FWL_MESSAGE_CLASS_DEF(CFWL_MsgDropFiles,
- CFWL_MessageType::DropFiles,
- CFWL_MsgDropFiles(const CFWL_MsgDropFiles& copy);
- FX_FLOAT m_fx;
- FX_FLOAT m_fy;
- CFX_WideStringArray m_files;)
-FWL_MESSAGE_FUNCTION_DEF(
- CFWL_MsgDropFiles,
- CFWL_MessageType::DropFiles,
- inline CFWL_MsgDropFiles::CFWL_MsgDropFiles(const CFWL_MsgDropFiles& copy) {
- m_pDstTarget = copy.m_pDstTarget;
- m_pSrcTarget = copy.m_pSrcTarget;
- m_fx = copy.m_fx;
- m_fy = copy.m_fy;
- m_files.Append(copy.m_files);
- })
-
-FWL_MESSAGE_DEF(CFWL_MsgTaskClicked,
- CFWL_MessageType::TaskClicked,
- FX_FLOAT m_fx;
- FX_FLOAT m_fy;)
-
-FWL_MESSAGE_DEF(CFWL_MsgClose, CFWL_MessageType::Close)
-
-FWL_MESSAGE_DEF(CFWL_MsgWindowWillMove, CFWL_MessageType::WindowWillMove)
-
#endif // XFA_FWL_CORE_CFWL_MESSAGE_H_
diff --git a/xfa/fwl/core/fwl_noteimp.cpp b/xfa/fwl/core/fwl_noteimp.cpp
index f04d38d81b..716aa24e5f 100644
--- a/xfa/fwl/core/fwl_noteimp.cpp
+++ b/xfa/fwl/core/fwl_noteimp.cpp
@@ -232,15 +232,6 @@ bool CFWL_NoteDriver::DispatchMessage(CFWL_Message* pMessage,
IFWL_Widget* pMessageForm) {
bool bRet = false;
switch (pMessage->GetClassID()) {
- case CFWL_MessageType::Activate: {
- bRet = DoActivate(static_cast<CFWL_MsgActivate*>(pMessage), pMessageForm);
- break;
- }
- case CFWL_MessageType::Deactivate: {
- bRet = DoDeactivate(static_cast<CFWL_MsgDeactivate*>(pMessage),
- pMessageForm);
- break;
- }
case CFWL_MessageType::SetFocus: {
bRet = DoSetFocus(static_cast<CFWL_MsgSetFocus*>(pMessage), pMessageForm);
break;
@@ -262,24 +253,6 @@ bool CFWL_NoteDriver::DispatchMessage(CFWL_Message* pMessage,
bRet = DoWheel(static_cast<CFWL_MsgMouseWheel*>(pMessage), pMessageForm);
break;
}
- case CFWL_MessageType::Size: {
- bRet = DoSize(static_cast<CFWL_MsgSize*>(pMessage));
- break;
- }
- case CFWL_MessageType::Cursor: {
- bRet = true;
- break;
- }
- case CFWL_MessageType::WindowMove: {
- bRet = DoWindowMove(static_cast<CFWL_MsgWindowMove*>(pMessage),
- pMessageForm);
- break;
- }
- case CFWL_MessageType::DropFiles: {
- bRet =
- DoDragFiles(static_cast<CFWL_MsgDropFiles*>(pMessage), pMessageForm);
- break;
- }
default: {
bRet = true;
break;
@@ -294,43 +267,6 @@ bool CFWL_NoteDriver::DispatchMessage(CFWL_Message* pMessage,
return bRet;
}
-bool CFWL_NoteDriver::DoActivate(CFWL_MsgActivate* pMsg,
- IFWL_Widget* pMessageForm) {
- pMsg->m_pDstTarget = pMessageForm;
- return !!(pMsg->m_pDstTarget->GetStates() & FWL_WGTSTATE_Deactivated);
-}
-
-bool CFWL_NoteDriver::DoDeactivate(CFWL_MsgDeactivate* pMsg,
- IFWL_Widget* pMessageForm) {
- 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() == FWL_Type::ToolTip) {
- 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"));
-}
bool CFWL_NoteDriver::DoSetFocus(CFWL_MsgSetFocus* pMsg,
IFWL_Widget* pMessageForm) {
CFWL_WidgetMgr* pWidgetMgr = pMessageForm->GetOwnerApp()->GetWidgetMgr();
@@ -444,23 +380,7 @@ bool CFWL_NoteDriver::DoWheel(CFWL_MsgMouseWheel* pMsg,
pMsg->m_pDstTarget = pDst;
return true;
}
-bool CFWL_NoteDriver::DoSize(CFWL_MsgSize* pMsg) {
- CFWL_WidgetMgr* pWidgetMgr =
- pMsg->m_pDstTarget->GetOwnerApp()->GetWidgetMgr();
- if (!pWidgetMgr)
- return false;
- pWidgetMgr->NotifySizeChanged(pMsg->m_pDstTarget, (FX_FLOAT)pMsg->m_iWidth,
- (FX_FLOAT)pMsg->m_iHeight);
- return true;
-}
-bool CFWL_NoteDriver::DoWindowMove(CFWL_MsgWindowMove* pMsg,
- IFWL_Widget* pMessageForm) {
- return pMsg->m_pDstTarget == pMessageForm;
-}
-bool CFWL_NoteDriver::DoDragFiles(CFWL_MsgDropFiles* pMsg,
- IFWL_Widget* pMessageForm) {
- return pMsg->m_pDstTarget == pMessageForm;
-}
+
bool CFWL_NoteDriver::DoMouseEx(CFWL_MsgMouse* pMsg,
IFWL_Widget* pMessageForm) {
CFWL_WidgetMgr* pWidgetMgr = pMessageForm->GetOwnerApp()->GetWidgetMgr();
@@ -512,9 +432,6 @@ void CFWL_NoteDriver::MouseSecondary(CFWL_MsgMouse* pMsg) {
DispatchMessage(&msHover, nullptr);
}
bool CFWL_NoteDriver::IsValidMessage(CFWL_Message* pMessage) {
- if (pMessage->GetClassID() == CFWL_MessageType::Post)
- return true;
-
int32_t iCount = m_noteLoopQueue.GetSize();
for (int32_t i = 0; i < iCount; i++) {
CFWL_NoteLoop* pNoteLoop = static_cast<CFWL_NoteLoop*>(m_noteLoopQueue[i]);
@@ -591,8 +508,7 @@ bool CFWL_EventTarget::ProcessEvent(CFWL_Event* pEvent) {
IFWL_Widget* pSource = nullptr;
uint32_t dwFilter = 0;
m_eventSources.GetNextAssoc(pos, (void*&)pSource, dwFilter);
- if (pSource == pEvent->m_pSrcTarget ||
- pEvent->GetClassID() == CFWL_EventType::Idle) {
+ if (pSource == pEvent->m_pSrcTarget) {
if (IsFilterEvent(pEvent, dwFilter)) {
pDelegate->OnProcessEvent(pEvent);
return true;
@@ -617,14 +533,10 @@ bool CFWL_EventTarget::IsFilterEvent(CFWL_Event* pEvent,
case CFWL_EventType::SetFocus:
case CFWL_EventType::KillFocus:
return !!(dwFilter & FWL_EVENT_FOCUSCHANGED_MASK);
- case CFWL_EventType::Draw:
- return !!(dwFilter & FWL_EVENT_DRAW_MASK);
case CFWL_EventType::Close:
return !!(dwFilter & FWL_EVENT_CLOSE_MASK);
case CFWL_EventType::SizeChanged:
return !!(dwFilter & FWL_EVENT_SIZECHANGED_MASK);
- case CFWL_EventType::Idle:
- return !!(dwFilter & FWL_EVENT_IDLE_MASK);
default:
return !!(dwFilter & FWL_EVENT_CONTROL_MASK);
}
diff --git a/xfa/fwl/core/fwl_noteimp.h b/xfa/fwl/core/fwl_noteimp.h
index 45a92e7028..320ea44f84 100644
--- a/xfa/fwl/core/fwl_noteimp.h
+++ b/xfa/fwl/core/fwl_noteimp.h
@@ -17,16 +17,11 @@
#include "xfa/fxgraphics/cfx_graphics.h"
class CFWL_EventTarget;
-class CFWL_MsgActivate;
-class CFWL_MsgDeactivate;
-class CFWL_MsgDropFiles;
class CFWL_MsgKey;
class CFWL_MsgKillFocus;
class CFWL_MsgMouse;
class CFWL_MsgMouseWheel;
class CFWL_MsgSetFocus;
-class CFWL_MsgSize;
-class CFWL_MsgWindowMove;
class CFWL_TargetImp;
class IFWL_ToolTip;
class IFWL_Widget;
@@ -83,16 +78,11 @@ class CFWL_NoteDriver {
private:
bool DispatchMessage(CFWL_Message* pMessage, IFWL_Widget* pMessageForm);
- bool DoActivate(CFWL_MsgActivate* pMsg, IFWL_Widget* pMessageForm);
- bool DoDeactivate(CFWL_MsgDeactivate* pMsg, IFWL_Widget* pMessageForm);
bool DoSetFocus(CFWL_MsgSetFocus* pMsg, IFWL_Widget* pMessageForm);
bool DoKillFocus(CFWL_MsgKillFocus* pMsg, IFWL_Widget* pMessageForm);
bool DoKey(CFWL_MsgKey* pMsg, IFWL_Widget* pMessageForm);
bool DoMouse(CFWL_MsgMouse* pMsg, IFWL_Widget* pMessageForm);
bool DoWheel(CFWL_MsgMouseWheel* pMsg, IFWL_Widget* pMessageForm);
- bool DoSize(CFWL_MsgSize* pMsg);
- bool DoWindowMove(CFWL_MsgWindowMove* pMsg, IFWL_Widget* pMessageForm);
- bool DoDragFiles(CFWL_MsgDropFiles* pMsg, IFWL_Widget* pMessageForm);
bool DoMouseEx(CFWL_MsgMouse* pMsg, IFWL_Widget* pMessageForm);
void MouseSecondary(CFWL_MsgMouse* pMsg);
bool IsValidMessage(CFWL_Message* pMessage);
diff --git a/xfa/fwl/core/ifwl_checkbox.cpp b/xfa/fwl/core/ifwl_checkbox.cpp
index 76a377acbf..e309a35cd0 100644
--- a/xfa/fwl/core/ifwl_checkbox.cpp
+++ b/xfa/fwl/core/ifwl_checkbox.cpp
@@ -374,9 +374,6 @@ void IFWL_CheckBox::OnProcessMessage(CFWL_Message* pMessage) {
return;
switch (pMessage->GetClassID()) {
- case CFWL_MessageType::Activate:
- OnActivate(pMessage);
- break;
case CFWL_MessageType::SetFocus:
OnFocusChanged(pMessage, true);
break;
@@ -421,11 +418,6 @@ void IFWL_CheckBox::OnDrawWidget(CFX_Graphics* pGraphics,
DrawWidget(pGraphics, pMatrix);
}
-void IFWL_CheckBox::OnActivate(CFWL_Message* pMsg) {
- m_pProperties->m_dwStates &= ~FWL_WGTSTATE_Deactivated;
- Repaint(&(m_rtClient));
-}
-
void IFWL_CheckBox::OnFocusChanged(CFWL_Message* pMsg, bool bSet) {
if (bSet)
m_pProperties->m_dwStates |= FWL_WGTSTATE_Focused;
diff --git a/xfa/fwl/core/ifwl_checkbox.h b/xfa/fwl/core/ifwl_checkbox.h
index cda02b5168..06e8f703af 100644
--- a/xfa/fwl/core/ifwl_checkbox.h
+++ b/xfa/fwl/core/ifwl_checkbox.h
@@ -77,7 +77,6 @@ class IFWL_CheckBox : public IFWL_Widget {
uint32_t GetPartStates();
void UpdateTextOutStyles();
void NextStates();
- void OnActivate(CFWL_Message* pMsg);
void OnFocusChanged(CFWL_Message* pMsg, bool bSet);
void OnLButtonDown(CFWL_MsgMouse* pMsg);
void OnLButtonUp(CFWL_MsgMouse* pMsg);
diff --git a/xfa/fwl/core/ifwl_comboboxproxy.cpp b/xfa/fwl/core/ifwl_comboboxproxy.cpp
index e7ce1bd77d..2ca65d7f69 100644
--- a/xfa/fwl/core/ifwl_comboboxproxy.cpp
+++ b/xfa/fwl/core/ifwl_comboboxproxy.cpp
@@ -41,9 +41,6 @@ void IFWL_ComboBoxProxy::OnProcessMessage(CFWL_Message* pMessage) {
}
break;
}
- case CFWL_MessageType::Deactivate:
- OnDeactive(static_cast<CFWL_MsgDeactivate*>(pMessage));
- break;
case CFWL_MessageType::KillFocus:
OnFocusChanged(static_cast<CFWL_MsgKillFocus*>(pMessage), false);
break;
@@ -103,10 +100,6 @@ void IFWL_ComboBoxProxy::OnLButtonUp(CFWL_MsgMouse* pMsg) {
}
}
-void IFWL_ComboBoxProxy::OnDeactive(CFWL_MsgDeactivate* pMsg) {
- m_pComboBox->ShowDropList(false);
-}
-
void IFWL_ComboBoxProxy::OnFocusChanged(CFWL_MsgKillFocus* pMsg, bool bSet) {
if (bSet)
return;
diff --git a/xfa/fwl/core/ifwl_comboboxproxy.h b/xfa/fwl/core/ifwl_comboboxproxy.h
index ec048fed16..243937726f 100644
--- a/xfa/fwl/core/ifwl_comboboxproxy.h
+++ b/xfa/fwl/core/ifwl_comboboxproxy.h
@@ -29,7 +29,6 @@ class IFWL_ComboBoxProxy : public IFWL_FormProxy {
private:
void OnLButtonDown(CFWL_MsgMouse* pMsg);
void OnLButtonUp(CFWL_MsgMouse* pMsg);
- void OnDeactive(CFWL_MsgDeactivate* pMsg);
void OnFocusChanged(CFWL_MsgKillFocus* pMsg, bool bSet);
bool m_bLButtonDown;
diff --git a/xfa/fwl/core/ifwl_datetimepicker.h b/xfa/fwl/core/ifwl_datetimepicker.h
index eddb596adc..5a40a05638 100644
--- a/xfa/fwl/core/ifwl_datetimepicker.h
+++ b/xfa/fwl/core/ifwl_datetimepicker.h
@@ -41,10 +41,6 @@ FWL_EVENT_DEF(CFWL_Event_DtpEditChanged,
CFWL_EventType::EditChanged,
CFX_WideString m_wsText;)
-FWL_EVENT_DEF(CFWL_Event_DtpHoverChanged,
- CFWL_EventType::HoverChanged,
- int32_t hoverday;)
-
FWL_EVENT_DEF(CFWL_Event_DtpSelectChanged,
CFWL_EventType::SelectChanged,
int32_t iYear;
diff --git a/xfa/fwl/core/ifwl_edit.cpp b/xfa/fwl/core/ifwl_edit.cpp
index 55ee785845..3e864baa28 100644
--- a/xfa/fwl/core/ifwl_edit.cpp
+++ b/xfa/fwl/core/ifwl_edit.cpp
@@ -1348,12 +1348,6 @@ void IFWL_Edit::OnProcessMessage(CFWL_Message* pMessage) {
CFWL_MessageType dwMsgCode = pMessage->GetClassID();
switch (dwMsgCode) {
- case CFWL_MessageType::Activate:
- DoActivate(static_cast<CFWL_MsgActivate*>(pMessage));
- break;
- case CFWL_MessageType::Deactivate:
- DoDeactivate(static_cast<CFWL_MsgDeactivate*>(pMessage));
- break;
case CFWL_MessageType::SetFocus:
case CFWL_MessageType::KillFocus:
OnFocusChanged(pMessage, dwMsgCode == CFWL_MessageType::SetFocus);
@@ -1415,16 +1409,6 @@ void IFWL_Edit::OnDrawWidget(CFX_Graphics* pGraphics,
DrawWidget(pGraphics, pMatrix);
}
-void IFWL_Edit::DoActivate(CFWL_MsgActivate* pMsg) {
- m_pProperties->m_dwStates |= ~FWL_WGTSTATE_Deactivated;
- Repaint(&m_rtClient);
-}
-
-void IFWL_Edit::DoDeactivate(CFWL_MsgDeactivate* pMsg) {
- m_pProperties->m_dwStates &= FWL_WGTSTATE_Deactivated;
- Repaint(&m_rtClient);
-}
-
void IFWL_Edit::DoButtonDown(CFWL_MsgMouse* pMsg) {
if ((m_pProperties->m_dwStates & FWL_WGTSTATE_Focused) == 0)
SetFocus(true);
diff --git a/xfa/fwl/core/ifwl_edit.h b/xfa/fwl/core/ifwl_edit.h
index 2acc3856d4..262d16e8f0 100644
--- a/xfa/fwl/core/ifwl_edit.h
+++ b/xfa/fwl/core/ifwl_edit.h
@@ -86,8 +86,6 @@ FWL_EVENT_DEF(CFWL_EvtEdtCheckWord,
class IFDE_TxtEdtDoRecord;
class IFWL_Edit;
-class CFWL_MsgActivate;
-class CFWL_MsgDeactivate;
class CFWL_MsgMouse;
class CFWL_WidgetProperties;
class IFWL_Caret;
@@ -196,8 +194,6 @@ class IFWL_Edit : public IFWL_Widget {
int32_t nCount,
FX_FLOAT fOffSetX,
FX_FLOAT fOffSetY);
- void DoActivate(CFWL_MsgActivate* pMsg);
- void DoDeactivate(CFWL_MsgDeactivate* pMsg);
void DoButtonDown(CFWL_MsgMouse* pMsg);
void OnFocusChanged(CFWL_Message* pMsg, bool bSet);
void OnLButtonDown(CFWL_MsgMouse* pMsg);
diff --git a/xfa/fwl/core/ifwl_form.cpp b/xfa/fwl/core/ifwl_form.cpp
index 9e632a009a..42827ab759 100644
--- a/xfa/fwl/core/ifwl_form.cpp
+++ b/xfa/fwl/core/ifwl_form.cpp
@@ -666,62 +666,13 @@ void IFWL_Form::UpdateCaption() {
}
#ifdef FWL_UseMacSystemBorder
-void IFWL_Form::OnProcessMessage(CFWL_Message* pMessage) {
- if (!pMessage)
- return;
-
- switch (pMessage->GetClassID()) {
- case CFWL_MessageType::Activate: {
- m_pProperties->m_dwStates &= ~FWL_WGTSTATE_Deactivated;
- Repaint(&m_rtRelative);
- break;
- }
- case CFWL_MessageType::Deactivate: {
- m_pProperties->m_dwStates |= FWL_WGTSTATE_Deactivated;
- Repaint(&m_rtRelative);
- break;
- }
- default:
- break;
- }
-}
+void IFWL_Form::OnProcessMessage(CFWL_Message* pMessage) {}
#else
void IFWL_Form::OnProcessMessage(CFWL_Message* pMessage) {
if (!pMessage)
return;
switch (pMessage->GetClassID()) {
- case CFWL_MessageType::Activate: {
- m_pProperties->m_dwStates &= ~FWL_WGTSTATE_Deactivated;
- const IFWL_App* pApp = GetOwnerApp();
- CFWL_NoteDriver* pDriver =
- static_cast<CFWL_NoteDriver*>(pApp->GetNoteDriver());
- IFWL_Widget* pSubFocus = GetSubFocus();
- if (pSubFocus && pSubFocus != pDriver->GetFocus())
- pDriver->SetFocus(pSubFocus);
-
- Repaint(&m_rtRelative);
- break;
- }
- case CFWL_MessageType::Deactivate: {
- m_pProperties->m_dwStates |= FWL_WGTSTATE_Deactivated;
- const IFWL_App* pApp = GetOwnerApp();
- CFWL_NoteDriver* pDriver =
- static_cast<CFWL_NoteDriver*>(pApp->GetNoteDriver());
- IFWL_Widget* pSubFocus = GetSubFocus();
- if (pSubFocus) {
- if (pSubFocus == pDriver->GetFocus()) {
- pDriver->SetFocus(nullptr);
- } else if (pSubFocus->GetStates() & FWL_WGTSTATE_Focused) {
- if (IFWL_WidgetDelegate* pDelegate = pSubFocus->GetDelegate()) {
- CFWL_MsgKillFocus ms;
- pDelegate->OnProcessMessage(&ms);
- }
- }
- }
- Repaint(&m_rtRelative);
- break;
- }
case CFWL_MessageType::Mouse: {
CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage);
switch (pMsg->m_dwCmd) {
@@ -745,30 +696,6 @@ void IFWL_Form::OnProcessMessage(CFWL_Message* pMessage) {
}
break;
}
- case CFWL_MessageType::Size: {
- CFWL_WidgetMgr* pWidgetMgr = GetOwnerApp()->GetWidgetMgr();
- if (!pWidgetMgr)
- return;
-
- pWidgetMgr->AddRedrawCounts(this);
- if (!m_bSetMaximize)
- break;
-
- m_bSetMaximize = false;
- CFWL_MsgSize* pMsg = static_cast<CFWL_MsgSize*>(pMessage);
- m_pProperties->m_rtWidget.left = 0;
- m_pProperties->m_rtWidget.top = 0;
- m_pProperties->m_rtWidget.width = (FX_FLOAT)pMsg->m_iWidth;
- m_pProperties->m_rtWidget.height = (FX_FLOAT)pMsg->m_iHeight;
- Update();
- break;
- }
- case CFWL_MessageType::WindowMove:
- OnWindowMove(static_cast<CFWL_MsgWindowMove*>(pMessage));
- break;
- case CFWL_MessageType::Close:
- OnClose(static_cast<CFWL_MsgClose*>(pMessage));
- break;
default:
break;
}
@@ -901,17 +828,6 @@ void IFWL_Form::OnLButtonDblClk(CFWL_MsgMouse* pMsg) {
}
}
-void IFWL_Form::OnWindowMove(CFWL_MsgWindowMove* pMsg) {
- m_pProperties->m_rtWidget.left = pMsg->m_fx;
- m_pProperties->m_rtWidget.top = pMsg->m_fy;
-}
-
-void IFWL_Form::OnClose(CFWL_MsgClose* pMsg) {
- CFWL_EvtClose eClose;
- eClose.m_pSrcTarget = this;
- DispatchEvent(&eClose);
-}
-
CFWL_SysBtn::CFWL_SysBtn() {
m_rtBtn.Set(0, 0, 0, 0);
m_dwState = 0;
diff --git a/xfa/fwl/core/ifwl_form.h b/xfa/fwl/core/ifwl_form.h
index 77acbd84d4..d4244d5354 100644
--- a/xfa/fwl/core/ifwl_form.h
+++ b/xfa/fwl/core/ifwl_form.h
@@ -69,8 +69,6 @@ struct RestoreInfo {
};
class CFWL_MsgMouse;
-class CFWL_MsgClose;
-class CFWL_MsgWindowMove;
class CFWL_NoteLoop;
class IFWL_Widget;
class IFWL_ThemeProvider;
@@ -136,8 +134,6 @@ class IFWL_Form : public IFWL_Widget {
void OnMouseMove(CFWL_MsgMouse* pMsg);
void OnMouseLeave(CFWL_MsgMouse* pMsg);
void OnLButtonDblClk(CFWL_MsgMouse* pMsg);
- void OnWindowMove(CFWL_MsgWindowMove* pMsg);
- void OnClose(CFWL_MsgClose* pMsg);
#if (_FX_OS_ == _FX_MACOSX_)
bool m_bMouseIn;
diff --git a/xfa/fwl/core/ifwl_monthcalendar.h b/xfa/fwl/core/ifwl_monthcalendar.h
index 20aecce619..78b2b6b3a0 100644
--- a/xfa/fwl/core/ifwl_monthcalendar.h
+++ b/xfa/fwl/core/ifwl_monthcalendar.h
@@ -22,18 +22,6 @@
#define FWL_ITEMSTATE_MCD_Selected (1L << 1)
#define FWL_ITEMSTATE_MCD_Focused (1L << 2)
-FWL_EVENT_DEF(CFWL_Event_McdDateSelected,
- CFWL_EventType::DataSelected,
- int32_t m_iStartDay;
- int32_t m_iEndDay;)
-
-FWL_EVENT_DEF(CFWL_EventMcdDateChanged,
- CFWL_EventType::DateChanged,
- int32_t m_iOldYear;
- int32_t m_iOldMonth;
- int32_t m_iStartDay;
- int32_t m_iEndDay;)
-
class CFWL_MsgMouse;
class IFWL_Widget;