]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/feedback.h
eol style
[xonotic/netradiant.git] / radiant / feedback.h
index 687fe94b0c9fa7eb9e633cc36b80c8d2781afc92..6fb93b6a5afc88b32ac78871e404f04c39076052 100644 (file)
-/*\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
-//-----------------------------------------------------------------------------\r
-//\r
-// DESCRIPTION:\r
-// classes used for describing geometry information from q3map feedback\r
-//\r
-\r
-#ifndef __Q3MAP_FEEDBACK__\r
-#define __Q3MAP_FEEDBACK__\r
-\r
-#include "libxml/parser.h"\r
-\r
-// a select message with a brush/entity select information\r
-class CSelectMsg : public ISAXHandler\r
-{\r
-  enum { SELECT_MESSAGE, SELECT_BRUSH } ESelectState;\r
-  GString *message;\r
-  int entitynum, brushnum;\r
-public:\r
-  CSelectMsg() { ESelectState = SELECT_MESSAGE; }\r
-  // SAX interface\r
-  void saxStartElement (message_info_t *ctx, const xmlChar *name, const xmlChar **attrs);\r
-  void saxEndElement (message_info_t *ctx, const xmlChar *name);\r
-  void saxCharacters (message_info_t *ctx, const xmlChar *ch, int len);\r
-  // for use in the dialog window\r
-  char *getName() { return message->str; }\r
-  void Highlight();\r
-  void DropHighlight() { }\r
-};\r
-\r
-class CPointMsg : public ISAXHandler, public IGL2DWindow\r
-{\r
-  enum { POINT_MESSAGE, POINT_POINT } EPointState;\r
-  GString *message;\r
-  vec3_t pt;\r
-  int refCount;\r
-public:\r
-  CPointMsg() { EPointState = POINT_MESSAGE; refCount = 0; }\r
-  // SAX interface\r
-  void saxStartElement (message_info_t *ctx, const xmlChar *name, const xmlChar **attrs);\r
-  void saxEndElement (message_info_t *ctx, const xmlChar *name);\r
-  void saxCharacters (message_info_t *ctx, const xmlChar *ch, int len);\r
-  // for use in the dialog window\r
-  char *getName() { return message->str; }\r
-  void Highlight();\r
-  void DropHighlight();\r
-\r
-  // IGL2DWindow interface --------------------------------\r
-       // Increment the number of references to this object\r
-  void IncRef () { refCount++; }\r
-       // Decrement the reference count\r
-  void DecRef () { refCount--; if (refCount <= 0) delete this; }\r
-       void Draw2D( VIEWTYPE vt );\r
-};\r
-\r
-class CWindingMsg : public ISAXHandler, public IGL2DWindow\r
-{\r
-  enum { WINDING_MESSAGE, WINDING_WINDING } EPointState;\r
-  GString *message;\r
-  vec3_t wt[256];\r
-  int numpoints;\r
-  int refCount;\r
-public:\r
-  CWindingMsg() { EPointState = WINDING_MESSAGE; refCount = 0; numpoints = 0; }\r
-  // SAX interface\r
-  void saxStartElement (message_info_t *ctx, const xmlChar *name, const xmlChar **attrs);\r
-  void saxEndElement (message_info_t *ctx, const xmlChar *name);\r
-  void saxCharacters (message_info_t *ctx, const xmlChar *ch, int len);\r
-  // for use in the dialog window\r
-  char *getName() { return message->str; }\r
-  void Highlight();\r
-  void DropHighlight();\r
-\r
-  // IGL2DWindow interface --------------------------------\r
-       // Increment the number of references to this object\r
-  void IncRef () { refCount++; }\r
-       // Decrement the reference count\r
-  void DecRef () { refCount--; if (refCount <= 0) delete this; }\r
-       void Draw2D( VIEWTYPE vt );\r
-};\r
-\r
-class CDbgDlg : public Dialog\r
-{\r
-  GPtrArray *m_pFeedbackElements;\r
-  // the list widget we use in the dialog\r
-  GtkListStore* m_clist;\r
-  ISAXHandler *m_pHighlight;\r
-public:\r
-  CDbgDlg() { m_pFeedbackElements = g_ptr_array_new (); m_pHighlight = NULL; }\r
-  virtual ~CDbgDlg() { }\r
-  // refresh items\r
-  void Push (ISAXHandler *);\r
-  // clean the debug window, release all ISAXHanlders we have\r
-  void Init();\r
-  ISAXHandler *GetElement(gint row);\r
-  void SetHighlight(gint row);\r
-  void DropHighlight();\r
-//  void HideDlg();\r
-protected:\r
-  void BuildDialog ();\r
-};\r
-\r
-extern CDbgDlg g_DbgDlg;\r
-\r
-#endif\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
+*/
+
+//-----------------------------------------------------------------------------
+//
+// DESCRIPTION:
+// classes used for describing geometry information from q3map feedback
+//
+
+#ifndef __Q3MAP_FEEDBACK__
+#define __Q3MAP_FEEDBACK__
+
+#include "libxml/parser.h"
+
+// a select message with a brush/entity select information
+class CSelectMsg : public ISAXHandler
+{
+  enum { SELECT_MESSAGE, SELECT_BRUSH } ESelectState;
+  GString *message;
+  int entitynum, brushnum;
+public:
+  CSelectMsg() { ESelectState = SELECT_MESSAGE; }
+  // SAX interface
+  void saxStartElement (message_info_t *ctx, const xmlChar *name, const xmlChar **attrs);
+  void saxEndElement (message_info_t *ctx, const xmlChar *name);
+  void saxCharacters (message_info_t *ctx, const xmlChar *ch, int len);
+  // for use in the dialog window
+  char *getName() { return message->str; }
+  void Highlight();
+  void DropHighlight() { }
+};
+
+class CPointMsg : public ISAXHandler, public IGL2DWindow
+{
+  enum { POINT_MESSAGE, POINT_POINT } EPointState;
+  GString *message;
+  vec3_t pt;
+  int refCount;
+public:
+  CPointMsg() { EPointState = POINT_MESSAGE; refCount = 0; }
+  // SAX interface
+  void saxStartElement (message_info_t *ctx, const xmlChar *name, const xmlChar **attrs);
+  void saxEndElement (message_info_t *ctx, const xmlChar *name);
+  void saxCharacters (message_info_t *ctx, const xmlChar *ch, int len);
+  // for use in the dialog window
+  char *getName() { return message->str; }
+  void Highlight();
+  void DropHighlight();
+
+  // IGL2DWindow interface --------------------------------
+       // Increment the number of references to this object
+  void IncRef () { refCount++; }
+       // Decrement the reference count
+  void DecRef () { refCount--; if (refCount <= 0) delete this; }
+       void Draw2D( VIEWTYPE vt );
+};
+
+class CWindingMsg : public ISAXHandler, public IGL2DWindow
+{
+  enum { WINDING_MESSAGE, WINDING_WINDING } EPointState;
+  GString *message;
+  vec3_t wt[256];
+  int numpoints;
+  int refCount;
+public:
+  CWindingMsg() { EPointState = WINDING_MESSAGE; refCount = 0; numpoints = 0; }
+  // SAX interface
+  void saxStartElement (message_info_t *ctx, const xmlChar *name, const xmlChar **attrs);
+  void saxEndElement (message_info_t *ctx, const xmlChar *name);
+  void saxCharacters (message_info_t *ctx, const xmlChar *ch, int len);
+  // for use in the dialog window
+  char *getName() { return message->str; }
+  void Highlight();
+  void DropHighlight();
+
+  // IGL2DWindow interface --------------------------------
+       // Increment the number of references to this object
+  void IncRef () { refCount++; }
+       // Decrement the reference count
+  void DecRef () { refCount--; if (refCount <= 0) delete this; }
+       void Draw2D( VIEWTYPE vt );
+};
+
+class CDbgDlg : public Dialog
+{
+  GPtrArray *m_pFeedbackElements;
+  // the list widget we use in the dialog
+  GtkListStore* m_clist;
+  ISAXHandler *m_pHighlight;
+public:
+  CDbgDlg() { m_pFeedbackElements = g_ptr_array_new (); m_pHighlight = NULL; }
+  virtual ~CDbgDlg() { }
+  // refresh items
+  void Push (ISAXHandler *);
+  // clean the debug window, release all ISAXHanlders we have
+  void Init();
+  ISAXHandler *GetElement(gint row);
+  void SetHighlight(gint row);
+  void DropHighlight();
+//  void HideDlg();
+protected:
+  void BuildDialog ();
+};
+
+extern CDbgDlg g_DbgDlg;
+
+#endif