blob: 95cae64fa26998e15fc6f5fba91b0ec1b931d696 [file] [log] [blame]
// Copyright 2014 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#ifndef XFA_FWL_CORE_IFWL_FORM_H_
#define XFA_FWL_CORE_IFWL_FORM_H_
#include "xfa/fwl/core/ifwl_dataprovider.h"
#include "xfa/fwl/core/ifwl_widget.h"
#include "core/fxcrt/include/fx_system.h"
#include "xfa/fwl/core/cfwl_widgetimpproperties.h"
#define FWL_CLASS_Form L"FWL_FORM"
#define FWL_CLASSHASH_Form 881567292
#define FWL_CLASS_FormProxy L"FWL_FORMPROXY"
#define FWL_CLASSHASH_FormProxy 881567291
#define FWL_STYLEEXT_FRM_Resize (1L << 0)
#define FWL_STYLEEXT_FRM_NativeBorder (1L << 1)
#define FWL_STYLEEXT_FRM_RoundCorner (2L << 1)
#define FWL_STYLEEXT_FRM_RoundCorner4 (3L << 1)
#define FWL_STYLEEXT_FRM_NoDrawClient (1L << 3)
#define FWL_STYLEEXT_FRM_BorderCornerMask (3L << 1)
#define FWL_STYLEEXT_FRM_Max (3)
#if (_FX_OS_ == _FX_MACOSX_)
#define FWL_UseMacSystemBorder
#endif
#define FWL_WGTCAPACITY_FRM_CYCaption (FWL_WGTCAPACITY_MAX + 1)
#define FWL_WGTCAPACITY_FRM_CYNarrowCaption (FWL_WGTCAPACITY_MAX + 2)
#define FWL_WGTCAPACITY_FRM_BigIcon (FWL_WGTCAPACITY_MAX + 3)
#define FWL_WGTCAPACITY_FRM_SmallIcon (FWL_WGTCAPACITY_MAX + 4)
#define FWL_PART_FRM_Border 1
#define FWL_PART_FRM_Edge 2
#define FWL_PART_FRM_Background 3
#define FWL_PART_FRM_Caption 4
#define FWL_PART_FRM_NarrowCaption 5
#define FWL_PART_FRM_CloseBox 6
#define FWL_PART_FRM_MinimizeBox 7
#define FWL_PART_FRM_MaximizeBox 8
#define FWL_PART_FRM_HeadText 9
#define FWL_PART_FRM_Icon 10
#define FWL_PARTSTATE_FRM_Normal 1
#define FWL_PARTSTATE_FRM_Hover 2
#define FWL_PARTSTATE_FRM_Pressed 3
#define FWL_PARTSTATE_FRM_Inactive 4
#define FWL_PARTSTATE_FRM_Disabled 5
enum FWL_FORMSIZE {
FWL_FORMSIZE_Manual = 0,
FWL_FORMSIZE_Width,
FWL_FORMSIZE_Height,
FWL_FORMSIZE_All,
};
class CFX_DIBitmap;
class CFX_WideString;
class CFX_Path;
class IFWL_Widget;
class IFWL_Form;
class IFWL_FormDP : public IFWL_DataProvider {
public:
virtual CFX_DIBitmap* GetIcon(IFWL_Widget* pWidget, FX_BOOL bBig) = 0;
};
class IFWL_Form : public IFWL_Widget {
public:
static IFWL_Form* CreateFormProxy(CFWL_WidgetImpProperties& properties,
CFX_WideString* classname,
IFWL_Widget* pOuter);
FWL_FORMSIZE GetFormSize();
FWL_ERR SetFormSize(FWL_FORMSIZE eFormSize);
IFWL_Widget* DoModal();
IFWL_Widget* DoModal(uint32_t& dwCommandID);
FWL_ERR EndDoModal();
FWL_ERR SetBorderRegion(CFX_Path* pPath);
protected:
IFWL_Form();
};
#endif // XFA_FWL_CORE_IFWL_FORM_H_