1 /* 2 * Copyright 2013-2015, Rene Gollent, rene@gollent.com. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef IMAGE_STOP_CONFIG_VIEW_H 6 #define IMAGE_STOP_CONFIG_VIEW_H 7 8 9 #include <GroupView.h> 10 11 #include "Team.h" 12 13 #include "types/Types.h" 14 15 16 class BBox; 17 class BButton; 18 class BCheckBox; 19 class BListView; 20 class BMenuField; 21 class BTextControl; 22 class ImageDebugInfo; 23 class UserInterfaceListener; 24 25 26 class ImageStopConfigView : public BGroupView, private Team::Listener { 27 public: 28 ImageStopConfigView(::Team* team, 29 UserInterfaceListener* listener); 30 31 ~ImageStopConfigView(); 32 33 static ImageStopConfigView* Create(::Team* team, 34 UserInterfaceListener* listener); 35 // throws 36 37 virtual void AttachedToWindow(); 38 virtual void MessageReceived(BMessage* message); 39 40 // Team::Listener 41 virtual void StopOnImageLoadSettingsChanged( 42 const Team::ImageLoadEvent& event); 43 virtual void StopOnImageLoadNameAdded( 44 const Team::ImageLoadNameEvent& event); 45 virtual void StopOnImageLoadNameRemoved( 46 const Team::ImageLoadNameEvent& event); 47 48 49 private: 50 void _Init(); 51 52 void _UpdateStopImageState(); 53 // must be called with team lock held 54 55 private: 56 ::Team* fTeam; 57 UserInterfaceListener* fListener; 58 BCheckBox* fStopOnImageLoad; 59 BMenuField* fStopImageConstraints; 60 BListView* fStopImageNames; 61 BTextControl* fStopImageNameInput; 62 BButton* fAddImageNameButton; 63 BButton* fRemoveImageNameButton; 64 BView* fCustomImageGroup; 65 bool fStopOnLoadEnabled; 66 bool fUseCustomImages; 67 }; 68 69 70 #endif // IMAGE_STOP_CONFIG_VIEW_H 71