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"
38 /*--------------------------- Class Definitions ---------------------------*/
40 // Declare a linked list of wxApplet pointers
42 WX_DECLARE_LIST(wxApplet
, wxAppletList
);
44 /****************************************************************************
46 appletModules - List of register applet modules
47 appletList - List of all active applets instances
48 cookies - Hash table for managing cookies
51 Defines the class for wxAppletWindow. This class is derived from the
52 wxHtmlWindow class and extends it with functionality to handle embedded
53 wxApplet's on the HTML pages.
54 ****************************************************************************/
55 class wxHtmlAppletWindow
: public wxHtmlWindow
{
57 DECLARE_CLASS(wxHtmlAppletWindow
);
58 DECLARE_EVENT_TABLE();
61 wxAppletList m_AppletList
;
62 wxHashTable m_Cookies
;
69 const wxPoint
& pos
= wxDefaultPosition
,
70 const wxSize
& size
= wxDefaultSize
,
71 long style
= wxHW_SCROLLBAR_AUTO
,
72 const wxString
& name
= "htmlAppletWindow");
75 ~wxHtmlAppletWindow();
77 // Create an instance of an applet based on it's class name
78 wxApplet
*CreateApplet(
79 const wxString
& className
,
82 // Find an instance of an applet based on it's class name
83 wxApplet
*FindApplet(const wxString
& className
);
85 // Remove an applet from the window. Called during applet destruction
86 bool RemoveApplet(const wxApplet
*applet
);
88 // Load a new URL page
89 bool LoadPage(const wxString
& hRef
);
91 // Called when users clicked on hypertext link.
92 void OnLinkClicked(const wxHtmlLinkInfo
& link
);
94 // Handles forward navigation within the HTML stack
95 bool HistoryForward();
97 // Handles backwards navigation within the HTML stack
100 // Broadcast a message to all applets on the page
101 void SendMessage(wxEvent
& msg
);
103 // Register a cookie of data in the applet manager
104 bool RegisterCookie(const wxString
& name
,wxObject
*cookie
);
106 // UnRegister a cookie of data in the applet manager
107 bool UnRegisterCookie(const wxString
& name
);
109 // Find a cookie of data given it's public name
110 wxObject
*FindCookie(const wxString
& name
);
113 #endif // __WX_APPLET_WINDOW_H