Commit | Line | Data |
---|---|---|
d9b91de7 KB |
1 | /**************************************************************************** |
2 | * | |
67fc151d | 3 | * wxWindows HTML Applet Package |
d9b91de7 KB |
4 | * |
5 | * Copyright (C) 1991-2001 SciTech Software, Inc. | |
6 | * All rights reserved. | |
7 | * | |
716cd410 KB |
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 | * ======================================================================== | |
d9b91de7 | 21 | * |
67fc151d KB |
22 | * Language: ANSI C++ |
23 | * Environment: Any | |
d9b91de7 KB |
24 | * |
25 | * Description: Main wxApplet class implementation | |
26 | * | |
27 | ****************************************************************************/ | |
28 | ||
d9b91de7 KB |
29 | // Include private headers |
30 | #include "wx/applet/applet.h" | |
38caaa61 | 31 | #include "wx/applet/window.h" |
d9b91de7 KB |
32 | |
33 | /*------------------------- Implementation --------------------------------*/ | |
34 | ||
35 | // Empty event handler. We include this event handler simply so that | |
36 | // sub-classes of wxApplet can reference wxApplet in the event tables | |
37 | // that they create as necessary. | |
38 | BEGIN_EVENT_TABLE(wxApplet, wxPanel) | |
39 | EVT_ERASE_BACKGROUND(wxApplet::OnEraseBackground) | |
40 | END_EVENT_TABLE() | |
41 | ||
42 | // Implement the abstract class functions | |
43 | IMPLEMENT_ABSTRACT_CLASS(wxApplet, wxPanel); | |
44 | ||
45 | /**************************************************************************** | |
46 | REMARKS: | |
47 | Psuedo virtual constructor for the wxApplet class. | |
48 | ****************************************************************************/ | |
49 | bool wxApplet::Create( | |
67fc151d | 50 | wxHtmlAppletWindow *parent, |
38caaa61 | 51 | const wxHtmlTag& , |
67fc151d KB |
52 | const wxSize& size, |
53 | long style) | |
d9b91de7 KB |
54 | { |
55 | bool ret = wxPanel::Create(parent, -1, wxDefaultPosition, size, style); | |
56 | if (ret) { | |
38caaa61 | 57 | m_parent = parent; |
67fc151d | 58 | } |
d9b91de7 KB |
59 | return ret; |
60 | } | |
61 | ||
62 | /**************************************************************************** | |
63 | REMARKS: | |
64 | Destructor for the wxApplet class. | |
65 | ****************************************************************************/ | |
66 | wxApplet::~wxApplet() | |
67 | { | |
716cd410 | 68 | ((wxHtmlAppletWindow *) m_parent)->RemoveApplet(this); |
d9b91de7 KB |
69 | } |
70 | ||
71 | /**************************************************************************** | |
72 | REMARKS: | |
73 | Special handler for background erase messages. We do nothing in here which | |
74 | causes the background to not be erased which is exactly what we want. All | |
75 | the wxApplet classes display over an HTML window, so we want the HTML | |
38caaa61 | 76 | background to show through. |
d9b91de7 KB |
77 | ****************************************************************************/ |
78 | void wxApplet::OnEraseBackground(wxEraseEvent&) | |
79 | { | |
80 | } | |
81 |