2 * Copyright 2001-2008, Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
6 * Frans van Nispen (xlr8@tref.nl)
9 //! The BTextView derivative owned by an instance of BTextControl.
11 #ifndef _TEXT_CONTROLI_H
12 #define _TEXT_CONTROLI_H
21 class _BTextInput_
: public BTextView
{
23 _BTextInput_(BRect frame
, BRect textRect
,
25 uint32 flags
= B_WILL_DRAW
| B_PULSE_NEEDED
);
26 _BTextInput_(BMessage
*data
);
27 virtual ~_BTextInput_();
29 static BArchivable
* Instantiate(BMessage
*data
);
30 virtual status_t
Archive(BMessage
*data
, bool deep
= true) const;
32 virtual void MouseDown(BPoint where
);
33 virtual void FrameResized(float width
, float height
);
34 virtual void KeyDown(const char *bytes
, int32 numBytes
);
35 virtual void MakeFocus(bool focusState
= true);
37 virtual BSize
MinSize();
40 void SetInitialText();
42 virtual void Paste(BClipboard
*clipboard
);
46 virtual void InsertText(const char *inText
, int32 inLength
,
47 int32 inOffset
, const text_run_array
*inRuns
);
48 virtual void DeleteText(int32 fromOffset
, int32 toOffset
);
52 BTextControl
*TextControl();
58 } // namespace BPrivate
60 using namespace BPrivate
;
63 #endif // _TEXT_CONTROLI_H