1 /* 2 * Copyright 2015 Haiku, Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Axel Dörfler, <axeld@pinc-software.de> 7 */ 8 #ifndef IP_ADDRESS_CONTROL_H 9 #define IP_ADDRESS_CONTROL_H 10 11 12 #include <TextControl.h> 13 14 15 class IPAddressControl : public BTextControl { 16 public: 17 IPAddressControl(int family, const char* label, 18 const char* name); 19 virtual ~IPAddressControl(); 20 21 bool AllowEmpty() const; 22 void SetAllowEmpty(bool empty); 23 24 virtual void AttachedToWindow(); 25 virtual void MessageReceived(BMessage* message); 26 27 private: 28 void _UpdateMark(); 29 30 private: 31 int fFamily; 32 bool fAllowEmpty; 33 }; 34 35 36 #endif // IP_ADDRESS_CONTROL_H 37