2 * Copyright 2006-2009, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
6 * Axel Dörfler, axeld@pinc-software.de
9 #ifndef NETWORK_STATUS_VIEW_H
10 #define NETWORK_STATUS_VIEW_H
13 #include <Notification.h>
14 #include <ObjectList.h>
21 class BNetworkInterface
;
35 class NetworkStatusView
: public BView
{
37 NetworkStatusView(BRect frame
, int32 resizingMode
,
38 bool inDeskbar
= false);
39 NetworkStatusView(BMessage
* archive
);
40 virtual ~NetworkStatusView();
42 static NetworkStatusView
* Instantiate(BMessage
* archive
);
43 virtual status_t
Archive(BMessage
* archive
, bool deep
= true) const;
45 virtual void AttachedToWindow();
46 virtual void DetachedFromWindow();
48 virtual void MessageReceived(BMessage
* message
);
49 virtual void FrameResized(float width
, float height
);
50 virtual void MouseDown(BPoint where
);
51 virtual void Draw(BRect updateRect
);
54 void _AboutRequested();
57 void _UpdateBitmaps();
58 void _ShowConfiguration(BMessage
* message
);
59 int32
_DetermineInterfaceStatus(
60 const BNetworkInterface
& interface
);
61 void _Update(bool force
= false);
62 void _OpenNetworksPreferences();
64 std::map
<BString
, int32
>
67 BBitmap
* fTrayIcons
[kStatusCount
];
68 BBitmap
* fNotifyIcons
[kStatusCount
];
71 #endif // NETWORK_STATUS_VIEW_H