Support unrar64.dll
[xy_vsfilter.git] / src / apps / mplayerc / PPageSubStyle.h
blobccf852e29da92d50a6da0e053ba714581ae436eb
1 /*
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)
8 * any later version.
9 *
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
22 #pragma once
24 #include "PPageBase.h"
25 #include "..\..\subtitles\STS.h"
27 class CColorStatic : public CStatic
29 // DECLARE_DYNAMIC(CColorStatic)
31 COLORREF* m_pColor;
33 public:
34 CColorStatic(CWnd* pParent = NULL) : m_pColor(NULL) {}
35 virtual ~CColorStatic() {}
37 void SetColorPtr(COLORREF* pColor) {m_pColor = pColor;}
39 // DECLARE_MESSAGE_MAP()
41 protected:
42 virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
44 CRect r;
45 GetClientRect(r);
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)
56 private:
57 CString m_title;
58 STSStyle m_stss;
59 bool m_fUseDefaultStyle;
61 void AskColor(int i);
63 public:
64 CPPageSubStyle();
65 virtual ~CPPageSubStyle();
67 void InitStyle(CString title, STSStyle& stss);
68 void GetStyle(STSStyle& stss) {stss = m_stss;}
70 // Dialog Data
71 enum { IDD = IDD_PPAGESUBSTYLE };
72 CButton m_font;
73 int m_iCharset;
74 CComboBox m_charset;
75 int m_spacing;
76 CSpinButtonCtrl m_spacingspin;
77 int m_angle;
78 CSpinButtonCtrl m_anglespin;
79 int m_scalex;
80 CSpinButtonCtrl m_scalexspin;
81 int m_scaley;
82 CSpinButtonCtrl m_scaleyspin;
83 int m_borderstyle;
84 int m_borderwidth;
85 CSpinButtonCtrl m_borderwidthspin;
86 int m_shadowdepth;
87 CSpinButtonCtrl m_shadowdepthspin;
88 int m_screenalignment;
89 CRect m_margin;
90 CSpinButtonCtrl m_marginleftspin;
91 CSpinButtonCtrl m_marginrightspin;
92 CSpinButtonCtrl m_margintopspin;
93 CSpinButtonCtrl m_marginbottomspin;
94 CColorStatic m_color[4];
95 int m_alpha[4];
96 CSliderCtrl m_alphasliders[4];
97 BOOL m_linkalphasliders;
98 BOOL m_relativeTo;
100 protected:
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);
113 public: