1 /* 2 * Copyright 2010 Stephan Aßmus <superstippi@gmx.de> 3 * All rights reserved. Distributed under the terms of the MIT License. 4 */ 5 #ifndef URL_INPUT_GROUP_H 6 #define URL_INPUT_GROUP_H 7 8 #include <GroupView.h> 9 10 class BButton; 11 class BTextView; 12 13 14 class URLInputGroup : public BGroupView { 15 public: 16 URLInputGroup(BMessage* goMessage); 17 virtual ~URLInputGroup(); 18 19 virtual void AttachedToWindow(); 20 virtual void WindowActivated(bool active); 21 virtual void Draw(BRect updateRect); 22 virtual void MakeFocus(bool focus = true); 23 24 BTextView* TextView() const; 25 void SetText(const char* text); 26 const char* Text() const; 27 28 BButton* GoButton() const; 29 30 void SetPageIcon(const BBitmap* icon); 31 32 bool IsURLInputLocked() const; 33 virtual void LockURLInput(bool lock = true); 34 35 private: 36 class PageIconView; 37 class URLTextView; 38 39 PageIconView* fIconView; 40 URLTextView* fTextView; 41 BButton* fGoButton; 42 bool fWindowActive; 43 bool fURLLocked; 44 }; 45 46 #endif // URL_INPUT_GROUP_H 47 48