]> git.saurik.com Git - wxWidgets.git/blame - contrib/src/applet/applet.cpp
Added code to show off wxDbGrid (contributed by Paul and Roger Gammans) in wxUSE_NEW_...
[wxWidgets.git] / contrib / src / applet / applet.cpp
CommitLineData
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*
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*
67fc151d
KB
26* Language: ANSI C++
27* Environment: Any
d9b91de7
KB
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"
38caaa61 38#include "wx/applet/window.h"
d9b91de7
KB
39
40/*------------------------- Implementation --------------------------------*/
41
42// Empty event handler. We include this event handler simply so that
43// sub-classes of wxApplet can reference wxApplet in the event tables
44// that they create as necessary.
45BEGIN_EVENT_TABLE(wxApplet, wxPanel)
46 EVT_ERASE_BACKGROUND(wxApplet::OnEraseBackground)
47END_EVENT_TABLE()
48
49// Implement the abstract class functions
50IMPLEMENT_ABSTRACT_CLASS(wxApplet, wxPanel);
51
52/****************************************************************************
53REMARKS:
54Psuedo virtual constructor for the wxApplet class.
55****************************************************************************/
56bool wxApplet::Create(
67fc151d 57 wxHtmlAppletWindow *parent,
38caaa61 58 const wxHtmlTag& ,
67fc151d
KB
59 const wxSize& size,
60 long style)
d9b91de7
KB
61{
62 bool ret = wxPanel::Create(parent, -1, wxDefaultPosition, size, style);
63 if (ret) {
38caaa61 64 m_parent = parent;
67fc151d 65 }
d9b91de7
KB
66 return ret;
67}
68
69/****************************************************************************
70REMARKS:
71Destructor for the wxApplet class.
72****************************************************************************/
73wxApplet::~wxApplet()
74{
38caaa61 75 m_parent->RemoveApplet(this);
d9b91de7
KB
76}
77
78/****************************************************************************
79REMARKS:
80Special handler for background erase messages. We do nothing in here which
81causes the background to not be erased which is exactly what we want. All
82the wxApplet classes display over an HTML window, so we want the HTML
38caaa61 83background to show through.
d9b91de7
KB
84****************************************************************************/
85void wxApplet::OnEraseBackground(wxEraseEvent&)
86{
87}
88