2010-05-07 04:47:10 -05:00
|
|
|
/*
|
|
|
|
* Copyright 2009, Pier Luigi Fiorini. All rights reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef _STATUS_VIEW_H
|
|
|
|
#define _STATUS_VIEW_H
|
|
|
|
|
|
|
|
#include <View.h>
|
|
|
|
|
2021-06-20 12:44:20 -05:00
|
|
|
#include "AppConstants.h"
|
2010-05-07 04:47:10 -05:00
|
|
|
|
|
|
|
class BPopUpMenu;
|
|
|
|
|
|
|
|
class BitmapView;
|
2021-08-02 21:59:44 -05:00
|
|
|
class MenuButton;
|
2010-05-07 04:47:10 -05:00
|
|
|
class NicknameTextControl;
|
2021-08-02 21:59:44 -05:00
|
|
|
class Server;
|
2010-05-07 04:47:10 -05:00
|
|
|
|
|
|
|
class StatusView : public BView {
|
|
|
|
public:
|
2021-08-02 21:59:44 -05:00
|
|
|
StatusView(const char* name, Server* server);
|
2010-05-07 04:47:10 -05:00
|
|
|
|
|
|
|
virtual void AttachedToWindow();
|
|
|
|
virtual void MessageReceived(BMessage* msg);
|
|
|
|
|
|
|
|
void SetName(BString name);
|
2021-06-20 12:44:20 -05:00
|
|
|
void SetStatus(UserStatus status);
|
2010-06-22 14:02:42 -05:00
|
|
|
void SetAvatarIcon(const BBitmap* bitmap);
|
2010-05-07 04:47:10 -05:00
|
|
|
|
|
|
|
private:
|
2021-08-02 21:59:44 -05:00
|
|
|
void _PopulateAccountMenu();
|
|
|
|
|
2012-09-25 16:45:29 -05:00
|
|
|
NicknameTextControl* fNickname;
|
2010-05-07 04:47:10 -05:00
|
|
|
BitmapView* fAvatar;
|
2021-08-02 21:59:44 -05:00
|
|
|
BPopUpMenu* fStatusMenu;
|
|
|
|
|
|
|
|
MenuButton* fAccountsButton;
|
|
|
|
BPopUpMenu* fAccountsMenu;
|
|
|
|
|
|
|
|
Server* fServer;
|
2010-05-07 04:47:10 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _STATUS_VIEW_H
|