summaryrefslogtreecommitdiff
path: root/xfa/fwl/lightwidget/cfwl_edit.h
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-08-08 17:30:37 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-08 17:30:37 -0700
commit5d8e5aa882fe8d37d32b71137f039165581ddb82 (patch)
treea0a2b0efa1ee6f8fd06c964f4b9cda5f551c74ae /xfa/fwl/lightwidget/cfwl_edit.h
parentb6befb2ed2485a3805cddea86dc7574510178ea9 (diff)
downloadpdfium-5d8e5aa882fe8d37d32b71137f039165581ddb82.tar.xz
Use virtual function to retrieve interface pointer
Use virtual function to return the actual interface type instead of the base interface type to avoid a lot of casts. Also tidy up CFWL_Widget by encapsulating variables, and use smart pointers for class owned member variables. Review-Url: https://codereview.chromium.org/2209153002
Diffstat (limited to 'xfa/fwl/lightwidget/cfwl_edit.h')
-rw-r--r--xfa/fwl/lightwidget/cfwl_edit.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/xfa/fwl/lightwidget/cfwl_edit.h b/xfa/fwl/lightwidget/cfwl_edit.h
index a6db961a2b..a9a466a49a 100644
--- a/xfa/fwl/lightwidget/cfwl_edit.h
+++ b/xfa/fwl/lightwidget/cfwl_edit.h
@@ -9,6 +9,7 @@
#include <vector>
+#include "xfa/fwl/basewidget/ifwl_edit.h"
#include "xfa/fwl/lightwidget/cfwl_widget.h"
class CFWL_WidgetProperties;
@@ -19,6 +20,9 @@ class CFWL_Edit : public CFWL_Widget {
CFWL_Edit();
~CFWL_Edit() override;
+ IFWL_Edit* GetWidget() override;
+ const IFWL_Edit* GetWidget() const override;
+
static CFWL_Edit* Create();
FWL_Error Initialize(const CFWL_WidgetProperties* pProperties = nullptr);
FWL_Error SetText(const CFX_WideString& wsText);