IF (BUILD_V2)
SUBDIRS(gimmick)
SUBDIRS(wxGimmick)
+ SUBDIRS(TestWxGimmickReaderDialog)
ELSE (BUILD_V2)
SUBDIRS(TestWxGimmickDialog)
ENDIF (BUILD_V2)
--- /dev/null
+SET(NAME wxGimmick)
+IF(WIN32)
+ ADD_EXECUTABLE(${NAME} WIN32 main)
+ SET_TARGET_PROPERTIES(${NAME} PROPERTIES LINK_FLAGS /subsystem:console )
+ELSE(WIN32)
+ ADD_EXECUTABLE(${NAME} main)
+ENDIF(WIN32)
+
+TARGET_LINK_LIBRARIES( ${NAME} creaImageIO2)
+
+INSTALL_TARGETS(/bin/ ${NAME} )
--- /dev/null
+#include <creaWx.h>
+#include <creaImageIOWxGimmickFrame.h>
+
+class myApp : public wxApp
+{
+public:
+ bool OnInit( );
+ int OnExit() { return true; }
+};
+
+IMPLEMENT_APP(myApp);
+
+CREA_WXMAIN_WITH_CONSOLE
+
+bool myApp::OnInit( )
+{
+ wxApp::OnInit();
+#ifdef __WXGTK__
+ //See http://www.wxwindows.org/faqgtk.htm#locale
+ setlocale(LC_NUMERIC, "C");
+#endif
+ wxInitAllImageHandlers();
+
+ /*
+ creaImageIO::SetGimmickMessageLevel(9);
+ creaImageIO::SetGimmickDebugMessageLevel(9);
+ */
+
+ int threads = 1;
+
+ creaImageIO::WxGimmickFrame* f = new
+ creaImageIO::WxGimmickFrame(0,
+ -1,
+ _T("wxGimmick! (c) CREATIS-LRMN 2008"),
+ wxDefaultPosition,
+ wxSize(1200,800),
+ threads);
+ f->Show();
+
+ return true;
+}
+
+
creaImageIOWxGimmickView
creaImageIOWxTreeView
creaImageIOWxGimmickReaderDialog
+ creaImageIOWxGimmickFrame
)
--- /dev/null
+#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
+
+
--- /dev/null
+#ifndef __creaImageIOWxGimmickFrame_h_INCLUDED__
+#define __creaImageIOWxGimmickFrame_h_INCLUDED__
+
+#ifdef USE_WXWIDGETS
+
+#include <creaImageIOWxGimmickView.h>
+#include <creaWx.h>
+
+namespace creaImageIO
+{
+ /**
+ * \ingroup GUI
+ */
+ //=====================================================================
+ //=====================================================================
+ class /*CREAIMAGEIO_EXPORT*/ WxGimmickFrame : public wxFrame
+ {
+ public:
+ WxGimmickFrame();
+ WxGimmickFrame(wxWindow *parent,
+ const wxWindowID id,
+ wxString title,
+ const wxPoint& pos,
+ const wxSize& size,
+ int threads = 0);
+
+ ~WxGimmickFrame();
+
+ // Gimmick* GetGimmick() { return mGimmick; }
+ // typedef WxGimmick ViewType;
+ // typedef WxGimmickView::EventType EventType;
+
+
+
+
+ // void OnSelChanged(EventType& event);
+ // void OnContextualMenu(EventType& event);
+ // void OnMenuTest(wxCommandEvent& event);
+ // void OnButtonOk(wxCommandEvent& event);
+ // void OnButtonCancel(wxCommandEvent& event);
+
+ // DECLARE_EVENT_TABLE();
+ private :
+
+ Gimmick* mGimmick;
+ WxGimmickView* mView;
+
+ }; // class WxGimmickFrame
+ //=====================================================================
+
+
+} // EO namespace creaImageIO
+
+
+#endif // USE_WIDGETS
+// EOF
+#endif