]> Creatis software - creaImageIO.git/blob - src2/creaImageIOWxGimmickReaderDialog.h
memory leak tracking
[creaImageIO.git] / src2 / creaImageIOWxGimmickReaderDialog.h
1 #ifndef __creaImageIOWxGimmickReaderDialog_h_INCLUDED__
2 #define __creaImageIOWxGimmickReaderDialog_h_INCLUDED__
3
4 #ifdef USE_WXWIDGETS
5
6 #include <creaImageIOWxGimmickView.h>
7 #include <creaWx.h>
8 #include "wx/wx.h"
9 namespace creaImageIO
10 {
11   /**
12    * \ingroup GUI
13    */
14
15   //=====================================================================
16  //=====================================================================
17   class CREAIMAGEIO_EXPORT  WxGimmickReaderDialog : public wxDialog
18   {
19   public:
20     WxGimmickReaderDialog();
21     WxGimmickReaderDialog(wxWindow *parent,
22                           const wxWindowID id,
23                           wxString title,
24                           const wxPoint& pos,
25                           const wxSize& size,
26                           int image_min_dim = GIMMICK_2D_IMAGE_SELECTION,
27                           int image_max_dim = GIMMICK_3D_IMAGE_SELECTION,
28                           int output_dim = NATIVE,
29                           int threads = 0);
30
31     Gimmick* GetGimmick() { return mGimmick; }
32     //    typedef WxGimmick ViewType;
33     typedef WxGimmickView::EventType EventType;
34
35     ~WxGimmickReaderDialog();
36
37
38         //===============================================================================================
39         //Image Selection
40         //===============================================================================================
41
42     void GetSelectedImages(std::vector<vtkImageData*>& s, int dim)
43     { mView->GetSelectedImages(s, dim); }
44
45
46     void GetSelectedFiles(std::vector<std::string>& s) 
47     { mView->GetSelectedFiles(s); }
48     
49     void OnSelChanged(EventType& event);
50     void OnContextualMenu(EventType& event);
51     void OnMenuTest(wxCommandEvent& event);
52     void OnValid(bool valid);
53     void OnExit(){ mView->StopPlayer(); }
54     // void OnButtonOk(wxCommandEvent& event);
55     // void OnButtonCancel(wxCommandEvent& event);
56
57   private :
58     
59           Gimmick*      mGimmick;
60     WxGimmickView* mView;
61
62     wxButton* mOkButton;
63     wxButton* mCancelButton;
64         
65
66     enum 
67       {
68         TVID = 1
69         //      OKID = 2,
70         //      CANCELID = 3
71       };
72
73   }; // class WxGimmickReaderDialog
74   //=====================================================================
75         
76 } // EO namespace creaImageIO
77
78
79
80 #endif // USE_WIDGETS
81 // EOF
82 #endif