From 5d8e5aa882fe8d37d32b71137f039165581ddb82 Mon Sep 17 00:00:00 2001 From: weili Date: Mon, 8 Aug 2016 17:30:37 -0700 Subject: 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 --- xfa/fwl/lightwidget/cfwl_listbox.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'xfa/fwl/lightwidget/cfwl_listbox.h') diff --git a/xfa/fwl/lightwidget/cfwl_listbox.h b/xfa/fwl/lightwidget/cfwl_listbox.h index 725a7248a1..f647ae8d56 100644 --- a/xfa/fwl/lightwidget/cfwl_listbox.h +++ b/xfa/fwl/lightwidget/cfwl_listbox.h @@ -22,6 +22,9 @@ class CFWL_ListBox : public CFWL_Widget { CFWL_ListBox(); ~CFWL_ListBox() override; + IFWL_ListBox* GetWidget() override; + const IFWL_ListBox* GetWidget() const override; + static CFWL_ListBox* Create(); FWL_Error Initialize(const CFWL_WidgetProperties* pProperties = nullptr); FWL_Error AddDIBitmap(CFX_DIBitmap* pDIB, IFWL_ListItem* pItem); -- cgit v1.2.3