xref: /haiku/src/apps/pulse/PulseView.h (revision 87df8902ac30e7d6e528356fb82b187bed03a6c4)
1 //****************************************************************************************
2 //
3 //	File:		PulseView.h
4 //
5 //	Written by:	David Ramsey and Daniel Switkin
6 //
7 //	Copyright 1999, Be Incorporated
8 //
9 //****************************************************************************************
10 
11 #ifndef PULSEVIEW_H
12 #define PULSEVIEW_H
13 
14 #include <interface/View.h>
15 #include <interface/PopUpMenu.h>
16 #include <interface/MenuItem.h>
17 
18 
19 class PulseView : public BView {
20 	public:
21 		PulseView(BRect rect, const char *name);
22 		PulseView(BMessage *message);
23 		~PulseView();
24 		virtual void MouseDown(BPoint point);
25 		void ChangeCPUState(BMessage *message);
26 
27 	protected:
28 		void Init();
29 		void Update();
30 
31 		BPopUpMenu *popupmenu;
32 		BMenuItem *mode1, *mode2, *preferences, *about;
33 		BMenuItem **cpu_menu_items;
34 
35 		double cpu_times[B_MAX_CPU_COUNT];
36 		bigtime_t prev_active[B_MAX_CPU_COUNT];
37 		bigtime_t prev_time;
38 };
39 
40 #endif
41