2013-11-07 15:45:03 -08:00
|
|
|
/******************************************************************************
|
|
|
|
Copyright (C) 2013 by Hugh Bailey <obs.jim@gmail.com>
|
|
|
|
|
|
|
|
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
|
2013-12-02 21:24:38 -08:00
|
|
|
the Free Software Foundation, either version 2 of the License, or
|
2013-11-07 15:45:03 -08:00
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
2013-11-08 23:19:38 -08:00
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2013-11-07 15:45:03 -08:00
|
|
|
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/>.
|
|
|
|
******************************************************************************/
|
|
|
|
|
2013-11-23 22:38:52 -08:00
|
|
|
#include "obs-app.hpp"
|
2013-12-10 20:14:45 -08:00
|
|
|
#include "window-settings-basic.hpp"
|
2013-12-06 08:16:33 -08:00
|
|
|
#include "window-main-basic.hpp"
|
2013-11-22 15:20:52 -08:00
|
|
|
|
2013-12-10 20:14:45 -08:00
|
|
|
void OBSBasic::OnClose(wxCloseEvent &event)
|
2013-11-23 22:38:52 -08:00
|
|
|
{
|
|
|
|
wxGetApp().ExitMainLoop();
|
2013-12-06 05:39:19 -08:00
|
|
|
event.Skip();
|
|
|
|
}
|
|
|
|
|
2013-12-10 20:14:45 -08:00
|
|
|
void OBSBasic::OnMinimize(wxIconizeEvent &event)
|
2013-12-06 05:39:19 -08:00
|
|
|
{
|
|
|
|
event.Skip();
|
|
|
|
}
|
|
|
|
|
2013-12-10 20:14:45 -08:00
|
|
|
void OBSBasic::OnSize(wxSizeEvent &event)
|
2013-12-06 05:39:19 -08:00
|
|
|
{
|
|
|
|
struct obs_video_info ovi;
|
|
|
|
|
|
|
|
event.Skip();
|
|
|
|
|
|
|
|
if (!obs_get_video_info(&ovi))
|
|
|
|
return;
|
|
|
|
|
2013-12-06 08:16:33 -08:00
|
|
|
/* resize preview panel to fix to the top section of the window */
|
2013-12-06 05:39:19 -08:00
|
|
|
wxSize targetSize = GetPreviewContainer()->GetSize();
|
|
|
|
double targetAspect = double(targetSize.x) / double(targetSize.y);
|
|
|
|
double baseAspect = double(ovi.base_width) / double(ovi.base_height);
|
|
|
|
|
|
|
|
if (targetAspect > baseAspect)
|
|
|
|
GetPreviewPanel()->SetMinSize(wxSize(targetSize.y * baseAspect,
|
|
|
|
targetSize.y));
|
|
|
|
else
|
|
|
|
GetPreviewPanel()->SetMinSize(wxSize(targetSize.x,
|
|
|
|
targetSize.x / baseAspect));
|
2013-11-23 22:38:52 -08:00
|
|
|
}
|
|
|
|
|
2013-12-10 20:14:45 -08:00
|
|
|
void OBSBasic::fileNewClicked(wxCommandEvent &event)
|
2013-11-07 15:45:03 -08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-12-10 20:14:45 -08:00
|
|
|
void OBSBasic::fileOpenClicked(wxCommandEvent &event)
|
2013-11-07 15:45:03 -08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-12-10 20:14:45 -08:00
|
|
|
void OBSBasic::fileSaveClicked(wxCommandEvent &event)
|
2013-11-07 15:45:03 -08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-12-10 20:14:45 -08:00
|
|
|
void OBSBasic::fileExitClicked(wxCommandEvent &event)
|
2013-11-07 15:45:03 -08:00
|
|
|
{
|
2013-12-10 10:22:33 -08:00
|
|
|
wxGetApp().ExitMainLoop();
|
2013-11-07 15:45:03 -08:00
|
|
|
}
|
|
|
|
|
2013-12-10 20:14:45 -08:00
|
|
|
void OBSBasic::scenesRDown(wxMouseEvent &event)
|
2013-11-07 15:45:03 -08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-12-10 20:14:45 -08:00
|
|
|
void OBSBasic::sceneAddClicked(wxCommandEvent &event)
|
2013-11-07 15:45:03 -08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-12-10 20:14:45 -08:00
|
|
|
void OBSBasic::sceneRemoveClicked(wxCommandEvent &event)
|
2013-11-07 15:45:03 -08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-12-10 20:14:45 -08:00
|
|
|
void OBSBasic::scenePropertiesClicked(wxCommandEvent &event)
|
2013-11-07 15:45:03 -08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-12-10 20:14:45 -08:00
|
|
|
void OBSBasic::sceneUpClicked(wxCommandEvent &event)
|
2013-11-07 15:45:03 -08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-12-10 20:14:45 -08:00
|
|
|
void OBSBasic::sceneDownClicked(wxCommandEvent &event)
|
2013-11-07 15:45:03 -08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-12-10 20:14:45 -08:00
|
|
|
void OBSBasic::sourcesRDown(wxMouseEvent &event)
|
2013-11-07 15:45:03 -08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-12-10 20:14:45 -08:00
|
|
|
void OBSBasic::sourceAddClicked(wxCommandEvent &event)
|
2013-11-07 15:45:03 -08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-12-10 20:14:45 -08:00
|
|
|
void OBSBasic::sourceRemoveClicked(wxCommandEvent &event)
|
2013-11-07 15:45:03 -08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-12-10 20:14:45 -08:00
|
|
|
void OBSBasic::sourcePropertiesClicked(wxCommandEvent &event)
|
2013-11-07 15:45:03 -08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-12-10 20:14:45 -08:00
|
|
|
void OBSBasic::sourceUpClicked(wxCommandEvent &event)
|
2013-11-07 15:45:03 -08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-12-10 20:14:45 -08:00
|
|
|
void OBSBasic::sourceDownClicked(wxCommandEvent &event)
|
2013-11-07 15:45:03 -08:00
|
|
|
{
|
|
|
|
}
|
2013-12-10 10:22:33 -08:00
|
|
|
|
2013-12-10 20:14:45 -08:00
|
|
|
void OBSBasic::settingsClicked(wxCommandEvent &event)
|
|
|
|
{
|
2013-12-16 07:06:30 -08:00
|
|
|
OBSBasicSettings test(this);
|
|
|
|
test.ShowModal();
|
2013-12-10 20:14:45 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
void OBSBasic::exitClicked(wxCommandEvent &event)
|
2013-12-10 10:22:33 -08:00
|
|
|
{
|
|
|
|
wxGetApp().ExitMainLoop();
|
|
|
|
}
|