]> Creatis software - creaMaracasVisu.git/commitdiff
DFCH: ManualPain GUI Cleaned with some new features. :)
authorDiego Caceres <Diego.Caceres@creatis.insa-lyon.fr>
Tue, 22 Nov 2011 16:32:15 +0000 (16:32 +0000)
committerDiego Caceres <Diego.Caceres@creatis.insa-lyon.fr>
Tue, 22 Nov 2011 16:32:15 +0000 (16:32 +0000)
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/wxManualPaintPanel.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/wxManualPaintPanel.h

index 58f644d0102170082bd5fed2b96d1b6031e96b30..2ae9cf5dd2066fb282be810b96105e70d159224e 100644 (file)
 wxManualPaintPanel::wxManualPaintPanel( wxWindow * parent )
                : wxPanel( parent, -1 )
 {
-       wxPanel *panel = this;
-       wxSizer *sizer = NULL;
+       wxSizer *sizer = new wxFlexGridSizer( 1 );
 
        // Widget interface
-       wxStaticText *tittleText = new wxStaticText( panel, -1,
+       wxStaticText *tittleText = new wxStaticText( this, -1,
                _T("             Manual Paint") );
-       _txtBrushSize = new wxStaticText( panel, -1,
-               wxString( _T("  Brush size  ") ) );
-       _sldBrushSize = new wxSlider( panel, -1, 1, 1, 20, wxDefaultPosition,
-               wxDefaultSize, wxSL_LABELS );
-       wxStaticText *txtGrayLevel = new wxStaticText( panel, -1,
-               wxString( _T("  Gray Level  ") ) );
-       _sldGrayLevel = new wxSlider( panel, -1, 0, 0, 50, wxDefaultPosition,
-               wxDefaultSize, wxSL_LABELS );
-       _graylevelCtrl = new wxTextCtrl( panel, -1 );
-       _txtToleranceFill = new wxStaticText( panel, -1,
-               wxString( _T("  Tolerance fill  ") ) );
-       _sldToleranceFill = new wxSlider( panel, -1, 50, 0, 50, wxDefaultPosition,
-               wxDefaultSize, wxSL_LABELS );
-       _tolerancefillCtrl = new wxTextCtrl( panel, -1, _T("50") );
-       _txtDistanceFill = new wxStaticText( panel, -1,
-               wxString( _T("  Distance fill  ") ) );
-       _sldDistanceFill = new wxSlider( panel, -1, 500, 1, 500, wxDefaultPosition,
-               wxDefaultSize, wxSL_LABELS );
-       _distancefillCtrl = new wxTextCtrl( panel, -1, _T("500") );
+       //Title
+       sizer->Add( tittleText );
+       //giving some blank spaces
+       sizer->Add( new wxStaticText( this, -1, _T("             ") ) );
+
+       this->ConfigureBrushToolRadioButton( );
+       this->Configure2D3DRadioButton( );
+       this->ConfigureBrushFormRadioButton( );
+       this->ConfigureRangeBar( );
+       this->ConfigureGrayLevelSld( );
+       this->ConfigureBrushSizeSld( );
+       this->ConfigureDistanceFillSld( );
+       this->ConfigureTolFillSld( );
+       this->ConfigureEditButtons( );
+
+       //Buttons
+       wxStaticText *editButtonsText = new wxStaticText( this, -1,
+               _T("Edit Buttons") );
+       sizer->Add( editButtonsText );
+       this->_buttonsSizer = new wxFlexGridSizer( 4 );
+       this->_buttonsSizer->Add( _btnUndo, 1, wxGROW );
+       this->_buttonsSizer->Add( _btnRedo, 1, wxGROW );
+       this->_buttonsSizer->Add( _btnCopy, 1, wxGROW );
+
+       this->_gConfigSizer = new wxFlexGridSizer( 1 );
+       //BrushTool Radio Button
+       //giving blank space
+       this->_gConfigSizer->Add(
+               new wxStaticText( this, -1, _T("             ") ) );
+       //end of blank space
+       this->_gConfigSizer->Add( _rbBrushTool, 1, wxGROW );
+       //2D/3D Radio Button
+       this->_gConfigSizer->Add( _rb2D3D, 1, wxGROW );
+       //RangeBar
+       this->_gConfigSizer->Add(
+               new wxStaticText( this, -1, _T( "Select Range" ) ), 1, wxGROW );
+       this->_gConfigSizer->Add( _mBarSlices, 1, wxGROW );
+       //GrayLevel Slider
+       this->_gConfigSizer->Add( _txtGrayLevel );
+       wxFlexGridSizer *sizerGrayLevel = new wxFlexGridSizer( 2, wxHORIZONTAL );
+       sizerGrayLevel->Add( _sldGrayLevel, 1, wxGROW );
+       sizerGrayLevel->Add( _graylevelCtrl, 1,
+               wxALIGN_BOTTOM | wxALIGN_LEFT | wxALL, 5 );
+       this->_gConfigSizer->Add( sizerGrayLevel, 1, wxGROW );
+
+       //Brush
+       this->_brushSizer = new wxFlexGridSizer( 1 );
+       //giving blank space
+       this->_brushSizer->Add( new wxStaticText( this, -1, _T("             ") ) );
+       //end of blank space
+       this->_brushSizer->Add(
+               new wxStaticText( this, -1, _T("Brush Settings") ) );
+       //BrushSize Slider
+       this->_brushSizer->Add( _txtBrushSize );
+       wxFlexGridSizer *sizersdlBrushSize = new wxFlexGridSizer( 2, wxHORIZONTAL );
+       sizersdlBrushSize->Add( _sldBrushSize, 1, wxGROW );
+       sizersdlBrushSize->Add( _BrushSizeCtrl, 1,
+               wxALIGN_BOTTOM | wxALIGN_LEFT | wxALL, 5 );
+       this->_brushSizer->Add( sizersdlBrushSize );
+       //BrushForm RadioButton
+       this->_brushSizer->Add( _rbBrushForm, 1, wxGROW );
+       //Fill
+       this->_FillSizer = new wxFlexGridSizer( 1 );
+       //giving blank space
+       this->_FillSizer->Add( new wxStaticText( this, -1, _T("             ") ) );
+       //end of blank space
+       this->_FillSizer->Add( new wxStaticText( this, -1, _T("Fill Settings") ) );
+       //ToleranceFill
+       this->_FillSizer->Add( _txtToleranceFill );
+       wxFlexGridSizer *sizerTolerance = new wxFlexGridSizer( 2 );
+       sizerTolerance->Add( _sldToleranceFill, 1, wxGROW );
+       sizerTolerance->Add( _tolerancefillCtrl, 1,
+               wxALIGN_BOTTOM | wxALIGN_LEFT | wxALL, 5 );
+       this->_FillSizer->Add( sizerTolerance, 1, wxGROW );
+       //Distance Fill
+       this->_FillSizer->Add( _txtDistanceFill );
+       wxFlexGridSizer *sizerDistance = new wxFlexGridSizer( 2 );
+       sizerDistance->Add( _sldDistanceFill, 1, wxGROW );
+       sizerDistance->Add( _distancefillCtrl, 1,
+               wxALIGN_BOTTOM | wxALIGN_LEFT | wxALL, 5 );
+       this->_FillSizer->Add( sizerDistance );
+
+       sizer->Add( _buttonsSizer );
+       sizer->Add( _gConfigSizer );
+       sizer->Add( _brushSizer );
+       sizer->Add( _FillSizer );
+
+       this->ConnectComponents( ); //DFCH
+       this->_FillSizer->Show( false );
+
+       this->SetSizer( sizer );
+       this->SetAutoLayout( true );
+       this->Layout( );
+
+}
+
+//---------------------------------------------------------------------------
+wxManualPaintPanel::~wxManualPaintPanel( )
+{
+}
+
+//--------------------------------------------------------------------------
+
+//Panel Config
+void wxManualPaintPanel::ConfigureBrushToolRadioButton( )
+{
+       wxString lstBrushForm[ 2 ];
+       lstBrushForm[ 0 ] = _T("rectangle/cube");
+       lstBrushForm[ 1 ] = _T("circle/sphere");
+       _rbBrushForm = new wxRadioBox( this, -1, _T("Brush form"),
+               wxDefaultPosition, wxSize( 270, 45 ), 2, lstBrushForm, 2,
+               wxRA_SPECIFY_COLS );
+}
+//--------------------------------------------------------------------------
+void wxManualPaintPanel::Configure2D3DRadioButton( )
+{
+       wxString lst2D3D[ 2 ];
+       lst2D3D[ 0 ] = _T("2D");
+       lst2D3D[ 1 ] = _T("3D");
+       _rb2D3D = new wxRadioBox( this, -1, _T("2D / 3D"), wxDefaultPosition,
+               wxSize( 270, 45 ), 2, lst2D3D, 2, wxRA_SPECIFY_COLS );
+       _rb2D3D->SetSelection( 1 );
+
+}
+
+//--------------------------------------------------------------------------
+void wxManualPaintPanel::ConfigureBrushFormRadioButton( )
+{
+       wxString lstBrushTool[ 2 ];
+       lstBrushTool[ 0 ] = _T("Brush");
+       lstBrushTool[ 1 ] = _T("Fill");
+       _rbBrushTool = new wxRadioBox( this, -1, _T("Brush tool"),
+               wxDefaultPosition, wxSize( 270, 45 ), 2, lstBrushTool, 2,
+               wxRA_SPECIFY_COLS );
+}
+
+//--------------------------------------------------------------------------
+void wxManualPaintPanel::ConfigureRangeBar( )
+{
        //DFCH -- BarSlices
        double range[ 2 ];
        GetScalarRange( range );
        int min = 0; //range[0];
        int max = 6000; //range[1];
-       _mBarSlices = new mBarRange( panel, 70, 65 );
+       _mBarSlices = new mBarRange( this, 70, 65 );
        _mBarSlices->SetMin( 0 );
        _mBarSlices->SetStart( 0 );
        _mBarSlices->SetOrientation( true );
@@ -48,104 +167,73 @@ wxManualPaintPanel::wxManualPaintPanel( wxWindow * parent )
        _mBarSlices->SetEnd( max );
        _mBarSlices->Update( );
        //DFCH -- End BarSlices
-
-       wxString lst2D3D[ 2 ];
-       lst2D3D[ 0 ] = _T("2D");
-       lst2D3D[ 1 ] = _T("3D");
-       _rb2D3D = new wxRadioBox( panel, -1, _T("2D / 3D"), wxDefaultPosition,
-               wxSize( 270, 45 ), 2, lst2D3D, 2, wxRA_SPECIFY_COLS );
-       _rb2D3D->SetSelection( 1 );
-
-       wxString lstBrushForm[ 2 ];
-       lstBrushForm[ 0 ] = _T("rectangle/cube");
-       lstBrushForm[ 1 ] = _T("circle/sphere");
-       _rbBrushForm = new wxRadioBox( panel, -1, _T("Brush form"),
-               wxDefaultPosition, wxSize( 270, 45 ), 2, lstBrushForm, 2,
-               wxRA_SPECIFY_COLS );
-
-       _txtToleranceFill->Disable( );
-       _sldToleranceFill->Disable( );
-       _tolerancefillCtrl->Disable( );
-
+}
+//--------------------------------------------------------------------------
+void wxManualPaintPanel::ConfigureGrayLevelSld( )
+{
+       _txtGrayLevel = new wxStaticText( this, -1,
+               wxString( _T("  Gray Level  ") ) );
+       _sldGrayLevel = new wxSlider( this, -1, 0, 0, 50, wxDefaultPosition,
+               wxDefaultSize, wxSL_LABELS );
+       _sldGrayLevel->SetMinSize( wxSize( 200, -1 ) );
+       _sldGrayLevel->SetMaxSize( wxSize( 200, -1 ) );
+       _graylevelCtrl = new wxSpinCtrl( this, wxID_ANY, wxEmptyString,
+               wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 50, 0 );
+}
+//--------------------------------------------------------------------------
+void wxManualPaintPanel::ConfigureBrushSizeSld( )
+{
+       _txtBrushSize = new wxStaticText( this, -1,
+               wxString( _T("  Brush size  ") ) );
+       _sldBrushSize = new wxSlider( this, -1, 1, 1, 20, wxDefaultPosition,
+               wxDefaultSize, wxSL_LABELS );
+       _BrushSizeCtrl = new wxSpinCtrl( this, wxID_ANY, wxEmptyString,
+               wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 20, 0 );
+       _sldBrushSize->SetMinSize( wxSize( 200, -1 ) );
+       _sldBrushSize->SetMaxSize( wxSize( 200, -1 ) );
+}
+//--------------------------------------------------------------------------
+void wxManualPaintPanel::ConfigureDistanceFillSld( )
+{
+       _txtDistanceFill = new wxStaticText( this, -1,
+               wxString( _T("  Distance fill  ") ) );
+       _sldDistanceFill = new wxSlider( this, -1, 500, 1, 500, wxDefaultPosition,
+               wxDefaultSize, wxSL_LABELS );
+       _sldDistanceFill->SetMinSize( wxSize( 200, -1 ) );
+       _sldDistanceFill->SetMaxSize( wxSize( 200, -1 ) );
+       _distancefillCtrl = new wxSpinCtrl( this, wxID_ANY, wxEmptyString,
+               wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 500, 500 );
        _txtDistanceFill->Disable( );
        _sldDistanceFill->Disable( );
        _distancefillCtrl->Disable( );
-
-       wxString lstBrushTool[ 2 ];
-       lstBrushTool[ 0 ] = _T("Brush");
-       lstBrushTool[ 1 ] = _T("Fill");
-       _rbBrushTool = new wxRadioBox( panel, -1, _T("Brush tool"),
-               wxDefaultPosition, wxSize( 270, 45 ), 2, lstBrushTool, 2,
-               wxRA_SPECIFY_COLS );
-
-       _btnCopy = new wxButton( panel, -1, _T("Copy") );
-       _btnCopy->Disable( );
-       _btnUndo = new wxButton( panel, -1, _T("Undo") );
-       _btnRedo = new wxButton( panel, -1, _T("Redo") );
-       //btnUndo->Disable();
-
-       wxFlexGridSizer *sizer1 = new wxFlexGridSizer( 1 );
-
-       sizer1->Add( new wxStaticText( panel, -1, _T("  ") ) );
-       sizer1->Add( tittleText );
-
-       sizer1->Add( new wxStaticText( panel, -1, _T("  ") ) );
-       sizer1->Add( _rbBrushTool, 1, wxGROW );
-
-       wxFlexGridSizer *sizerGrayLevel = new wxFlexGridSizer( 2 );
-       sizerGrayLevel->Add( txtGrayLevel );
-       sizerGrayLevel->Add( _graylevelCtrl );
-       sizer1->Add( sizerGrayLevel, 1, wxGROW );
-       sizer1->Add( _sldGrayLevel, 1, wxGROW );
-
-       sizer1->Add( new wxStaticText( this, -1, _T( "Select Range" ) ), 1,
-               wxGROW );
-       sizer1->Add( _mBarSlices, 1, wxGROW );
-
-       sizer1->Add( new wxStaticText( panel, -1, _T("  ") ) );
-       sizer1->Add( _rb2D3D, 1, wxGROW );
-
-       sizer1->Add( new wxStaticText( panel, -1, _T("  ") ) );
-       sizer1->Add( _txtBrushSize );
-       sizer1->Add( _sldBrushSize, 1, wxGROW );
-
-       sizer1->Add( new wxStaticText( panel, -1, _T("  ") ) );
-       sizer1->Add( _rbBrushForm, 1, wxGROW );
-
-       wxFlexGridSizer *sizerTolerance = new wxFlexGridSizer( 2 );
-       sizerTolerance->Add( _txtToleranceFill );
-       sizerTolerance->Add( _tolerancefillCtrl );
-       sizer1->Add( sizerTolerance );
-       sizer1->Add( _sldToleranceFill, 1, wxGROW );
-
-       wxFlexGridSizer *sizerDistance = new wxFlexGridSizer( 2 );
-       sizerDistance->Add( _txtDistanceFill );
-       sizerDistance->Add( _distancefillCtrl );
-       sizer1->Add( sizerDistance );
-       sizer1->Add( _sldDistanceFill, 1, wxGROW );
-
-       sizer1->Add( new wxStaticText( panel, -1, _T("  ") ) );
-       sizer1->Add( _btnCopy, 1, wxGROW );
-       sizer1->Add( new wxStaticText( panel, -1, _T("  ") ) );
-       sizer1->Add( _btnUndo, 1, wxGROW );
-       sizer1->Add( _btnRedo, 1, wxGROW );
-
-       sizer = sizer1;
-
-       this->ConnectComponents( ); //DFCH
-
-       panel->SetSizer( sizer );
-       panel->SetAutoLayout( true );
-       panel->Layout( );
-
 }
+//--------------------------------------------------------------------------
+void wxManualPaintPanel::ConfigureTolFillSld( )
+{
+       _txtToleranceFill = new wxStaticText( this, -1,
+               wxString( _T("  Tolerance fill  ") ) );
+       _sldToleranceFill = new wxSlider( this, -1, 50, 0, 50, wxDefaultPosition,
+               wxDefaultSize, wxSL_LABELS );
+       _sldToleranceFill->SetMinSize( wxSize( 200, -1 ) );
+       _sldToleranceFill->SetMaxSize( wxSize( 200, -1 ) );
+       _tolerancefillCtrl = new wxSpinCtrl( this, wxID_ANY, wxEmptyString,
+               wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 50, 50 );
+       _txtToleranceFill->Disable( );
+       _sldToleranceFill->Disable( );
+       _tolerancefillCtrl->Disable( );
 
-//---------------------------------------------------------------------------
-wxManualPaintPanel::~wxManualPaintPanel( )
+}
+//--------------------------------------------------------------------------
+void wxManualPaintPanel::ConfigureEditButtons( )
 {
+       _btnCopy = new wxButton( this, -1, _T("Copy") );
+       _btnCopy->Disable( );
+       _btnUndo = new wxButton( this, -1, _T("Undo") );
+       _btnRedo = new wxButton( this, -1, _T("Redo") );
+       //btnUndo->Disable();
 }
-
 //--------------------------------------------------------------------------
+
 /*
  * The following function allows the management of the events
  */
@@ -244,12 +332,22 @@ void wxManualPaintPanel::ConnectComponents( ) //DFCH
                                _mBarSlices->GetId(),
                                wxEVT_TSBAR_MOVED,
                                (wxObjectEventFunction) (wxCommandEventFunction) &wxManualPaintPanel::onMovedBar);
