Chat-O-Matic/application/views/AccountsMenu.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

43 lines
925 B
C++

/*
* Copyright 2021, Jaidyn Levesque <jadedctrl@teknik.io>
* All rights reserved. Distributed under the terms of the MIT license.
*/
#ifndef _ACCOUNTS_MENU_H
#define _ACCOUNTS_MENU_H
#include <PopUpMenu.h>
#include "Observer.h"
class ProtocolLooper;
class Server;
class AccountsMenu : public BPopUpMenu, public Observer {
public:
AccountsMenu(const char* name, BMessage msg,
BMessage* allMsg, Server* server);
AccountsMenu(const char* name, BMessage msg,
BMessage* allMsg = NULL);
~AccountsMenu();
virtual void ObserveInteger(int32 what, int32 value);
void SetDefaultSelection(BMenuItem* item);
private:
void _PopulateMenu();
BBitmap* _EnsureProtocolIcon(const char* label,
ProtocolLooper* looper);
BBitmap* _EnsureAsteriskIcon();
BMessage fAccountMessage;
BMessage* fAllMessage;
static int32 fDefaultSelection;
Server* fServer;
};
#endif // _ACCOUNTS_MENU_H