leocad/common/lc_application.h

49 lines
1.1 KiB
C
Raw Normal View History

2013-08-09 06:57:18 +02:00
#ifndef _LC_APPLICATION_H_
#define _LC_APPLICATION_H_
2013-08-16 01:43:18 +02:00
#include "lc_array.h"
2013-08-09 06:57:18 +02:00
#include "str.h"
class Project;
class lcPiecesLibrary;
class lcApplication
{
public:
lcApplication();
~lcApplication();
bool Initialize(int argc, char *argv[], const char* LibraryInstallPath, const char* LibraryCachePath);
void Shutdown();
bool LoadPiecesLibrary(const char* LibPath, const char* LibraryInstallPath, const char* LibraryCachePath);
void OpenURL(const char* URL);
2013-08-17 01:17:25 +02:00
void RunProcess(const char* ExecutablePath, const lcArray<String>& Arguments);
void GetFileList(const char* Path, lcArray<String>& FileList);
2013-08-09 06:57:18 +02:00
void SetClipboard(lcFile* Clipboard);
void ExportClipboard(lcMemFile* Clipboard);
Project* mProject;
lcPiecesLibrary* m_Library;
lcFile* mClipboard;
protected:
void ParseIntegerArgument(int* CurArg, int argc, char* argv[], int* Value);
void ParseStringArgument(int* CurArg, int argc, char* argv[], char** Value);
};
extern lcApplication* g_App;
inline lcPiecesLibrary* lcGetPiecesLibrary()
{
return g_App->m_Library;
}
inline Project* lcGetActiveProject()
{
return g_App->mProject;
}
#endif // _LC_APPLICATION_H_