00001 #ifndef CONTROL_BAR_H 00002 #define CONTROL_BAR_H 00003 00004 #include <gui/layoutview.h> 00005 #include <gui/textview.h> 00006 #include <gui/stringview.h> 00007 #include <gui/button.h> 00008 #include <util/message.h> 00009 00010 00016 class ConnectBar : public os::LayoutView 00017 { 00018 public: 00019 ConnectBar(); 00020 00021 public: 00022 00026 os::String GetHost() 00027 { 00028 return m_pcHostText->GetBuffer()[0]; 00029 } 00030 00034 void SetHost(os::String zHost) 00035 { 00036 m_pcHostText->SetValue(zHost); 00037 } 00038 00042 os::String GetUser() 00043 { 00044 return m_pcUserText->GetBuffer()[0]; 00045 } 00046 00050 void SetUser(os::String zUser) 00051 { 00052 m_pcUserText->SetValue(zUser); 00053 } 00054 00058 os::String GetPassword() 00059 { 00060 return m_pcPassText->GetBuffer()[0]; 00061 } 00062 00066 void SetPass(os::String zPass) 00067 { 00068 m_pcPassText->SetValue(zPass); 00069 } 00070 00074 int GetPort() 00075 { 00076 return atoi(m_pcPortText->GetBuffer()[0].c_str()); 00077 } 00078 00082 void SetPort(os::String zPort) 00083 { 00084 m_pcPortText->SetValue(zPort); 00085 } 00086 00087 private: 00088 00089 void _Layout(); 00090 00091 00092 //libsyllable functions 00093 os::Point GetPreferredSize(bool) const; 00094 void AllAttached(); 00095 00096 private: 00097 00099 os::HLayoutNode* m_pcRoot; 00100 00102 os::StringView* m_pcHostString; 00104 os::TextView* m_pcHostText; 00105 00107 os::StringView* m_pcUserString; 00109 os::TextView* m_pcUserText; 00110 00112 os::StringView* m_pcPassString; 00114 os::TextView* m_pcPassText; 00115 00117 os::StringView* m_pcPortString; 00119 os::TextView* m_pcPortText; 00120 00122 os::Button* m_pcButton; 00123 }; 00124 00125 #endif 00126