mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Cleanup: use override specifier everywhere, and enable gcc warning to check for it.
This commit is contained in:
+1
-1
@@ -52,7 +52,7 @@ endif()
|
||||
# warnings
|
||||
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
||||
# Update if necessary
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-comment")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wsuggest-override -Wstrict-null-sentinel -Wno-comment -Wno-unused-parameter")
|
||||
endif()
|
||||
|
||||
# visual studio debugger
|
||||
|
||||
@@ -20,9 +20,9 @@ public:
|
||||
/// The set is optional
|
||||
CLISetInterface(const SetP& set, bool quiet = false, bool run = true);
|
||||
protected:
|
||||
virtual void onAction(const Action&, bool) {}
|
||||
virtual void onChangeSet();
|
||||
virtual void onBeforeChangeSet();
|
||||
void onAction(const Action&, bool) override {}
|
||||
void onChangeSet() override;
|
||||
void onBeforeChangeSet() override;
|
||||
private:
|
||||
bool quiet; ///< Supress prompts and other non-vital stuff
|
||||
bool running; ///< Still running?
|
||||
|
||||
@@ -40,8 +40,8 @@ public:
|
||||
AddKeywordAction(Set& set);
|
||||
AddKeywordAction(AddingOrRemoving, Set& set, const KeywordP& keyword);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
const GenericAddAction<KeywordP> action;
|
||||
};
|
||||
@@ -75,9 +75,9 @@ public:
|
||||
Keyword& keyword; ///< The keyword we are the reminder text of
|
||||
|
||||
/// Try to compile the script
|
||||
virtual void store();
|
||||
void store() override;
|
||||
/// Add some tags, so the script looks nice
|
||||
virtual void retrieve();
|
||||
void retrieve() override;
|
||||
|
||||
/// Syntax highlight, and store in value
|
||||
void highlight(const String& code, const vector<ScriptParseError>& errors);
|
||||
@@ -91,8 +91,8 @@ class ChangeKeywordModeAction : public Action {
|
||||
public:
|
||||
ChangeKeywordModeAction(Keyword& keyword, const String& new_mode);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
//private:
|
||||
Keyword& keyword;
|
||||
|
||||
+16
-16
@@ -44,8 +44,8 @@ public:
|
||||
AddCardAction(AddingOrRemoving, Set& set, const CardP& card);
|
||||
AddCardAction(AddingOrRemoving, Set& set, const vector<CardP>& cards);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
const GenericAddAction<CardP> action;
|
||||
};
|
||||
@@ -57,8 +57,8 @@ class ReorderCardsAction : public CardListAction {
|
||||
public:
|
||||
ReorderCardsAction(Set& set, size_t card_id1, size_t card_id2);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
//private:
|
||||
const size_t card_id1, card_id2; ///< Positions of the two cards to swap
|
||||
@@ -69,8 +69,8 @@ public:
|
||||
/// An action that affects the rendering/display/look of a set or cards in the set
|
||||
class DisplayChangeAction : public Action {
|
||||
public:
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
};
|
||||
|
||||
/// Changing the style of a a card
|
||||
@@ -78,8 +78,8 @@ class ChangeCardStyleAction : public DisplayChangeAction {
|
||||
public:
|
||||
ChangeCardStyleAction(const CardP& card, const StyleSheetP& stylesheet);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
//private:
|
||||
CardP card; ///< The affected card
|
||||
@@ -93,8 +93,8 @@ class ChangeSetStyleAction : public DisplayChangeAction {
|
||||
public:
|
||||
ChangeSetStyleAction(Set& set, const CardP& card);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
private:
|
||||
Set& set; ///< The affected set
|
||||
@@ -109,8 +109,8 @@ class ChangeCardHasStylingAction : public DisplayChangeAction {
|
||||
public:
|
||||
ChangeCardHasStylingAction(Set& set, const CardP& card);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
//private:
|
||||
Set& set; ///< The set to copy styling from
|
||||
@@ -136,8 +136,8 @@ public:
|
||||
/// Add a newly allocated card
|
||||
AddPackAction(AddingOrRemoving, Set& set, const PackTypeP& pack);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
const GenericAddAction<PackTypeP> action;
|
||||
};
|
||||
@@ -148,8 +148,8 @@ public:
|
||||
/// Add a newly allocated card
|
||||
ChangePackAction(Set& set, size_t pos, const PackTypeP& new_pack);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
private:
|
||||
PackTypeP pack;
|
||||
|
||||
+28
-28
@@ -40,8 +40,8 @@ class SymbolPartMoveAction : public SymbolPartsAction {
|
||||
public:
|
||||
SymbolPartMoveAction(const set<SymbolPartP>& parts, const Vector2D& delta = Vector2D());
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
/// Update this action to move some more
|
||||
void move(const Vector2D& delta);
|
||||
@@ -80,8 +80,8 @@ class SymbolPartRotateAction : public SymbolPartMatrixAction {
|
||||
public:
|
||||
SymbolPartRotateAction(const set<SymbolPartP>& parts, const Vector2D& center);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
/// Update this action to rotate to a different angle
|
||||
void rotateTo(Radians newAngle);
|
||||
@@ -103,8 +103,8 @@ class SymbolPartShearAction : public SymbolPartMatrixAction {
|
||||
public:
|
||||
SymbolPartShearAction(const set<SymbolPartP>& parts, const Vector2D& center);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
/// Change shear by a given amount
|
||||
void move(const Vector2D& deltaShear);
|
||||
@@ -126,8 +126,8 @@ class SymbolPartScaleAction : public SymbolPartsAction {
|
||||
public:
|
||||
SymbolPartScaleAction(const set<SymbolPartP>& parts, int scaleX, int scaleY);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
/// Change min and max coordinates
|
||||
void move(const Vector2D& delta_min, const Vector2D& delta_max);
|
||||
@@ -157,8 +157,8 @@ public:
|
||||
// All parts must be SymbolParts
|
||||
CombiningModeAction(const set<SymbolPartP>& parts, SymbolShapeCombine mode);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
private:
|
||||
void add(const SymbolPartP&, SymbolShapeCombine mode);
|
||||
@@ -172,9 +172,9 @@ class SymbolPartNameAction : public SymbolPartAction {
|
||||
public:
|
||||
SymbolPartNameAction(const SymbolPartP& part, const String& name, size_t old_cursor, size_t new_cursor);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
virtual bool merge(const Action& action);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
bool merge(const Action& action) override;
|
||||
|
||||
public:
|
||||
SymbolPartP part; ///< Affected part
|
||||
@@ -190,8 +190,8 @@ class AddSymbolPartAction : public SymbolPartListAction {
|
||||
public:
|
||||
AddSymbolPartAction(Symbol& symbol, const SymbolPartP& part);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
private:
|
||||
Symbol& symbol; ///< Symbol to add the part to
|
||||
@@ -205,8 +205,8 @@ class RemoveSymbolPartsAction : public SymbolPartListAction {
|
||||
public:
|
||||
RemoveSymbolPartsAction(Symbol& symbol, const set<SymbolPartP>& parts);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
private:
|
||||
Symbol& symbol;
|
||||
@@ -234,8 +234,8 @@ class DuplicateSymbolPartsAction : public SymbolPartListAction {
|
||||
public:
|
||||
DuplicateSymbolPartsAction(Symbol& symbol, const set<SymbolPartP>& parts);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
/// Fill a set with all the new parts
|
||||
void getParts(set<SymbolPartP>& parts);
|
||||
@@ -254,8 +254,8 @@ class ReorderSymbolPartsAction : public SymbolPartListAction {
|
||||
public:
|
||||
ReorderSymbolPartsAction(SymbolGroup& old_parent, size_t old_position, SymbolGroup& new_parent, size_t new_position);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
private:
|
||||
SymbolGroup* old_parent, *new_parent;///< Parents to move from and to
|
||||
@@ -269,8 +269,8 @@ public:
|
||||
/// Remove all the given groups
|
||||
UngroupReorderSymbolPartsAction(SymbolGroup& group_parent, size_t group_pos, SymbolGroup& target_parent, size_t target_pos);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
private:
|
||||
SymbolGroup& group_parent;
|
||||
@@ -287,11 +287,11 @@ class GroupSymbolPartsActionBase : public SymbolPartListAction {
|
||||
public:
|
||||
GroupSymbolPartsActionBase(SymbolGroup& root);
|
||||
|
||||
virtual void perform(bool to_undo);
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
protected:
|
||||
SymbolGroup& root; ///< Symbol or group to group stuff in
|
||||
vector<SymbolPartP> old_part_list; ///< Old part list of the symbol
|
||||
SymbolGroup& root; ///< Symbol or group to group stuff in
|
||||
vector<SymbolPartP> old_part_list; ///< Old part list of the symbol
|
||||
};
|
||||
|
||||
/// Group multiple symbol parts together
|
||||
@@ -299,7 +299,7 @@ class GroupSymbolPartsAction : public GroupSymbolPartsActionBase {
|
||||
public:
|
||||
GroupSymbolPartsAction(SymbolGroup& root, const set<SymbolPartP>& parts, const SymbolGroupP& group);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
String getName(bool to_undo) const override;
|
||||
private:
|
||||
SymbolGroupP group;
|
||||
};
|
||||
@@ -310,6 +310,6 @@ public:
|
||||
/// Remove all the given groups
|
||||
UngroupSymbolPartsAction(SymbolGroup& root, const set<SymbolPartP>& groups);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
String getName(bool to_undo) const override;
|
||||
};
|
||||
|
||||
|
||||
@@ -304,8 +304,8 @@ class SinglePointRemoveAction : public Action, public IntrusivePtrBase<SinglePoi
|
||||
public:
|
||||
SinglePointRemoveAction(const SymbolShapeP& shape, UInt position);
|
||||
|
||||
virtual String getName(bool to_undo) const { return _("Delete point"); }
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override { return _("Delete point"); }
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
private:
|
||||
SymbolShapeP shape;
|
||||
@@ -390,8 +390,8 @@ class ControlPointRemoveAction : public Action {
|
||||
public:
|
||||
ControlPointRemoveAction(const SymbolShapeP& shape, const set<ControlPointP>& to_delete);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
private:
|
||||
vector<SinglePointRemoveActionP> removals;
|
||||
|
||||
@@ -54,8 +54,8 @@ class ControlPointMoveAction : public ExtendableAction {
|
||||
public:
|
||||
ControlPointMoveAction(const set<ControlPointP>& points);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
/// Update this action to move some more
|
||||
void move(const Vector2D& delta);
|
||||
@@ -76,8 +76,8 @@ class HandleMoveAction : public ExtendableAction {
|
||||
public:
|
||||
HandleMoveAction(const SelectedHandle& handle);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
/// Update this action to move some more
|
||||
void move(const Vector2D& delta);
|
||||
@@ -115,8 +115,8 @@ class SegmentModeAction : public Action {
|
||||
public:
|
||||
SegmentModeAction(const ControlPointP& p1, const ControlPointP& p2, SegmentMode mode);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
protected:
|
||||
ControlPointUpdate point1, point2;
|
||||
@@ -129,8 +129,8 @@ class LockModeAction : public Action {
|
||||
public:
|
||||
LockModeAction(const ControlPointP& p, LockMode mode);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
private:
|
||||
ControlPointUpdate point; ///< The affected point
|
||||
@@ -145,8 +145,8 @@ class CurveDragAction : public SegmentModeAction {
|
||||
public:
|
||||
CurveDragAction(const ControlPointP& point1, const ControlPointP& point2);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
// Move the curve by this much, it is grabbed at time t
|
||||
void move(const Vector2D& delta, double t);
|
||||
@@ -160,8 +160,8 @@ public:
|
||||
/// Insert a new point in shape, after position insertAfter_, at the time t on the segment
|
||||
ControlPointAddAction(const SymbolShapeP& shape, UInt insert_after, double t);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
inline ControlPointP getNewPoint() const { return new_point; }
|
||||
|
||||
@@ -188,8 +188,8 @@ class SymmetryMoveAction : public Action {
|
||||
public:
|
||||
SymmetryMoveAction(SymbolSymmetry& symmetry, bool is_handle);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
/// Update this action to move some more
|
||||
void move(const Vector2D& delta);
|
||||
@@ -211,8 +211,8 @@ class SymmetryTypeAction : public Action {
|
||||
public:
|
||||
SymmetryTypeAction(SymbolSymmetry& symmetry, SymbolSymmetryType type);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
private:
|
||||
SymbolSymmetry& symmetry;
|
||||
SymbolSymmetryType type;
|
||||
@@ -227,8 +227,8 @@ class SymmetryCopiesAction : public Action {
|
||||
public:
|
||||
SymmetryCopiesAction(SymbolSymmetry& symmetry, int copies);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
private:
|
||||
SymbolSymmetry& symmetry;
|
||||
int copies;
|
||||
|
||||
@@ -59,13 +59,13 @@ public:
|
||||
: ValueAction(value), new_value(new_value)
|
||||
{}
|
||||
|
||||
virtual void perform(bool to_undo) {
|
||||
void perform(bool to_undo) override {
|
||||
ValueAction::perform(to_undo);
|
||||
swap_value(static_cast<T&>(*valueP), new_value);
|
||||
valueP->onAction(*this, to_undo); // notify value
|
||||
}
|
||||
|
||||
virtual bool merge(const Action& action) {
|
||||
bool merge(const Action& action) override {
|
||||
if (!ALLOW_MERGE) return false;
|
||||
TYPE_CASE(action, SimpleValueAction) {
|
||||
if (action.valueP == valueP) {
|
||||
|
||||
+15
-15
@@ -40,8 +40,8 @@ public:
|
||||
: valueP(value), card(nullptr), old_time_modified(wxDateTime::Now())
|
||||
{}
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
/// We know that the value is on the given card, add that information
|
||||
void isOnCard(Card* card);
|
||||
@@ -69,9 +69,9 @@ class TextValueAction : public ValueAction {
|
||||
public:
|
||||
TextValueAction(const TextValueP& value, size_t start, size_t end, size_t new_end, const Defaultable<String>& new_value, const String& name);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
virtual bool merge(const Action& action);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
bool merge(const Action& action) override;
|
||||
|
||||
inline const String& newValue() const { return new_value(); }
|
||||
|
||||
@@ -99,10 +99,10 @@ class TextToggleReminderAction : public ValueAction {
|
||||
public:
|
||||
TextToggleReminderAction(const TextValueP& value, size_t pos);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
private:
|
||||
private:
|
||||
size_t pos; ///< Position of "<kw-"
|
||||
bool enable; ///< Should the reminder text be turned on or off?
|
||||
wxUniChar old; ///< Old value of the <kw- tag
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
class SimpleTextValueAction : public ValueAction {
|
||||
public:
|
||||
SimpleTextValueAction(const Card* card, const TextValueP& value, const Defaultable<String>& new_value);
|
||||
virtual void perform(bool to_undo);
|
||||
void perform(bool to_undo) override;
|
||||
bool merge(const SimpleTextValueAction& action);
|
||||
private:
|
||||
Defaultable<String> new_value;
|
||||
@@ -125,8 +125,8 @@ class ReplaceAllAction : public Action {
|
||||
public:
|
||||
~ReplaceAllAction();
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
vector<SimpleTextValueAction> actions;
|
||||
};
|
||||
@@ -138,8 +138,8 @@ class ScriptValueEvent : public Action {
|
||||
public:
|
||||
inline ScriptValueEvent(const Card* card, const Value* value) : card(card), value(value) {}
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
const Card* card; ///< Card the value is on
|
||||
const Value* value; ///< The modified value
|
||||
@@ -152,8 +152,8 @@ public:
|
||||
: stylesheet(stylesheet), style(style)
|
||||
{}
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
String getName(bool to_undo) const override;
|
||||
void perform(bool to_undo) override;
|
||||
|
||||
const StyleSheet* stylesheet; ///< StyleSheet the style is for
|
||||
const Style* style; ///< The modified style
|
||||
|
||||
@@ -34,9 +34,9 @@ public:
|
||||
OptionalScript script; ///< Export script, for multi file templates and initialization
|
||||
|
||||
static String typeNameStatic();
|
||||
virtual String typeName() const;
|
||||
Version fileVersion() const;
|
||||
virtual void validate(Version = app_version);
|
||||
String typeName() const override;
|
||||
Version fileVersion() const override;
|
||||
void validate(Version = app_version) override;
|
||||
/// Loads the export template with a particular name
|
||||
static ExportTemplateP byName(const String & name);
|
||||
private:
|
||||
|
||||
@@ -33,7 +33,7 @@ class BooleanStyle : public ChoiceStyle {
|
||||
public:
|
||||
BooleanStyle(const ChoiceFieldP& field);
|
||||
DECLARE_HAS_FIELD(Boolean); // not DECLARE_STYLE_TYPE, because we use a normal ChoiceValueViewer/Editor
|
||||
virtual StyleP clone() const;
|
||||
StyleP clone() const override;
|
||||
|
||||
// no extra data
|
||||
|
||||
@@ -48,7 +48,7 @@ class BooleanValue : public ChoiceValue {
|
||||
public:
|
||||
inline BooleanValue(const ChoiceFieldP& field) : ChoiceValue(field) {}
|
||||
DECLARE_HAS_FIELD(Boolean);
|
||||
virtual ValueP clone() const;
|
||||
ValueP clone() const override;
|
||||
|
||||
// no extra data
|
||||
|
||||
|
||||
@@ -41,8 +41,8 @@ public:
|
||||
map<String,Color> choice_colors; ///< Colors for the various choices (when color_cardlist)
|
||||
map<String,Color> choice_colors_cardlist; ///< Colors for the various choices, for in the card list
|
||||
|
||||
virtual void initDependencies(Context&, const Dependency&) const;
|
||||
virtual void after_reading(Version ver);
|
||||
void initDependencies(Context&, const Dependency&) const override;
|
||||
void after_reading(Version ver) override;
|
||||
};
|
||||
|
||||
|
||||
@@ -174,10 +174,10 @@ public:
|
||||
/// Initialize image from choice_images
|
||||
void initImage();
|
||||
|
||||
virtual int update(Context&);
|
||||
virtual void initDependencies(Context&, const Dependency&) const;
|
||||
virtual void checkContentDependencies(Context&, const Dependency&) const;
|
||||
virtual void invalidate();
|
||||
int update(Context&) override;
|
||||
void initDependencies(Context&, const Dependency&) const override;
|
||||
void checkContentDependencies(Context&, const Dependency&) const override;
|
||||
void invalidate() override;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : ChoiceValue
|
||||
@@ -194,6 +194,6 @@ public:
|
||||
|
||||
ValueType value; /// The name of the selected choice
|
||||
|
||||
virtual bool update(Context&);
|
||||
bool update(Context&) override;
|
||||
};
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ public:
|
||||
Defaultable<Color> initial; ///< Initial choice of a new value, if not set the first choice is used
|
||||
String default_name; ///< Name of "default" value
|
||||
|
||||
virtual void initDependencies(Context&, const Dependency&) const;
|
||||
void initDependencies(Context&, const Dependency&) const override;
|
||||
};
|
||||
|
||||
/// A color that can be chosen for this field
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
double bottom_width; ///< Width of the colored region on the bottom side
|
||||
ImageCombine combine; ///< How to combine image with the background
|
||||
|
||||
virtual int update(Context&);
|
||||
int update(Context&) override;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : ColorValue
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
|
||||
ValueType value; ///< The value
|
||||
|
||||
virtual bool update(Context&);
|
||||
bool update(Context&) override;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
|
||||
ScriptableImage default_image; ///< Placeholder
|
||||
|
||||
virtual int update(Context&);
|
||||
int update(Context&) override;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : ImageValue
|
||||
|
||||
@@ -28,9 +28,9 @@ public:
|
||||
InfoField() { editable = false; }
|
||||
DECLARE_FIELD_TYPE(Text);
|
||||
|
||||
OptionalScript script; ///< Script to apply to all values
|
||||
OptionalScript script; ///< Script to apply to all values
|
||||
|
||||
virtual void initDependencies(Context&, const Dependency&) const;
|
||||
void initDependencies(Context&, const Dependency&) const override;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : InfoStyle
|
||||
@@ -41,14 +41,14 @@ public:
|
||||
InfoStyle(const InfoFieldP&);
|
||||
DECLARE_STYLE_TYPE(Info);
|
||||
|
||||
Font font; ///< Font to use for the text
|
||||
Alignment alignment; ///< Alignment inside the box
|
||||
double padding_left, padding_right; ///< Padding
|
||||
Font font; ///< Font to use for the text
|
||||
Alignment alignment; ///< Alignment inside the box
|
||||
double padding_left, padding_right; ///< Padding
|
||||
double padding_top, padding_bottom;
|
||||
Color background_color;
|
||||
|
||||
virtual int update(Context&);
|
||||
virtual void initDependencies(Context&, const Dependency&) const;
|
||||
int update(Context&) override;
|
||||
void initDependencies(Context&, const Dependency&) const override;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : InfoValue
|
||||
@@ -61,6 +61,6 @@ public:
|
||||
|
||||
ValueType value;
|
||||
|
||||
virtual bool update(Context&);
|
||||
bool update(Context&) override;
|
||||
};
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public:
|
||||
Scriptable<Direction> direction; ///< In what direction are choices layed out?
|
||||
Scriptable<double> spacing; ///< Spacing between choices (images) in pixels
|
||||
|
||||
virtual int update(Context&);
|
||||
int update(Context&) override;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : MultipleChoiceValue
|
||||
@@ -51,7 +51,7 @@ class MultipleChoiceValue : public ChoiceValue {
|
||||
public:
|
||||
inline MultipleChoiceValue(const MultipleChoiceFieldP& field) : ChoiceValue(field, false) {}
|
||||
DECLARE_HAS_FIELD(MultipleChoice);
|
||||
virtual ValueP clone() const;
|
||||
ValueP clone() const override;
|
||||
|
||||
String last_change; ///< Which of the choices was selected/deselected last?
|
||||
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
/// Splits the value, stores the selected choices in the out parameter
|
||||
void get(vector<String>& out) const;
|
||||
|
||||
virtual bool update(Context&);
|
||||
bool update(Context&) override;
|
||||
|
||||
private:
|
||||
DECLARE_REFLECTION();
|
||||
|
||||
@@ -28,12 +28,12 @@ public:
|
||||
DECLARE_FIELD_TYPE(PackageChoice);
|
||||
|
||||
OptionalScript script; ///< Script to apply to all values
|
||||
String match; ///< Package filenames to match
|
||||
String initial; ///< Initial value
|
||||
String match; ///< Package filenames to match
|
||||
String initial; ///< Initial value
|
||||
bool required; ///< Is selecting a package required?
|
||||
String empty_name; ///< Displayed name for the empty value (if !required)
|
||||
String empty_name; ///< Displayed name for the empty value (if !required)
|
||||
|
||||
virtual void initDependencies(Context&, const Dependency&) const;
|
||||
void initDependencies(Context&, const Dependency&) const override;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : PackageChoiceStyle
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
|
||||
Font font; ///< Font to use for the text
|
||||
|
||||
virtual int update(Context&);
|
||||
int update(Context&) override;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : PackageChoiceValue
|
||||
@@ -59,9 +59,9 @@ public:
|
||||
|
||||
ValueType package_name; ///< The selected package
|
||||
|
||||
/// Get the package (if it is set)
|
||||
/// Get the package (if it is set), otherwise return nullptr
|
||||
PackagedP getPackage() const;
|
||||
|
||||
virtual bool update(Context&);
|
||||
bool update(Context&) override;
|
||||
};
|
||||
|
||||
|
||||
+10
-10
@@ -34,14 +34,14 @@ public:
|
||||
TextField();
|
||||
DECLARE_FIELD_TYPE(Text);
|
||||
|
||||
OptionalScript script; ///< Script to apply to all values
|
||||
OptionalScript script; ///< Script to apply to all values
|
||||
OptionalScript default_script; ///< Script that generates the default value
|
||||
//%OptionalScript view_script; ///< Script to apply before viewing
|
||||
//%OptionalScript unview_script; ///< Script to apply after changes to the view
|
||||
bool multi_line; ///< Are newlines allowed in the text?
|
||||
String default_name; ///< Name of "default" value
|
||||
bool multi_line; ///< Are newlines allowed in the text?
|
||||
String default_name; ///< Name of "default" value
|
||||
|
||||
virtual void initDependencies(Context&, const Dependency&) const;
|
||||
void initDependencies(Context&, const Dependency&) const override;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : TextStyle
|
||||
@@ -95,9 +95,9 @@ public:
|
||||
double content_width, content_height; ///< Size of the rendered text
|
||||
int content_lines; ///< Number of rendered lines
|
||||
|
||||
virtual int update(Context&);
|
||||
virtual void initDependencies(Context&, const Dependency&) const;
|
||||
virtual void checkContentDependencies(Context&, const Dependency&) const;
|
||||
int update(Context&) override;
|
||||
void initDependencies(Context&, const Dependency&) const override;
|
||||
void checkContentDependencies(Context&, const Dependency&) const override;
|
||||
|
||||
/// Stretch factor to use
|
||||
double getStretch() const;
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
ValueType value; ///< The text of this value
|
||||
Age last_update; ///< When was the text last changed?
|
||||
|
||||
virtual bool update(Context&);
|
||||
bool update(Context&) override;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : TextValue
|
||||
@@ -139,8 +139,8 @@ public:
|
||||
virtual void retrieve();
|
||||
|
||||
/// Update underlying data
|
||||
virtual void onAction(Action& a, bool undone);
|
||||
void onAction(Action& a, bool undone) override;
|
||||
/// Editing the same underlying value?
|
||||
virtual bool equals(const Value* that);
|
||||
bool equals(const Value* that) override;
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ template <typename T>
|
||||
class QuickFilter : public Filter<T> {
|
||||
public:
|
||||
QuickFilter(String const& query) : query(parse_quicksearch_query(query)) {}
|
||||
virtual bool keep(T const& x) const {
|
||||
bool keep(T const& x) const override {
|
||||
return match_quicksearch_query(query, x);
|
||||
}
|
||||
private:
|
||||
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
/// Update the progress bar
|
||||
/** if the operation should be aborted, throws an AbortException
|
||||
*/
|
||||
virtual void onProgress(float progress, const String& message);
|
||||
void onProgress(float progress, const String& message) override;
|
||||
};
|
||||
|
||||
ExportProgressDialog::ExportProgressDialog(Window* parent, const String& title, const String& message)
|
||||
@@ -133,8 +133,8 @@ public:
|
||||
: ApprDatabase(progress_target, _("Expan.dat"))
|
||||
{}
|
||||
protected:
|
||||
virtual void doRead(wxInputStream& in);
|
||||
virtual void doWrite(wxOutputStream& out);
|
||||
void doRead(wxInputStream& in) override;
|
||||
void doWrite(wxOutputStream& out) override;
|
||||
|
||||
public:
|
||||
map<String,String> expansions; ///< code -> name
|
||||
@@ -196,8 +196,8 @@ public:
|
||||
void removeSet(const String& code);
|
||||
|
||||
protected:
|
||||
virtual void doRead(wxInputStream& in);
|
||||
virtual void doWrite(wxOutputStream& out);
|
||||
void doRead(wxInputStream& in) override;
|
||||
void doWrite(wxOutputStream& out) override;
|
||||
|
||||
private:
|
||||
vector<ApprFormat> formats;
|
||||
@@ -280,8 +280,8 @@ public:
|
||||
void removeSet(const String& code);
|
||||
|
||||
protected:
|
||||
virtual void doRead(wxInputStream& in);
|
||||
virtual void doWrite(wxOutputStream& out);
|
||||
void doRead(wxInputStream& in) override;
|
||||
void doWrite(wxOutputStream& out) override;
|
||||
|
||||
public:
|
||||
map<String,ApprDistro> distros;
|
||||
@@ -295,7 +295,7 @@ void ApprDistroDatabase::removeSet(const String& code) {
|
||||
|
||||
void ApprDistroDatabase::doRead(wxInputStream& in) {
|
||||
wxTextInputStream tin(in);
|
||||
ApprDistro* last = 0;
|
||||
ApprDistro* last = nullptr;
|
||||
while (!in.Eof()) {
|
||||
String l = trim(tin.ReadLine());
|
||||
if (l.size() > 2 && l.GetChar(0) == _('<')) {
|
||||
@@ -365,8 +365,8 @@ public:
|
||||
void removeSet(const String& code);
|
||||
|
||||
protected:
|
||||
virtual void doRead(wxInputStream& in);
|
||||
virtual void doWrite(wxOutputStream& out);
|
||||
void doRead(wxInputStream& in) override;
|
||||
void doWrite(wxOutputStream& out) override;
|
||||
|
||||
public:
|
||||
vector<ApprCardRecordP> cards;
|
||||
@@ -582,7 +582,7 @@ class ApprenticeExportWindow : public wxDialog, public WithProgress {
|
||||
public:
|
||||
ApprenticeExportWindow(Window* parent, const SetP& set);
|
||||
|
||||
virtual void onProgress(float p, const String& message);
|
||||
void onProgress(float p, const String& message) override;
|
||||
void doStep(const String& s, float size);
|
||||
|
||||
private:
|
||||
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
UnzoomedDataViewer(bool use_zoom_settings)
|
||||
: use_zoom_settings(use_zoom_settings)
|
||||
{}
|
||||
virtual Rotation getRotation() const;
|
||||
Rotation getRotation() const override;
|
||||
private:
|
||||
bool use_zoom_settings;
|
||||
};
|
||||
|
||||
@@ -22,11 +22,11 @@
|
||||
/// The file format of MSE1 files
|
||||
class MSE1FileFormat : public FileFormat {
|
||||
public:
|
||||
virtual String extension() { return _("mse"); }
|
||||
virtual String name() { return _("Magic Set Editor version 1 files (*.mse)"); }
|
||||
virtual bool canImport() { return true; }
|
||||
virtual bool canExport(const Game&) { return false; }
|
||||
virtual SetP importSet(const String& filename);
|
||||
String extension() override { return _("mse"); }
|
||||
String name() override { return _("Magic Set Editor version 1 files (*.mse)"); }
|
||||
bool canImport() override { return true; }
|
||||
bool canExport(const Game&) override { return false; }
|
||||
SetP importSet(const String& filename) override;
|
||||
};
|
||||
|
||||
FileFormatP mse1_file_format() {
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
/// The file format of MSE2 files
|
||||
class MSE2FileFormat : public FileFormat {
|
||||
public:
|
||||
virtual String extension() { return _("mse-set"); }
|
||||
virtual String matches() { return _("*.mse-set;set"); }
|
||||
virtual String name() { return _("Magic Set Editor sets (*.mse-set)"); }
|
||||
virtual bool canImport() { return true; }
|
||||
virtual bool canExport(const Game&) { return true; }
|
||||
virtual SetP importSet(const String& filename) {
|
||||
String extension() override { return _("mse-set"); }
|
||||
String matches() override { return _("*.mse-set;set"); }
|
||||
String name() override { return _("Magic Set Editor sets (*.mse-set)"); }
|
||||
bool canImport() override { return true; }
|
||||
bool canExport(const Game&) override { return true; }
|
||||
SetP importSet(const String& filename) override {
|
||||
wxString set_name = filename;
|
||||
// Strip "/set" or "/set.mset-set" from the end, this allows opening directories as set files
|
||||
if (filename.EndsWith(_(".mse-set/set")) || filename.EndsWith(_(".mse-set\\set"))) {
|
||||
@@ -34,7 +34,7 @@ public:
|
||||
settings.addRecentFile(set_name);
|
||||
return set;
|
||||
}
|
||||
virtual void exportSet(Set& set, const String& filename, bool is_copy) {
|
||||
void exportSet(Set& set, const String& filename, bool is_copy) override {
|
||||
if (is_copy) {
|
||||
set.saveCopy(filename);
|
||||
} else {
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
/// The file format of Mtg Editor files
|
||||
class MtgEditorFileFormat : public FileFormat {
|
||||
public:
|
||||
virtual String extension() { return _("set"); }
|
||||
virtual String name() { return _("Mtg Editor files (*.set)"); }
|
||||
virtual bool canImport() { return true; }
|
||||
virtual bool canExport(const Game&) { return false; }
|
||||
virtual SetP importSet(const String& filename);
|
||||
String extension() override { return _("set"); }
|
||||
String name() override { return _("Mtg Editor files (*.set)"); }
|
||||
bool canImport() override { return true; }
|
||||
bool canExport(const Game&) override { return false; }
|
||||
SetP importSet(const String& filename) override;
|
||||
private:
|
||||
// Filter: se filename -> image directory
|
||||
// based on MtgEditor's: CardSet.getImageFolder
|
||||
@@ -115,17 +115,17 @@ SetP MtgEditorFileFormat::importSet(const String& filename) {
|
||||
} else if (line == _("#COST##########")) { // casting cost
|
||||
target = ¤t_card->value<TextValue>(_("casting cost")).value;
|
||||
} else if (line == _("#RARITY########") || line == _("#FREQUENCY#####")) { // rarity
|
||||
target = 0;
|
||||
target = nullptr;
|
||||
line = file.ReadLine();
|
||||
if (line == _("0")) current_card->value<ChoiceValue>(_("rarity")).value.assign(_("common"));
|
||||
else if (line == _("1")) current_card->value<ChoiceValue>(_("rarity")).value.assign(_("uncommon"));
|
||||
else current_card->value<ChoiceValue>(_("rarity")).value.assign(_("rare"));
|
||||
} else if (line == _("#COLOR#########")) { // card color
|
||||
target = 0;
|
||||
target = nullptr;
|
||||
line = file.ReadLine();
|
||||
current_card->value<ChoiceValue>(_("card color")).value.assign(line);
|
||||
} else if (line == _("#AUTOBG########")) { // card color.isDefault
|
||||
target = 0;
|
||||
target = nullptr;
|
||||
line = file.ReadLine();
|
||||
if (line == _("TRUE")) {
|
||||
current_card->value<ChoiceValue>(_("card color")).value.makeDefault();
|
||||
@@ -143,7 +143,7 @@ SetP MtgEditorFileFormat::importSet(const String& filename) {
|
||||
} else if (line == _("#TOUGHNESS#####")) { // toughness
|
||||
target = ¤t_card->value<TextValue>(_("toughness")).value;
|
||||
} else if (line == _("#ILLUSTRATION##") || line == _("#ILLUSTRATION8#")) { // image
|
||||
target = 0;
|
||||
target = nullptr;
|
||||
line = file.ReadLine();
|
||||
if (!wxFileExists(line)) {
|
||||
// based on card name and date
|
||||
@@ -158,14 +158,14 @@ SetP MtgEditorFileFormat::importSet(const String& filename) {
|
||||
}
|
||||
}
|
||||
} else if (line == _("#TOMBSTONE#####")) { // tombstone
|
||||
target = 0;
|
||||
target = nullptr;
|
||||
line = file.ReadLine();
|
||||
current_card->value<ChoiceValue>(_("card symbol")).value.assign(
|
||||
line==_("TRUE") ? _("tombstone") : _("none")
|
||||
);
|
||||
} else {
|
||||
// normal text
|
||||
if (target != 0) { // value of a text field
|
||||
if (target != nullptr) { // value of a text field
|
||||
if (!target->isDefault()) target->mutate() += _("\n");
|
||||
target->mutate() += line;
|
||||
} else {
|
||||
|
||||
+3
-3
@@ -70,11 +70,11 @@ public:
|
||||
void initCardListColorScript();
|
||||
|
||||
static String typeNameStatic();
|
||||
virtual String typeName() const;
|
||||
Version fileVersion() const;
|
||||
String typeName() const override;
|
||||
Version fileVersion() const override;
|
||||
|
||||
protected:
|
||||
virtual void validate(Version);
|
||||
void validate(Version) override;
|
||||
|
||||
DECLARE_REFLECTION_OVERRIDE();
|
||||
};
|
||||
|
||||
@@ -43,9 +43,9 @@ public:
|
||||
void addPackage(Packaged& package);
|
||||
|
||||
protected:
|
||||
virtual String typeName() const;
|
||||
virtual Version fileVersion() const;
|
||||
virtual void validate(Version file_app_version);
|
||||
String typeName() const override;
|
||||
Version fileVersion() const override;
|
||||
void validate(Version file_app_version) override;
|
||||
DECLARE_REFLECTION();
|
||||
};
|
||||
|
||||
|
||||
+2
-2
@@ -43,8 +43,8 @@ public:
|
||||
static LocaleP byName(const String& name);
|
||||
|
||||
protected:
|
||||
String typeName() const;
|
||||
Version fileVersion() const;
|
||||
String typeName() const override;
|
||||
Version fileVersion() const override;
|
||||
DECLARE_REFLECTION();
|
||||
};
|
||||
|
||||
|
||||
+2
-2
@@ -256,7 +256,7 @@ void PackInstance::generate(vector<CardP>* out) {
|
||||
// 1. the weights of each item, and of the cards
|
||||
vector<WeightedItem> weighted_items;
|
||||
FOR_EACH_CONST(item, pack_type.items) {
|
||||
WeightedItem wi = {0,0,parent.gen()};
|
||||
WeightedItem wi = {0,0,(int)parent.gen()};
|
||||
if (pack_type.select == SELECT_EQUAL_PROPORTIONAL) {
|
||||
wi.weight = item->weight * parent.get(item->name).total_weight;
|
||||
} else if (pack_type.select == SELECT_EQUAL_NONEMPTY) {
|
||||
@@ -266,7 +266,7 @@ void PackInstance::generate(vector<CardP>* out) {
|
||||
}
|
||||
weighted_items.push_back(wi);
|
||||
}
|
||||
WeightedItem wi = {cards.size(),0,parent.gen()};
|
||||
WeightedItem wi = {(double)cards.size(),0,(int)parent.gen()};
|
||||
weighted_items.push_back(wi);
|
||||
// 2. divide the requested_copies among the cards and the items, taking the weights into account
|
||||
weighted_equal_divide(weighted_items, (int)requested_copies);
|
||||
|
||||
+5
-5
@@ -114,18 +114,18 @@ public:
|
||||
/// Clear the order_cache used by positionOfCard
|
||||
void clearOrderCache();
|
||||
|
||||
virtual String typeName() const;
|
||||
Version fileVersion() const;
|
||||
String typeName() const override;
|
||||
Version fileVersion() const override;
|
||||
/// Validate that the set is correctly loaded
|
||||
virtual void validate(Version = app_version);
|
||||
void validate(Version = app_version) override;
|
||||
|
||||
protected:
|
||||
virtual VCSP getVCS() {
|
||||
VCSP getVCS() override {
|
||||
return vcs;
|
||||
}
|
||||
|
||||
private:
|
||||
DECLARE_REFLECTION();
|
||||
DECLARE_REFLECTION_OVERRIDE();
|
||||
template <typename Handler>
|
||||
void reflect_cards(Handler& handler);
|
||||
|
||||
|
||||
@@ -62,10 +62,10 @@ public:
|
||||
String stylesheetName() const;
|
||||
|
||||
static String typeNameStatic();
|
||||
virtual String typeName() const;
|
||||
Version fileVersion() const;
|
||||
String typeName() const override;
|
||||
Version fileVersion() const override;
|
||||
/// Validate the stylesheet
|
||||
virtual void validate(Version = app_version);
|
||||
void validate(Version = app_version) override;
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
+19
-19
@@ -206,11 +206,11 @@ public:
|
||||
|
||||
SymbolShape();
|
||||
|
||||
virtual String typeName() const;
|
||||
virtual SymbolPartP clone() const;
|
||||
virtual int icon() const { return combine; }
|
||||
virtual SymbolShape* isSymbolShape() { return this; }
|
||||
virtual const SymbolShape* isSymbolShape() const { return this; }
|
||||
String typeName() const override;
|
||||
SymbolPartP clone() const override;
|
||||
int icon() const override { return combine; }
|
||||
SymbolShape* isSymbolShape() override { return this; }
|
||||
const SymbolShape* isSymbolShape() const override { return this; }
|
||||
|
||||
/// Get a control point, wraps around
|
||||
inline ControlPointP getPoint(int id) const {
|
||||
@@ -221,7 +221,7 @@ public:
|
||||
void enforceConstraints();
|
||||
|
||||
/// Calculate the position and size of the part using the given rotation matrix
|
||||
virtual Bounds calculateBounds(const Vector2D& origin, const Matrix2D& m, bool is_identity);
|
||||
Bounds calculateBounds(const Vector2D& origin, const Matrix2D& m, bool is_identity) override;
|
||||
|
||||
DECLARE_REFLECTION_OVERRIDE();
|
||||
void after_reading(Version) override;
|
||||
@@ -236,15 +236,15 @@ public:
|
||||
|
||||
SymbolGroup();
|
||||
|
||||
virtual String typeName() const;
|
||||
virtual SymbolPartP clone() const;
|
||||
virtual int icon() const { return SYMBOL_COMBINE_BORDER + 3; }
|
||||
virtual SymbolGroup* isSymbolGroup() { return this; }
|
||||
virtual const SymbolGroup* isSymbolGroup() const { return this; }
|
||||
String typeName() const override;
|
||||
SymbolPartP clone() const override;
|
||||
int icon() const override { return SYMBOL_COMBINE_BORDER + 3; }
|
||||
SymbolGroup* isSymbolGroup() override { return this; }
|
||||
const SymbolGroup* isSymbolGroup() const override { return this; }
|
||||
|
||||
virtual bool isAncestor(const SymbolPart& that) const;
|
||||
bool isAncestor(const SymbolPart& that) const override;
|
||||
|
||||
virtual Bounds calculateBounds(const Vector2D& origin, const Matrix2D& m, bool is_identity);
|
||||
Bounds calculateBounds(const Vector2D& origin, const Matrix2D& m, bool is_identity) override;
|
||||
|
||||
DECLARE_REFLECTION_OVERRIDE();
|
||||
};
|
||||
@@ -268,14 +268,14 @@ public:
|
||||
|
||||
SymbolSymmetry();
|
||||
|
||||
virtual String typeName() const;
|
||||
virtual SymbolPartP clone() const;
|
||||
virtual int icon() const { return kind + SYMBOL_COMBINE_BORDER + 1; }
|
||||
virtual SymbolSymmetry* isSymbolSymmetry() { return this; }
|
||||
virtual const SymbolSymmetry* isSymbolSymmetry() const { return this; }
|
||||
String typeName() const override;
|
||||
SymbolPartP clone() const override;
|
||||
int icon() const override { return kind + SYMBOL_COMBINE_BORDER + 1; }
|
||||
SymbolSymmetry* isSymbolSymmetry() override { return this; }
|
||||
const SymbolSymmetry* isSymbolSymmetry() const override { return this; }
|
||||
|
||||
String expectedName() const;
|
||||
virtual Bounds calculateBounds(const Vector2D& origin, const Matrix2D& m, bool is_identity);
|
||||
Bounds calculateBounds(const Vector2D& origin, const Matrix2D& m, bool is_identity) override;
|
||||
|
||||
DECLARE_REFLECTION_OVERRIDE();
|
||||
};
|
||||
|
||||
+10
-10
@@ -68,8 +68,8 @@ public:
|
||||
Image getImage(double font_size, const DrawableSymbol& symbol);
|
||||
|
||||
static String typeNameStatic();
|
||||
virtual String typeName() const;
|
||||
Version fileVersion() const;
|
||||
String typeName() const override;
|
||||
Version fileVersion() const override;
|
||||
|
||||
/// Generate a 'insert symbol' menu.
|
||||
/** This class owns the menu!
|
||||
@@ -112,9 +112,9 @@ public:
|
||||
// ----------------------------------------------------------------------------- : InsertSymbolMenu
|
||||
|
||||
enum MenuItemType
|
||||
{ ITEM_CODE ///< Name gives the code to insert
|
||||
, ITEM_CUSTOM ///< Use a dialog box
|
||||
, ITEM_LINE ///< A menu separator
|
||||
{ ITEM_CODE ///< Name gives the code to insert
|
||||
, ITEM_CUSTOM ///< Use a dialog box
|
||||
, ITEM_LINE ///< A menu separator
|
||||
, ITEM_SUBMENU ///< A submenu
|
||||
};
|
||||
|
||||
@@ -153,11 +153,11 @@ public:
|
||||
/// Is a font loaded?
|
||||
bool valid() const;
|
||||
|
||||
Scriptable<String> name; ///< Font package name, can be changed with script
|
||||
Scriptable<double> size; ///< Size of the font
|
||||
double scale_down_to; ///< Mimumum size of the font
|
||||
Scriptable<Alignment> alignment; ///< Alignment of symbols in a line of text
|
||||
SymbolFontP font; ///< The font, if it is loaded
|
||||
Scriptable<String> name; ///< Font package name, can be changed with script
|
||||
Scriptable<double> size; ///< Size of the font
|
||||
double scale_down_to; ///< Mimumum size of the font
|
||||
Scriptable<Alignment> alignment; ///< Alignment of symbols in a line of text
|
||||
SymbolFontP font; ///< The font, if it is loaded
|
||||
|
||||
private:
|
||||
DECLARE_REFLECTION();
|
||||
|
||||
@@ -41,7 +41,7 @@ class HoverButtonBase : public wxControl {
|
||||
public:
|
||||
HoverButtonBase(Window* parent, int id, bool accepts_focus = true);
|
||||
|
||||
virtual bool AcceptsFocus() const;
|
||||
bool AcceptsFocus() const override;
|
||||
|
||||
virtual void SetHelpText(const String& s) { help_text = s; }
|
||||
|
||||
@@ -90,14 +90,14 @@ private:
|
||||
Bitmap bg_normal, bg_hover, bg_focus, bg_down; ///< Bitmaps for the states of the button
|
||||
Color background;
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
wxSize DoGetBestSize() const override;
|
||||
|
||||
const Bitmap* last_drawn;
|
||||
const Bitmap* toDraw() const;
|
||||
protected:
|
||||
int drawDelta() const;
|
||||
virtual void refreshIfNeeded();
|
||||
virtual void draw(DC& dc);
|
||||
void refreshIfNeeded() override;
|
||||
void draw(DC& dc) override;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -47,24 +47,24 @@ public:
|
||||
|
||||
protected:
|
||||
/// Get all items
|
||||
virtual void getItems(vector<VoidP>& out) const;
|
||||
void getItems(vector<VoidP>& out) const override;
|
||||
/// Return the AutoReplace at the given position in the sorted list
|
||||
inline AutoReplaceP getAR(long pos) const { return static_pointer_cast<AutoReplace>(getItem(pos)); }
|
||||
|
||||
/// Send an 'item selected' event for the currently selected item (selected_item)
|
||||
virtual void sendEvent();
|
||||
void sendEvent() override;
|
||||
/// Compare items
|
||||
virtual bool compareItems(void* a, void* b) const;
|
||||
virtual bool mustSort() const { return true; }
|
||||
bool compareItems(void* a, void* b) const override;
|
||||
bool mustSort() const override { return true; }
|
||||
|
||||
/// Get the text of an item in a specific column
|
||||
/** Overrides a function from wxListCtrl */
|
||||
virtual String OnGetItemText (long pos, long col) const;
|
||||
String OnGetItemText (long pos, long col) const override;
|
||||
/// Get the image of an item, by default no image is used
|
||||
/** Overrides a function from wxListCtrl */
|
||||
virtual int OnGetItemImage(long pos) const;
|
||||
int OnGetItemImage(long pos) const override;
|
||||
/// Get the color for an item
|
||||
virtual wxListItemAttr* OnGetItemAttr(long pos) const;
|
||||
wxListItemAttr* OnGetItemAttr(long pos) const override;
|
||||
|
||||
mutable wxListItemAttr item_attr; // for OnGetItemAttr
|
||||
};
|
||||
|
||||
@@ -122,8 +122,8 @@ struct CompareTabOrder {
|
||||
assert(a && b);
|
||||
Style& as = *a->getStyle(), &bs = *b->getStyle();
|
||||
// if tab_index differs, use that
|
||||
if (as.tab_index < as.tab_index) return true;
|
||||
if (as.tab_index > as.tab_index) return false;
|
||||
if (as.tab_index < bs.tab_index) return true;
|
||||
if (as.tab_index > bs.tab_index) return false;
|
||||
// otherwise look at the positions
|
||||
// To get a total order, we look at the viewer center.
|
||||
// Not completely (y,x), because for viewers that are almost at the same y we prefer to sort by x
|
||||
|
||||
@@ -23,10 +23,10 @@ public:
|
||||
|
||||
// --------------------------------------------------- : Utility for ValueViewers/Editors
|
||||
|
||||
virtual DrawWhat drawWhat(const ValueViewer*) const;
|
||||
virtual bool viewerIsCurrent(const ValueViewer*) const;
|
||||
DrawWhat drawWhat(const ValueViewer*) const override;
|
||||
bool viewerIsCurrent(const ValueViewer*) const override;
|
||||
|
||||
virtual void addAction(unique_ptr<Action> action);
|
||||
virtual void addAction(unique_ptr<Action> action) final;
|
||||
inline SetP getSetForActions() { return set; }
|
||||
|
||||
// --------------------------------------------------- : Selection
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
/// Select the previous editable editor, returns false if the current editor is the first one
|
||||
bool selectPrevious();
|
||||
|
||||
virtual bool AcceptsFocus() const;
|
||||
bool AcceptsFocus() const override;
|
||||
|
||||
/// The next window in the tab order (optional)
|
||||
const wxWindow* next_in_tab_order;
|
||||
@@ -90,9 +90,9 @@ public:
|
||||
|
||||
protected:
|
||||
/// Create an editor for the given style (as opposed to a normal viewer)
|
||||
virtual ValueViewerP makeViewer(const StyleP&);
|
||||
ValueViewerP makeViewer(const StyleP&) override;
|
||||
|
||||
virtual void onInit();
|
||||
void onInit() override;
|
||||
|
||||
// --------------------------------------------------- : Data
|
||||
ValueViewer* current_viewer; ///< The currently selected viewer
|
||||
|
||||
@@ -69,20 +69,20 @@ public:
|
||||
|
||||
// --------------------------------------------------- : Clipboard
|
||||
|
||||
bool canCut() const;
|
||||
bool canCopy() const;
|
||||
bool canPaste() const;
|
||||
bool canDelete() const;
|
||||
bool canCut() const override;
|
||||
bool canCopy() const override;
|
||||
bool canPaste() const override;
|
||||
bool canDelete() const override;
|
||||
// Try to perform a clipboard operation, return success
|
||||
bool doCopy();
|
||||
bool doPaste();
|
||||
bool doDelete();
|
||||
bool doCopy() override;
|
||||
bool doPaste() override;
|
||||
bool doDelete() override;
|
||||
|
||||
// --------------------------------------------------- : Set actions
|
||||
|
||||
virtual void onBeforeChangeSet();
|
||||
virtual void onChangeSet();
|
||||
virtual void onAction(const Action&, bool undone);
|
||||
void onBeforeChangeSet() override;
|
||||
void onChangeSet() override;
|
||||
void onAction(const Action&, bool undone) override;
|
||||
|
||||
// --------------------------------------------------- : The cards
|
||||
public:
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
void getSelection(vector<CardP>& out) const;
|
||||
protected:
|
||||
/// Get a list of all cards
|
||||
virtual void getItems(vector<VoidP>& out) const;
|
||||
void getItems(vector<VoidP>& out) const override;
|
||||
|
||||
/// Rebuild the card list (clear all vectors and fill them again)
|
||||
void rebuild();
|
||||
@@ -101,24 +101,24 @@ protected:
|
||||
/// Can the card list be modified?
|
||||
virtual bool allowModify() const { return false; }
|
||||
/// Sort all card lists
|
||||
virtual void sortBy(long column, bool ascending);
|
||||
void sortBy(long column, bool ascending) override;
|
||||
|
||||
/// Send an 'item selected' event for the currently selected item (selected_item)
|
||||
virtual void sendEvent() { sendEvent(EVENT_CARD_SELECT); }
|
||||
void sendEvent() override { sendEvent(EVENT_CARD_SELECT); }
|
||||
void sendEvent(int type = EVENT_CARD_SELECT);
|
||||
/// Compare cards
|
||||
virtual bool compareItems(void* a, void* b) const;
|
||||
bool compareItems(void* a, void* b) const override;
|
||||
|
||||
// --------------------------------------------------- : Item 'events'
|
||||
|
||||
/// Get the text of an item in a specific column
|
||||
/** Overrides a function from wxListCtrl */
|
||||
virtual String OnGetItemText (long pos, long col) const;
|
||||
String OnGetItemText (long pos, long col) const override;
|
||||
/// Get the image of an item, by default no image is used
|
||||
/** Overrides a function from wxListCtrl */
|
||||
virtual int OnGetItemImage(long pos) const;
|
||||
int OnGetItemImage(long pos) const override;
|
||||
/// Get the color for an item
|
||||
virtual wxListItemAttr* OnGetItemAttr(long pos) const;
|
||||
wxListItemAttr* OnGetItemAttr(long pos) const override;
|
||||
|
||||
// --------------------------------------------------- : Data
|
||||
private:
|
||||
|
||||
@@ -32,24 +32,24 @@ public:
|
||||
/// Invalidate and redraw the entire viewer
|
||||
void redraw();
|
||||
/// Invalidate and redraw (the area of) a single value viewer
|
||||
virtual void redraw(const ValueViewer&);
|
||||
void redraw(const ValueViewer&) override;
|
||||
|
||||
/// The rotation to use
|
||||
virtual Rotation getRotation() const;
|
||||
Rotation getRotation() const override;
|
||||
|
||||
virtual bool AcceptsFocus() const { return false; }
|
||||
bool AcceptsFocus() const override { return false; }
|
||||
|
||||
protected:
|
||||
/// Return the desired size of control
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
wxSize DoGetBestSize() const override;
|
||||
|
||||
virtual void onChange();
|
||||
virtual void onChangeSize();
|
||||
void onChange() override;
|
||||
void onChangeSize() override;
|
||||
|
||||
/// Should the given viewer be drawn?
|
||||
bool shouldDraw(const ValueViewer&) const;
|
||||
|
||||
virtual void drawViewer(RotatedDC& dc, ValueViewer& v);
|
||||
void drawViewer(RotatedDC& dc, ValueViewer& v) override;
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
@@ -24,10 +24,10 @@ public:
|
||||
vector<String> choices;
|
||||
|
||||
protected:
|
||||
virtual size_t selection() const { return NO_SELECTION; }
|
||||
virtual size_t itemCount() const { return choices.size(); }
|
||||
virtual String itemText(size_t item) const { return choices.at(item); }
|
||||
virtual void select(size_t item);
|
||||
size_t selection() const override { return NO_SELECTION; }
|
||||
size_t itemCount() const override { return choices.size(); }
|
||||
String itemText(size_t item) const override { return choices.at(item); }
|
||||
void select(size_t item) override;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : FilterControl
|
||||
|
||||
@@ -26,11 +26,11 @@ public:
|
||||
|
||||
protected:
|
||||
/// Get only the subset of the cards
|
||||
virtual void getItems(vector<VoidP>& out) const;
|
||||
void getItems(vector<VoidP>& out) const override;
|
||||
|
||||
virtual void onChangeSet();
|
||||
void onChangeSet() override;
|
||||
|
||||
private:
|
||||
private:
|
||||
CardListFilterP filter; ///< Filter with which this.cards is made
|
||||
};
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ protected:
|
||||
virtual void onSelect(size_t item, size_t col, bool& changes) {}
|
||||
|
||||
/// Return the desired size of control
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
wxSize DoGetBestSize() const override;
|
||||
|
||||
/// Information on the subcolumns. These are columns inside items
|
||||
struct SubColumn {
|
||||
|
||||
+30
-30
@@ -157,9 +157,9 @@ protected:
|
||||
class Graph1D : public Graph {
|
||||
public:
|
||||
inline Graph1D(size_t axis) : axis(axis) {}
|
||||
virtual void draw(RotatedDC& dc, const vector<int>& current, DrawLayer layer) const;
|
||||
virtual bool findItem(const RealPoint& pos, const RealRect& screen_rect, bool tight, vector<int>& out) const;
|
||||
virtual void setData(const GraphDataP& d);
|
||||
void draw(RotatedDC& dc, const vector<int>& current, DrawLayer layer) const override;
|
||||
bool findItem(const RealPoint& pos, const RealRect& screen_rect, bool tight, vector<int>& out) const override;
|
||||
void setData(const GraphDataP& d) override;
|
||||
protected:
|
||||
size_t axis;
|
||||
/// Find an item, return the position along the axis, or -1 if not found
|
||||
@@ -172,7 +172,7 @@ protected:
|
||||
class Graph2D : public Graph {
|
||||
public:
|
||||
inline Graph2D(size_t axis1, size_t axis2) : axis1(axis1), axis2(axis2) {}
|
||||
virtual void setData(const GraphDataP& d);
|
||||
void setData(const GraphDataP& d) override;
|
||||
protected:
|
||||
size_t axis1, axis2;
|
||||
vector<UInt> values; // axis1.size * axis2.size array
|
||||
@@ -184,33 +184,33 @@ protected:
|
||||
class BarGraph : public Graph1D {
|
||||
public:
|
||||
inline BarGraph(size_t axis) : Graph1D(axis) {}
|
||||
virtual void draw(RotatedDC& dc, int current, DrawLayer layer) const;
|
||||
virtual int findItem(const RealPoint& pos, const RealRect& screen_rect, bool tight) const;
|
||||
void draw(RotatedDC& dc, int current, DrawLayer layer) const override;
|
||||
int findItem(const RealPoint& pos, const RealRect& screen_rect, bool tight) const override;
|
||||
};
|
||||
|
||||
// A bar graph with stacked bars
|
||||
class BarGraph2D : public Graph2D {
|
||||
public:
|
||||
inline BarGraph2D(size_t axis_h, size_t axis_v) : Graph2D(axis_h, axis_v) {}
|
||||
virtual void draw(RotatedDC& dc, const vector<int>& current, DrawLayer layer) const;
|
||||
virtual bool findItem(const RealPoint& pos, const RealRect& screen_rect, bool tight, vector<int>& out) const;
|
||||
void draw(RotatedDC& dc, const vector<int>& current, DrawLayer layer) const override;
|
||||
bool findItem(const RealPoint& pos, const RealRect& screen_rect, bool tight, vector<int>& out) const override;
|
||||
};
|
||||
|
||||
/// A pie graph
|
||||
class PieGraph : public Graph1D {
|
||||
public:
|
||||
inline PieGraph(size_t axis) : Graph1D(axis) {}
|
||||
virtual void draw(RotatedDC& dc, int current, DrawLayer layer) const;
|
||||
virtual int findItem(const RealPoint& pos, const RealRect& screen_rect, bool tight) const;
|
||||
void draw(RotatedDC& dc, int current, DrawLayer layer) const override;
|
||||
int findItem(const RealPoint& pos, const RealRect& screen_rect, bool tight) const override;
|
||||
};
|
||||
|
||||
/// A scatter plot
|
||||
class ScatterGraph : public Graph2D {
|
||||
public:
|
||||
inline ScatterGraph(size_t axis1, size_t axis2) : Graph2D(axis1, axis2) {}
|
||||
virtual void draw(RotatedDC& dc, const vector<int>& current, DrawLayer layer) const;
|
||||
virtual bool findItem(const RealPoint& pos, const RealRect& screen_rect, bool tight, vector<int>& out) const;
|
||||
virtual void setData(const GraphDataP& d);
|
||||
void draw(RotatedDC& dc, const vector<int>& current, DrawLayer layer) const override;
|
||||
bool findItem(const RealPoint& pos, const RealRect& screen_rect, bool tight, vector<int>& out) const override;
|
||||
void setData(const GraphDataP& d) override;
|
||||
protected:
|
||||
UInt max_value;
|
||||
double max_value_x, max_value_y; ///< highest sum of two adjacent scaled values (radii)
|
||||
@@ -221,7 +221,7 @@ protected:
|
||||
class ScatterGraphPlus : public ScatterGraph {
|
||||
public:
|
||||
inline ScatterGraphPlus(size_t axis1, size_t axis2, size_t axis3) : ScatterGraph(axis1, axis2), axis3(axis3) {}
|
||||
virtual void setData(const GraphDataP& d);
|
||||
void setData(const GraphDataP& d) override;
|
||||
protected:
|
||||
size_t axis3;
|
||||
vector<UInt> values3D; // axis1.size * axis2.size * axis3.size array
|
||||
@@ -232,7 +232,7 @@ protected:
|
||||
class ScatterPieGraph : public ScatterGraphPlus {
|
||||
public:
|
||||
inline ScatterPieGraph(size_t axis1, size_t axis2, size_t axis3) : ScatterGraphPlus(axis1, axis2, axis3) {}
|
||||
virtual void draw(RotatedDC& dc, const vector<int>& current, DrawLayer layer) const;
|
||||
void draw(RotatedDC& dc, const vector<int>& current, DrawLayer layer) const override;
|
||||
};
|
||||
|
||||
/// The legend, used for pie graphs
|
||||
@@ -241,9 +241,9 @@ public:
|
||||
inline GraphLegend(size_t axis, Alignment alignment, bool reverse = false)
|
||||
: Graph1D(axis), alignment(alignment), reverse(reverse)
|
||||
{}
|
||||
virtual RealSize determineSize(RotatedDC& dc) const;
|
||||
virtual void draw(RotatedDC& dc, int current, DrawLayer layer) const;
|
||||
virtual int findItem(const RealPoint& pos, const RealRect& screen_rect, bool tight) const;
|
||||
RealSize determineSize(RotatedDC& dc) const override;
|
||||
void draw(RotatedDC& dc, int current, DrawLayer layer) const override;
|
||||
int findItem(const RealPoint& pos, const RealRect& screen_rect, bool tight) const override;
|
||||
private:
|
||||
mutable RealSize size, item_size;
|
||||
Alignment alignment;
|
||||
@@ -256,9 +256,9 @@ public:
|
||||
inline GraphStats(size_t axis, Alignment alignment)
|
||||
: Graph1D(axis), alignment(alignment)
|
||||
{}
|
||||
virtual RealSize determineSize(RotatedDC& dc) const;
|
||||
virtual void draw(RotatedDC& dc, int current, DrawLayer layer) const;
|
||||
virtual void setData(const GraphDataP& d);
|
||||
RealSize determineSize(RotatedDC& dc) const override;
|
||||
void draw(RotatedDC& dc, int current, DrawLayer layer) const override;
|
||||
void setData(const GraphDataP& d) override;
|
||||
private:
|
||||
mutable RealSize size, item_size;
|
||||
mutable double label_width;
|
||||
@@ -281,8 +281,8 @@ public:
|
||||
inline GraphLabelAxis(size_t axis, Direction direction, bool rotate = false, DrawLines draw_lines = DRAW_LINES_NO, bool label = false)
|
||||
: Graph1D(axis), direction(direction), rotate(rotate), draw_lines(draw_lines), label(label)
|
||||
{}
|
||||
virtual void draw(RotatedDC& dc, int current, DrawLayer layer) const;
|
||||
virtual int findItem(const RealPoint& pos, const RealRect& screen_rect, bool tight) const;
|
||||
void draw(RotatedDC& dc, int current, DrawLayer layer) const override;
|
||||
int findItem(const RealPoint& pos, const RealRect& screen_rect, bool tight) const override;
|
||||
private:
|
||||
Direction direction;
|
||||
int levels;
|
||||
@@ -295,7 +295,7 @@ private:
|
||||
class GraphValueAxis : public Graph1D {
|
||||
public:
|
||||
inline GraphValueAxis(size_t axis, bool highlight_value) : Graph1D(axis), highlight_value(highlight_value) {}
|
||||
virtual void draw(RotatedDC& dc, int current, DrawLayer layer) const;
|
||||
void draw(RotatedDC& dc, int current, DrawLayer layer) const override;
|
||||
private:
|
||||
bool highlight_value;
|
||||
};
|
||||
@@ -310,9 +310,9 @@ public:
|
||||
, margin_left(margin_left), margin_top(margin_top), margin_right(margin_right), margin_bottom(margin_bottom)
|
||||
, upside_down(upside_down)
|
||||
{}
|
||||
virtual void draw(RotatedDC& dc, const vector<int>& current, DrawLayer layer) const;
|
||||
virtual bool findItem(const RealPoint& pos, const RealRect& screen_rect, bool tight, vector<int>& out) const;
|
||||
virtual void setData(const GraphDataP& d);
|
||||
void draw(RotatedDC& dc, const vector<int>& current, DrawLayer layer) const override;
|
||||
bool findItem(const RealPoint& pos, const RealRect& screen_rect, bool tight, vector<int>& out) const override;
|
||||
void setData(const GraphDataP& d) override;
|
||||
private:
|
||||
const GraphP graph;
|
||||
double margin_left, margin_top, margin_right, margin_bottom;
|
||||
@@ -322,9 +322,9 @@ private:
|
||||
/// A display containing multiple graphs
|
||||
class GraphContainer : public Graph {
|
||||
public:
|
||||
virtual void draw(RotatedDC& dc, const vector<int>& current, DrawLayer layer) const;
|
||||
virtual bool findItem(const RealPoint& pos, const RealRect& screen_rect, bool tight, vector<int>& out) const;
|
||||
virtual void setData(const GraphDataP& d);
|
||||
void draw(RotatedDC& dc, const vector<int>& current, DrawLayer layer) const override;
|
||||
bool findItem(const RealPoint& pos, const RealRect& screen_rect, bool tight, vector<int>& out) const override;
|
||||
void setData(const GraphDataP& d) override;
|
||||
|
||||
void add(const GraphP& graph);
|
||||
private:
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
wxDateTime::Now()) // TODO: Find mofication time of card image
|
||||
, filename(filename)
|
||||
{}
|
||||
virtual Image generate() {
|
||||
Image generate() override {
|
||||
try {
|
||||
ImageCardList* parent = (ImageCardList*)owner;
|
||||
Image image;
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
return Image();
|
||||
}
|
||||
}
|
||||
virtual void store(const Image& img) {
|
||||
void store(const Image& img) override {
|
||||
// add finished bitmap to the imagelist
|
||||
ImageCardList* parent = (ImageCardList*)owner;
|
||||
if (img.Ok()) {
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual bool threadSafe() const {return true;}
|
||||
bool threadSafe() const override {return true;}
|
||||
private:
|
||||
LocalFileName filename;
|
||||
};
|
||||
|
||||
@@ -23,10 +23,10 @@ public:
|
||||
~ImageCardList();
|
||||
ImageCardList(Window* parent, int id, long additional_style = 0);
|
||||
protected:
|
||||
virtual int OnGetItemImage(long pos) const;
|
||||
virtual void onRebuild();
|
||||
virtual void onBeforeChangeSet();
|
||||
virtual bool allowModify() const { return true; }
|
||||
int OnGetItemImage(long pos) const override;
|
||||
void onRebuild() override;
|
||||
void onBeforeChangeSet() override;
|
||||
bool allowModify() const override { return true; }
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
void onIdle(wxIdleEvent&);
|
||||
@@ -50,8 +50,8 @@ public:
|
||||
|
||||
protected:
|
||||
/// Get only the subset of the cards
|
||||
virtual void getItems(vector<VoidP>& out) const;
|
||||
virtual void onChangeSet();
|
||||
void getItems(vector<VoidP>& out) const override;
|
||||
void onChangeSet() override;
|
||||
|
||||
private:
|
||||
CardListFilterP filter; ///< Filter with which this.cards is made
|
||||
|
||||
@@ -99,7 +99,7 @@ protected:
|
||||
|
||||
// --------------------------------------------------- : Fixing wx issues
|
||||
|
||||
wxSize DoGetBestClientSize() const;
|
||||
wxSize DoGetBestClientSize() const override;
|
||||
|
||||
// --------------------------------------------------- : Data
|
||||
VoidP selected_item; ///< The currently selected item
|
||||
|
||||
@@ -43,9 +43,9 @@ public:
|
||||
|
||||
// --------------------------------------------------- : Set stuff
|
||||
|
||||
virtual void onBeforeChangeSet();
|
||||
virtual void onChangeSet();
|
||||
virtual void onAction(const Action&, bool);
|
||||
void onBeforeChangeSet() override;
|
||||
void onChangeSet() override;
|
||||
void onAction(const Action&, bool) override;
|
||||
void updateUsageStatistics();
|
||||
|
||||
// --------------------------------------------------- : Selection
|
||||
@@ -58,35 +58,35 @@ public:
|
||||
|
||||
// --------------------------------------------------- : Clipboard
|
||||
|
||||
bool canDelete() const;
|
||||
bool canCopy() const;
|
||||
bool canPaste() const;
|
||||
bool canDelete() const override;
|
||||
bool canCopy() const override;
|
||||
bool canPaste() const override;
|
||||
// Try to perform a clipboard operation, return success
|
||||
bool doCut();
|
||||
bool doCopy();
|
||||
bool doPaste();
|
||||
bool doDelete();
|
||||
bool doCut() override;
|
||||
bool doCopy() override;
|
||||
bool doPaste() override;
|
||||
bool doDelete() override;
|
||||
|
||||
// --------------------------------------------------- : The keywords
|
||||
protected:
|
||||
/// Get a list of all keywords
|
||||
virtual void getItems(vector<VoidP>& out) const;
|
||||
void getItems(vector<VoidP>& out) const override;
|
||||
/// Return the keyword at the given position in the sorted keyword list
|
||||
inline KeywordP getKeyword(long pos) const { return static_pointer_cast<Keyword>(getItem(pos)); }
|
||||
|
||||
/// Send an 'item selected' event for the currently selected item (selected_item)
|
||||
virtual void sendEvent();
|
||||
void sendEvent() override;
|
||||
/// Compare keywords
|
||||
virtual bool compareItems(void* a, void* b) const;
|
||||
bool compareItems(void* a, void* b) const override;
|
||||
|
||||
/// Get the text of an item in a specific column
|
||||
/** Overrides a function from wxListCtrl */
|
||||
virtual String OnGetItemText (long pos, long col) const;
|
||||
String OnGetItemText (long pos, long col) const override;
|
||||
/// Get the image of an item, by default no image is used
|
||||
/** Overrides a function from wxListCtrl */
|
||||
virtual int OnGetItemImage(long pos) const;
|
||||
int OnGetItemImage(long pos) const override;
|
||||
/// Get the color for an item
|
||||
virtual wxListItemAttr* OnGetItemAttr(long pos) const;
|
||||
wxListItemAttr* OnGetItemAttr(long pos) const override;
|
||||
|
||||
private:
|
||||
void storeColumns();
|
||||
|
||||
@@ -21,16 +21,16 @@ public:
|
||||
NativeLookEditor(Window* parent, int id, long style = wxBORDER_THEME);
|
||||
|
||||
/// Uses a native look
|
||||
virtual bool nativeLook() const { return true; }
|
||||
virtual Rotation getRotation() const;
|
||||
bool nativeLook() const override { return true; }
|
||||
Rotation getRotation() const override;
|
||||
|
||||
virtual void draw(DC& dc);
|
||||
virtual void drawViewer(RotatedDC& dc, ValueViewer& v);
|
||||
void draw(DC& dc) override;
|
||||
void drawViewer(RotatedDC& dc, ValueViewer& v) override;
|
||||
|
||||
protected:
|
||||
// Best size doesn't really matter, as long as it is not too small
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
virtual void onInit();
|
||||
wxSize DoGetBestSize() const override;
|
||||
void onInit() override;
|
||||
|
||||
private:
|
||||
static const int margin = 6;
|
||||
@@ -57,9 +57,9 @@ class SetInfoEditor : public NativeLookEditor {
|
||||
public:
|
||||
SetInfoEditor(Window* parent, int id, long style = wxBORDER_THEME);
|
||||
|
||||
virtual Package& getStylePackage() const;
|
||||
Package& getStylePackage() const override;
|
||||
protected:
|
||||
virtual void onChangeSet();
|
||||
void onChangeSet() override;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : StylingEditor
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
/// Show the styling for given card
|
||||
void showCard(const CardP& card);
|
||||
protected:
|
||||
virtual void onChangeSet();
|
||||
void onChangeSet() override;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : ExportOptionsEditor
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
/// Show the options for given export template
|
||||
void showExport(const ExportTemplateP& export_template);
|
||||
|
||||
virtual Package& getStylePackage() const;
|
||||
Package& getStylePackage() const override;
|
||||
private:
|
||||
ExportTemplateP export_template;
|
||||
};
|
||||
|
||||
@@ -53,9 +53,9 @@ public:
|
||||
|
||||
protected:
|
||||
/// Draw an item
|
||||
virtual void drawItem(DC& dc, int x, int y, size_t item);
|
||||
void drawItem(DC& dc, int x, int y, size_t item) override;
|
||||
/// Return how many items there are in the list
|
||||
virtual size_t itemCount() const;
|
||||
size_t itemCount() const override;
|
||||
|
||||
private:
|
||||
// The default icon to use
|
||||
|
||||
@@ -31,8 +31,8 @@ public:
|
||||
void setSelection(const vector<CardP>& cards);
|
||||
|
||||
protected:
|
||||
virtual int OnGetItemImage(long pos) const;
|
||||
virtual void onChangeSet();
|
||||
int OnGetItemImage(long pos) const override;
|
||||
void onChangeSet() override;
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
|
||||
@@ -48,18 +48,18 @@ public:
|
||||
TextStyle& getStyle();
|
||||
|
||||
/// Uses a native look
|
||||
virtual bool nativeLook() const { return true; }
|
||||
virtual Rotation getRotation() const;
|
||||
bool nativeLook() const override { return true; }
|
||||
Rotation getRotation() const override;
|
||||
|
||||
virtual void draw(DC& dc);
|
||||
void draw(DC& dc) override;
|
||||
|
||||
virtual bool AcceptsFocus() const;
|
||||
bool AcceptsFocus() const override;
|
||||
|
||||
virtual void onChangeSet();
|
||||
void onChangeSet() override;
|
||||
|
||||
protected:
|
||||
virtual void onInit();
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
void onInit() override;
|
||||
wxSize DoGetBestSize() const override;
|
||||
|
||||
private:
|
||||
bool multi_line; ///< Multi line text control?
|
||||
|
||||
@@ -131,7 +131,7 @@ TreeList::TreeList(Window* parent, int id, long style)
|
||||
wxClientDC dc(this);
|
||||
dc.SetFont(*wxNORMAL_FONT);
|
||||
int h;
|
||||
dc.GetTextExtent(_("X"), 0, &h);
|
||||
dc.GetTextExtent(_("X"), nullptr, &h);
|
||||
item_height = h + 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
private:
|
||||
DropDownList& list;
|
||||
|
||||
virtual bool ProcessEvent(wxEvent& ev) {
|
||||
bool ProcessEvent(wxEvent& ev) override {
|
||||
int t = ev.GetEventType();
|
||||
if ( t == wxEVT_LEFT_DOWN || t == wxEVT_RIGHT_DOWN
|
||||
|| t == wxEVT_MOVE || t == wxEVT_SIZE
|
||||
@@ -98,7 +98,7 @@ void DropDownList::show(bool in_place, wxPoint pos, RealRect* rect) {
|
||||
dc.SetFont(*wxNORMAL_FONT);
|
||||
for (size_t i = 0 ; i < count ; ++i) {
|
||||
int text_width;
|
||||
dc.GetTextExtent(capitalize(itemText(i)), &text_width, 0);
|
||||
dc.GetTextExtent(capitalize(itemText(i)), &text_width, nullptr);
|
||||
item_size.width = max(item_size.width, text_width + icon_size.width + 14); // 14 = room for popup arrow + padding
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,13 +127,13 @@ private:
|
||||
const AlphaMask& mask;
|
||||
|
||||
bool mouse_down;
|
||||
int mouseX, mouseY; ///< starting mouse position
|
||||
int mouseX, mouseY; ///< starting mouse position
|
||||
wxRect start_selection; ///< selection in slice at start of dragging
|
||||
|
||||
// --------------------------------------------------- : Events
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
wxSize DoGetBestSize() const;
|
||||
wxSize DoGetBestSize() const override;
|
||||
|
||||
void onLeftDown(wxMouseEvent&);
|
||||
void onLeftUp (wxMouseEvent&);
|
||||
|
||||
@@ -128,23 +128,23 @@ public:
|
||||
buffer_size = m_parent_i_stream->LastRead();
|
||||
}
|
||||
|
||||
bool IsSeekable() const { return true; }
|
||||
bool IsSeekable() const override { return true; }
|
||||
protected:
|
||||
virtual size_t OnSysRead(void *buffer, size_t bufsize) {
|
||||
size_t OnSysRead(void *buffer, size_t bufsize) override {
|
||||
size_t len = min(buffer_size - buffer_pos, bufsize);
|
||||
memcpy(buffer, this->buffer + buffer_pos, len);
|
||||
buffer_pos += len;
|
||||
m_parent_i_stream->Read((Byte*)buffer + len, bufsize - len);
|
||||
return m_parent_i_stream->LastRead() + len;
|
||||
}
|
||||
virtual wxFileOffset OnSysSeek(wxFileOffset seek, wxSeekMode mode) {
|
||||
wxFileOffset OnSysSeek(wxFileOffset seek, wxSeekMode mode) override {
|
||||
if (mode == wxFromStart) buffer_pos = seek;
|
||||
else if (mode == wxFromCurrent) buffer_pos += seek;
|
||||
else assert(false);
|
||||
assert(buffer_pos < buffer_size);
|
||||
return buffer_pos;
|
||||
}
|
||||
virtual wxFileOffset OnSysTell() const {
|
||||
wxFileOffset OnSysTell() const override {
|
||||
assert(buffer_pos < buffer_size);
|
||||
return buffer_pos;
|
||||
}
|
||||
@@ -164,7 +164,7 @@ public:
|
||||
, list(list), ti(ti)
|
||||
{}
|
||||
|
||||
virtual Image generate() {
|
||||
Image generate() override {
|
||||
wxURL url(ti->package->description->icon_url);
|
||||
unique_ptr<wxInputStream> isP(url.GetInputStream());
|
||||
if (!isP) return wxImage();
|
||||
@@ -172,7 +172,7 @@ public:
|
||||
Image result(is2);
|
||||
return result;
|
||||
}
|
||||
virtual void store(const Image& image) {
|
||||
void store(const Image& image) override {
|
||||
if (!image.Ok()) return;
|
||||
ti->setIcon(image);
|
||||
list->Refresh(false);
|
||||
|
||||
@@ -30,12 +30,12 @@ public:
|
||||
|
||||
protected:
|
||||
// overridden methods from TreeList
|
||||
virtual void initItems();
|
||||
virtual void drawItem(DC& dc, size_t index, size_t column, int x, int y, bool selected) const;
|
||||
void initItems() override;
|
||||
void drawItem(DC& dc, size_t index, size_t column, int x, int y, bool selected) const override;
|
||||
|
||||
virtual size_t columnCount() const { return 3; }
|
||||
virtual String columnText(size_t column) const;
|
||||
virtual int columnWidth(size_t column) const;
|
||||
size_t columnCount() const override { return 3; }
|
||||
String columnText(size_t column) const override;
|
||||
int columnWidth(size_t column) const override;
|
||||
|
||||
private:
|
||||
/// The list of packages we are displaying
|
||||
|
||||
@@ -57,7 +57,7 @@ private:
|
||||
wxMutex lock;
|
||||
|
||||
struct Thread : public wxThread {
|
||||
virtual ExitCode Entry();
|
||||
ExitCode Entry() override;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -104,7 +104,7 @@ public:
|
||||
|
||||
void setPackage(const InstallablePackageP& package);
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
wxSize DoGetBestSize() const override;
|
||||
private:
|
||||
InstallablePackageP package;
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ public:
|
||||
class GlobalPreferencesPage : public PreferencesPage {
|
||||
public:
|
||||
GlobalPreferencesPage(Window* parent);
|
||||
void store();
|
||||
void store() override;
|
||||
|
||||
private:
|
||||
wxComboBox* language;
|
||||
@@ -47,7 +47,7 @@ private:
|
||||
class DisplayPreferencesPage : public PreferencesPage {
|
||||
public:
|
||||
DisplayPreferencesPage(Window* parent);
|
||||
void store();
|
||||
void store() override;
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
@@ -74,7 +74,7 @@ private:
|
||||
class DirsPreferencesPage : public PreferencesPage {
|
||||
public:
|
||||
DirsPreferencesPage(Window* parent);
|
||||
void store();
|
||||
void store() override;
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
@@ -88,7 +88,7 @@ private:
|
||||
class UpdatePreferencesPage : public PreferencesPage {
|
||||
public:
|
||||
UpdatePreferencesPage(Window* parent);
|
||||
void store();
|
||||
void store() override;
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
@@ -55,13 +55,13 @@ class CardsPrintout : public wxPrintout {
|
||||
public:
|
||||
CardsPrintout(PrintJobP const& job);
|
||||
/// Number of pages, and something else I don't understand...
|
||||
virtual void GetPageInfo(int* pageMin, int* pageMax, int* pageFrom, int* pageTo);
|
||||
void GetPageInfo(int* pageMin, int* pageMax, int* pageFrom, int* pageTo) override;
|
||||
/// Again, 'number of pages', strange wx interface
|
||||
virtual bool HasPage(int page);
|
||||
bool HasPage(int page) override;
|
||||
/// Determine the layout
|
||||
virtual void OnPreparePrinting();
|
||||
void OnPreparePrinting() override;
|
||||
/// Print a page
|
||||
virtual bool OnPrintPage(int page);
|
||||
bool OnPrintPage(int page) override;
|
||||
|
||||
private:
|
||||
PrintJobP job; ///< Cards to print
|
||||
@@ -175,7 +175,7 @@ PrintJobP make_print_job(Window* parent, const SetP& set, const ExportCardSelect
|
||||
s2->Add(s3, 1, wxEXPAND | wxALL, 8);
|
||||
wxSizer* s4 = new wxStaticBoxSizer(wxVERTICAL, &wnd, L"Settings");
|
||||
s4->Add(space, 1, wxALL | wxALIGN_TOP, 8);
|
||||
s2->Add(s4, 1, wxEXPAND | wxALL & ~wxLEFT, 8);
|
||||
s2->Add(s4, 1, wxEXPAND | (wxALL & ~wxLEFT), 8);
|
||||
s->Add(s2, 1, wxEXPAND);
|
||||
s->Add(wnd.CreateButtonSizer(wxOK | wxCANCEL) , 0, wxEXPAND | wxALL, 8);
|
||||
s->SetSizeHints(&wnd);
|
||||
|
||||
@@ -284,13 +284,9 @@ void CardsPanel::onMenuOpen(wxMenuEvent& ev) {
|
||||
wxMenu* menu = editor->getMenu(ID_INSERT_SYMBOL);
|
||||
if (insertSymbolMenu->GetSubMenu() != menu || (menu && menu->GetParent() != menuFormat)) {
|
||||
// re-add the menu
|
||||
fprintf(stderr,"insert1 %p %p\n", menuFormat,insertSymbolMenu);fflush(stderr);
|
||||
menuFormat->Remove(ID_INSERT_SYMBOL);
|
||||
fprintf(stderr,"insert2\n");fflush(stderr);
|
||||
insertSymbolMenu->SetSubMenu(menu);
|
||||
fprintf(stderr,"insert3\n");fflush(stderr);
|
||||
menuFormat->Append(insertSymbolMenu);
|
||||
fprintf(stderr,"insert4\n");fflush(stderr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -418,7 +414,7 @@ void CardsPanel::doSelectAll() {
|
||||
class CardsPanel::SearchFindInfo : public FindInfo {
|
||||
public:
|
||||
SearchFindInfo(CardsPanel& panel, wxFindReplaceData& what) : FindInfo(what), panel(panel) {}
|
||||
virtual bool handle(const CardP& card, const TextValueP& value, size_t pos, bool was_selection) {
|
||||
bool handle(const CardP& card, const TextValueP& value, size_t pos, bool was_selection) override {
|
||||
// Select the card
|
||||
panel.card_list->setCard(card);
|
||||
return true;
|
||||
@@ -430,7 +426,7 @@ private:
|
||||
class CardsPanel::ReplaceFindInfo : public FindInfo {
|
||||
public:
|
||||
ReplaceFindInfo(CardsPanel& panel, wxFindReplaceData& what) : FindInfo(what), panel(panel) {}
|
||||
virtual bool handle(const CardP& card, const TextValueP& value, size_t pos, bool was_selection) {
|
||||
bool handle(const CardP& card, const TextValueP& value, size_t pos, bool was_selection) override {
|
||||
// Select the card
|
||||
panel.card_list->setCard(card);
|
||||
// Replace
|
||||
@@ -441,7 +437,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
virtual bool searchSelection() const { return true; }
|
||||
bool searchSelection() const override { return true; }
|
||||
private:
|
||||
CardsPanel& panel;
|
||||
};
|
||||
|
||||
+22
-22
@@ -27,27 +27,27 @@ public:
|
||||
CardsPanel(Window* parent, int id);
|
||||
~CardsPanel();
|
||||
|
||||
virtual void onChangeSet();
|
||||
void onChangeSet() override;
|
||||
|
||||
// --------------------------------------------------- : UI
|
||||
|
||||
virtual void initUI (wxToolBar* tb, wxMenuBar* mb);
|
||||
virtual void destroyUI(wxToolBar* tb, wxMenuBar* mb);
|
||||
virtual void onUpdateUI(wxUpdateUIEvent&);
|
||||
virtual void onCommand(int id);
|
||||
virtual void onMenuOpen(wxMenuEvent&);
|
||||
void initUI (wxToolBar* tb, wxMenuBar* mb) override;
|
||||
void destroyUI(wxToolBar* tb, wxMenuBar* mb) override;
|
||||
void onUpdateUI(wxUpdateUIEvent&) override;
|
||||
void onCommand(int id) override;
|
||||
void onMenuOpen(wxMenuEvent&) override;
|
||||
|
||||
// --------------------------------------------------- : Actions
|
||||
|
||||
virtual bool wantsToHandle(const Action&, bool undone) const;
|
||||
bool wantsToHandle(const Action&, bool undone) const override;
|
||||
|
||||
// --------------------------------------------------- : Clipboard
|
||||
virtual bool canCut() const;
|
||||
virtual bool canCopy() const;
|
||||
virtual bool canPaste() const;
|
||||
virtual void doCut();
|
||||
virtual void doCopy();
|
||||
virtual void doPaste();
|
||||
bool canCut() const override;
|
||||
bool canCopy() const override;
|
||||
bool canPaste() const override;
|
||||
void doCut() override;
|
||||
void doCopy() override;
|
||||
void doPaste() override;
|
||||
|
||||
// --------------------------------------------------- : Text selection
|
||||
|
||||
@@ -56,11 +56,11 @@ public:
|
||||
|
||||
// --------------------------------------------------- : Searching (find/replace)
|
||||
|
||||
virtual bool canFind() const { return true; }
|
||||
virtual bool canReplace() const { return true; }
|
||||
virtual bool doFind (wxFindReplaceData&);
|
||||
virtual bool doReplace (wxFindReplaceData&);
|
||||
virtual bool doReplaceAll(wxFindReplaceData&);
|
||||
bool canFind() const override { return true; }
|
||||
bool canReplace() const override { return true; }
|
||||
bool doFind (wxFindReplaceData&) override;
|
||||
bool doReplace (wxFindReplaceData&) override;
|
||||
bool doReplaceAll(wxFindReplaceData&) override;
|
||||
private:
|
||||
/// Do a search or replace action for the given FindInfo in all cards
|
||||
bool search(FindInfo& find, bool from_start);
|
||||
@@ -71,9 +71,9 @@ private:
|
||||
public:
|
||||
|
||||
// --------------------------------------------------- : Selection
|
||||
virtual CardP selectedCard() const;
|
||||
virtual void selectCard(const CardP& card);
|
||||
virtual void selectFirstCard();
|
||||
CardP selectedCard() const override;
|
||||
void selectCard(const CardP& card) override;
|
||||
void selectFirstCard() override;
|
||||
|
||||
private:
|
||||
// --------------------------------------------------- : Controls
|
||||
@@ -92,7 +92,7 @@ private:
|
||||
void updateNotesPosition();
|
||||
// before Layout, call updateNotesPosition.
|
||||
// NOTE: docs say this function returns void, but the code says bool
|
||||
virtual bool Layout();
|
||||
bool Layout() override;
|
||||
|
||||
// --------------------------------------------------- : Menus & tools
|
||||
wxMenu* menuCard, *menuFormat;
|
||||
|
||||
@@ -25,16 +25,16 @@ public:
|
||||
|
||||
void onIdle(wxIdleEvent&);
|
||||
void onEnter(wxCommandEvent&);
|
||||
virtual void initUI (wxToolBar* tb, wxMenuBar* mb);
|
||||
virtual void destroyUI(wxToolBar* tb, wxMenuBar* mb);
|
||||
virtual void onUpdateUI(wxUpdateUIEvent&);
|
||||
virtual void onCommand(int id);
|
||||
void initUI (wxToolBar* tb, wxMenuBar* mb) override;
|
||||
void destroyUI(wxToolBar* tb, wxMenuBar* mb) override;
|
||||
void onUpdateUI(wxUpdateUIEvent&) override;
|
||||
void onCommand(int id) override;
|
||||
|
||||
// --------------------------------------------------- : Clipboard
|
||||
|
||||
virtual bool canCut() const;
|
||||
virtual bool canCopy() const;
|
||||
virtual void doCopy();
|
||||
bool canCut() const override;
|
||||
bool canCopy() const override;
|
||||
void doCopy() override;
|
||||
|
||||
protected:
|
||||
void onChangeSet() override;
|
||||
|
||||
@@ -26,26 +26,26 @@ public:
|
||||
KeywordsPanel(Window* parent, int id);
|
||||
~KeywordsPanel();
|
||||
|
||||
virtual void onChangeSet();
|
||||
virtual void onAction(const Action&, bool);
|
||||
void onChangeSet() override;
|
||||
void onAction(const Action&, bool) override;
|
||||
|
||||
// --------------------------------------------------- : UI
|
||||
|
||||
virtual void initUI (wxToolBar* tb, wxMenuBar* mb);
|
||||
virtual void destroyUI(wxToolBar* tb, wxMenuBar* mb);
|
||||
virtual void onUpdateUI(wxUpdateUIEvent&);
|
||||
virtual void onCommand(int id);
|
||||
void initUI (wxToolBar* tb, wxMenuBar* mb) override;
|
||||
void destroyUI(wxToolBar* tb, wxMenuBar* mb) override;
|
||||
void onUpdateUI(wxUpdateUIEvent&) override;
|
||||
void onCommand(int id) override;
|
||||
|
||||
// --------------------------------------------------- : Clipboard
|
||||
virtual bool canCut() const;
|
||||
virtual bool canCopy() const;
|
||||
virtual bool canPaste() const;
|
||||
virtual void doCut();
|
||||
virtual void doCopy();
|
||||
virtual void doPaste();
|
||||
bool canCut() const override;
|
||||
bool canCopy() const override;
|
||||
bool canPaste() const override;
|
||||
void doCut() override;
|
||||
void doCopy() override;
|
||||
void doPaste() override;
|
||||
|
||||
virtual bool canSelectAll() const;
|
||||
virtual void doSelectAll();
|
||||
bool canSelectAll() const override;
|
||||
void doSelectAll() override;
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
/// Should return true if this panel wants to get focus to show an action
|
||||
virtual bool wantsToHandle(const Action&, bool undone) const { return false; }
|
||||
/// Handle an action that changes the current set
|
||||
virtual void onAction(const Action&, bool undone) {}
|
||||
virtual void onAction(const Action&, bool undone) override {}
|
||||
|
||||
// --------------------------------------------------- : Clipboard
|
||||
virtual bool canPaste() const { return false; } ///< Is pasting possible?
|
||||
|
||||
@@ -36,8 +36,8 @@ public:
|
||||
vector<CardP> cards;
|
||||
|
||||
protected:
|
||||
virtual void getItems(vector<VoidP>& out) const;
|
||||
virtual void onChangeSet();
|
||||
void getItems(vector<VoidP>& out) const override;
|
||||
void onChangeSet() override;
|
||||
};
|
||||
|
||||
RandomCardList::RandomCardList(Window* parent, int id, long style)
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
PackTotalsPanel(Window* parent, int id, PackGenerator& generator, bool show_all = false)
|
||||
: wxPanel(parent,id), generator(generator), show_all(show_all) {}
|
||||
void setGame(const GameP& game);
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
virtual wxSize DoGetBestSize() const override;
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
GameP game;
|
||||
@@ -157,7 +157,7 @@ public:
|
||||
, interactive(interactive)
|
||||
, buddy(nullptr)
|
||||
{}
|
||||
void draw(DC& dc) {
|
||||
void draw(DC& dc) override {
|
||||
Color bg = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
|
||||
Color fg = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT);
|
||||
// clear background
|
||||
@@ -176,7 +176,7 @@ public:
|
||||
dc.GetTextExtent(label,&w,&h);
|
||||
dc.DrawText(interactive && hover ? label + _("...") : label, 2, (s.y-h)/2);
|
||||
}
|
||||
wxSize DoGetBestSize() const {
|
||||
wxSize DoGetBestSize() const override {
|
||||
int w,h;
|
||||
wxClientDC dc(const_cast<SelectableLabel*>(this));
|
||||
dc.SetFont(*wxNORMAL_FONT);
|
||||
@@ -186,7 +186,7 @@ public:
|
||||
void setBuddy(wxWindow* buddy) {
|
||||
this->buddy = buddy;
|
||||
}
|
||||
virtual void onClick() {
|
||||
void onClick() override {
|
||||
if (buddy) buddy->SetFocus();
|
||||
}
|
||||
void onDoubleClick(wxMouseEvent&) {
|
||||
|
||||
@@ -43,24 +43,24 @@ public:
|
||||
|
||||
// --------------------------------------------------- : UI
|
||||
|
||||
virtual void onBeforeChangeSet();
|
||||
virtual void onChangeSet();
|
||||
virtual void onAction(const Action&, bool undone);
|
||||
void onBeforeChangeSet() override;
|
||||
void onChangeSet() override;
|
||||
void onAction(const Action&, bool undone) override;
|
||||
|
||||
virtual void initUI (wxToolBar* tb, wxMenuBar* mb);
|
||||
virtual void destroyUI(wxToolBar* tb, wxMenuBar* mb);
|
||||
virtual void onUpdateUI(wxUpdateUIEvent&);
|
||||
virtual void onCommand(int id);
|
||||
void initUI (wxToolBar* tb, wxMenuBar* mb) override;
|
||||
void destroyUI(wxToolBar* tb, wxMenuBar* mb) override;
|
||||
void onUpdateUI(wxUpdateUIEvent&) override;
|
||||
void onCommand(int id) override;
|
||||
|
||||
// --------------------------------------------------- : Selection
|
||||
virtual CardP selectedCard() const;
|
||||
virtual void selectCard(const CardP& card);
|
||||
virtual void selectionChoices(ExportCardSelectionChoices& out);
|
||||
CardP selectedCard() const override;
|
||||
void selectCard(const CardP& card) override;
|
||||
void selectionChoices(ExportCardSelectionChoices& out) override;
|
||||
|
||||
// --------------------------------------------------- : Clipboard
|
||||
|
||||
virtual bool canCopy() const;
|
||||
virtual void doCopy();
|
||||
bool canCopy() const override;
|
||||
void doCopy() override;
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
@@ -21,24 +21,24 @@ public:
|
||||
|
||||
// --------------------------------------------------- : UI
|
||||
|
||||
virtual void initUI (wxToolBar* tb, wxMenuBar* mb);
|
||||
virtual void destroyUI(wxToolBar* tb, wxMenuBar* mb);
|
||||
virtual void onUpdateUI(wxUpdateUIEvent&);
|
||||
virtual void onCommand(int id);
|
||||
void initUI (wxToolBar* tb, wxMenuBar* mb) override;
|
||||
void destroyUI(wxToolBar* tb, wxMenuBar* mb) override;
|
||||
void onUpdateUI(wxUpdateUIEvent&) override;
|
||||
void onCommand(int id) override;
|
||||
|
||||
// --------------------------------------------------- : Clipboard
|
||||
|
||||
virtual bool canCut() const;
|
||||
virtual bool canCopy() const;
|
||||
virtual bool canPaste() const;
|
||||
virtual bool canSelectAll() const;
|
||||
virtual void doCut();
|
||||
virtual void doCopy();
|
||||
virtual void doPaste();
|
||||
virtual void doSelectAll();
|
||||
bool canCut() const override;
|
||||
bool canCopy() const override;
|
||||
bool canPaste() const override;
|
||||
bool canSelectAll() const override;
|
||||
void doCut() override;
|
||||
void doCopy() override;
|
||||
void doPaste() override;
|
||||
void doSelectAll() override;
|
||||
|
||||
protected:
|
||||
virtual void onChangeSet();
|
||||
void onChangeSet() override;
|
||||
|
||||
private:
|
||||
SetInfoEditor* editor;
|
||||
|
||||
@@ -146,14 +146,14 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual size_t itemCount() const;
|
||||
virtual void drawItem(DC& dc, int x, int y, size_t item);
|
||||
size_t itemCount() const override;
|
||||
void drawItem(DC& dc, int x, int y, size_t item) override;
|
||||
|
||||
virtual double subcolumnActivity(size_t col) const {
|
||||
double subcolumnActivity(size_t col) const override {
|
||||
return col-1 >= prefered_dimension_count ? 0.2 : 0.7;
|
||||
}
|
||||
|
||||
virtual void onSelect(size_t item, size_t old_col, bool& changes) {
|
||||
void onSelect(size_t item, size_t old_col, bool& changes) override {
|
||||
// swap selection with another subcolumn?
|
||||
for (size_t j = 1 ; j < subcolumns.size() ; ++j) {
|
||||
if (j != active_subcolumn && subcolumns[j].selection == item &&
|
||||
@@ -527,7 +527,7 @@ public:
|
||||
StatsFilter(GraphData& data, const vector<int> match) {
|
||||
data.indices(match, indices);
|
||||
}
|
||||
virtual void getItems(const vector<CardP>& cards, vector<VoidP>& out) const {
|
||||
void getItems(const vector<CardP>& cards, vector<VoidP>& out) const override {
|
||||
FOR_EACH_CONST(idx, indices) {
|
||||
out.push_back(cards.at(idx));
|
||||
}
|
||||
|
||||
@@ -31,17 +31,17 @@ public:
|
||||
|
||||
// --------------------------------------------------- : UI
|
||||
|
||||
virtual void onChangeSet();
|
||||
virtual void onAction(const Action&, bool undone);
|
||||
void onChangeSet() override;
|
||||
void onAction(const Action&, bool undone) override;
|
||||
|
||||
virtual void initUI (wxToolBar*, wxMenuBar*);
|
||||
virtual void destroyUI(wxToolBar*, wxMenuBar*);
|
||||
virtual void onUpdateUI(wxUpdateUIEvent&);
|
||||
virtual void onCommand(int id);
|
||||
void initUI (wxToolBar*, wxMenuBar*) override;
|
||||
void destroyUI(wxToolBar*, wxMenuBar*) override;
|
||||
void onUpdateUI(wxUpdateUIEvent&) override;
|
||||
void onCommand(int id) override;
|
||||
|
||||
// --------------------------------------------------- : Selection
|
||||
virtual CardP selectedCard() const;
|
||||
virtual void selectCard(const CardP& card);
|
||||
CardP selectedCard() const override;
|
||||
void selectCard(const CardP& card) override;
|
||||
|
||||
// --------------------------------------------------- : Data
|
||||
private:
|
||||
|
||||
+13
-13
@@ -22,25 +22,25 @@ class StylePanel : public SetWindowPanel {
|
||||
public:
|
||||
StylePanel(Window* parent, int id);
|
||||
|
||||
virtual void onChangeSet();
|
||||
virtual void onAction(const Action&, bool undone);
|
||||
void onChangeSet() override;
|
||||
void onAction(const Action&, bool undone) override;
|
||||
|
||||
// --------------------------------------------------- : UI
|
||||
|
||||
virtual void initUI(wxToolBar*, wxMenuBar*);
|
||||
void initUI(wxToolBar*, wxMenuBar*) override;
|
||||
|
||||
// --------------------------------------------------- : Clipboard
|
||||
virtual bool canCut() const;
|
||||
virtual bool canCopy() const;
|
||||
virtual bool canPaste() const;
|
||||
virtual bool canSelectAll() const;
|
||||
virtual void doCut();
|
||||
virtual void doCopy();
|
||||
virtual void doPaste();
|
||||
virtual void doSelectAll();
|
||||
bool canCut() const override;
|
||||
bool canCopy() const override;
|
||||
bool canPaste() const override;
|
||||
bool canSelectAll() const override;
|
||||
void doCut() override;
|
||||
void doCopy() override;
|
||||
void doPaste() override;
|
||||
void doSelectAll() override;
|
||||
|
||||
// --------------------------------------------------- : Selection
|
||||
virtual void selectCard(const CardP& card);
|
||||
void selectCard(const CardP& card) override;
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
@@ -58,7 +58,7 @@ private:
|
||||
|
||||
/// Determine the best size for the list of stylesheets based on available space
|
||||
void updateListSize();
|
||||
virtual bool Layout();
|
||||
bool Layout() override;
|
||||
|
||||
/// Actual intialization of the controls
|
||||
void initControls();
|
||||
|
||||
@@ -460,7 +460,7 @@ bool SetWindow::askSaveAndContinue() {
|
||||
set->actions.setSavePoint();
|
||||
return true;
|
||||
}
|
||||
} catch (Error e) {
|
||||
} catch (Error const& e) {
|
||||
// something went wrong with saving, don't proceed
|
||||
handle_error(e);
|
||||
return false;
|
||||
|
||||
@@ -74,9 +74,9 @@ private:
|
||||
// --------------------------------------------------- : Action related
|
||||
protected:
|
||||
/// We want to respond to set changes
|
||||
virtual void onChangeSet();
|
||||
void onChangeSet() override;
|
||||
/// Actions that change the set
|
||||
virtual void onAction(const Action&, bool undone);
|
||||
void onAction(const Action&, bool undone) override;
|
||||
|
||||
public:
|
||||
// minSize = mainSizer->getMinWindowSize(this)
|
||||
|
||||
@@ -16,33 +16,33 @@ class wxSpinCtrl;
|
||||
// ----------------------------------------------------------------------------- : SymbolBasicShapeEditor
|
||||
|
||||
/// Editor for drawing basic shapes such as rectangles and polygons
|
||||
class SymbolBasicShapeEditor : public SymbolEditorBase {
|
||||
class SymbolBasicShapeEditor final : public SymbolEditorBase {
|
||||
public:
|
||||
SymbolBasicShapeEditor(SymbolControl* control);
|
||||
|
||||
// --------------------------------------------------- : Drawing
|
||||
|
||||
virtual void draw(DC& dc);
|
||||
void draw(DC& dc) override;
|
||||
|
||||
// --------------------------------------------------- : UI
|
||||
|
||||
virtual void initUI (wxToolBar* tb, wxMenuBar* mb);
|
||||
virtual void destroyUI(wxToolBar* tb, wxMenuBar* mb);
|
||||
virtual void onUpdateUI(wxUpdateUIEvent&);
|
||||
virtual void onCommand(int id);
|
||||
virtual int modeToolId();
|
||||
void initUI (wxToolBar* tb, wxMenuBar* mb) override;
|
||||
void destroyUI(wxToolBar* tb, wxMenuBar* mb) override;
|
||||
void onUpdateUI(wxUpdateUIEvent&) override;
|
||||
void onCommand(int id) override;
|
||||
int modeToolId() override;
|
||||
|
||||
// --------------------------------------------------- : Mouse events
|
||||
|
||||
virtual void onLeftDown (const Vector2D& pos, wxMouseEvent& ev);
|
||||
virtual void onLeftUp (const Vector2D& pos, wxMouseEvent& ev);
|
||||
virtual void onMouseDrag (const Vector2D& from, const Vector2D& to, wxMouseEvent& ev);
|
||||
void onLeftDown (const Vector2D& pos, wxMouseEvent& ev) override;
|
||||
void onLeftUp (const Vector2D& pos, wxMouseEvent& ev) override;
|
||||
void onMouseDrag (const Vector2D& from, const Vector2D& to, wxMouseEvent& ev) override;
|
||||
|
||||
// --------------------------------------------------- : Other events
|
||||
|
||||
virtual void onKeyChange(wxKeyEvent& ev);
|
||||
void onKeyChange(wxKeyEvent& ev) override;
|
||||
|
||||
virtual bool isEditing();
|
||||
bool isEditing() override;
|
||||
|
||||
// --------------------------------------------------- : Data
|
||||
private:
|
||||
|
||||
@@ -26,9 +26,9 @@ class SymbolControl : public wxControl, public SymbolViewer {
|
||||
public:
|
||||
SymbolControl(SymbolWindow* parent, int id, const SymbolP& symbol);
|
||||
|
||||
virtual void onChangeSymbol();
|
||||
void onChangeSymbol() override;
|
||||
|
||||
virtual void onAction(const Action&, bool undone);
|
||||
void onAction(const Action&, bool undone) override;
|
||||
|
||||
// Forward command to editor
|
||||
void onExtraTool(wxCommandEvent& ev);
|
||||
|
||||
@@ -31,9 +31,9 @@ public:
|
||||
SymbolPartList(Window* parent, int id, SymbolPartsSelection& selection, SymbolP symbol = SymbolP());
|
||||
|
||||
/// Another symbol is being viewed
|
||||
virtual void onChangeSymbol();
|
||||
void onChangeSymbol() override;
|
||||
/// Event handler for changes to the symbol
|
||||
virtual void onAction(const Action&, bool);
|
||||
void onAction(const Action&, bool) override;
|
||||
|
||||
/// Update the control
|
||||
void update();
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
void updateParts(const set<SymbolPartP>& parts);
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
wxSize DoGetBestSize() const override;
|
||||
private:
|
||||
SymbolPartsSelection& selection; ///< Store selection here
|
||||
int number_of_items;
|
||||
@@ -75,7 +75,7 @@ private:
|
||||
void onChar(wxKeyEvent& ev);
|
||||
void onPaint(wxPaintEvent&);
|
||||
void onSize(wxSizeEvent&);
|
||||
void OnDraw(DC& dc);
|
||||
void OnDraw(DC& dc) override;
|
||||
|
||||
void sendEvent(int type);
|
||||
|
||||
|
||||
@@ -284,7 +284,7 @@ void SymbolPointEditor::onMouseDrag(const Vector2D& from, const Vector2D& to, wx
|
||||
Vector2D delta = to - from;
|
||||
if (selection == SELECTED_LINE && ev.AltDown()) {
|
||||
// Drag the curve
|
||||
if (controlPointMoveAction) controlPointMoveAction = 0;
|
||||
if (controlPointMoveAction) controlPointMoveAction = nullptr;
|
||||
if (!curveDragAction) {
|
||||
auto action = make_unique<CurveDragAction>(selected_line1, selected_line2);
|
||||
curveDragAction = action.get();
|
||||
|
||||
@@ -19,13 +19,13 @@ class CurveDragAction;
|
||||
|
||||
|
||||
// Symbol editor for editing control points and handles
|
||||
class SymbolPointEditor : public SymbolEditorBase {
|
||||
class SymbolPointEditor final : public SymbolEditorBase {
|
||||
public:
|
||||
SymbolPointEditor(SymbolControl* control, const SymbolShapeP& part);
|
||||
|
||||
// --------------------------------------------------- : Drawing
|
||||
|
||||
virtual void draw(DC& dc);
|
||||
void draw(DC& dc) override;
|
||||
|
||||
private:
|
||||
/// Draws a gradient on the selected line to indicate curve dragging
|
||||
@@ -56,25 +56,25 @@ private:
|
||||
public:
|
||||
// --------------------------------------------------- : UI
|
||||
|
||||
virtual void initUI (wxToolBar* tb, wxMenuBar* mb);
|
||||
virtual void destroyUI(wxToolBar* tb, wxMenuBar* mb);
|
||||
virtual void onUpdateUI(wxUpdateUIEvent&);
|
||||
virtual void onCommand(int id);
|
||||
virtual int modeToolId();
|
||||
void initUI (wxToolBar* tb, wxMenuBar* mb) override;
|
||||
void destroyUI(wxToolBar* tb, wxMenuBar* mb) override;
|
||||
void onUpdateUI(wxUpdateUIEvent&) override;
|
||||
void onCommand(int id) override;
|
||||
int modeToolId() override;
|
||||
|
||||
// --------------------------------------------------- : Mouse events
|
||||
|
||||
virtual void onLeftDown (const Vector2D& pos, wxMouseEvent& ev);
|
||||
virtual void onLeftUp (const Vector2D& pos, wxMouseEvent& ev);
|
||||
virtual void onLeftDClick(const Vector2D& pos, wxMouseEvent& ev);
|
||||
virtual void onMouseMove(const Vector2D& from, const Vector2D& to, wxMouseEvent& ev);
|
||||
virtual void onMouseDrag(const Vector2D& from, const Vector2D& to, wxMouseEvent& ev);
|
||||
void onLeftDown (const Vector2D& pos, wxMouseEvent& ev) override;
|
||||
void onLeftUp (const Vector2D& pos, wxMouseEvent& ev) override;
|
||||
void onLeftDClick(const Vector2D& pos, wxMouseEvent& ev) override;
|
||||
void onMouseMove(const Vector2D& from, const Vector2D& to, wxMouseEvent& ev) override;
|
||||
void onMouseDrag(const Vector2D& from, const Vector2D& to, wxMouseEvent& ev) override;
|
||||
|
||||
// --------------------------------------------------- : Other events
|
||||
|
||||
virtual void onKeyChange(wxKeyEvent& ev);
|
||||
virtual void onChar(wxKeyEvent& ev);
|
||||
virtual bool isEditing();
|
||||
void onKeyChange(wxKeyEvent& ev) override;
|
||||
void onChar(wxKeyEvent& ev) override;
|
||||
bool isEditing() override;
|
||||
|
||||
private:
|
||||
// --------------------------------------------------- : Data
|
||||
|
||||
@@ -19,13 +19,13 @@ DECLARE_POINTER_TYPE(SymbolPartShearAction);
|
||||
// ----------------------------------------------------------------------------- : SymbolSelectEditor
|
||||
|
||||
/// Editor that allows the user to select symbol parts
|
||||
class SymbolSelectEditor : public SymbolEditorBase {
|
||||
class SymbolSelectEditor final : public SymbolEditorBase {
|
||||
public:
|
||||
SymbolSelectEditor(SymbolControl* control, bool rotate);
|
||||
|
||||
// --------------------------------------------------- : Drawing
|
||||
|
||||
virtual void draw(DC& dc);
|
||||
void draw(DC& dc) override;
|
||||
|
||||
private:
|
||||
/// Draw handles on all sides
|
||||
@@ -39,26 +39,26 @@ private:
|
||||
public:
|
||||
// --------------------------------------------------- : UI
|
||||
|
||||
virtual void initUI (wxToolBar* tb, wxMenuBar* mb);
|
||||
virtual void destroyUI(wxToolBar* tb, wxMenuBar* mb);
|
||||
virtual void onUpdateUI(wxUpdateUIEvent&);
|
||||
virtual void onCommand(int id);
|
||||
virtual int modeToolId();
|
||||
void initUI (wxToolBar* tb, wxMenuBar* mb) override;
|
||||
void destroyUI(wxToolBar* tb, wxMenuBar* mb) override;
|
||||
void onUpdateUI(wxUpdateUIEvent&) override;
|
||||
void onCommand(int id) override;
|
||||
int modeToolId() override;
|
||||
|
||||
// --------------------------------------------------- : Mouse events
|
||||
|
||||
virtual void onLeftDown (const Vector2D& pos, wxMouseEvent& ev);
|
||||
virtual void onLeftDClick (const Vector2D& pos, wxMouseEvent& ev);
|
||||
virtual void onLeftUp (const Vector2D& pos, wxMouseEvent& ev);
|
||||
virtual void onMouseMove (const Vector2D& from, const Vector2D& to, wxMouseEvent& ev);
|
||||
virtual void onMouseDrag (const Vector2D& from, const Vector2D& to, wxMouseEvent& ev);
|
||||
void onLeftDown (const Vector2D& pos, wxMouseEvent& ev) override;
|
||||
void onLeftDClick (const Vector2D& pos, wxMouseEvent& ev) override;
|
||||
void onLeftUp (const Vector2D& pos, wxMouseEvent& ev) override;
|
||||
void onMouseMove (const Vector2D& from, const Vector2D& to, wxMouseEvent& ev) override;
|
||||
void onMouseDrag (const Vector2D& from, const Vector2D& to, wxMouseEvent& ev) override;
|
||||
|
||||
// --------------------------------------------------- : Other events
|
||||
|
||||
virtual void onKeyChange (wxKeyEvent& ev);
|
||||
virtual void onChar (wxKeyEvent& ev);
|
||||
void onKeyChange (wxKeyEvent& ev) override;
|
||||
void onChar (wxKeyEvent& ev) override;
|
||||
|
||||
virtual bool isEditing();
|
||||
bool isEditing() override;
|
||||
|
||||
private:
|
||||
// The part under the mouse cursor
|
||||
|
||||
@@ -17,35 +17,35 @@ class SymmetryMoveAction;
|
||||
// ----------------------------------------------------------------------------- : SymbolSymmetryEditor
|
||||
|
||||
/// Editor for adding symmetries
|
||||
class SymbolSymmetryEditor : public SymbolEditorBase {
|
||||
class SymbolSymmetryEditor final : public SymbolEditorBase {
|
||||
public:
|
||||
/** The symmetry parameter is optional, if it is not set, then only new ones can be created */
|
||||
SymbolSymmetryEditor(SymbolControl* control, const SymbolSymmetryP& symmetry);
|
||||
|
||||
// --------------------------------------------------- : Drawing
|
||||
|
||||
virtual void draw(DC& dc);
|
||||
void draw(DC& dc) override;
|
||||
|
||||
// --------------------------------------------------- : UI
|
||||
|
||||
virtual void initUI (wxToolBar* tb, wxMenuBar* mb);
|
||||
virtual void destroyUI(wxToolBar* tb, wxMenuBar* mb);
|
||||
virtual void onUpdateUI(wxUpdateUIEvent&);
|
||||
virtual void onCommand(int id);
|
||||
virtual int modeToolId();
|
||||
void initUI (wxToolBar* tb, wxMenuBar* mb) override;
|
||||
void destroyUI(wxToolBar* tb, wxMenuBar* mb) override;
|
||||
void onUpdateUI(wxUpdateUIEvent&) override;
|
||||
void onCommand(int id) override;
|
||||
int modeToolId() override;
|
||||
|
||||
// --------------------------------------------------- : Mouse events
|
||||
|
||||
virtual void onLeftDown (const Vector2D& pos, wxMouseEvent& ev);
|
||||
virtual void onLeftUp (const Vector2D& pos, wxMouseEvent& ev);
|
||||
virtual void onMouseMove (const Vector2D& from, const Vector2D& to, wxMouseEvent& ev);
|
||||
virtual void onMouseDrag (const Vector2D& from, const Vector2D& to, wxMouseEvent& ev);
|
||||
void onLeftDown (const Vector2D& pos, wxMouseEvent& ev) override;
|
||||
void onLeftUp (const Vector2D& pos, wxMouseEvent& ev) override;
|
||||
void onMouseMove (const Vector2D& from, const Vector2D& to, wxMouseEvent& ev) override;
|
||||
void onMouseDrag (const Vector2D& from, const Vector2D& to, wxMouseEvent& ev) override;
|
||||
|
||||
// --------------------------------------------------- : Other events
|
||||
|
||||
virtual void onKeyChange(wxKeyEvent& ev);
|
||||
void onKeyChange(wxKeyEvent& ev) override;
|
||||
|
||||
virtual bool isEditing();
|
||||
bool isEditing() override;
|
||||
|
||||
// --------------------------------------------------- : Data
|
||||
private:
|
||||
|
||||
@@ -42,7 +42,7 @@ class ThumbnailThreadWorker : public wxThread {
|
||||
public:
|
||||
ThumbnailThreadWorker(ThumbnailThread* parent);
|
||||
|
||||
virtual ExitCode Entry();
|
||||
ExitCode Entry() override;
|
||||
|
||||
ThumbnailRequestP current; ///< Request we are working on
|
||||
ThumbnailThread* parent;
|
||||
|
||||
@@ -91,7 +91,7 @@ bool update_available() {
|
||||
// If not, displays a message
|
||||
class CheckUpdateThread : public wxThread {
|
||||
public:
|
||||
virtual void* Entry() {
|
||||
void* Entry() override {
|
||||
Work();
|
||||
return 0;
|
||||
}
|
||||
@@ -170,7 +170,7 @@ struct HtmlWindowToBrowser : public wxHtmlWindow {
|
||||
: wxHtmlWindow(parent, id, pos, size, flags)
|
||||
{}
|
||||
|
||||
virtual void OnLinkClicked(const wxHtmlLinkInfo& info) {
|
||||
void OnLinkClicked(const wxHtmlLinkInfo& info) override {
|
||||
wxLaunchDefaultBrowser( info.GetHref() );
|
||||
}
|
||||
};
|
||||
|
||||
@@ -22,11 +22,11 @@ const double min_item_size = thumbnail_size;
|
||||
class ChoiceThumbnailRequest : public ThumbnailRequest {
|
||||
public:
|
||||
ChoiceThumbnailRequest(ValueViewer* cve, int id, bool from_disk, bool thread_safe);
|
||||
virtual Image generate();
|
||||
virtual void store(const Image&);
|
||||
Image generate() override;
|
||||
void store(const Image&) override;
|
||||
|
||||
bool isThreadSafe;
|
||||
virtual bool threadSafe() const {return isThreadSafe;}
|
||||
bool threadSafe() const override {return isThreadSafe;}
|
||||
private:
|
||||
int id;
|
||||
|
||||
|
||||
@@ -25,12 +25,12 @@ public:
|
||||
~ChoiceValueEditor();
|
||||
|
||||
// --------------------------------------------------- : Events
|
||||
virtual bool onLeftDown(const RealPoint& pos, wxMouseEvent& ev);
|
||||
virtual bool onChar(wxKeyEvent& ev);
|
||||
virtual void onLoseFocus();
|
||||
bool onLeftDown(const RealPoint& pos, wxMouseEvent& ev) override;
|
||||
bool onChar(wxKeyEvent& ev) override;
|
||||
void onLoseFocus() override;
|
||||
|
||||
virtual void draw(RotatedDC& dc);
|
||||
virtual void determineSize(bool);
|
||||
void draw(RotatedDC& dc) override;
|
||||
void determineSize(bool) override;
|
||||
|
||||
private:
|
||||
DropDownListP drop_down;
|
||||
@@ -93,9 +93,9 @@ public:
|
||||
DropDownChoiceList(Window* parent, bool is_submenu, ValueViewer& cve, ChoiceField::ChoiceP group);
|
||||
|
||||
protected:
|
||||
virtual void onShow();
|
||||
virtual void select(size_t item);
|
||||
virtual size_t selection() const;
|
||||
virtual DropDownList* createSubMenu(ChoiceField::ChoiceP group) const;
|
||||
void onShow() override;
|
||||
void select(size_t item) override;
|
||||
size_t selection() const override;
|
||||
DropDownList* createSubMenu(ChoiceField::ChoiceP group) const override;
|
||||
};
|
||||
|
||||
|
||||
@@ -20,14 +20,14 @@ class DropDownColorList : public DropDownList {
|
||||
public:
|
||||
DropDownColorList(Window* parent, ColorValueEditor& cve);
|
||||
|
||||
protected:
|
||||
virtual size_t itemCount() const;
|
||||
virtual bool lineBelow(size_t item) const;
|
||||
virtual String itemText(size_t item) const;
|
||||
virtual void drawIcon(DC& dc, int x, int y, size_t item, bool selected) const;
|
||||
protected:
|
||||
size_t itemCount() const override;
|
||||
bool lineBelow(size_t item) const override;
|
||||
String itemText(size_t item) const override;
|
||||
void drawIcon(DC& dc, int x, int y, size_t item, bool selected) const override;
|
||||
|
||||
virtual void select(size_t item);
|
||||
virtual size_t selection() const;
|
||||
void select(size_t item) override;
|
||||
size_t selection() const override;
|
||||
|
||||
private:
|
||||
ColorValueEditor& cve;
|
||||
|
||||
@@ -22,12 +22,12 @@ public:
|
||||
DECLARE_VALUE_EDITOR(Color);
|
||||
|
||||
// --------------------------------------------------- : Events
|
||||
virtual bool onLeftDown(const RealPoint& pos, wxMouseEvent& ev);
|
||||
virtual bool onChar(wxKeyEvent& ev);
|
||||
virtual void onLoseFocus();
|
||||
bool onLeftDown(const RealPoint& pos, wxMouseEvent& ev) override;
|
||||
bool onChar(wxKeyEvent& ev) override;
|
||||
void onLoseFocus() override;
|
||||
|
||||
virtual void draw(RotatedDC& dc);
|
||||
virtual void determineSize(bool);
|
||||
void draw(RotatedDC& dc) override;
|
||||
void determineSize(bool) override;
|
||||
|
||||
private:
|
||||
DropDownListP drop_down;
|
||||
|
||||
@@ -138,13 +138,13 @@ protected:
|
||||
|
||||
#define DECLARE_VALUE_EDITOR(Type) \
|
||||
Type##ValueEditor(DataEditor& parent, const Type##StyleP& style); \
|
||||
virtual ValueEditor* getEditor() { return this; } \
|
||||
private: \
|
||||
ValueEditor* getEditor() override { return this; } \
|
||||
private: \
|
||||
/** Retrieve the parent editor object */ \
|
||||
inline DataEditor& editor() const { \
|
||||
inline DataEditor& editor() const override { \
|
||||
return static_cast<DataEditor&>(viewer); \
|
||||
} \
|
||||
public:
|
||||
public:
|
||||
|
||||
#define IMPLEMENT_VALUE_EDITOR(Type) \
|
||||
ValueViewerP Type##Style::makeEditor(DataEditor& parent) { \
|
||||
|
||||
@@ -19,17 +19,17 @@ class ImageValueEditor : public ImageValueViewer, public ValueEditor {
|
||||
public:
|
||||
DECLARE_VALUE_EDITOR(Image);
|
||||
|
||||
virtual bool onLeftDClick(const RealPoint&, wxMouseEvent&);
|
||||
bool onLeftDClick(const RealPoint&, wxMouseEvent&) override;
|
||||
|
||||
// --------------------------------------------------- : Clipboard
|
||||
|
||||
virtual bool canCopy() const;
|
||||
virtual bool canPaste() const;
|
||||
virtual bool doCopy();
|
||||
virtual bool doPaste();
|
||||
virtual bool doDelete();
|
||||
bool canCopy() const override;
|
||||
bool canPaste() const override;
|
||||
bool doCopy() override;
|
||||
bool doPaste() override;
|
||||
bool doDelete() override;
|
||||
|
||||
virtual bool onChar(wxKeyEvent&);
|
||||
bool onChar(wxKeyEvent&) override;
|
||||
|
||||
private:
|
||||
// Open the image slice window showing the give image
|
||||
|
||||
@@ -19,7 +19,7 @@ class InfoValueEditor : public InfoValueViewer, public ValueEditor {
|
||||
public:
|
||||
DECLARE_VALUE_EDITOR(Info);
|
||||
|
||||
virtual void determineSize(bool);
|
||||
virtual bool drawLabel() const { return false; }
|
||||
void determineSize(bool) override;
|
||||
bool drawLabel() const override { return false; }
|
||||
};
|
||||
|
||||
|
||||
@@ -21,13 +21,13 @@ public:
|
||||
DECLARE_VALUE_EDITOR(MultipleChoice);
|
||||
~MultipleChoiceValueEditor();
|
||||
|
||||
virtual void onValueChange();
|
||||
void onValueChange() override;
|
||||
|
||||
virtual void determineSize(bool force_fit);
|
||||
void determineSize(bool force_fit) override;
|
||||
|
||||
virtual bool onLeftDown (const RealPoint& pos, wxMouseEvent& ev);
|
||||
virtual bool onChar(wxKeyEvent& ev);
|
||||
virtual void onLoseFocus();
|
||||
bool onLeftDown(const RealPoint& pos, wxMouseEvent& ev) override;
|
||||
bool onChar(wxKeyEvent& ev) override;
|
||||
void onLoseFocus() override;
|
||||
|
||||
private:
|
||||
DropDownListP drop_down;
|
||||
|
||||
@@ -20,12 +20,12 @@ public:
|
||||
DropDownPackageChoiceList(Window* parent, PackageChoiceValueEditor* editor);
|
||||
|
||||
protected:
|
||||
virtual size_t itemCount() const;
|
||||
virtual String itemText(size_t item) const;
|
||||
virtual bool lineBelow(size_t item) const;
|
||||
virtual void drawIcon(DC& dc, int x, int y, size_t item, bool selected) const;
|
||||
virtual void select(size_t selection);
|
||||
virtual size_t selection() const;
|
||||
size_t itemCount() const override;
|
||||
String itemText(size_t item) const override;
|
||||
bool lineBelow(size_t item) const override;
|
||||
void drawIcon(DC& dc, int x, int y, size_t item, bool selected) const override;
|
||||
void select(size_t selection) override;
|
||||
size_t selection() const override;
|
||||
|
||||
private:
|
||||
PackageChoiceValueEditor& editor;
|
||||
|
||||
@@ -21,11 +21,11 @@ class PackageChoiceValueEditor : public PackageChoiceValueViewer, public ValueEd
|
||||
public:
|
||||
DECLARE_VALUE_EDITOR(PackageChoice);
|
||||
|
||||
virtual void draw(RotatedDC& dc);
|
||||
virtual void determineSize(bool force_fit);
|
||||
virtual bool onLeftDown (const RealPoint& pos, wxMouseEvent& ev);
|
||||
virtual bool onChar(wxKeyEvent& ev);
|
||||
virtual void onLoseFocus();
|
||||
void draw(RotatedDC& dc) override;
|
||||
void determineSize(bool force_fit) override;
|
||||
bool onLeftDown(const RealPoint& pos, wxMouseEvent& ev) override;
|
||||
bool onChar(wxKeyEvent& ev) override;
|
||||
void onLoseFocus() override;
|
||||
|
||||
private:
|
||||
DropDownListP drop_down;
|
||||
|
||||
@@ -21,12 +21,12 @@ class SymbolValueEditor : public SymbolValueViewer, public ValueEditor {
|
||||
public:
|
||||
DECLARE_VALUE_EDITOR(Symbol);
|
||||
|
||||
virtual void draw(RotatedDC& dc);
|
||||
virtual bool onLeftDown (const RealPoint& pos, wxMouseEvent&);
|
||||
virtual bool onLeftUp (const RealPoint& pos, wxMouseEvent&);
|
||||
virtual bool onLeftDClick(const RealPoint& pos, wxMouseEvent&);
|
||||
virtual bool onMotion (const RealPoint& pos, wxMouseEvent&);
|
||||
virtual void determineSize(bool);
|
||||
void draw(RotatedDC& dc) override;
|
||||
bool onLeftDown (const RealPoint& pos, wxMouseEvent&) override;
|
||||
bool onLeftUp (const RealPoint& pos, wxMouseEvent&) override;
|
||||
bool onLeftDClick(const RealPoint& pos, wxMouseEvent&) override;
|
||||
bool onMotion (const RealPoint& pos, wxMouseEvent&) override;
|
||||
void determineSize(bool) override;
|
||||
private:
|
||||
/// Draw a button, buttons are numbered from the right
|
||||
void drawButton(RotatedDC& dc, int button, const String& text);
|
||||
|
||||
+10
-10
@@ -116,15 +116,15 @@ public:
|
||||
inline WordListPosP getPos() const { return pos; }
|
||||
|
||||
protected:
|
||||
virtual void redrawArrowOnParent();
|
||||
virtual size_t itemCount() const { return items.size(); }
|
||||
virtual bool lineBelow(size_t item) const { return items[item].flags & FLAG_LINE_BELOW; }
|
||||
virtual String itemText(size_t item) const { return items[item].name; }
|
||||
virtual void drawIcon(DC& dc, int x, int y, size_t item, bool selected) const;
|
||||
virtual DropDownList* submenu(size_t item) const;
|
||||
virtual size_t selection() const;
|
||||
virtual void select(size_t item);
|
||||
virtual bool stayOpen(size_t selection) const;
|
||||
void redrawArrowOnParent() override;
|
||||
size_t itemCount() const override { return items.size(); }
|
||||
bool lineBelow(size_t item) const override { return items[item].flags & FLAG_LINE_BELOW; }
|
||||
String itemText(size_t item) const override { return items[item].name; }
|
||||
void drawIcon(DC& dc, int x, int y, size_t item, bool selected) const override;
|
||||
DropDownList* submenu(size_t item) const override;
|
||||
size_t selection() const override;
|
||||
void select(size_t item) override;
|
||||
bool stayOpen(size_t selection) const override;
|
||||
private:
|
||||
TextValueEditor& tve;
|
||||
WordListPosP pos;
|
||||
@@ -887,7 +887,7 @@ void TextValueEditor::showCaret() {
|
||||
// TODO : high quality?
|
||||
dc.SetFont(style().font.toWxFont(1.0));
|
||||
int hi;
|
||||
dc.GetTextExtent(_(" "), 0, &hi);
|
||||
dc.GetTextExtent(_(" "), nullptr, &hi);
|
||||
#ifdef __WXGTK__
|
||||
// HACK: Some fonts don't get the descender height set correctly.
|
||||
int charHeight = dc.GetCharHeight();
|
||||
|
||||
+36
-36
@@ -34,67 +34,67 @@ public:
|
||||
|
||||
// --------------------------------------------------- : Events
|
||||
|
||||
virtual void onFocus();
|
||||
virtual void onLoseFocus();
|
||||
void onFocus() override;
|
||||
void onLoseFocus() override;
|
||||
|
||||
virtual bool onLeftDown (const RealPoint& pos, wxMouseEvent&);
|
||||
virtual bool onLeftUp (const RealPoint& pos, wxMouseEvent&);
|
||||
virtual bool onLeftDClick(const RealPoint& pos, wxMouseEvent&);
|
||||
virtual bool onRightDown (const RealPoint& pos, wxMouseEvent&);
|
||||
virtual bool onMotion (const RealPoint& pos, wxMouseEvent&);
|
||||
virtual void onMouseLeave(const RealPoint& pos, wxMouseEvent&);
|
||||
virtual bool onMouseWheel(const RealPoint& pos, wxMouseEvent&);
|
||||
bool onLeftDown (const RealPoint& pos, wxMouseEvent&) override;
|
||||
bool onLeftUp (const RealPoint& pos, wxMouseEvent&) override;
|
||||
bool onLeftDClick(const RealPoint& pos, wxMouseEvent&) override;
|
||||
bool onRightDown (const RealPoint& pos, wxMouseEvent&) override;
|
||||
bool onMotion (const RealPoint& pos, wxMouseEvent&) override;
|
||||
void onMouseLeave(const RealPoint& pos, wxMouseEvent&) override;
|
||||
bool onMouseWheel(const RealPoint& pos, wxMouseEvent&) override;
|
||||
|
||||
virtual bool onContextMenu(wxMenu& m, wxContextMenuEvent&);
|
||||
virtual wxMenu* getMenu(int type) const;
|
||||
virtual bool onCommand(int);
|
||||
bool onContextMenu(wxMenu& m, wxContextMenuEvent&) override;
|
||||
wxMenu* getMenu(int type) const override;
|
||||
bool onCommand(int) override;
|
||||
|
||||
virtual bool onChar(wxKeyEvent&);
|
||||
bool onChar(wxKeyEvent&) override;
|
||||
|
||||
// --------------------------------------------------- : Actions
|
||||
|
||||
virtual void onValueChange();
|
||||
virtual void onAction(const Action&, bool undone);
|
||||
void onValueChange() override;
|
||||
void onAction(const Action&, bool undone) override;
|
||||
|
||||
// --------------------------------------------------- : Clipboard
|
||||
|
||||
virtual bool canCopy() const;
|
||||
virtual bool canPaste() const;
|
||||
virtual bool doCopy();
|
||||
virtual bool doPaste();
|
||||
virtual bool doDelete();
|
||||
bool canCopy() const override;
|
||||
bool canPaste() const override;
|
||||
bool doCopy() override;
|
||||
bool doPaste() override;
|
||||
bool doDelete() override;
|
||||
|
||||
// --------------------------------------------------- : Formating
|
||||
|
||||
virtual bool canFormat(int type) const;
|
||||
virtual bool hasFormat(int type) const;
|
||||
virtual void doFormat(int type);
|
||||
bool canFormat(int type) const override;
|
||||
bool hasFormat(int type) const override;
|
||||
void doFormat(int type) override;
|
||||
|
||||
// --------------------------------------------------- : Selection
|
||||
|
||||
virtual bool canSelectAll() const { return true; }
|
||||
virtual void doSelectAll();
|
||||
virtual void select(size_t start, size_t end);
|
||||
virtual size_t selectionStart() const { return selection_start; }
|
||||
virtual size_t selectionEnd() const { return selection_end; }
|
||||
bool canSelectAll() const override { return true; }
|
||||
void doSelectAll() override;
|
||||
void select(size_t start, size_t end) override;
|
||||
size_t selectionStart() const override { return selection_start; }
|
||||
size_t selectionEnd() const override { return selection_end; }
|
||||
|
||||
virtual void insert(const String& text, const String& action_name);
|
||||
void insert(const String& text, const String& action_name) override;
|
||||
|
||||
// --------------------------------------------------- : Search/replace
|
||||
|
||||
virtual bool search(FindInfo& find, bool from_start);
|
||||
bool search(FindInfo& find, bool from_start) override;
|
||||
private:
|
||||
bool matchSubstr(const String& s, size_t pos, FindInfo& find);
|
||||
public:
|
||||
|
||||
// --------------------------------------------------- : Other
|
||||
|
||||
virtual wxCursor cursor(const RealPoint& pos) const;
|
||||
virtual void determineSize(bool force_fit = false);
|
||||
virtual bool containsPoint(const RealPoint& p) const;
|
||||
virtual RealRect boundingBox() const;
|
||||
virtual void onShow(bool);
|
||||
virtual void draw(RotatedDC&);
|
||||
wxCursor cursor(const RealPoint& pos) const override;
|
||||
void determineSize(bool force_fit = false) override;
|
||||
bool containsPoint(const RealPoint& p) const override;
|
||||
RealRect boundingBox() const override;
|
||||
void onShow(bool) override;
|
||||
void draw(RotatedDC&) override;
|
||||
|
||||
// --------------------------------------------------- : Data
|
||||
private:
|
||||
|
||||
@@ -63,6 +63,6 @@ private:
|
||||
wxFont font_large, font_small;
|
||||
|
||||
protected:
|
||||
virtual void draw(DC& dc);
|
||||
void draw(DC& dc) override;
|
||||
};
|
||||
|
||||
|
||||
+6
-6
@@ -38,23 +38,23 @@ ScriptValueP export_set(SetP const& set, vector<CardP> const& cards, ExportTempl
|
||||
class MSE : public wxApp {
|
||||
public:
|
||||
/// Do nothing. The command line parsing, etc. is done in OnRun
|
||||
bool OnInit() { return true; }
|
||||
bool OnInit() override { return true; }
|
||||
/// Main startup function of the program
|
||||
/** Use OnRun instead of OnInit, so we can determine whether or not we need a main loop
|
||||
* Also, OnExit is always run.
|
||||
*/
|
||||
int OnRun();
|
||||
int OnRun() override;
|
||||
/// Actually start the GUI mainloop
|
||||
int runGUI();
|
||||
/// On exit: write the settings to the config file
|
||||
int OnExit();
|
||||
int OnExit() override;
|
||||
/// On exception: display error message
|
||||
void HandleEvent(wxEvtHandler *handler, wxEventFunction func, wxEvent& event) const;
|
||||
void HandleEvent(wxEvtHandler *handler, wxEventFunction func, wxEvent& event) const override;
|
||||
/// Hack around some wxWidget idiocies
|
||||
int FilterEvent(wxEvent& ev);
|
||||
int FilterEvent(wxEvent& ev) override;
|
||||
/// Fancier assert
|
||||
#if defined(_MSC_VER) && defined(_DEBUG) && defined(_CRT_WIDE)
|
||||
void OnAssert(const wxChar *file, int line, const wxChar *cond, const wxChar *msg);
|
||||
void OnAssert(const wxChar *file, int line, const wxChar *cond, const wxChar *msg) override;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ class DataViewer : public SetView {
|
||||
void setCard(const CardP& card, bool refresh = false);
|
||||
|
||||
/// Clear data
|
||||
virtual void onChangeSet();
|
||||
void onChangeSet() override;
|
||||
|
||||
// --------------------------------------------------- : The viewers
|
||||
private:
|
||||
@@ -88,7 +88,7 @@ protected:
|
||||
virtual ValueViewerP makeViewer(const StyleP&);
|
||||
|
||||
/// Update the viewers and forward actions
|
||||
virtual void onAction(const Action&, bool undone);
|
||||
void onAction(const Action&, bool undone) override;
|
||||
|
||||
/// Notification that the total image has changed
|
||||
virtual void onChange() {}
|
||||
|
||||
@@ -62,9 +62,9 @@ public:
|
||||
inline SolidFillSymbolFilter(const Color& fill_color, const Color& border_color)
|
||||
: fill_color(fill_color), border_color(border_color)
|
||||
{}
|
||||
virtual Color color(double x, double y, SymbolSet point) const;
|
||||
virtual String fillType() const;
|
||||
virtual bool operator == (const SymbolFilter& that) const;
|
||||
Color color(double x, double y, SymbolSet point) const override;
|
||||
String fillType() const override;
|
||||
bool operator == (const SymbolFilter& that) const override;
|
||||
private:
|
||||
Color fill_color, border_color;
|
||||
DECLARE_REFLECTION_OVERRIDE();
|
||||
@@ -95,9 +95,9 @@ public:
|
||||
LinearGradientSymbolFilter(const Color& fill_color_1, const Color& border_color_1, const Color& fill_color_2, const Color& border_color_2
|
||||
,double center_x, double center_y, double end_x, double end_y);
|
||||
|
||||
virtual Color color(double x, double y, SymbolSet point) const;
|
||||
virtual String fillType() const;
|
||||
virtual bool operator == (const SymbolFilter& that) const;
|
||||
Color color(double x, double y, SymbolSet point) const override;
|
||||
String fillType() const override;
|
||||
bool operator == (const SymbolFilter& that) const override;
|
||||
|
||||
/// return time on the gradient, used by GradientSymbolFilter::color
|
||||
inline double t(double x, double y) const;
|
||||
@@ -117,9 +117,9 @@ public:
|
||||
: GradientSymbolFilter(fill_color_1, border_color_1, fill_color_2, border_color_2)
|
||||
{}
|
||||
|
||||
virtual Color color(double x, double y, SymbolSet point) const;
|
||||
virtual String fillType() const;
|
||||
virtual bool operator == (const SymbolFilter& that) const;
|
||||
Color color(double x, double y, SymbolSet point) const override;
|
||||
String fillType() const override;
|
||||
bool operator == (const SymbolFilter& that) const override;
|
||||
|
||||
/// return time on the gradient, used by GradientSymbolFilter::color
|
||||
inline double t(double x, double y) const;
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
|
||||
void drawEditingHints(DC& dc);
|
||||
|
||||
void onAction(const Action&, bool) {}
|
||||
void onAction(const Action&, bool) override {}
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -19,9 +19,9 @@ class ChoiceValueViewer : public ValueViewer {
|
||||
public:
|
||||
DECLARE_VALUE_VIEWER(Choice) : ValueViewer(parent,style) {}
|
||||
|
||||
virtual bool prepare(RotatedDC& dc);
|
||||
virtual void draw(RotatedDC& dc);
|
||||
virtual void onStyleChange(int);
|
||||
bool prepare(RotatedDC& dc) override;
|
||||
void draw(RotatedDC& dc) override;
|
||||
void onStyleChange(int) override;
|
||||
};
|
||||
|
||||
bool prepare_choice_viewer(RotatedDC& dc, ValueViewer& viewer, ChoiceStyle& style, const String& value);
|
||||
|
||||
@@ -21,7 +21,7 @@ class ColorValueViewer : public ValueViewer {
|
||||
public:
|
||||
DECLARE_VALUE_VIEWER(Color) : ValueViewer(parent,style) {}
|
||||
|
||||
virtual void draw(RotatedDC& dc);
|
||||
virtual bool containsPoint(const RealPoint& p) const;
|
||||
void draw(RotatedDC& dc) override;
|
||||
bool containsPoint(const RealPoint& p) const override;
|
||||
};
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user