OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef XFA_INCLUDE_FWL_CORE_FWL_GRID_H_ | 7 #ifndef XFA_INCLUDE_FWL_CORE_FWL_GRID_H_ |
8 #define XFA_INCLUDE_FWL_CORE_FWL_GRID_H_ | 8 #define XFA_INCLUDE_FWL_CORE_FWL_GRID_H_ |
9 | 9 |
| 10 #include "xfa/include/fwl/core/fwl_content.h" |
| 11 |
10 class IFWL_Widget; | 12 class IFWL_Widget; |
11 class IFWL_Content; | 13 |
12 #define FWL_CLASS_Grid L"FWL_GRID" | 14 #define FWL_CLASS_Grid L"FWL_GRID" |
13 #define FWL_CLASSHASH_Grid 3150298670 | 15 #define FWL_CLASSHASH_Grid 3150298670 |
14 #define FWL_GRIDSTYLEEXT_ShowGridLines (1L << 0) | 16 #define FWL_GRIDSTYLEEXT_ShowGridLines (1L << 0) |
| 17 |
15 struct FWL_LAYOUTDATA { | 18 struct FWL_LAYOUTDATA { |
16 FX_FLOAT fWidth; | 19 FX_FLOAT fWidth; |
17 FX_FLOAT fHeight; | 20 FX_FLOAT fHeight; |
18 }; | 21 }; |
19 enum FWL_GRIDUNIT { | 22 enum FWL_GRIDUNIT { |
20 FWL_GRIDUNIT_Auto = 0, | 23 FWL_GRIDUNIT_Auto = 0, |
21 FWL_GRIDUNIT_Fixed, | 24 FWL_GRIDUNIT_Fixed, |
22 FWL_GRIDUNIT_Scaled, | 25 FWL_GRIDUNIT_Scaled, |
23 FWL_GRIDUNIT_Infinity, | 26 FWL_GRIDUNIT_Infinity, |
24 }; | 27 }; |
25 enum FWL_GRIDMARGIN { | 28 enum FWL_GRIDMARGIN { |
26 FWL_GRIDMARGIN_Left = 0, | 29 FWL_GRIDMARGIN_Left = 0, |
27 FWL_GRIDMARGIN_Top, | 30 FWL_GRIDMARGIN_Top, |
28 FWL_GRIDMARGIN_Right, | 31 FWL_GRIDMARGIN_Right, |
29 FWL_GRIDMARGIN_Bottom, | 32 FWL_GRIDMARGIN_Bottom, |
30 }; | 33 }; |
31 enum FWL_GRIDSIZE { | 34 enum FWL_GRIDSIZE { |
32 FWL_GRIDSIZE_Width = 0, | 35 FWL_GRIDSIZE_Width = 0, |
33 FWL_GRIDSIZE_Height, | 36 FWL_GRIDSIZE_Height, |
34 FWL_GRIDSIZE_MinWidth, | 37 FWL_GRIDSIZE_MinWidth, |
35 FWL_GRIDSIZE_MinHeight, | 38 FWL_GRIDSIZE_MinHeight, |
36 FWL_GRIDSIZE_MaxWidth, | 39 FWL_GRIDSIZE_MaxWidth, |
37 FWL_GRIDSIZE_MaxHeight, | 40 FWL_GRIDSIZE_MaxHeight, |
38 }; | 41 }; |
| 42 |
39 typedef struct FWL_HGRIDCOLROW_ { void* pData; } * FWL_HGRIDCOLROW; | 43 typedef struct FWL_HGRIDCOLROW_ { void* pData; } * FWL_HGRIDCOLROW; |
40 class IFWL_Grid : public IFWL_Content { | 44 class IFWL_Grid : public IFWL_Content { |
41 public: | 45 public: |
42 static IFWL_Grid* Create(const CFWL_WidgetImpProperties& properties); | 46 static IFWL_Grid* Create(const CFWL_WidgetImpProperties& properties); |
43 | 47 |
44 FWL_HGRIDCOLROW InsertColRow(FX_BOOL bColumn, int32_t nIndex = -1); | 48 FWL_HGRIDCOLROW InsertColRow(FX_BOOL bColumn, int32_t nIndex = -1); |
45 int32_t CountColRows(FX_BOOL bColumn); | 49 int32_t CountColRows(FX_BOOL bColumn); |
46 FWL_HGRIDCOLROW GetColRow(FX_BOOL bColumn, int32_t nIndex); | 50 FWL_HGRIDCOLROW GetColRow(FX_BOOL bColumn, int32_t nIndex); |
47 int32_t GetIndex(FWL_HGRIDCOLROW hColRow); | 51 int32_t GetIndex(FWL_HGRIDCOLROW hColRow); |
48 FX_FLOAT GetSize(FWL_HGRIDCOLROW hColRow, FWL_GRIDUNIT& eUnit); | 52 FX_FLOAT GetSize(FWL_HGRIDCOLROW hColRow, FWL_GRIDUNIT& eUnit); |
(...skipping 27 matching lines...) Expand all Loading... |
76 FX_FLOAT fMargin); | 80 FX_FLOAT fMargin); |
77 FWL_ERR RemoveWidgetMargin(IFWL_Widget* pWidget, FWL_GRIDMARGIN eMargin); | 81 FWL_ERR RemoveWidgetMargin(IFWL_Widget* pWidget, FWL_GRIDMARGIN eMargin); |
78 FX_FLOAT GetGridSize(FWL_GRIDSIZE eSize, FWL_GRIDUNIT& eUnit); | 82 FX_FLOAT GetGridSize(FWL_GRIDSIZE eSize, FWL_GRIDUNIT& eUnit); |
79 FWL_ERR SetGridSize(FWL_GRIDSIZE eSize, FX_FLOAT fSize, FWL_GRIDUNIT eUit); | 83 FWL_ERR SetGridSize(FWL_GRIDSIZE eSize, FX_FLOAT fSize, FWL_GRIDUNIT eUit); |
80 | 84 |
81 protected: | 85 protected: |
82 IFWL_Grid(); | 86 IFWL_Grid(); |
83 }; | 87 }; |
84 | 88 |
85 #endif // XFA_INCLUDE_FWL_CORE_FWL_GRID_H_ | 89 #endif // XFA_INCLUDE_FWL_CORE_FWL_GRID_H_ |
OLD | NEW |