1 // $Id: ExtHtmlWindow.h 193 2009-03-19 09:52:42Z felfert $
2 //
3 // Copyright (C) 2006 The OpenNX Team
4 // Author: Fritz Elfert
5 //
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU Library General Public License as
8 // published by the Free Software Foundation; either version 2 of the
9 // License, or (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU Library General Public
17 // License along with this program; if not, write to the
18 // Free Software Foundation, Inc.,
19 // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
20 //
21 
22 #ifndef _EXTHTMLWINDOW_H_
23 #define _EXTHTMLWINDOW_H_
24 
25 #if defined(__GNUG__) && !defined(__APPLE__)
26 #pragma interface "ExtHtmlWindow.cpp"
27 #endif
28 
29 #include "wx/html/htmlwin.h"
30 
31 /**
32  * Custom HTML window.
33  * This derivate of wxHtmlWindow interpretes links in a special
34  * way:<br>
35  * <ul>
36  * <li>If "TV" is specified as target, a builting TextViewer is used.
37  * <li>Other links are opened in an external browser.
38  * </ul>
39  */
40 class extHtmlWindow : public wxHtmlWindow
41 {
DECLARE_DYNAMIC_CLASS(extHtmlWindow)42     DECLARE_DYNAMIC_CLASS( extHtmlWindow )
43 
44 public:
45     extHtmlWindow() : wxHtmlWindow() { }
46 
47     /**
48      * Performs the actual action.
49      * If target is TV, open url in internal TextViewer,
50      * otherwise in external browser.
51      */
52     virtual void OnLinkClicked(const wxHtmlLinkInfo&);
53 };
54 
55 #endif
56     // _EXTHTMLWINDOW_H_
57