| 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 _FWL_GRID_H | 7 #ifndef _FWL_GRID_H |
| 8 #define _FWL_GRID_H | 8 #define _FWL_GRID_H |
| 9 class IFWL_Widget; | 9 class IFWL_Widget; |
| 10 class IFWL_Content; | 10 class IFWL_Content; |
| 11 class IFWL_Grid; | |
| 12 #define FWL_CLASS_Grid L"FWL_GRID" | 11 #define FWL_CLASS_Grid L"FWL_GRID" |
| 13 #define FWL_CLASSHASH_Grid 3150298670 | 12 #define FWL_CLASSHASH_Grid 3150298670 |
| 14 #define FWL_GRIDSTYLEEXT_ShowGridLines (1L << 0) | 13 #define FWL_GRIDSTYLEEXT_ShowGridLines (1L << 0) |
| 15 struct FWL_LAYOUTDATA { | 14 struct FWL_LAYOUTDATA { |
| 16 FX_FLOAT fWidth; | 15 FX_FLOAT fWidth; |
| 17 FX_FLOAT fHeight; | 16 FX_FLOAT fHeight; |
| 18 }; | 17 }; |
| 19 enum FWL_GRIDUNIT { | 18 enum FWL_GRIDUNIT { |
| 20 FWL_GRIDUNIT_Auto = 0, | 19 FWL_GRIDUNIT_Auto = 0, |
| 21 FWL_GRIDUNIT_Fixed, | 20 FWL_GRIDUNIT_Fixed, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 32 FWL_GRIDSIZE_Width = 0, | 31 FWL_GRIDSIZE_Width = 0, |
| 33 FWL_GRIDSIZE_Height, | 32 FWL_GRIDSIZE_Height, |
| 34 FWL_GRIDSIZE_MinWidth, | 33 FWL_GRIDSIZE_MinWidth, |
| 35 FWL_GRIDSIZE_MinHeight, | 34 FWL_GRIDSIZE_MinHeight, |
| 36 FWL_GRIDSIZE_MaxWidth, | 35 FWL_GRIDSIZE_MaxWidth, |
| 37 FWL_GRIDSIZE_MaxHeight, | 36 FWL_GRIDSIZE_MaxHeight, |
| 38 }; | 37 }; |
| 39 typedef struct _FWL_HGRIDCOLROW { void* pData; } * FWL_HGRIDCOLROW; | 38 typedef struct _FWL_HGRIDCOLROW { void* pData; } * FWL_HGRIDCOLROW; |
| 40 class IFWL_Grid : public IFWL_Content { | 39 class IFWL_Grid : public IFWL_Content { |
| 41 public: | 40 public: |
| 42 static IFWL_Grid* Create(); | 41 static IFWL_Grid* Create(CFWL_WidgetImpProperties& properties); |
| 43 FWL_ERR Initialize(CFWL_WidgetImpProperties& properties); | |
| 44 | 42 |
| 45 FWL_HGRIDCOLROW InsertColRow(FX_BOOL bColumn, int32_t nIndex = -1); | 43 FWL_HGRIDCOLROW InsertColRow(FX_BOOL bColumn, int32_t nIndex = -1); |
| 46 int32_t CountColRows(FX_BOOL bColumn); | 44 int32_t CountColRows(FX_BOOL bColumn); |
| 47 FWL_HGRIDCOLROW GetColRow(FX_BOOL bColumn, int32_t nIndex); | 45 FWL_HGRIDCOLROW GetColRow(FX_BOOL bColumn, int32_t nIndex); |
| 48 int32_t GetIndex(FWL_HGRIDCOLROW hColRow); | 46 int32_t GetIndex(FWL_HGRIDCOLROW hColRow); |
| 49 FX_FLOAT GetSize(FWL_HGRIDCOLROW hColRow, FWL_GRIDUNIT& eUnit); | 47 FX_FLOAT GetSize(FWL_HGRIDCOLROW hColRow, FWL_GRIDUNIT& eUnit); |
| 50 FWL_ERR SetSize(FWL_HGRIDCOLROW hColRow, FX_FLOAT fSize, FWL_GRIDUNIT eUnit); | 48 FWL_ERR SetSize(FWL_HGRIDCOLROW hColRow, FX_FLOAT fSize, FWL_GRIDUNIT eUnit); |
| 51 FX_FLOAT GetMinSize(FWL_HGRIDCOLROW hColRow, FWL_GRIDUNIT& eUnit); | 49 FX_FLOAT GetMinSize(FWL_HGRIDCOLROW hColRow, FWL_GRIDUNIT& eUnit); |
| 52 FWL_ERR SetMinSize(FWL_HGRIDCOLROW hColRow, | 50 FWL_ERR SetMinSize(FWL_HGRIDCOLROW hColRow, |
| 53 FX_FLOAT fSize, | 51 FX_FLOAT fSize, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 76 FWL_GRIDMARGIN eMargin, | 74 FWL_GRIDMARGIN eMargin, |
| 77 FX_FLOAT fMargin); | 75 FX_FLOAT fMargin); |
| 78 FWL_ERR RemoveWidgetMargin(IFWL_Widget* pWidget, FWL_GRIDMARGIN eMargin); | 76 FWL_ERR RemoveWidgetMargin(IFWL_Widget* pWidget, FWL_GRIDMARGIN eMargin); |
| 79 FX_FLOAT GetGridSize(FWL_GRIDSIZE eSize, FWL_GRIDUNIT& eUnit); | 77 FX_FLOAT GetGridSize(FWL_GRIDSIZE eSize, FWL_GRIDUNIT& eUnit); |
| 80 FWL_ERR SetGridSize(FWL_GRIDSIZE eSize, FX_FLOAT fSize, FWL_GRIDUNIT eUit); | 78 FWL_ERR SetGridSize(FWL_GRIDSIZE eSize, FX_FLOAT fSize, FWL_GRIDUNIT eUit); |
| 81 | 79 |
| 82 protected: | 80 protected: |
| 83 IFWL_Grid(); | 81 IFWL_Grid(); |
| 84 }; | 82 }; |
| 85 #endif | 83 #endif |
| OLD | NEW |