summaryrefslogtreecommitdiff
path: root/xfa/fwl/theme/cfwl_monthcalendartp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fwl/theme/cfwl_monthcalendartp.cpp')
-rw-r--r--xfa/fwl/theme/cfwl_monthcalendartp.cpp164
1 files changed, 0 insertions, 164 deletions
diff --git a/xfa/fwl/theme/cfwl_monthcalendartp.cpp b/xfa/fwl/theme/cfwl_monthcalendartp.cpp
index a76d959cca..7e9ea0a72f 100644
--- a/xfa/fwl/theme/cfwl_monthcalendartp.cpp
+++ b/xfa/fwl/theme/cfwl_monthcalendartp.cpp
@@ -15,40 +15,6 @@
#include "xfa/fxgraphics/cfx_color.h"
#include "xfa/fxgraphics/cfx_path.h"
-namespace {
-
-const int kWidth = 200;
-const int kHeight = 160;
-
-const int kHeaderWidth = 200;
-const int kHeaderHeight = 30;
-
-const int kButtonWidth = 18;
-const int kButtonHeight = 16;
-const int kButtonHorizontalMargin = 5;
-const int kButtonVerticalMargin = (kHeaderHeight - kButtonHeight) / 2;
-
-const int kHeaderTextWidth = 100;
-const int kHeaderTextHeight = 20;
-const int kHeaderTextHorizontalMargin = (kHeaderWidth - kHeaderTextWidth) / 2;
-const int kHeaderTextVerticalMargin = (kHeaderHeight - kHeaderTextHeight) / 2;
-
-const int kDatesCellWidth = (kHeaderWidth / 7);
-const int kDatesCellHeight = 16;
-const int kWeekWidth = kDatesCellWidth * 7;
-const int kWeekNumWidth = 26;
-const int kWeekNumHeight = (6 * kDatesCellHeight);
-
-const int kHorizontalSeparatorWidth = kWeekWidth - 10;
-const int kHorizontalSeparatorHeight = 1;
-const int kVerticalSeparatorWidth = 1;
-const int kVerticalSeparatorHeight = kWeekNumHeight;
-const int kSeparatorDOffset = -4;
-const int kSeparatorX = 3;
-const int kSeparatorY = kHeaderHeight + kDatesCellHeight + kSeparatorDOffset;
-
-} // namespace
-
CFWL_MonthCalendarTP::CFWL_MonthCalendarTP() : m_pThemeData(new MCThemeData) {
SetThemeData();
}
@@ -130,136 +96,6 @@ void CFWL_MonthCalendarTP::DrawText(CFWL_ThemeText* pParams) {
CFWL_WidgetTP::DrawText(pParams);
}
-void* CFWL_MonthCalendarTP::GetCapacity(CFWL_ThemePart* pThemePart,
- CFWL_WidgetCapacity dwCapacity) {
- bool bDefPro = false;
- bool bDwordVal = false;
- switch (dwCapacity) {
- case CFWL_WidgetCapacity::HeaderWidth: {
- m_fValue = kHeaderWidth;
- break;
- }
- case CFWL_WidgetCapacity::HeaderHeight: {
- m_fValue = kHeaderHeight;
- break;
- }
- case CFWL_WidgetCapacity::HeaderBtnWidth: {
- m_fValue = kButtonWidth;
- break;
- }
- case CFWL_WidgetCapacity::HeaderBtnHeight: {
- m_fValue = kButtonHeight;
- break;
- }
- case CFWL_WidgetCapacity::HeaderBtnHMargin: {
- bDwordVal = true;
- m_dwValue = kButtonHorizontalMargin;
- break;
- }
- case CFWL_WidgetCapacity::HeaderBtnVMargin: {
- m_fValue = kButtonVerticalMargin;
- break;
- }
- case CFWL_WidgetCapacity::HeaderTextWidth: {
- m_fValue = kHeaderTextWidth;
- break;
- }
- case CFWL_WidgetCapacity::HeaderTextHeight: {
- m_fValue = kHeaderTextHeight;
- break;
- }
- case CFWL_WidgetCapacity::HeaderTextHMargin: {
- m_fValue = kHeaderTextHorizontalMargin;
- break;
- }
- case CFWL_WidgetCapacity::HeaderTextVMargin: {
- m_fValue = kHeaderTextVerticalMargin;
- break;
- }
- case CFWL_WidgetCapacity::HSepWidth: {
- m_fValue = kHorizontalSeparatorWidth;
- break;
- }
- case CFWL_WidgetCapacity::HSepHeight: {
- m_fValue = kHorizontalSeparatorHeight;
- break;
- }
- case CFWL_WidgetCapacity::VSepWidth: {
- m_fValue = kVerticalSeparatorWidth;
- break;
- }
- case CFWL_WidgetCapacity::VSepHeight: {
- m_fValue = kVerticalSeparatorHeight;
- break;
- }
- case CFWL_WidgetCapacity::WeekNumWidth: {
- m_fValue = kWeekNumWidth;
- break;
- }
- case CFWL_WidgetCapacity::WeekNumHeight: {
- m_fValue = kWeekNumHeight;
- break;
- }
- case CFWL_WidgetCapacity::WeekWidth: {
- m_fValue = kWeekWidth;
- break;
- }
- case CFWL_WidgetCapacity::WeekHeight: {
- m_fValue = kDatesCellHeight;
- break;
- }
- case CFWL_WidgetCapacity::SepDOffset: {
- m_fValue = kSeparatorDOffset;
- break;
- }
- case CFWL_WidgetCapacity::SepX: {
- m_fValue = kSeparatorX;
- break;
- }
- case CFWL_WidgetCapacity::SepY: {
- m_fValue = kSeparatorY;
- break;
- }
- case CFWL_WidgetCapacity::DatesCellWidth: {
- m_fValue = kDatesCellWidth;
- break;
- }
- case CFWL_WidgetCapacity::DatesCellHeight: {
- m_fValue = kDatesCellHeight;
- break;
- }
- case CFWL_WidgetCapacity::TodayWidth: {
- m_fValue = kHeaderWidth;
- break;
- }
- case CFWL_WidgetCapacity::TodayHeight: {
- m_fValue = kDatesCellHeight;
- break;
- }
- case CFWL_WidgetCapacity::TodayFlagWidth: {
- m_fValue = kDatesCellWidth;
- break;
- }
- case CFWL_WidgetCapacity::Width: {
- m_fValue = kWidth;
- break;
- }
- case CFWL_WidgetCapacity::Height: {
- m_fValue = kHeight;
- break;
- }
- default:
- bDefPro = true;
- break;
- }
- if (!bDefPro) {
- if (bDwordVal)
- return &m_dwValue;
- return &m_fValue;
- }
- return CFWL_WidgetTP::GetCapacity(pThemePart, dwCapacity);
-}
-
void CFWL_MonthCalendarTP::Initialize() {
InitTTO();
CFWL_WidgetTP::Initialize();