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;
|
|
|
|
|
2014-02-10 01:13:41 +01:00
|
|
|
enum lcLightingMode
|
|
|
|
{
|
|
|
|
LC_LIGHTING_FLAT,
|
|
|
|
LC_LIGHTING_FAKE,
|
|
|
|
LC_LIGHTING_FULL
|
|
|
|
};
|
|
|
|
|
|
|
|
class lcPreferences
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
void LoadDefaults();
|
|
|
|
void SaveDefaults();
|
|
|
|
|
|
|
|
int mMouseSensitivity;
|
|
|
|
lcLightingMode mLightingMode;
|
|
|
|
bool mDrawAxes;
|
|
|
|
bool mDrawEdgeLines;
|
|
|
|
float mLineWidth;
|
|
|
|
bool mDrawGridStuds;
|
|
|
|
lcuint32 mGridStudColor;
|
|
|
|
bool mDrawGridLines;
|
|
|
|
int mGridLineSpacing;
|
|
|
|
lcuint32 mGridLineColor;
|
|
|
|
};
|
|
|
|
|
2013-08-09 06:57:18 +02:00
|
|
|
class lcApplication
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
lcApplication();
|
|
|
|
~lcApplication();
|
|
|
|
|
2014-09-13 00:47:08 +02:00
|
|
|
bool Initialize(int argc, char *argv[], const char* LibraryInstallPath, const char* LDrawPath, const char* LibraryCachePath);
|
2013-08-09 06:57:18 +02:00
|
|
|
void Shutdown();
|
2014-02-10 01:13:41 +01:00
|
|
|
void ShowPreferencesDialog();
|
2013-08-09 06:57:18 +02:00
|
|
|
|
2014-09-13 00:47:08 +02:00
|
|
|
bool LoadPiecesLibrary(const char* LibPath, const char* LibraryInstallPath, const char* LDrawPath, const char* LibraryCachePath);
|
2013-08-09 06:57:18 +02:00
|
|
|
|
|
|
|
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;
|
2014-02-10 01:13:41 +01:00
|
|
|
lcPiecesLibrary* mLibrary;
|
|
|
|
lcPreferences mPreferences;
|
2013-08-09 06:57:18 +02:00
|
|
|
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()
|
|
|
|
{
|
2014-02-10 01:13:41 +01:00
|
|
|
return g_App->mLibrary;
|
2013-08-09 06:57:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
inline Project* lcGetActiveProject()
|
|
|
|
{
|
|
|
|
return g_App->mProject;
|
|
|
|
}
|
|
|
|
|
2014-02-10 01:13:41 +01:00
|
|
|
inline const lcPreferences& lcGetPreferences()
|
|
|
|
{
|
|
|
|
return g_App->mPreferences;
|
|
|
|
}
|
|
|
|
|
2013-08-09 06:57:18 +02:00
|
|
|
#endif // _LC_APPLICATION_H_
|