DListener.cpp 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. BobToolz plugin for GtkRadiant
  3. Copyright (C) 2001 Gordon Biggans
  4. This library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. This library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with this library; if not, write to the Free Software
  14. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  15. */
  16. // DListener.cpp: implementation of the DListener class.
  17. //
  18. //////////////////////////////////////////////////////////////////////
  19. #include "StdAfx.h"
  20. #include "DListener.h"
  21. //////////////////////////////////////////////////////////////////////
  22. // Construction/Destruction
  23. //////////////////////////////////////////////////////////////////////
  24. DListener::DListener()
  25. {
  26. refCount = 1;
  27. m_bHooked = FALSE;
  28. }
  29. DListener::~DListener()
  30. {
  31. UnRegister();
  32. }
  33. void DListener::Register()
  34. {
  35. g_MessageTable.m_pfnHookWindow( this );
  36. m_bHooked = TRUE;
  37. }
  38. void DListener::UnRegister()
  39. {
  40. if(m_bHooked)
  41. {
  42. g_MessageTable.m_pfnUnHookWindow( this );
  43. m_bHooked = FALSE;
  44. }
  45. }
  46. bool DListener::OnMouseMove(unsigned int nFlags, double x, double y)
  47. {
  48. if(!parent->UpdatePath())
  49. delete parent;
  50. return FALSE;
  51. }
  52. bool DListener::OnLButtonDown(unsigned int nFlags, double x, double y)
  53. {
  54. return FALSE;
  55. }
  56. bool DListener::OnLButtonUp(unsigned int nFlags, double x, double y)
  57. {
  58. return FALSE;
  59. }
  60. bool DListener::OnRButtonDown(unsigned int nFlags, double x, double y)
  61. {
  62. return FALSE;
  63. }
  64. bool DListener::OnRButtonUp(unsigned int nFlags, double x, double y)
  65. {
  66. return FALSE;
  67. }
  68. bool DListener::OnMButtonDown(unsigned int nFlags, double x, double y)
  69. {
  70. return FALSE;
  71. }
  72. bool DListener::OnMButtonUp(unsigned int nFlags, double x, double y)
  73. {
  74. return FALSE;
  75. }