dlg.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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. // Dlg.H
  21. //
  22. // History:
  23. // 01/18/97 JMI Started tracking history of this file.
  24. // Converted Do() to take an RInputEvent* instead of a
  25. // long*.
  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. //
  33. // See CPP for description.
  34. //
  35. //////////////////////////////////////////////////////////////////////////////
  36. #ifndef DLG_H
  37. #define DLG_H
  38. //////////////////////////////////////////////////////////////////////////////
  39. // Headers.
  40. //////////////////////////////////////////////////////////////////////////////
  41. #include "System.h"
  42. // If PATHS_IN_INCLUDES macro is defined, we can utilized relative
  43. // paths to a header file. In this case we generally go off of our
  44. // RSPiX root directory. System.h MUST be included before this macro
  45. // is evaluated. System.h is the header that, based on the current
  46. // platform (or more so in this case on the compiler), defines
  47. // PATHS_IN_INCLUDES. Blue.h includes system.h so you can include that
  48. // instead.
  49. #ifdef PATHS_IN_INCLUDES
  50. #include "ORANGE/GUI/guiItem.h"
  51. #else
  52. #include "GuiItem.h"
  53. #endif // PATHS_IN_INCLUDES
  54. //////////////////////////////////////////////////////////////////////////////
  55. // Macros.
  56. //////////////////////////////////////////////////////////////////////////////
  57. //////////////////////////////////////////////////////////////////////////////
  58. // Typedefs.
  59. //////////////////////////////////////////////////////////////////////////////
  60. //////////////////////////////////////////////////////////////////////////////
  61. class RDlg : public RGuiItem
  62. {
  63. public: // Construction/Destruction.
  64. // Default constructor.
  65. RDlg(void);
  66. // Destructor.
  67. ~RDlg(void);
  68. //////////////////////////////////////////////////////////////////////////////
  69. public: // Methods.
  70. ////////////////////////////////////////////////////////////////////////
  71. // Methods.
  72. ////////////////////////////////////////////////////////////////////////
  73. // Does as Dlg would Do.
  74. virtual // If you override this, call this base if possible.
  75. void Do( // Returns nothing.
  76. RInputEvent* pie); // In: Most recent user input event.
  77. // Out: pie->sUsed = TRUE, if used.
  78. // Set this item's event area. This is the area where cursor events are
  79. // interesting to the item.
  80. virtual // If you override this, call this base if possible.
  81. void SetEventArea(void); // Returns nothing.
  82. // Cursor event notification.
  83. // Events in event area.
  84. virtual // If you override this, call this base if possible.
  85. void CursorEvent( // Returns nothing.
  86. RInputEvent* pie); // In: Most recent user input event.
  87. // Out: pie->sUsed = TRUE, if used.
  88. // Compose item.
  89. virtual // If you override this, call this base if possible.
  90. void Compose( // Returns nothing.
  91. RImage* pim = NULL); // Dest image, uses m_im if NULL.
  92. ////////////////////////////////////////////////////////////////////////
  93. // Querries.
  94. ////////////////////////////////////////////////////////////////////////
  95. // Get the "client" area (i.e., non-border/title area) relative to this
  96. // item. Calls base class version.
  97. void GetClient( // Returns nothing.
  98. short* psX, // Out: X position unless NULL.
  99. short* psY, // Out: Y position unless NULL.
  100. short* psW, // Out: Width unless NULL.
  101. short* psH); // Out: Height unless NULL.
  102. //////////////////////////////////////////////////////////////////////////////
  103. public: // Static
  104. //////////////////////////////////////////////////////////////////////////////
  105. public: // Querries.
  106. //////////////////////////////////////////////////////////////////////////////
  107. protected: // Internal functions.
  108. //////////////////////////////////////////////////////////////////////////////
  109. public: // Member variables.
  110. short m_sMoveOffsetX;
  111. short m_sMoveOffsetY;
  112. protected: // Internal typedefs.
  113. protected: // Protected member variables.
  114. };
  115. #endif // DLG_H
  116. //////////////////////////////////////////////////////////////////////////////
  117. // EOF
  118. //////////////////////////////////////////////////////////////////////////////