]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/dialog.h
uncrustify! now the code is only ugly on the *inside*
[xonotic/netradiant.git] / radiant / dialog.h
index f9450efe9aa0e798cc1f860acc4c551caaf861bc..1bb9845c194a2b2395539e9b97ac5b36e9d44705 100644 (file)
@@ -1,85 +1,86 @@
-/*\r
-Copyright (C) 1999-2007 id Software, Inc. and contributors.\r
-For a list of contributors, see the accompanying CONTRIBUTORS file.\r
-\r
-This file is part of GtkRadiant.\r
-\r
-GtkRadiant is free software; you can redistribute it and/or modify\r
-it under the terms of the GNU General Public License as published by\r
-the Free Software Foundation; either version 2 of the License, or\r
-(at your option) any later version.\r
-\r
-GtkRadiant is distributed in the hope that it will be useful,\r
-but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-GNU General Public License for more details.\r
-\r
-You should have received a copy of the GNU General Public License\r
-along with GtkRadiant; if not, write to the Free Software\r
-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\r
-*/\r
-\r
-#ifndef _DIALOG_H_\r
-#define _DIALOG_H_\r
-\r
-#include <gtk/gtk.h>\r
-#include "str.h"\r
-#include "gtkmisc.h"\r
-\r
-typedef enum\r
-{\r
-  DLG_CHECK_BOOL,\r
-  DLG_RADIO_INT,\r
-  DLG_ENTRY_TEXT,\r
-  DLG_ENTRY_FLOAT,\r
-  DLG_ENTRY_INT,\r
-  DLG_SPIN_FLOAT,\r
-  DLG_SPIN_INT,\r
-  DLG_ADJ_INT,\r
-  DLG_COMBO_INT\r
-} DLG_DATA_TYPE;\r
-\r
-class Dialog\r
-{\r
- public:\r
-  Dialog ();\r
-  virtual ~Dialog ();\r
-\r
-  /*! \r
-  start modal dialog box\r
-  you need to use AddModalButton to select IDOK IDCANCEL buttons\r
-  */\r
-  int DoModal ();\r
-  void EndModal (int code);\r
-  virtual void BuildDialog () = 0;\r
-  virtual void UpdateData (bool retrieve);\r
-  virtual void PreModal () { };\r
-  virtual void PostModal (int code) { };\r
-  virtual void ShowDlg ();\r
-  virtual void HideDlg ();\r
-  void Create ();\r
-  void Destroy ();\r
-  GtkWidget* GetDlgWidget (const char* name)\r
-    { return GTK_WIDGET (g_object_get_data (G_OBJECT (m_pWidget), name)); }\r
-  GtkWidget* GetWidget ()\r
-    { return m_pWidget; }\r
-\r
- protected:\r
-  GtkWidget *m_pWidget;\r
-  int m_nLoop;\r
-  int m_nReturn;\r
-\r
-  void AddDialogData (GtkWidget *widget, void *buf, DLG_DATA_TYPE type)\r
-    { AddDialogData (GTK_OBJECT (widget), buf, type); };\r
-  void AddDialogData (GtkObject *object, void *buf, DLG_DATA_TYPE type);\r
-  /*!\r
-  used in overloaded BuildDialog implementations to configure modal behaviour easily\r
-  */\r
-  void AddModalButton (GtkWidget *widget, int ret);\r
-\r
- private:\r
-  GSList* m_pDataList;\r
-  bool    m_bNeedBuild;\r
-};\r
-\r
-#endif // _DIALOG_H_\r
+/*
+   Copyright (C) 1999-2007 id Software, Inc. and contributors.
+   For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+   This file is part of GtkRadiant.
+
+   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.
+
+   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.
+
+   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
+ */
+
+#ifndef _DIALOG_H_
+#define _DIALOG_H_
+
+#include <gtk/gtk.h>
+#include "str.h"
+#include "gtkmisc.h"
+
+typedef enum
+{
+       DLG_CHECK_BOOL,
+       DLG_RADIO_INT,
+       DLG_ENTRY_TEXT,
+       DLG_ENTRY_FLOAT,
+       DLG_ENTRY_INT,
+       DLG_SPIN_FLOAT,
+       DLG_SPIN_INT,
+       DLG_ADJ_INT,
+       DLG_COMBO_INT,
+       DLG_COMBO_BOX_INT,
+} DLG_DATA_TYPE;
+
+class Dialog
+{
+public:
+Dialog ();
+virtual ~Dialog ();
+
+/*!
+   start modal dialog box
+   you need to use AddModalButton to select IDOK IDCANCEL buttons
+ */
+int DoModal();
+void EndModal( int code );
+virtual void BuildDialog() = 0;
+virtual void UpdateData( bool retrieve );
+virtual void PreModal() { };
+virtual void PostModal( int code ) { };
+virtual void ShowDlg();
+virtual void HideDlg();
+void Create();
+void Destroy();
+GtkWidget* GetDlgWidget( const char* name )
+{ return GTK_WIDGET( g_object_get_data( G_OBJECT( m_pWidget ), name ) ); }
+GtkWidget* GetWidget()
+{ return m_pWidget; }
+
+protected:
+GtkWidget *m_pWidget;
+int m_nLoop;
+int m_nReturn;
+
+void AddDialogData( GtkWidget *widget, void *buf, DLG_DATA_TYPE type )
+{ AddDialogData( GTK_OBJECT( widget ), buf, type ); };
+void AddDialogData( GtkObject *object, void *buf, DLG_DATA_TYPE type );
+/*!
+   used in overloaded BuildDialog implementations to configure modal behaviour easily
+ */
+void AddModalButton( GtkWidget *widget, int ret );
+
+private:
+GSList* m_pDataList;
+bool m_bNeedBuild;
+};
+
+#endif // _DIALOG_H_