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 16class BBox; 17class BButton; 18class BCheckBox; 19class BListView; 20class BMenuField; 21class BTextControl; 22class ImageDebugInfo; 23class UserInterfaceListener; 24 25 26class ImageStopConfigView : public BGroupView, private Team::Listener { 27public: 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 49private: 50 void _Init(); 51 52 void _UpdateStopImageState(); 53 // must be called with team lock held 54 55private: 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