1 #ifndef DOCBLOCK_H 2 #define DOCBLOCK_H 3 4 #include <sdk.h> 5 #ifndef CB_PRECOMP 6 #include <wx/string.h> 7 #include <wx/html/htmlwin.h> 8 #endif 9 #include <map> 10 11 #include "tokenf.h" 12 13 class DocBlock 14 { 15 public: 16 DocBlock(); 17 virtual ~DocBlock(); 18 wxString GetDescription(); 19 bool HasDescription(); 20 void AddDescription(const wxString &descr); 21 wxString GetBrief(); 22 wxString GetValue(wxString& key); 23 bool HasBrief(); 24 int GetParamCount(); 25 void AddBrief(const wxString &bline); 26 void AddParam(const wxString &name, const wxString &descr); 27 void Clear(); 28 29 protected: 30 private: 31 std::map<wxString,wxString> m_DocMap; 32 wxString m_Description; 33 wxString m_Brief; 34 }; 35 36 class HtmlDoc 37 { 38 public: 39 static wxString GenerateHtmlDoc(TokenFlat* token, int token_idx, bool& hasDoc); 40 static wxString OnDocumentationLink(wxHtmlLinkEvent &event, bool &dismissPopup, bool &isGoto, long int &tokenIdx); 41 static wxString GetDocForTooltip(TokenFlat* token); 42 static wxString GetDocShort(const wxString& tokDoc); 43 }; 44 45 #endif // DOCBLOCK_H 46