Chat-O-Matic/application/views/StatusView.h
Jaidyn Ann 984f066070 Multi-account StatusView; set info per-account
Now the StatusView (bottom-left corner, right below the room list) can
be used to set the nickname and status not only for all accounts at
once, but for managing the status/nick of individual accounts.

AccountManager now can set details of a single account, too.

MainWindow is no longer an Observer (as it just passed the information
along to StatusView― now StatusView manages that itself).

NicknameTextControl was removed, not being in use.
2021-08-03 13:24:36 -05:00

53 lines
1.1 KiB
C++

/*
* Copyright 2009, Pier Luigi Fiorini. All rights reserved.
* Copyright 2021, Jaidyn Levesque. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _STATUS_VIEW_H
#define _STATUS_VIEW_H
#include <View.h>
#include "AppConstants.h"
#include "Observer.h"
class BPopUpMenu;
class AccountsMenu;
class BitmapView;
class EnterTextView;
class MenuButton;
class Server;
class StatusView : public BView, public Observer {
public:
StatusView(const char* name, Server* server);
virtual void AttachedToWindow();
virtual void MessageReceived(BMessage* msg);
virtual void ObserveString(int32 what, BString str);
virtual void ObserveInteger(int32 what, int32 value);
virtual void ObservePointer(int32 what, void* ptr);
private:
void _SetName(BString name);
void _SetStatus(UserStatus status);
void _SetAvatarIcon(const BBitmap* bitmap);
void _SetToAccount();
EnterTextView* fNickname;
BitmapView* fAvatar;
BPopUpMenu* fStatusMenu;
MenuButton* fAccountsButton;
AccountsMenu* fAccountsMenu;
int64 fAccount;
Server* fServer;
};
#endif // _STATUS_VIEW_H