| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
#ifndef __Q3MAP_FEEDBACK__ |
|---|
| 29 |
#define __Q3MAP_FEEDBACK__ |
|---|
| 30 |
|
|---|
| 31 |
#include "libxml/parser.h" |
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 |
class CSelectMsg : public ISAXHandler |
|---|
| 35 |
{ |
|---|
| 36 |
enum { SELECT_MESSAGE, SELECT_BRUSH } ESelectState; |
|---|
| 37 |
GString *message; |
|---|
| 38 |
int entitynum, brushnum; |
|---|
| 39 |
public: |
|---|
| 40 |
CSelectMsg() { ESelectState = SELECT_MESSAGE; } |
|---|
| 41 |
|
|---|
| 42 |
void saxStartElement (message_info_t *ctx, const xmlChar *name, const xmlChar **attrs); |
|---|
| 43 |
void saxEndElement (message_info_t *ctx, const xmlChar *name); |
|---|
| 44 |
void saxCharacters (message_info_t *ctx, const xmlChar *ch, int len); |
|---|
| 45 |
|
|---|
| 46 |
char *getName() { return message->str; } |
|---|
| 47 |
void Highlight(); |
|---|
| 48 |
void DropHighlight() { } |
|---|
| 49 |
}; |
|---|
| 50 |
|
|---|
| 51 |
class CPointMsg : public ISAXHandler, public IGL2DWindow |
|---|
| 52 |
{ |
|---|
| 53 |
enum { POINT_MESSAGE, POINT_POINT } EPointState; |
|---|
| 54 |
GString *message; |
|---|
| 55 |
vec3_t pt; |
|---|
| 56 |
int refCount; |
|---|
| 57 |
public: |
|---|
| 58 |
CPointMsg() { EPointState = POINT_MESSAGE; refCount = 0; } |
|---|
| 59 |
|
|---|
| 60 |
void saxStartElement (message_info_t *ctx, const xmlChar *name, const xmlChar **attrs); |
|---|
| 61 |
void saxEndElement (message_info_t *ctx, const xmlChar *name); |
|---|
| 62 |
void saxCharacters (message_info_t *ctx, const xmlChar *ch, int len); |
|---|
| 63 |
|
|---|
| 64 |
char *getName() { return message->str; } |
|---|
| 65 |
void Highlight(); |
|---|
| 66 |
void DropHighlight(); |
|---|
| 67 |
|
|---|
| 68 |
|
|---|
| 69 |
|
|---|
| 70 |
void IncRef () { refCount++; } |
|---|
| 71 |
|
|---|
| 72 |
void DecRef () { refCount--; if (refCount <= 0) delete this; } |
|---|
| 73 |
void Draw2D( VIEWTYPE vt ); |
|---|
| 74 |
}; |
|---|
| 75 |
|
|---|
| 76 |
class CWindingMsg : public ISAXHandler, public IGL2DWindow |
|---|
| 77 |
{ |
|---|
| 78 |
enum { WINDING_MESSAGE, WINDING_WINDING } EPointState; |
|---|
| 79 |
GString *message; |
|---|
| 80 |
vec3_t wt[256]; |
|---|
| 81 |
int numpoints; |
|---|
| 82 |
int refCount; |
|---|
| 83 |
public: |
|---|
| 84 |
CWindingMsg() { EPointState = WINDING_MESSAGE; refCount = 0; numpoints = 0; } |
|---|
| 85 |
|
|---|
| 86 |
void saxStartElement (message_info_t *ctx, const xmlChar *name, const xmlChar **attrs); |
|---|
| 87 |
void saxEndElement (message_info_t *ctx, const xmlChar *name); |
|---|
| 88 |
void saxCharacters (message_info_t *ctx, const xmlChar *ch, int len); |
|---|
| 89 |
|
|---|
| 90 |
char *getName() { return message->str; } |
|---|
| 91 |
void Highlight(); |
|---|
| 92 |
void DropHighlight(); |
|---|
| 93 |
|
|---|
| 94 |
|
|---|
| 95 |
|
|---|
| 96 |
void IncRef () { refCount++; } |
|---|
| 97 |
|
|---|
| 98 |
void DecRef () { refCount--; if (refCount <= 0) delete this; } |
|---|
| 99 |
void Draw2D( VIEWTYPE vt ); |
|---|
| 100 |
}; |
|---|
| 101 |
|
|---|
| 102 |
class CDbgDlg : public Dialog |
|---|
| 103 |
{ |
|---|
| 104 |
GPtrArray *m_pFeedbackElements; |
|---|
| 105 |
|
|---|
| 106 |
GtkListStore* m_clist; |
|---|
| 107 |
ISAXHandler *m_pHighlight; |
|---|
| 108 |
public: |
|---|
| 109 |
CDbgDlg() { m_pFeedbackElements = g_ptr_array_new(); m_pHighlight = NULL; } |
|---|
| 110 |
virtual ~CDbgDlg() { ClearFeedbackArray(); } |
|---|
| 111 |
|
|---|
| 112 |
void Push( ISAXHandler * ); |
|---|
| 113 |
|
|---|
| 114 |
void Init(); |
|---|
| 115 |
ISAXHandler *GetElement(gint row); |
|---|
| 116 |
void SetHighlight(gint row); |
|---|
| 117 |
void DropHighlight(); |
|---|
| 118 |
protected: |
|---|
| 119 |
void BuildDialog(); |
|---|
| 120 |
void ClearFeedbackArray(); |
|---|
| 121 |
}; |
|---|
| 122 |
|
|---|
| 123 |
extern CDbgDlg g_DbgDlg; |
|---|
| 124 |
|
|---|
| 125 |
#endif |
|---|