Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members

contenttaghandler.h

00001 /*
00002 
00003   Copyright (C) 2003  Razvan Cojocaru <razvanco@gmx.net>
00004  
00005   This program is free software; you can redistribute it and/or modify
00006   it under the terms of the GNU General Public License as published by
00007   the Free Software Foundation; either version 2 of the License, or
00008   (at your option) any later version.
00009   
00010   This program is distributed in the hope that it will be useful,
00011   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013   GNU General Public License for more details.
00014   
00015   You should have received a copy of the GNU General Public License
00016   along with this program; if not, write to the Free Software
00017   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018 
00019 */
00020 
00021 
00022 #ifndef __CONTENTTAGHANDLER_H_
00023 #define __CONTENTTAGHANDLER_H_
00024 
00025 #include <wx/html/htmlpars.h>
00026 #include <wx/treectrl.h>
00027 
00028 
00035 
00036 class ContentParser : public wxHtmlParser {
00037 public:
00039         wxObject* GetProduct() { return NULL; }
00040 
00041 protected:
00043         virtual void AddText(const wxChar* WXUNUSED(txt)) {}
00044 };
00045 
00046 
00058 struct URLTreeItem : public wxTreeItemData {
00059 
00061         URLTreeItem(const wxString& str) : _url(str) {}
00062 
00064         wxString _url;
00065 };
00066 
00067 
00074 
00075 #define TREE_BUF_SIZE 128
00076 
00077 
00079 class ContentTagHandler : public wxHtmlTagHandler {
00080 
00081 public:
00087         ContentTagHandler(wxTreeCtrl* toBuild);
00088 
00090         wxString GetSupportedTags() { return wxT("UL,OBJECT,PARAM"); }
00091 
00097         bool HandleTag(const wxHtmlTag& tag);
00098 
00099 private:
00100         wxTreeItemId _parents[TREE_BUF_SIZE];
00101         int _level;
00102         wxTreeCtrl* _treeCtrl;
00103         
00104         wxString _title;
00105         wxString _url;
00106 };
00107 
00108 
00109 #endif // __CONTENTTAGHANDLER_H_

Generated on Thu Oct 2 11:14:59 2003 for xCHM by doxygen 1.3.3