doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NewTexWnd.h
Go to the documentation of this file.
1 /*
2 ===========================================================================
3 
4 Doom 3 GPL Source Code
5 Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
6 
7 This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
8 
9 Doom 3 Source Code is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13 
14 Doom 3 Source Code is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
21 
22 In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
23 
24 If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
25 
26 ===========================================================================
27 */
28 #if !defined(NEWTEXWND_H)
29 #define NEWTEXWND_H
30 
31 #if _MSC_VER >= 1000
32 #pragma once
33 #endif // _MSC_VER >= 1000
34 // TexWnd.h : header file
35 //
36 #include "../../renderer/tr_local.h"
37 //#include "texwnd.h"
38 
40 // CTexWnd window
41 
42 class CNewTexWnd : public CWnd
43 {
45 // Construction
46 public:
47  CNewTexWnd();
48  void UpdateFilter(const char* pFilter);
49  void UpdatePrefs();
50  void FocusEdit();
51 
52 // Attributes
53 public:
54 
55 // Operations
56 public:
57 
58 // Overrides
59  // ClassWizard generated virtual function overrides
60  //{{AFX_VIRTUAL(CNewTexWnd)
61  public:
62  virtual BOOL DestroyWindow();
63  virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
64  protected:
65  virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
66  //}}AFX_VIRTUAL
67 
68 // Implementation
69 public:
70  void EnsureTextureIsVisible(const char *name);
71  void LoadMaterials();
72  virtual ~CNewTexWnd();
73  BOOL OnToolTipNotify( UINT id, NMHDR * pNMHDR, LRESULT * pResult );
74  int CNewTexWnd::OnToolHitTest(CPoint point, TOOLINFO * pTI);
75  virtual BOOL PreTranslateMessage(MSG* pMsg);
76 
77 protected:
78  //CTexEdit m_wndFilter;
79  //CButton m_wndShaders;
82  CDC *hdcTexture;
83  CPoint cursor;
84  CPoint origin;
85  CPoint draw;
86  CPoint drawRow;
87  CPoint current;
88  CRect rectClient;
92 
93  // Generated message map functions
94 protected:
95  const idMaterial* NextPos();
96  const idMaterial *getMaterialAtPoint(CPoint point);
97  void InitPos();
98  //{{AFX_MSG(CNewTexWnd)
99  afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
100  afx_msg void OnSize(UINT nType, int cx, int cy);
101  afx_msg void OnParentNotify(UINT message, LPARAM lParam);
102  afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
103  afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
104  afx_msg void OnPaint();
105  afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
106  afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
107  afx_msg void OnMButtonDown(UINT nFlags, CPoint point);
108  afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
109  afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
110  afx_msg void OnMButtonUp(UINT nFlags, CPoint point);
111  afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
112  afx_msg void OnMouseMove(UINT nFlags, CPoint point);
113  afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
114  //}}AFX_MSG
115  afx_msg void OnShaderClick();
116  DECLARE_MESSAGE_MAP()
117 public:
118  afx_msg void OnSetFocus(CWnd* pOldWnd);
119 };
120 
122 
123 //{{AFX_INSERT_LOCATION}}
124 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
125 
126 #endif // !defined(NEWTEXWND_H)
BOOL OnToolTipNotify(UINT id, NMHDR *pNMHDR, LRESULT *pResult)
Definition: NewTexWnd.cpp:865
virtual ~CNewTexWnd()
Definition: NewTexWnd.cpp:72
afx_msg void OnMButtonUp(UINT nFlags, CPoint point)
Definition: NewTexWnd.cpp:534
void EnsureTextureIsVisible(const char *name)
Definition: NewTexWnd.cpp:828
const idMaterial * getMaterialAtPoint(CPoint point)
Definition: NewTexWnd.cpp:453
afx_msg void OnSize(UINT nType, int cx, int cy)
Definition: NewTexWnd.cpp:149
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct)
Definition: NewTexWnd.cpp:128
bool m_bNeedRange
Definition: NewTexWnd.h:80
void UpdateFilter(const char *pFilter)
int currentIndex
Definition: NewTexWnd.h:90
afx_msg void OnLButtonDown(UINT nFlags, CPoint point)
Definition: NewTexWnd.cpp:484
afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt)
Definition: NewTexWnd.cpp:890
CONST PIXELFORMATDESCRIPTOR UINT
Definition: win_qgl.cpp:47
afx_msg void OnShaderClick()
void LoadMaterials()
Definition: NewTexWnd.cpp:621
virtual BOOL PreCreateWindow(CREATESTRUCT &cs)
Definition: NewTexWnd.cpp:100
DWORD
Definition: win_qgl.cpp:61
afx_msg void OnMButtonDown(UINT nFlags, CPoint point)
Definition: NewTexWnd.cpp:507
CPoint current
Definition: NewTexWnd.h:87
afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar *pScrollBar)
Definition: NewTexWnd.cpp:380
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
Definition: NewTexWnd.cpp:178
HGLRC hglrcTexture
Definition: NewTexWnd.h:81
CPoint drawRow
Definition: NewTexWnd.h:86
afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags)
Definition: NewTexWnd.cpp:186
#define BOOL
Definition: mprintf.c:71
virtual BOOL PreTranslateMessage(MSG *pMsg)
Definition: NewTexWnd.cpp:901
int OnToolHitTest(CPoint point, TOOLINFO *pTI)
Definition: NewTexWnd.cpp:881
afx_msg void OnMouseMove(UINT nFlags, CPoint point)
Definition: NewTexWnd.cpp:552
int currentRow
Definition: NewTexWnd.h:89
afx_msg void OnRButtonUp(UINT nFlags, CPoint point)
Definition: NewTexWnd.cpp:542
CPoint origin
Definition: NewTexWnd.h:84
DECLARE_DYNCREATE(CNewTexWnd)
afx_msg void OnParentNotify(UINT message, LPARAM lParam)
Definition: NewTexWnd.cpp:159
afx_msg void OnSetFocus(CWnd *pOldWnd)
Definition: NewTexWnd.cpp:917
#define NULL
Definition: Lib.h:88
afx_msg void OnPaint()
Definition: NewTexWnd.cpp:249
idList< const idMaterial * > materialList
Definition: NewTexWnd.h:91
afx_msg void OnRButtonDown(UINT nFlags, CPoint point)
Definition: NewTexWnd.cpp:516
virtual BOOL DestroyWindow()
Definition: NewTexWnd.cpp:425
HGLRC
Definition: win_qgl.cpp:52
CDC * hdcTexture
Definition: NewTexWnd.h:82
const GLcharARB * name
Definition: glext.h:3629
CPoint draw
Definition: NewTexWnd.h:85
void FocusEdit()
CPoint cursor
Definition: NewTexWnd.h:83
CRect rectClient
Definition: NewTexWnd.h:88
void UpdatePrefs()
Definition: NewTexWnd.cpp:167
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID, CCreateContext *pContext=NULL)
Definition: NewTexWnd.cpp:435
afx_msg void OnLButtonUp(UINT nFlags, CPoint point)
Definition: NewTexWnd.cpp:525
void InitPos()
const idMaterial * NextPos()
Definition: NewTexWnd.cpp:194