2 * Copyright (c) 2007, Digital Signal Processing Laboratory, Universit� degli studi di Perugia (UPG), Italy
\r
3 * All rights reserved.
\r
5 * Redistribution and use in source and binary forms, with or without
\r
6 * modification, are permitted provided that the following conditions
\r
8 * 1. Redistributions of source code must retain the above copyright
\r
9 * notice, this list of conditions and the following disclaimer.
\r
10 * 2. Redistributions in binary form must reproduce the above copyright
\r
11 * notice, this list of conditions and the following disclaimer in the
\r
12 * documentation and/or other materials provided with the distribution.
\r
14 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
\r
15 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
\r
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
\r
17 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
\r
18 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
\r
19 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
\r
20 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
\r
21 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
\r
22 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
\r
23 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
\r
24 * POSSIBILITY OF SUCH DAMAGE.
\r
26 /////////////////////////////////////////////////////////////////////////////
\r
28 // Purpose: Layout window/sash sample
\r
29 // Author: Julian Smart
\r
31 // Created: 04/01/98
\r
32 // RCS-ID: $Id: sashtest.h,v 1.5 2005/06/02 12:04:24 JS Exp $
\r
33 // Copyright: (c) Julian Smart
\r
34 // Licence: wxWindows license
\r
35 /////////////////////////////////////////////////////////////////////////////
\r
36 /////////////////////////////////////////////////////////////////////////////
\r
38 // Purpose: wxTreeCtrl sample
\r
39 // Author: Julian Smart
\r
41 // Created: 04/01/98
\r
42 // RCS-ID: $Id: treetest.h,v 1.50 2006/11/04 11:26:51 VZ Exp $
\r
43 // Copyright: (c) Julian Smart
\r
44 // Licence: wxWindows license
\r
45 /////////////////////////////////////////////////////////////////////////////
\r
46 /////////////////////////////////////////////////////////////////////////////
\r
48 // Purpose: Common dialogs demo
\r
49 // Author: Julian Smart
\r
50 // Modified by: ABX (2004) - adjustementd for conditional building
\r
51 // Created: 04/01/98
\r
52 // RCS-ID: $Id: dialogs.h,v 1.50 2006/10/08 14:12:59 VZ Exp $
\r
53 // Copyright: (c) Julian Smart
\r
54 // Licence: wxWindows license
\r
55 /////////////////////////////////////////////////////////////////////////////
\r
57 #ifndef __OPJ_VIEWER_H__
\r
58 #define __OPJ_VIEWER_H__
\r
60 // For compilers that support precompilation, includes "wx/wx.h".
\r
61 #include "wx/wxprec.h"
\r
72 #include "wx/toolbar.h"
\r
73 #include "wx/laywin.h"
\r
74 #include "wx/treectrl.h"
\r
76 #include "icon1.xpm"
\r
77 #include "icon2.xpm"
\r
78 #include "icon3.xpm"
\r
79 #include "icon4.xpm"
\r
80 #include "icon5.xpm"
\r
82 #include "wx/filedlg.h"
\r
83 #include "wx/toolbar.h"
\r
84 #include <wx/filename.h>
\r
85 #include <wx/busyinfo.h>
\r
86 #include <wx/cmdline.h>
\r
87 #include <wx/file.h>
\r
88 #include "wx/notebook.h"
\r
89 #include <wx/numdlg.h>
\r
91 #include "wx/propdlg.h"
\r
92 #include "wx/spinctrl.h"
\r
95 #include "wx/wxhtml.h"
\r
96 #include "wx/statline.h"
\r
97 #include <wx/fs_mem.h>
\r
99 #include <wx/imaglist.h>
\r
101 #include "wx/toolbar.h"
\r
102 #include "wx/artprov.h"
\r
104 #include "libopenjpeg/openjpeg.h"
\r
106 #include "imagj2k.h"
\r
107 #include "imagjp2.h"
\r
108 #include "imagmj2.h"
\r
111 typedef unsigned __int64 int8byte;
\r
112 #endif // __WXMSW__
\r
115 typedef unsigned long long int8byte;
\r
116 #endif // __WXGTK__
\r
118 #define USE_GENERIC_TREECTRL 0
\r
119 #define USE_PENCIL_ON_CANVAS 0
\r
121 #if USE_GENERIC_TREECTRL
\r
122 #include "wx/generic/treectlg.h"
\r
124 #define wxTreeCtrl wxGenericTreeCtrl
\r
125 #define sm_classwxTreeCtrl sm_classwxGenericTreeCtrl
\r
129 #define OPJ_APPLICATION wxT("OPJViewer")
\r
130 #define OPJ_APPLICATION_NAME wxT("OpenJPEG Viewer")
\r
131 #define OPJ_APPLICATION_VERSION wxT("0.3 alpha")
\r
132 #define OPJ_APPLICATION_TITLEBAR OPJ_APPLICATION_NAME wxT(" ") OPJ_APPLICATION_VERSION
\r
133 #define OPJ_APPLICATION_COPYRIGHT wxT("(C) 2007, Giuseppe Baruffa")
\r
134 #define OPJ_APPLICATION_VENDOR wxT("OpenJPEG")
\r
137 #define OPJ_APPLICATION_PLATFORM wxT("Windows")
\r
141 #define OPJ_APPLICATION_PLATFORM wxT("Linux")
\r
144 #define OPJ_FRAME_WIDTH 800
\r
145 #define OPJ_FRAME_HEIGHT 600
\r
147 #define OPJ_BROWSER_WIDTH 300
\r
148 #define OPJ_PEEKER_HEIGHT 130
\r
150 #define OPJ_CANVAS_BORDER 10
\r
151 #define OPJ_CANVAS_COLOUR *wxWHITE
\r
153 class OPJDecoThread;
\r
154 class OPJEncoThread;
\r
155 class OPJParseThread;
\r
156 WX_DEFINE_ARRAY_PTR(wxThread *, wxArrayThread);
\r
157 class OPJChildFrame;
\r
159 //////////////////////////////////
\r
160 // this is our main application //
\r
161 //////////////////////////////////
\r
162 class OPJViewerApp: public wxApp
\r
164 // public methods and variables
\r
167 // class constructor
\r
168 OPJViewerApp() { m_showImages = true; m_showButtons = false; }
\r
173 void SetShowImages(bool show) { m_showImages = show; }
\r
174 bool ShowImages() const { return m_showImages; }
\r
175 void ShowCmdLine(const wxCmdLineParser& parser);
\r
177 // all the threads currently alive - as soon as the thread terminates, it's
\r
178 // removed from the array
\r
179 wxArrayThread m_deco_threads, m_parse_threads, m_enco_threads;
\r
181 // crit section protects access to all of the arrays below
\r
182 wxCriticalSection m_deco_critsect, m_parse_critsect, m_enco_critsect;
\r
184 // semaphore used to wait for the threads to exit, see OPJFrame::OnQuit()
\r
185 wxSemaphore m_deco_semAllDone, m_parse_semAllDone, m_enco_semAllDone;
\r
187 // the last exiting thread should post to m_semAllDone if this is true
\r
188 // (protected by the same m_critsect)
\r
189 bool m_deco_waitingUntilAllDone, m_parse_waitingUntilAllDone, m_enco_waitingUntilAllDone;
\r
191 // the list of all filenames written in the command line
\r
192 wxArrayString m_filelist;
\r
194 // displaying engine parameters
\r
195 int m_resizemethod;
\r
197 // decoding engine parameters
\r
198 bool m_enabledeco, m_enableparse;
\r
199 int m_reducefactor, m_qualitylayers, m_components, m_framenum;
\r
202 int m_expcomps, m_maxtiles;
\r
203 int m_framewidth, m_frameheight;
\r
206 // encoding engine parameters
\r
207 wxString m_subsampling, m_origin, m_rates, m_comment, m_index, m_quality;
\r
208 wxString m_cbsize, m_prsize, m_tsize, m_torigin;
\r
209 bool m_enablecomm, m_enableidx, m_irreversible, m_enablesop, m_enableeph;
\r
212 // some layout settings
\r
213 bool m_showtoolbar, m_showbrowser, m_showpeeker;
\r
214 int m_browserwidth, m_peekerheight;
\r
216 // application configuration
\r
217 wxConfig *OPJconfig;
\r
219 // private methods and variables
\r
221 bool m_showImages, m_showButtons;
\r
225 DECLARE_APP(OPJViewerApp)
\r
227 ///////////////////////////////////////////
\r
228 // this canvas is used to draw the image //
\r
229 ///////////////////////////////////////////
\r
230 class OPJCanvas: public wxScrolledWindow
\r
232 // public methods and variables
\r
235 // class constructor
\r
236 OPJCanvas(wxFileName fname, wxWindow *parent, const wxPoint& pos, const wxSize& size);
\r
238 virtual void OnDraw(wxDC& dc);
\r
239 void OnEvent(wxMouseEvent& event);
\r
240 void WriteText(const wxString& text) {
\r
244 wxLogMessage(text);
\r
249 OPJDecoThread *CreateDecoThread(void);
\r
250 OPJEncoThread *CreateEncoThread(void);
\r
251 OPJChildFrame *m_childframe;
\r
253 wxBitmap m_image, m_image100;
\r
254 wxFileName m_fname, m_savename;
\r
257 DECLARE_EVENT_TABLE()
\r
260 ///////////////////////////////////////////////////
\r
261 // the data associated to each tree leaf or node //
\r
262 ///////////////////////////////////////////////////
\r
263 class OPJMarkerData : public wxTreeItemData
\r
265 // public methods and variables
\r
268 // class constructor
\r
269 OPJMarkerData(const wxString& desc, const wxString& fname = wxT(""), wxFileOffset start = 0, wxFileOffset length = 0) : m_desc(desc), m_filestring(fname) { m_start = start; m_length = length; }
\r
271 void ShowInfo(wxTreeCtrl *tree);
\r
272 const wxChar *GetDesc1() const { return m_desc.c_str(); }
\r
273 const wxChar *GetDesc2() const { return m_filestring.c_str(); }
\r
274 wxFileOffset m_start, m_length;
\r
276 // private methods and variables
\r
279 wxString m_filestring;
\r
283 class OPJMarkerTree : public wxTreeCtrl
\r
289 TreeCtrlIcon_FileSelected,
\r
290 TreeCtrlIcon_Folder,
\r
291 TreeCtrlIcon_FolderSelected,
\r
292 TreeCtrlIcon_FolderOpened
\r
295 OPJMarkerTree() { };
\r
296 OPJMarkerTree(wxWindow *parent, OPJChildFrame *subframe, wxFileName fname, wxString name, const wxWindowID id,
\r
297 const wxPoint& pos, const wxSize& size,
\r
299 virtual ~OPJMarkerTree(){};
\r
300 OPJParseThread *CreateParseThread(wxTreeItemId parentid = 0x00, OPJChildFrame *subframe = NULL);
\r
301 void WriteText(const wxString& text) { wxMutexGuiEnter(); wxLogMessage(text); wxMutexGuiLeave(); }
\r
303 wxFileName m_fname;
\r
304 wxTextCtrl *m_peektextCtrl;
\r
305 OPJChildFrame *m_childframe;
\r
307 /*void OnBeginDrag(wxTreeEvent& event);
\r
308 void OnBeginRDrag(wxTreeEvent& event);
\r
309 void OnEndDrag(wxTreeEvent& event);*/
\r
310 /*void OnBeginLabelEdit(wxTreeEvent& event);
\r
311 void OnEndLabelEdit(wxTreeEvent& event);*/
\r
312 /*void OnDeleteItem(wxTreeEvent& event);*/
\r
313 /*void OnContextMenu(wxContextMenuEvent& event);*/
\r
314 void OnItemMenu(wxTreeEvent& event);
\r
315 /*void OnGetInfo(wxTreeEvent& event);
\r
316 void OnSetInfo(wxTreeEvent& event);*/
\r
317 /*void OnItemExpanded(wxTreeEvent& event);*/
\r
318 void OnItemExpanding(wxTreeEvent& event);
\r
319 /*void OnItemCollapsed(wxTreeEvent& event);
\r
320 void OnItemCollapsing(wxTreeEvent& event);*/
\r
321 void OnSelChanged(wxTreeEvent& event);
\r
322 /*void OnSelChanging(wxTreeEvent& event);*/
\r
323 /*void OnTreeKeyDown(wxTreeEvent& event);*/
\r
324 /*void OnItemActivated(wxTreeEvent& event);*/
\r
325 /*void OnItemRClick(wxTreeEvent& event);*/
\r
326 /*void OnRMouseDown(wxMouseEvent& event);
\r
327 void OnRMouseUp(wxMouseEvent& event);
\r
328 void OnRMouseDClick(wxMouseEvent& event);*/
\r
329 /*void GetItemsRecursively(const wxTreeItemId& idParent,
\r
330 wxTreeItemIdValue cookie = 0);*/
\r
332 void CreateImageList(int size = 16);
\r
333 void CreateButtonsImageList(int size = 11);
\r
335 /*void AddTestItemsToTree(size_t numChildren, size_t depth);*/
\r
336 /*void DoSortChildren(const wxTreeItemId& item, bool reverse = false)
\r
337 { m_reverseSort = reverse; wxTreeCtrl::SortChildren(item); }*/
\r
338 /*void DoEnsureVisible() { if (m_lastItem.IsOk()) EnsureVisible(m_lastItem); }*/
\r
339 /*void DoToggleIcon(const wxTreeItemId& item);*/
\r
340 /*void ShowMenu(wxTreeItemId id, const wxPoint& pt);*/
\r
342 int ImageSize(void) const { return m_imageSize; }
\r
344 void SetLastItem(wxTreeItemId id) { m_lastItem = id; }
\r
347 /*virtual int OnCompareItems(const wxTreeItemId& i1, const wxTreeItemId& i2);*/
\r
349 // is this the test item which we use in several event handlers?
\r
350 /*bool IsTestItem(const wxTreeItemId& item)
\r
352 // the test item is the first child folder
\r
353 return GetItemParent(item) == GetRootItem() && !GetPrevSibling(item);
\r
357 /*void AddItemsRecursively(const wxTreeItemId& idParent,
\r
362 void LogEvent(const wxChar *name, const wxTreeEvent& event);
\r
364 int m_imageSize; // current size of images
\r
365 bool m_reverseSort; // flag for OnCompareItems
\r
366 wxTreeItemId m_lastItem, // for OnEnsureVisible()
\r
367 m_draggedItem; // item being dragged right now
\r
369 // NB: due to an ugly wxMSW hack you _must_ use DECLARE_DYNAMIC_CLASS()
\r
370 // if you want your overloaded OnCompareItems() to be called.
\r
371 // OTOH, if you don't want it you may omit the next line - this will
\r
372 // make default (alphabetical) sorting much faster under wxMSW.
\r
373 DECLARE_DYNAMIC_CLASS(OPJMarkerTree)
\r
374 DECLARE_EVENT_TABLE()
\r
377 // this hash map stores all the trees of currently opened images, with an integer key
\r
378 WX_DECLARE_HASH_MAP(int, OPJMarkerTree*, wxIntegerHash, wxIntegerEqual, OPJMarkerTreeHash);
\r
380 // this hash map stores all the children of currently opened images, with an integer key
\r
381 WX_DECLARE_HASH_MAP(int, OPJChildFrame*, wxIntegerHash, wxIntegerEqual, OPJChildFrameHash);
\r
383 // Define a new frame
\r
384 class OPJFrame: public wxMDIParentFrame
\r
388 OPJFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, const long style);
\r
391 void OnSize(wxSizeEvent& WXUNUSED(event));
\r
392 void OnAbout(wxCommandEvent& WXUNUSED(event));
\r
393 void OnFileOpen(wxCommandEvent& WXUNUSED(event));
\r
394 void OnFileSaveAs(wxCommandEvent& WXUNUSED(event));
\r
395 void OnMemoryOpen(wxCommandEvent& WXUNUSED(event));
\r
396 void OnQuit(wxCommandEvent& WXUNUSED(event));
\r
397 void OnClose(wxCommandEvent& WXUNUSED(event));
\r
398 void OnZoom(wxCommandEvent& WXUNUSED(event));
\r
399 void OnFit(wxCommandEvent& WXUNUSED(event));
\r
400 void OnToggleBrowser(wxCommandEvent& WXUNUSED(event));
\r
401 void OnTogglePeeker(wxCommandEvent& WXUNUSED(event));
\r
402 void OnToggleToolbar(wxCommandEvent& WXUNUSED(event));
\r
403 void OnReload(wxCommandEvent& event);
\r
404 void OnPrevFrame(wxCommandEvent& event);
\r
405 void OnHomeFrame(wxCommandEvent& event);
\r
406 void OnNextFrame(wxCommandEvent& event);
\r
407 void OnSetsEnco(wxCommandEvent& event);
\r
408 void OnSetsDeco(wxCommandEvent& event);
\r
409 void OnSashDrag(wxSashEvent& event);
\r
410 void OpenFiles(wxArrayString paths, wxArrayString filenames);
\r
411 void SaveFile(wxArrayString paths, wxArrayString filenames);
\r
412 void OnNotebook(wxNotebookEvent& event);
\r
413 void Rescale(int scale, OPJChildFrame *child);
\r
415 OPJMarkerTreeHash m_treehash;
\r
416 OPJChildFrameHash m_childhash;
\r
417 wxSashLayoutWindow* markerTreeWindow;
\r
418 wxSashLayoutWindow* loggingWindow;
\r
419 wxToolBar* tool_bar;
\r
420 void Resize(int number);
\r
421 wxNotebook *m_bookCtrl;
\r
422 wxNotebook *m_bookCtrlbottom;
\r
423 wxTextCtrl *m_textCtrlbrowse;
\r
426 void TogStyle(int id, long flag);
\r
428 void DoSort(bool reverse = false);
\r
431 wxTextCtrl *m_textCtrl;
\r
433 void DoSetBold(bool bold = true);
\r
436 wxSashLayoutWindow* m_topWindow;
\r
437 wxSashLayoutWindow* m_leftWindow2;
\r
439 DECLARE_EVENT_TABLE()
\r
442 class OPJChildFrame: public wxMDIChildFrame
\r
445 OPJCanvas *m_canvas;
\r
446 OPJChildFrame(OPJFrame *parent, wxFileName fname, int winnumber, const wxString& title, const wxPoint& pos, const wxSize& size, const long style);
\r
447 ~OPJChildFrame(void);
\r
448 void OnActivate(wxActivateEvent& event);
\r
449 /*void OnQuit(wxCommandEvent& WXUNUSED(event));*/
\r
450 void OnClose(wxCloseEvent& event);
\r
451 void OnGotFocus(wxFocusEvent& event);
\r
452 void OnLostFocus(wxFocusEvent& event);
\r
454 wxFileName m_fname;
\r
457 unsigned long m_twidth, m_theight, m_tx, m_ty;
\r
459 DECLARE_EVENT_TABLE()
\r
462 // frame and main menu ids
\r
464 OPJFRAME_FILEEXIT = wxID_EXIT,
\r
465 OPJFRAME_HELPABOUT = wxID_ABOUT,
\r
467 OPJFRAME_MEMORYOPEN,
\r
468 OPJFRAME_FILESAVEAS,
\r
469 OPJFRAME_FILETOGGLEB,
\r
470 OPJFRAME_FILETOGGLEP,
\r
471 OPJFRAME_FILETOGGLET,
\r
474 OPJFRAME_VIEWRELOAD,
\r
475 OPJFRAME_VIEWPREVFRAME,
\r
476 OPJFRAME_VIEWHOMEFRAME,
\r
477 OPJFRAME_VIEWNEXTFRAME,
\r
478 OPJFRAME_FILECLOSE,
\r
482 OPJFRAME_BROWSEWIN = 10000,
\r
488 // menu and control ids
\r
491 TreeTest_Quit = wxID_EXIT,
\r
492 TreeTest_About = wxID_ABOUT,
\r
493 TreeTest_TogButtons = wxID_HIGHEST,
\r
497 TreeTest_TogHideRoot,
\r
498 TreeTest_TogRootLines,
\r
499 TreeTest_TogBorder,
\r
500 TreeTest_TogFullHighlight,
\r
501 TreeTest_SetFgColour,
\r
502 TreeTest_SetBgColour,
\r
503 TreeTest_ResetStyle,
\r
504 TreeTest_Highlight,
\r
506 TreeTest_DumpSelected,
\r
512 TreeTest_ClearBold,
\r
515 TreeTest_DeleteChildren,
\r
516 TreeTest_DeleteAll,
\r
518 TreeTest_ToggleImages,
\r
519 TreeTest_ToggleButtons,
\r
520 TreeTest_SetImageSize,
\r
521 TreeTest_ToggleSel,
\r
522 TreeTest_CollapseAndReset,
\r
523 TreeTest_EnsureVisible,
\r
525 TreeTest_InsertItem,
\r
526 TreeTest_IncIndent,
\r
527 TreeTest_DecIndent,
\r
528 TreeTest_IncSpacing,
\r
529 TreeTest_DecSpacing,
\r
530 TreeTest_ToggleIcon,
\r
533 TreeTest_SelectRoot,
\r
534 TreeTest_Ctrl = 1000,
\r
535 BOTTOM_NOTEBOOK_ID,
\r
539 class OPJEncoThread : public wxThread
\r
542 OPJEncoThread(OPJCanvas *canvas);
\r
544 // thread execution starts here
\r
545 virtual void *Entry();
\r
547 // called when the thread exits - whether it terminates normally or is
\r
548 // stopped with Delete() (but not when it is Kill()ed!)
\r
549 virtual void OnExit();
\r
551 // write something to the text control
\r
552 void WriteText(const wxString& text);
\r
556 OPJCanvas *m_canvas;
\r
559 class OPJDecoThread : public wxThread
\r
562 OPJDecoThread(OPJCanvas *canvas);
\r
564 // thread execution starts here
\r
565 virtual void *Entry();
\r
567 // called when the thread exits - whether it terminates normally or is
\r
568 // stopped with Delete() (but not when it is Kill()ed!)
\r
569 virtual void OnExit();
\r
571 // write something to the text control
\r
572 void WriteText(const wxString& text);
\r
576 OPJCanvas *m_canvas;
\r
579 class OPJParseThread : public wxThread
\r
582 OPJParseThread(OPJMarkerTree *tree, wxTreeItemId parentid = 0x00);
\r
584 // thread execution starts here
\r
585 virtual void *Entry();
\r
587 // called when the thread exits - whether it terminates normally or is
\r
588 // stopped with Delete() (but not when it is Kill()ed!)
\r
589 virtual void OnExit();
\r
591 // write something to the text control
\r
592 void WriteText(const wxString& text);
\r
593 void LoadFile(wxFileName fname);
\r
594 void ParseJ2KFile(wxFile *m_file, wxFileOffset offset, wxFileOffset length, wxTreeItemId parentid);
\r
595 void ParseJP2File(wxFile *fileid, wxFileOffset filepoint, wxFileOffset filelimit, wxTreeItemId parentid);
\r
598 OPJMarkerTree *m_tree;
\r
599 wxTreeItemId m_parentid;
\r
602 int jpeg2000parse(wxFile *fileid, wxFileOffset filepoint, wxFileOffset filelimit,
\r
603 wxTreeItemId parentid, int level, char *scansign, unsigned long int *scanpoint);
\r
604 int box_handler_function(int boxtype, wxFile *fileid, wxFileOffset filepoint, wxFileOffset filelimit,
\r
605 wxTreeItemId parentid, int level, char *scansign, unsigned long int *scanpoint);
\r
610 // Drag and drop files target
\r
611 class OPJDnDFile: public wxFileDropTarget
\r
614 OPJDnDFile(OPJFrame *pOwner) { m_pOwner = pOwner; }
\r
615 virtual bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filenames);
\r
618 OPJFrame *m_pOwner;
\r
623 // Property sheet dialog: encoder
\r
624 class OPJEncoderDialog: public wxPropertySheetDialog
\r
626 DECLARE_CLASS(OPJEncoderDialog)
\r
628 OPJEncoderDialog(wxWindow* parent, int dialogType);
\r
629 ~OPJEncoderDialog();
\r
631 wxBookCtrlBase* m_settingsNotebook;
\r
633 wxPanel* CreateMainSettingsPage(wxWindow* parent);
\r
634 wxPanel* CreatePart1_1SettingsPage(wxWindow* parent);
\r
635 wxPanel* CreatePart1_2SettingsPage(wxWindow* parent);
\r
636 /* wxPanel* CreatePart3SettingsPage(wxWindow* parent);*/
\r
638 void OnEnableJPWL(wxCommandEvent& event);
\r
639 void OnEnableComm(wxCommandEvent& event);
\r
640 void OnEnableIdx(wxCommandEvent& event);
\r
641 wxPanel* CreatePart11SettingsPage(wxWindow* parent);
\r
642 /*wxCheckBox *m_enablejpwlCheck;*/
\r
645 wxTextCtrl *m_subsamplingCtrl, *m_originCtrl, *m_rateCtrl, *m_commentCtrl;
\r
646 wxTextCtrl *m_indexCtrl, *m_qualityCtrl, *m_cbsizeCtrl, *m_prsizeCtrl, *m_pocCtrl;
\r
647 wxTextCtrl *m_tsizeCtrl, *m_toriginCtrl;
\r
648 wxCheckBox *m_enablecommCheck, *m_enableidxCheck, *m_irrevCheck, *m_sopCheck, *m_ephCheck;
\r
649 wxCheckBox *m_enablepocCheck;
\r
650 wxSpinCtrl *m_resolutionsCtrl;
\r
655 OPJENCO_ENABLEJPWL = 100,
\r
656 OPJENCO_RATEFACTOR,
\r
657 OPJENCO_QUALITYFACTOR,
\r
659 OPJENCO_CODEBLOCKSIZE,
\r
660 OPJENCO_PRECINCTSIZE,
\r
662 OPJENCO_PROGRESSION,
\r
663 OPJENCO_SUBSAMPLING,
\r
666 OPJENCO_ENABLEBYPASS,
\r
667 OPJENCO_ENABLERESET,
\r
668 OPJENCO_ENABLERESTART,
\r
670 OPJENCO_ENABLEERTERM,
\r
671 OPJENCO_ENABLESEGMARK,
\r
677 OPJENCO_ENABLEIRREV,
\r
678 OPJENCO_ENABLEINDEX,
\r
681 OPJENCO_ENABLECOMM,
\r
682 OPJENCO_COMMENTTEXT
\r
685 DECLARE_EVENT_TABLE()
\r
688 // Property sheet dialog: decoder
\r
689 class OPJDecoderDialog: public wxPropertySheetDialog
\r
691 DECLARE_CLASS(OPJDecoderDialog)
\r
693 OPJDecoderDialog(wxWindow* parent, int dialogType);
\r
694 ~OPJDecoderDialog();
\r
696 wxBookCtrlBase* m_settingsNotebook;
\r
697 wxCheckBox *m_enabledecoCheck, *m_enableparseCheck;
\r
698 wxSpinCtrl *m_reduceCtrl, *m_layerCtrl, *m_numcompsCtrl;
\r
699 wxRadioBox* m_resizeBox;
\r
701 void OnEnableDeco(wxCommandEvent& event);
\r
703 wxPanel* CreateMainSettingsPage(wxWindow* parent);
\r
704 wxPanel* CreatePart1SettingsPage(wxWindow* parent);
\r
705 wxPanel* CreatePart3SettingsPage(wxWindow* parent);
\r
707 void OnEnableJPWL(wxCommandEvent& event);
\r
708 wxPanel* CreatePart11SettingsPage(wxWindow* parent);
\r
709 wxSpinCtrl *m_expcompsCtrl, *m_framenumCtrl, *m_maxtilesCtrl;
\r
710 wxCheckBox *m_enablejpwlCheck;
\r
717 OPJDECO_RESMETHOD = 100,
\r
718 OPJDECO_REDUCEFACTOR,
\r
719 OPJDECO_QUALITYLAYERS,
\r
721 OPJDECO_ENABLEDECO,
\r
722 OPJDECO_ENABLEPARSE,
\r
723 OPJDECO_ENABLEJPWL,
\r
729 DECLARE_EVENT_TABLE()
\r
732 #endif //__OPJ_VIEWER_H__
\r