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.

123 lines
3.3 KiB

  1. /*****************************************************************/
  2. /** Microsoft LAN Manager **/
  3. /** Copyright(c) Microsoft Corp., 1991 **/
  4. /*****************************************************************/
  5. /*
  6. * reslb.hxx
  7. * Resrouce listbox header file
  8. *
  9. * The resource listbox displays the resources of a particular server
  10. * or domain (e.g., print or disk shares, aliases)
  11. *
  12. *
  13. * History:
  14. * RustanL 20-Feb-1991 Created from browdlg.cxx to fit new
  15. * BLT_LISTBOX model
  16. * rustanl 23-Mar-1991 Rolled in code review changes from
  17. * CR on 19-Mar-1991 attended by ChuckC,
  18. * KevinL, JohnL, KeithMo, Hui-LiCh, RustanL.
  19. * gregj 01-May-1991 Added GUILTT support.
  20. */
  21. #ifndef _RESLB_HXX_
  22. #define _RESLB_HXX_
  23. #include <lmodev.hxx> // to get the LMO_DEVICE and LMO_DEV_STATE
  24. // enumerations
  25. /*************************************************************************
  26. NAME: RESOURCE_LBI
  27. SYNOPSIS: Current resources list box item (winnet driver)
  28. INTERFACE:
  29. Fill me in!
  30. PARENT: LBI
  31. USES:
  32. CAVEATS:
  33. NOTES:
  34. HISTORY:
  35. beng 20-May-1991 QueryLeadingChar now returns WCHAR
  36. beng 22-Apr-1992 Changes to LBI::Paint
  37. **************************************************************************/
  38. class RESOURCE_LBI : public LBI
  39. {
  40. private:
  41. NLS_STR _nlsNetName;
  42. NLS_STR _nlsComment;
  43. LMO_DEVICE _lmodev;
  44. public:
  45. RESOURCE_LBI( const TCHAR * pchNetName,
  46. const TCHAR * pchComment,
  47. LMO_DEVICE lmodev );
  48. virtual ~RESOURCE_LBI();
  49. const TCHAR * QueryNetName( void ) const;
  50. virtual VOID Paint( LISTBOX * plb, HDC hdc, const RECT * prect,
  51. GUILTT_INFO * pGUILTT ) const;
  52. virtual INT Compare( const LBI * plbi ) const;
  53. virtual WCHAR QueryLeadingChar( void ) const;
  54. }; // class RESOURCE_LBI
  55. // Two classes derive from the following class, viz. RESOURCE_LB and
  56. // CURRCONN_LISTBOX. The class stores two display maps, and the
  57. // device type of these. This logic is shared between the two listboxes.
  58. class RESOURCE_LB_BASE : public BLT_LISTBOX
  59. {
  60. private:
  61. LMO_DEVICE _lmodev;
  62. DMID_DTE * _pdmiddteResource;
  63. DMID_DTE * _pdmiddteResourceUnavail;
  64. protected:
  65. RESOURCE_LB_BASE( OWNER_WINDOW * powin,
  66. CID cid,
  67. LMO_DEVICE lmodev,
  68. BOOL fSupportUnavail );
  69. ~RESOURCE_LB_BASE();
  70. LMO_DEVICE QueryDeviceType( void ) const
  71. { return _lmodev; }
  72. public:
  73. DM_DTE * QueryDmDte( LMO_DEVICE lmodev,
  74. LMO_DEV_STATE lmodevstate = LMO_DEV_REMOTE ) const;
  75. }; // class RESOURCE_LB_BASE
  76. class RESOURCE_LB : public RESOURCE_LB_BASE
  77. {
  78. public:
  79. // The lmodev parameter specifies what type of devices the listbox
  80. // will display (e.g., file resrouces, priners)
  81. RESOURCE_LB( OWNER_WINDOW * powin, CID cid, LMO_DEVICE lmodev );
  82. DECLARE_LB_QUERY_ITEM( RESOURCE_LBI );
  83. INT AddItem( const TCHAR * pchResourceName, const TCHAR * pchComment );
  84. }; // class RESOURCE_LB
  85. #endif // _RESLB_HXX_