# PROP Ignore_Export_Lib 0\r
# PROP Target_Dir ""\r
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c\r
-# ADD CPP /nologo /G6 /MD /W3 /GX /O2 /I "c:\programmi\wxWidgets-2.8.0\lib\vc_lib\msw" /I "c:\programmi\wxWidgets-2.8.0\include" /I ".." /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "wxUSE_LIBOPENJPEG" /D "OPJ_STATIC" /D "USE_JPWL" /D "OPJ_HTMLABOUT" /D "OPJ_MANYFORMATS" /D "OPJ_INICONFIG" /FR /FD /c\r
+# ADD CPP /nologo /G6 /MD /W3 /GX /O2 /I "d:\programmi\wxWidgets-2.8.0\lib\vc_lib\msw" /I "d:\programmi\wxWidgets-2.8.0\include" /I ".." /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "wxUSE_LIBOPENJPEG" /D "OPJ_STATIC" /D "USE_JPWL" /D "OPJ_HTMLABOUT" /D "OPJ_MANYFORMATS" /D "OPJ_INICONFIG" /FR /FD /c\r
# ADD BASE RSC /l 0x410 /d "NDEBUG"\r
-# ADD RSC /l 0x409 /i "c:\programmi\wxWidgets-2.8.0\include" /d "NDEBUG"\r
+# ADD RSC /l 0x409 /i "d:\programmi\wxWidgets-2.8.0\include" /d "NDEBUG"\r
BSC32=bscmake.exe\r
# ADD BASE BSC32 /nologo\r
# ADD BSC32 /nologo\r
LINK32=link.exe\r
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386\r
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib wxzlib.lib wxregex.lib wxpng.lib wxjpeg.lib wxbase28.lib wxmsw28_core.lib wxmsw28_html.lib wxmsw28_adv.lib wxmsw28_core.lib wxbase28.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib LibOpenJPEG_JPWL.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libcmt.lib" /libpath:"c:\programmi\wxWidgets-2.8.0\lib\vc_lib" /libpath:"..\jpwl\Release" /IGNORE:4089\r
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib wxzlib.lib wxregex.lib wxpng.lib wxjpeg.lib wxbase28.lib wxmsw28_core.lib wxmsw28_html.lib wxmsw28_adv.lib wxmsw28_core.lib wxbase28.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib LibOpenJPEG_JPWL.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libcmt.lib" /libpath:"d:\programmi\wxWidgets-2.8.0\lib\vc_lib" /libpath:"..\jpwl\Release" /IGNORE:4089\r
# SUBTRACT LINK32 /pdb:none\r
+# Begin Special Build Tool\r
+SOURCE="$(InputPath)"\r
+PostBuild_Desc=Update build number\r
+PostBuild_Cmds=buildupdate.bat\r
+# End Special Build Tool\r
\r
!ELSEIF "$(CFG)" == "OPJViewer - Win32 Debug"\r
\r
# PROP Ignore_Export_Lib 0\r
# PROP Target_Dir ""\r
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c\r
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "c:\Programmi\wxWidgets-2.8.0\INCLUDE" /I "c:\programmi\wxWidgets-2.8.0\lib\vc_lib\msw" /I "d:\programmi\wxWidgets-2.8.0\include" /I ".." /D "_DEBUG" /D "__WXDEBUG__" /D WXDEBUG=1 /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "wxUSE_LIBOPENJPEG" /D "OPJ_STATIC" /D "USE_JPWL" /D "OPJ_HTMLABOUT" /FR /FD /GZ /c\r
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "d:\Programmi\wxWidgets-2.8.0\INCLUDE" /I "d:\programmi\wxWidgets-2.8.0\lib\vc_lib\msw" /I "d:\programmi\wxWidgets-2.8.0\include" /I ".." /D "_DEBUG" /D "__WXDEBUG__" /D WXDEBUG=1 /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "wxUSE_LIBOPENJPEG" /D "OPJ_STATIC" /D "USE_JPWL" /D "OPJ_HTMLABOUT" /FR /FD /GZ /c\r
# ADD BASE RSC /l 0x410 /d "_DEBUG"\r
-# ADD RSC /l 0x410 /i "c:\programmi\wxWidgets-2.8.0\include" /d "_DEBUG"\r
+# ADD RSC /l 0x410 /i "d:\programmi\wxWidgets-2.8.0\include" /d "_DEBUG"\r
BSC32=bscmake.exe\r
# ADD BASE BSC32 /nologo\r
# ADD BSC32 /nologo\r
LINK32=link.exe\r
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib wxzlibd.lib wxregexd.lib wxpngd.lib wxjpegd.lib wxtiffd.lib wxbase28d.lib wxmsw28d_core.lib wxmsw28d_html.lib wxmsw28d_adv.lib LibOpenJPEG_JPWLd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcmtd.lib" /pdbtype:sept /libpath:"c:\programmi\wxWidgets-2.8.0\lib\vc_lib" /libpath:"..\jpwl\Debug"\r
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib wxzlibd.lib wxregexd.lib wxpngd.lib wxjpegd.lib wxtiffd.lib wxbase28d.lib wxmsw28d_core.lib wxmsw28d_html.lib wxmsw28d_adv.lib LibOpenJPEG_JPWLd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcmtd.lib" /pdbtype:sept /libpath:"d:\programmi\wxWidgets-2.8.0\lib\vc_lib" /libpath:"..\jpwl\Debug"\r
# SUBTRACT LINK32 /pdb:none\r
\r
!ENDIF \r
OPJconfig->Write(wxT("teststring"), wxT("This is a test value"));\r
OPJconfig->Write(wxT("testbool"), (bool) true);\r
OPJconfig->Write(wxT("testlong"), (long) 245);\r
+\r
+ OPJconfig->Read(wxT("showtoolbar"), &m_showtoolbar, (bool) true);\r
+ OPJconfig->Read(wxT("showbrowser"), &m_showbrowser, (bool) true);\r
+ OPJconfig->Read(wxT("showpeeker"), &m_showpeeker, (bool) true);\r
+ OPJconfig->Read(wxT("browserwidth"), &m_browserwidth, (long) OPJ_BROWSER_WIDTH);\r
+ OPJconfig->Read(wxT("peekerheight"), &m_peekerheight, (long) OPJ_PEEKER_HEIGHT);\r
+ OPJconfig->Read(wxT("framewidth"), &m_framewidth, (long) OPJ_FRAME_WIDTH);\r
+ OPJconfig->Read(wxT("frameheight"), &m_frameheight, (long) OPJ_FRAME_HEIGHT);\r
#else\r
// set decoding engine parameters\r
m_enabledeco = true;\r
m_expcomps = JPWL_EXPECTED_COMPONENTS;\r
m_maxtiles = JPWL_MAXIMUM_TILES;\r
#endif // USE_JPWL\r
+ m_showtoolbar = true;\r
+ m_showbrowser = true;\r
+ m_showpeeker = true;\r
+ m_browserwidth = OPJ_BROWSER_WIDTH;\r
+ m_peekerheight = OPJ_PEEKER_HEIGHT;\r
+ m_framewidth = OPJ_FRAME_WIDTH;\r
+ m_frameheight = OPJ_FRAME_HEIGHT;\r
#endif // OPJ_INICONFIG\r
\r
// Create the main frame window\r
OPJFrame *frame = new OPJFrame(NULL, wxID_ANY, OPJ_APPLICATION_TITLEBAR,\r
- wxDefaultPosition, wxSize(800, 600),\r
+ wxDefaultPosition, wxSize(wxGetApp().m_framewidth, wxGetApp().m_frameheight),\r
wxDEFAULT_FRAME_STYLE | wxNO_FULL_REPAINT_ON_RESIZE |\r
wxHSCROLL | wxVSCROLL);\r
\r
OPJconfig->Write(wxT("expcomps"), m_expcomps);\r
OPJconfig->Write(wxT("maxtiles"), m_maxtiles);\r
#endif // USE_JPWL\r
+ OPJconfig->Write(wxT("showtoolbar"), m_showtoolbar);\r
+ OPJconfig->Write(wxT("showbrowser"), m_showbrowser);\r
+ OPJconfig->Write(wxT("showpeeker"), m_showpeeker);\r
+ OPJconfig->Write(wxT("browserwidth"), m_browserwidth);\r
+ OPJconfig->Write(wxT("peekerheight"), m_peekerheight);\r
+ OPJconfig->Write(wxT("framewidth"), m_framewidth);\r
+ OPJconfig->Write(wxT("frameheight"), m_frameheight);\r
#endif // OPJ_INICONFIG\r
\r
return 1;\r
// associate the toolbar with the frame\r
SetToolBar(tool_bar);\r
\r
+ // show the toolbar?\r
+ if (!wxGetApp().m_showtoolbar)\r
+ tool_bar->Show(false);\r
+ else\r
+ tool_bar->Show(true);\r
+\r
// the logging window\r
loggingWindow = new wxSashLayoutWindow(this, OPJFRAME_LOGWIN,\r
- wxDefaultPosition, wxSize(400, 130),\r
+ wxDefaultPosition, wxSize(400, wxGetApp().m_peekerheight),\r
wxNO_BORDER | wxSW_3D | wxCLIP_CHILDREN\r
);\r
- loggingWindow->SetDefaultSize(wxSize(1000, 130));\r
+ loggingWindow->SetDefaultSize(wxSize(1000, wxGetApp().m_peekerheight));\r
loggingWindow->SetOrientation(wxLAYOUT_HORIZONTAL);\r
loggingWindow->SetAlignment(wxLAYOUT_BOTTOM);\r
//loggingWindow->SetBackgroundColour(wxColour(0, 0, 255));\r
loggingWindow->SetSashVisible(wxSASH_TOP, true);\r
\r
+ // show the logging?\r
+ if (!wxGetApp().m_showpeeker)\r
+ loggingWindow->Show(false);\r
+ else\r
+ loggingWindow->Show(true);\r
+\r
// create the bottom notebook\r
m_bookCtrlbottom = new wxNotebook(loggingWindow, BOTTOM_NOTEBOOK_ID,\r
wxDefaultPosition, wxDefaultSize,\r
\r
// the browser window\r
markerTreeWindow = new wxSashLayoutWindow(this, OPJFRAME_BROWSEWIN,\r
- wxDefaultPosition, wxSize(300, 30),\r
+ wxDefaultPosition, wxSize(wxGetApp().m_browserwidth, 30),\r
wxNO_BORDER | wxSW_3D | wxCLIP_CHILDREN\r
);\r
- markerTreeWindow->SetDefaultSize(wxSize(300, 1000));\r
+ markerTreeWindow->SetDefaultSize(wxSize(wxGetApp().m_browserwidth, 1000));\r
markerTreeWindow->SetOrientation(wxLAYOUT_VERTICAL);\r
markerTreeWindow->SetAlignment(wxLAYOUT_LEFT);\r
//markerTreeWindow->SetBackgroundColour(wxColour(0, 255, 0));\r
wxDefaultPosition, wxDefaultSize,\r
wxBK_TOP);\r
\r
+ // show the browser?\r
+ if (!wxGetApp().m_showbrowser)\r
+ markerTreeWindow->Show(false);\r
+ else\r
+ markerTreeWindow->Show(true);\r
+\r
#ifdef __WXMOTIF__\r
// For some reason, we get a memcpy crash in wxLogStream::DoLogStream\r
// on gcc/wxMotif, if we use wxLogTextCtl. Maybe it's just gcc?\r
// this is the frame destructor\r
OPJFrame::~OPJFrame(void)\r
{\r
+ // save size settings\r
+ GetSize(&(wxGetApp().m_framewidth), &(wxGetApp().m_frameheight));\r
+\r
// delete all possible things\r
delete m_bookCtrl;\r
m_bookCtrl = NULL;\r
{\r
OPJChildFrame *currframe = (OPJChildFrame *) GetActiveChild();\r
\r
- OPJDecoThread *dthread = currframe->m_canvas->CreateDecoThread();\r
+ if (currframe) {\r
+ OPJDecoThread *dthread = currframe->m_canvas->CreateDecoThread();\r
\r
- if (dthread->Run() != wxTHREAD_NO_ERROR)\r
- wxLogMessage(wxT("Can't start deco thread!"));\r
- else\r
- wxLogMessage(wxT("New deco thread started."));\r
+ if (dthread->Run() != wxTHREAD_NO_ERROR)\r
+ wxLogMessage(wxT("Can't start deco thread!"));\r
+ else\r
+ wxLogMessage(wxT("New deco thread started."));\r
\r
- currframe->m_canvas->Refresh();\r
+ currframe->m_canvas->Refresh();\r
\r
- // update zoom\r
- //currframe->m_canvas->m_zooml = zooml;\r
+ // update zoom\r
+ //currframe->m_canvas->m_zooml = zooml;\r
+ }\r
}\r
\r
\r
\r
wxLayoutAlgorithm layout;\r
layout.LayoutMDIFrame(this);\r
+\r
+ wxGetApp().m_showbrowser = markerTreeWindow->IsShown();\r
+\r
+ // Leaves bits of itself behind sometimes\r
+ GetClientWindow()->Refresh();\r
}\r
\r
void OPJFrame::OnTogglePeeker(wxCommandEvent& WXUNUSED(event))\r
\r
wxLayoutAlgorithm layout;\r
layout.LayoutMDIFrame(this);\r
+\r
+ wxGetApp().m_showpeeker = loggingWindow->IsShown();\r
+\r
+ // Leaves bits of itself behind sometimes\r
+ GetClientWindow()->Refresh();\r
}\r
\r
void OPJFrame::OnToggleToolbar(wxCommandEvent& WXUNUSED(event))\r
\r
wxLayoutAlgorithm layout;\r
layout.LayoutMDIFrame(this);\r
+\r
+ wxGetApp().m_showtoolbar = tool_bar->IsShown();\r
+\r
+ // Leaves bits of itself behind sometimes\r
+ GetClientWindow()->Refresh();\r
}\r
\r
void OPJFrame::OnSashDrag(wxSashEvent& event)\r
{\r
+ int wid, hei;\r
+\r
if (event.GetDragStatus() == wxSASH_STATUS_OUT_OF_RANGE)\r
return;\r
\r
\r
// Leaves bits of itself behind sometimes\r
GetClientWindow()->Refresh();\r
+\r
+ // update dimensions\r
+ markerTreeWindow->GetSize(&wid, &hei);\r
+ wxGetApp().m_browserwidth = wid;\r
+\r
+ loggingWindow->GetSize(&wid, &hei);\r
+ wxGetApp().m_peekerheight = hei;\r
+\r
}\r
\r
// physically open the files\r