]>
git.saurik.com Git - wxWidgets.git/blob - contrib/samples/applet/monitorapplet.h
1 /****************************************************************************
3 * wxWindows HTML Applet Package
5 * Copyright (C) 1991-2001 SciTech Software, Inc.
8 * ========================================================================
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
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.
20 * ========================================================================
25 * Description: Header file for the MonitorApplet class
27 ****************************************************************************/
29 #ifndef __WX_MONITORAPPLET_H
30 #define __WX_MONITORAPPLET_H
32 #include "wx/applet/applet.h"
34 #include "dialogs_wdr.h"
36 /*--------------------------- Class Definitions ---------------------------*/
38 /****************************************************************************
40 Structure defining the simple monitor database records.
41 ****************************************************************************/
47 /****************************************************************************
49 Defines our wxMonitorData cookie object that is stored to maintain state
50 information for this MonitorApplet.
51 ****************************************************************************/
52 class MonitorData
: public wxObject
{
54 MonitorEntry m_Monitor
;
57 // Name used to track the monitor data cookie
58 #define MONITOR_COOKIE_NAME "MonitorData"
60 /****************************************************************************
62 Defines our wxMonitor applet class
63 ****************************************************************************/
64 class MonitorApplet
: public wxApplet
{
66 DECLARE_DYNAMIC_CLASS(MonitorApplet
);
67 DECLARE_EVENT_TABLE();
73 static MonitorEntry m_Monitors
[];
75 // Flush the current state to a cookie
76 void SaveCurrentState();
79 // Constructor (called during dynamic creation)
82 // Psuedo virtual constructor
84 wxHtmlAppletWindow
*parent
,
89 virtual ~MonitorApplet();
91 // Handle HTML navigation to a new URL
92 virtual void OnLinkClicked(const wxHtmlLinkInfo
& link
);
94 // Handle HTML navigation forward command in applet
95 virtual void OnHistoryForward();
97 // Handle HTML navigation back command in applet
98 virtual void OnHistoryBack();
100 // Handle messages from the wxAppletManager and other applets
101 virtual void OnMessage(wxEvent
& msg
);
103 // Update the model and menufacturer lists
105 void ReadModelList(bool selectCurrent
);
108 void OnChange(wxCommandEvent
&event
);
111 #endif // __WX_MONITORAPPLET_H