]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/wxManualPaintPanel.h
Support #1768 CREATIS Licence insertion
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / manualPaint / wxManualPaintPanel.h
1 /*# ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
4 #                        pour la Sant�)
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
8 #
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.
15 #
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
20 #  liability.
21 #
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 # ------------------------------------------------------------------------ */
25
26 #ifndef _WX_MANUAL_PAINT_PANEL_H_
27 #define _WX_MANUAL_PAINT_PANEL_H_
28
29 #include "ManualPaintPanel.h"
30
31 #include "mBarRange.h" //DFCH
32 #include "creaWx.h" //DFCH
33 #include <wx/wx.h>
34 #include <wx/panel.h>
35 #include <wx/spinctrl.h>
36 #include <wx/string.h>
37
38 class wxManualPaintPanel: public wxPanel, public ManualPaintPanel
39 {
40 public:
41         wxManualPaintPanel( wxWindow * parent );
42         virtual ~wxManualPaintPanel( );
43         //Panel Config
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( );
53         //Events
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 );
80
81 private:
82         wxStaticText *_txtBrushSize;
83         wxSlider *_sldBrushSize;
84         wxSpinCtrl *_BrushSizeCtrl;
85
86         wxStaticText *_txtGrayLevel;
87         wxSlider *_sldGrayLevel;
88         wxSpinCtrl *_graylevelCtrl;
89         wxRadioBox *_rbBrushForm;
90         wxRadioBox *_rb2D3D;
91         wxRadioBox *_rbBrushTool;
92
93         wxStaticText *_txtToleranceFill;
94         wxSlider *_sldToleranceFill;
95         wxSpinCtrl *_tolerancefillCtrl;
96
97         wxStaticText *_txtDistanceFill;
98         wxSlider *_sldDistanceFill;
99         wxSpinCtrl *_distancefillCtrl;
100
101         mBarRange * _mBarSlices; //DFCH
102         wxButton *_btnCopy; //DFCH
103         wxButton *_btnUndo; //DFCH
104         wxButton *_btnRedo; //DFCH
105
106         wxFlexGridSizer *_buttonsSizer; //DFCH
107         wxFlexGridSizer *_FillSizer; //DFCH
108         wxFlexGridSizer *_gConfigSizer; //DFCH
109         wxFlexGridSizer *_brushSizer; //DFCH
110
111 protected:
112
113 };
114
115 #endif // _WX_MANUAL_PAINT_PANEL_H_