[4] | 1 | /*============================================================================= |
---|
| 2 | |
---|
| 3 | Program: JuxtaView for SAGE |
---|
| 4 | Module: main.cpp - Part of JuxtaView's UI |
---|
| 5 | Authors: Arun Rao, arao@evl.uic.edu, |
---|
| 6 | Ratko Jagodic, rjagodic@evl.uic.edu, |
---|
| 7 | Nicholas Schwarz, schwarz@evl.uic.edu, |
---|
| 8 | et al. |
---|
| 9 | Date: 30 September 2004 |
---|
| 10 | Modified: 28 October 2004 |
---|
| 11 | |
---|
| 12 | Copyright (c) 2005 Electronic Visualization Laboratory, |
---|
| 13 | University of Illinois at Chicago |
---|
| 14 | |
---|
| 15 | All rights reserved. |
---|
| 16 | * |
---|
| 17 | * Redistribution and use in source and binary forms, with or without |
---|
| 18 | * modification, are permitted provided that the following conditions are met: |
---|
| 19 | * |
---|
| 20 | * * Redistributions of source code must retain the above copyright |
---|
| 21 | * notice, this list of conditions and the following disclaimer. |
---|
| 22 | * * Redistributions in binary form must reproduce the above |
---|
| 23 | * copyright notice, this list of conditions and the following disclaimer |
---|
| 24 | * in the documentation and/or other materials provided with the distribution. |
---|
| 25 | * * Neither the name of the University of Illinois at Chicago nor |
---|
| 26 | * the names of its contributors may be used to endorse or promote |
---|
| 27 | * products derived from this software without specific prior written permission. |
---|
| 28 | * |
---|
| 29 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
---|
| 30 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
---|
| 31 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
---|
| 32 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR |
---|
| 33 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
---|
| 34 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
---|
| 35 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
---|
| 36 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
---|
| 37 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
---|
| 38 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
---|
| 39 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
---|
| 40 | |
---|
| 41 | Direct questions, comments, etc. to schwarz@evl.uic.edu or |
---|
| 42 | http://www.evl.uic.edu/cavern/forum/ |
---|
| 43 | |
---|
| 44 | =============================================================================*/ |
---|
| 45 | |
---|
| 46 | #include "JuxtaSCUI.h" |
---|
| 47 | #include <wx/wx.h> |
---|
| 48 | #include <wx/frame.h> |
---|
| 49 | |
---|
| 50 | JuxtaSCUIFrame* gMainFrame = NULL; |
---|
| 51 | wxApp* gApp = NULL; |
---|
| 52 | |
---|
| 53 | class JuxtaViewSCUIApp : public wxApp |
---|
| 54 | { |
---|
| 55 | public: |
---|
| 56 | bool OnInit(); |
---|
| 57 | int OnExit(); |
---|
| 58 | }; |
---|
| 59 | |
---|
| 60 | IMPLEMENT_APP(JuxtaViewSCUIApp) |
---|
| 61 | |
---|
| 62 | |
---|
| 63 | bool JuxtaViewSCUIApp::OnInit() |
---|
| 64 | { |
---|
| 65 | bool overview = true; |
---|
| 66 | |
---|
| 67 | gApp = (wxApp*) this; |
---|
| 68 | char* skinfile = NULL; |
---|
| 69 | /* |
---|
| 70 | if( argc > 1 ) |
---|
| 71 | skinfile = argv[1]; |
---|
| 72 | */ |
---|
| 73 | #if defined(_WIN32) || defined(WIN32) || defined(WINDOWS) || defined(_WINDOWS_) |
---|
| 74 | JuxtaSCUIFrame* mainFrame = new JuxtaSCUIFrame(overview,skinfile,0,-1,"JuxtaView SC",wxPoint(0,0),wxSize(405,430)); |
---|
| 75 | #elif defined(MAC_OSX) |
---|
| 76 | JuxtaSCUIFrame* mainFrame = new JuxtaSCUIFrame(overview,skinfile,0,-1,"JuxtaView SC",wxPoint(0,0),wxSize(400,420)); |
---|
| 77 | #else |
---|
| 78 | JuxtaSCUIFrame* mainFrame = new JuxtaSCUIFrame(overview,skinfile,0,-1,"JuxtaView SC",wxPoint(0,0),wxSize(400,400)); |
---|
| 79 | #endif |
---|
| 80 | mainFrame->Init(wxApp::argv[1]); |
---|
| 81 | mainFrame->Layout(); |
---|
| 82 | mainFrame->Show(); |
---|
| 83 | |
---|
| 84 | gMainFrame = mainFrame; |
---|
| 85 | |
---|
| 86 | return true; |
---|
| 87 | } |
---|
| 88 | |
---|
| 89 | int JuxtaViewSCUIApp::OnExit() |
---|
| 90 | { |
---|
| 91 | return 0; |
---|
| 92 | } |
---|