mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-16 10:20:50 +00:00
Add missing "override" modifier on some member functions
These ones were detected by clang-700.0.72
This commit is contained in:
parent
e2c0e0a435
commit
460d4b47c9
@ -24,7 +24,7 @@ namespace cmd {
|
||||
void onExecute() override;
|
||||
void onUndo() override;
|
||||
void onFireNotifications() override;
|
||||
size_t onMemSize() const {
|
||||
size_t onMemSize() const override {
|
||||
return sizeof(*this);
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ namespace cmd {
|
||||
void onExecute() override;
|
||||
void onUndo() override;
|
||||
void onFireNotifications() override;
|
||||
size_t onMemSize() const {
|
||||
size_t onMemSize() const override {
|
||||
return sizeof(*this);
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ namespace cmd {
|
||||
protected:
|
||||
void onExecute() override;
|
||||
void onUndo() override;
|
||||
void onFireNotifications();
|
||||
void onFireNotifications() override;
|
||||
size_t onMemSize() const override {
|
||||
return sizeof(*this);
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ public:
|
||||
Command* clone() const override { return new AboutCommand(*this); }
|
||||
|
||||
protected:
|
||||
void onExecute(Context* context);
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
AboutCommand::AboutCommand()
|
||||
|
@ -30,7 +30,7 @@ public:
|
||||
Command* clone() const override { return new AdvancedModeCommand(*this); }
|
||||
|
||||
protected:
|
||||
void onExecute(Context* context);
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
AdvancedModeCommand::AdvancedModeCommand()
|
||||
|
@ -26,8 +26,8 @@ public:
|
||||
Command* clone() const override { return new BackgroundFromLayerCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
BackgroundFromLayerCommand::BackgroundFromLayerCommand()
|
||||
|
@ -274,8 +274,8 @@ public:
|
||||
Command* clone() const override { return new CanvasSizeCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
CanvasSizeCommand::CanvasSizeCommand()
|
||||
|
@ -30,8 +30,8 @@ public:
|
||||
Command* clone() const override { return new ClearCelCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
ClearCelCommand::ClearCelCommand()
|
||||
|
@ -24,8 +24,8 @@ public:
|
||||
Command* clone() const override { return new CopyCelCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
CopyCelCommand::CopyCelCommand()
|
||||
|
@ -88,8 +88,8 @@ public:
|
||||
Command* clone() const override { return new AutocropSpriteCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
AutocropSpriteCommand::AutocropSpriteCommand()
|
||||
|
@ -25,8 +25,8 @@ public:
|
||||
Command* clone() const override { return new DeselectMaskCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
DeselectMaskCommand::DeselectMaskCommand()
|
||||
|
@ -31,8 +31,8 @@ public:
|
||||
Command* clone() const override { return new DuplicateLayerCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
DuplicateLayerCommand::DuplicateLayerCommand()
|
||||
|
@ -33,8 +33,8 @@ public:
|
||||
Command* clone() const override { return new DuplicateSpriteCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
DuplicateSpriteCommand::DuplicateSpriteCommand()
|
||||
|
@ -24,7 +24,7 @@ public:
|
||||
Command* clone() const override { return new ExitCommand(*this); }
|
||||
|
||||
protected:
|
||||
void onExecute(Context* context);
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
ExitCommand::ExitCommand()
|
||||
|
@ -25,8 +25,8 @@ public:
|
||||
Command* clone() const override { return new FlattenLayersCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
FlattenLayersCommand::FlattenLayersCommand()
|
||||
|
@ -257,8 +257,8 @@ public:
|
||||
Command* clone() const override { return new FullscreenPreviewCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
FullscreenPreviewCommand::FullscreenPreviewCommand()
|
||||
|
@ -42,8 +42,8 @@ public:
|
||||
Command* clone() const override { return new GotoPreviousLayerCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
GotoPreviousLayerCommand::GotoPreviousLayerCommand()
|
||||
@ -81,8 +81,8 @@ public:
|
||||
Command* clone() const override { return new GotoNextLayerCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
GotoNextLayerCommand::GotoNextLayerCommand()
|
||||
|
@ -29,8 +29,8 @@ public:
|
||||
Command* clone() const override { return new InvertMaskCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
InvertMaskCommand::InvertMaskCommand()
|
||||
|
@ -446,7 +446,7 @@ public:
|
||||
Command* clone() const override { return new KeyboardShortcutsCommand(*this); }
|
||||
|
||||
protected:
|
||||
void onExecute(Context* context);
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
KeyboardShortcutsCommand::KeyboardShortcutsCommand()
|
||||
|
@ -26,8 +26,8 @@ public:
|
||||
Command* clone() const override { return new LayerFromBackgroundCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
LayerFromBackgroundCommand::LayerFromBackgroundCommand()
|
||||
|
@ -25,8 +25,8 @@ public:
|
||||
Command* clone() const override { return new MaskAllCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
MaskAllCommand::MaskAllCommand()
|
||||
|
@ -50,8 +50,8 @@ public:
|
||||
Command* clone() const override { return new MaskByColorCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
|
||||
private:
|
||||
Mask* generateMask(const Sprite* sprite, const Image* image, int xpos, int ypos);
|
||||
|
@ -34,8 +34,8 @@ public:
|
||||
Command* clone() const override { return new MaskContentCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
MaskContentCommand::MaskContentCommand()
|
||||
|
@ -38,8 +38,8 @@ public:
|
||||
Command* clone() const override { return new MergeDownLayerCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
MergeDownLayerCommand::MergeDownLayerCommand()
|
||||
|
@ -24,8 +24,8 @@ public:
|
||||
Command* clone() const override { return new MoveCelCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
MoveCelCommand::MoveCelCommand()
|
||||
|
@ -43,7 +43,7 @@ public:
|
||||
Command* clone() const override { return new NewFileCommand(*this); }
|
||||
|
||||
protected:
|
||||
void onExecute(Context* context);
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
static int _sprite_counter = 0;
|
||||
|
@ -33,8 +33,8 @@ public:
|
||||
Command* clone() const override { return new NewLayerSetCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
NewLayerSetCommand::NewLayerSetCommand()
|
||||
|
@ -31,14 +31,12 @@ public:
|
||||
Command* clone() const override { return new ShowOnionSkinCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onChecked(Context* context)
|
||||
{
|
||||
bool onChecked(Context* context) override {
|
||||
DocumentPreferences& docPref = Preferences::instance().document(context->activeDocument());
|
||||
return docPref.onionskin.active();
|
||||
}
|
||||
|
||||
void onExecute(Context* context)
|
||||
{
|
||||
void onExecute(Context* context) override {
|
||||
DocumentPreferences& docPref = Preferences::instance().document(context->activeDocument());
|
||||
docPref.onionskin.active(!docPref.onionskin.active());
|
||||
}
|
||||
|
@ -390,7 +390,7 @@ public:
|
||||
Command* clone() const override { return new OptionsCommand(*this); }
|
||||
|
||||
protected:
|
||||
void onExecute(Context* context);
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
OptionsCommand::OptionsCommand()
|
||||
|
@ -25,8 +25,8 @@ public:
|
||||
Command* clone() const override { return new PlayAnimationCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
PlayAnimationCommand::PlayAnimationCommand()
|
||||
|
@ -29,7 +29,7 @@ public:
|
||||
Command* clone() const override { return new RefreshCommand(*this); }
|
||||
|
||||
protected:
|
||||
void onExecute(Context* context);
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
RefreshCommand::RefreshCommand()
|
||||
|
@ -28,8 +28,8 @@ public:
|
||||
Command* clone() const override { return new RemoveFrameCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
RemoveFrameCommand::RemoveFrameCommand()
|
||||
|
@ -31,8 +31,8 @@ public:
|
||||
Command* clone() const override { return new RemoveLayerCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
RemoveLayerCommand::RemoveLayerCommand()
|
||||
|
@ -25,8 +25,8 @@ public:
|
||||
Command* clone() const override { return new ReselectMaskCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
ReselectMaskCommand::ReselectMaskCommand()
|
||||
|
@ -25,8 +25,8 @@ public:
|
||||
Command* clone() const override { return new ReverseFramesCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
ReverseFramesCommand::ReverseFramesCommand()
|
||||
|
@ -254,7 +254,7 @@ public:
|
||||
Command* clone() const override { return new SaveFileCommand(*this); }
|
||||
|
||||
protected:
|
||||
void onExecute(Context* context);
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
SaveFileCommand::SaveFileCommand()
|
||||
@ -292,7 +292,7 @@ public:
|
||||
Command* clone() const override { return new SaveFileAsCommand(*this); }
|
||||
|
||||
protected:
|
||||
void onExecute(Context* context);
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
SaveFileAsCommand::SaveFileAsCommand()
|
||||
@ -311,7 +311,7 @@ public:
|
||||
Command* clone() const override { return new SaveFileCopyAsCommand(*this); }
|
||||
|
||||
protected:
|
||||
void onExecute(Context* context);
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
SaveFileCopyAsCommand::SaveFileCopyAsCommand()
|
||||
|
@ -27,8 +27,8 @@ public:
|
||||
Command* clone() const override { return new SaveMaskCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
SaveMaskCommand::SaveMaskCommand()
|
||||
|
@ -37,8 +37,8 @@ public:
|
||||
Command* clone() const override { return new SpritePropertiesCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
SpritePropertiesCommand::SpritePropertiesCommand()
|
||||
|
@ -35,8 +35,8 @@ public:
|
||||
Command* clone() const override { return new UndoCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
|
||||
private:
|
||||
Type m_type;
|
||||
|
@ -30,8 +30,8 @@ public:
|
||||
Command* clone() const override { return new UnlinkCelCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
UnlinkCelCommand::UnlinkCelCommand()
|
||||
|
@ -81,8 +81,8 @@ public:
|
||||
Command* clone() const override { return new ColorCurveCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
ColorCurveCommand::ColorCurveCommand()
|
||||
|
@ -149,8 +149,8 @@ public:
|
||||
Command* clone() const override { return new ConvolutionMatrixCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
ConvolutionMatrixCommand::ConvolutionMatrixCommand()
|
||||
|
@ -87,8 +87,8 @@ public:
|
||||
Command* clone() const override { return new DespeckleCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
DespeckleCommand::DespeckleCommand()
|
||||
|
@ -48,8 +48,8 @@ public:
|
||||
Command* clone() const override { return new InvertColorCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
InvertColorCommand::InvertColorCommand()
|
||||
|
@ -116,8 +116,8 @@ public:
|
||||
Command* clone() const override { return new ReplaceColorCommand(*this); }
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context);
|
||||
void onExecute(Context* context);
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
ReplaceColorCommand::ReplaceColorCommand()
|
||||
|
@ -133,9 +133,9 @@ private:
|
||||
};
|
||||
|
||||
class AseFormat : public FileFormat {
|
||||
const char* onGetName() const { return "ase"; }
|
||||
const char* onGetExtensions() const { return "ase,aseprite"; }
|
||||
int onGetFlags() const {
|
||||
const char* onGetName() const override { return "ase"; }
|
||||
const char* onGetExtensions() const override { return "ase,aseprite"; }
|
||||
int onGetFlags() const override {
|
||||
return
|
||||
FILE_SUPPORT_LOAD |
|
||||
FILE_SUPPORT_SAVE |
|
||||
|
@ -44,9 +44,9 @@ class BmpFormat : public FileFormat {
|
||||
uint32_t blue_mask; // Mask for blue channel.
|
||||
};
|
||||
|
||||
const char* onGetName() const { return "bmp"; }
|
||||
const char* onGetExtensions() const { return "bmp"; }
|
||||
int onGetFlags() const {
|
||||
const char* onGetName() const override { return "bmp"; }
|
||||
const char* onGetExtensions() const override { return "bmp"; }
|
||||
int onGetFlags() const override {
|
||||
return
|
||||
FILE_SUPPORT_LOAD |
|
||||
FILE_SUPPORT_SAVE |
|
||||
|
@ -26,9 +26,9 @@ namespace app {
|
||||
using namespace base;
|
||||
|
||||
class FliFormat : public FileFormat {
|
||||
const char* onGetName() const { return "flc"; }
|
||||
const char* onGetExtensions() const { return "flc,fli"; }
|
||||
int onGetFlags() const {
|
||||
const char* onGetName() const override { return "flc"; }
|
||||
const char* onGetExtensions() const override{ return "flc,fli"; }
|
||||
int onGetFlags() const override {
|
||||
return
|
||||
FILE_SUPPORT_LOAD |
|
||||
FILE_SUPPORT_SAVE |
|
||||
|
@ -62,9 +62,9 @@ enum class DisposalMethod {
|
||||
|
||||
class GifFormat : public FileFormat {
|
||||
|
||||
const char* onGetName() const { return "gif"; }
|
||||
const char* onGetExtensions() const { return "gif"; }
|
||||
int onGetFlags() const {
|
||||
const char* onGetName() const override { return "gif"; }
|
||||
const char* onGetExtensions() const override { return "gif"; }
|
||||
int onGetFlags() const override {
|
||||
return
|
||||
FILE_SUPPORT_LOAD |
|
||||
FILE_SUPPORT_SAVE |
|
||||
@ -78,7 +78,7 @@ class GifFormat : public FileFormat {
|
||||
FILE_SUPPORT_GET_FORMAT_OPTIONS;
|
||||
}
|
||||
|
||||
bool onLoad(FileOp* fop);
|
||||
bool onLoad(FileOp* fop) override;
|
||||
#ifdef ENABLE_SAVE
|
||||
bool onSave(FileOp* fop) override;
|
||||
#endif
|
||||
|
@ -25,9 +25,9 @@ namespace app {
|
||||
using namespace base;
|
||||
|
||||
class IcoFormat : public FileFormat {
|
||||
const char* onGetName() const { return "ico"; }
|
||||
const char* onGetExtensions() const { return "ico"; }
|
||||
int onGetFlags() const {
|
||||
const char* onGetName() const override { return "ico"; }
|
||||
const char* onGetExtensions() const override { return "ico"; }
|
||||
int onGetFlags() const override {
|
||||
return
|
||||
FILE_SUPPORT_LOAD |
|
||||
FILE_SUPPORT_SAVE |
|
||||
|
@ -41,9 +41,9 @@ class JpegFormat : public FileFormat {
|
||||
float quality; // 1.0 maximum quality.
|
||||
};
|
||||
|
||||
const char* onGetName() const { return "jpeg"; }
|
||||
const char* onGetExtensions() const { return "jpeg,jpg"; }
|
||||
int onGetFlags() const {
|
||||
const char* onGetName() const override { return "jpeg"; }
|
||||
const char* onGetExtensions() const override { return "jpeg,jpg"; }
|
||||
int onGetFlags() const override {
|
||||
return
|
||||
FILE_SUPPORT_LOAD |
|
||||
FILE_SUPPORT_SAVE |
|
||||
|
@ -23,9 +23,9 @@ namespace app {
|
||||
using namespace base;
|
||||
|
||||
class PcxFormat : public FileFormat {
|
||||
const char* onGetName() const { return "pcx"; }
|
||||
const char* onGetExtensions() const { return "pcx"; }
|
||||
int onGetFlags() const {
|
||||
const char* onGetName() const override { return "pcx"; }
|
||||
const char* onGetExtensions() const override { return "pcx"; }
|
||||
int onGetFlags() const override {
|
||||
return
|
||||
FILE_SUPPORT_LOAD |
|
||||
FILE_SUPPORT_SAVE |
|
||||
|
@ -28,9 +28,9 @@ namespace app {
|
||||
using namespace base;
|
||||
|
||||
class PngFormat : public FileFormat {
|
||||
const char* onGetName() const { return "png"; }
|
||||
const char* onGetExtensions() const { return "png"; }
|
||||
int onGetFlags() const {
|
||||
const char* onGetName() const override { return "png"; }
|
||||
const char* onGetExtensions() const override { return "png"; }
|
||||
int onGetFlags() const override {
|
||||
return
|
||||
FILE_SUPPORT_LOAD |
|
||||
FILE_SUPPORT_SAVE |
|
||||
|
@ -24,9 +24,9 @@ namespace app {
|
||||
using namespace base;
|
||||
|
||||
class TgaFormat : public FileFormat {
|
||||
const char* onGetName() const { return "tga"; }
|
||||
const char* onGetExtensions() const { return "tga"; }
|
||||
int onGetFlags() const {
|
||||
const char* onGetName() const override { return "tga"; }
|
||||
const char* onGetExtensions() const override { return "tga"; }
|
||||
int onGetFlags() const override {
|
||||
return
|
||||
FILE_SUPPORT_LOAD |
|
||||
FILE_SUPPORT_SAVE |
|
||||
|
@ -78,7 +78,7 @@ private:
|
||||
// Controls clicks for tools like pencil
|
||||
class FreehandController : public Controller {
|
||||
public:
|
||||
bool isFreehand() { return true; }
|
||||
bool isFreehand() override { return true; }
|
||||
|
||||
void pressButton(Points& points, const Point& point) override {
|
||||
points.push_back(point);
|
||||
@ -234,7 +234,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void getPointsToInterwine(const Points& input, Points& output) {
|
||||
void getPointsToInterwine(const Points& input, Points& output) override {
|
||||
ASSERT(input.size() >= 2);
|
||||
if (input.size() < 2)
|
||||
return;
|
||||
@ -243,7 +243,7 @@ public:
|
||||
output.push_back(input[1]);
|
||||
}
|
||||
|
||||
void getStatusBarText(const Points& points, std::string& text) {
|
||||
void getStatusBarText(const Points& points, std::string& text) override {
|
||||
ASSERT(points.size() >= 2);
|
||||
if (points.size() < 2)
|
||||
return;
|
||||
@ -339,8 +339,8 @@ public:
|
||||
class OnePointController : public Controller {
|
||||
public:
|
||||
// Do not apply grid to "one point tools" (e.g. magic wand, flood fill, etc.)
|
||||
bool canSnapToGrid() { return false; }
|
||||
bool isOnePoint() { return true; }
|
||||
bool canSnapToGrid() override { return false; }
|
||||
bool isOnePoint() override { return true; }
|
||||
|
||||
void pressButton(Points& points, const Point& point) override {
|
||||
if (points.size() == 0)
|
||||
|
@ -34,10 +34,9 @@ public:
|
||||
|
||||
Ink* clone() override { return new PaintInk(*this); }
|
||||
|
||||
bool isPaint() const { return true; }
|
||||
bool isPaint() const override { return true; }
|
||||
|
||||
void prepareInk(ToolLoop* loop)
|
||||
{
|
||||
void prepareInk(ToolLoop* loop) override {
|
||||
switch (m_type) {
|
||||
|
||||
case Simple:
|
||||
@ -101,8 +100,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void inkHline(int x1, int y, int x2, ToolLoop* loop)
|
||||
{
|
||||
void inkHline(int x1, int y, int x2, ToolLoop* loop) override {
|
||||
ASSERT(m_proc);
|
||||
(*m_proc)(x1, y, x2, loop);
|
||||
}
|
||||
@ -119,15 +117,13 @@ public:
|
||||
|
||||
Ink* clone() override { return new ShadingInk(*this); }
|
||||
|
||||
bool isPaint() const { return true; }
|
||||
bool isPaint() const override { return true; }
|
||||
|
||||
void prepareInk(ToolLoop* loop)
|
||||
{
|
||||
void prepareInk(ToolLoop* loop) override {
|
||||
m_proc = ink_processing[INK_SHADING][MID(0, loop->sprite()->pixelFormat(), 2)];
|
||||
}
|
||||
|
||||
void inkHline(int x1, int y, int x2, ToolLoop* loop)
|
||||
{
|
||||
void inkHline(int x1, int y, int x2, ToolLoop* loop) override {
|
||||
(*m_proc)(x1, y, x2, loop);
|
||||
}
|
||||
|
||||
@ -138,15 +134,13 @@ class ScrollInk : public Ink {
|
||||
public:
|
||||
Ink* clone() override { return new ScrollInk(*this); }
|
||||
|
||||
bool isScrollMovement() const { return true; }
|
||||
bool isScrollMovement() const override { return true; }
|
||||
|
||||
void prepareInk(ToolLoop* loop)
|
||||
{
|
||||
void prepareInk(ToolLoop* loop) override {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
void inkHline(int x1, int y, int x2, ToolLoop* loop)
|
||||
{
|
||||
void inkHline(int x1, int y, int x2, ToolLoop* loop) override {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
@ -157,9 +151,9 @@ class ZoomInk : public Ink {
|
||||
public:
|
||||
Ink* clone() override { return new ZoomInk(*this); }
|
||||
|
||||
bool isZoom() const { return true; }
|
||||
void prepareInk(ToolLoop* loop) { }
|
||||
void inkHline(int x1, int y, int x2, ToolLoop* loop) { }
|
||||
bool isZoom() const override { return true; }
|
||||
void prepareInk(ToolLoop* loop) override { }
|
||||
void inkHline(int x1, int y, int x2, ToolLoop* loop) override { }
|
||||
};
|
||||
|
||||
|
||||
@ -167,9 +161,9 @@ class MoveInk : public Ink {
|
||||
public:
|
||||
Ink* clone() override { return new MoveInk(*this); }
|
||||
|
||||
bool isCelMovement() const { return true; }
|
||||
void prepareInk(ToolLoop* loop) { }
|
||||
void inkHline(int x1, int y, int x2, ToolLoop* loop) { }
|
||||
bool isCelMovement() const override { return true; }
|
||||
void prepareInk(ToolLoop* loop) override { }
|
||||
void inkHline(int x1, int y, int x2, ToolLoop* loop) override { }
|
||||
};
|
||||
|
||||
|
||||
@ -177,9 +171,9 @@ class SliceInk : public Ink {
|
||||
public:
|
||||
Ink* clone() override { return new SliceInk(*this); }
|
||||
|
||||
bool isSlice() const { return true; }
|
||||
void prepareInk(ToolLoop* loop) { }
|
||||
void inkHline(int x1, int y, int x2, ToolLoop* loop) {
|
||||
bool isSlice() const override { return true; }
|
||||
void prepareInk(ToolLoop* loop) override { }
|
||||
void inkHline(int x1, int y, int x2, ToolLoop* loop) override {
|
||||
// TODO show the selection-preview with a XOR color or something like that
|
||||
draw_hline(loop->getDstImage(), x1, y, x2, loop->getPrimaryColor());
|
||||
}
|
||||
@ -199,12 +193,11 @@ public:
|
||||
|
||||
Ink* clone() override { return new EraserInk(*this); }
|
||||
|
||||
bool isPaint() const { return true; }
|
||||
bool isEffect() const { return true; }
|
||||
bool isEraser() const { return true; }
|
||||
bool isPaint() const override { return true; }
|
||||
bool isEffect() const override { return true; }
|
||||
bool isEraser() const override { return true; }
|
||||
|
||||
void prepareInk(ToolLoop* loop)
|
||||
{
|
||||
void prepareInk(ToolLoop* loop) override {
|
||||
switch (m_type) {
|
||||
|
||||
case Eraser: {
|
||||
@ -251,8 +244,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void inkHline(int x1, int y, int x2, ToolLoop* loop)
|
||||
{
|
||||
void inkHline(int x1, int y, int x2, ToolLoop* loop) override {
|
||||
(*m_proc)(x1, y, x2, loop);
|
||||
}
|
||||
};
|
||||
@ -264,21 +256,19 @@ class BlurInk : public Ink {
|
||||
public:
|
||||
Ink* clone() override { return new BlurInk(*this); }
|
||||
|
||||
bool isPaint() const { return true; }
|
||||
bool isEffect() const { return true; }
|
||||
bool needsSpecialSourceArea() const { return true; }
|
||||
bool isPaint() const override { return true; }
|
||||
bool isEffect() const override { return true; }
|
||||
bool needsSpecialSourceArea() const override { return true; }
|
||||
|
||||
void prepareInk(ToolLoop* loop)
|
||||
{
|
||||
void prepareInk(ToolLoop* loop) override {
|
||||
m_proc = ink_processing[INK_BLUR][MID(0, loop->sprite()->pixelFormat(), 2)];
|
||||
}
|
||||
|
||||
void inkHline(int x1, int y, int x2, ToolLoop* loop)
|
||||
{
|
||||
void inkHline(int x1, int y, int x2, ToolLoop* loop) override {
|
||||
(*m_proc)(x1, y, x2, loop);
|
||||
}
|
||||
|
||||
void createSpecialSourceArea(const gfx::Region& dirtyArea, gfx::Region& sourceArea) const {
|
||||
void createSpecialSourceArea(const gfx::Region& dirtyArea, gfx::Region& sourceArea) const override {
|
||||
// We need one pixel more for each side, to use a 3x3 convolution matrix.
|
||||
for (const auto& rc : dirtyArea) {
|
||||
sourceArea.createUnion(sourceArea,
|
||||
@ -294,21 +284,19 @@ class JumbleInk : public Ink {
|
||||
public:
|
||||
Ink* clone() override { return new JumbleInk(*this); }
|
||||
|
||||
bool isPaint() const { return true; }
|
||||
bool isEffect() const { return true; }
|
||||
bool needsSpecialSourceArea() const { return true; }
|
||||
bool isPaint() const override { return true; }
|
||||
bool isEffect() const override { return true; }
|
||||
bool needsSpecialSourceArea() const override { return true; }
|
||||
|
||||
void prepareInk(ToolLoop* loop)
|
||||
{
|
||||
void prepareInk(ToolLoop* loop) override {
|
||||
m_proc = ink_processing[INK_JUMBLE][MID(0, loop->sprite()->pixelFormat(), 2)];
|
||||
}
|
||||
|
||||
void inkHline(int x1, int y, int x2, ToolLoop* loop)
|
||||
{
|
||||
void inkHline(int x1, int y, int x2, ToolLoop* loop) override {
|
||||
(*m_proc)(x1, y, x2, loop);
|
||||
}
|
||||
|
||||
void createSpecialSourceArea(const gfx::Region& dirtyArea, gfx::Region& sourceArea) const {
|
||||
void createSpecialSourceArea(const gfx::Region& dirtyArea, gfx::Region& sourceArea) const override {
|
||||
// We need one pixel more for each side.
|
||||
for (const auto& rc : dirtyArea) {
|
||||
sourceArea.createUnion(sourceArea,
|
||||
@ -329,10 +317,9 @@ public:
|
||||
|
||||
Ink* clone() override { return new SelectionInk(*this); }
|
||||
|
||||
bool isSelection() const { return true; }
|
||||
bool isSelection() const override { return true; }
|
||||
|
||||
void inkHline(int x1, int y, int x2, ToolLoop* loop)
|
||||
{
|
||||
void inkHline(int x1, int y, int x2, ToolLoop* loop) override {
|
||||
if (m_modify_selection) {
|
||||
Point offset = loop->getOffset();
|
||||
|
||||
@ -355,8 +342,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void setFinalStep(ToolLoop* loop, bool state)
|
||||
{
|
||||
void setFinalStep(ToolLoop* loop, bool state) override {
|
||||
m_modify_selection = state;
|
||||
|
||||
if (state) {
|
||||
|
@ -490,7 +490,7 @@ private:
|
||||
getParent()->layout();
|
||||
}
|
||||
|
||||
bool onProcessMessage(ui::Message* msg) {
|
||||
bool onProcessMessage(ui::Message* msg) override {
|
||||
if (msg->type() == kOpenMessage) {
|
||||
ColorBar::instance()->ChangeSelection.connect(
|
||||
Bind<void>(&InkShadesField::onChangeColorBarSelection, this));
|
||||
|
@ -58,7 +58,7 @@ public:
|
||||
Signal0<void> Regenerate;
|
||||
|
||||
protected:
|
||||
void onPreferredSize(PreferredSizeEvent& ev) {
|
||||
void onPreferredSize(PreferredSizeEvent& ev) override {
|
||||
gfx::Size sz = m_deleteButton.getPreferredSize();
|
||||
sz.h += 4*guiscale();
|
||||
ev.setPreferredSize(sz);
|
||||
|
@ -96,7 +96,7 @@ public:
|
||||
->getCurrentQuicktool(currentTool);
|
||||
}
|
||||
|
||||
KeyAction getPressedKeyAction(KeyContext context) {
|
||||
KeyAction getPressedKeyAction(KeyContext context) override {
|
||||
return KeyboardShortcuts::instance()->getCurrentActionModifiers(context);
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,7 @@ public:
|
||||
, m_g(g) {
|
||||
}
|
||||
|
||||
Editor* getEditor() {
|
||||
Editor* getEditor() override {
|
||||
return m_editor;
|
||||
}
|
||||
|
||||
|
@ -220,7 +220,7 @@ namespace app {
|
||||
void onCurrentToolChange();
|
||||
void onFgColorChange();
|
||||
void onContextBarBrushChange();
|
||||
void onExposeSpritePixels(doc::DocumentEvent& ev);
|
||||
void onExposeSpritePixels(doc::DocumentEvent& ev) override;
|
||||
|
||||
private:
|
||||
void setStateInternal(const EditorStatePtr& newState);
|
||||
|
Loading…
x
Reference in New Issue
Block a user