2007-11-04 03:34:51 +00:00
|
|
|
/*
|
2012-03-17 20:01:54 +00:00
|
|
|
Copyright (C) 1999-2007 id Software, Inc. and contributors.
|
|
|
|
For a list of contributors, see the accompanying CONTRIBUTORS file.
|
2007-11-04 03:34:51 +00:00
|
|
|
|
2012-03-17 20:01:54 +00:00
|
|
|
This file is part of GtkRadiant.
|
2007-11-04 03:34:51 +00:00
|
|
|
|
2012-03-17 20:01:54 +00:00
|
|
|
GtkRadiant is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
2007-11-04 03:34:51 +00:00
|
|
|
|
2012-03-17 20:01:54 +00:00
|
|
|
GtkRadiant is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
2007-11-04 03:34:51 +00:00
|
|
|
|
2012-03-17 20:01:54 +00:00
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with GtkRadiant; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
2007-11-04 03:34:51 +00:00
|
|
|
|
|
|
|
#ifndef _PATCHDIALOG_H_
|
|
|
|
#define _PATCHDIALOG_H_
|
|
|
|
|
|
|
|
#include "dialog.h"
|
|
|
|
|
|
|
|
#ifdef _DEBUG
|
|
|
|
//#define DBG_PI
|
|
|
|
#endif
|
|
|
|
|
|
|
|
class PatchDialog : public Dialog
|
|
|
|
{
|
2012-03-17 20:01:54 +00:00
|
|
|
public:
|
|
|
|
// overrides from Dialog
|
|
|
|
void HideDlg();
|
|
|
|
void ShowDlg();
|
2007-11-04 03:34:51 +00:00
|
|
|
|
|
|
|
// void UpdateInfo();
|
|
|
|
// void SetPatchInfo();
|
2012-03-17 20:01:54 +00:00
|
|
|
void GetPatchInfo();
|
|
|
|
void UpdateSpinners( bool bUp, int nID );
|
|
|
|
// read the current patch on map and initialize m_fX m_fY accordingly
|
|
|
|
void UpdateRowColInfo();
|
|
|
|
// sync the dialog our internal data structures
|
|
|
|
// depending on the flag it will read or write
|
|
|
|
// we use m_nCol m_nRow m_fX m_fY m_fZ m_fS m_fT m_strName
|
|
|
|
// (NOTE: this doesn't actually commit stuff to the map or read from it)
|
|
|
|
void UpdateData( bool retrieve );
|
|
|
|
|
|
|
|
void InitDefaultIncrement( texdef_t * );
|
|
|
|
|
|
|
|
PatchDialog();
|
|
|
|
patchMesh_t *m_Patch;
|
|
|
|
|
|
|
|
Str m_strName;
|
|
|
|
float m_fS;
|
|
|
|
float m_fT;
|
|
|
|
float m_fX;
|
|
|
|
float m_fY;
|
|
|
|
float m_fZ;
|
2007-11-04 03:34:51 +00:00
|
|
|
/* float m_fHScale;
|
2012-03-17 20:01:54 +00:00
|
|
|
float m_fHShift;
|
|
|
|
float m_fRotate;
|
|
|
|
float m_fVScale;
|
|
|
|
float m_fVShift; */
|
|
|
|
int m_nCol;
|
|
|
|
int m_nRow;
|
|
|
|
GtkWidget *m_pRowCombo;
|
|
|
|
GtkWidget *m_pColCombo;
|
|
|
|
|
|
|
|
GtkWidget *GetWidget() { return m_pWidget; }
|
|
|
|
|
|
|
|
// 0 is invalid, otherwise it's the Id of the last 'do' we are responsible for
|
2007-11-04 03:34:51 +00:00
|
|
|
// int m_nUndoId;
|
2012-03-17 20:01:54 +00:00
|
|
|
|
|
|
|
// turn on/off processing of the "changed" "value_changed" messages
|
|
|
|
// (need to turn off when we are feeding data in)
|
|
|
|
// NOTE: much more simple than blocking signals
|
|
|
|
bool m_bListenChanged;
|
2007-11-04 03:34:51 +00:00
|
|
|
|
|
|
|
protected:
|
2012-03-17 20:01:54 +00:00
|
|
|
void BuildDialog();
|
2007-11-04 03:34:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _PATCHDIALOG_H_
|