Home | History | Annotate | Download | only in fwl
      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 #ifndef XFA_FWL_CFWL_APP_H_
      8 #define XFA_FWL_CFWL_APP_H_
      9 
     10 #include <memory>
     11 
     12 #include "core/fxcrt/fx_string.h"
     13 
     14 class CFWL_NoteDriver;
     15 class CFWL_WidgetMgr;
     16 class CXFA_FFApp;
     17 class CXFA_FWLAdapterWidgetMgr;
     18 class CFWL_Widget;
     19 
     20 enum FWL_KeyFlag {
     21   FWL_KEYFLAG_Ctrl = 1 << 0,
     22   FWL_KEYFLAG_Alt = 1 << 1,
     23   FWL_KEYFLAG_Shift = 1 << 2,
     24   FWL_KEYFLAG_Command = 1 << 3,
     25   FWL_KEYFLAG_LButton = 1 << 4,
     26   FWL_KEYFLAG_RButton = 1 << 5,
     27   FWL_KEYFLAG_MButton = 1 << 6
     28 };
     29 
     30 class CFWL_App {
     31  public:
     32   explicit CFWL_App(CXFA_FFApp* pAdapter);
     33   ~CFWL_App();
     34 
     35   CXFA_FFApp* GetAdapterNative() const { return m_pAdapterNative.Get(); }
     36   CFWL_WidgetMgr* GetWidgetMgr() const { return m_pWidgetMgr.get(); }
     37   CFWL_NoteDriver* GetNoteDriver() const { return m_pNoteDriver.get(); }
     38 
     39  private:
     40   UnownedPtr<CXFA_FFApp> const m_pAdapterNative;
     41   std::unique_ptr<CFWL_WidgetMgr> m_pWidgetMgr;
     42   std::unique_ptr<CFWL_NoteDriver> m_pNoteDriver;
     43 };
     44 
     45 #endif  // XFA_FWL_CFWL_APP_H_
     46