2010-02-04 13:33:47 +02:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2006 by Massimiliano Torromeo *
|
|
|
|
* massimiliano.torromeo@gmail.com *
|
|
|
|
* *
|
|
|
|
* This program 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 program 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 General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
* along with this program; if not, write to the *
|
|
|
|
* Free Software Foundation, Inc., *
|
|
|
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
|
|
|
***************************************************************************/
|
|
|
|
#ifndef LINKAPP_H
|
|
|
|
#define LINKAPP_H
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
#include "link.h"
|
|
|
|
|
|
|
|
using std::string;
|
|
|
|
|
|
|
|
class GMenu2X;
|
2010-07-28 00:22:46 +03:00
|
|
|
class InputManager;
|
2010-02-04 13:33:47 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
Parses links files.
|
|
|
|
|
|
|
|
@author Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
|
|
|
|
*/
|
|
|
|
class LinkApp : public Link {
|
|
|
|
private:
|
2010-07-28 00:22:46 +03:00
|
|
|
InputManager &inputMgr;
|
2010-02-04 13:33:47 +02:00
|
|
|
string sclock, svolume;
|
|
|
|
int iclock, ivolume;
|
|
|
|
//G
|
|
|
|
string sgamma;
|
|
|
|
//G
|
|
|
|
int igamma;
|
|
|
|
string exec, params, workdir, manual, selectordir, selectorfilter, selectorscreens;
|
|
|
|
bool selectorbrowser, useRamTimings;
|
|
|
|
void drawRun();
|
|
|
|
|
|
|
|
string aliasfile;
|
2010-07-27 22:26:02 +03:00
|
|
|
string file;
|
|
|
|
|
|
|
|
bool wrapper;
|
|
|
|
bool dontleave;
|
2010-02-04 13:33:47 +02:00
|
|
|
|
|
|
|
public:
|
2010-07-28 00:22:46 +03:00
|
|
|
LinkApp(GMenu2X *gmenu2x, InputManager &inputMgr, const char* linkfile);
|
2010-05-02 15:29:09 +03:00
|
|
|
virtual const string &searchIcon();
|
|
|
|
|
|
|
|
const string &getExec();
|
|
|
|
void setExec(const string &exec);
|
|
|
|
const string &getParams();
|
|
|
|
void setParams(const string ¶ms);
|
|
|
|
const string &getWorkdir();
|
|
|
|
void setWorkdir(const string &workdir);
|
|
|
|
const string &getManual();
|
|
|
|
void setManual(const string &manual);
|
|
|
|
const string &getSelectorDir();
|
|
|
|
void setSelectorDir(const string &selectordir);
|
2010-02-04 13:33:47 +02:00
|
|
|
bool getSelectorBrowser();
|
|
|
|
void setSelectorBrowser(bool value);
|
|
|
|
bool getUseRamTimings();
|
|
|
|
void setUseRamTimings(bool value);
|
2010-05-02 15:29:09 +03:00
|
|
|
const string &getSelectorScreens();
|
|
|
|
void setSelectorScreens(const string &selectorscreens);
|
|
|
|
const string &getSelectorFilter();
|
|
|
|
void setSelectorFilter(const string &selectorfilter);
|
|
|
|
const string &getAliasFile();
|
|
|
|
void setAliasFile(const string &aliasfile);
|
2010-02-04 13:33:47 +02:00
|
|
|
|
|
|
|
int clock();
|
2010-05-02 15:29:09 +03:00
|
|
|
const string &clockStr(int maxClock);
|
2010-02-04 13:33:47 +02:00
|
|
|
void setClock(int mhz);
|
|
|
|
|
|
|
|
int volume();
|
2010-05-02 15:29:09 +03:00
|
|
|
const string &volumeStr();
|
2010-02-04 13:33:47 +02:00
|
|
|
void setVolume(int vol);
|
|
|
|
|
|
|
|
//G
|
|
|
|
int gamma();
|
2010-05-02 15:29:09 +03:00
|
|
|
const string &gammaStr();
|
2010-02-04 13:33:47 +02:00
|
|
|
void setGamma(int gamma);
|
|
|
|
|
|
|
|
bool save();
|
|
|
|
void run();
|
|
|
|
void showManual();
|
2010-05-02 15:29:09 +03:00
|
|
|
void selector(int startSelection=0, const string &selectorDir="");
|
|
|
|
void launch(const string &selectedFile="", const string &selectedDir="");
|
2010-02-04 13:33:47 +02:00
|
|
|
bool targetExists();
|
2010-07-27 22:26:02 +03:00
|
|
|
|
|
|
|
const string &getFile() { return file; }
|
|
|
|
void renameFile(const string &name);
|
|
|
|
bool &needsWrapperRef() { return wrapper; }
|
|
|
|
bool &runsInBackgroundRef() { return dontleave; }
|
2010-02-04 13:33:47 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|