btn.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. ////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2016 RWS Inc, All Rights Reserved
  4. //
  5. // This program is free software; you can redistribute it and/or modify
  6. // it under the terms of version 2 of the GNU General Public License as published by
  7. // the Free Software Foundation
  8. //
  9. // This program is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU General Public License along
  15. // with this program; if not, write to the Free Software Foundation, Inc.,
  16. // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  17. //
  18. //////////////////////////////////////////////////////////////////////////////
  19. //
  20. // BTN.CPP
  21. //
  22. // History:
  23. // 08/07/96 JMI Started.
  24. //
  25. // 03/19/97 JMI Started tracking history of this file.
  26. //
  27. // 03/19/97 JMI Converted to using the RHot::m_iecUser (was using
  28. // RHot::m_epcUser) so HotCall and CursorEvent now take
  29. // RInputEvent ptrs.
  30. //
  31. //////////////////////////////////////////////////////////////////////////////
  32. // Please see the CPP file for an explanation of this API.
  33. //////////////////////////////////////////////////////////////////////////////
  34. #ifndef BTN_H
  35. #define BTN_H
  36. //////////////////////////////////////////////////////////////////////////////
  37. // Headers.
  38. //////////////////////////////////////////////////////////////////////////////
  39. #include "System.h"
  40. // If PATHS_IN_INCLUDES macro is defined, we can utilized relative
  41. // paths to a header file. In this case we generally go off of our
  42. // RSPiX root directory. System.h MUST be included before this macro
  43. // is evaluated. System.h is the header that, based on the current
  44. // platform (or more so in this case on the compiler), defines
  45. // PATHS_IN_INCLUDES. Blue.h includes system.h so you can include that
  46. // instead.
  47. #ifdef PATHS_IN_INCLUDES
  48. #include "ORANGE/GUI/guiItem.h"
  49. #else
  50. #include "GuiItem.h"
  51. #endif // PATHS_IN_INCLUDES
  52. //////////////////////////////////////////////////////////////////////////////
  53. // Macros.
  54. //////////////////////////////////////////////////////////////////////////////
  55. //////////////////////////////////////////////////////////////////////////////
  56. // Typedefs.
  57. //////////////////////////////////////////////////////////////////////////////
  58. //////////////////////////////////////////////////////////////////////////////
  59. class RBtn : public RGuiItem
  60. {
  61. public: // Construction/Destruction.
  62. // Default constructor.
  63. RBtn(void);
  64. // Destructor.
  65. ~RBtn(void);
  66. //////////////////////////////////////////////////////////////////////////////
  67. public: // Methods.
  68. ////////////////////////////////////////////////////////////////////////
  69. // Methods.
  70. ////////////////////////////////////////////////////////////////////////
  71. // Compose item.
  72. virtual // If you override this, call this base if possible.
  73. void Compose( // Returns nothing.
  74. RImage* pim = NULL); // Dest image, uses m_im if NULL.
  75. // Cursor event notification.
  76. // Events in event area.
  77. virtual // If you override this, call this base if possible.
  78. void CursorEvent( // Returns nothing.
  79. RInputEvent* pie); // In: Most recent user input event.
  80. // Out: pie->sUsed = TRUE, if used.
  81. ////////////////////////////////////////////////////////////////////////
  82. // Querries.
  83. ////////////////////////////////////////////////////////////////////////
  84. //////////////////////////////////////////////////////////////////////////////
  85. public: // Static
  86. //////////////////////////////////////////////////////////////////////////////
  87. public: // Querries.
  88. //////////////////////////////////////////////////////////////////////////////
  89. protected: // Internal functions.
  90. //////////////////////////////////////////////////////////////////////////////
  91. public: // Member variables.
  92. protected: // Internal typedefs.
  93. protected: // Protected member variables.
  94. };
  95. #endif // BTN_H
  96. //////////////////////////////////////////////////////////////////////////////
  97. // EOF
  98. //////////////////////////////////////////////////////////////////////////////