Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

191 lines
3.1 KiB

  1. #if !defined( _VERTICAL_TEXT_SCROLL_ )
  2. #define _VERTICAL_TEXT_SCROLL_
  3. #include "edit.hxx"
  4. DECLARE_CLASS( LOG_IO_DP_DRIVE );
  5. class VERTICAL_TEXT_SCROLL : public EDIT_OBJECT {
  6. public:
  7. NONVIRTUAL
  8. VERTICAL_TEXT_SCROLL(
  9. ) {};
  10. VIRTUAL
  11. BOOLEAN
  12. Initialize(
  13. IN HWND WindowHandle,
  14. IN INT ClientHeight,
  15. IN INT ClientWidth,
  16. IN PLOG_IO_DP_DRIVE Drive
  17. ) = 0;
  18. NONVIRTUAL
  19. BOOLEAN
  20. Initialize(
  21. IN HWND WindowHandle,
  22. IN INT NumLines,
  23. IN INT ClientHeight,
  24. IN INT ClientWidth,
  25. IN INT CharHeight,
  26. IN INT CharWidth
  27. );
  28. NONVIRTUAL
  29. VOID
  30. SetRange(
  31. IN HWND WindowHandle,
  32. IN INT NumLines
  33. );
  34. VIRTUAL
  35. VOID
  36. ClientSize(
  37. IN INT Height,
  38. IN INT Width
  39. );
  40. VIRTUAL
  41. VOID
  42. ScrollUp(
  43. IN HWND WindowHandle
  44. );
  45. VIRTUAL
  46. VOID
  47. ScrollDown(
  48. IN HWND WindowHandle
  49. );
  50. VIRTUAL
  51. VOID
  52. PageUp(
  53. IN HWND WindowHandle
  54. );
  55. VIRTUAL
  56. VOID
  57. PageDown(
  58. IN HWND WindowHandle
  59. );
  60. VIRTUAL
  61. VOID
  62. ThumbPosition(
  63. IN HWND WindowHandle,
  64. IN INT NewThumbPosition
  65. );
  66. NONVIRTUAL
  67. INT
  68. QueryNumLines(
  69. ) CONST;
  70. NONVIRTUAL
  71. INT
  72. QueryScrollPosition(
  73. ) CONST;
  74. NONVIRTUAL
  75. INT
  76. QueryClientHeight(
  77. ) CONST;
  78. NONVIRTUAL
  79. INT
  80. QueryClientWidth(
  81. ) CONST;
  82. NONVIRTUAL
  83. INT
  84. QueryCharHeight(
  85. ) CONST;
  86. NONVIRTUAL
  87. INT
  88. QueryCharWidth(
  89. ) CONST;
  90. NONVIRTUAL
  91. VOID
  92. WriteLine(
  93. IN HDC DeviceContext,
  94. IN INT LineNumber,
  95. IN PTCHAR String
  96. );
  97. private:
  98. NONVIRTUAL
  99. VOID
  100. UpdateScrollPosition(
  101. IN HWND WindowHandle
  102. );
  103. INT _num_lines;
  104. LONG _scroll_position;
  105. INT _client_height;
  106. INT _client_width;
  107. LONG _char_height;
  108. LONG _char_width;
  109. };
  110. INLINE
  111. INT
  112. VERTICAL_TEXT_SCROLL::QueryNumLines(
  113. ) CONST
  114. {
  115. return _num_lines;
  116. }
  117. INLINE
  118. INT
  119. VERTICAL_TEXT_SCROLL::QueryScrollPosition(
  120. ) CONST
  121. {
  122. return _scroll_position;
  123. }
  124. INLINE
  125. INT
  126. VERTICAL_TEXT_SCROLL::QueryClientHeight(
  127. ) CONST
  128. {
  129. return _client_height;
  130. }
  131. INLINE
  132. INT
  133. VERTICAL_TEXT_SCROLL::QueryClientWidth(
  134. ) CONST
  135. {
  136. return _client_width;
  137. }
  138. INLINE
  139. INT
  140. VERTICAL_TEXT_SCROLL::QueryCharHeight(
  141. ) CONST
  142. {
  143. return _char_height;
  144. }
  145. INLINE
  146. INT
  147. VERTICAL_TEXT_SCROLL::QueryCharWidth(
  148. ) CONST
  149. {
  150. return _char_width;
  151. }
  152. #endif