]>
Commit | Line | Data |
---|---|---|
54921697 KB |
1 | /**************************************************************************** |
2 | * | |
3 | * Copyright (C) 1991-2001 SciTech Software, Inc. | |
4 | * All rights reserved. | |
5 | * | |
6 | * ====================================================================== | |
7 | * |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW| | |
8 | * | | | |
9 | * |This copyrighted computer code is a proprietary trade secret of | | |
10 | * |SciTech Software, Inc., located at 505 Wall Street, Chico, CA 95928 | | |
11 | * |USA (www.scitechsoft.com). ANY UNAUTHORIZED POSSESSION, USE, | | |
12 | * |VIEWING, COPYING, MODIFICATION OR DISSEMINATION OF THIS CODE IS | | |
13 | * |STRICTLY PROHIBITED BY LAW. Unless you have current, express | | |
14 | * |written authorization from SciTech to possess or use this code, you | | |
15 | * |may be subject to civil and/or criminal penalties. | | |
16 | * | | | |
17 | * |If you received this code in error or you would like to report | | |
18 | * |improper use, please immediately contact SciTech Software, Inc. at | | |
19 | * |530-894-8400. | | |
20 | * | | | |
21 | * |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW| | |
22 | * ====================================================================== | |
23 | * | |
d20cf96f KB |
24 | * Language: ANSI C++ |
25 | * Environment: Any | |
54921697 KB |
26 | * |
27 | * Description: Header file for the MonitorApplet class | |
28 | * | |
29 | ****************************************************************************/ | |
30 | ||
31 | #ifndef __WX_MONITORAPPLET_H | |
32 | #define __WX_MONITORAPPLET_H | |
33 | ||
34 | #include "wx/applet/applet.h" | |
35 | #include "combobox.h" | |
36 | #include "dialogs_wdr.h" | |
37 | ||
38 | /*--------------------------- Class Definitions ---------------------------*/ | |
39 | ||
40 | /**************************************************************************** | |
41 | REMARKS: | |
42 | Structure defining the simple monitor database records. | |
43 | ****************************************************************************/ | |
44 | struct MonitorEntry { | |
d20cf96f KB |
45 | char m_Mfr[60]; |
46 | char m_Model[60]; | |
47 | }; | |
54921697 KB |
48 | |
49 | /**************************************************************************** | |
50 | REMARKS: | |
51 | Defines our wxMonitorData cookie object that is stored to maintain state | |
52 | information for this MonitorApplet. | |
53 | ****************************************************************************/ | |
54 | class MonitorData : public wxObject { | |
55 | public: | |
d20cf96f KB |
56 | MonitorEntry m_Monitor; |
57 | }; | |
54921697 | 58 | |
d20cf96f KB |
59 | // Name used to track the monitor data cookie |
60 | #define MONITOR_COOKIE_NAME "MonitorData" | |
61 | ||
54921697 KB |
62 | /**************************************************************************** |
63 | REMARKS: | |
64 | Defines our wxMonitor applet class | |
65 | ****************************************************************************/ | |
66 | class MonitorApplet : public wxApplet { | |
67 | private: | |
68 | DECLARE_DYNAMIC_CLASS(MonitorApplet); | |
69 | DECLARE_EVENT_TABLE(); | |
d20cf96f | 70 | |
54921697 | 71 | protected: |
d20cf96f KB |
72 | ComboBox *m_Mfr; |
73 | ComboBox *m_Model; | |
74 | MonitorData *m_Data; | |
75 | static MonitorEntry m_Monitors[]; | |
76 | ||
77 | // Flush the current state to a cookie | |
78 | void SaveCurrentState(); | |
79 | ||
54921697 | 80 | public: |
d20cf96f KB |
81 | // Constructor (called during dynamic creation) |
82 | MonitorApplet(); | |
54921697 | 83 | |
d20cf96f KB |
84 | // Psuedo virtual constructor |
85 | virtual bool Create( | |
86 | wxHtmlAppletWindow *parent, | |
87 | const wxSize& size, | |
88 | long style); | |
89 | ||
90 | // Virtual destructor | |
91 | virtual ~MonitorApplet(); | |
54921697 | 92 | |
d20cf96f KB |
93 | // Handle HTML navigation to a new URL |
94 | virtual void OnLinkClicked(const wxHtmlLinkInfo& link); | |
95 | ||
96 | // Handle HTML navigation forward command in applet | |
97 | virtual void OnHistoryForward(); | |
98 | ||
99 | // Handle HTML navigation back command in applet | |
100 | virtual void OnHistoryBack(); | |
101 | ||
102 | // Handle messages from the wxAppletManager and other applets | |
103 | virtual void OnMessage(wxEvent& msg); | |
54921697 | 104 | |
d20cf96f KB |
105 | // Update the model and menufacturer lists |
106 | void ReadMfrList(); | |
107 | void ReadModelList(bool selectCurrent); | |
54921697 | 108 | |
d20cf96f KB |
109 | // Event handlers |
110 | void OnChange(wxCommandEvent &event); | |
111 | }; | |
112 | ||
54921697 KB |
113 | #endif // __WX_MONITORAPPLET_H |
114 |