]> git.saurik.com Git - wxWidgets.git/blob - contrib/src/applet/applet.cpp
Removed fstream include which seemed unnecessary, and gave errors for BC++ 5.5 anyway.
[wxWidgets.git] / contrib / src / applet / applet.cpp
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 #include "wx/applet/window.h"
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.
45 BEGIN_EVENT_TABLE(wxApplet, wxPanel)
46 EVT_ERASE_BACKGROUND(wxApplet::OnEraseBackground)
47 END_EVENT_TABLE()
48
49 // Implement the abstract class functions
50 IMPLEMENT_ABSTRACT_CLASS(wxApplet, wxPanel);
51
52 /****************************************************************************
53 REMARKS:
54 Psuedo virtual constructor for the wxApplet class.
55 ****************************************************************************/
56 bool wxApplet::Create(
57 wxHtmlAppletWindow *parent,
58 const wxHtmlTag& ,
59 const wxSize& size,
60 long style)
61 {
62 bool ret = wxPanel::Create(parent, -1, wxDefaultPosition, size, style);
63 if (ret) {
64 m_parent = parent;
65 }
66 return ret;
67 }
68
69 /****************************************************************************
70 REMARKS:
71 Destructor for the wxApplet class.
72 ****************************************************************************/
73 wxApplet::~wxApplet()
74 {
75 m_parent->RemoveApplet(this);
76 }
77
78 /****************************************************************************
79 REMARKS:
80 Special handler for background erase messages. We do nothing in here which
81 causes the background to not be erased which is exactly what we want. All
82 the wxApplet classes display over an HTML window, so we want the HTML
83 background to show through.
84 ****************************************************************************/
85 void wxApplet::OnEraseBackground(wxEraseEvent&)
86 {
87 }
88