Chat-O-Matic/application/views/AccountsMenu.h
Jaidyn Ann dce82c2ba2 Use Server::Get(), clean up header usage
Instead of passing around pointers to the Server, Server::Get() returns
the server's pointer (simplifying some things a good bit).
As a result, headers have been cleaned up, and some redundant KeyMaps
have been placed in Maps.h.
2022-02-23 16:04:56 -06:00

40 lines
868 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 AccountsMenu : public BPopUpMenu, public Observer {
public:
AccountsMenu(const char* name, BMessage msg,
BMessage* allMsg = NULL);
~AccountsMenu();
virtual void ObserveInteger(int32 what, int32 value);
void SetDefaultSelection(BMenuItem* item);
static int64 GetDefaultSelection() { return fDefaultSelection; }
private:
void _PopulateMenu();
BBitmap* _EnsureProtocolIcon(const char* label,
ProtocolLooper* looper);
BBitmap* _EnsureAsteriskIcon();
BMessage fAccountMessage;
BMessage* fAllMessage;
static int64 fDefaultSelection;
};
#endif // _ACCOUNTS_MENU_H