wa2buckitems.cpp 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. #include <precomp.h>
  2. #include "wa2buckitems.h"
  3. #include "wa2frontend.h"
  4. #include "wa2wndembed.h"
  5. #include "gen.h"
  6. #include "../Agave/Language/api_language.h"
  7. //-------------------------------------------------------------------------------------------
  8. Wa2BucketItem::Wa2BucketItem(GUID g, const wchar_t *t) : BucketItemT<ButtonWnd> (g, t) {
  9. }
  10. Wa2BucketItem::~Wa2BucketItem() {
  11. }
  12. //-------------------------------------------------------------------------------------------
  13. PlBucketItem::PlBucketItem() : Wa2BucketItem(INVALID_GUID, L"Playlist Editor") {
  14. }
  15. PlBucketItem::~PlBucketItem() {
  16. }
  17. void PlBucketItem::onLeftPush(int x, int y) {
  18. BUCKETITEM_PARENT::onLeftPush(x, y);
  19. wa2.setWindowVisible(IPC_GETWND_PE, !wa2.isWindowVisible(IPC_GETWND_PE));
  20. }
  21. //-------------------------------------------------------------------------------------------
  22. EmbedBucketItem::EmbedBucketItem() : Wa2BucketItem(INVALID_GUID, L"Embed?") {
  23. }
  24. EmbedBucketItem::~EmbedBucketItem() {
  25. }
  26. void EmbedBucketItem::onLeftPush(int x, int y) {
  27. BUCKETITEM_PARENT::onLeftPush(x, y);
  28. //wa2.setWindowVisible(IPC_GETWND_PE, !wa2.isWindowVisible(IPC_GETWND_PE));
  29. }
  30. //-------------------------------------------------------------------------------------------
  31. #ifdef MINIBROWSER_SUPPORT
  32. MbBucketItem::MbBucketItem() : Wa2BucketItem(INVALID_GUID, L"Minibrowser") {
  33. }
  34. MbBucketItem::~MbBucketItem() {
  35. }
  36. void MbBucketItem::onLeftPush(int x, int y) {
  37. BUCKETITEM_PARENT::onLeftPush(x, y);
  38. wa2.setWindowVisible(IPC_GETWND_MB, !wa2.isWindowVisible(IPC_GETWND_MB));
  39. }
  40. #endif
  41. //-------------------------------------------------------------------------------------------
  42. VidBucketItem::VidBucketItem() : Wa2BucketItem(INVALID_GUID, L"Video Window") {
  43. }
  44. VidBucketItem::~VidBucketItem() {
  45. }
  46. //-------------------------------------------------------------------------------------------
  47. void VidBucketItem::onLeftPush(int x, int y) {
  48. BUCKETITEM_PARENT::onLeftPush(x, y);
  49. wa2.setWindowVisible(IPC_GETWND_VIDEO, !wa2.isWindowVisible(IPC_GETWND_VIDEO));
  50. }
  51. //-------------------------------------------------------------------------------------------
  52. MlBucketItem::MlBucketItem() : Wa2BucketItem(INVALID_GUID, L"Winamp Library") {
  53. }
  54. MlBucketItem::~MlBucketItem() {
  55. }
  56. #define WA_MEDIALIB_MENUITEM_ID 23123
  57. void MlBucketItem::onLeftPush(int x, int y) {
  58. BUCKETITEM_PARENT::onLeftPush(x, y);
  59. SendMessageW(wa2.getMainWindow(), WM_COMMAND, WA_MEDIALIB_MENUITEM_ID, 0);
  60. }
  61. //-------------------------------------------------------------------------------------------
  62. VisBucketItem::VisBucketItem() : Wa2BucketItem(INVALID_GUID, L"Visualizations") {
  63. }
  64. VisBucketItem::~VisBucketItem() {
  65. }
  66. void VisBucketItem::onLeftPush(int x, int y) {
  67. BUCKETITEM_PARENT::onLeftPush(x, y);
  68. wa2.toggleVis();
  69. }