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