]> git.saurik.com Git - wxWidgets.git/blame - contrib/samples/applet/monitorapplet.h
Fill in more details for the wxEVT_STC_AUTOCOMP_SELECTION event
[wxWidgets.git] / contrib / samples / applet / monitorapplet.h
CommitLineData
54921697
KB
1/****************************************************************************
2*
716cd410
KB
3* wxWindows HTML Applet Package
4*
54921697
KB
5* Copyright (C) 1991-2001 SciTech Software, Inc.
6* All rights reserved.
7*
716cd410
KB
8* ========================================================================
9*
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
14*
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.
19*
20* ========================================================================
54921697 21*
d20cf96f
KB
22* Language: ANSI C++
23* Environment: Any
54921697
KB
24*
25* Description: Header file for the MonitorApplet class
26*
27****************************************************************************/
28
29#ifndef __WX_MONITORAPPLET_H
30#define __WX_MONITORAPPLET_H
31
32#include "wx/applet/applet.h"
33#include "combobox.h"
34#include "dialogs_wdr.h"
35
36/*--------------------------- Class Definitions ---------------------------*/
37
38/****************************************************************************
39REMARKS:
40Structure defining the simple monitor database records.
41****************************************************************************/
42struct MonitorEntry {
d20cf96f
KB
43 char m_Mfr[60];
44 char m_Model[60];
45 };
54921697
KB
46
47/****************************************************************************
48REMARKS:
49Defines our wxMonitorData cookie object that is stored to maintain state
50information for this MonitorApplet.
51****************************************************************************/
52class MonitorData : public wxObject {
53public:
d20cf96f
KB
54 MonitorEntry m_Monitor;
55 };
54921697 56
716cd410
KB
57// Name used to track the monitor data cookie
58#define MONITOR_COOKIE_NAME "MonitorData"
59
54921697
KB
60/****************************************************************************
61REMARKS:
62Defines our wxMonitor applet class
63****************************************************************************/
64class MonitorApplet : public wxApplet {
65private:
66 DECLARE_DYNAMIC_CLASS(MonitorApplet);
67 DECLARE_EVENT_TABLE();
716cd410 68
54921697 69protected:
716cd410 70 ComboBox *m_Mfr;
d20cf96f 71 ComboBox *m_Model;
716cd410 72 MonitorData *m_Data;
d20cf96f 73 static MonitorEntry m_Monitors[];
716cd410 74
d20cf96f
KB
75 // Flush the current state to a cookie
76 void SaveCurrentState();
716cd410 77
54921697 78public:
d20cf96f
KB
79 // Constructor (called during dynamic creation)
80 MonitorApplet();
54921697 81
d20cf96f
KB
82 // Psuedo virtual constructor
83 virtual bool Create(
84 wxHtmlAppletWindow *parent,
85 const wxSize& size,
86 long style);
716cd410 87
d20cf96f
KB
88 // Virtual destructor
89 virtual ~MonitorApplet();
54921697 90
d20cf96f 91 // Handle HTML navigation to a new URL
716cd410
KB
92 virtual void OnLinkClicked(const wxHtmlLinkInfo& link);
93
d20cf96f
KB
94 // Handle HTML navigation forward command in applet
95 virtual void OnHistoryForward();
716cd410 96
d20cf96f
KB
97 // Handle HTML navigation back command in applet
98 virtual void OnHistoryBack();
716cd410 99
d20cf96f
KB
100 // Handle messages from the wxAppletManager and other applets
101 virtual void OnMessage(wxEvent& msg);
54921697 102
d20cf96f
KB
103 // Update the model and menufacturer lists
104 void ReadMfrList();
105 void ReadModelList(bool selectCurrent);
54921697 106
716cd410 107 // Event handlers
d20cf96f
KB
108 void OnChange(wxCommandEvent &event);
109 };
716cd410 110
54921697
KB
111#endif // __WX_MONITORAPPLET_H
112