summaryrefslogtreecommitdiff
path: root/xfa/include/fwl/lightwidget/picturebox.h
blob: dd87d6806b39696a627c6aa87a1e14f5747c27cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// 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 _FWL_PICTUREBOX_LIGHT_H
#define _FWL_PICTUREBOX_LIGHT_H
class CFWL_Widget;
class CFWL_WidgetProperties;
class IFWL_PictureBoxDP;
class CFWL_PictureBox;
class CFWL_PictureBoxDP;
class CFWL_PictureBox : public CFWL_Widget
{
public:
    static CFWL_PictureBox* Create();
    FWL_ERR			Initialize(const CFWL_WidgetProperties *pProperties = NULL);
    CFX_DIBitmap*	GetPicture();
    FWL_ERR			SetPicture(CFX_DIBitmap *pBitmap);
    FX_FLOAT		GetRotation();
    FWL_ERR			SetRotation(FX_FLOAT fRotation);
    FX_INT32		GetFlipMode();
    FWL_ERR			SetFlipMode(FX_INT32 iFlipMode);
    FX_INT32		GetOpacity();
    FWL_ERR			SetOpacity(FX_INT32 iOpacity);
    FWL_ERR			GetScale(FX_FLOAT &fScaleX, FX_FLOAT &fScaleY);
    FWL_ERR			SetScale(FX_FLOAT fScaleX, FX_FLOAT fScaleY);
    FWL_ERR			GetOffset(FX_FLOAT &fx, FX_FLOAT &fy);
    FWL_ERR			SetOffset(FX_FLOAT fx, FX_FLOAT fy);
    CFWL_PictureBox();
    virtual ~CFWL_PictureBox();
protected:
    class CFWL_PictureBoxDP : public IFWL_PictureBoxDP
    {
    public:
        CFWL_PictureBoxDP()
        {
            m_fRotation = 0.0f;
            m_fScaleX = 1.0f;
            m_fScaleY = 1.0f;
            m_fOffSetX = 0.0f;
            m_fOffSetY = 0.0f;
            m_pBitmap = NULL;
        };
        virtual FWL_ERR			GetCaption(IFWL_Widget *pWidget, CFX_WideString &wsCaption);
        virtual CFX_DIBitmap*	GetPicture(IFWL_Widget *pWidget);
        virtual CFX_DIBitmap*	GetErrorPicture(IFWL_Widget *pWidget);
        virtual CFX_DIBitmap*	GetInitialPicture(IFWL_Widget *pWidget);
        virtual FX_INT32		GetOpacity(IFWL_Widget *pWidget);
        virtual FX_INT32		GetFlipMode(IFWL_Widget *pWidget);
        virtual FWL_ERR			GetMatrix(IFWL_Widget *pWidget, CFX_Matrix &matrix);
        CFX_DIBitmap	*m_pBitmap;
        FX_INT32		m_iOpacity;
        FX_INT32		m_iFlipMode;
        FX_FLOAT		m_fRotation;
        FX_FLOAT		m_fScaleX;
        FX_FLOAT		m_fScaleY;
        FX_FLOAT		m_fOffSetX;
        FX_FLOAT		m_fOffSetY;
        CFX_WideString	m_wsData;
    };
    CFWL_PictureBoxDP m_PictureBoxDP;
};
#endif