984f066070
Now the StatusView (bottom-left corner, right below the room list) can be used to set the nickname and status not only for all accounts at once, but for managing the status/nick of individual accounts. AccountManager now can set details of a single account, too. MainWindow is no longer an Observer (as it just passed the information along to StatusView― now StatusView manages that itself). NicknameTextControl was removed, not being in use.
73 lines
1.5 KiB
C++
73 lines
1.5 KiB
C++
/*
|
|
* Copyright 2021, Jaidyn Levesque. All rights reserved.
|
|
* Copyright 2009-2011, Andrea Anzani. All rights reserved.
|
|
* Copyright 2009-2011, Pier Luigi Fiorini. All rights reserved.
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
#ifndef _MAIN_WINDOW_H
|
|
#define _MAIN_WINDOW_H
|
|
|
|
#include <Window.h>
|
|
|
|
class BSplitView;
|
|
class BTextView;
|
|
|
|
class Conversation;
|
|
class ConversationItem;
|
|
class ConversationListView;
|
|
class ConversationView;
|
|
class RosterItem;
|
|
class RosterEditWindow;
|
|
class RosterWindow;
|
|
class Server;
|
|
class StatusView;
|
|
|
|
|
|
class MainWindow: public BWindow {
|
|
public:
|
|
MainWindow();
|
|
|
|
void Start();
|
|
virtual bool QuitRequested();
|
|
|
|
virtual void MessageReceived(BMessage* message);
|
|
void ImMessage(BMessage* msg);
|
|
|
|
virtual void WorkspaceActivated(int32 workspace,
|
|
bool active);
|
|
|
|
void SetConversation(Conversation* chat);
|
|
void RemoveConversation(Conversation* chat);
|
|
void SortConversation(Conversation* chat);
|
|
|
|
Server* GetServer() const { return fServer; }
|
|
|
|
private:
|
|
void _InitInterface();
|
|
BMenuBar* _CreateMenuBar();
|
|
void _ToggleMenuItems();
|
|
|
|
ConversationItem*
|
|
_EnsureConversationItem(BMessage* msg);
|
|
|
|
Server* fServer;
|
|
RosterWindow* fRosterWindow;
|
|
RosterEditWindow* fRosterEditWindow;
|
|
bool fWorkspaceChanged;
|
|
BMenuBar* fMenuBar;
|
|
|
|
// Left panel, chat list
|
|
ConversationListView* fListView;
|
|
StatusView* fStatusView;
|
|
BSplitView* fSplitView;
|
|
|
|
// Right panel, chat
|
|
BSplitView* fRightView;
|
|
ConversationView* fChatView;
|
|
Conversation* fConversation;
|
|
};
|
|
|
|
|
|
#endif // _MAIN_WINDOW_H
|
|
|