xref: /haiku/src/apps/networkstatus/WirelessNetworkMenuItem.h (revision 4c8e85b316c35a9161f5a1c50ad70bc91c83a76f)
1 /*
2  * Copyright 2010, Axel Dörfler, axeld@pinc-software.de.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef WIRELESS_NETWORK_MENU_ITEM_H
6 #define WIRELESS_NETWORK_MENU_ITEM_H
7 
8 
9 #include <MenuItem.h>
10 #include <NetworkDevice.h>
11 
12 
13 class WirelessNetworkMenuItem : public BMenuItem {
14 public:
15 								WirelessNetworkMenuItem(
16 									wireless_network network,
17 									BMessage* message);
18 	virtual						~WirelessNetworkMenuItem();
19 
20 			wireless_network	Network() const { return fNetwork; }
21 
22 			BString 			AuthenticationName(int32 mode);
23 
24 	static	int					CompareSignalStrength(const BMenuItem* a,
25 									const BMenuItem* b);
26 
27 protected:
28 	virtual	void				DrawContent();
29 	virtual	void				Highlight(bool isHighlighted);
30 	virtual	void				GetContentSize(float* width, float* height);
31 			void				DrawRadioIcon();
32 
33 private:
34 			wireless_network	fNetwork;
35 };
36 
37 
38 #endif	// WIRELESS_NETWORK_MENU_ITEM_H
39