Bläddra i källkod

added new settings management base class, updated main settings form, added to build files

jp9000 12 år sedan
förälder
incheckning
467362f584

+ 1 - 0
obs/CMakeLists.txt

@@ -43,6 +43,7 @@ endif()
 add_executable(obs
 	window-main-basic.cpp
 	window-settings-basic.cpp
+	settings-basic-general.cpp
 	wx-subclass.cpp
 	wx-wrappers.cpp
 	obs-app.cpp

+ 19 - 23
obs/forms/OBSWindows.cpp

@@ -416,8 +416,8 @@ OBSBasicSettingsBase::OBSBasicSettingsBase( wxWindow* parent, wxWindowID id, con
 	wxBoxSizer* bSizer31;
 	bSizer31 = new wxBoxSizer( wxVERTICAL );
 	
-	m_listbook1 = new wxListbook( this, ID_SETTINGS_LIST, wxDefaultPosition, wxDefaultSize, wxLB_DEFAULT );
-	generalPanel = new wxPanel( m_listbook1, ID_SETTINGS_GENERAL, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+	settingsList = new wxListbook( this, ID_SETTINGS_LIST, wxDefaultPosition, wxDefaultSize, wxLB_DEFAULT );
+	generalPanel = new wxPanel( settingsList, ID_SETTINGS_GENERAL, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
 	wxBoxSizer* bSizer32;
 	bSizer32 = new wxBoxSizer( wxVERTICAL );
 	
@@ -443,8 +443,8 @@ OBSBasicSettingsBase::OBSBasicSettingsBase( wxWindow* parent, wxWindowID id, con
 	generalPanel->SetSizer( bSizer32 );
 	generalPanel->Layout();
 	bSizer32->Fit( generalPanel );
-	m_listbook1->AddPage( generalPanel, _("Settings.General"), true );
-	outputsPanel = new wxPanel( m_listbook1, ID_SETTINGS_OUTPUTS, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+	settingsList->AddPage( generalPanel, _("Settings.General"), false );
+	outputsPanel = new wxPanel( settingsList, ID_SETTINGS_OUTPUTS, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
 	wxBoxSizer* bSizer33;
 	bSizer33 = new wxBoxSizer( wxVERTICAL );
 	
@@ -452,8 +452,8 @@ OBSBasicSettingsBase::OBSBasicSettingsBase( wxWindow* parent, wxWindowID id, con
 	outputsPanel->SetSizer( bSizer33 );
 	outputsPanel->Layout();
 	bSizer33->Fit( outputsPanel );
-	m_listbook1->AddPage( outputsPanel, _("Settings.Outputs"), false );
-	videoPanel = new wxPanel( m_listbook1, ID_SETTINGS_VIDEO, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+	settingsList->AddPage( outputsPanel, _("Settings.Outputs"), false );
+	videoPanel = new wxPanel( settingsList, ID_SETTINGS_VIDEO, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
 	wxBoxSizer* bSizer34;
 	bSizer34 = new wxBoxSizer( wxVERTICAL );
 	
@@ -536,7 +536,7 @@ OBSBasicSettingsBase::OBSBasicSettingsBase( wxWindow* parent, wxWindowID id, con
 	wxBoxSizer* bSizer46;
 	bSizer46 = new wxBoxSizer( wxHORIZONTAL );
 	
-	fpsIntegerScroller = new wxSpinCtrl( m_panel14, ID_FPS_INTEGER, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 60, 30 );
+	fpsIntegerScroller = new wxSpinCtrl( m_panel14, ID_FPS_INTEGER, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 120, 30 );
 	bSizer46->Add( fpsIntegerScroller, 0, wxTOP|wxBOTTOM|wxRIGHT, 2 );
 	
 	
@@ -590,8 +590,8 @@ OBSBasicSettingsBase::OBSBasicSettingsBase( wxWindow* parent, wxWindowID id, con
 	videoPanel->SetSizer( bSizer34 );
 	videoPanel->Layout();
 	bSizer34->Fit( videoPanel );
-	m_listbook1->AddPage( videoPanel, _("Settings.Video"), false );
-	audioPanel = new wxPanel( m_listbook1, ID_SETTINGS_AUDIO, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+	settingsList->AddPage( videoPanel, _("Settings.Video"), true );
+	audioPanel = new wxPanel( settingsList, ID_SETTINGS_AUDIO, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
 	wxBoxSizer* bSizer36;
 	bSizer36 = new wxBoxSizer( wxVERTICAL );
 	
@@ -645,15 +645,15 @@ OBSBasicSettingsBase::OBSBasicSettingsBase( wxWindow* parent, wxWindowID id, con
 	audioPanel->SetSizer( bSizer36 );
 	audioPanel->Layout();
 	bSizer36->Fit( audioPanel );
-	m_listbook1->AddPage( audioPanel, _("Settings.Audio"), false );
+	settingsList->AddPage( audioPanel, _("Settings.Audio"), false );
 	/*#ifndef __WXGTK__ // Small icon style not supported in GTK
-	wxListView* m_listbook1ListView = m_listbook1->GetListView();
-	long m_listbook1Flags = m_listbook1ListView->GetWindowStyleFlag();
-	m_listbook1Flags = ( m_listbook1Flags & ~wxLC_ICON ) | wxLC_SMALL_ICON;
-	m_listbook1ListView->SetWindowStyleFlag( m_listbook1Flags );
+	wxListView* settingsListListView = settingsList->GetListView();
+	long settingsListFlags = settingsListListView->GetWindowStyleFlag();
+	settingsListFlags = ( settingsListFlags & ~wxLC_ICON ) | wxLC_SMALL_ICON;
+	settingsListListView->SetWindowStyleFlag( settingsListFlags );
 	#endif*/
 	
-	bSizer31->Add( m_listbook1, 1, wxEXPAND | wxALL, 5 );
+	bSizer31->Add( settingsList, 1, wxEXPAND | wxALL, 5 );
 	
 	
 	bSizer30->Add( bSizer31, 1, wxEXPAND, 5 );
@@ -680,18 +680,14 @@ OBSBasicSettingsBase::OBSBasicSettingsBase( wxWindow* parent, wxWindowID id, con
 	this->Centre( wxBOTH );
 	
 	// Connect Events
-	generalPanel->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( OBSBasicSettingsBase::generalPanelUpdateUI ), NULL, this );
-	outputsPanel->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( OBSBasicSettingsBase::outputsPanelUpdateUI ), NULL, this );
-	videoPanel->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( OBSBasicSettingsBase::videoPanelUpdateUI ), NULL, this );
-	audioPanel->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( OBSBasicSettingsBase::audioPanelUpdateUI ), NULL, this );
+	settingsList->Connect( wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED, wxListbookEventHandler( OBSBasicSettingsBase::PageChanged ), NULL, this );
+	settingsList->Connect( wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING, wxListbookEventHandler( OBSBasicSettingsBase::PageChanging ), NULL, this );
 }
 
 OBSBasicSettingsBase::~OBSBasicSettingsBase()
 {
 	// Disconnect Events
-	generalPanel->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( OBSBasicSettingsBase::generalPanelUpdateUI ), NULL, this );
-	outputsPanel->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( OBSBasicSettingsBase::outputsPanelUpdateUI ), NULL, this );
-	videoPanel->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( OBSBasicSettingsBase::videoPanelUpdateUI ), NULL, this );
-	audioPanel->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( OBSBasicSettingsBase::audioPanelUpdateUI ), NULL, this );
+	settingsList->Disconnect( wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED, wxListbookEventHandler( OBSBasicSettingsBase::PageChanged ), NULL, this );
+	settingsList->Disconnect( wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING, wxListbookEventHandler( OBSBasicSettingsBase::PageChanging ), NULL, this );
 	
 }

+ 23 - 23
obs/forms/OBSWindows.fbp

@@ -2808,7 +2808,7 @@
                                 <property name="minimize_button">0</property>
                                 <property name="minimum_size"></property>
                                 <property name="moveable">1</property>
-                                <property name="name">m_listbook1</property>
+                                <property name="name">settingsList</property>
                                 <property name="pane_border">1</property>
                                 <property name="pane_position"></property>
                                 <property name="pane_size"></property>
@@ -2835,8 +2835,8 @@
                                 <event name="OnLeftDClick"></event>
                                 <event name="OnLeftDown"></event>
                                 <event name="OnLeftUp"></event>
-                                <event name="OnListbookPageChanged"></event>
-                                <event name="OnListbookPageChanging"></event>
+                                <event name="OnListbookPageChanged">PageChanged</event>
+                                <event name="OnListbookPageChanging">PageChanging</event>
                                 <event name="OnMiddleDClick"></event>
                                 <event name="OnMiddleDown"></event>
                                 <event name="OnMiddleUp"></event>
@@ -2893,7 +2893,7 @@
                                         <property name="pane_border">1</property>
                                         <property name="pane_position"></property>
                                         <property name="pane_size"></property>
-                                        <property name="permission">protected</property>
+                                        <property name="permission">public</property>
                                         <property name="pin_button">1</property>
                                         <property name="pos"></property>
                                         <property name="resize">Resizable</property>
@@ -3086,7 +3086,7 @@
                                                             <property name="pane_border">1</property>
                                                             <property name="pane_position"></property>
                                                             <property name="pane_size"></property>
-                                                            <property name="permission">protected</property>
+                                                            <property name="permission">public</property>
                                                             <property name="pin_button">1</property>
                                                             <property name="pos"></property>
                                                             <property name="resize">Resizable</property>
@@ -3181,7 +3181,7 @@
                                         <property name="pane_border">1</property>
                                         <property name="pane_position"></property>
                                         <property name="pane_size"></property>
-                                        <property name="permission">protected</property>
+                                        <property name="permission">public</property>
                                         <property name="pin_button">1</property>
                                         <property name="pos"></property>
                                         <property name="resize">Resizable</property>
@@ -3460,7 +3460,7 @@
                                                             <property name="pane_border">1</property>
                                                             <property name="pane_position"></property>
                                                             <property name="pane_size"></property>
-                                                            <property name="permission">protected</property>
+                                                            <property name="permission">public</property>
                                                             <property name="pin_button">1</property>
                                                             <property name="pos"></property>
                                                             <property name="resize">Resizable</property>
@@ -3634,7 +3634,7 @@
                                                             <property name="pane_border">1</property>
                                                             <property name="pane_position"></property>
                                                             <property name="pane_size"></property>
-                                                            <property name="permission">protected</property>
+                                                            <property name="permission">public</property>
                                                             <property name="pin_button">1</property>
                                                             <property name="pos"></property>
                                                             <property name="resize">Resizable</property>
@@ -3808,7 +3808,7 @@
                                                             <property name="pane_border">1</property>
                                                             <property name="pane_position"></property>
                                                             <property name="pane_size"></property>
-                                                            <property name="permission">protected</property>
+                                                            <property name="permission">public</property>
                                                             <property name="pin_button">1</property>
                                                             <property name="pos"></property>
                                                             <property name="resize">Resizable</property>
@@ -3982,7 +3982,7 @@
                                                             <property name="pane_border">1</property>
                                                             <property name="pane_position"></property>
                                                             <property name="pane_size"></property>
-                                                            <property name="permission">protected</property>
+                                                            <property name="permission">public</property>
                                                             <property name="pin_button">1</property>
                                                             <property name="pos"></property>
                                                             <property name="resize">Resizable</property>
@@ -4084,7 +4084,7 @@
                                                             <property name="pane_border">1</property>
                                                             <property name="pane_position"></property>
                                                             <property name="pane_size"></property>
-                                                            <property name="permission">protected</property>
+                                                            <property name="permission">public</property>
                                                             <property name="pin_button">1</property>
                                                             <property name="pos"></property>
                                                             <property name="resize">Resizable</property>
@@ -4344,7 +4344,7 @@
                                                             <property name="pane_border">1</property>
                                                             <property name="pane_position"></property>
                                                             <property name="pane_size"></property>
-                                                            <property name="permission">protected</property>
+                                                            <property name="permission">public</property>
                                                             <property name="pin_button">1</property>
                                                             <property name="pos"></property>
                                                             <property name="resize">Resizable</property>
@@ -4508,7 +4508,7 @@
                                                                                 <property name="pane_border">1</property>
                                                                                 <property name="pane_position"></property>
                                                                                 <property name="pane_size"></property>
-                                                                                <property name="permission">protected</property>
+                                                                                <property name="permission">public</property>
                                                                                 <property name="pin_button">1</property>
                                                                                 <property name="pos"></property>
                                                                                 <property name="resize">Resizable</property>
@@ -4673,7 +4673,7 @@
                                                                                 <property name="hidden">0</property>
                                                                                 <property name="id">ID_FPS_INTEGER</property>
                                                                                 <property name="initial">30</property>
-                                                                                <property name="max">60</property>
+                                                                                <property name="max">120</property>
                                                                                 <property name="max_size"></property>
                                                                                 <property name="maximize_button">0</property>
                                                                                 <property name="maximum_size"></property>
@@ -4686,7 +4686,7 @@
                                                                                 <property name="pane_border">1</property>
                                                                                 <property name="pane_position"></property>
                                                                                 <property name="pane_size"></property>
-                                                                                <property name="permission">protected</property>
+                                                                                <property name="permission">public</property>
                                                                                 <property name="pin_button">1</property>
                                                                                 <property name="pos"></property>
                                                                                 <property name="resize">Resizable</property>
@@ -4948,7 +4948,7 @@
                                                                                 <property name="pane_border">1</property>
                                                                                 <property name="pane_position"></property>
                                                                                 <property name="pane_size"></property>
-                                                                                <property name="permission">protected</property>
+                                                                                <property name="permission">public</property>
                                                                                 <property name="pin_button">1</property>
                                                                                 <property name="pos"></property>
                                                                                 <property name="resize">Resizable</property>
@@ -5118,7 +5118,7 @@
                                                                                 <property name="pane_border">1</property>
                                                                                 <property name="pane_position"></property>
                                                                                 <property name="pane_size"></property>
-                                                                                <property name="permission">protected</property>
+                                                                                <property name="permission">public</property>
                                                                                 <property name="pin_button">1</property>
                                                                                 <property name="pos"></property>
                                                                                 <property name="resize">Resizable</property>
@@ -5290,7 +5290,7 @@
                                                                                 <property name="pane_border">1</property>
                                                                                 <property name="pane_position"></property>
                                                                                 <property name="pane_size"></property>
-                                                                                <property name="permission">protected</property>
+                                                                                <property name="permission">public</property>
                                                                                 <property name="pin_button">1</property>
                                                                                 <property name="pos"></property>
                                                                                 <property name="resize">Resizable</property>
@@ -5577,7 +5577,7 @@
                                                             <property name="pane_border">1</property>
                                                             <property name="pane_position"></property>
                                                             <property name="pane_size"></property>
-                                                            <property name="permission">protected</property>
+                                                            <property name="permission">public</property>
                                                             <property name="pin_button">1</property>
                                                             <property name="pos"></property>
                                                             <property name="resize">Resizable</property>
@@ -5751,7 +5751,7 @@
                                                             <property name="pane_border">1</property>
                                                             <property name="pane_position"></property>
                                                             <property name="pane_size"></property>
-                                                            <property name="permission">protected</property>
+                                                            <property name="permission">public</property>
                                                             <property name="pin_button">1</property>
                                                             <property name="pos"></property>
                                                             <property name="resize">Resizable</property>
@@ -5925,7 +5925,7 @@
                                                             <property name="pane_border">1</property>
                                                             <property name="pane_position"></property>
                                                             <property name="pane_size"></property>
-                                                            <property name="permission">protected</property>
+                                                            <property name="permission">public</property>
                                                             <property name="pin_button">1</property>
                                                             <property name="pos"></property>
                                                             <property name="resize">Resizable</property>
@@ -6099,7 +6099,7 @@
                                                             <property name="pane_border">1</property>
                                                             <property name="pane_position"></property>
                                                             <property name="pane_size"></property>
-                                                            <property name="permission">protected</property>
+                                                            <property name="permission">public</property>
                                                             <property name="pin_button">1</property>
                                                             <property name="pos"></property>
                                                             <property name="resize">Resizable</property>
@@ -6273,7 +6273,7 @@
                                                             <property name="pane_border">1</property>
                                                             <property name="pane_position"></property>
                                                             <property name="pane_size"></property>
-                                                            <property name="permission">protected</property>
+                                                            <property name="permission">public</property>
                                                             <property name="pin_button">1</property>
                                                             <property name="pos"></property>
                                                             <property name="resize">Resizable</property>

+ 22 - 24
obs/forms/OBSWindows.h

@@ -194,58 +194,56 @@ class OBSBasicSettingsBase : public DialogSubclass
 	private:
 	
 	protected:
-		wxListbook* m_listbook1;
-		wxPanel* generalPanel;
+		wxListbook* settingsList;
 		wxStaticText* m_staticText27;
-		wxComboBox* languageList;
-		wxPanel* outputsPanel;
 		wxPanel* videoPanel;
 		wxStaticText* m_staticText6;
-		wxComboBox* videoAdapterList;
 		wxStaticText* m_staticText8;
-		wxComboBox* baseResList;
 		wxStaticText* m_staticText10;
-		wxComboBox* downscaleResList;
 		wxStaticText* m_staticText11;
-		wxComboBox* filterList;
-		wxCheckBox* disableAeroCheckbox;
 		wxStaticLine* m_staticline1;
 		wxStaticText* m_staticText22;
-		wxChoicebook* fpsTypeList;
 		wxPanel* m_panel13;
-		wxComboBox* fpsCommonList;
 		wxPanel* m_panel14;
-		wxSpinCtrl* fpsIntegerScroller;
 		wxPanel* m_panel15;
 		wxStaticText* m_staticText20;
-		wxSpinCtrl* fpsNumeratorScroller;
 		wxStaticText* m_staticText21;
-		wxSpinCtrl* fpsDenominatorScroller;
 		wxPanel* m_panel16;
-		wxSpinCtrl* fpsNanosecondsScroller;
 		wxPanel* audioPanel;
 		wxStaticText* m_staticText23;
-		wxComboBox* desktopAudioDeviceList;
 		wxStaticText* m_staticText24;
-		wxComboBox* auxAudioDeviceList1;
 		wxStaticText* m_staticText241;
-		wxComboBox* auxAudioDeviceList2;
 		wxStaticText* m_staticText242;
-		wxComboBox* auxAudioDeviceList3;
 		wxStaticText* m_staticText243;
-		wxComboBox* auxAudioDeviceList4;
 		wxButton* okButton;
 		wxButton* cancelButton;
 		wxButton* applyButton;
 		
 		// Virtual event handlers, overide them in your derived class
-		virtual void generalPanelUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
-		virtual void outputsPanelUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
-		virtual void videoPanelUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
-		virtual void audioPanelUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
+		virtual void PageChanged( wxListbookEvent& event ) { event.Skip(); }
+		virtual void PageChanging( wxListbookEvent& event ) { event.Skip(); }
 		
 	
 	public:
+		wxPanel* generalPanel;
+		wxComboBox* languageList;
+		wxPanel* outputsPanel;
+		wxComboBox* videoAdapterList;
+		wxComboBox* baseResList;
+		wxComboBox* downscaleResList;
+		wxComboBox* filterList;
+		wxCheckBox* disableAeroCheckbox;
+		wxChoicebook* fpsTypeList;
+		wxComboBox* fpsCommonList;
+		wxSpinCtrl* fpsIntegerScroller;
+		wxSpinCtrl* fpsNumeratorScroller;
+		wxSpinCtrl* fpsDenominatorScroller;
+		wxSpinCtrl* fpsNanosecondsScroller;
+		wxComboBox* desktopAudioDeviceList;
+		wxComboBox* auxAudioDeviceList1;
+		wxComboBox* auxAudioDeviceList2;
+		wxComboBox* auxAudioDeviceList3;
+		wxComboBox* auxAudioDeviceList4;
 		
 		OBSBasicSettingsBase( wxWindow* parent, wxWindowID id = ID_OBS_BASIC_SETTINGS, const wxString& title = _("Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 872,686 ), long style = wxDEFAULT_DIALOG_STYLE ); 
 		~OBSBasicSettingsBase();

+ 1 - 0
obs/makefile.am

@@ -14,6 +14,7 @@ obs_PROGRAMS = obs
 obs_LDADD = $(top_srcdir)/libobs/libobs.la
 obs_SOURCES = window-main-basic.cpp \
 	      window-settings-basic.cpp \
+	      settings-basic-general.cpp \
 	      obs-app.cpp \
 	      wx-subclass.cpp \
 	      wx-wrappers.cpp \

+ 1 - 1
obs/platform-nix.cpp

@@ -21,5 +21,5 @@
 bool GetDataFilePath(const char *data, string &output)
 {
 	// TODO
-	return true;
+	return false;
 }

+ 1 - 1
obs/platform-osx.cpp

@@ -21,5 +21,5 @@
 bool GetDataFilePath(const char *data, string &output)
 {
 	// TODO
-	return true;
+	return false;
 }

+ 39 - 0
obs/settings-basic-general.cpp

@@ -0,0 +1,39 @@
+/******************************************************************************
+    Copyright (C) 2013 by Hugh Bailey <[email protected]>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+******************************************************************************/
+
+#include "settings-basic.hpp"
+#include "obs-app.hpp"
+
+#include <string>
+using namespace std;
+
+class GeneralSettings : public BasicSettingsData {
+public:
+	GeneralSettings(OBSBasicSettings *window);
+
+	virtual void Apply();
+};
+
+GeneralSettings::GeneralSettings(OBSBasicSettings *window)
+	: BasicSettingsData(window)
+{
+}
+
+void GeneralSettings::Apply()
+{
+	
+}

+ 29 - 0
obs/settings-basic.hpp

@@ -0,0 +1,29 @@
+/******************************************************************************
+    Copyright (C) 2013 by Hugh Bailey <[email protected]>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+******************************************************************************/
+
+#pragma once
+
+#include "settings.hpp"
+#include "window-settings-basic.hpp"
+
+class BasicSettingsData : public SettingsData {
+protected:
+	OBSBasicSettings *window;
+
+public:
+	inline BasicSettingsData(OBSBasicSettings *window) : window(window) {}
+};

+ 29 - 0
obs/settings.hpp

@@ -0,0 +1,29 @@
+/******************************************************************************
+    Copyright (C) 2013 by Hugh Bailey <[email protected]>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+******************************************************************************/
+
+#pragma once
+
+class SettingsData {
+protected:
+	bool dataChanged;
+
+public:
+	virtual ~SettingsData() {}
+	virtual void Apply()=0;
+
+	inline bool DataChanged() const {return dataChanged;}
+};

+ 29 - 0
obs/window-settings-basic.cpp

@@ -1,2 +1,31 @@
+/******************************************************************************
+    Copyright (C) 2013 by Hugh Bailey <[email protected]>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+******************************************************************************/
+
 #include "window-settings-basic.hpp"
 
+OBSBasicSettings::OBSBasicSettings(wxWindow *parent)
+	: OBSBasicSettingsBase(parent)
+{
+}
+
+void OBSBasicSettings::PageChanged(wxListbookEvent &event)
+{
+}
+
+void OBSBasicSettings::PageChanging(wxListbookEvent &event)
+{
+}

+ 21 - 4
obs/window-settings-basic.hpp

@@ -1,3 +1,20 @@
+/******************************************************************************
+    Copyright (C) 2013 by Hugh Bailey <[email protected]>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+******************************************************************************/
+
 #pragma once
 
 #include "forms/OBSWindows.h"
@@ -5,9 +22,9 @@
 class OBSBasicSettings : public OBSBasicSettingsBase {
 protected:
 
+	virtual void PageChanged(wxListbookEvent &event);
+	virtual void PageChanging(wxListbookEvent &event);
+
 public:
-	inline OBSBasicSettings(wxWindow *parent)
-		: OBSBasicSettingsBase(parent)
-	{
-	}
+	OBSBasicSettings(wxWindow *parent);
 };

+ 3 - 0
vs/2010/OBS/OBS.vcxproj

@@ -170,6 +170,7 @@
     <ClCompile Include="..\..\..\obs\forms\OBSWindows.cpp" />
     <ClCompile Include="..\..\..\obs\obs-app.cpp" />
     <ClCompile Include="..\..\..\obs\platform-windows.cpp" />
+    <ClCompile Include="..\..\..\obs\settings-basic-general.cpp" />
     <ClCompile Include="..\..\..\obs\window-main-basic.cpp" />
     <ClCompile Include="..\..\..\obs\window-settings-basic.cpp" />
     <ClCompile Include="..\..\..\obs\wx-subclass.cpp" />
@@ -180,6 +181,8 @@
     <ClInclude Include="..\..\..\obs\obs-app.hpp" />
     <ClInclude Include="..\..\..\obs\obs-wrappers.hpp" />
     <ClInclude Include="..\..\..\obs\platform.hpp" />
+    <ClInclude Include="..\..\..\obs\settings-basic.hpp" />
+    <ClInclude Include="..\..\..\obs\settings.hpp" />
     <ClInclude Include="..\..\..\obs\window-main-basic.hpp" />
     <ClInclude Include="..\..\..\obs\window-settings-basic.hpp" />
     <ClInclude Include="..\..\..\obs\wx-subclass.hpp" />

+ 9 - 0
vs/2010/OBS/OBS.vcxproj.filters

@@ -39,6 +39,9 @@
     <ClCompile Include="..\..\..\obs\window-settings-basic.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\..\obs\settings-basic-general.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\..\obs\obs-app.hpp">
@@ -65,5 +68,11 @@
     <ClInclude Include="..\..\..\obs\window-settings-basic.hpp">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\..\obs\settings-basic.hpp">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\obs\settings.hpp">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
 </Project>