+#define INDENTATION_STR wxString(" ")
+
+ // if possible, add also the @deprecated tag in the doxygen comment if it's missing
+ int deprecationOffset = 0;
+ if (file.GetLine(start-1).Contains("*/") &&
+ (api->IsDeprecated() && !iface->IsDeprecated()))
+ {
+ file.RemoveLine(start-1);
+ file.InsertLine(INDENTATION_STR + INDENTATION_STR +
+ "@deprecated @todo provide deprecation description", start-1);
+ file.InsertLine(INDENTATION_STR + "*/", start++);
+
+ // we have added a new line in the final balance
+ deprecationOffset=1;
+ }
+
+ wxMethod tmp(*api);
+
+ // discard gcc XML argument names and replace them with those parsed from doxygen XML;
+ // in this way we should avoid introducing doxygen warnings about cases where the argument
+ // 'xx' of the prototype is called 'yy' in the function's docs.
+ const wxArgumentTypeArray& doxygenargs = iface->GetArgumentTypes();
+ const wxArgumentTypeArray& realargs = api->GetArgumentTypes();
+ if (realargs.GetCount() == doxygenargs.GetCount())
+ {
+ for (j=0; j<doxygenargs.GetCount(); j++)
+ if (doxygenargs[j]==realargs[j])
+ {
+ realargs[j].SetArgumentName(doxygenargs[j].GetArgumentName());
+
+ if (realargs[j].GetDefaultValue().IsNumber() &&
+ doxygenargs[j].GetDefaultValue().StartsWith("wx"))
+ realargs[j].SetDefaultValue(doxygenargs[j].GetDefaultValue());
+ }
+
+ tmp.SetArgumentTypes(realargs);
+ }
+
+#define WRAP_COLUMN 80
+
+ wxArrayString toinsert;
+ toinsert.Add(INDENTATION_STR + tmp.GetAsString() + ";");
+
+ int nStartColumn = toinsert[0].Find('(');
+ wxASSERT(nStartColumn != wxNOT_FOUND);
+
+ // wrap lines too long at comma boundaries
+ for (i=0; i<toinsert.GetCount(); i++)
+ {
+ size_t len = toinsert[i].Len();
+ if (len > WRAP_COLUMN)
+ {
+ wxASSERT(i == toinsert.GetCount()-1);
+
+ // break this line
+ wxString tmpleft = toinsert[i].Left(WRAP_COLUMN);
+ int comma = tmpleft.Find(',', true /* from end */);
+ if (comma == wxNOT_FOUND)
+ break; // break out of the for cycle...
+
+ toinsert.Add(wxString(' ', nStartColumn+1) +
+ toinsert[i].Right(len-comma-2)); // exclude the comma and the space after it
+ toinsert[i] = tmpleft.Left(comma+1); // include the comma
+ }
+ }
+
+ // insert the new lines
+ for (i=0; i<toinsert.GetCount(); i++)
+ file.InsertLine(toinsert[i], start+i);