2021-08-27 10:57:20 -05:00
|
|
|
/*
|
|
|
|
* Copyright 2021, Jaidyn Levesque <jadedctrl@teknik.io>
|
|
|
|
* All rights reserved. Distributed under the terms of the MIT license.
|
|
|
|
*/
|
|
|
|
#ifndef _ROOM_LIST_WINDOW_H
|
|
|
|
#define _ROOM_LIST_WINDOW_H
|
|
|
|
|
2021-08-31 20:31:39 -05:00
|
|
|
#include <ObjectList.h>
|
2021-08-27 10:57:20 -05:00
|
|
|
#include <Window.h>
|
|
|
|
|
2021-08-31 20:31:39 -05:00
|
|
|
#include <libsupport/KeyMap.h>
|
|
|
|
|
2021-08-27 10:57:20 -05:00
|
|
|
class BButton;
|
|
|
|
class BColumnListView;
|
2021-08-31 20:31:39 -05:00
|
|
|
class RoomListRow;
|
2021-08-27 10:57:20 -05:00
|
|
|
class Server;
|
|
|
|
|
|
|
|
|
2021-08-31 20:31:39 -05:00
|
|
|
typedef KeyMap<int64, BObjectList<RoomListRow>*> RowMap;
|
|
|
|
|
|
|
|
|
2021-08-27 10:57:20 -05:00
|
|
|
class RoomListWindow : public BWindow {
|
|
|
|
public:
|
|
|
|
RoomListWindow(Server* server);
|
|
|
|
~RoomListWindow();
|
|
|
|
|
|
|
|
static RoomListWindow* Get(Server* server);
|
|
|
|
static bool Check();
|
|
|
|
|
|
|
|
virtual void MessageReceived(BMessage* msg);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void _InitInterface();
|
|
|
|
|
2021-08-31 20:31:39 -05:00
|
|
|
void _EmptyList();
|
|
|
|
|
2021-08-27 10:57:20 -05:00
|
|
|
BButton* fJoinButton;
|
|
|
|
BColumnListView* fListView;
|
|
|
|
|
2021-08-31 20:31:39 -05:00
|
|
|
RowMap fRows;
|
|
|
|
int64 fAccount;
|
|
|
|
|
2021-08-27 10:57:20 -05:00
|
|
|
Server* fServer;
|
|
|
|
static RoomListWindow* fInstance;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _ROOM_LIST_WINDOW_H
|