2010-05-07 04:47:10 -05:00
|
|
|
/*
|
2021-06-11 17:24:04 -05:00
|
|
|
* Copyright 2021, Jaidyn Levesque. All rights reserved.
|
2011-12-03 16:38:03 -06:00
|
|
|
* Copyright 2009-2011, Andrea Anzani. All rights reserved.
|
|
|
|
* Copyright 2009-2011, Pier Luigi Fiorini. All rights reserved.
|
2010-05-07 04:47:10 -05:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef _MAIN_WINDOW_H
|
|
|
|
#define _MAIN_WINDOW_H
|
|
|
|
|
|
|
|
#include <Window.h>
|
|
|
|
|
2021-05-30 12:30:26 -05:00
|
|
|
class BSplitView;
|
2021-05-29 15:47:54 -05:00
|
|
|
class BTextView;
|
2010-05-07 04:47:10 -05:00
|
|
|
|
2021-05-29 15:47:54 -05:00
|
|
|
class Conversation;
|
2021-05-27 11:15:30 -05:00
|
|
|
class ConversationItem;
|
|
|
|
class ConversationListView;
|
2021-05-28 22:26:32 -05:00
|
|
|
class ConversationView;
|
2021-05-30 12:30:26 -05:00
|
|
|
class RosterItem;
|
2021-06-19 18:25:58 -05:00
|
|
|
class RosterEditWindow;
|
2021-05-30 17:12:41 -05:00
|
|
|
class RosterWindow;
|
2010-05-07 04:47:10 -05:00
|
|
|
class Server;
|
|
|
|
class StatusView;
|
|
|
|
|
2021-05-24 01:47:21 -05:00
|
|
|
|
2021-08-03 13:19:25 -05:00
|
|
|
class MainWindow: public BWindow {
|
2010-05-07 04:47:10 -05:00
|
|
|
public:
|
|
|
|
MainWindow();
|
|
|
|
|
2010-05-16 16:02:50 -05:00
|
|
|
void Start();
|
2021-05-30 12:30:26 -05:00
|
|
|
virtual bool QuitRequested();
|
2010-05-16 16:02:50 -05:00
|
|
|
|
2010-05-07 04:47:10 -05:00
|
|
|
virtual void MessageReceived(BMessage* message);
|
|
|
|
void ImMessage(BMessage* msg);
|
2021-05-30 12:30:26 -05:00
|
|
|
|
2011-12-14 17:36:27 -06:00
|
|
|
virtual void WorkspaceActivated(int32 workspace,
|
|
|
|
bool active);
|
|
|
|
|
2021-05-29 15:47:54 -05:00
|
|
|
void SetConversation(Conversation* chat);
|
2021-06-11 20:33:28 -05:00
|
|
|
void RemoveConversation(Conversation* chat);
|
2021-07-25 14:42:38 -05:00
|
|
|
void SortConversation(Conversation* chat);
|
2010-05-07 04:47:10 -05:00
|
|
|
|
2021-06-11 20:33:28 -05:00
|
|
|
Server* GetServer() const { return fServer; }
|
2011-12-14 17:36:27 -06:00
|
|
|
|
2010-05-07 04:47:10 -05:00
|
|
|
private:
|
2021-05-30 12:30:26 -05:00
|
|
|
void _InitInterface();
|
|
|
|
BMenuBar* _CreateMenuBar();
|
2021-06-12 16:13:52 -05:00
|
|
|
void _ToggleMenuItems();
|
2021-05-30 12:30:26 -05:00
|
|
|
|
2021-06-04 16:32:18 -05:00
|
|
|
ConversationItem*
|
|
|
|
_EnsureConversationItem(BMessage* msg);
|
2021-05-27 11:15:30 -05:00
|
|
|
|
2010-05-16 16:02:50 -05:00
|
|
|
Server* fServer;
|
2021-05-30 17:12:41 -05:00
|
|
|
RosterWindow* fRosterWindow;
|
2021-06-19 18:25:58 -05:00
|
|
|
RosterEditWindow* fRosterEditWindow;
|
2011-12-14 17:36:27 -06:00
|
|
|
bool fWorkspaceChanged;
|
2021-06-12 16:13:52 -05:00
|
|
|
BMenuBar* fMenuBar;
|
2021-05-29 15:47:54 -05:00
|
|
|
|
|
|
|
// Left panel, chat list
|
|
|
|
ConversationListView* fListView;
|
|
|
|
StatusView* fStatusView;
|
2021-07-30 16:14:21 -05:00
|
|
|
BSplitView* fSplitView;
|
2021-05-29 15:47:54 -05:00
|
|
|
|
|
|
|
// Right panel, chat
|
2021-05-30 12:30:26 -05:00
|
|
|
BSplitView* fRightView;
|
2021-05-29 15:47:54 -05:00
|
|
|
ConversationView* fChatView;
|
2021-05-30 20:45:24 -05:00
|
|
|
Conversation* fConversation;
|
2010-05-07 04:47:10 -05:00
|
|
|
};
|
|
|
|
|
2021-05-30 12:30:26 -05:00
|
|
|
|
2010-05-07 04:47:10 -05:00
|
|
|
#endif // _MAIN_WINDOW_H
|
2021-05-30 12:30:26 -05:00
|
|
|
|