fixes resizing issues ins croll view
This commit is contained in:
parent
85be8d6ef4
commit
de3dc540c4
5 changed files with 88 additions and 83 deletions
67
MainWindow.h
67
MainWindow.h
|
@ -5,20 +5,18 @@
|
|||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <MenuField.h>
|
||||
#include <MenuItem.h>
|
||||
#include <TextControl.h>
|
||||
#include <TextView.h>
|
||||
#include <StatusBar.h>
|
||||
#include <Window.h>
|
||||
#include <String.h>
|
||||
#include <MessageRunner.h>
|
||||
#include <PopUpMenu.h>
|
||||
#include <MenuField.h>
|
||||
|
||||
#include <StatusBar.h>
|
||||
#include <String.h>
|
||||
#include <TextControl.h>
|
||||
#include <TextView.h>
|
||||
#include <Window.h>
|
||||
|
||||
#include "Conversation.h"
|
||||
|
||||
|
||||
static const uint32 kCheckKey = 'chkk';
|
||||
static const uint32 kMsgNewFile = 'fnew';
|
||||
static const uint32 kMsgOpenFile = 'fopn';
|
||||
|
@ -30,10 +28,6 @@ static const uint32 kPulse = 'plse';
|
|||
static const uint32 kSendPrompt = 'kspt';
|
||||
static const uint32 kQuestionChanged = 'kqch';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class MainWindow : public BWindow {
|
||||
public:
|
||||
MainWindow();
|
||||
|
@ -41,30 +35,43 @@ public:
|
|||
|
||||
virtual void MessageReceived(BMessage *msg);
|
||||
|
||||
Conversation* _conversation = new Conversation(this);
|
||||
// Overriding FrameResized to receive notifications on resize
|
||||
void FrameResized(float newWidth, float newHeight) override {
|
||||
printf("Window resized to: Width = %f, Height = %f\n", newWidth, newHeight);
|
||||
// You can add additional handling code here if needed
|
||||
|
||||
// Resize the scroll view if necessary, otherwise we lose scroll ability
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Conversation *_conversation = new Conversation(this);
|
||||
|
||||
void checkValidKey();
|
||||
|
||||
void updateHistoryInfo();
|
||||
|
||||
void checkValidKey();
|
||||
|
||||
void updateHistoryInfo();
|
||||
|
||||
|
||||
private:
|
||||
void ShowMissingKeyAlertAndQuit();
|
||||
void SelectModelByName(const char *targetLabel);
|
||||
|
||||
void ShowMissingKeyAlertAndQuit();
|
||||
void SelectModelByName(const char* targetLabel);
|
||||
|
||||
bool waitMode = false;
|
||||
bool waitMode = false;
|
||||
BMenuBar *_BuildMenu();
|
||||
BTextView * _answerView;
|
||||
BTextView * _infoConversation;
|
||||
BTextView * _infoView;
|
||||
BTextView* _inputField;
|
||||
BStatusBar* _progress;
|
||||
BMenuField* _modelField;
|
||||
BPopUpMenu* _modelMenu;
|
||||
|
||||
BTextView *_answerView;
|
||||
BScrollView *_answerScrollView;
|
||||
|
||||
BTextView *_infoConversation;
|
||||
BTextView *_infoView;
|
||||
BTextView *_inputField;
|
||||
BStatusBar *_progress;
|
||||
BMenuField *_modelField;
|
||||
BPopUpMenu *_modelMenu;
|
||||
BButton *_sendButton;
|
||||
|
||||
// BMenuItem *fSaveMenuItem;
|
||||
// BMenuItem *fSaveMenuItem;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue