1 /****************************************************************************
3 * wxWindows HTML Applet Package
5 * Copyright (C) 1991-2001 SciTech Software, Inc.
8 * ======================================================================
9 * |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
11 * |This copyrighted computer code is a proprietary trade secret of |
12 * |SciTech Software, Inc., located at 505 Wall Street, Chico, CA 95928 |
13 * |USA (www.scitechsoft.com). ANY UNAUTHORIZED POSSESSION, USE, |
14 * |VIEWING, COPYING, MODIFICATION OR DISSEMINATION OF THIS CODE IS |
15 * |STRICTLY PROHIBITED BY LAW. Unless you have current, express |
16 * |written authorization from SciTech to possess or use this code, you |
17 * |may be subject to civil and/or criminal penalties. |
19 * |If you received this code in error or you would like to report |
20 * |improper use, please immediately contact SciTech Software, Inc. at |
23 * |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
24 * ======================================================================
29 * Description: Header file for the wxHtmlAppletWindow class
31 ****************************************************************************/
33 #ifndef __WX_APPLET_WINDOW_H
34 #define __WX_APPLET_WINDOW_H
36 #include "wx/html/htmlwin.h"
40 class wxLoadPageEvent
;
41 class wxPageLoadedEvent
;
44 // Declare a linked list of wxApplet pointers
45 WX_DECLARE_LIST(wxApplet
, wxAppletList
);
47 /*--------------------------- Class Definitions ---------------------------*/
49 /****************************************************************************
51 Defines the class for virtual-link data types
52 ****************************************************************************/
53 class VirtualData
: public wxObject
{
67 wxString
GetName(){ return m_name
;};
68 wxString
GetGroup(){ return m_group
;};
69 wxString
GetHref(){ return m_href
;};
72 void SetName (wxString
& s
){ m_name
= s
; };
73 void SetGroup(wxString
& s
){ m_group
= s
; };
74 void SetHref (wxString
& s
){ m_href
= s
; };
77 /****************************************************************************
79 Defines the class for wxAppletWindow. This class is derived from the
80 wxHtmlWindow class and extends it with functionality to handle embedded
81 wxApplet's on the HTML pages.
82 ****************************************************************************/
83 class wxHtmlAppletWindow
: public wxHtmlWindow
{
85 DECLARE_CLASS(wxHtmlAppletWindow
);
86 DECLARE_EVENT_TABLE();
88 wxIncludePrep
*incPreprocessor
; // deleted by list it is added too in constructor
90 wxAppletList m_AppletList
;
91 static wxHashTable m_Cookies
;
92 wxToolBarBase
*m_NavBar
;
101 wxToolBarBase
*navBar
= NULL
,
103 int navForwardId
= -1,
104 const wxPoint
& pos
= wxDefaultPosition
,
105 const wxSize
& size
= wxDefaultSize
,
106 long style
= wxHW_SCROLLBAR_AUTO
,
107 const wxString
& name
= "htmlAppletWindow");
110 ~wxHtmlAppletWindow();
112 // Create an instance of an applet based on it's class name
113 wxApplet
*CreateApplet(
114 const wxString
& classId
,
115 const wxString
& iName
,
116 const wxHtmlTag
¶ms
,
119 // Find an instance of an applet based on it's class name
120 wxApplet
*FindApplet(const wxString
& className
);
122 // Remove an applet from the window. Called during applet destruction
123 bool RemoveApplet(const wxApplet
*applet
);
125 // Load a new URL page
126 virtual bool LoadPage(const wxString
& location
);
128 // Called when users clicked on hypertext link.
129 virtual void OnLinkClicked(const wxHtmlLinkInfo
& link
);
131 // Handles forward navigation within the HTML stack
132 bool HistoryForward();
134 // Handles backwards navigation within the HTML stack
137 // Broadcast a message to all applets on the page
138 void SendMessage(wxEvent
& msg
);
140 // Register a cookie of data in the applet manager
141 bool RegisterCookie(const wxString
& name
,wxObject
*cookie
);
143 // UnRegister a cookie of data in the applet manager
144 bool UnRegisterCookie(const wxString
& name
);
146 // Find a cookie of data given it's public name
147 wxObject
*FindCookie(const wxString
& name
);
149 // Event handlers to load a new page
150 void OnLoadPage(wxLoadPageEvent
&event
);
152 // Event handlers to load a new page
153 void OnPageLoaded(wxPageLoadedEvent
&event
);
157 #endif // __WX_APPLET_WINDOW_H