+               this->Connect
+               (
+                               _BrushSizeCtrl->GetId(),
+                               wxEVT_COMMAND_TEXT_UPDATED,
+                               (wxObjectEventFunction) (void(wxPanel::*)(
+                                                               wxCommandEvent&)) &wxManualPaintPanel::OnCtrBrushSize);
+
        }
 
 //---------------------------------------------------------------------------
 void wxManualPaintPanel::OnBrushSize( wxScrollEvent& event )
 {
-       SetBrushSize( _sldBrushSize->GetValue( ) );
+       SetBrushSize( this->_sldBrushSize->GetValue( ) );
+       wxString text;
+       text.Printf( wxT("%d"), this->_sldBrushSize->GetValue( ) );
+       _BrushSizeCtrl->SetValue( text );
 }
 
 //---------------------------------------------------------------------------
@@ -265,12 +363,9 @@ void wxManualPaintPanel::OnSldGrayLevel( wxScrollEvent& event )
 //---------------------------------------------------------------------------
 void wxManualPaintPanel::OnCtrTxtGrayLevel( wxCommandEvent &event )
 {
-       double graylevel;
-       wxString text = _graylevelCtrl->GetValue( );
-       if( text.ToDouble( &graylevel ) )
-       {
-               SetGrayLevel( graylevel );
-       }
+       int graylevel = this->_graylevelCtrl->GetValue( );
+       this->_sldGrayLevel->SetValue( graylevel );
+       SetGrayLevel( graylevel );
 }
 
 //---------------------------------------------------------------------------
