60 lines
1.1 KiB
C++
60 lines
1.1 KiB
C++
/*
|
|
* Copyright 2024, My Name <my@email.address>
|
|
* All rights reserved. Distributed under the terms of the MIT license.
|
|
*/
|
|
#ifndef MAINWINDOW_H
|
|
#define MAINWINDOW_H
|
|
|
|
#include <MenuItem.h>
|
|
#include <TextControl.h>
|
|
#include <TextView.h>
|
|
#include <StatusBar.h>
|
|
#include <Window.h>
|
|
#include <String.h>
|
|
#include <MessageRunner.h>
|
|
|
|
|
|
#include "Conversation.h"
|
|
|
|
|
|
static const uint32 kCheckKey = 'chkk';
|
|
static const uint32 kMsgNewFile = 'fnew';
|
|
static const uint32 kMsgOpenFile = 'fopn';
|
|
static const uint32 kMsgSaveFile = 'fsav';
|
|
|
|
static const uint32 kPulse = 'plse';
|
|
|
|
static const uint32 kSendPrompt = 'kspt';
|
|
static const uint32 kQuestionChanged = 'kqch';
|
|
|
|
|
|
|
|
|
|
|
|
class MainWindow : public BWindow {
|
|
public:
|
|
MainWindow();
|
|
virtual ~MainWindow();
|
|
|
|
virtual void MessageReceived(BMessage *msg);
|
|
|
|
Conversation* _conversation = new Conversation(this);
|
|
|
|
void checkValidKey();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void ShowMissingKeyAlertAndQuit();
|
|
|
|
BMenuBar *_BuildMenu();
|
|
BTextView * _answerView;
|
|
BTextView * _infoView;
|
|
BTextView* _inputField;
|
|
BStatusBar* _progress;
|
|
|
|
// BMenuItem *fSaveMenuItem;
|
|
};
|
|
|
|
#endif
|