]> git.saurik.com Git - wxWidgets.git/blame - contrib/include/wx/applet/loadpage.h
Added event Clone functions
[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
71 // Return the hmtl window for the load page operation
72 wxHtmlAppletWindow *GetHtmlWindow() { return m_htmlWindow; };
73
74 // Get the hRef string for the load page operation
75 const wxString & GetHRef() { return m_hRef; };
76
77 // Copy constructor for the object
78 void CopyObject(wxObject& obj) const;
79 };
80
81
82// Define the macro to create our event type
83typedef void (wxEvtHandler::*wxLoadPageEventFunction)(wxLoadPageEvent&);
84#define EVT_LOAD_PAGE(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_LOAD_PAGE, -1, -1, (wxObjectEventFunction)(wxEventFunction)(wxLoadPageEventFunction) & fn, (wxObject *) NULL ),
85
86/****************************************************************************
87REMARKS:
88Defines the class for pageloaded events.
89****************************************************************************/
90class wxPageLoadedEvent : public wxEvent {
91 DECLARE_DYNAMIC_CLASS(wxPageLoadedEvent);
92
93public:
94 // Constructor
95 wxPageLoadedEvent();
96
97 // Destructor
98 ~wxPageLoadedEvent() {}
99
100 // Copy constructor for the object
101 void CopyObject(wxObject& obj) const;
102 };
103
104// Define the macro to create our event type
105typedef void (wxEvtHandler::*wxPageLoadedEventFunction)(wxPageLoadedEvent&);
106#define EVT_PAGE_LOADED(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PAGE_LOADED, -1, -1, (wxObjectEventFunction)(wxEventFunction)(wxPageLoadedEventFunction) & fn, (wxObject *) NULL ),
107
108
109#endif // __WX_LOAD_PAGE_H