@@ -286,12 +381,16 @@ void wxManualPaintPanel::OnSldDistanceFill( wxScrollEvent& event )
 //---------------------------------------------------------------------------
 void wxManualPaintPanel::OnCtrTxtDistanceFill( wxCommandEvent &event )
 {
-       double distancefill;
-       wxString text = _distancefillCtrl->GetValue( );
-       if( text.ToDouble( &distancefill ) )
-       {
-               SetDistanceFill( distancefill );
-       }
+       int distancefill = this->_distancefillCtrl->GetValue( );
+       this->_sldDistanceFill->SetValue( distancefill );
+       SetDistanceFill( distancefill );
+}
+//---------------------------------------------------------------------------
+void wxManualPaintPanel::OnCtrBrushSize( wxCommandEvent &event )
+{
+       int brushSize = _BrushSizeCtrl->GetValue( );
+       this->_sldBrushSize->SetValue( brushSize );
+       SetBrushSize( brushSize );
 }
 
 //---------------------------------------------------------------------------
@@ -307,12 +406,9 @@ void wxManualPaintPanel::OnSldToleranceFill( wxScrollEvent& event )
 //---------------------------------------------------------------------------
 void wxManualPaintPanel::OnCtrTxtToleranceFill( wxCommandEvent &event )
 {
-       double tolerance;
-       wxString text = _tolerancefillCtrl->GetValue( );
-       if( text.ToDouble( &tolerance ) )
-       {
-               SetToleranceFill( tolerance );
-       }
+       int tolerance = _tolerancefillCtrl->GetValue( );
+       this->_sldToleranceFill->SetValue( tolerance );
+       SetToleranceFill( tolerance );
 }
 
 //---------------------------------------------------------------------------
