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 * Bryce Groff <bgroff@hawaii.edu> 9 */ 10#ifndef CREATE_PARAMS_PANEL_H 11#define CREATE_PARAMS_PANEL_H 12 13 14#include "ChangeParametersPanel.h" 15 16 17class SizeSlider; 18 19 20class CreateParametersPanel : public ChangeParametersPanel { 21public: 22 CreateParametersPanel(BWindow* window, 23 BPartition* parent, off_t offset, 24 off_t size); 25 virtual ~CreateParametersPanel(); 26 27 status_t Go(off_t& offset, off_t& size, BString& name, 28 BString& type, BString& parameters); 29 30 virtual void MessageReceived(BMessage* message); 31 32protected: 33 virtual bool NeedsEditor() const; 34 virtual status_t ParametersReceived(const BString& parameters, 35 BMessage& storage); 36 virtual void AddControls(BLayoutBuilder::Group<>& builder, 37 BView* editorView); 38 39private: 40 void _CreateCreateControls(BPartition* parent, 41 off_t offset, off_t size); 42 43 void _UpdateSizeTextControl(); 44 45private: 46 SizeSlider* fSizeSlider; 47 BTextControl* fSizeTextControl; 48}; 49 50 51#endif // CREATE_PARAMS_PANEL_H 52