Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[6cdbff]: src / hugin1 / hugin / huginApp.h Maximize Restore History

Download this file

huginApp.h    129 lines (98 with data), 2.8 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
// -*- c-basic-offset: 4 -*-
/** @file huginApp.h
*
* @author Pablo d'Angelo <pablo.dangelo@web.de>
*
* $Id$
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this software; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef _HUGINAPP_H
#define _HUGINAPP_H
#include "config.h"
#include "hugin/MainFrame.h"
// utility functions
bool str2double(wxString s, double & d);
/// Store window size and position in configfile/registry
void StoreFramePosition(wxTopLevelWindow * frame, const wxString & basename);
/// Restore window size and position from configfile/registry
void RestoreFramePosition(wxTopLevelWindow * frame, const wxString & basename);
///
wxString getDefaultProjectName(const Panorama & pano);
/** Resources Definition
*
*/
#ifdef _INCLUDE_UI_RESOURCES
void InitXmlResource();
#endif
/** The application class for hugin.
*
* it contains the main frame.
*/
class huginApp : public wxApp
{
public:
/** ctor.
*/
huginApp();
/** dtor.
*/
virtual ~huginApp();
/** pseudo constructor. with the ability to fail gracefully.
*/
virtual bool OnInit();
/** just for testing purposes */
virtual int OnExit();
/// hack.. kind of a pseudo singleton...
static huginApp * Get();
/** return currently active locale */
wxLocale & GetLocale()
{
return locale;
}
wxString GetWorkDir()
{
return m_workDir;
}
/** return the current xrc path */
const wxString & GetXRCPath()
{
return m_xrcPrefix;
}
#ifdef __WXMAC__
//Defined in wxApp.h; This one lets project file to be opened from Finder and other applications.
void MacOpenFile(const wxString &fileName);
#endif
private:
/** locale for internationalisation */
wxLocale locale;
/** temporary working directory */
wxString m_workDir;
MainFrame * frame;
// self
static huginApp * m_this;
// the model
Panorama pano;
wxString m_xrcPrefix;
wxString m_utilsBinDir;
#ifdef __WXMAC__
bool m_macInitDone;
bool m_macOpenFileOnStart;
wxString m_macFileNameToOpenOnStart;
#endif
};
DECLARE_APP(huginApp)
#endif // _HUGINAPP_H