2007-11-16 18:25:45 +00:00
|
|
|
/* ASE - Allegro Sprite Editor
|
2010-02-01 21:25:40 +00:00
|
|
|
* Copyright (C) 2001-2010 David Capello
|
2007-09-18 23:57:02 +00:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*/
|
|
|
|
|
2009-12-11 14:53:05 +00:00
|
|
|
#ifndef APP_H_INCLUDED
|
|
|
|
#define APP_H_INCLUDED
|
2007-09-18 23:57:02 +00:00
|
|
|
|
2007-12-05 01:30:50 +00:00
|
|
|
#include "jinete/jbase.h"
|
2010-03-01 02:36:05 +00:00
|
|
|
#include "Vaca/Signal.h"
|
2007-09-18 23:57:02 +00:00
|
|
|
|
2010-01-29 03:15:33 +00:00
|
|
|
#include <vector>
|
|
|
|
|
2010-09-18 20:36:21 +00:00
|
|
|
class CheckArgs;
|
|
|
|
class ColorBar;
|
|
|
|
class ConfigModule;
|
2010-03-01 02:36:05 +00:00
|
|
|
class Frame;
|
2008-10-01 01:27:51 +00:00
|
|
|
class Layer;
|
2010-01-29 03:15:33 +00:00
|
|
|
class LegacyModules;
|
2010-09-18 20:36:21 +00:00
|
|
|
class LoggerModule;
|
2010-03-01 02:36:05 +00:00
|
|
|
class Params;
|
2010-09-18 20:36:21 +00:00
|
|
|
class RecentFiles;
|
2010-03-01 02:36:05 +00:00
|
|
|
class Sprite;
|
2010-03-29 03:00:25 +00:00
|
|
|
class StatusBar;
|
2010-06-13 20:51:22 +00:00
|
|
|
class Tabs;
|
2010-09-18 20:36:21 +00:00
|
|
|
class ToolBox;
|
2010-01-29 03:15:33 +00:00
|
|
|
|
2009-10-09 01:34:06 +00:00
|
|
|
class App
|
2009-08-05 01:53:02 +00:00
|
|
|
{
|
|
|
|
public:
|
2010-03-13 01:16:05 +00:00
|
|
|
App();
|
2009-10-09 01:34:06 +00:00
|
|
|
~App();
|
|
|
|
|
|
|
|
static App* instance() { return m_instance; }
|
2009-08-05 01:53:02 +00:00
|
|
|
|
2010-09-18 20:36:21 +00:00
|
|
|
// Returns true if ASE is running with GUI available.
|
|
|
|
bool isGui() const { return m_isGui; }
|
|
|
|
|
|
|
|
// Runs the ASE application. In GUI mode it's the top-level window,
|
|
|
|
// in console/scripting it just runs the specified scripts.
|
2009-10-14 14:09:59 +00:00
|
|
|
int run();
|
|
|
|
|
2010-09-18 20:36:21 +00:00
|
|
|
LoggerModule* getLogger() const;
|
2010-09-18 03:28:24 +00:00
|
|
|
ToolBox* get_toolbox() const;
|
|
|
|
RecentFiles* getRecentFiles() const;
|
- All tools stuff refactored in various files/components.
- Added classes: IToolLoop, Tool, ToolGroup, ToolInk, ToolController, ToolPointShape, ToolIntertwine, ToolBox, etc.
- Added ToolLoopManager.
- Removed old src/modules/tools.cpp.
- Added ISettings and UISettingsImpl, adding the tools settings (onion skinning, grid, tiled mode, etc.).
- Added App::PenSizeBeforeChange, PenSizeAfterChange, CurrentToolChange signals.
- Renamed Context::get_bg/fg_color to getBg/FgColor.
- Refactored Brush class to Pen and added PenType.
- Renamed tiled_t to TiledMode.
- get_config_rect now uses the new Rect class imported from Vaca instead of old jrect.
- Added default_skin.xml to load tool icons.
- Added pen preview in Editor::cursor stuff.
- Added Editor::decorators.
Note: This big patch is from some time ago. I did my best to pre-commit other small changes before this big one.
2010-03-07 19:47:45 +00:00
|
|
|
|
2010-03-01 02:36:05 +00:00
|
|
|
// App Signals
|
|
|
|
Vaca::Signal0<void> Exit;
|
|
|
|
Vaca::Signal0<void> PaletteChange;
|
- All tools stuff refactored in various files/components.
- Added classes: IToolLoop, Tool, ToolGroup, ToolInk, ToolController, ToolPointShape, ToolIntertwine, ToolBox, etc.
- Added ToolLoopManager.
- Removed old src/modules/tools.cpp.
- Added ISettings and UISettingsImpl, adding the tools settings (onion skinning, grid, tiled mode, etc.).
- Added App::PenSizeBeforeChange, PenSizeAfterChange, CurrentToolChange signals.
- Renamed Context::get_bg/fg_color to getBg/FgColor.
- Refactored Brush class to Pen and added PenType.
- Renamed tiled_t to TiledMode.
- get_config_rect now uses the new Rect class imported from Vaca instead of old jrect.
- Added default_skin.xml to load tool icons.
- Added pen preview in Editor::cursor stuff.
- Added Editor::decorators.
Note: This big patch is from some time ago. I did my best to pre-commit other small changes before this big one.
2010-03-07 19:47:45 +00:00
|
|
|
Vaca::Signal0<void> PenSizeBeforeChange;
|
|
|
|
Vaca::Signal0<void> PenSizeAfterChange;
|
|
|
|
Vaca::Signal0<void> CurrentToolChange;
|
2010-09-18 20:36:21 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
class Modules;
|
|
|
|
|
|
|
|
static App* m_instance;
|
|
|
|
|
|
|
|
ConfigModule* m_configModule;
|
|
|
|
CheckArgs* m_checkArgs;
|
|
|
|
LoggerModule* m_loggerModule;
|
|
|
|
Modules* m_modules;
|
|
|
|
LegacyModules* m_legacy;
|
|
|
|
bool m_isGui;
|
2009-10-14 14:09:59 +00:00
|
|
|
};
|
2008-03-22 18:43:56 +00:00
|
|
|
|
2009-06-11 15:11:11 +00:00
|
|
|
void app_refresh_screen(const Sprite* sprite);
|
2007-09-18 23:57:02 +00:00
|
|
|
|
2008-10-01 01:27:51 +00:00
|
|
|
void app_realloc_sprite_list();
|
|
|
|
bool app_realloc_recent_list();
|
2007-09-18 23:57:02 +00:00
|
|
|
|
2008-10-01 01:27:51 +00:00
|
|
|
int app_get_current_image_type();
|
2007-09-18 23:57:02 +00:00
|
|
|
|
2010-01-26 00:38:05 +00:00
|
|
|
Frame* app_get_top_window();
|
|
|
|
Widget* app_get_menubar();
|
2010-03-29 03:00:25 +00:00
|
|
|
StatusBar* app_get_statusbar();
|
2010-04-10 20:01:56 +00:00
|
|
|
ColorBar* app_get_colorbar();
|
2010-01-26 00:38:05 +00:00
|
|
|
Widget* app_get_toolbar();
|
2010-06-13 20:51:22 +00:00
|
|
|
Tabs* app_get_tabsbar();
|
2007-09-18 23:57:02 +00:00
|
|
|
|
2008-10-01 01:27:51 +00:00
|
|
|
void app_default_statusbar_message();
|
2007-09-18 23:57:02 +00:00
|
|
|
|
2008-10-01 01:27:51 +00:00
|
|
|
int app_get_color_to_clear_layer(Layer* layer);
|
2008-03-27 14:29:33 +00:00
|
|
|
|
2009-08-17 21:38:00 +00:00
|
|
|
#endif
|
2007-09-18 23:57:02 +00:00
|
|
|
|