Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. /*
  2.  * Copyright (c) 2007, Digital Signal Processing Laboratory, Universita'  degli studi di Perugia (UPG), Italy
  3.  * All rights reserved.
  4.  *
  5.  * Redistribution and use in source and binary forms, with or without
  6.  * modification, are permitted provided that the following conditions
  7.  * are met:
  8.  * 1. Redistributions of source code must retain the above copyright
  9.  *    notice, this list of conditions and the following disclaimer.
  10.  * 2. Redistributions in binary form must reproduce the above copyright
  11.  *    notice, this list of conditions and the following disclaimer in the
  12.  *    documentation and/or other materials provided with the distribution.
  13.  *
  14.  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
  15.  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  16.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  17.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  18.  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  19.  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  20.  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  21.  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  22.  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  23.  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  24.  * POSSIBILITY OF SUCH DAMAGE.
  25.  */
  26. #ifdef USE_MXF
  27. #include "mxflib/mxflib.h"
  28. #endif // USE_MXF
  29.  
  30. #include "OPJViewer.h"
  31.  
  32. // about window for the frame
  33. void OPJFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
  34. {
  35. #ifdef OPJ_HTMLABOUT
  36. #include "about_htm.h"
  37. #include "opj_logo.xpm"
  38.  
  39.     wxBoxSizer *topsizer;
  40.     wxHtmlWindow *html;
  41.     wxDialog dlg(this, wxID_ANY, wxString(_("About")));
  42.  
  43.     wxMemoryFSHandler::AddFile(wxT("opj_logo.xpm"), wxBitmap(opj_logo), wxBITMAP_TYPE_XPM);
  44.  
  45.     topsizer = new wxBoxSizer(wxVERTICAL);
  46.  
  47.     html = new wxHtmlWindow(&dlg, wxID_ANY, wxDefaultPosition, wxSize(320, 250), wxHW_SCROLLBAR_NEVER);
  48.     html->SetBorders(0);
  49.     //html->LoadPage(wxT("about/about.htm"));
  50.         //html->SetPage("<html><body>Hello, world!</body></html>");
  51.         html->SetPage(htmlaboutpage);
  52.     html->SetSize(html->GetInternalRepresentation()->GetWidth(),
  53.                     html->GetInternalRepresentation()->GetHeight());
  54.  
  55.     topsizer->Add(html, 1, wxALL, 10);
  56.  
  57.     topsizer->Add(new wxStaticLine(&dlg, wxID_ANY), 0, wxEXPAND | wxLEFT | wxRIGHT, 10);
  58.  
  59.     wxButton *bu1 = new wxButton(&dlg, wxID_OK, wxT("OK"));
  60.     bu1->SetDefault();
  61.  
  62.     topsizer->Add(bu1, 0, wxALL | wxALIGN_RIGHT, 15);
  63.  
  64.     dlg.SetSizer(topsizer);
  65.     topsizer->Fit(&dlg);
  66.  
  67.     dlg.ShowModal();
  68.  
  69. #else
  70.  
  71.         wxMessageBox(wxString::Format(OPJ_APPLICATION_TITLEBAR
  72.                                                                   wxT("\n\n")
  73.                                                                   wxT("Built with %s and OpenJPEG ")
  74.                                                                   wxT(OPENJPEG_VERSION)
  75.                                                                   wxT("\non ") wxT(__DATE__) wxT(", ") wxT(__TIME__)
  76.                                                                   wxT("\nRunning under %s\n\n")
  77.                                                                   OPJ_APPLICATION_COPYRIGHT,
  78.                                                                   wxVERSION_STRING,
  79.                                                                   wxGetOsDescription().c_str()),
  80.                                  wxT("About ") OPJ_APPLICATION_NAME,
  81.                                  wxOK | wxICON_INFORMATION,
  82.                                  this
  83.                                  );
  84.  
  85. #endif
  86.  
  87. }
  88.