changeset 1:f40a65687079

small fix.
author pyon@macmini
date Mon, 10 Jun 2019 05:56:36 +0900
parents 2f5584f0d127
children 45d4fd954c31
files Madnm.fbp Makefile app.conf include/appconf.h include/custom.h include/id.h include/mainframe.h include/util.h src/appconf.cpp src/custom.cpp src/mainframe.cpp
diffstat 11 files changed, 180 insertions(+), 54 deletions(-) [+]
line wrap: on
line diff
--- a/Madnm.fbp	Sat Jun 08 16:21:40 2019 +0900
+++ b/Madnm.fbp	Mon Jun 10 05:56:36 2019 +0900
@@ -2267,11 +2267,11 @@
                                 <property name="orient">wxVERTICAL</property>
                                 <property name="parent">1</property>
                                 <property name="permission">none</property>
-                                <object class="sizeritem" expanded="0">
+                                <object class="sizeritem" expanded="1">
                                     <property name="border">5</property>
                                     <property name="flag">wxEXPAND</property>
                                     <property name="proportion">1</property>
-                                    <object class="wxFlexGridSizer" expanded="0">
+                                    <object class="wxFlexGridSizer" expanded="1">
                                         <property name="cols">2</property>
                                         <property name="flexible_direction">wxBOTH</property>
                                         <property name="growablecols"></property>
@@ -2593,11 +2593,11 @@
                                                 <property name="wrap">-1</property>
                                             </object>
                                         </object>
-                                        <object class="sizeritem" expanded="0">
+                                        <object class="sizeritem" expanded="1">
                                             <property name="border">5</property>
                                             <property name="flag">wxALL</property>
                                             <property name="proportion">0</property>
-                                            <object class="wxListBox" expanded="0">
+                                            <object class="wxCheckListBox" expanded="1">
                                                 <property name="BottomDockable">1</property>
                                                 <property name="LeftDockable">1</property>
                                                 <property name="RightDockable">1</property>
@@ -2611,7 +2611,7 @@
                                                 <property name="caption"></property>
                                                 <property name="caption_visible">1</property>
                                                 <property name="center_pane">0</property>
-                                                <property name="choices"></property>
+                                                <property name="choices">&quot;C:\\&quot; &quot;Y:\\&quot; &quot;Z:\\&quot;</property>
                                                 <property name="close_button">1</property>
                                                 <property name="context_help"></property>
                                                 <property name="context_menu">1</property>
@@ -2633,7 +2633,7 @@
                                                 <property name="minimize_button">0</property>
                                                 <property name="minimum_size"></property>
                                                 <property name="moveable">1</property>
-                                                <property name="name">m_listBox</property>
+                                                <property name="name">m_checkList</property>
                                                 <property name="pane_border">1</property>
                                                 <property name="pane_position"></property>
                                                 <property name="pane_size"></property>
@@ -2643,7 +2643,7 @@
                                                 <property name="resize">Resizable</property>
                                                 <property name="show">1</property>
                                                 <property name="size"></property>
-                                                <property name="style"></property>
+                                                <property name="style">wxLB_MULTIPLE|wxLB_NO_SB</property>
                                                 <property name="subclass">; ; forward_declare</property>
                                                 <property name="toolbar_pane">0</property>
                                                 <property name="tooltip"></property>
@@ -3831,7 +3831,7 @@
                     <property name="border">5</property>
                     <property name="flag">wxEXPAND</property>
                     <property name="proportion">1</property>
-                    <object class="wxStaticBoxSizer" expanded="0">
+                    <object class="wxStaticBoxSizer" expanded="1">
                         <property name="id">wxID_ANY</property>
                         <property name="label">Work</property>
                         <property name="minimum_size"></property>
@@ -4256,11 +4256,11 @@
                                 </object>
                             </object>
                         </object>
-                        <object class="sizeritem" expanded="0">
+                        <object class="sizeritem" expanded="1">
                             <property name="border">5</property>
