Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cfwl_comboedit.cpp
Go to the documentation of this file.
1// Copyright 2016 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#include "xfa/fwl/cfwl_comboedit.h"
8
9#include "xfa/fde/cfde_texteditengine.h"
10#include "xfa/fwl/cfwl_combobox.h"
11#include "xfa/fwl/cfwl_messagemouse.h"
12
13CFWL_ComboEdit::CFWL_ComboEdit(CFWL_App* app,
14 const Properties& properties,
15 CFWL_Widget* pOuter)
16 : CFWL_Edit(app, properties, pOuter) {}
17
18CFWL_ComboEdit::~CFWL_ComboEdit() = default;
19
20void CFWL_ComboEdit::ClearSelected() {
23}
24
25void CFWL_ComboEdit::SetSelected() {
27 SelectAll();
28}
29
30void CFWL_ComboEdit::OnProcessMessage(CFWL_Message* pMessage) {
31 bool backDefault = true;
32 switch (pMessage->GetType()) {
35 backDefault = false;
36 break;
37 }
40 backDefault = false;
41 break;
42 }
44 CFWL_MessageMouse* pMsg = static_cast<CFWL_MessageMouse*>(pMessage);
45 if ((pMsg->m_dwCmd == CFWL_MessageMouse::MouseCommand::kLeftButtonDown) &&
48 }
49 break;
50 }
51 default:
52 break;
53 }
54 if (backDefault)
56}
#define FWL_STATE_WGT_Focused
Definition cfwl_widget.h:42
void OnProcessMessage(CFWL_Message *pMessage) override
~CFWL_ComboEdit() override
const CFX_RectF & GetRTClient() const
Definition cfwl_edit.h:105
void OnProcessMessage(CFWL_Message *pMessage) override
void ClearSelection()
CFWL_Edit(CFWL_App *app, const Properties &properties, CFWL_Widget *pOuter)
Definition cfwl_edit.cpp:50
void SelectAll()
const MouseCommand m_dwCmd
Type GetType() const
Properties m_Properties
void RepaintRect(const CFX_RectF &pRect)