Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(509)

Side by Side Diff: xfa/fwl/lightwidget/caret.cpp

Issue 1834323003: Move xfa/include/fwl/{theme,lightwidget} to xfa/fwl (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 PDFium Authors. All rights reserved.
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/include/fwl/lightwidget/caret.h"
8
9 #include <memory>
10
11 #include "xfa/fwl/basewidget/ifwl_caret.h"
12 #include "xfa/fwl/core/fwl_targetimp.h"
13 #include "xfa/fxgraphics/cfx_color.h"
14 #include "xfa/include/fwl/lightwidget/edit.h"
15
16 CFWL_Caret* CFWL_Caret::Create() {
17 return new CFWL_Caret;
18 }
19 FWL_ERR CFWL_Caret::Initialize(const CFWL_WidgetProperties* pProperties) {
20 if (m_pIface)
21 return FWL_ERR_Indefinite;
22 if (pProperties) {
23 *m_pProperties = *pProperties;
24 }
25 std::unique_ptr<IFWL_Caret> pCaret(IFWL_Caret::Create(
26 m_pProperties->MakeWidgetImpProperties(nullptr), nullptr));
27 FWL_ERR ret = pCaret->Initialize();
28 if (ret != FWL_ERR_Succeeded) {
29 return ret;
30 }
31 m_pIface = pCaret.release();
32 CFWL_Widget::Initialize();
33 return FWL_ERR_Succeeded;
34 }
35 FWL_ERR CFWL_Caret::ShowCaret(FX_BOOL bFlag) {
36 return static_cast<IFWL_Caret*>(m_pIface)->ShowCaret(bFlag);
37 }
38 FWL_ERR CFWL_Caret::GetFrequency(uint32_t& elapse) {
39 return static_cast<IFWL_Caret*>(m_pIface)->GetFrequency(elapse);
40 }
41 FWL_ERR CFWL_Caret::SetFrequency(uint32_t elapse) {
42 return static_cast<IFWL_Caret*>(m_pIface)->SetFrequency(elapse);
43 }
44 FWL_ERR CFWL_Caret::SetColor(CFX_Color crFill) {
45 return static_cast<IFWL_Caret*>(m_pIface)->SetColor(crFill);
46 }
47 CFWL_Caret::CFWL_Caret() {}
48 CFWL_Caret::~CFWL_Caret() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698