-                            <property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND</property>
+                            <property name="flag">wxALL|wxEXPAND</property>
                             <property name="proportion">1</property>
-                            <object class="CustomControl" expanded="0">
+                            <object class="wxListCtrl" expanded="1">
                                 <property name="BottomDockable">1</property>
                                 <property name="LeftDockable">1</property>
                                 <property name="RightDockable">1</property>
@@ -4270,16 +4270,13 @@
                                 <property name="aui_position"></property>
                                 <property name="aui_row"></property>
                                 <property name="best_size"></property>
-                                <property name="bg">wxSYS_COLOUR_WINDOWTEXT</property>
+                                <property name="bg"></property>
                                 <property name="caption"></property>
                                 <property name="caption_visible">1</property>
                                 <property name="center_pane">0</property>
-                                <property name="class"></property>
                                 <property name="close_button">1</property>
-                                <property name="construction"></property>
                                 <property name="context_help"></property>
                                 <property name="context_menu">1</property>
-                                <property name="declaration"></property>
                                 <property name="default_pane">0</property>
                                 <property name="dock">Dock</property>
                                 <property name="dock_fixed">0</property>
@@ -4291,7 +4288,6 @@
                                 <property name="gripper">0</property>
                                 <property name="hidden">0</property>
                                 <property name="id">wxID_ANY</property>
-                                <property name="include"></property>
                                 <property name="max_size"></property>
                                 <property name="maximize_button">0</property>
                                 <property name="maximum_size"></property>
@@ -4299,7 +4295,7 @@
                                 <property name="minimize_button">0</property>
                                 <property name="minimum_size"></property>
                                 <property name="moveable">1</property>
-                                <property name="name">m_customControl</property>
+                                <property name="name">m_listCtrl</property>
                                 <property name="pane_border">1</property>
                                 <property name="pane_position"></property>
                                 <property name="pane_size"></property>
@@ -4307,12 +4303,16 @@
                                 <property name="pin_button">1</property>
                                 <property name="pos"></property>
                                 <property name="resize">Resizable</property>
-                                <property name="settings"></property>
                                 <property name="show">1</property>
                                 <property name="size"></property>
+                                <property name="style">wxLC_ICON</property>
                                 <property name="subclass">; ; forward_declare</property>
                                 <property name="toolbar_pane">0</property>
                                 <property name="tooltip"></property>
+                                <property name="validator_data_type"></property>
+                                <property name="validator_style">wxFILTER_NONE</property>
+                                <property name="validator_type">wxDefaultValidator</property>
+                                <property name="validator_variable"></property>
                                 <property name="window_extra_style"></property>
                                 <property name="window_name"></property>
                                 <property name="window_style"></property>
--- a/Makefile	Sat Jun 08 16:21:40 2019 +0900
+++ b/Makefile	Mon Jun 10 05:56:36 2019 +0900
@@ -1,5 +1,5 @@
 # Makefile for wxWidgets Application
-# Last Change: 2019-06-06  16:07:28.
+# Last Change: 2019-06-10 Mon 05:55:50.
 # by Takayuki Mutoh
 #
 
@@ -38,6 +38,7 @@
 	  $(OBJDIR)/appconf.o \
 	  $(OBJDIR)/util.o \
 	  $(OBJDIR)/custom.o \
+	  #$(OBJDIR)/wxsqlite3.o \
 	  $(OBJDIR)/mainframe.o
 
 ifdef COMSPEC
@@ -72,6 +73,9 @@
 $(OBJDIR)/mainframe.o: mainframe.cpp mainframe.h custom.h appconf.h id.h
 	$(CXX) -c $< -o $@ $(CXXFLAGS)
 
+$(OBJDIR)/wxsqlite3.o: wxsqlite3.cpp wx/wxsqlite3.h
+	$(CXX) -c $< -o $@ $(CXXFLAGS)
+
 
 # for icon
 ifdef COMSPEC
