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
|
|
|
|
|
|
|
|
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:
|
2022-02-23 15:42:46 -06:00
|
|
|
RoomListWindow();
|
2021-08-27 10:57:20 -05:00
|
|
|
~RoomListWindow();
|
|
|
|
|
2022-02-23 15:42:46 -06:00
|
|
|
static RoomListWindow* Get();
|
2021-08-27 10:57:20 -05:00
|
|
|
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
|
|
|
static RoomListWindow* fInstance;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _ROOM_LIST_WINDOW_H
|