diff --git a/src/cube/SettingsController.cpp b/src/cube/SettingsController.cpp new file mode 100644 index 000000000..07d54b3b2 --- /dev/null +++ b/src/cube/SettingsController.cpp @@ -0,0 +1,65 @@ +////////////////////////////////////////////////////////////////////////////// +// +// License Agreement: +// +// The following are Copyright © 2007, mC2 Team +// +// Sources and Binaries of: mC2, win32cpp +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * Neither the name of the author nor the names of other contributors may +// be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +////////////////////////////////////////////////////////////////////////////// + +#include +#include + +////////////////////////////////////////////////////////////////////////////// + +using namespace musik::cube; + +////////////////////////////////////////////////////////////////////////////// + +/*ctor*/ SettingsController::SettingsController(SettingsView& settingsView) +: settingsView(settingsView) +{ + this->settingsView.Created.connect( + this, &SettingsController::OnViewCreated); + + this->settingsView.Resized.connect( + this, &SettingsController::OnViewResized); +} + +void SettingsController::OnViewCreated() +{ + +} + +void SettingsController::OnViewResized(Size size) +{ +} diff --git a/src/cube/SettingsController.hpp b/src/cube/SettingsController.hpp new file mode 100644 index 000000000..8a16afb52 --- /dev/null +++ b/src/cube/SettingsController.hpp @@ -0,0 +1,66 @@ +////////////////////////////////////////////////////////////////////////////// +// +// License Agreement: +// +// The following are Copyright © 2007, mC2 Team +// +// Sources and Binaries of: mC2, win32cpp +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * Neither the name of the author nor the names of other contributors may +// be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +////////////////////////////////////////////////////////////////////////////// + +#pragma once + +////////////////////////////////////////////////////////////////////////////// + +#include + +////////////////////////////////////////////////////////////////////////////// + +using namespace win32cpp; + +namespace musik { namespace cube { + +////////////////////////////////////////////////////////////////////////////// + +class SettingsController : public EventHandler +{ +public: /*ctor*/ SettingsController(SettingsView& settingsView); + +protected: void OnViewCreated(); +protected: void OnViewResized(Size size); + +protected: SettingsView& settingsView; + +}; + +////////////////////////////////////////////////////////////////////////////// + +} } // musik::cube diff --git a/src/cube/SettingsView.cpp b/src/cube/SettingsView.cpp new file mode 100644 index 000000000..0b6040f7c --- /dev/null +++ b/src/cube/SettingsView.cpp @@ -0,0 +1,54 @@ +////////////////////////////////////////////////////////////////////////////// +// +// License Agreement: +// +// The following are Copyright © 2007, mC2 Team +// +// Sources and Binaries of: mC2, win32cpp +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * Neither the name of the author nor the names of other contributors may +// be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +////////////////////////////////////////////////////////////////////////////// + +#include +#include + +////////////////////////////////////////////////////////////////////////////// + +using namespace musik::cube; + +////////////////////////////////////////////////////////////////////////////// + +/*ctor*/ SettingsView::SettingsView() +{ +} + +void SettingsView::OnCreated() +{ +} diff --git a/src/cube/SettingsView.hpp b/src/cube/SettingsView.hpp new file mode 100644 index 000000000..fd7276f74 --- /dev/null +++ b/src/cube/SettingsView.hpp @@ -0,0 +1,64 @@ +////////////////////////////////////////////////////////////////////////////// +// +// License Agreement: +// +// The following are Copyright © 2007, mC2 Team +// +// Sources and Binaries of: mC2, win32cpp +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * Neither the name of the author nor the names of other contributors may +// be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +////////////////////////////////////////////////////////////////////////////// +#pragma once + +////////////////////////////////////////////////////////////////////////////// + +#include + +////////////////////////////////////////////////////////////////////////////// + +using namespace win32cpp; + +namespace musik { namespace cube { + +////////////////////////////////////////////////////////////////////////////// + +class SettingsView: public Frame +{ + +public: /*ctor*/ SettingsView(); +protected: virtual void OnCreated(); + + +}; + +////////////////////////////////////////////////////////////////////////////// + +} } // musik::cube + diff --git a/src/cube/SourcesModel.cpp b/src/cube/SourcesModel.cpp index b6315d3cd..48466d20a 100644 --- a/src/cube/SourcesModel.cpp +++ b/src/cube/SourcesModel.cpp @@ -135,6 +135,37 @@ private: TracklistView view; private: TracklistController controller; }; +////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// +#include +#include + +class SettingsItem: public SourcesItem +{ +private: /*ctor*/ SettingsItem() + : controller(view) + { + } + +public: /*dtor*/ ~SettingsItem() + { + } + +public: static SourcesItemRef Create() + { + return SourcesItemRef(new SettingsItem()); + } + +public: virtual uistring Caption() { return _T("Settings"); } +public: virtual Window* View() + { + return &this->view; + } + +private: SettingsView view; +private: SettingsController controller; +}; + ////////////////////////////////////////////////////////////////////////////// typedef SourcesListModel::Category Category; @@ -149,7 +180,7 @@ void SourcesModel::Load() CategoryRef viewCategory(new Category(_T("View"))); viewCategory->Add(BrowseItem::Create()); viewCategory->Add(NowPlayingItem::Create()); - viewCategory->Add(DummyItem::Create(_T("Settings"))); + viewCategory->Add(SettingsItem::Create()); this->AddCategory(viewCategory); CategoryRef playlistCategory(new Category(_T("Playlists"))); diff --git a/src/cube/TransportController.hpp b/src/cube/TransportController.hpp index 56cf26eb4..e7ba01b24 100644 --- a/src/cube/TransportController.hpp +++ b/src/cube/TransportController.hpp @@ -59,7 +59,6 @@ protected: void OnViewCreated(); protected: void OnViewResized(Size size); protected: TransportView& transportView; -protected: musik::core::audio::Transport transport; protected: void OnPlayPressed(); protected: void OnStopPressed(); diff --git a/src/cube/cube.vcproj b/src/cube/cube.vcproj index 54d40409f..76a5cb870 100644 --- a/src/cube/cube.vcproj +++ b/src/cube/cube.vcproj @@ -386,6 +386,26 @@ > + + + + + + + + + +