--- a/app.conf	Sat Jun 08 16:21:40 2019 +0900
+++ b/app.conf	Mon Jun 10 05:56:36 2019 +0900
@@ -1,5 +1,5 @@
 [Geometry]
-geo=1383x1057+245+23
+geo=1557x1057+181+23
 
 [Ccn]
 ccn=pقP:pقQ:pقR:pقS:P:Q:R:用P:用Q:用R:ȂP:ȂQ:ȂR:ȂS:ȂT:ȂU:ZP:ZQ:ZR
--- a/include/appconf.h	Sat Jun 08 16:21:40 2019 +0900
+++ b/include/appconf.h	Mon Jun 10 05:56:36 2019 +0900
@@ -1,5 +1,5 @@
 // Filename   : appconf.h
-// Last Change: 2019-06-07  14:39:29.
+// Last Change: 2019-06-09 Sun 16:54:00.
 //
 #pragma once
 
@@ -19,8 +19,11 @@
 
 		wxRect LoadRect( void );
 		wxRect LoadMask( int i );
+		wxString LoadWork( void );
+        wxString LoadScanner( void );
 		void LoadCcn( wxComboBox ccn, wxComboBox sss );
 
 		void SaveRect( wxRect rect );
+		void SaveWork( wxString dir );
 };
 
--- a/include/custom.h	Sat Jun 08 16:21:40 2019 +0900
+++ b/include/custom.h	Mon Jun 10 05:56:36 2019 +0900
@@ -1,5 +1,5 @@
 // Filename   : custom.h
-// Last Change: 2019-06-07  16:39:35.
+// Last Change: 2019-06-09 Sun 16:57:24.
 //
 #pragma once
 
@@ -9,7 +9,10 @@
 #include <wx/bitmap.h>
 #include <wx/image.h>
 #include <wx/spinctrl.h>
-#include "wx/dcclient.h"
+#include <wx/listctrl.h>
+#include <wx/dcclient.h>
+
+#include "util.h"
 
 class LookWindow : public wxWindow
 {
@@ -56,3 +59,21 @@
 		wxRect GetRealMask2Rect( void );
 };
 
+class ListThumbnail : public wxListView
+{
+    DECLARE_EVENT_TABLE()
+	private:
+        FileList    m_filelist;
+        wxImageList m_imageListZ1;
+        wxImageList m_imageListZ2;
+        wxImageList m_imageListZ3;
+
+    public:
+        ListThumbnail( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxLC_ICON );
+        ~ListThumbnail();
+
+        int Reload( void );
+        void SetDirectory( wxString dir ) { m_filelist.SetDirectory( dir ); };
+        //void OnDClick( wx);
+};
+
--- a/include/id.h	Sat Jun 08 16:21:40 2019 +0900
+++ b/include/id.h	Mon Jun 10 05:56:36 2019 +0900
@@ -1,5 +1,5 @@
 // Filename   : id.h
-// Last Change: 2019-06-07 Fri 22:31:04.
+// Last Change: 2019-06-08 Sat 22:47:18.
 //
 #pragma once
 
@@ -62,6 +62,7 @@
 	ID_MKDIR,
     ID_FMOVE,
 
+	ID_HNO,
 	ID_MOVE,
 
     ID_WORK,
@@ -71,5 +72,6 @@
     ID_SELALL,
     ID_SELDEL,
     ID_UPDT,
+    ID_THUMB,
 };
 
--- a/include/mainframe.h	Sat Jun 08 16:21:40 2019 +0900
+++ b/include/mainframe.h	Mon Jun 10 05:56:36 2019 +0900
@@ -1,5 +1,5 @@
 // Filename   : mainframe.h
-// Last Change: 2019-06-07 Fri 22:20:40.
+// Last Change: 2019-06-09 Sun 16:31:59.
 //
 #pragma once
 
@@ -66,7 +66,7 @@
 		wxStaticText*		m_staticTextCcn;
 		wxComboBox*			m_comboBox;
 		wxStaticText*		m_staticTextDrive;
