2 * Copyright (C) 2003-2006 Gabest
3 * http://www.gabest.org
5 * This Program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
10 * This Program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with GNU Make; see the file COPYING. If not, write to
17 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
18 * http://www.gnu.org/copyleft/gpl.html
24 #include "PPageBase.h"
25 #include "..\..\subtitles\STS.h"
27 class CColorStatic
: public CStatic
29 // DECLARE_DYNAMIC(CColorStatic)
34 CColorStatic(CWnd
* pParent
= NULL
) : m_pColor(NULL
) {}
35 virtual ~CColorStatic() {}
37 void SetColorPtr(COLORREF
* pColor
) {m_pColor
= pColor
;}
39 // DECLARE_MESSAGE_MAP()
42 virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct
)
46 CDC::FromHandle(lpDrawItemStruct
->hDC
)->FillSolidRect(r
, m_pColor
? *m_pColor
: ::GetSysColor(COLOR_BTNFACE
));
50 // CPPageSubStyle dialog
52 class CPPageSubStyle
: public CPPageBase
54 DECLARE_DYNAMIC(CPPageSubStyle
)
59 bool m_fUseDefaultStyle
;
65 virtual ~CPPageSubStyle();
67 void InitStyle(CString title
, STSStyle
& stss
);
68 void GetStyle(STSStyle
& stss
) {stss
= m_stss
;}
71 enum { IDD
= IDD_PPAGESUBSTYLE
};
76 CSpinButtonCtrl m_spacingspin
;
78 CSpinButtonCtrl m_anglespin
;
80 CSpinButtonCtrl m_scalexspin
;
82 CSpinButtonCtrl m_scaleyspin
;
85 CSpinButtonCtrl m_borderwidthspin
;
87 CSpinButtonCtrl m_shadowdepthspin
;
88 int m_screenalignment
;
90 CSpinButtonCtrl m_marginleftspin
;
91 CSpinButtonCtrl m_marginrightspin
;
92 CSpinButtonCtrl m_margintopspin
;
93 CSpinButtonCtrl m_marginbottomspin
;
94 CColorStatic m_color
[4];
96 CSliderCtrl m_alphasliders
[4];
97 BOOL m_linkalphasliders
;
101 virtual void DoDataExchange(CDataExchange
* pDX
); // DDX/DDV support
102 virtual BOOL
OnInitDialog();
103 virtual BOOL
OnApply();
105 DECLARE_MESSAGE_MAP()
106 afx_msg
void OnBnClickedButton1();
107 afx_msg
void OnStnClickedColorpri();
108 afx_msg
void OnStnClickedColorsec();
109 afx_msg
void OnStnClickedColoroutl();
110 afx_msg
void OnStnClickedColorshad();
111 afx_msg
void OnBnClickedCheck1();
112 afx_msg
void OnHScroll(UINT nSBCode
, UINT nPos
, CScrollBar
* pScrollBar
);