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 ConfigureActiveCBButton();
45 void ConfigureBrushToolRadioButton( );
46 void Configure2D3DRadioButton( );
47 void ConfigureBrushFormRadioButton( );
48 void ConfigureRangeBar( );
49 void ConfigureGrayLevelSld( );
50 void ConfigureBrushSizeSld( );
51 void ConfigureDistanceFillSld( );
52 void ConfigureTolFillSld( );
53 void ConfigureEditButtons( );
55 void ConnectComponents( ); //DFCH
56 void OnActive(wxCommandEvent& event);
57 void OnBrushSize( wxScrollEvent& event );
58 void OnSldGrayLevel( wxScrollEvent& event );
59 void OnCtrTxtGrayLevel( wxCommandEvent &event );
60 void On2D3D( wxCommandEvent &event );
61 void OnBrushForm( wxCommandEvent &event );
62 void OnBrushTool( wxCommandEvent &event );
63 void OnCopy( wxCommandEvent &event );
64 void OnUndo( wxCommandEvent &event );
65 void OnRedo( wxCommandEvent &event );
66 void DisableControls( );
67 void OnSldToleranceFill( wxScrollEvent& event );
68 void OnCtrTxtToleranceFill( wxCommandEvent &event );
69 void OnSldDistanceFill( wxScrollEvent& event );
70 void OnCtrTxtDistanceFill( wxCommandEvent &event );
71 void OnCtrBrushSize( wxCommandEvent &event );
72 //This method changes the min/max in the Selected Range Widget
73 //--------------------------------------------------------------------------------------------------------------------------------
74 // Min-Max Barrange received events
75 //--------------------------------------------------------------------------------------------------------------------------------
76 void onBarrange( wxCommandEvent& event );
77 void onActualChange_Bar( wxCommandEvent& event );
78 void onStartChange_Bar( wxCommandEvent& event );
79 void onEndChange_Bar( wxCommandEvent& event );
80 void onSelectionEnd( wxCommandEvent& event );
81 void onMovedBar( wxCommandEvent& event );
84 wxCheckBox *_activeCB;
85 wxStaticText *_txtBrushSize;
86 wxSlider *_sldBrushSize;
87 wxSpinCtrl *_BrushSizeCtrl;
89 wxStaticText *_txtGrayLevel;
90 wxSlider *_sldGrayLevel;
91 wxSpinCtrl *_graylevelCtrl;
92 wxRadioBox *_rbBrushForm;
94 wxRadioBox *_rbBrushTool;
96 wxStaticText *_txtToleranceFill;
97 wxSlider *_sldToleranceFill;
98 wxSpinCtrl *_tolerancefillCtrl;
100 wxStaticText *_txtDistanceFill;
101 wxSlider *_sldDistanceFill;
102 wxSpinCtrl *_distancefillCtrl;
104 mBarRange *_mBarSlices; //DFCH
105 wxButton *_btnCopy; //DFCH
106 wxButton *_btnUndo; //DFCH
107 wxButton *_btnRedo; //DFCH
109 wxFlexGridSizer *_buttonsSizer; //DFCH
110 wxFlexGridSizer *_FillSizer; //DFCH
111 wxFlexGridSizer *_gConfigSizer; //DFCH
112 wxFlexGridSizer *_brushSizer; //DFCH
118 #endif // _WX_MANUAL_PAINT_PANEL_H_