]>
Commit | Line | Data |
---|---|---|
54921697 KB |
1 | /**************************************************************************** |
2 | * | |
3 | * wxWindows HTML Applet Package | |
4 | * | |
5 | * Copyright (C) 1991-2001 SciTech Software, Inc. | |
6 | * All rights reserved. | |
7 | * | |
8 | * ====================================================================== | |
9 | * |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW| | |
10 | * | | | |
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. | | |
18 | * | | | |
19 | * |If you received this code in error or you would like to report | | |
20 | * |improper use, please immediately contact SciTech Software, Inc. at | | |
21 | * |530-894-8400. | | |
22 | * | | | |
23 | * |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW| | |
24 | * ====================================================================== | |
25 | * | |
26 | * Language: ANSI C++ | |
27 | * Environment: Any | |
28 | * | |
29 | * Description: Main wxApplet class implementation | |
30 | * | |
31 | ****************************************************************************/ | |
32 | ||
33 | // For compilers that support precompilation | |
34 | #include "wx/wxprec.h" | |
35 | ||
36 | // Include private headers | |
37 | #include "wx/applet/applet.h" | |
38 | ||
39 | /*------------------------- Implementation --------------------------------*/ | |
40 | ||
41 | // Empty event handler. We include this event handler simply so that | |
42 | // sub-classes of wxApplet can reference wxApplet in the event tables | |
43 | // that they create as necessary. | |
44 | BEGIN_EVENT_TABLE(wxApplet, wxPanel) | |
45 | EVT_ERASE_BACKGROUND(wxApplet::OnEraseBackground) | |
46 | END_EVENT_TABLE() | |
47 | ||
48 | // Implement the abstract class functions | |
49 | IMPLEMENT_ABSTRACT_CLASS(wxApplet, wxPanel); | |
50 | ||
51 | /**************************************************************************** | |
52 | REMARKS: | |
53 | Psuedo virtual constructor for the wxApplet class. | |
54 | ****************************************************************************/ | |
55 | bool wxApplet::Create( | |
56 | wxHtmlAppletWindow *parent, | |
57 | const wxSize& size, | |
58 | long style) | |
59 | { | |
60 | bool ret = wxPanel::Create(parent, -1, wxDefaultPosition, size, style); | |
61 | if (ret) { | |
62 | m_Parent = parent; | |
63 | } | |
64 | return ret; | |
65 | } | |
66 | ||
67 | /**************************************************************************** | |
68 | REMARKS: | |
69 | Destructor for the wxApplet class. | |
70 | ****************************************************************************/ | |
71 | wxApplet::~wxApplet() | |
72 | { | |
73 | m_Parent->RemoveApplet(this); | |
74 | } | |
75 | ||
76 | /**************************************************************************** | |
77 | REMARKS: | |
78 | Special handler for background erase messages. We do nothing in here which | |
79 | causes the background to not be erased which is exactly what we want. All | |
80 | the wxApplet classes display over an HTML window, so we want the HTML | |
81 | background to show through. | |
82 | ****************************************************************************/ | |
83 | void wxApplet::OnEraseBackground(wxEraseEvent&) | |
84 | { | |
85 | } | |
86 |