]> Creatis software - creaImageIO.git/blob - src2/creaImageIOWxGimmickReaderDialog.h
After checking that the event goes up in the hierarchy (in win32 at least)
[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     vtkImageData* GetSelectedImage(int dim) 
42         { return mView->GetSelectedImage(dim); }
43     void GetSelectedImages(std::vector<vtkImageData*>& s, int dim)
44     { mView->GetSelectedImages(s, dim); }
45
46
47     void GetSelectedFiles(std::vector<std::string>& s) 
48     { mView->GetSelectedFiles(s); }
49     
50     void OnSelChanged(EventType& event);
51     void OnContextualMenu(EventType& event);
52     void OnMenuTest(wxCommandEvent& event);
53         void OnValid(wxCommandEvent& event);
54     //    void OnButtonOk(wxCommandEvent& event);
55     //    void OnButtonCancel(wxCommandEvent& event);
56
57     DECLARE_EVENT_TABLE()
58         
59         
60   private :
61     
62     Gimmick*       mGimmick;
63     WxGimmickView* mView;
64
65     wxButton* mOkButton;
66     wxButton* mCancelButton;
67
68     enum 
69       {
70         TVID = 1
71         //      OKID = 2,
72         //      CANCELID = 3
73       };
74
75   }; // class WxGimmickReaderDialog
76   //=====================================================================
77         
78 } // EO namespace creaImageIO
79
80
81
82 #endif // USE_WIDGETS
83 // EOF
84 #endif