diff src/kaigo/horori/alloc/alloc.h @ 45:20b42e2deae1

add alloc, (new)mover, merger & (new)searcher.
author pyon@macmini
date Thu, 16 Apr 2020 20:59:35 +0900
parents
children 0369656be06c
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/kaigo/horori/alloc/alloc.h	Thu Apr 16 20:59:35 2020 +0900
@@ -0,0 +1,66 @@
+// Filename   : alloc.h
+// Last Change: 2020-04-16 –Ø 12:22:39.
+//
+#pragma once
+
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/string.h>
+#include <wx/stattext.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/filepicker.h>
+#include <wx/bitmap.h>
+#include <wx/image.h>
+#include <wx/icon.h>
+#include <wx/button.h>
+#include <wx/sizer.h>
+#include <wx/frame.h>
+#include <wx/dnd.h>
+
+class AllocFrame : public wxFrame
+{
+	private:
+
+	protected:
+		wxStaticText*     m_staticTextPdf;
+		wxFilePickerCtrl* m_filePickerPdf1;
+		wxFilePickerCtrl* m_filePickerPdf2;
+		wxStaticText*     m_staticTextTif;
+		wxDirPickerCtrl*  m_dirPickerTif;
+		wxStaticText*     m_staticTextWork;
+		wxDirPickerCtrl*  m_dirPickerWork;
+		wxButton*         m_buttonAlloc;
+
+		virtual void OnAlloc(wxCommandEvent& event);
+		void CreateControls();
+		void InitializeControlsValue();
+		void Pdf2Tif();
+		void AllocateTif();
+
+	public:
+		AllocFrame(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(244,157), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL);
+		~AllocFrame();
+};
+
+class DnDFile : public wxFileDropTarget
+{
+    public:
+        DnDFile(wxFilePickerCtrl *fpCtrl)
+        {
+            m_filePickerCtrl = fpCtrl;
+        }
+        virtual bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filenames)
+        {
+            size_t nFiles = filenames.GetCount();
+            if (nFiles != 1) return false;
+            m_filePickerCtrl->SetPath(filenames[0]);
+            return true;
+        }
+
+    private:
+        wxFilePickerCtrl* m_filePickerCtrl;
+};
+