diff horori/alloc/alloc.h @ 0:aaaa401818a1 draft

first commit.
author pyon <pyon@macmini>
date Mon, 24 May 2021 21:32:58 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/horori/alloc/alloc.h	Mon May 24 21:32:58 2021 +0900
@@ -0,0 +1,69 @@
+// Filename   : alloc.h
+// Last Change: 2021-05-07 ‹à 17:09:06.
+//
+#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/checkbox.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;
+		wxCheckBox* 	  m_checkBoxSkipPdf;
+		wxStaticText*     m_staticTextTif;
+		wxDirPickerCtrl*  m_dirPickerTif;
+		wxCheckBox* 	  m_checkBoxJ2T;
+		wxStaticText*     m_staticTextWork;
+		wxDirPickerCtrl*  m_dirPickerWork;
+		wxButton*         m_buttonAlloc;
+
+		virtual void OnAlloc(wxCommandEvent& event);
+		void CreateControls();
+		void InitializeControlsValue();
+		void Pdf2Jpg();
+		bool 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;
+};
+