Add colour space auto guess option to UI.
[xy_vsfilter.git] / src / filters / transform / vsfilter / DirectVobSubPropPage.h
blobdfcba1c9d6d3a89f8062d88007629675f3dbe7f2
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 <afxcmn.h>
25 #include "IDirectVobSub.h"
27 class CDVSBasePPage : public CBasePropertyPage
29 public:
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);
34 protected:
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) {}
41 protected:
42 CDVSBasePPage(TCHAR* pName, LPUNKNOWN lpunk, int DialogId, int TitleId);
44 bool m_fDisableInstantUpdate;
46 private:
47 BOOL m_bIsInitialized;
49 HRESULT OnConnect(IUnknown* pUnknown), OnDisconnect(), OnActivate(), OnDeactivate(), OnApplyChanges();
50 BOOL OnReceiveMessage(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
52 private:
53 bool m_fAttached;
54 void AttachControls(), DetachControls();
56 CMap<UINT, UINT&, CWnd*, CWnd*> m_controls;
58 protected:
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);
67 WCHAR m_fn[MAX_PATH];
68 int m_iSelectedLanguage, m_nLangs;
69 WCHAR** m_ppLangs;
70 bool m_fOverridePlacement;
71 int m_PlacementXperc, m_PlacementYperc;
72 STSStyle m_defStyle;
73 bool m_fOnlyShowForcedVobSubs;
74 CSimpleTextSubtitle::EPARCompensationType m_ePARCompensationType;
76 CEdit m_fnedit;
77 CComboBox m_langs;
78 CButton m_oplacement;
79 CSpinButtonCtrl m_subposx, m_subposy;
80 CButton m_font, m_forcedsubs;
81 CButton m_AutoPARCompensation;
82 CComboBox m_PARCombo;
84 protected:
85 virtual bool OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
86 virtual void UpdateControlData(bool fSave);
87 virtual void UpdateObjectData(bool fSave);
89 public:
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;
98 int m_LoadLevel;
99 bool m_fExternalLoad, m_fWebLoad, m_fEmbeddedLoad;
101 CComboBox m_verext;
102 CButton m_mod32fix;
103 CComboBox m_resx2;
104 CSpinButtonCtrl m_resx2w, m_resx2h;
105 CComboBox m_load;
106 CButton m_extload, m_webload, m_embload;
108 protected:
109 virtual bool OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
110 virtual void UpdateControlData(bool fSave);
111 virtual void UpdateObjectData(bool fSave);
113 public:
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_fReloaderDisabled, m_fSaveFullPath;
122 int m_colourSpace;
124 CButton m_flippic, m_flipsub, m_hidesub, m_showosd, m_prebuff, m_autoreload, m_savefullpath, m_instupd;
125 CComboBox m_colourSpaceDropList;
127 protected:
128 virtual bool OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
129 virtual void UpdateControlData(bool fSave);
130 virtual void UpdateObjectData(bool fSave);
132 public:
133 CDVSMiscPPage(LPUNKNOWN lpunk, HRESULT* phr);
136 [uuid("ACE4747B-35BD-4e97-9DD7-1D4245B0695C")]
137 class CDVSTimingPPage : public CDVSBasePPage
139 int m_SubtitleSpeedMul, m_SubtitleSpeedDiv, m_SubtitleDelay;
140 bool m_fMediaFPSEnabled;
141 double m_MediaFPS;
143 CButton m_modfps;
144 CEdit m_fps;
145 CSpinButtonCtrl m_subdelay, m_subspeedmul, m_subspeeddiv;
147 protected:
148 virtual bool OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
149 virtual void UpdateControlData(bool fSave);
150 virtual void UpdateObjectData(bool fSave);
152 public:
153 CDVSTimingPPage(LPUNKNOWN lpunk, HRESULT* phr);
156 [uuid("69CE757B-E8C0-4B0A-9EA0-CEA284096F98")]
157 class CDVSMorePPage : public CDVSBasePPage
159 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;
161 CSpinButtonCtrl m_path_cache, m_scanline_cache, m_overlay_no_blur_cache, m_overlay_cache;
163 CComboBox m_combo_subpixel_pos;
164 protected:
165 virtual bool OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
166 virtual void UpdateControlData(bool fSave);
167 virtual void UpdateObjectData(bool fSave);
169 public:
170 CDVSMorePPage(LPUNKNOWN lpunk, HRESULT* phr);
173 [uuid("F544E0F5-CA3C-47ea-A64D-35FCF1602396")]
174 class CDVSAboutPPage : public CDVSBasePPage
176 public:
177 CDVSAboutPPage(LPUNKNOWN lpunk, HRESULT* phr);
180 [uuid("525F116F-04AD-40a2-AE2F-A0C4E1AFEF98")]
181 class CDVSZoomPPage : public CDVSBasePPage
183 NORMALIZEDRECT m_rect;
185 CSpinButtonCtrl m_posx, m_posy, m_scalex, m_scaley;
187 protected:
188 virtual bool OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
189 virtual void UpdateControlData(bool fSave);
190 virtual void UpdateObjectData(bool fSave);
192 public:
193 CDVSZoomPPage(LPUNKNOWN lpunk, HRESULT* phr);
196 [uuid("C2D6D98F-09CA-4524-AF64-1049B5665C9C")]
197 class CDVSColorPPage : public CDVSBasePPage
199 CListBox m_preflist, m_dynchglist;
200 CButton m_forcergb;
202 protected:
203 virtual bool OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
204 virtual void UpdateControlData(bool fSave);
205 virtual void UpdateObjectData(bool fSave);
207 public:
208 CDVSColorPPage(LPUNKNOWN lpunk, HRESULT* phr);
211 [uuid("CE77C59C-CFD2-429f-868C-8B04D23F94CA")]
212 class CDVSPathsPPage : public CDVSBasePPage
214 CStringArray m_paths;
216 CListBox m_pathlist;
217 CEdit m_path;
218 CButton m_browse, m_remove, m_add;
220 protected:
221 virtual bool OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
222 virtual void UpdateControlData(bool fSave);
223 virtual void UpdateObjectData(bool fSave);
225 public:
226 CDVSPathsPPage(LPUNKNOWN lpunk, HRESULT* phr);