2011-12-14 17:36:27 -06:00
|
|
|
/*
|
2012-09-25 16:45:29 -05:00
|
|
|
* Copyright 2011-2012, Dario Casalinuovo. All rights reserved.
|
2011-12-14 17:36:27 -06:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Dario Casalinuovo
|
|
|
|
*/
|
|
|
|
#ifndef _REPLICANT_STATUS_VIEW_H
|
|
|
|
#define _REPLICANT_STATUS_VIEW_H
|
|
|
|
|
|
|
|
#include <Handler.h>
|
|
|
|
#include <Messenger.h>
|
|
|
|
#include <Resources.h>
|
|
|
|
#include <View.h>
|
|
|
|
|
2021-06-20 12:44:20 -05:00
|
|
|
#include "AppConstants.h"
|
|
|
|
#include "AppResources.h"
|
2011-12-14 17:36:27 -06:00
|
|
|
|
2012-05-15 14:28:56 -05:00
|
|
|
|
2011-12-14 17:36:27 -06:00
|
|
|
class BPopUpMenu;
|
|
|
|
class BMenuField;
|
|
|
|
|
|
|
|
class BitmapView;
|
|
|
|
class NicknameTextControl;
|
|
|
|
class ReplicantHandler;
|
|
|
|
|
|
|
|
class ReplicantStatusView : public BView {
|
|
|
|
public:
|
|
|
|
ReplicantStatusView();
|
|
|
|
ReplicantStatusView(BMessage* archive);
|
|
|
|
~ReplicantStatusView();
|
|
|
|
|
|
|
|
virtual void MessageReceived(BMessage* msg);
|
|
|
|
virtual void AttachedToWindow();
|
|
|
|
virtual void DetachedFromWindow();
|
|
|
|
|
|
|
|
virtual void Draw(BRect rect);
|
|
|
|
|
2021-06-20 12:44:20 -05:00
|
|
|
void SetStatus(UserStatus status);
|
2011-12-14 17:36:27 -06:00
|
|
|
|
|
|
|
virtual status_t Archive(BMessage* archive, bool deep) const;
|
|
|
|
|
|
|
|
static ReplicantStatusView* Instantiate(BMessage* archive);
|
|
|
|
|
|
|
|
void MouseDown(BPoint point);
|
2012-03-03 20:27:16 -06:00
|
|
|
|
|
|
|
|
|
|
|
static status_t InstallReplicant();
|
|
|
|
static status_t RemoveReplicant();
|
2011-12-14 17:36:27 -06:00
|
|
|
private:
|
|
|
|
void _Init();
|
|
|
|
void _BuildMenu();
|
|
|
|
void _ShowMenu(BPoint point);
|
|
|
|
BBitmap* _GetIcon(const uint32 id);
|
|
|
|
|
2021-06-20 12:44:20 -05:00
|
|
|
BBitmap* fAppIcon;
|
2011-12-14 17:36:27 -06:00
|
|
|
|
|
|
|
BBitmap* fConnectingIcon;
|
2021-06-20 12:44:20 -05:00
|
|
|
BBitmap* fIcon;
|
2011-12-14 17:36:27 -06:00
|
|
|
BBitmap* fOfflineIcon;
|
|
|
|
BBitmap* fBusyIcon;
|
|
|
|
BBitmap* fAwayIcon;
|
|
|
|
BBitmap* fExitMenuIcon;
|
2012-03-11 20:41:46 -05:00
|
|
|
BBitmap* fPreferencesIcon;
|
2011-12-14 17:36:27 -06:00
|
|
|
|
2021-08-01 06:37:25 -05:00
|
|
|
BResources fResources;
|
2011-12-14 17:36:27 -06:00
|
|
|
|
|
|
|
BPopUpMenu* fReplicantMenu;
|
|
|
|
|
|
|
|
bool fIsInstalled;
|
|
|
|
BMessenger* fCayaMsg;
|
|
|
|
|
|
|
|
ReplicantHandler* fReplicantHandler;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|