1 /*# ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
9 # This software is governed by the CeCILL-B license under French law and
10 # abiding by the rules of distribution of free software. You can use,
11 # modify and/ or redistribute the software under the terms of the CeCILL-B
12 # license as circulated by CEA, CNRS and INRIA at the following URL
13 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 # or in the file LICENSE.txt.
16 # As a counterpart to the access to the source code and rights to copy,
17 # modify and redistribute granted by the license, users are provided only
18 # with a limited warranty and the software's author, the holder of the
19 # economic rights, and the successive licensors have only limited
22 # The fact that you are presently reading this means that you have had
23 # knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
26 #ifndef _WX_MANUAL_PAINT_PANEL_H_
27 #define _WX_MANUAL_PAINT_PANEL_H_
29 #include "ManualPaintPanel.h"
31 #include "mBarRange.h" //DFCH
32 #include "creaWx.h" //DFCH
35 #include <wx/spinctrl.h>
36 #include <wx/string.h>
38 class wxManualPaintPanel: public wxPanel, public ManualPaintPanel
41 wxManualPaintPanel( wxWindow * parent );
42 virtual ~wxManualPaintPanel( );
44 void ConfigureBrushToolRadioButton( );
45 void Configure2D3DRadioButton( );
46 void ConfigureBrushFormRadioButton( );
47 void ConfigureRangeBar( );
48 void ConfigureGrayLevelSld( );
49 void ConfigureBrushSizeSld( );
50 void ConfigureDistanceFillSld( );
51 void ConfigureTolFillSld( );
52 void ConfigureEditButtons( );
54 void ConnectComponents( ); //DFCH
55 void OnBrushSize( wxScrollEvent& event );
56 void OnSldGrayLevel( wxScrollEvent& event );
57 void OnCtrTxtGrayLevel( wxCommandEvent &event );
58 void On2D3D( wxCommandEvent &event );
59 void OnBrushForm( wxCommandEvent &event );
60 void OnBrushTool( wxCommandEvent &event );
61 void OnCopy( wxCommandEvent &event );
62 void OnUndo( wxCommandEvent &event );
63 void OnRedo( wxCommandEvent &event );
64 void DisableControls( );
65 void OnSldToleranceFill( wxScrollEvent& event );
66 void OnCtrTxtToleranceFill( wxCommandEvent &event );
67 void OnSldDistanceFill( wxScrollEvent& event );
68 void OnCtrTxtDistanceFill( wxCommandEvent &event );
69 void OnCtrBrushSize( wxCommandEvent &event );
70 //This method changes the min/max in the Selected Range Widget
71 //--------------------------------------------------------------------------------------------------------------------------------
72 // Min-Max Barrange received events
73 //--------------------------------------------------------------------------------------------------------------------------------
74 void onBarrange( wxCommandEvent& event );
75 void onActualChange_Bar( wxCommandEvent& event );
76 void onStartChange_Bar( wxCommandEvent& event );
77 void onEndChange_Bar( wxCommandEvent& event );
78 void onSelectionEnd( wxCommandEvent& event );
79 void onMovedBar( wxCommandEvent& event );
82 wxStaticText *_txtBrushSize;
83 wxSlider *_sldBrushSize;
84 wxSpinCtrl *_BrushSizeCtrl;
86 wxStaticText *_txtGrayLevel;
87 wxSlider *_sldGrayLevel;
88 wxSpinCtrl *_graylevelCtrl;
89 wxRadioBox *_rbBrushForm;
91 wxRadioBox *_rbBrushTool;
93 wxStaticText *_txtToleranceFill;
94 wxSlider *_sldToleranceFill;
95 wxSpinCtrl *_tolerancefillCtrl;
97 wxStaticText *_txtDistanceFill;
98 wxSlider *_sldDistanceFill;
99 wxSpinCtrl *_distancefillCtrl;
101 mBarRange * _mBarSlices; //DFCH
102 wxButton *_btnCopy; //DFCH
103 wxButton *_btnUndo; //DFCH
104 wxButton *_btnRedo; //DFCH
106 wxFlexGridSizer *_buttonsSizer; //DFCH
107 wxFlexGridSizer *_FillSizer; //DFCH
108 wxFlexGridSizer *_gConfigSizer; //DFCH
109 wxFlexGridSizer *_brushSizer; //DFCH
115 #endif // _WX_MANUAL_PAINT_PANEL_H_