-		//wxComboBox*			m_comboBoxDrive2;   // check list box
+        wxCheckListBox*     m_checkList;
 		wxButton* 			m_buttonMkdir;
 
 		wxStaticLine*       m_staticline;
@@ -104,7 +104,7 @@
 		wxButton*           m_buttonDel;
 		wxSlider* 			m_slider;
 		wxButton*           m_buttonUpdate;
-		//* m_customControl;
+        ListThumbnail*      m_listViewThumb;
 
 		wxCollapsiblePane*	m_collapsiblePane;
 		wxTextCtrl*			m_textCtrlMsg;
@@ -140,12 +140,17 @@
 
 		void OnMakeDir( wxCommandEvent& event );
 		void OnPrint( wxCommandEvent& event );
+
+		void OnHno( wxCommandEvent& event );
 		void OnMove( wxCommandEvent& event );
 
+        void OnUpdate( wxCommandEvent& event);
+
 		void OnClose( wxCloseEvent& event );
 
 		void CreateControls( void );
-		void SetCanvas( void );
+		void UpdateCanvas( void );
+		void UpdateThumbnail( void );
 		void LookMarksheet( wxString file );
 		void DoMask( wxString file, wxRect rect );
 };
--- a/include/util.h	Sat Jun 08 16:21:40 2019 +0900
+++ b/include/util.h	Mon Jun 10 05:56:36 2019 +0900
@@ -1,5 +1,5 @@
 // Filename   : util.h
-// Last Change: 2019-06-07 Fri 21:06:32.
+// Last Change: 2019-06-09 Sun 16:36:33.
 //
 #pragma once
 
@@ -11,7 +11,7 @@
 class FileList
 {
 	private:
-		wxString m_dir;
+		wxString      m_dir;
 		wxArrayString m_files;
 
 		wxImageList m_image1;	// zoom1
--- a/src/appconf.cpp	Sat Jun 08 16:21:40 2019 +0900
+++ b/src/appconf.cpp	Mon Jun 10 05:56:36 2019 +0900
@@ -1,5 +1,5 @@
 // Filename   : appconf.cpp
-// Last Change: 2019-06-07  14:38:53.
+// Last Change: 2019-06-09 Sun 16:56:39.
 //
 #include "appconf.h"
 #include "util.h"
@@ -48,6 +48,28 @@
 	return Geo2Rect( buf );
 }
 
+wxString AppConf::LoadWork( void )
+{
+	wxString dir;
+    config->SetPath( "/Misc" );
+    config->Read( "workdir", &dir );
+
+    delete config;
+
+	return dir;
+}
+
+wxString AppConf::LoadScanner( void )
+{
+	wxString scan;
+    config->SetPath( "/Misc" );
+    config->Read( "scanner", &scan );
+
+    delete config;
+
+	return scan;
+}
+
 
 /* Save */
 void AppConf::SaveRect( wxRect rect )
@@ -58,3 +80,11 @@
     delete config;
 }
 
+void AppConf::SaveWork( wxString dir )
+{
+    config->SetPath( "/Misc" );
+    config->Write( "workdir", dir );
+
+    delete config;
+}
+
--- a/src/custom.cpp	Sat Jun 08 16:21:40 2019 +0900
+++ b/src/custom.cpp	Mon Jun 10 05:56:36 2019 +0900
@@ -1,5 +1,5 @@
 // Filename   : custom.cpp
-// Last Change: 2019-06-07 金 17:36:31.
+// Last Change: 2019-06-09 Sun 16:57:44.
 //
 
 #include "id.h"
@@ -223,3 +223,29 @@
 	m_spnw = spnw; m_spnh = spnh;
 }
 
