1 /* 2 * Copyright 2016, Rene Gollent, rene@gollent.com. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef CONNECTION_CONFIG_WINDOW_H 6 #define CONNECTION_CONFIG_WINDOW_H 7 8 #include <Window.h> 9 10 #include "ConnectionConfigView.h" 11 12 13 class BButton; 14 class BGroupView; 15 class BMenu; 16 class BMenuField; 17 class Settings; 18 class TargetHostInterfaceInfo; 19 20 21 class ConnectionConfigWindow : public BWindow, 22 private ConnectionConfigView::Listener 23 { 24 public: 25 ConnectionConfigWindow(); 26 27 ~ConnectionConfigWindow(); 28 29 static ConnectionConfigWindow* Create(); 30 // throws 31 32 33 virtual void MessageReceived(BMessage* message); 34 35 virtual void Show(); 36 37 virtual bool QuitRequested(); 38 39 // ConnectionConfigView::Listener 40 41 virtual void ConfigurationChanged(Settings* settings); 42 43 private: 44 void _Init(); 45 BMenu* _BuildTypeMenu(); 46 void _UpdateActiveConfig( 47 TargetHostInterfaceInfo* info); 48 49 private: 50 BMenuField* fConnectionTypeField; 51 BGroupView* fConfigGroupView; 52 BButton* fCloseButton; 53 BButton* fConnectButton; 54 Settings* fCurrentSettings; 55 TargetHostInterfaceInfo* 56 fActiveInfo; 57 }; 58 59 #endif // CONNECTION_CONFIG_WINDOW_H 60