2021-07-29 22:00:01 -05:00
|
|
|
/*
|
|
|
|
* Copyright 2021, Jaidyn Levesque <jadedctrl@teknik.io>
|
|
|
|
* All rights reserved. Distributed under the terms of the MIT license.
|
|
|
|
*/
|
|
|
|
#ifndef _ENTER_TEXT_VIEW_H
|
|
|
|
#define _ENTER_TEXT_VIEW_H
|
|
|
|
|
2021-08-01 06:56:07 -05:00
|
|
|
#include "UrlTextView.h"
|
2021-07-29 22:00:01 -05:00
|
|
|
|
|
|
|
|
2021-08-01 06:56:07 -05:00
|
|
|
class EnterTextView : public UrlTextView {
|
2021-07-29 22:00:01 -05:00
|
|
|
public:
|
|
|
|
EnterTextView(const char* name);
|
|
|
|
EnterTextView(const char* name, const BFont* initialFont,
|
|
|
|
const rgb_color* initialColor,
|
|
|
|
uint32 flags = B_WILL_DRAW);
|
|
|
|
|
|
|
|
virtual void KeyDown(const char* bytes, int32 numBytes);
|
|
|
|
|
|
|
|
void SetTarget(BHandler* handler) { fTarget = handler; }
|
|
|
|
|
|
|
|
BMessage Message() { return fMessage; }
|
|
|
|
void SetMessage(BMessage msg, const char* textSlot = NULL);
|
|
|
|
|
|
|
|
private:
|
|
|
|
BMessage fMessage;
|
|
|
|
BHandler* fTarget;
|
|
|
|
BString fTextSlot;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _ENTER_TEXT_VIEW_H
|