libroot/posix/stdio: Remove unused portions.
[haiku.git] / src / apps / mail / AddressTextControl.h
blob51c38bc571063e4eca1288ae807668e4d02e8791
1 /*
2 * Copyright 2015, Axel Dörfler, axeld@pinc-software.de.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef ADDRESS_TEXT_CONTROL_H
6 #define ADDRESS_TEXT_CONTROL_H
9 #include <Control.h>
12 class BButton;
13 class BPopUpMenu;
14 class BTextView;
17 class AddressTextControl : public BControl {
18 public:
19 AddressTextControl(const char* name,
20 BMessage* message);
21 virtual ~AddressTextControl();
23 virtual void AttachedToWindow();
24 virtual void WindowActivated(bool active);
25 virtual void Draw(BRect updateRect);
26 virtual void MakeFocus(bool focus = true);
27 virtual void SetEnabled(bool enabled);
28 virtual void MessageReceived(BMessage* message);
30 const BMessage* ModificationMessage() const;
31 void SetModificationMessage(BMessage* message);
33 bool IsEditable() const;
34 void SetEditable(bool editable);
36 void SetText(const char* text);
37 const char* Text() const;
38 int32 TextLength() const;
39 void GetSelection(int32* start, int32* end) const;
40 void Select(int32 start, int32 end);
41 void SelectAll();
43 bool HasFocus();
45 private:
46 void _AddAddress(const char* text);
47 void _UpdateTextViewColors();
49 private:
50 class TextView;
51 class PopUpButton;
53 TextView* fTextView;
54 PopUpButton* fPopUpButton;
55 BPopUpMenu* fRefDropMenu;
56 bool fWindowActive;
57 bool fEditable;
61 #endif // ADDRESS_TEXT_CONTROL_H