1 /*
2  * StartWithApp.h
3  *
4  * Copyright (C) 2007 J. "MUFTI" Scheurich
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program (see the file "COPYING" for details); if
18  * not, write to the Free Software Foundation, Inc., 675 Mass Ave,
19  * Cambridge, MA 02139, USA.
20  */
21 
22 #pragma once
23 
24 class StartWithApp {
25 public:
26                         StartWithApp();
27 
GetStartVariant()28     char               *GetStartVariant()
29                            { return m_startVariant;}
SetStartVariant(const char * variant)30     void                SetStartVariant(const char *variant)
31                            {
32                            if (m_startVariant != NULL)
33                                free(m_startVariant);
34                            m_startVariant = strdup(variant);
35                            }
36 
GetStartLanguage()37     char               *GetStartLanguage()
38                            { return m_startLanguage;}
SetStartLanguage(const char * language)39     void                SetStartLanguage(const char *language)
40                            {
41                            if (m_startLanguage != NULL)
42                                free(m_startLanguage);
43                            m_startLanguage = strdup(language);
44                            }
45 
getDefaultSceneLength()46     double              getDefaultSceneLength()
47                            { return m_defaultSceneLength; }
setDefaultSceneLength(double time)48     void                setDefaultSceneLength(double time)
49                            { m_defaultSceneLength = time; }
50 
51     void                StartWithSetDefaults();
52 
53     void                StartWithLoadPreferences();
54     void                StartWithSavePreferences();
55 
56 private:
57     char               *m_startVariant;
58     char               *m_startLanguage;
59     double              m_defaultSceneLength;
60 };
61 
62 
63