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.

107 lines
3.4 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corp., 1991 **/
  4. /**********************************************************************/
  5. /*
  6. bltsss.hxx
  7. Header file for the SPIN_SLE_STR object
  8. FILE HISTORY:
  9. terryk 16-Apr-1991 creation
  10. terryk 11-Nov-1991 change INT to LONG
  11. */
  12. #ifndef _BLTSSS_HXX_
  13. #define _BLTSSS_HXX_
  14. #include "bltctrl.hxx"
  15. #include "bltedit.hxx"
  16. /**********************************************************************
  17. NAME: SPIN_SLE_STR
  18. SYNOPSIS: SPIN ITEM object which handles string
  19. INTERFACE:
  20. SPIN_SLE_STR() - constructor
  21. ~SPIN_SLE_STR() - destructor
  22. QueryContent() - return the current context in the window
  23. Update() - Refresh the current window's context
  24. SaveCurrentData() - Get the current window's context and
  25. store it in the internal variable
  26. QueryAccCharPos() - It will test whether the given character
  27. is the first character of the object's
  28. string set.
  29. PARENT: SLE, CHANGEABLE_SPIN_ITEM
  30. USES: NLS_STR
  31. CAVEATS: In order to use this class, the user needs to define
  32. a list of strings. The identifier of the list of strings
  33. must be continuous.
  34. NOTES:
  35. HISTORY:
  36. terryk 23-May-91 Created
  37. beng 05-Oct-1991 Win32 conversion
  38. **********************************************************************/
  39. DLL_CLASS SPIN_SLE_STR: public SLE, public CHANGEABLE_SPIN_ITEM
  40. {
  41. private:
  42. BOOL _fActive; // update flag
  43. NLS_STR *_anlsStr; // array of the strings
  44. static const TCHAR * _pszClassName; // default window class type
  45. BLT_BACKGROUND_EDIT * _pbkgndframe; // background edit frame
  46. VOID SetStr( LONG iStringIndex ); // print out the string
  47. LONG QueryStrNum( const NLS_STR & nlsStr, LONG cStr );
  48. virtual APIERR GetAccKey( NLS_STR * pnls );
  49. APIERR Initialize( LONG idsStart, OWNER_WINDOW * powin, CID cidFrame );
  50. APIERR Initialize( const TCHAR *apszString[],
  51. OWNER_WINDOW * powin, CID cidFrame );
  52. protected:
  53. virtual BOOL OnFocus( const FOCUS_EVENT & event );
  54. virtual BOOL OnChar( const CHAR_EVENT & event );
  55. virtual BOOL OnKeyDown( const VKEY_EVENT & event );
  56. public:
  57. SPIN_SLE_STR( OWNER_WINDOW * powin, CID cidEdit, LONG idsStart,
  58. LONG cIDString, BOOL fWrap = TRUE, CID cidFrame = -1 );
  59. SPIN_SLE_STR( OWNER_WINDOW * powin, CID cidEdit, LONG idsStart,
  60. LONG cIDString, XYPOINT xy, XYDIMENSION dxy,
  61. ULONG flStyle = ES_CENTER | ES_MULTILINE | WS_TABSTOP | WS_CHILD,
  62. BOOL fWrap = TRUE, CID cidFrame = -1 );
  63. SPIN_SLE_STR( OWNER_WINDOW * powin, CID cidEdit, const TCHAR *apszString[],
  64. LONG cIDString, BOOL fWrap = TRUE, CID cidFrame = -1 );
  65. SPIN_SLE_STR( OWNER_WINDOW * powin, CID cidEdit, const TCHAR *apszString[],
  66. LONG cIDString, XYPOINT xy, XYDIMENSION dxy,
  67. ULONG flStyle = ES_CENTER | ES_MULTILINE | WS_TABSTOP | WS_CHILD,
  68. BOOL fWrap = TRUE, CID cidFrame = -1 );
  69. ~SPIN_SLE_STR();
  70. APIERR QueryContent( NLS_STR * pnlsStr ) const;
  71. VOID Update();
  72. APIERR SaveCurrentData();
  73. LONG QueryAccCharPos( WCHAR wcInput );
  74. VOID SetRange( const LONG dRange );
  75. };
  76. #endif // _BLTSSS_HXX_