@@ -354,6 +450,9 @@ void wxManualPaintPanel::OnBrushTool( wxCommandEvent &event )
                _txtBrushSize->Enable( );
                _sldBrushSize->Enable( );
                _rbBrushForm->Enable( );
+               _brushSizer->Show( true );
+               _FillSizer->Show( false );
+               this->Layout( );
        }
 
        if( _rbBrushTool->GetSelection( ) == 1 ) //Fill tool
@@ -365,6 +464,9 @@ void wxManualPaintPanel::OnBrushTool( wxCommandEvent &event )
                _txtDistanceFill->Enable( );
                _sldDistanceFill->Enable( );
                _distancefillCtrl->Enable( );
+               _FillSizer->Show( true );
+               _brushSizer->Show( false );
+               this->Layout( );
        }
 }
 
index 230f9aba1241b4892fe97c042bb13ac9d2473b6a..8b377ada38b9ecd9d00a012b979c60106be38fd8 100644 (file)
@@ -7,61 +7,82 @@
 #include "creaWx.h" //DFCH
 #include <wx/wx.h>
 #include <wx/panel.h>
+#include <wx/spinctrl.h>
+#include <wx/string.h>
 
-class wxManualPaintPanel: public wxPanel, public ManualPaintPanel {
+class wxManualPaintPanel: public wxPanel, public ManualPaintPanel
+{
 public:
-       wxManualPaintPanel(wxWindow * parent);
-       virtual ~wxManualPaintPanel();
+       wxManualPaintPanel( wxWindow * parent );
+       virtual ~wxManualPaintPanel( );
+       //Panel Config
+       void ConfigureBrushToolRadioButton( );
+       void Configure2D3DRadioButton( );
+       void ConfigureBrushFormRadioButton( );
+       void ConfigureRangeBar( );
+       void ConfigureGrayLevelSld( );
+       void ConfigureBrushSizeSld( );
+       void ConfigureDistanceFillSld( );
+       void ConfigureTolFillSld( );
+       void ConfigureEditButtons( );
        //Events
-       void ConnectComponents(); //DFCH
-       void OnBrushSize(wxScrollEvent& event);
-       void OnSldGrayLevel(wxScrollEvent& event);
-       void OnCtrTxtGrayLevel(wxCommandEvent &event);
-       void On2D3D(wxCommandEvent &event);
-       void OnBrushForm(wxCommandEvent &event);
-       void OnBrushTool(wxCommandEvent &event);
-       void OnCopy(wxCommandEvent &event);
-       void OnUndo(wxCommandEvent &event);
-       void OnRedo(wxCommandEvent &event);
-       void DisableControls();
-       void OnSldToleranceFill(wxScrollEvent& event);
-       void OnCtrTxtToleranceFill(wxCommandEvent &event);
-       void OnSldDistanceFill(wxScrollEvent& event);
-       void OnCtrTxtDistanceFill(wxCommandEvent &event);
+       void ConnectComponents( ); //DFCH
+       void OnBrushSize( wxScrollEvent& event );
+       void OnSldGrayLevel( wxScrollEvent& event );
+       void OnCtrTxtGrayLevel( wxCommandEvent &event );
+       void On2D3D( wxCommandEvent &event );
+       void OnBrushForm( wxCommandEvent &event );
+       void OnBrushTool( wxCommandEvent &event );
+       void OnCopy( wxCommandEvent &event );
+       void OnUndo( wxCommandEvent &event );
+       void OnRedo( wxCommandEvent &event );
+       void DisableControls( );
+       void OnSldToleranceFill( wxScrollEvent& event );
+       void OnCtrTxtToleranceFill( wxCommandEvent &event );
+       void OnSldDistanceFill( wxScrollEvent& event );
+       void OnCtrTxtDistanceFill( wxCommandEvent &event );
+       void OnCtrBrushSize( wxCommandEvent &event );
        //This method changes the min/max in the Selected Range Widget
        //--------------------------------------------------------------------------------------------------------------------------------
        // Min-Max Barrange received events
        //--------------------------------------------------------------------------------------------------------------------------------
-       void onBarrange(wxCommandEvent& event);
-       void onActualChange_Bar(wxCommandEvent& event);
-       void onStartChange_Bar(wxCommandEvent& event);
-       void onEndChange_Bar(wxCommandEvent& event);
-       void onSelectionEnd(wxCommandEvent& event);
-       void onMovedBar(wxCommandEvent& event);
+       void onBarrange( wxCommandEvent& event );
+       void onActualChange_Bar( wxCommandEvent& event );
+       void onStartChange_Bar( wxCommandEvent& event );
+       void onEndChange_Bar( wxCommandEvent& event );
+       void onSelectionEnd( wxCommandEvent& event );
+       void onMovedBar( wxCommandEvent& event );
 
 private:
        wxStaticText *_txtBrushSize;
        wxSlider *_sldBrushSize;
+       wxSpinCtrl *_BrushSizeCtrl;
 
+       wxStaticText *_txtGrayLevel;
        wxSlider *_sldGrayLevel;
-       wxTextCtrl *_graylevelCtrl;
+       wxSpinCtrl *_graylevelCtrl;
        wxRadioBox *_rbBrushForm;
        wxRadioBox *_rb2D3D;
        wxRadioBox *_rbBrushTool;
 
        wxStaticText *_txtToleranceFill;
        wxSlider *_sldToleranceFill;
-       wxTextCtrl *_tolerancefillCtrl;
+       wxSpinCtrl *_tolerancefillCtrl;
 
        wxStaticText *_txtDistanceFill;
        wxSlider *_sldDistanceFill;
-       wxTextCtrl *_distancefillCtrl;
+       wxSpinCtrl *_distancefillCtrl;
 
        mBarRange * _mBarSlices; //DFCH
        wxButton *_btnCopy; //DFCH
        wxButton *_btnUndo; //DFCH
        wxButton *_btnRedo; //DFCH
 
+       wxFlexGridSizer *_buttonsSizer; //DFCH
+       wxFlexGridSizer *_FillSizer; //DFCH
+       wxFlexGridSizer *_gConfigSizer; //DFCH
+       wxFlexGridSizer *_brushSizer; //DFCH
+
 protected:
 
 };