]> git.xonotic.org Git - xonotic/netradiant.git/blob - radiant/surfacedialog.h
transfer from internal tree r5311 branches/1.4-gpl
[xonotic/netradiant.git] / radiant / surfacedialog.h
1 /*\r
2 Copyright (C) 1999-2007 id Software, Inc. and contributors.\r
3 For a list of contributors, see the accompanying CONTRIBUTORS file.\r
4 \r
5 This file is part of GtkRadiant.\r
6 \r
7 GtkRadiant is free software; you can redistribute it and/or modify\r
8 it under the terms of the GNU General Public License as published by\r
9 the Free Software Foundation; either version 2 of the License, or\r
10 (at your option) any later version.\r
11 \r
12 GtkRadiant is distributed in the hope that it will be useful,\r
13 but WITHOUT ANY WARRANTY; without even the implied warranty of\r
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
15 GNU General Public License for more details.\r
16 \r
17 You should have received a copy of the GNU General Public License\r
18 along with GtkRadiant; if not, write to the Free Software\r
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\r
20 */\r
21 \r
22 #ifndef _SURFACEDIALOG_H_\r
23 #define _SURFACEDIALOG_H_\r
24 \r
25 #include "dialog.h"\r
26 \r
27 #ifdef _DEBUG\r
28 //#define DBG_SI 1\r
29 #endif\r
30 \r
31 class SurfaceDlg : public Dialog\r
32 {\r
33   bool m_bPatchMode;\r
34   // brush primitive fake shift scale rot coords\r
35   float m_shift[2];\r
36   float m_rotate;\r
37   float m_scale[2];\r
38     \r
39 public:\r
40   SurfaceDlg ();\r
41 \r
42   virtual void ShowDlg();\r
43   virtual void HideDlg();\r
44   void SetTexMods();\r
45   void GetTexMods();\r
46 \r
47   void InitDefaultIncrement(texdef_t *);\r
48 \r
49   // Dialog Data\r
50   int m_nHeight;\r
51   int m_nWidth;\r
52 \r
53   // 0 is invalid, otherwise it's the Id of the last 'do' we are responsible for\r
54   int m_nUndoId;\r
55 \r
56   // is the user editing the texture widget (that changes the behaviour of 'Enter' key from OnDone to OnApply\r
57   // reset to false at each SetTexMods or when dealing with Enter key\r
58   bool m_bEditingTextureWidget;\r
59 \r
60 protected:\r
61   void BuildDialog ();\r
62 \r
63 public:\r
64   // called to perform a fitting from the outside (shortcut key)\r
65   void FitAll();\r
66   GtkWidget *GetWidget (); // { return m_pWidget; }\r
67 };\r
68 \r
69 #endif // _SURFACEDIALOG_H_\r