browsewindow.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /* Copyright (c) 2002-2012 Croteam Ltd.
  2. This program is free software; you can redistribute it and/or modify
  3. it under the terms of version 2 of the GNU General Public License as published by
  4. the Free Software Foundation
  5. This program is distributed in the hope that it will be useful,
  6. but WITHOUT ANY WARRANTY; without even the implied warranty of
  7. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  8. GNU General Public License for more details.
  9. You should have received a copy of the GNU General Public License along
  10. with this program; if not, write to the Free Software Foundation, Inc.,
  11. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
  12. // BrowseWindow.h : header file
  13. //
  14. #ifndef BROWSEWINDOW_H
  15. #define BROWSEWINDOW_H 1
  16. /////////////////////////////////////////////////////////////////////////////
  17. // CBrowseWindow window
  18. #define STRING_HEIGHT 16
  19. HGLOBAL CreateHDrop( const CTFileName &fnToDrag, BOOL bAddAppPath=TRUE);
  20. class CBrowseWindow : public CWnd
  21. {
  22. // Construction
  23. public:
  24. BOOL AttachToControl( CWnd *pwndParent);
  25. CBrowseWindow();
  26. void SetBrowserPtr( CBrowser *pBrowser);
  27. // Attributes
  28. public:
  29. INDEX m_iLastHittedItem;
  30. BOOL m_bDirectoryOpen; // If directory is opened (valid)
  31. CBrowser *m_pBrowser;
  32. CListHead m_IconsList;
  33. INDEX m_IconsInLine;
  34. INDEX m_IconsInColumn;
  35. INDEX m_IconsVisible;
  36. PIX m_IconWidth;
  37. PIX m_IconHeight;
  38. PIX m_BrowseWndWidth;
  39. PIX m_BrowseWndHeight;
  40. // Operations
  41. public:
  42. void OpenDirectory( CVirtualTreeNode *pVTN);
  43. void CloseDirectory( CVirtualTreeNode *pVTN);
  44. void InsertItem( CTFileName fnItem, CPoint pt);
  45. void DeleteSelectedItems();
  46. CVirtualTreeNode *GetItem( INDEX iItem) const;
  47. INDEX GetItemNo( CVirtualTreeNode *pVTN);
  48. void SetItemSize( PIX pixWidth, PIX pixHeight);
  49. INDEX HitItem( CPoint pt, FLOAT &fHitXOffset, FLOAT &fHitYOffset) const;
  50. void Refresh();
  51. void SelectByTextures( BOOL bInSelectedSectors, BOOL bExceptSelected);
  52. // Overrides
  53. // ClassWizard generated virtual function overrides
  54. //{{AFX_VIRTUAL(CBrowseWindow)
  55. //}}AFX_VIRTUAL
  56. // Implementation
  57. public:
  58. COleDataSource m_DataSource;
  59. virtual ~CBrowseWindow();
  60. void OnContextMenu( CPoint point);
  61. void GetToolTipText( char *pToolTipText);
  62. CDrawPort *m_pDrawPort;
  63. CViewPort *m_pViewPort;
  64. // Generated message map functions
  65. //{{AFX_MSG(CBrowseWindow)
  66. afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
  67. afx_msg void OnPaint();
  68. afx_msg void OnDropFiles(HDROP hDropInfo);
  69. afx_msg void OnSize(UINT nType, int cx, int cy);
  70. afx_msg void OnInsertItems();
  71. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  72. afx_msg void OnDeleteItems();
  73. afx_msg void OnBigIcons();
  74. afx_msg void OnMediumIcons();
  75. afx_msg void OnSmallIcons();
  76. afx_msg void OnShowDescription();
  77. afx_msg void OnShowFilename();
  78. afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
  79. afx_msg void OnRecreateTexture();
  80. afx_msg void OnCreateAndAddTexture();
  81. afx_msg void OnSelectByTextureInSelectedSectors();
  82. afx_msg void OnSelectByTextureInWorld();
  83. afx_msg void OnSelectForDropMarker();
  84. afx_msg void OnSetAsCurrentTexture();
  85. afx_msg void OnConvertClass();
  86. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  87. afx_msg void OnMicroIcons();
  88. afx_msg void OnSelectExceptTextures();
  89. afx_msg void OnAddTexturesFromWorld();
  90. afx_msg void OnShowTreeShortcuts();
  91. afx_msg void OnExportTexture();
  92. afx_msg void OnBrowserContextHelp();
  93. //}}AFX_MSG
  94. DECLARE_MESSAGE_MAP()
  95. };
  96. /////////////////////////////////////////////////////////////////////////////
  97. #endif // BROWSEWINDOW_H