1 /* 2 * Copyright 2008-2013 Haiku, Inc. All rights reserved. 3 * Distributed under the terms of the MIT license. 4 * 5 * Authors: 6 * Stephan Aßmus <superstippi@gmx.de> 7 * Axel Dörfler, axeld@pinc-software.de. 8 */ 9 #ifndef ABSTRACT_PARAMETERS_PANEL_H 10 #define ABSTRACT_PARAMETERS_PANEL_H 11 12 13 #include <LayoutBuilder.h> 14 #include <Partition.h> 15 #include <PartitionParameterEditor.h> 16 #include <Window.h> 17 18 #include "Support.h" 19 20 21 class BMenuField; 22 class BTextControl; 23 24 25 class AbstractParametersPanel : public BWindow { 26 public: 27 AbstractParametersPanel(BWindow* window); 28 virtual ~AbstractParametersPanel(); 29 30 virtual bool QuitRequested(); 31 virtual void MessageReceived(BMessage* message); 32 33 status_t Go(BString& parameters); 34 void Cancel(); 35 36 protected: 37 void Init(B_PARAMETER_EDITOR_TYPE type, 38 const BString& diskSystem, 39 BPartition* partition); 40 41 virtual void AddControls(BLayoutBuilder::Group<>& builder, 42 BView* editorView); 43 44 protected: 45 BButton* fOkButton; 46 status_t fReturnStatus; 47 48 BPartitionParameterEditor* fEditor; 49 50 private: 51 class EscapeFilter; 52 EscapeFilter* fEscapeFilter; 53 sem_id fExitSemaphore; 54 BWindow* fWindow; 55 }; 56 57 58 #endif // ABSTRACT_PARAMETERS_PANEL_H 59