]> git.saurik.com Git - wxWidgets.git/blame - src/applet/applet.cpp
1) some cleanup in wxHtmlWindow, moved private structures out of headers
[wxWidgets.git] / src / applet / applet.cpp
CommitLineData
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.
44BEGIN_EVENT_TABLE(wxApplet, wxPanel)
45 EVT_ERASE_BACKGROUND(wxApplet::OnEraseBackground)
46END_EVENT_TABLE()
47
48// Implement the abstract class functions
49IMPLEMENT_ABSTRACT_CLASS(wxApplet, wxPanel);
50
51/****************************************************************************
52REMARKS:
53Psuedo virtual constructor for the wxApplet class.
54****************************************************************************/
55bool 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/****************************************************************************
68REMARKS:
69Destructor for the wxApplet class.
70****************************************************************************/
71wxApplet::~wxApplet()
72{
73 m_Parent->RemoveApplet(this);
74}
75
76/****************************************************************************
77REMARKS:
78Special handler for background erase messages. We do nothing in here which
79causes the background to not be erased which is exactly what we want. All
80the wxApplet classes display over an HTML window, so we want the HTML
81background to show through.
82****************************************************************************/
83void wxApplet::OnEraseBackground(wxEraseEvent&)
84{
85}
86