1 /****************************************************************************
3 * wxWindows HTML Applet Package
5 * Copyright (C) 1991-2001 SciTech Software, Inc.
8 * ========================================================================
10 * The contents of this file are subject to the wxWindows License
11 * Version 3.0 (the "License"); you may not use this file except in
12 * compliance with the License. You may obtain a copy of the License at
13 * http://www.wxwindows.org/licence3.txt
15 * Software distributed under the License is distributed on an
16 * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
17 * implied. See the License for the specific language governing
18 * rights and limitations under the License.
20 * ========================================================================
25 * Description: Header file for the wxLoadPage Event class
27 ****************************************************************************/
29 #ifndef __WX_LOAD_PAGE_H
30 #define __WX_LOAD_PAGE_H
32 #include "wx/html/htmlwin.h"
34 // Forward declaration
35 class wxHtmlAppletWindow
;
37 // If we are compiling this code into a library that links against
38 // the DLL, we need to remove all the __declspec(dllimports) that
39 // would declare our classes below incorrectly.
45 // Declare our local load page event type
46 BEGIN_DECLARE_EVENT_TYPES()
47 DECLARE_EVENT_TYPE(wxEVT_LOAD_PAGE
, wxEVT_USER_FIRST
+1)
48 DECLARE_EVENT_TYPE(wxEVT_PAGE_LOADED
, wxEVT_USER_FIRST
+2)
49 END_DECLARE_EVENT_TYPES()
51 /*--------------------------- Class Definitions ---------------------------*/
53 /****************************************************************************
55 Defines the class for load page events.
56 ****************************************************************************/
57 class wxLoadPageEvent
: public wxEvent
{
58 DECLARE_DYNAMIC_CLASS(wxLoadPageEvent
);
62 wxHtmlAppletWindow
*m_htmlWindow
;
66 wxLoadPageEvent(const wxString
&hRef
= "",wxHtmlAppletWindow
*htmlWindow
= NULL
);
69 virtual ~wxLoadPageEvent() {}
72 virtual wxEvent
*Clone() const { return new wxLoadPageEvent(m_hRef
, m_htmlWindow
); }
74 // Return the hmtl window for the load page operation
75 wxHtmlAppletWindow
*GetHtmlWindow() { return m_htmlWindow
; };
77 // Get the hRef string for the load page operation
78 const wxString
& GetHRef() { return m_hRef
; };
83 // Define the macro to create our event type
84 typedef void (wxEvtHandler::*wxLoadPageEventFunction
)(wxLoadPageEvent
&);
85 #define EVT_LOAD_PAGE(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_LOAD_PAGE, -1, -1, (wxObjectEventFunction)(wxEventFunction) wxStaticCastEvent( wxLoadPageEventFunction, & fn ), (wxObject *) NULL ),
87 /****************************************************************************
89 Defines the class for pageloaded events.
90 ****************************************************************************/
91 class wxPageLoadedEvent
: public wxEvent
{
92 DECLARE_DYNAMIC_CLASS(wxPageLoadedEvent
);
99 virtual ~wxPageLoadedEvent() {}
102 virtual wxEvent
*Clone() const {
103 return new wxPageLoadedEvent(); }
107 // Define the macro to create our event type
108 typedef void (wxEvtHandler::*wxPageLoadedEventFunction
)(wxPageLoadedEvent
&);
109 #define EVT_PAGE_LOADED(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PAGE_LOADED, -1, -1, (wxObjectEventFunction)(wxEventFunction) wxStaticCastEvent( wxPageLoadedEventFunction, & fn ), (wxObject *) NULL ),
112 #endif // __WX_LOAD_PAGE_H