Chat-O-Matic/application/windows/MainWindow.h

78 lines
1.6 KiB
C
Raw Normal View History

/*
* 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.
* Distributed under the terms of the MIT License.
*/
#ifndef _MAIN_WINDOW_H
#define _MAIN_WINDOW_H
#include <Window.h>
#include "Observer.h"
//class BMenubar;
class BSplitView;
2021-05-29 15:47:54 -05:00
class BTextView;
2021-05-29 15:47:54 -05:00
class Conversation;
class ConversationItem;
class ConversationListView;
class ConversationView;
class RosterItem;
2021-05-30 17:12:41 -05:00
class RosterWindow;
class Server;
class StatusView;
class MainWindow: public BWindow, public Observer {
public:
MainWindow();
void Start();
virtual bool QuitRequested();
virtual void MessageReceived(BMessage* message);
void ImMessage(BMessage* msg);
void ImError(BMessage* msg);
// Observer inheritance
void ObserveInteger(int32 what, int32 val);
virtual void WorkspaceActivated(int32 workspace,
bool active);
2021-05-29 15:47:54 -05:00
void SetConversation(Conversation* chat);
void RemoveConversation(Conversation* chat);
Server* GetServer() const { return fServer; }
private:
void _InitInterface();
BMenuBar* _CreateMenuBar();
void _ToggleMenuItems();
ConversationItem*
_EnsureConversationItem(BMessage* msg);
Server* fServer;
2021-05-30 17:12:41 -05:00
RosterWindow* fRosterWindow;
bool fWorkspaceChanged;
BMenuBar* fMenuBar;
2021-05-29 15:47:54 -05:00
// Left panel, chat list
ConversationListView* fListView;
StatusView* fStatusView;
// Right panel, chat
BSplitView* fRightView;
2021-05-29 15:47:54 -05:00
BScrollView* fSendScroll;
BTextView* fSendView;
ConversationView* fChatView;
Conversation* fConversation;
};
#endif // _MAIN_WINDOW_H