+/*** ListThumbnail Class ***/
+ListThumbnail::ListThumbnail( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
+	: wxListView( parent, id, pos, size, style )
+{
+    FileList m_filelist;
+    // array imagelist
+    // array imagelist ( selected : blue )
+    // array selected
+}
+
+ListThumbnail::~ListThumbnail()
+{
+}
+
+// Event Table
+BEGIN_EVENT_TABLE( ListThumbnail, wxListView )
+END_EVENT_TABLE()
+
+/* Event Handlers & Functions */
+// Event Handlers
+// Functions
+int ListThumbnail::Reload( void )
+{
+    return 1000;
+}
+
--- a/src/mainframe.cpp	Sat Jun 08 16:21:40 2019 +0900
+++ b/src/mainframe.cpp	Mon Jun 10 05:56:36 2019 +0900
@@ -1,5 +1,5 @@
 // Filename   : mainframe.cpp
-// Last Change: 2019-06-08 Sat 10:56:10.
+// Last Change: 2019-06-09 Sun 17:05:28.
 //
 
 #include "id.h"
@@ -11,15 +11,23 @@
 {
 	CreateControls();
 
+	AppConf appconf;
+    wxString dir = appconf.LoadWork();
+    m_dirPicker->SetPath( dir );
+
 	m_filelist = new FileList();
-	m_filelist->SetDirectory( "./work" );
+	m_filelist->SetDirectory( dir );
 
 	m_lookWindow1->SetDefaultParams( 1, SPL_W,  SPL_H,  SPL_DCW,  SPL_DCH );
 	m_lookWindow2->SetDefaultParams( 2, OPN1_W, OPN1_H, OPN1_DCW, OPN1_DCH );
 	m_lookWindow3->SetDefaultParams( 3, OPN2_W, OPN2_H, OPN2_DCW, OPN2_DCH );
 	m_lookWindow3->AddMask();
 
-	SetCanvas();
+	UpdateCanvas();
+
+    m_listViewThumb->SetDirectory( dir );
+
+    UpdateThumbnail();
 }
 
 MainFrame::~MainFrame()
@@ -29,8 +37,6 @@
 // Event Table
 BEGIN_EVENT_TABLE( MainFrame, wxFrame )
 	/*
-    EVT_TEXT(       ID_HHS,  MoverFrame::OnHhs )
-    EVT_TEXT_ENTER( ID_HHS,  MoverFrame::OnHhs )
     EVT_CHOICE( ID_CHOICE,   MoverFrame::OnChoice )
     EVT_CHECKBOX( ID_CPAPER, MoverFrame::OnPaperCheck )
 	*/
@@ -40,6 +46,9 @@
     EVT_BUTTON( ID_RST4,    MainFrame::OnReset4 )
     EVT_BUTTON( ID_PRINT,   MainFrame::OnPrint )
 	EVT_SPINCTRL( ID_SPNW1, MainFrame::OnSpinW1 )
+    EVT_TEXT(       ID_HNO, MainFrame::OnHno )
+    EVT_TEXT_ENTER( ID_HNO, MainFrame::OnHno )
+    EVT_BUTTON( ID_UPDT,    MainFrame::OnUpdate )
 	EVT_CLOSE( MainFrame::OnClose )
 	/*
     EVT_LIST_ITEM_SELECTED(   ID_THUMB, MoverFrame::OnThumbItemSelected )
@@ -143,6 +152,13 @@
 {
 }
 
+void MainFrame::OnHno( wxCommandEvent& WXUNUSED(event) )
+{
+    wxString no = m_textCtrlNo->GetValue();
+    m_textCtrlName->SetBackgroundColour( *wxRED );
+    m_textCtrlName->SetValue( wxT("It's not a No. style !") );
+    //if ( no.Len() == 10 ) SetHhsName( no );
+}
 /*
 void MainFrame::OnScanner( wxCommandEvent& WXUNUSED(event) )
 {
@@ -150,12 +166,20 @@
 }
 */
 
+void MainFrame::OnUpdate( wxCommandEvent& WXUNUSED(event) )
+{
+    UpdateCanvas();
+    UpdateThumbnail();
+}
+
 void MainFrame::OnClose( wxCloseEvent& WXUNUSED(event) )
 {
     if ( !IsIconized() && !IsMaximized() ) {
 		AppConf appconf;
 		appconf.SaveRect( GetRect() );
     }
+    AppConf appconf;
+    appconf.SaveWork( m_dirPicker->GetPath() );
 	Destroy();
 }
 
@@ -308,21 +332,26 @@
 	m_staticTextDrive = new wxStaticText( sbSizerDir->GetStaticBox(), wxID_ANY, wxT("Drive"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT );
 	sbSizerDir->Add( m_staticTextDrive, 0, wxALL, 5 );
 
-	//m_listBox = new wxListBox( sbSizerDir->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
-	//fgSizerSetup->Add( m_listBox, 0, wxALL, 5 );
+	wxString m_checkListChoices[] = { wxT("C:\\"), wxT("Y:\\"), wxT("Z:\\") };
+	int m_checkListNChoices = sizeof( m_checkListChoices ) / sizeof( wxString );
+	m_checkList = new wxCheckListBox( sbSizerDir->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxSize( 100, -1 ), m_checkListNChoices, m_checkListChoices, wxLB_MULTIPLE );
+    m_checkList->Check( 0, true );
+    m_checkList->Check( 1, true );
+    m_checkList->Check( 2, true );
+	fgSizerSetup->Add( m_checkList, 0, wxALL, 5 );
 
 	fgSizerSetup->Add( 0, 0, 1, wxEXPAND, 5 );
 
 	m_buttonMkdir = new wxButton( sbSizerDir->GetStaticBox(), ID_MKDIR, wxT("Mkdir"), wxDefaultPosition, wxDefaultSize, 0 );
 	sbSizerDir->Add( m_buttonMkdir, 0, wxALL, 5 );
 
-	sbSizerDir->Add( fgSizerSetup, 0, wxEXPAND, 5 );
+	sbSizerDir->Add( fgSizerSetup, 1, wxEXPAND, 5 );
 
 	m_staticline = new wxStaticLine( sbSizerDir->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
 	sbSizerDir->Add( m_staticline, 0, wxEXPAND|wxALL, 5 );
 
 	m_checkBox = new wxCheckBox( sbSizerDir->GetStaticBox(), wxID_ANY, wxT("FilingMode"), wxDefaultPosition, wxDefaultSize, 0 );
-	sbSizerDir->Add( m_checkBox, 0, wxALL, 5 );
+	sbSizerDir->Add( m_checkBox, 0, wxALL|wxALIGN_LEFT, 5 );
 
 	m_button30 = new wxButton( sbSizerDir->GetStaticBox(), wxID_ANY, wxT("MyButton"), wxDefaultPosition, wxDefaultSize, 0 );
 	sbSizerDir->Add( m_button30, 0, wxALL|wxALIGN_RIGHT, 5 );
@@ -330,7 +359,7 @@
 	m_buttonFMove = new wxButton( sbSizerDir->GetStaticBox(), ID_FMOVE, wxT("Move"), wxDefaultPosition, wxDefaultSize, 0 );
 	sbSizerDir->Add( m_buttonFMove, 0, wxALL|wxALIGN_RIGHT, 5 );
 
-	fgSizerMain->Add( sbSizerDir, 0, wxEXPAND, 5 );
+	fgSizerMain->Add( sbSizerDir, 1, wxEXPAND, 5 );
 
 	// Move
 	wxStaticBoxSizer* sbSizerMove = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Move") ), wxHORIZONTAL );
@@ -349,7 +378,7 @@
 	m_textCtrlName->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
 	fgSizerMove->Add( m_textCtrlName, 0, wxALL|wxALIGN_BOTTOM, 5 );
 
-	m_staticTextNo = new wxStaticText( sbSizerMove->GetStaticBox(), wxID_ANY, wxT("No"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextNo = new wxStaticText( sbSizerMove->GetStaticBox(), ID_HNO, wxT("No"), wxDefaultPosition, wxDefaultSize, 0 );
 	fgSizerMove->Add( m_staticTextNo, 0, wxALL|wxALIGN_RIGHT, 5 );
 
 	m_bitmapNo = new wxStaticBitmap( sbSizerMove->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( MHNO_W, MHNO_H ), 0 );
@@ -363,13 +392,15 @@
 
 	m_gauge = new wxGauge( sbSizerMove->GetStaticBox(), wxID_ANY, 100, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL );
 	m_gauge->SetValue( 0 );
-	fgSizerMove->Add( m_gauge, 1, wxALL|wxEXPAND, 5 );
+	fgSizerMove->Add( m_gauge, 1, wxALL|wxEXPAND|wxALIGN_TOP, 5 );
 
 	m_buttonMove = new wxButton( sbSizerMove->GetStaticBox(), ID_MOVE, wxT("Move"), wxDefaultPosition, wxDefaultSize, 0 );
-	fgSizerMove->Add( m_buttonMove, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+	fgSizerMove->Add( m_buttonMove, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
 
 	sbSizerMove->Add( fgSizerMove, 0, 0, 5 );
 
+	sbSizerMove->Add( 40, 0, 0, wxEXPAND, 5 );
+
 	m_dataViewListCtrl = new wxDataViewListCtrl( sbSizerMove->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_MULTIPLE|wxDV_ROW_LINES|wxDV_VERT_RULES );
 	m_dataViewListColumnNo   = m_dataViewListCtrl->AppendTextColumn( wxT("No"),     wxDATAVIEW_CELL_INERT, 30, static_cast<wxAlignment>(wxALIGN_RIGHT) , wxDATAVIEW_COL_RESIZABLE );
 	m_dataViewListColumnHno  = m_dataViewListCtrl->AppendTextColumn( wxT("Hno"),    wxDATAVIEW_CELL_INERT, 80, static_cast<wxAlignment>(wxALIGN_CENTER), wxDATAVIEW_COL_RESIZABLE|wxDATAVIEW_COL_SORTABLE );
@@ -419,12 +450,11 @@
 	m_buttonUpdate = new wxButton( sbSizerWork->GetStaticBox(), ID_UPDT, wxT("Refresh"), wxDefaultPosition, wxSize( 60,-1 ), 0 );
 	bSizerWork->Add( m_buttonUpdate, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
 
-	sbSizerWork->Add( bSizerWork, 1, wxEXPAND, 5 );
+	sbSizerWork->Add( bSizerWork, 0, wxEXPAND, 5 );
 
-	//m_customControl = new ( sbSizerWork->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-	//m_customControl->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT ) );
-
-	//sbSizerWork->Add( m_customControl, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
+	m_listViewThumb = new ListThumbnail( sbSizerWork->GetStaticBox(), ID_THUMB, wxDefaultPosition, wxDefaultSize, wxLC_ICON );
+	//m_listViewThumb->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_INFOBK ) );
+	sbSizerWork->Add( m_listViewThumb, 1, wxALL|wxEXPAND, 5 );
 
 	bSizerTop->Add( sbSizerWork, 1, wxEXPAND, 5 );
 
@@ -449,7 +479,7 @@
 	this->Centre( wxBOTH );
 }
 
-void MainFrame::SetCanvas( void )
+void MainFrame::UpdateCanvas( void )
 {
 	wxArrayString files = m_filelist->Update();
 	int n = files.GetCount();
@@ -471,6 +501,11 @@
 	m_lookWindow3->ResetMask2();
 }
 
+void MainFrame::UpdateThumbnail( void )
+{
+    m_listViewThumb->Reload();
+}
+
 void MainFrame::LookMarksheet( wxString file )
 {
     wxImage marksheet( file, wxBITMAP_TYPE_JPEG );
@@ -489,9 +524,9 @@
 
 	/*
     // 推測
-    wxString hhsno = GuessHhs( file, rect_mhno );
-    m_textCtrlHhs->SetValue( hhsno );
-    SetHhsName( hhsno );
+    wxString no = GuessHhs( file, rect_mhno );
+    m_textCtrlNo->SetValue( no );
+    SetHhsName( no );
 	*/
 }