view src/kaigo/horori/alloc/alloc.h @ 65:0369656be06c default tip

many changes.
author pyon@macmini
date Fri, 20 May 2022 06:30:34 +0900
parents 20b42e2deae1
children
line wrap: on
line source

// 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;
};