window-main-basic.cpp 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /******************************************************************************
  2. Copyright (C) 2013 by Hugh Bailey <[email protected]>
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation, either version 2 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. ******************************************************************************/
  14. #include "obs-app.hpp"
  15. #include "window-main-basic.hpp"
  16. void OBSBasic::OnClose(wxCloseEvent& event)
  17. {
  18. wxGetApp().ExitMainLoop();
  19. event.Skip();
  20. }
  21. void OBSBasic::OnMinimize(wxIconizeEvent& event)
  22. {
  23. event.Skip();
  24. }
  25. void OBSBasic::OnSize(wxSizeEvent& event)
  26. {
  27. struct obs_video_info ovi;
  28. event.Skip();
  29. if (!obs_get_video_info(&ovi))
  30. return;
  31. /* resize preview panel to fix to the top section of the window */
  32. wxSize targetSize = GetPreviewContainer()->GetSize();
  33. double targetAspect = double(targetSize.x) / double(targetSize.y);
  34. double baseAspect = double(ovi.base_width) / double(ovi.base_height);
  35. if (targetAspect > baseAspect)
  36. GetPreviewPanel()->SetMinSize(wxSize(targetSize.y * baseAspect,
  37. targetSize.y));
  38. else
  39. GetPreviewPanel()->SetMinSize(wxSize(targetSize.x,
  40. targetSize.x / baseAspect));
  41. }
  42. void OBSBasic::file_newOnMenuSelection(wxCommandEvent& event)
  43. {
  44. }
  45. void OBSBasic::file_openOnMenuSelection(wxCommandEvent& event)
  46. {
  47. }
  48. void OBSBasic::file_saveOnMenuSelection(wxCommandEvent& event)
  49. {
  50. }
  51. void OBSBasic::file_exitOnMenuSelection(wxCommandEvent& event)
  52. {
  53. }
  54. void OBSBasic::scenesOnRightDown(wxMouseEvent& event)
  55. {
  56. }
  57. void OBSBasic::sceneAddOnToolClicked(wxCommandEvent& event)
  58. {
  59. }
  60. void OBSBasic::sceneRemoveOnToolClicked(wxCommandEvent& event)
  61. {
  62. }
  63. void OBSBasic::scenePropertiesOnToolClicked(wxCommandEvent& event)
  64. {
  65. }
  66. void OBSBasic::sceneUpOnToolClicked(wxCommandEvent& event)
  67. {
  68. }
  69. void OBSBasic::sceneDownOnToolClicked(wxCommandEvent& event)
  70. {
  71. }
  72. void OBSBasic::sourcesOnRightDown(wxMouseEvent& event)
  73. {
  74. }
  75. void OBSBasic::sourceAddOnToolClicked(wxCommandEvent& event)
  76. {
  77. }
  78. void OBSBasic::sourceRemoveOnToolClicked(wxCommandEvent& event)
  79. {
  80. }
  81. void OBSBasic::sourcePropertiesOnToolClicked(wxCommandEvent& event)
  82. {
  83. }
  84. void OBSBasic::sourceUpOnToolClicked(wxCommandEvent& event)
  85. {
  86. }
  87. void OBSBasic::sourceDownOnToolClicked(wxCommandEvent& event)
  88. {
  89. }