2010-05-07 04:47:10 -05:00
|
|
|
/*
|
|
|
|
* Copyright 2009, Pier Luigi Fiorini. All rights reserved.
|
2021-08-03 13:19:25 -05:00
|
|
|
* Copyright 2021, Jaidyn Levesque. All rights reserved.
|
2010-05-07 04:47:10 -05:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef _STATUS_VIEW_H
|
|
|
|
#define _STATUS_VIEW_H
|
|
|
|
|
|
|
|
#include <View.h>
|
|
|
|
|
2021-08-19 17:04:33 -05:00
|
|
|
#include "UserStatus.h"
|
2021-08-03 13:19:25 -05:00
|
|
|
#include "Observer.h"
|
2010-05-07 04:47:10 -05:00
|
|
|
|
|
|
|
class BPopUpMenu;
|
|
|
|
|
2021-08-03 13:19:25 -05:00
|
|
|
class AccountsMenu;
|
2010-05-07 04:47:10 -05:00
|
|
|
class BitmapView;
|
2021-08-03 13:19:25 -05:00
|
|
|
class EnterTextView;
|
2021-08-02 21:59:44 -05:00
|
|
|
class MenuButton;
|
2010-05-07 04:47:10 -05:00
|
|
|
|
2021-08-03 13:19:25 -05:00
|
|
|
class StatusView : public BView, public Observer {
|
2010-05-07 04:47:10 -05:00
|
|
|
public:
|
2022-02-23 15:42:46 -06:00
|
|
|
StatusView(const char* name);
|
2010-05-07 04:47:10 -05:00
|
|
|
|
|
|
|
virtual void AttachedToWindow();
|
|
|
|
virtual void MessageReceived(BMessage* msg);
|
|
|
|
|
2021-08-03 13:19:25 -05:00
|
|
|
virtual void ObserveString(int32 what, BString str);
|
|
|
|
virtual void ObserveInteger(int32 what, int32 value);
|
|
|
|
virtual void ObservePointer(int32 what, void* ptr);
|
|
|
|
|
2010-05-07 04:47:10 -05:00
|
|
|
|
|
|
|
private:
|
2021-08-03 13:19:25 -05:00
|
|
|
void _SetName(BString name);
|
|
|
|
void _SetStatus(UserStatus status);
|
|
|
|
void _SetAvatarIcon(const BBitmap* bitmap);
|
|
|
|
|
|
|
|
void _SetToAccount();
|
2021-08-02 21:59:44 -05:00
|
|
|
|
2021-08-03 13:19:25 -05:00
|
|
|
EnterTextView* fNickname;
|
2010-05-07 04:47:10 -05:00
|
|
|
BitmapView* fAvatar;
|
2021-08-02 21:59:44 -05:00
|
|
|
BPopUpMenu* fStatusMenu;
|
|
|
|
|
|
|
|
MenuButton* fAccountsButton;
|
2021-08-03 13:19:25 -05:00
|
|
|
AccountsMenu* fAccountsMenu;
|
|
|
|
int64 fAccount;
|
2010-05-07 04:47:10 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _STATUS_VIEW_H
|