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

Side by Side Diff: fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp

Issue 1799773002: Move fpdfsdk/src up to fpdfsdk/. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 9 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
« no previous file with comments | « fpdfsdk/src/pdfwindow/PWL_Signature.cpp ('k') | fpdfsdk/src/pdfwindow/PWL_Utils.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "fpdfsdk/include/pdfwindow/PWL_Button.h"
8 #include "fpdfsdk/include/pdfwindow/PWL_SpecialButton.h"
9 #include "fpdfsdk/include/pdfwindow/PWL_Utils.h"
10 #include "fpdfsdk/include/pdfwindow/PWL_Wnd.h"
11
12 CPWL_PushButton::CPWL_PushButton() {}
13
14 CPWL_PushButton::~CPWL_PushButton() {}
15
16 CFX_ByteString CPWL_PushButton::GetClassName() const {
17 return "CPWL_PushButton";
18 }
19
20 CFX_FloatRect CPWL_PushButton::GetFocusRect() const {
21 return CPWL_Utils::DeflateRect(GetWindowRect(), (FX_FLOAT)GetBorderWidth());
22 }
23
24 CPWL_CheckBox::CPWL_CheckBox() : m_bChecked(false) {}
25
26 CPWL_CheckBox::~CPWL_CheckBox() {}
27
28 CFX_ByteString CPWL_CheckBox::GetClassName() const {
29 return "CPWL_CheckBox";
30 }
31
32 void CPWL_CheckBox::SetCheck(bool bCheck) {
33 m_bChecked = bCheck;
34 }
35
36 bool CPWL_CheckBox::IsChecked() const {
37 return m_bChecked;
38 }
39
40 FX_BOOL CPWL_CheckBox::OnLButtonUp(const CFX_FloatPoint& point,
41 FX_DWORD nFlag) {
42 if (IsReadOnly())
43 return FALSE;
44
45 SetCheck(!IsChecked());
46 return TRUE;
47 }
48
49 FX_BOOL CPWL_CheckBox::OnChar(FX_WORD nChar, FX_DWORD nFlag) {
50 SetCheck(!IsChecked());
51 return TRUE;
52 }
53
54 CPWL_RadioButton::CPWL_RadioButton() : m_bChecked(false) {}
55
56 CPWL_RadioButton::~CPWL_RadioButton() {}
57
58 CFX_ByteString CPWL_RadioButton::GetClassName() const {
59 return "CPWL_RadioButton";
60 }
61
62 FX_BOOL CPWL_RadioButton::OnLButtonUp(const CFX_FloatPoint& point,
63 FX_DWORD nFlag) {
64 if (IsReadOnly())
65 return FALSE;
66
67 SetCheck(TRUE);
68 return TRUE;
69 }
70
71 void CPWL_RadioButton::SetCheck(bool bCheck) {
72 m_bChecked = bCheck;
73 }
74
75 bool CPWL_RadioButton::IsChecked() const {
76 return m_bChecked;
77 }
78
79 FX_BOOL CPWL_RadioButton::OnChar(FX_WORD nChar, FX_DWORD nFlag) {
80 SetCheck(TRUE);
81 return TRUE;
82 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/pdfwindow/PWL_Signature.cpp ('k') | fpdfsdk/src/pdfwindow/PWL_Utils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698