DirectVobSubPropPage.h

00001 /* 
00002  *      Copyright (C) 2003-2005 Gabest
00003  *      http://www.gabest.org
00004  *
00005  *  This Program is free software; you can redistribute it and/or modify
00006  *  it under the terms of the GNU General Public License as published by
00007  *  the Free Software Foundation; either version 2, or (at your option)
00008  *  any later version.
00009  *   
00010  *  This Program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013  *  GNU General Public License for more details.
00014  *   
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with GNU Make; see the file COPYING.  If not, write to
00017  *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
00018  *  http://www.gnu.org/copyleft/gpl.html
00019  *
00020  */
00021 
00022 #pragma once
00023 
00024 #include <afxcmn.h>
00025 #include "IDirectVobSub.h"
00026 
00027 class CDVSBasePPage : public CBasePropertyPage
00028 {
00029 public:
00030         // we have to override these to use external, resource-only dlls
00031         STDMETHODIMP GetPageInfo(LPPROPPAGEINFO pPageInfo);
00032         STDMETHODIMP Activate(HWND hwndParent, LPCRECT pRect, BOOL fModal);
00033 
00034 protected:
00035         CComQIPtr<IDirectVobSub2> m_pDirectVobSub;
00036 
00037         virtual bool OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam) {return(false);}
00038         virtual void UpdateObjectData(bool fSave) {}
00039         virtual void UpdateControlData(bool fSave) {}
00040 
00041 protected:
00042     CDVSBasePPage(TCHAR* pName, LPUNKNOWN lpunk, int DialogId, int TitleId);
00043 
00044         bool m_fDisableInstantUpdate;
00045 
00046 private:
00047     BOOL m_bIsInitialized;
00048 
00049     HRESULT OnConnect(IUnknown* pUnknown), OnDisconnect(), OnActivate(), OnDeactivate(), OnApplyChanges();
00050         BOOL OnReceiveMessage(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
00051 
00052 private:
00053         bool m_fAttached;
00054         void AttachControls(), DetachControls();
00055 
00056         CMap<UINT, UINT&, CWnd*, CWnd*> m_controls;
00057 
00058 protected:
00059         void BindControl(UINT id, CWnd& control);
00060 };
00061 
00062 [uuid("60765CF5-01C2-4ee7-A44B-C791CF25FEA0")]
00063 class CDVSMainPPage : public CDVSBasePPage
00064 {
00065         void FreeLangs(), AllocLangs(int nLangs);
00066 
00067         WCHAR m_fn[MAX_PATH];
00068         int m_iSelectedLanguage, m_nLangs;
00069         WCHAR** m_ppLangs;
00070         bool m_fOverridePlacement;
00071         int     m_PlacementXperc, m_PlacementYperc;
00072         STSStyle m_defStyle;
00073         bool m_fOnlyShowForcedVobSubs;
00074 
00075         CEdit m_fnedit;
00076         CComboBox m_langs;
00077         CButton m_oplacement;
00078         CSpinButtonCtrl m_subposx, m_subposy;
00079         CButton m_font, m_forcedsubs;
00080 
00081 protected:
00082     virtual bool OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
00083         virtual void UpdateControlData(bool fSave);
00084         virtual void UpdateObjectData(bool fSave);
00085 
00086 public:
00087     CDVSMainPPage(LPUNKNOWN lpunk, HRESULT* phr);
00088         virtual ~CDVSMainPPage();
00089 };
00090 
00091 [uuid("0180E49C-13BF-46db-9AFD-9F52292E1C22")]
00092 class CDVSGeneralPPage : public CDVSBasePPage
00093 {
00094         int m_HorExt, m_VerExt, m_ResX2, m_ResX2minw, m_ResX2minh;
00095         int m_LoadLevel;
00096         bool m_fExternalLoad, m_fWebLoad, m_fEmbeddedLoad;
00097 
00098         CComboBox m_verext;
00099         CButton m_mod32fix;
00100         CComboBox m_resx2;
00101         CSpinButtonCtrl m_resx2w, m_resx2h;
00102         CComboBox m_load;
00103         CButton m_extload, m_webload, m_embload;
00104 
00105 protected:
00106     virtual bool OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
00107         virtual void UpdateControlData(bool fSave);
00108         virtual void UpdateObjectData(bool fSave);
00109 
00110 public:
00111     CDVSGeneralPPage(LPUNKNOWN lpunk, HRESULT* phr);
00112 };
00113 
00114 [uuid("A8B25C0E-0894-4531-B668-AB1599FAF7F6")]
00115 class CDVSMiscPPage : public CDVSBasePPage
00116 {
00117         bool m_fFlipPicture, m_fFlipSubtitles, m_fHideSubtitles, m_fOSD, m_fDoPreBuffering, m_fReloaderDisabled, m_fSaveFullPath;
00118 
00119         CButton m_flippic, m_flipsub, m_hidesub, m_showosd, m_prebuff, m_autoreload, m_savefullpath, m_instupd;
00120 
00121 protected:
00122     virtual bool OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
00123         virtual void UpdateControlData(bool fSave);
00124         virtual void UpdateObjectData(bool fSave);
00125 
00126 public:
00127     CDVSMiscPPage(LPUNKNOWN lpunk, HRESULT* phr);
00128 };
00129 
00130 [uuid("ACE4747B-35BD-4e97-9DD7-1D4245B0695C")]
00131 class CDVSTimingPPage : public CDVSBasePPage
00132 {
00133         int m_SubtitleSpeedMul, m_SubtitleSpeedDiv, m_SubtitleDelay;
00134         bool m_fMediaFPSEnabled;
00135         double m_MediaFPS;
00136 
00137         CButton m_modfps;
00138         CEdit m_fps;
00139         CSpinButtonCtrl m_subdelay, m_subspeedmul, m_subspeeddiv;
00140 
00141 protected:
00142     virtual bool OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
00143         virtual void UpdateControlData(bool fSave);
00144         virtual void UpdateObjectData(bool fSave);
00145 
00146 public:
00147     CDVSTimingPPage(LPUNKNOWN lpunk, HRESULT* phr);
00148 };
00149 
00150 [uuid("F544E0F5-CA3C-47ea-A64D-35FCF1602396")]
00151 class CDVSAboutPPage : public CDVSBasePPage
00152 {
00153 protected:
00154     virtual bool OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
00155 
00156 public:
00157     CDVSAboutPPage(LPUNKNOWN lpunk, HRESULT* phr);
00158 };
00159 
00160 [uuid("525F116F-04AD-40a2-AE2F-A0C4E1AFEF98")]
00161 class CDVSZoomPPage : public CDVSBasePPage
00162 {
00163         NORMALIZEDRECT m_rect;
00164 
00165         CSpinButtonCtrl m_posx, m_posy, m_scalex, m_scaley;
00166 
00167 protected:
00168     virtual bool OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
00169         virtual void UpdateControlData(bool fSave);
00170         virtual void UpdateObjectData(bool fSave);
00171 
00172 public:
00173     CDVSZoomPPage(LPUNKNOWN lpunk, HRESULT* phr);
00174 };
00175 
00176 [uuid("C2D6D98F-09CA-4524-AF64-1049B5665C9C")]
00177 class CDVSColorPPage : public CDVSBasePPage
00178 {
00179         CListBox m_preflist, m_dynchglist;
00180         CButton m_forcergb;
00181 
00182 protected:
00183     virtual bool OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
00184         virtual void UpdateControlData(bool fSave);
00185         virtual void UpdateObjectData(bool fSave);
00186 
00187 public:
00188     CDVSColorPPage(LPUNKNOWN lpunk, HRESULT* phr);
00189 };
00190 
00191 [uuid("CE77C59C-CFD2-429f-868C-8B04D23F94CA")]
00192 class CDVSPathsPPage : public CDVSBasePPage
00193 {
00194         CStringArray m_paths;
00195 
00196         CListBox m_pathlist;
00197         CEdit m_path;
00198         CButton m_browse, m_remove, m_add;
00199 
00200 protected:
00201     virtual bool OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
00202         virtual void UpdateControlData(bool fSave);
00203         virtual void UpdateObjectData(bool fSave);
00204 
00205 public:
00206     CDVSPathsPPage(LPUNKNOWN lpunk, HRESULT* phr);
00207 };

Generated on Tue Dec 13 14:47:52 2005 for guliverkli by  doxygen 1.4.5