Chat-O-Matic/application/windows/RosterWindow.h
Jaidyn Ann 0ffe3e5ce8 Replace CreateAccountMenu() with dedicated class
CreateAccountMenu() is used to populate a BMenu with items corresponding
to the map of accounts provided to it― but when an account is disabled
or enabled, it can't update automatically.

A dedicated class, fAccountsMenu, now replaces it― it'll automatically
repopulate the list whenever the active accounts update.
2021-07-21 12:14:25 -05:00

47 lines
1.1 KiB
C++

/*
* Copyright 2009-2011, Andrea Anzani. All rights reserved.
* Copyright 2009-2011, Pier Luigi Fiorini. All rights reserved.
* Copyright 2021, Jaidyn Levesque. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Andrea Anzani, andrea.anzani@gmail.com
* Pier Luigi Fiorini, pierluigi.fiorini@gmail.com
* Jaidyn Levesque, jadedctrl@teknik.io
*/
#ifndef ROSTERWINDOW_H
#define ROSTERWINDOW_H
#include <Window.h>
#include "Server.h"
class BMenuField;
class RosterItem;
class RosterView;
/* A window with the a list of the user's contacts, will send a message to
the server with contact info, once a contact is selected. */
class RosterWindow : public BWindow {
public:
RosterWindow(const char* title, BMessage* selectMsg, BMessenger* messenger,
Server* server, bigtime_t instance = -1);
void MessageReceived(BMessage* message);
void UpdateListItem(RosterItem* item);
private:
BButton* fOkButton;
BMenuField* fAccountField;
Server* fServer;
RosterView* fRosterView;
BMessenger* fTarget;
BMessage* fMessage;
};
#endif // ROSTERWINDOW_H