7#include "xfa/fwl/cfwl_pushbutton.h"
9#include "xfa/fde/cfde_textout.h"
10#include "xfa/fwl/cfwl_event.h"
11#include "xfa/fwl/cfwl_eventmouse.h"
12#include "xfa/fwl/cfwl_messagekey.h"
13#include "xfa/fwl/cfwl_messagemouse.h"
14#include "xfa/fwl/cfwl_notedriver.h"
15#include "xfa/fwl/cfwl_themebackground.h"
16#include "xfa/fwl/cfwl_themetext.h"
17#include "xfa/fwl/fwl_widgetdef.h"
18#include "xfa/fwl/ifwl_themeprovider.h"
20CFWL_PushButton::CFWL_PushButton(CFWL_App* app)
42 m_CaptionRect
= m_ClientRect;
53 DrawBkground(pGraphics, matrix);
60 param.m_dwStates = GetPartStates();
64 param.m_pRtData = &m_CaptionRect;
93 CFWL_MessageMouse* pMsg =
static_cast<CFWL_MessageMouse*>(pMessage);
113 CFWL_MessageKey* pKey =
static_cast<CFWL_MessageKey*>(pMessage);
131void CFWL_PushButton::OnFocusGained() {
136void CFWL_PushButton::OnFocusLost() {
141void CFWL_PushButton::OnLButtonDown(CFWL_MessageMouse* pMsg) {
148void CFWL_PushButton::OnLButtonUp(CFWL_MessageMouse* pMsg) {
150 if (m_ClientRect.Contains(pMsg->m_pos)) {
157 if (m_ClientRect.Contains(pMsg->m_pos)) {
164void CFWL_PushButton::OnMouseMove(CFWL_MessageMouse* pMsg) {
165 bool bRepaint =
false;
167 if (m_ClientRect.Contains(pMsg->m_pos)) {
187 if (!m_ClientRect.Contains(pMsg->m_pos))
198void CFWL_PushButton::OnMouseLeave(CFWL_MessageMouse* pMsg) {
205void CFWL_PushButton::OnKeyDown(CFWL_MessageKey* pMsg) {
209 CFWL_EventMouse wmMouse(
this,
nullptr,
CFWL_Widget * GetSrcTarget() const
const uint32_t m_dwKeyCodeOrChar
const MouseCommand m_dwCmd
CFWL_Widget * GetDstTarget() const
CFX_Matrix & operator=(const CFX_Matrix &other)=default
CFX_RectF & operator=(const CFX_RectF &other)=default