2 * Copyright 2015, Axel Dörfler, axeld@pinc-software.de.
3 * Distributed under the terms of the MIT License.
5 #ifndef ADDRESS_TEXT_CONTROL_H
6 #define ADDRESS_TEXT_CONTROL_H
17 class AddressTextControl
: public BControl
{
19 AddressTextControl(const char* name
,
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
);
46 void _AddAddress(const char* text
);
47 void _UpdateTextViewColors();
54 PopUpButton
* fPopUpButton
;
55 BPopUpMenu
* fRefDropMenu
;
61 #endif // ADDRESS_TEXT_CONTROL_H