changeset 19:3bb803d8c1d7

Implement Mini-mode.
author pyon@macmini
date Sun, 07 Dec 2014 20:48:05 +0900
parents a8e6e5769e3b
children 226774bf49fc
files Changes Makefile doc/Searcher 03 の新機能.docx doc/Searcher 03 の新機能.pdf include/main.h src/main.cpp src/myframe.cpp start.bat
diffstat 8 files changed, 29 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/Changes	Sat Nov 29 11:02:35 2014 +0900
+++ b/Changes	Sun Dec 07 20:48:05 2014 +0900
@@ -1,3 +1,8 @@
+version 03.22
+2014-12-03
+ Implement Mini-mode.
+
+----
 version 03.21
 2014-11-21
  Small changes.
--- a/Makefile	Sat Nov 29 11:02:35 2014 +0900
+++ b/Makefile	Sun Dec 07 20:48:05 2014 +0900
@@ -1,5 +1,5 @@
 # Makefile for wxWidgets Application
-# Last Change: 18-Jun-2014.
+# Last Change: 03-Dec-2014.
 # by Takayuki Mutoh
 #
 
@@ -33,6 +33,7 @@
 OBJ = $(OBJDIR)/main.o \
 	  $(OBJDIR)/about.o \
 	  $(OBJDIR)/myframe.o \
+	  $(OBJDIR)/miniframe.o \
 	  $(OBJDIR)/kana.o \
 	  $(OBJDIR)/hist.o \
 	  $(OBJDIR)/index.o \
@@ -65,13 +66,16 @@
 endif
 
 
-$(OBJDIR)/main.o: main.cpp main.h common.h myframe.h
+$(OBJDIR)/main.o: main.cpp main.h common.h myframe.h miniframe.h
 	-mkdir -p $(OBJDIR)
 	$(CXX) -c $< -o $@ $(CXXFLAGS)
 
 $(OBJDIR)/myframe.o: myframe.cpp myframe.h common.h db.h marksheet.h bprint.h cache.h preview.h kana.h hist.h update.h
 	$(CXX) -c $< -o $@ $(CXXFLAGS)
 
+$(OBJDIR)/miniframe.o: miniframe.cpp miniframe.h common.h db.h
+	$(CXX) -c $< -o $@ $(CXXFLAGS)
+
 $(OBJDIR)/about.o: about.cpp about.h common.h
 	$(CXX) -c $< -o $@ $(CXXFLAGS)
 
Binary file doc/Searcher 03 の新機能.docx has changed
Binary file doc/Searcher 03 の新機能.pdf has changed
--- a/include/main.h	Sat Nov 29 11:02:35 2014 +0900
+++ b/include/main.h	Sun Dec 07 20:48:05 2014 +0900
@@ -1,5 +1,5 @@
 // Filename   : main.h
-// Last Change: 20-Jul-2013.
+// Last Change: 03-Dec-2014.
 //
 #include "wx/wx.h"
 #include "wx/config.h"
@@ -25,6 +25,7 @@
     wxString      conf_file;
     wxString      log_file;
     wxRect        rect;
+    long          mode;
 };
 
 enum {
--- a/src/main.cpp	Sat Nov 29 11:02:35 2014 +0900
+++ b/src/main.cpp	Sun Dec 07 20:48:05 2014 +0900
@@ -1,8 +1,10 @@
 // Filename   : main.cpp
-// Last Change: 23-Aug-2013.
+// Last Change: 04-Dec-2014.
 //
 #include "main.h"
 #include "myframe.h"
+#include "miniframe.h"
+#include "wx/cmdline.h"
 
 IMPLEMENT_APP(MyApp)
 
@@ -25,9 +27,15 @@
     InitLog();
     InitSetting();
 
-    MyFrame *mainframe = new MyFrame( NULL, ID_MAIN, wxT("Searcher 03"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE );
-    mainframe->SetSize( rect );
-    mainframe->Show(true);
+    if ( mode == 1 ) {
+        MiniFrame *miniframe = new MiniFrame( NULL, ID_MAIN, wxT("Mini Searcher"), wxDefaultPosition, wxSize( 100, 45 ), wxMINIMIZE_BOX|wxSYSTEM_MENU|wxCAPTION|wxCLOSE_BOX|wxCLIP_CHILDREN );
+        miniframe->Show( true );
+    }
+    else {
+        MyFrame *mainframe = new MyFrame( NULL, ID_MAIN, wxT("Searcher 03"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE );
+        mainframe->SetSize( rect );
+        mainframe->Show( true );
+    }
 
     return true;
 }
@@ -44,6 +52,7 @@
     config = new wxFileConfig( wxT("MyApp"), wxT("T.Mutoh"), conf_file, wxEmptyString, wxCONFIG_USE_LOCAL_FILE );
 
     config->SetPath( wxT("/Geometry") );
+    config->Read( wxT("mode"), &mode );
     config->Read( wxT("x"), &rect.x );
     config->Read( wxT("y"), &rect.y );
     config->Read( wxT("w"), &rect.width );
--- a/src/myframe.cpp	Sat Nov 29 11:02:35 2014 +0900
+++ b/src/myframe.cpp	Sun Dec 07 20:48:05 2014 +0900
@@ -1,5 +1,5 @@
 // Filename   : myframe.cpp
-// Last Change: 21-Nov-2014.
+// Last Change: 04-Dec-2014.
 //
 #include "main.h"
 #include "db.h"
--- a/start.bat	Sat Nov 29 11:02:35 2014 +0900
+++ b/start.bat	Sun Dec 07 20:48:05 2014 +0900
@@ -1,2 +1,3 @@
+copy searcher03.exe searcher.exe
 start /min Y:\
-start searcher03
+start searcher