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
25 #include "IDirectVobSub.h"
27 class CDVSBasePPage
: public CBasePropertyPage
30 // we have to override these to use external, resource-only dlls
31 STDMETHODIMP
GetPageInfo(LPPROPPAGEINFO pPageInfo
);
32 STDMETHODIMP
Activate(HWND hwndParent
, LPCRECT pRect
, BOOL fModal
);
35 CComQIPtr
<IDirectVobSub2
> m_pDirectVobSub
;
37 virtual bool OnMessage(UINT uMsg
, WPARAM wParam
, LPARAM lParam
) {return(false);}
38 virtual void UpdateObjectData(bool fSave
) {}
39 virtual void UpdateControlData(bool fSave
) {}
42 CDVSBasePPage(TCHAR
* pName
, LPUNKNOWN lpunk
, int DialogId
, int TitleId
);
44 bool m_fDisableInstantUpdate
;
47 BOOL m_bIsInitialized
;
49 HRESULT
OnConnect(IUnknown
* pUnknown
), OnDisconnect(), OnActivate(), OnDeactivate(), OnApplyChanges();
50 BOOL
OnReceiveMessage(HWND hwnd
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
);
54 void AttachControls(), DetachControls();
56 CMap
<UINT
, UINT
&, CWnd
*, CWnd
*> m_controls
;
59 void BindControl(UINT id
, CWnd
& control
);
62 [uuid("60765CF5-01C2-4ee7-A44B-C791CF25FEA0")]
63 class CDVSMainPPage
: public CDVSBasePPage
65 void FreeLangs(), AllocLangs(int nLangs
);
68 int m_iSelectedLanguage
, m_nLangs
;
70 bool m_fOverridePlacement
;
71 int m_PlacementXperc
, m_PlacementYperc
;
73 bool m_fOnlyShowForcedVobSubs
;
74 CSimpleTextSubtitle::EPARCompensationType m_ePARCompensationType
;
79 CSpinButtonCtrl m_subposx
, m_subposy
;
80 CButton m_font
, m_forcedsubs
;
81 CButton m_AutoPARCompensation
;
85 virtual bool OnMessage(UINT uMsg
, WPARAM wParam
, LPARAM lParam
);
86 virtual void UpdateControlData(bool fSave
);
87 virtual void UpdateObjectData(bool fSave
);
90 CDVSMainPPage(LPUNKNOWN lpunk
, HRESULT
* phr
);
91 virtual ~CDVSMainPPage();
94 [uuid("0180E49C-13BF-46db-9AFD-9F52292E1C22")]
95 class CDVSGeneralPPage
: public CDVSBasePPage
97 int m_HorExt
, m_VerExt
, m_ResX2
, m_ResX2minw
, m_ResX2minh
;
99 bool m_fExternalLoad
, m_fWebLoad
, m_fEmbeddedLoad
;
104 CSpinButtonCtrl m_resx2w
, m_resx2h
;
106 CButton m_extload
, m_webload
, m_embload
;
109 virtual bool OnMessage(UINT uMsg
, WPARAM wParam
, LPARAM lParam
);
110 virtual void UpdateControlData(bool fSave
);
111 virtual void UpdateObjectData(bool fSave
);
114 CDVSGeneralPPage(LPUNKNOWN lpunk
, HRESULT
* phr
);
117 [uuid("A8B25C0E-0894-4531-B668-AB1599FAF7F6")]
118 class CDVSMiscPPage
: public CDVSBasePPage
120 bool m_fFlipPicture
, m_fFlipSubtitles
, m_fHideSubtitles
, m_fOSD
, m_fDoPreBuffering
, m_fUseBT709
, m_fReloaderDisabled
, m_fSaveFullPath
;
122 CButton m_flippic
, m_flipsub
, m_hidesub
, m_showosd
, m_prebuff
, m_use_bt709
, m_autoreload
, m_savefullpath
, m_instupd
;
125 virtual bool OnMessage(UINT uMsg
, WPARAM wParam
, LPARAM lParam
);
126 virtual void UpdateControlData(bool fSave
);
127 virtual void UpdateObjectData(bool fSave
);
130 CDVSMiscPPage(LPUNKNOWN lpunk
, HRESULT
* phr
);
133 [uuid("ACE4747B-35BD-4e97-9DD7-1D4245B0695C")]
134 class CDVSTimingPPage
: public CDVSBasePPage
136 int m_SubtitleSpeedMul
, m_SubtitleSpeedDiv
, m_SubtitleDelay
;
137 bool m_fMediaFPSEnabled
;
142 CSpinButtonCtrl m_subdelay
, m_subspeedmul
, m_subspeeddiv
;
145 virtual bool OnMessage(UINT uMsg
, WPARAM wParam
, LPARAM lParam
);
146 virtual void UpdateControlData(bool fSave
);
147 virtual void UpdateObjectData(bool fSave
);
150 CDVSTimingPPage(LPUNKNOWN lpunk
, HRESULT
* phr
);
153 [uuid("69CE757B-E8C0-4B0A-9EA0-CEA284096F98")]
154 class CDVSMorePPage
: public CDVSBasePPage
156 int m_overlay_cache_max_item_num
, m_overlay_no_blur_cache_max_item_num
, m_path_cache_max_item_num
, m_scan_line_data_cache_max_item_num
, m_subpixel_pos_level
;
158 CSpinButtonCtrl m_path_cache
, m_scanline_cache
, m_overlay_no_blur_cache
, m_overlay_cache
;
160 CComboBox m_combo_subpixel_pos
;
162 virtual bool OnMessage(UINT uMsg
, WPARAM wParam
, LPARAM lParam
);
163 virtual void UpdateControlData(bool fSave
);
164 virtual void UpdateObjectData(bool fSave
);
167 CDVSMorePPage(LPUNKNOWN lpunk
, HRESULT
* phr
);
170 [uuid("F544E0F5-CA3C-47ea-A64D-35FCF1602396")]
171 class CDVSAboutPPage
: public CDVSBasePPage
174 CDVSAboutPPage(LPUNKNOWN lpunk
, HRESULT
* phr
);
177 [uuid("525F116F-04AD-40a2-AE2F-A0C4E1AFEF98")]
178 class CDVSZoomPPage
: public CDVSBasePPage
180 NORMALIZEDRECT m_rect
;
182 CSpinButtonCtrl m_posx
, m_posy
, m_scalex
, m_scaley
;
185 virtual bool OnMessage(UINT uMsg
, WPARAM wParam
, LPARAM lParam
);
186 virtual void UpdateControlData(bool fSave
);
187 virtual void UpdateObjectData(bool fSave
);
190 CDVSZoomPPage(LPUNKNOWN lpunk
, HRESULT
* phr
);
193 [uuid("C2D6D98F-09CA-4524-AF64-1049B5665C9C")]
194 class CDVSColorPPage
: public CDVSBasePPage
196 CListCtrl m_outputFmtList
, m_inputFmtList
;
197 CButton m_followUpstreamPreferredOrder
, m_btnColorUp
, m_btnColorDown
;
199 static const int MAX_COLOR_SPACE
= 256;
200 ColorSpaceId m_outputColorSpace
[MAX_COLOR_SPACE
];
201 bool m_selectedOutputColorSpace
[MAX_COLOR_SPACE
];
202 UINT m_outputColorSpaceCount
;
204 ColorSpaceId m_inputColorSpace
[MAX_COLOR_SPACE
];
205 bool m_selectedInputColorSpace
[MAX_COLOR_SPACE
];
206 UINT m_inputColorSpaceCount
;
208 bool m_fFollowUpstream
;
210 virtual bool OnMessage(UINT uMsg
, WPARAM wParam
, LPARAM lParam
);
211 virtual void UpdateControlData(bool fSave
);
212 virtual void UpdateObjectData(bool fSave
);
215 CDVSColorPPage(LPUNKNOWN lpunk
, HRESULT
* phr
);
218 [uuid("CE77C59C-CFD2-429f-868C-8B04D23F94CA")]
219 class CDVSPathsPPage
: public CDVSBasePPage
221 CStringArray m_paths
;
225 CButton m_browse
, m_remove
, m_add
;
228 virtual bool OnMessage(UINT uMsg
, WPARAM wParam
, LPARAM lParam
);
229 virtual void UpdateControlData(bool fSave
);
230 virtual void UpdateObjectData(bool fSave
);
233 CDVSPathsPPage(LPUNKNOWN lpunk
, HRESULT
* phr
);