]> git.saurik.com Git - wxWidgets.git/blame - contrib/include/wx/applet/loadpage.h
Committing in .
[wxWidgets.git] / contrib / include / wx / applet / loadpage.h
CommitLineData
716cd410
KB
1/****************************************************************************
2*
3* wxWindows HTML Applet Package
4*
5* Copyright (C) 1991-2001 SciTech Software, Inc.
6* All rights reserved.
7*
8* ========================================================================
9*
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
14*
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.
19*
20* ========================================================================
21*
22* Language: ANSI C++
23* Environment: Any
24*
25* Description: Header file for the wxLoadPage Event class
26*
27****************************************************************************/
28
29#ifndef __WX_LOAD_PAGE_H
30#define __WX_LOAD_PAGE_H
31
32#include "wx/html/htmlwin.h"
33
34// Forward declaration
35class wxHtmlAppletWindow;
36
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.
40
41#ifndef WXMAKINGDLL
42#undef WXDLLEXPORT
43#define WXDLLEXPORT
44#endif
45// Declare our local load page event type
46BEGIN_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)
49END_DECLARE_EVENT_TYPES()
50
51/*--------------------------- Class Definitions ---------------------------*/
52
53/****************************************************************************
54REMARKS:
55Defines the class for load page events.
56****************************************************************************/
57class wxLoadPageEvent : public wxEvent {
58 DECLARE_DYNAMIC_CLASS(wxLoadPageEvent);
59
60protected:
61 wxString m_hRef;
62 wxHtmlAppletWindow *m_htmlWindow;
63
64public:
65 // Constructor
66 wxLoadPageEvent(const wxString &hRef = "",wxHtmlAppletWindow *htmlWindow = NULL);
67
68 // Destructor
69 ~wxLoadPageEvent() {}
70
574c939e
KB
71 // Clone Virtual
72 virtual wxEvent *Clone() const { return new wxLoadPageEvent(m_hRef, m_htmlWindow); }
73
716cd410
KB
74 // Return the hmtl window for the load page operation
75 wxHtmlAppletWindow *GetHtmlWindow() { return m_htmlWindow; };
76
77 // Get the hRef string for the load page operation
78 const wxString & GetHRef() { return m_hRef; };
79
716cd410
KB
80 };
81
82
83// Define the macro to create our event type
84typedef void (wxEvtHandler::*wxLoadPageEventFunction)(wxLoadPageEvent&);
85#define EVT_LOAD_PAGE(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_LOAD_PAGE, -1, -1, (wxObjectEventFunction)(wxEventFunction)(wxLoadPageEventFunction) & fn, (wxObject *) NULL ),
86
87/****************************************************************************
88REMARKS:
89Defines the class for pageloaded events.
90****************************************************************************/
91class wxPageLoadedEvent : public wxEvent {
92 DECLARE_DYNAMIC_CLASS(wxPageLoadedEvent);
93
94public:
95 // Constructor
96 wxPageLoadedEvent();
97
98 // Destructor
99 ~wxPageLoadedEvent() {}
100
574c939e
KB
101 // Clone Virtual
102 virtual wxEvent *Clone() const {
103 return new wxPageLoadedEvent(); }
104
716cd410
KB
105 };
106
107// Define the macro to create our event type
108typedef void (wxEvtHandler::*wxPageLoadedEventFunction)(wxPageLoadedEvent&);
109#define EVT_PAGE_LOADED(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PAGE_LOADED, -1, -1, (wxObjectEventFunction)(wxEventFunction)(wxPageLoadedEventFunction) & fn, (wxObject *) NULL ),
110
111
112#endif // __WX_LOAD_PAGE_H