+#include <creaImageIOWxGimmickFrame.h>
+#include <creaImageIOSystem.h>
+
+namespace creaImageIO
+{
+ // CTor
+ WxGimmickFrame::WxGimmickFrame(wxWindow *parent,
+ wxWindowID id,
+ wxString title,
+ const wxPoint& pos,
+ const wxSize& size,
+ int threads)
+ : wxFrame( parent,
+ id,
+ title,
+ pos,
+ size,
+ wxRESIZE_BORDER |
+ // wxSYSTEM_MENU |
+ wxCLOSE_BOX |
+ wxMAXIMIZE_BOX |
+ wxMINIMIZE_BOX |
+ wxCAPTION
+ ),
+ mGimmick(0),
+ mView(0)
+ {
+ GimmickDebugMessage(1,"WxGimmickFrame::WxGimmickFrame"
+ <<std::endl);
+ wxBoxSizer *topsizer = new wxBoxSizer(wxVERTICAL);
+
+ try {
+
+ mGimmick = new Gimmick();
+ mGimmick->Initialize();
+
+ int image_type = GIMMICK_3D_IMAGE_SELECTION;
+ mView = new WxGimmickView(mGimmick,
+ this,
+ -1,
+ wxDefaultPosition,
+ size,
+ image_type,
+ threads);
+ mView->Initialize();
+ }
+ catch (crea::Exception e)
+ {
+ e.Print();
+ return;
+ }
+
+ topsizer->Add( mView,1,wxGROW,0);
+
+ SetSizer( topsizer );
+ Layout();
+ }
+
+ /// Destructor
+ WxGimmickFrame::~WxGimmickFrame()
+ {
+ GimmickDebugMessage(1,"WxGimmickFrame::~WxGimmickFrame"
+ <<std::endl);
+ if (mView)
+ {
+ delete mView;
+ }
+ if (mGimmick)
+ {
+ mGimmick->Finalize();
+ delete mGimmick;
+ }
+ }
+
+
+ //================================================================
+ // BEGIN_EVENT_TABLE(WxGimmickFrame, wxDialog)
+ // END_EVENT_TABLE()
+ //================================================================
+
+
+} // EO namespace creaImageIO
+
+