mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Cleanup: indentation of public/protected/private keywords
This commit is contained in:
@@ -23,7 +23,7 @@ enum AddingOrRemoving {ADD, REMOVE};
|
||||
/// Adding or removing some objects from a vector
|
||||
template <typename T>
|
||||
class GenericAddAction {
|
||||
public:
|
||||
public:
|
||||
GenericAddAction(AddingOrRemoving, const T& item, const vector<T>& container);
|
||||
GenericAddAction(AddingOrRemoving, const vector<T>& items, const vector<T>& container);
|
||||
|
||||
|
||||
@@ -26,17 +26,17 @@ DECLARE_POINTER_TYPE(Keyword);
|
||||
|
||||
/// An Action the changes the keyword list of a set
|
||||
class KeywordListAction : public Action {
|
||||
public:
|
||||
public:
|
||||
inline KeywordListAction(Set& set) : set(set) {}
|
||||
|
||||
protected:
|
||||
protected:
|
||||
Set& set; // the set owns this action, so the set will not be destroyed before this
|
||||
// therefore we don't need a smart pointer
|
||||
};
|
||||
|
||||
/// Adding or removing a keyword from a set
|
||||
class AddKeywordAction : public KeywordListAction {
|
||||
public:
|
||||
public:
|
||||
AddKeywordAction(Set& set);
|
||||
AddKeywordAction(AddingOrRemoving, Set& set, const KeywordP& keyword);
|
||||
|
||||
@@ -56,7 +56,7 @@ class AddKeywordAction : public KeywordListAction {
|
||||
* - reminder text
|
||||
*/
|
||||
class KeywordTextValue : public FakeTextValue {
|
||||
public:
|
||||
public:
|
||||
KeywordTextValue(const TextFieldP& field, Keyword* keyword, String* underlying, bool editable, bool untagged = false)
|
||||
: FakeTextValue(field, underlying, editable, untagged)
|
||||
, keyword(*keyword)
|
||||
@@ -67,7 +67,7 @@ class KeywordTextValue : public FakeTextValue {
|
||||
|
||||
/// A FakeTextValue that is used to edit reminder text scripts
|
||||
class KeywordReminderTextValue : public KeywordTextValue {
|
||||
public:
|
||||
public:
|
||||
KeywordReminderTextValue(Set& set, const TextFieldP& field, Keyword* keyword, bool editable);
|
||||
|
||||
String errors; ///< Errors in the script
|
||||
@@ -88,7 +88,7 @@ class KeywordReminderTextValue : public KeywordTextValue {
|
||||
|
||||
/// Changing the mode of a keyword
|
||||
class ChangeKeywordModeAction : public Action {
|
||||
public:
|
||||
public:
|
||||
ChangeKeywordModeAction(Keyword& keyword, const String& new_mode);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
|
||||
+14
-14
@@ -28,17 +28,17 @@ DECLARE_POINTER_TYPE(PackType);
|
||||
|
||||
/// An Action the changes the card list of a set
|
||||
class CardListAction : public Action {
|
||||
public:
|
||||
public:
|
||||
inline CardListAction(Set& set) : set(set) {}
|
||||
|
||||
protected:
|
||||
protected:
|
||||
Set& set; // the set owns this action, so the set will not be destroyed before this
|
||||
// therefore we don't need a smart pointer
|
||||
};
|
||||
|
||||
/// Adding a new card to a set
|
||||
class AddCardAction : public CardListAction {
|
||||
public:
|
||||
public:
|
||||
/// Add a newly allocated card
|
||||
AddCardAction(Set& set);
|
||||
AddCardAction(AddingOrRemoving, Set& set, const CardP& card);
|
||||
@@ -54,7 +54,7 @@ class AddCardAction : public CardListAction {
|
||||
|
||||
/// Change the position of a card in the card list by swapping two cards
|
||||
class ReorderCardsAction : public CardListAction {
|
||||
public:
|
||||
public:
|
||||
ReorderCardsAction(Set& set, size_t card_id1, size_t card_id2);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
@@ -68,14 +68,14 @@ class ReorderCardsAction : public CardListAction {
|
||||
|
||||
/// An action that affects the rendering/display/look of a set or cards in the set
|
||||
class DisplayChangeAction : public Action {
|
||||
public:
|
||||
public:
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
};
|
||||
|
||||
/// Changing the style of a a card
|
||||
class ChangeCardStyleAction : public DisplayChangeAction {
|
||||
public:
|
||||
public:
|
||||
ChangeCardStyleAction(const CardP& card, const StyleSheetP& stylesheet);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
@@ -90,13 +90,13 @@ class ChangeCardStyleAction : public DisplayChangeAction {
|
||||
|
||||
/// Changing the style of a set to that of a card
|
||||
class ChangeSetStyleAction : public DisplayChangeAction {
|
||||
public:
|
||||
public:
|
||||
ChangeSetStyleAction(Set& set, const CardP& card);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
|
||||
private:
|
||||
private:
|
||||
Set& set; ///< The affected set
|
||||
CardP card; ///< The card whos stylesheet is copied to the set
|
||||
StyleSheetP stylesheet; ///< The old stylesheet of the set
|
||||
@@ -106,7 +106,7 @@ class ChangeSetStyleAction : public DisplayChangeAction {
|
||||
/// Changing the styling of a card to become custom/non-custom
|
||||
/** i.e. toggle card->has_styling */
|
||||
class ChangeCardHasStylingAction : public DisplayChangeAction {
|
||||
public:
|
||||
public:
|
||||
ChangeCardHasStylingAction(Set& set, const CardP& card);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
@@ -122,17 +122,17 @@ class ChangeCardHasStylingAction : public DisplayChangeAction {
|
||||
|
||||
/// An Action the changes the pack types of a set
|
||||
class PackTypesAction : public Action {
|
||||
public:
|
||||
public:
|
||||
inline PackTypesAction(Set& set) : set(set) {}
|
||||
|
||||
protected:
|
||||
protected:
|
||||
Set& set; // the set owns this action, so the set will not be destroyed before this
|
||||
// therefore we don't need a smart pointer
|
||||
};
|
||||
|
||||
/// Adding/removing a pack from a Set
|
||||
class AddPackAction : public PackTypesAction {
|
||||
public:
|
||||
public:
|
||||
/// Add a newly allocated card
|
||||
AddPackAction(AddingOrRemoving, Set& set, const PackTypeP& pack);
|
||||
|
||||
@@ -144,14 +144,14 @@ class AddPackAction : public PackTypesAction {
|
||||
|
||||
/// Updating a pack in a Set
|
||||
class ChangePackAction : public PackTypesAction {
|
||||
public:
|
||||
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);
|
||||
|
||||
private:
|
||||
private:
|
||||
PackTypeP pack;
|
||||
size_t pos;
|
||||
};
|
||||
|
||||
+36
-36
@@ -24,7 +24,7 @@ class SymbolPartAction : public Action {};
|
||||
|
||||
/// Anything that changes a set of parts
|
||||
class SymbolPartsAction : public SymbolPartAction {
|
||||
public:
|
||||
public:
|
||||
SymbolPartsAction(const set<SymbolPartP>& parts);
|
||||
|
||||
const set<SymbolPartP> parts; ///< Affected parts
|
||||
@@ -37,7 +37,7 @@ class SymbolPartListAction : public SymbolPartAction {};
|
||||
|
||||
/// Move some symbol parts
|
||||
class SymbolPartMoveAction : public SymbolPartsAction {
|
||||
public:
|
||||
public:
|
||||
SymbolPartMoveAction(const set<SymbolPartP>& parts, const Vector2D& delta = Vector2D());
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
@@ -46,13 +46,13 @@ class SymbolPartMoveAction : public SymbolPartsAction {
|
||||
/// Update this action to move some more
|
||||
void move(const Vector2D& delta);
|
||||
|
||||
private:
|
||||
private:
|
||||
Vector2D delta; ///< How much to move
|
||||
Vector2D moved; ///< How much has been moved
|
||||
Bounds bounds; ///< Bounding box of the thing we are moving
|
||||
|
||||
void movePart(SymbolPart& part); ///< Move a single part
|
||||
public:
|
||||
public:
|
||||
bool constrain; ///< Constrain movement?
|
||||
int snap; ///< Snap to grid?
|
||||
};
|
||||
@@ -61,13 +61,13 @@ class SymbolPartMoveAction : public SymbolPartsAction {
|
||||
|
||||
/// Transforming symbol parts using a matrix
|
||||
class SymbolPartMatrixAction : public SymbolPartsAction {
|
||||
public:
|
||||
public:
|
||||
SymbolPartMatrixAction(const set<SymbolPartP>& parts, const Vector2D& center);
|
||||
|
||||
/// Update this action to move some more
|
||||
void move(const Vector2D& delta);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
/// Perform the transformation using the given matrix
|
||||
void transform(const Matrix2D& m);
|
||||
void transform(SymbolPart& part, const Matrix2D& m);
|
||||
@@ -77,7 +77,7 @@ class SymbolPartMatrixAction : public SymbolPartsAction {
|
||||
|
||||
/// Rotate some symbol parts
|
||||
class SymbolPartRotateAction : public SymbolPartMatrixAction {
|
||||
public:
|
||||
public:
|
||||
SymbolPartRotateAction(const set<SymbolPartP>& parts, const Vector2D& center);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
@@ -89,9 +89,9 @@ class SymbolPartRotateAction : public SymbolPartMatrixAction {
|
||||
/// Update this action to rotate by a deltaAngle
|
||||
void rotateBy(Radians deltaAngle);
|
||||
|
||||
private:
|
||||
private:
|
||||
Radians angle; ///< How much to rotate?
|
||||
public:
|
||||
public:
|
||||
bool constrain; ///< Constrain movement?
|
||||
};
|
||||
|
||||
@@ -100,7 +100,7 @@ class SymbolPartRotateAction : public SymbolPartMatrixAction {
|
||||
|
||||
/// Shear some symbol parts
|
||||
class SymbolPartShearAction : public SymbolPartMatrixAction {
|
||||
public:
|
||||
public:
|
||||
SymbolPartShearAction(const set<SymbolPartP>& parts, const Vector2D& center);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
@@ -109,7 +109,7 @@ class SymbolPartShearAction : public SymbolPartMatrixAction {
|
||||
/// Change shear by a given amount
|
||||
void move(const Vector2D& deltaShear);
|
||||
|
||||
private:
|
||||
private:
|
||||
Vector2D shear; ///< Shearing, shear.x == 0 || shear.y == 0
|
||||
Vector2D moved;
|
||||
void shearBy(const Vector2D& shear);
|
||||
@@ -123,7 +123,7 @@ class SymbolPartShearAction : public SymbolPartMatrixAction {
|
||||
|
||||
/// Scale some symbol parts
|
||||
class SymbolPartScaleAction : public SymbolPartsAction {
|
||||
public:
|
||||
public:
|
||||
SymbolPartScaleAction(const set<SymbolPartP>& parts, int scaleX, int scaleY);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
@@ -134,7 +134,7 @@ class SymbolPartScaleAction : public SymbolPartsAction {
|
||||
/// Update the action's effect
|
||||
void update();
|
||||
|
||||
private:
|
||||
private:
|
||||
Vector2D old_min, old_size; ///< the original pos/size
|
||||
Vector2D new_real_min, new_real_size; ///< the target pos/sizevoid shearBy(const Vector2D& shear)
|
||||
Vector2D new_min, new_size; ///< the target pos/size after applying constrains
|
||||
@@ -144,7 +144,7 @@ class SymbolPartScaleAction : public SymbolPartsAction {
|
||||
void transformPart(SymbolPart&);
|
||||
/// Transform a single vector
|
||||
inline Vector2D transform(const Vector2D& v);
|
||||
public:
|
||||
public:
|
||||
bool constrain; ///< Constrain movement?
|
||||
int snap; ///< Snap to grid?
|
||||
};
|
||||
@@ -153,14 +153,14 @@ class SymbolPartScaleAction : public SymbolPartsAction {
|
||||
|
||||
/// Change the name of a symbol part
|
||||
class CombiningModeAction : public SymbolPartsAction {
|
||||
public:
|
||||
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);
|
||||
|
||||
private:
|
||||
private:
|
||||
void add(const SymbolPartP&, SymbolShapeCombine mode);
|
||||
vector<pair<SymbolShapeP,SymbolShapeCombine> > parts; ///< Affected parts with new combining modes
|
||||
};
|
||||
@@ -169,14 +169,14 @@ class CombiningModeAction : public SymbolPartsAction {
|
||||
|
||||
/// Change the name of a symbol part
|
||||
class SymbolPartNameAction : public SymbolPartAction {
|
||||
public:
|
||||
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);
|
||||
|
||||
public:
|
||||
public:
|
||||
SymbolPartP part; ///< Affected part
|
||||
String part_name; ///< New name
|
||||
size_t old_cursor; ///< Cursor position
|
||||
@@ -187,13 +187,13 @@ class SymbolPartNameAction : public SymbolPartAction {
|
||||
|
||||
/// Adding a part to a symbol, added at the front of the list (drawn on top)
|
||||
class AddSymbolPartAction : public SymbolPartListAction {
|
||||
public:
|
||||
public:
|
||||
AddSymbolPartAction(Symbol& symbol, const SymbolPartP& part);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
|
||||
private:
|
||||
private:
|
||||
Symbol& symbol; ///< Symbol to add the part to
|
||||
SymbolPartP part; ///< Part to add
|
||||
};
|
||||
@@ -202,17 +202,17 @@ class AddSymbolPartAction : public SymbolPartListAction {
|
||||
|
||||
/// Removing parts from a symbol
|
||||
class RemoveSymbolPartsAction : public SymbolPartListAction {
|
||||
public:
|
||||
public:
|
||||
RemoveSymbolPartsAction(Symbol& symbol, const set<SymbolPartP>& parts);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
|
||||
private:
|
||||
private:
|
||||
Symbol& symbol;
|
||||
/// Check for removals in a group
|
||||
void check(SymbolGroup& group, const set<SymbolPartP>& parts);
|
||||
public:
|
||||
public:
|
||||
/// A removal step
|
||||
struct Removal {
|
||||
inline Removal(SymbolGroup& parent, size_t pos, const SymbolPartP& removed)
|
||||
@@ -222,7 +222,7 @@ class RemoveSymbolPartsAction : public SymbolPartListAction {
|
||||
size_t pos;
|
||||
SymbolPartP removed;
|
||||
};
|
||||
private:
|
||||
private:
|
||||
/// Removed parts, sorted by ascending pos
|
||||
vector<Removal> removals;
|
||||
};
|
||||
@@ -231,7 +231,7 @@ class RemoveSymbolPartsAction : public SymbolPartListAction {
|
||||
|
||||
/// Duplicating parts in a symbol
|
||||
class DuplicateSymbolPartsAction : public SymbolPartListAction {
|
||||
public:
|
||||
public:
|
||||
DuplicateSymbolPartsAction(Symbol& symbol, const set<SymbolPartP>& parts);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
@@ -240,7 +240,7 @@ class DuplicateSymbolPartsAction : public SymbolPartListAction {
|
||||
/// Fill a set with all the new parts
|
||||
void getParts(set<SymbolPartP>& parts);
|
||||
|
||||
private:
|
||||
private:
|
||||
Symbol& symbol;
|
||||
/// Duplicates of parts and their positions, sorted by ascending pos
|
||||
vector<pair<SymbolPartP, size_t> > duplications;
|
||||
@@ -251,28 +251,28 @@ class DuplicateSymbolPartsAction : public SymbolPartListAction {
|
||||
|
||||
/// Change the position of a part in a symbol, by moving a part.
|
||||
class ReorderSymbolPartsAction : public SymbolPartListAction {
|
||||
public:
|
||||
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);
|
||||
|
||||
private:
|
||||
private:
|
||||
SymbolGroup* old_parent, *new_parent;///< Parents to move from and to
|
||||
public:
|
||||
public:
|
||||
size_t old_position, new_position; ///< Positions to move from and to
|
||||
};
|
||||
|
||||
/// Break up a single group, and put its contents at a specific position
|
||||
class UngroupReorderSymbolPartsAction : public SymbolPartListAction {
|
||||
public:
|
||||
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);
|
||||
|
||||
private:
|
||||
private:
|
||||
SymbolGroup& group_parent;
|
||||
size_t group_pos;
|
||||
SymbolGroupP group; ///< Group to destroy
|
||||
@@ -284,29 +284,29 @@ class UngroupReorderSymbolPartsAction : public SymbolPartListAction {
|
||||
|
||||
/// Group multiple symbol parts together
|
||||
class GroupSymbolPartsActionBase : public SymbolPartListAction {
|
||||
public:
|
||||
public:
|
||||
GroupSymbolPartsActionBase(SymbolGroup& root);
|
||||
|
||||
virtual void perform(bool to_undo);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
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
|
||||
class GroupSymbolPartsAction : public GroupSymbolPartsActionBase {
|
||||
public:
|
||||
public:
|
||||
GroupSymbolPartsAction(SymbolGroup& root, const set<SymbolPartP>& parts, const SymbolGroupP& group);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
private:
|
||||
private:
|
||||
SymbolGroupP group;
|
||||
};
|
||||
|
||||
/// Break up one or more SymbolGroups
|
||||
class UngroupSymbolPartsAction : public GroupSymbolPartsActionBase {
|
||||
public:
|
||||
public:
|
||||
/// Remove all the given groups
|
||||
UngroupSymbolPartsAction(SymbolGroup& root, const set<SymbolPartP>& groups);
|
||||
|
||||
|
||||
@@ -301,13 +301,13 @@ double ssqrt(double x) {
|
||||
|
||||
// Remove a single control point
|
||||
class SinglePointRemoveAction : public Action, public IntrusivePtrBase<SinglePointRemoveAction> {
|
||||
public:
|
||||
public:
|
||||
SinglePointRemoveAction(const SymbolShapeP& shape, UInt position);
|
||||
|
||||
virtual String getName(bool to_undo) const { return _("Delete point"); }
|
||||
virtual void perform(bool to_undo);
|
||||
|
||||
private:
|
||||
private:
|
||||
SymbolShapeP shape;
|
||||
UInt position;
|
||||
ControlPointP point; ///< Removed point
|
||||
@@ -387,13 +387,13 @@ DECLARE_POINTER_TYPE(SinglePointRemoveAction);
|
||||
// Internally represented as a list of Single Point Remove Actions.
|
||||
// Not all points mat be removed, at least two points must remain.
|
||||
class ControlPointRemoveAction : public Action {
|
||||
public:
|
||||
public:
|
||||
ControlPointRemoveAction(const SymbolShapeP& shape, const set<ControlPointP>& to_delete);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
|
||||
private:
|
||||
private:
|
||||
vector<SinglePointRemoveActionP> removals;
|
||||
};
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ protected:
|
||||
|
||||
/// Moving a control point in a symbol
|
||||
class ControlPointMoveAction : public ExtendableAction {
|
||||
public:
|
||||
public:
|
||||
ControlPointMoveAction(const set<ControlPointP>& points);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
@@ -60,11 +60,11 @@ class ControlPointMoveAction : public ExtendableAction {
|
||||
/// Update this action to move some more
|
||||
void move(const Vector2D& delta);
|
||||
|
||||
private:
|
||||
private:
|
||||
set<ControlPointP> points; ///< Points to move
|
||||
vector<Vector2D> oldValues; ///< Their old positions
|
||||
Vector2D delta; ///< Amount we moved
|
||||
public:
|
||||
public:
|
||||
bool constrain; ///< Constrain movement?
|
||||
int snap; ///< Snap to grid?
|
||||
};
|
||||
@@ -73,7 +73,7 @@ class ControlPointMoveAction : public ExtendableAction {
|
||||
|
||||
/// Moving a handle(before/after) of a control point in a symbol
|
||||
class HandleMoveAction : public ExtendableAction {
|
||||
public:
|
||||
public:
|
||||
HandleMoveAction(const SelectedHandle& handle);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
@@ -82,12 +82,12 @@ class HandleMoveAction : public ExtendableAction {
|
||||
/// Update this action to move some more
|
||||
void move(const Vector2D& delta);
|
||||
|
||||
private:
|
||||
private:
|
||||
SelectedHandle handle; ///< The handle to move
|
||||
Vector2D old_handle; ///< Old value of this handle
|
||||
Vector2D old_other; ///< Old value of other handle, needed for contraints
|
||||
Vector2D delta; ///< Amount we moved
|
||||
public:
|
||||
public:
|
||||
bool constrain; ///< Constrain movement?
|
||||
int snap; ///< Snap to grid?
|
||||
};
|
||||
@@ -96,7 +96,7 @@ class HandleMoveAction : public ExtendableAction {
|
||||
|
||||
/// Utility class to update a control point
|
||||
class ControlPointUpdate {
|
||||
public:
|
||||
public:
|
||||
ControlPointUpdate(const ControlPointP& pnt);
|
||||
|
||||
/// Perform or undo an update on this control point
|
||||
@@ -112,13 +112,13 @@ class ControlPointUpdate {
|
||||
|
||||
/// Changing a line to a curve and vice versa
|
||||
class SegmentModeAction : public Action {
|
||||
public:
|
||||
public:
|
||||
SegmentModeAction(const ControlPointP& p1, const ControlPointP& p2, SegmentMode mode);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
ControlPointUpdate point1, point2;
|
||||
};
|
||||
|
||||
@@ -126,13 +126,13 @@ class SegmentModeAction : public Action {
|
||||
|
||||
/// Locking a control point
|
||||
class LockModeAction : public Action {
|
||||
public:
|
||||
public:
|
||||
LockModeAction(const ControlPointP& p, LockMode mode);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
|
||||
private:
|
||||
private:
|
||||
ControlPointUpdate point; ///< The affected point
|
||||
};
|
||||
|
||||
@@ -142,7 +142,7 @@ class LockModeAction : public Action {
|
||||
/** Inherits from SegmentModeAction because it also has that effect
|
||||
*/
|
||||
class CurveDragAction : public SegmentModeAction {
|
||||
public:
|
||||
public:
|
||||
CurveDragAction(const ControlPointP& point1, const ControlPointP& point2);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
@@ -156,7 +156,7 @@ class CurveDragAction : public SegmentModeAction {
|
||||
|
||||
/// Insert a new point in a symbol shape
|
||||
class ControlPointAddAction : public Action {
|
||||
public:
|
||||
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);
|
||||
|
||||
@@ -165,7 +165,7 @@ class ControlPointAddAction : public Action {
|
||||
|
||||
inline ControlPointP getNewPoint() const { return new_point; }
|
||||
|
||||
private:
|
||||
private:
|
||||
SymbolShapeP shape; ///< SymbolShape we are in
|
||||
ControlPointP new_point; ///< The point to insert
|
||||
UInt insert_after; ///< Insert after index .. in the array
|
||||
@@ -185,7 +185,7 @@ unique_ptr<Action> control_point_remove_action(const SymbolShapeP& shape, const
|
||||
|
||||
/// Moving the handle or the center of a symbol symmetry
|
||||
class SymmetryMoveAction : public Action {
|
||||
public:
|
||||
public:
|
||||
SymmetryMoveAction(SymbolSymmetry& symmetry, bool is_handle);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
@@ -194,12 +194,12 @@ class SymmetryMoveAction : public Action {
|
||||
/// Update this action to move some more
|
||||
void move(const Vector2D& delta);
|
||||
|
||||
private:
|
||||
private:
|
||||
SymbolSymmetry& symmetry; ///< Affected part
|
||||
bool is_handle; ///< Move the handle or the center?
|
||||
Vector2D delta; ///< Amount we moved
|
||||
Vector2D original; ///< Original value
|
||||
public:
|
||||
public:
|
||||
bool constrain; ///< Constrain movement?
|
||||
int snap; ///< Snap to grid?
|
||||
};
|
||||
@@ -208,12 +208,12 @@ class SymmetryMoveAction : public Action {
|
||||
|
||||
/// Change the type of symmetry
|
||||
class SymmetryTypeAction : public Action {
|
||||
public:
|
||||
public:
|
||||
SymmetryTypeAction(SymbolSymmetry& symmetry, SymbolSymmetryType type);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
private:
|
||||
private:
|
||||
SymbolSymmetry& symmetry;
|
||||
SymbolSymmetryType type;
|
||||
String old_name;
|
||||
@@ -224,12 +224,12 @@ class SymmetryTypeAction : public Action {
|
||||
|
||||
/// Change the number of copies of a symmetry
|
||||
class SymmetryCopiesAction : public Action {
|
||||
public:
|
||||
public:
|
||||
SymmetryCopiesAction(SymbolSymmetry& symmetry, int copies);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
private:
|
||||
private:
|
||||
SymbolSymmetry& symmetry;
|
||||
int copies;
|
||||
String old_name;
|
||||
|
||||
@@ -54,7 +54,7 @@ inline void swap_value(MultipleChoiceValue& a, MultipleChoiceValue::ValueType& b
|
||||
/// A ValueAction that swaps between old and new values
|
||||
template <typename T, bool ALLOW_MERGE>
|
||||
class SimpleValueAction : public ValueAction {
|
||||
public:
|
||||
public:
|
||||
inline SimpleValueAction(const intrusive_ptr<T>& value, const typename T::ValueType& new_value)
|
||||
: ValueAction(value), new_value(new_value)
|
||||
{}
|
||||
@@ -77,7 +77,7 @@ class SimpleValueAction : public ValueAction {
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
typename T::ValueType new_value;
|
||||
};
|
||||
|
||||
|
||||
+12
-12
@@ -35,7 +35,7 @@ DECLARE_POINTER_TYPE(PackageChoiceValue);
|
||||
|
||||
/// An Action the changes a Value
|
||||
class ValueAction : public Action {
|
||||
public:
|
||||
public:
|
||||
inline ValueAction(const ValueP& value)
|
||||
: valueP(value), card(nullptr), old_time_modified(wxDateTime::Now())
|
||||
{}
|
||||
@@ -48,7 +48,7 @@ class ValueAction : public Action {
|
||||
|
||||
const ValueP valueP; ///< The modified value
|
||||
const Card* card; ///< The card the value is on, or null if it is not a card value
|
||||
private:
|
||||
private:
|
||||
wxDateTime old_time_modified;
|
||||
};
|
||||
|
||||
@@ -66,7 +66,7 @@ unique_ptr<ValueAction> value_action(const PackageChoiceValueP& value, const St
|
||||
|
||||
/// An action that changes a TextValue
|
||||
class TextValueAction : public ValueAction {
|
||||
public:
|
||||
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;
|
||||
@@ -77,7 +77,7 @@ class TextValueAction : public ValueAction {
|
||||
|
||||
/// The modified selection
|
||||
size_t selection_start, selection_end;
|
||||
private:
|
||||
private:
|
||||
inline TextValue& value() const;
|
||||
|
||||
size_t new_selection_end;
|
||||
@@ -96,7 +96,7 @@ unique_ptr<TextValueAction> typing_action(const TextValueP& value, size_t start_
|
||||
|
||||
/// Toggle reminder text for a keyword on or off
|
||||
class TextToggleReminderAction : public ValueAction {
|
||||
public:
|
||||
public:
|
||||
TextToggleReminderAction(const TextValueP& value, size_t pos);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
@@ -112,17 +112,17 @@ class TextToggleReminderAction : public ValueAction {
|
||||
|
||||
/// A TextValueAction without the start and end stuff
|
||||
class SimpleTextValueAction : public ValueAction {
|
||||
public:
|
||||
public:
|
||||
SimpleTextValueAction(const Card* card, const TextValueP& value, const Defaultable<String>& new_value);
|
||||
virtual void perform(bool to_undo);
|
||||
bool merge(const SimpleTextValueAction& action);
|
||||
private:
|
||||
private:
|
||||
Defaultable<String> new_value;
|
||||
};
|
||||
|
||||
/// An action from "Replace All"; just a bunch of value actions performed in sequence
|
||||
class ReplaceAllAction : public Action {
|
||||
public:
|
||||
public:
|
||||
~ReplaceAllAction();
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
@@ -135,7 +135,7 @@ class ReplaceAllAction : public Action {
|
||||
|
||||
/// Notification that a script caused a value to change
|
||||
class ScriptValueEvent : public Action {
|
||||
public:
|
||||
public:
|
||||
inline ScriptValueEvent(const Card* card, const Value* value) : card(card), value(value) {}
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
@@ -147,7 +147,7 @@ class ScriptValueEvent : public Action {
|
||||
|
||||
/// Notification that a script caused a style to change
|
||||
class ScriptStyleEvent : public Action {
|
||||
public:
|
||||
public:
|
||||
inline ScriptStyleEvent(const StyleSheet* stylesheet, const Style* style)
|
||||
: stylesheet(stylesheet), style(style)
|
||||
{}
|
||||
@@ -165,7 +165,7 @@ class ScriptStyleEvent : public Action {
|
||||
/// A loose object for performing ValueActions on a certain value.
|
||||
/** Used to reduce coupling */
|
||||
class ValueActionPerformer {
|
||||
public:
|
||||
public:
|
||||
ValueActionPerformer(const ValueP& value, Card* card, const SetP& set);
|
||||
~ValueActionPerformer();
|
||||
/// Perform an action. The performer takes ownerwhip of the action.
|
||||
@@ -173,7 +173,7 @@ class ValueActionPerformer {
|
||||
|
||||
const ValueP value; ///< The value
|
||||
Package& getLocalPackage();
|
||||
private:
|
||||
private:
|
||||
Card* card; ///< Card the value is on (if any)
|
||||
SetP set; ///< Set for the actions
|
||||
};
|
||||
|
||||
@@ -18,7 +18,7 @@ DECLARE_POINTER_TYPE(Card);
|
||||
|
||||
/// A script to add one or more cards to a set
|
||||
class AddCardsScript : public IntrusivePtrBase<AddCardsScript> {
|
||||
public:
|
||||
public:
|
||||
String name;
|
||||
String description;
|
||||
Scriptable<bool> enabled;
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ DECLARE_POINTER_TYPE(StyleSheet);
|
||||
|
||||
/// A card from a card Set
|
||||
class Card : public IntrusivePtrVirtualBase, public IntrusiveFromThis<Card> {
|
||||
public:
|
||||
public:
|
||||
/// Default constructor, uses game_for_new_cards to make the game
|
||||
Card();
|
||||
/// Creates a card using the given game
|
||||
|
||||
+28
-28
@@ -37,7 +37,7 @@ DECLARE_DYNAMIC_ARG(Value*, value_being_updated);
|
||||
|
||||
/// Information on how to store a value
|
||||
class Field : public IntrusivePtrVirtualBase, public IntrusiveFromThis<Field> {
|
||||
public:
|
||||
public:
|
||||
Field();
|
||||
virtual ~Field();
|
||||
|
||||
@@ -70,7 +70,7 @@ class Field : public IntrusivePtrVirtualBase, public IntrusiveFromThis<Field> {
|
||||
/// Add the given dependency to the dependet_scripts list for the variables this field depends on
|
||||
virtual void initDependencies(Context& ctx, const Dependency& dep) const;
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_REFLECTION_VIRTUAL();
|
||||
virtual void after_reading(Version ver);
|
||||
friend void after_reading(Field& s, Version ver);
|
||||
@@ -94,7 +94,7 @@ inline String type_name(const Field&) {
|
||||
|
||||
/// Style information needed to display a Value in a Field.
|
||||
class Style : public IntrusivePtrVirtualBase, public IntrusiveFromThis<Style> {
|
||||
public:
|
||||
public:
|
||||
Style(const FieldP&);
|
||||
virtual ~Style();
|
||||
|
||||
@@ -162,7 +162,7 @@ class Style : public IntrusivePtrVirtualBase, public IntrusiveFromThis<Style> {
|
||||
/** change_info is a subset of StyleChange flags */
|
||||
void tellListeners(int changes);
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_REFLECTION_VIRTUAL();
|
||||
/// Things that are listening to changes in this style
|
||||
vector<StyleListener*> listeners;
|
||||
@@ -193,14 +193,14 @@ void mark_dependency_member(const Style& style, const String& name, const Depend
|
||||
|
||||
/// An object that can respond when a style changes;
|
||||
class StyleListener : public IntrusivePtrVirtualBase {
|
||||
public:
|
||||
public:
|
||||
StyleListener(const StyleP& style);
|
||||
virtual ~StyleListener();
|
||||
|
||||
/// Called when a (scripted) property of the viewed style has changed
|
||||
/** changes is a combination of StyleChange flags */
|
||||
virtual void onStyleChange(int changes) {}
|
||||
protected:
|
||||
protected:
|
||||
const StyleP styleP; ///< The style we are listening to
|
||||
};
|
||||
|
||||
@@ -208,17 +208,17 @@ class StyleListener : public IntrusivePtrVirtualBase {
|
||||
|
||||
/// A specific value 'in' a Field.
|
||||
class Value : public IntrusivePtrVirtualBase {
|
||||
public:
|
||||
public:
|
||||
inline Value(const FieldP& field) : fieldP(field) {}
|
||||
virtual ~Value();
|
||||
|
||||
|
||||
const FieldP fieldP; ///< Field this value is for, should have the right type!
|
||||
Age last_script_update; ///< When where the scripts last updated? (by calling update)
|
||||
String sort_value; ///< How this should be sorted.
|
||||
|
||||
|
||||
/// Get a copy of this value
|
||||
virtual ValueP clone() const = 0;
|
||||
|
||||
|
||||
/// Convert this value to a string for use in tables
|
||||
virtual String toString() const = 0;
|
||||
/// Apply scripts to this value, return true if the value has changed
|
||||
@@ -237,14 +237,14 @@ class Value : public IntrusivePtrVirtualBase {
|
||||
inline String getSortKey() const {
|
||||
return fieldP->sort_script ? sort_value : toString();
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
protected:
|
||||
/// update() split into two functions;.
|
||||
/** Derived classes should put their stuff in between if they need the age in scripts */
|
||||
void updateAge();
|
||||
void updateSortValue(Context& ctx);
|
||||
|
||||
private:
|
||||
|
||||
private:
|
||||
DECLARE_REFLECTION_VIRTUAL();
|
||||
};
|
||||
|
||||
@@ -260,11 +260,11 @@ inline String type_name(const Value&) {
|
||||
// ----------------------------------------------------------------------------- : Utilities
|
||||
|
||||
#define DECLARE_FIELD_TYPE(Type) \
|
||||
DECLARE_REFLECTION_OVERRIDE(); \
|
||||
DECLARE_REFLECTION_OVERRIDE(); \
|
||||
public: \
|
||||
virtual ValueP newValue() override; \
|
||||
virtual StyleP newStyle() override; \
|
||||
virtual String typeName() const override
|
||||
virtual ValueP newValue() override; \
|
||||
virtual StyleP newStyle() override; \
|
||||
virtual String typeName() const override
|
||||
|
||||
// implement newStyle and newValue
|
||||
#define IMPLEMENT_FIELD_TYPE(Type, NAME) \
|
||||
@@ -285,20 +285,20 @@ inline String type_name(const Value&) {
|
||||
}
|
||||
|
||||
#define DECLARE_STYLE_TYPE(Type) \
|
||||
DECLARE_REFLECTION_OVERRIDE(); \
|
||||
DECLARE_REFLECTION_OVERRIDE(); \
|
||||
public: \
|
||||
DECLARE_HAS_FIELD(Type) \
|
||||
StyleP clone() const override; \
|
||||
ValueViewerP makeViewer(DataViewer& parent) override; \
|
||||
ValueViewerP makeEditor(DataEditor& parent) override
|
||||
DECLARE_HAS_FIELD(Type) \
|
||||
StyleP clone() const override; \
|
||||
ValueViewerP makeViewer(DataViewer& parent) override; \
|
||||
ValueViewerP makeEditor(DataEditor& parent) override
|
||||
|
||||
#define DECLARE_VALUE_TYPE(Type,ValueType_) \
|
||||
DECLARE_REFLECTION_OVERRIDE(); \
|
||||
DECLARE_REFLECTION_OVERRIDE(); \
|
||||
public: \
|
||||
DECLARE_HAS_FIELD(Type) \
|
||||
ValueP clone() const override; \
|
||||
String toString() const override; \
|
||||
typedef ValueType_ ValueType
|
||||
DECLARE_HAS_FIELD(Type) \
|
||||
ValueP clone() const override; \
|
||||
String toString() const override; \
|
||||
typedef ValueType_ ValueType
|
||||
|
||||
// implement field() which returns a field with the right (derived) type
|
||||
#define DECLARE_HAS_FIELD(Type) \
|
||||
|
||||
@@ -19,7 +19,7 @@ DECLARE_POINTER_TYPE(BooleanValue);
|
||||
|
||||
/// A field whos value is either true or false
|
||||
class BooleanField : public ChoiceField {
|
||||
public:
|
||||
public:
|
||||
BooleanField();
|
||||
DECLARE_FIELD_TYPE(Boolean);
|
||||
|
||||
@@ -30,14 +30,14 @@ class BooleanField : public ChoiceField {
|
||||
|
||||
/// The Style for a BooleanField
|
||||
class BooleanStyle : public ChoiceStyle {
|
||||
public:
|
||||
public:
|
||||
BooleanStyle(const ChoiceFieldP& field);
|
||||
DECLARE_HAS_FIELD(Boolean); // not DECLARE_STYLE_TYPE, because we use a normal ChoiceValueViewer/Editor
|
||||
virtual StyleP clone() const;
|
||||
|
||||
// no extra data
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_REFLECTION();
|
||||
};
|
||||
|
||||
@@ -45,14 +45,14 @@ class BooleanStyle : public ChoiceStyle {
|
||||
|
||||
/// The Value in a BooleanField
|
||||
class BooleanValue : public ChoiceValue {
|
||||
public:
|
||||
public:
|
||||
inline BooleanValue(const ChoiceFieldP& field) : ChoiceValue(field) {}
|
||||
DECLARE_HAS_FIELD(Boolean);
|
||||
virtual ValueP clone() const;
|
||||
|
||||
// no extra data
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_REFLECTION();
|
||||
};
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ DECLARE_POINTER_TYPE(ChoiceValue);
|
||||
|
||||
/// A field that contains a list of choices
|
||||
class ChoiceField : public Field {
|
||||
public:
|
||||
public:
|
||||
ChoiceField();
|
||||
DECLARE_FIELD_TYPE(Choice);
|
||||
|
||||
@@ -53,7 +53,7 @@ enum ChoiceChoiceType {
|
||||
|
||||
/// An item that can be chosen for this field
|
||||
class ChoiceField::Choice : public IntrusivePtrBase<ChoiceField::Choice> {
|
||||
public:
|
||||
public:
|
||||
Choice();
|
||||
Choice(const String& name);
|
||||
|
||||
@@ -184,7 +184,7 @@ public:
|
||||
|
||||
/// The Value in a ChoiceField
|
||||
class ChoiceValue : public Value {
|
||||
public:
|
||||
public:
|
||||
/// Create a value for the given field
|
||||
/** If initial_first_choice then the first choice should be used in the absence of
|
||||
an explicit initial value
|
||||
|
||||
@@ -22,7 +22,7 @@ DECLARE_POINTER_TYPE(ColorValue);
|
||||
|
||||
/// A field for color values, it contains a list of choices for colors
|
||||
class ColorField : public Field {
|
||||
public:
|
||||
public:
|
||||
ColorField();
|
||||
DECLARE_FIELD_TYPE(Color);
|
||||
|
||||
@@ -41,7 +41,7 @@ class ColorField : public Field {
|
||||
|
||||
/// A color that can be chosen for this field
|
||||
class ColorField::Choice : public IntrusivePtrBase<ColorField::Choice> {
|
||||
public:
|
||||
public:
|
||||
String name; ///< Name of the color
|
||||
Color color; ///< The actual color
|
||||
|
||||
@@ -52,7 +52,7 @@ class ColorField::Choice : public IntrusivePtrBase<ColorField::Choice> {
|
||||
|
||||
/// The Style for a ColorField
|
||||
class ColorStyle : public Style {
|
||||
public:
|
||||
public:
|
||||
ColorStyle(const ColorFieldP& field);
|
||||
DECLARE_STYLE_TYPE(Color);
|
||||
|
||||
@@ -70,7 +70,7 @@ class ColorStyle : public Style {
|
||||
|
||||
/// The Value in a ColorField
|
||||
class ColorValue : public Value {
|
||||
public:
|
||||
public:
|
||||
ColorValue(const ColorFieldP& field);
|
||||
DECLARE_VALUE_TYPE(Color, Defaultable<Color>);
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ DECLARE_POINTER_TYPE(ImageValue);
|
||||
|
||||
/// A field for image values
|
||||
class ImageField : public Field {
|
||||
public:
|
||||
public:
|
||||
// no extra data
|
||||
DECLARE_FIELD_TYPE(Image);
|
||||
};
|
||||
@@ -31,7 +31,7 @@ class ImageField : public Field {
|
||||
|
||||
/// The Style for a ImageField
|
||||
class ImageStyle : public Style {
|
||||
public:
|
||||
public:
|
||||
inline ImageStyle(const ImageFieldP& field) : Style(field) {}
|
||||
DECLARE_STYLE_TYPE(Image);
|
||||
|
||||
@@ -44,7 +44,7 @@ class ImageStyle : public Style {
|
||||
|
||||
/// The Value in a ImageField, i.e. an image
|
||||
class ImageValue : public Value {
|
||||
public:
|
||||
public:
|
||||
inline ImageValue(const ImageFieldP& field) : Value(field) {}
|
||||
DECLARE_VALUE_TYPE(Image, LocalFileName);
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ DECLARE_POINTER_TYPE(InfoValue);
|
||||
/** These values are not editable, they are just headers, icons, labels, etc.
|
||||
*/
|
||||
class InfoField : public Field {
|
||||
public:
|
||||
public:
|
||||
InfoField() { editable = false; }
|
||||
DECLARE_FIELD_TYPE(Text);
|
||||
|
||||
@@ -37,7 +37,7 @@ class InfoField : public Field {
|
||||
|
||||
/// The Style for a InfoField
|
||||
class InfoStyle : public Style {
|
||||
public:
|
||||
public:
|
||||
InfoStyle(const InfoFieldP&);
|
||||
DECLARE_STYLE_TYPE(Info);
|
||||
|
||||
@@ -55,7 +55,7 @@ class InfoStyle : public Style {
|
||||
|
||||
/// The Value in a InfoField
|
||||
class InfoValue : public Value {
|
||||
public:
|
||||
public:
|
||||
inline InfoValue(const InfoFieldP& field) : Value(field) {}
|
||||
DECLARE_VALUE_TYPE(Info, String);
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ DECLARE_POINTER_TYPE(MultipleChoiceValue);
|
||||
|
||||
/// A ChoiceField where multiple choices can be selected simultaniously
|
||||
class MultipleChoiceField : public ChoiceField {
|
||||
public:
|
||||
public:
|
||||
MultipleChoiceField();
|
||||
DECLARE_FIELD_TYPE(MultipleChoiceField);
|
||||
|
||||
@@ -31,7 +31,7 @@ class MultipleChoiceField : public ChoiceField {
|
||||
|
||||
/// The Style for a MultipleChoiceField
|
||||
class MultipleChoiceStyle : public ChoiceStyle {
|
||||
public:
|
||||
public:
|
||||
MultipleChoiceStyle(const MultipleChoiceFieldP& field);
|
||||
DECLARE_STYLE_TYPE(MultipleChoice);
|
||||
|
||||
@@ -48,7 +48,7 @@ class MultipleChoiceStyle : public ChoiceStyle {
|
||||
* The choices must be ordered by id
|
||||
*/
|
||||
class MultipleChoiceValue : public ChoiceValue {
|
||||
public:
|
||||
public:
|
||||
inline MultipleChoiceValue(const MultipleChoiceFieldP& field) : ChoiceValue(field, false) {}
|
||||
DECLARE_HAS_FIELD(MultipleChoice);
|
||||
virtual ValueP clone() const;
|
||||
@@ -66,7 +66,7 @@ class MultipleChoiceValue : public ChoiceValue {
|
||||
|
||||
virtual bool update(Context&);
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_REFLECTION();
|
||||
|
||||
/// Put the value in normal form (all choices ordered, empty_name
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//| License: GNU General Public License 2 or later (see file COPYING) |
|
||||
//+----------------------------------------------------------------------------+
|
||||
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
// ----------------------------------------------------------------------------- : Includes
|
||||
|
||||
@@ -23,7 +23,7 @@ DECLARE_POINTER_TYPE(PackageChoiceValue);
|
||||
|
||||
/// A field for PackageChoice values, it contains a list of choices for PackageChoices
|
||||
class PackageChoiceField : public Field {
|
||||
public:
|
||||
public:
|
||||
PackageChoiceField() : required(true), empty_name(_("none")) {}
|
||||
DECLARE_FIELD_TYPE(PackageChoice);
|
||||
|
||||
@@ -40,7 +40,7 @@ class PackageChoiceField : public Field {
|
||||
|
||||
/// The Style for a PackageChoiceField
|
||||
class PackageChoiceStyle : public Style {
|
||||
public:
|
||||
public:
|
||||
PackageChoiceStyle(const PackageChoiceFieldP& field);
|
||||
DECLARE_STYLE_TYPE(PackageChoice);
|
||||
|
||||
@@ -53,7 +53,7 @@ class PackageChoiceStyle : public Style {
|
||||
|
||||
/// The Value in a PackageChoiceField
|
||||
class PackageChoiceValue : public Value {
|
||||
public:
|
||||
public:
|
||||
PackageChoiceValue(const PackageChoiceFieldP& field) : Value(field), package_name(field->initial) {}
|
||||
DECLARE_VALUE_TYPE(PackageChoice, String);
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ DECLARE_POINTER_TYPE(SymbolValue);
|
||||
|
||||
/// A field for image values
|
||||
class SymbolField : public Field {
|
||||
public:
|
||||
public:
|
||||
DECLARE_FIELD_TYPE(Symbol);
|
||||
|
||||
// no extra data
|
||||
@@ -34,7 +34,7 @@ class SymbolField : public Field {
|
||||
|
||||
/// The Style for a SymbolField
|
||||
class SymbolStyle : public Style {
|
||||
public:
|
||||
public:
|
||||
inline SymbolStyle(const SymbolFieldP& field)
|
||||
: Style(field)
|
||||
, min_aspect_ratio(1), max_aspect_ratio(1)
|
||||
@@ -48,7 +48,7 @@ class SymbolStyle : public Style {
|
||||
|
||||
/// Styling for a symbol variation, defines color, border, etc.
|
||||
class SymbolVariation : public IntrusivePtrBase<SymbolVariation> {
|
||||
public:
|
||||
public:
|
||||
SymbolVariation();
|
||||
~SymbolVariation();
|
||||
String name; ///< Name of this variation
|
||||
@@ -64,7 +64,7 @@ class SymbolVariation : public IntrusivePtrBase<SymbolVariation> {
|
||||
|
||||
/// The Value in a SymbolField, i.e. a symbol
|
||||
class SymbolValue : public Value {
|
||||
public:
|
||||
public:
|
||||
inline SymbolValue(const SymbolFieldP& field) : Value(field) {}
|
||||
DECLARE_VALUE_TYPE(Symbol, LocalFileName);
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ DECLARE_POINTER_TYPE(LineLayout);
|
||||
|
||||
/// A field for values containing tagged text
|
||||
class TextField : public Field {
|
||||
public:
|
||||
public:
|
||||
TextField();
|
||||
DECLARE_FIELD_TYPE(Text);
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
|
||||
/// The Style for a TextField
|
||||
class TextStyle : public Style {
|
||||
public:
|
||||
public:
|
||||
TextStyle(const TextFieldP&);
|
||||
DECLARE_STYLE_TYPE(Text);
|
||||
|
||||
@@ -107,7 +107,7 @@ class TextStyle : public Style {
|
||||
|
||||
/// The Value in a TextField
|
||||
class TextValue : public Value {
|
||||
public:
|
||||
public:
|
||||
inline TextValue(const TextFieldP& field) : Value(field), last_update(1) {}
|
||||
DECLARE_VALUE_TYPE(Text, Defaultable<String>);
|
||||
|
||||
@@ -122,7 +122,7 @@ class TextValue : public Value {
|
||||
/// A 'fake' TextValue that is used to edit some other string
|
||||
/** Used by TextCtrl */
|
||||
class FakeTextValue : public TextValue {
|
||||
public:
|
||||
public:
|
||||
/// Initialize the fake text value
|
||||
/** underlying can be nullptr, in that case there is no underlying value */
|
||||
FakeTextValue(const TextFieldP& field, String* underlying, bool editable, bool untagged);
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
/// A filter function to determine which items are shown in a list
|
||||
template <typename T>
|
||||
class Filter : public IntrusivePtrVirtualBase {
|
||||
public:
|
||||
public:
|
||||
typedef intrusive_ptr<T> TP;
|
||||
|
||||
virtual ~Filter() {}
|
||||
|
||||
+2
-2
@@ -32,7 +32,7 @@ enum FontFlags
|
||||
/// A font for rendering text
|
||||
/** Contains additional information about scaling, color and shadow */
|
||||
class Font : public IntrusivePtrBase<Font> {
|
||||
public:
|
||||
public:
|
||||
Scriptable<String> name; ///< Name of the font
|
||||
Scriptable<String> italic_name; ///< Font name for italic text (optional)
|
||||
Scriptable<double> size; ///< Size of the font
|
||||
@@ -65,7 +65,7 @@ class Font : public IntrusivePtrBase<Font> {
|
||||
/// Convert this font to a wxFont
|
||||
wxFont toWxFont(double scale) const;
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_REFLECTION();
|
||||
};
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ String card_rarity_code(const String& rarity);
|
||||
|
||||
/// Callback for updating a progress bar
|
||||
class WithProgress {
|
||||
public:
|
||||
public:
|
||||
virtual void onProgress(float progress, const String& message) = 0;
|
||||
virtual ~WithProgress () {}
|
||||
};
|
||||
@@ -37,7 +37,7 @@ class AbortException {};
|
||||
|
||||
/// A dialog to show the progress of exporting
|
||||
class ExportProgressDialog : public wxProgressDialog, public WithProgress {
|
||||
public:
|
||||
public:
|
||||
ExportProgressDialog(Window* parent, const String& title, const String& message);
|
||||
|
||||
/// Update the progress bar
|
||||
@@ -60,7 +60,7 @@ void ExportProgressDialog::onProgress(float progress, const String& message) {
|
||||
|
||||
/// An Apprentice database file, has read() and write() functions
|
||||
class ApprDatabase {
|
||||
public:
|
||||
public:
|
||||
ApprDatabase(WithProgress* progress_target, const String& name);
|
||||
virtual ~ApprDatabase();
|
||||
|
||||
@@ -71,13 +71,13 @@ class ApprDatabase {
|
||||
/// Finalize the writing, swap the actual and the temporary file
|
||||
void commit();
|
||||
|
||||
protected:
|
||||
protected:
|
||||
virtual void doRead(wxInputStream&) = 0;
|
||||
virtual void doWrite(wxOutputStream&) = 0;
|
||||
|
||||
WithProgress* progress_target; ///< Write progress information to here
|
||||
|
||||
private:
|
||||
private:
|
||||
bool in_progress; ///< Is writing in progress?
|
||||
String filename; ///< Filename of database file
|
||||
};
|
||||
@@ -92,7 +92,7 @@ ApprDatabase::~ApprDatabase() {
|
||||
// An exception is thrown while we were writing, clean up the temporary files
|
||||
if (in_progress) {
|
||||
// abort 'transaction'
|
||||
wxRemoveFile(filename + _(".new"));
|
||||
remove_file(filename + _(".new"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ void ApprDatabase::read() {
|
||||
void ApprDatabase::write() {
|
||||
// write to a .new file, doesn't commit yet
|
||||
if (wxFileExists(filename + _(".new"))) {
|
||||
wxRemoveFile(filename + _(".new"));
|
||||
remove_file(filename + _(".new"));
|
||||
}
|
||||
wxFileOutputStream out(filename + _(".new"));
|
||||
in_progress = true;
|
||||
@@ -128,15 +128,15 @@ void ApprDatabase::commit() {
|
||||
|
||||
/// An Apprentice expansion database (Expan.dat)
|
||||
class ApprExpansionDatabase : public ApprDatabase {
|
||||
public:
|
||||
public:
|
||||
inline ApprExpansionDatabase(WithProgress* progress_target)
|
||||
: ApprDatabase(progress_target, _("Expan.dat"))
|
||||
{}
|
||||
protected:
|
||||
protected:
|
||||
virtual void doRead(wxInputStream& in);
|
||||
virtual void doWrite(wxOutputStream& out);
|
||||
|
||||
public:
|
||||
public:
|
||||
map<String,String> expansions; ///< code -> name
|
||||
vector<String> order; ///< order of codes
|
||||
};
|
||||
@@ -181,25 +181,25 @@ void ApprExpansionDatabase::doWrite(wxOutputStream& out) {
|
||||
// ----------------------------------------------------------------------------- : Format database
|
||||
|
||||
class ApprFormat {
|
||||
public:
|
||||
public:
|
||||
ApprFormat(const String& name) : name(name) {}
|
||||
String name, sets;
|
||||
};
|
||||
|
||||
/// An Apprentice format database (Format.dat)
|
||||
class ApprFormatDatabase : public ApprDatabase {
|
||||
public:
|
||||
public:
|
||||
inline ApprFormatDatabase(WithProgress* progress_target)
|
||||
: ApprDatabase(progress_target, _("Format.dat"))
|
||||
{}
|
||||
/// Remove a set code from all formats
|
||||
void removeSet(const String& code);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
virtual void doRead(wxInputStream& in);
|
||||
virtual void doWrite(wxOutputStream& out);
|
||||
|
||||
private:
|
||||
private:
|
||||
vector<ApprFormat> formats;
|
||||
};
|
||||
|
||||
@@ -253,7 +253,7 @@ void ApprFormatDatabase::doWrite(wxOutputStream& out) {
|
||||
|
||||
// An entry in the Distro database
|
||||
class ApprDistro {
|
||||
public:
|
||||
public:
|
||||
inline ApprDistro(int bc = 0, int bu = 0, int br = 0, int sc = 0, int su = 0, int sr = 0)
|
||||
: bc(bc), bu(bu), br(br)
|
||||
, sc(sc), su(su), sr(sr)
|
||||
@@ -266,24 +266,24 @@ class ApprDistro {
|
||||
|
||||
void write(const String& code, wxTextOutputStream& tout);
|
||||
|
||||
private:
|
||||
private:
|
||||
void writeD(wxTextOutputStream& tout, const String& name, int c, int u, int r);
|
||||
};
|
||||
|
||||
/// An Apprentice distribution database (Distro.dat)
|
||||
class ApprDistroDatabase : public ApprDatabase {
|
||||
public:
|
||||
public:
|
||||
inline ApprDistroDatabase(WithProgress* progress_target)
|
||||
: ApprDatabase(progress_target, _("Distro.dat"))
|
||||
{}
|
||||
/// Remove a set code
|
||||
void removeSet(const String& code);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
virtual void doRead(wxInputStream& in);
|
||||
virtual void doWrite(wxOutputStream& out);
|
||||
|
||||
public:
|
||||
public:
|
||||
map<String,ApprDistro> distros;
|
||||
vector<String> order; // order of codes
|
||||
};
|
||||
@@ -357,18 +357,18 @@ DECLARE_POINTER_TYPE(ApprCardRecord);
|
||||
|
||||
/// An Apprentice card database (cardinfo.dat)
|
||||
class ApprCardDatabase : public ApprDatabase {
|
||||
public:
|
||||
public:
|
||||
inline ApprCardDatabase(WithProgress* progress_target)
|
||||
: ApprDatabase(progress_target, _("sets\\cardinfo.dat"))
|
||||
{}
|
||||
/// Remove a set code
|
||||
void removeSet(const String& code);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
virtual void doRead(wxInputStream& in);
|
||||
virtual void doWrite(wxOutputStream& out);
|
||||
|
||||
public:
|
||||
public:
|
||||
vector<ApprCardRecordP> cards;
|
||||
};
|
||||
|
||||
@@ -377,7 +377,7 @@ class ApprCardDatabase : public ApprDatabase {
|
||||
* and a head record at the bottom
|
||||
*/
|
||||
class ApprCardRecord : public IntrusivePtrBase<ApprCardRecord> {
|
||||
public:
|
||||
public:
|
||||
String name, sets;
|
||||
String type, cc, pt, text, flavor;
|
||||
UInt data_pos;
|
||||
@@ -579,13 +579,13 @@ void ApprCardDatabase::doWrite(wxOutputStream& out) {
|
||||
|
||||
/// Dialog for exporting a set to Apprentice
|
||||
class ApprenticeExportWindow : public wxDialog, public WithProgress {
|
||||
public:
|
||||
public:
|
||||
ApprenticeExportWindow(Window* parent, const SetP& set);
|
||||
|
||||
virtual void onProgress(float p, const String& message);
|
||||
void doStep(const String& s, float size);
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
SetP set;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ DECLARE_POINTER_TYPE(Keyword);
|
||||
|
||||
/// The data format for cards on the clipboard
|
||||
class CardsDataObject : public wxTextDataObject {
|
||||
public:
|
||||
public:
|
||||
/// Name of the format of MSE cards
|
||||
static wxDataFormat format;
|
||||
|
||||
@@ -36,7 +36,7 @@ class CardsDataObject : public wxTextDataObject {
|
||||
|
||||
/// The data format for keywords on the clipboard
|
||||
class KeywordDataObject : public wxTextDataObject {
|
||||
public:
|
||||
public:
|
||||
/// Name of the format of MSE keywords
|
||||
static wxDataFormat format;
|
||||
|
||||
@@ -52,7 +52,7 @@ class KeywordDataObject : public wxTextDataObject {
|
||||
|
||||
/// A DataObject for putting one or more cards on the clipboard, in multiple formats
|
||||
class CardsOnClipboard : public wxDataObjectComposite {
|
||||
public:
|
||||
public:
|
||||
CardsOnClipboard(const SetP& set, const vector<CardP>& cards);
|
||||
};
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ DECLARE_POINTER_TYPE(Card);
|
||||
|
||||
/// A filter for a specific file format
|
||||
class FileFormat : public IntrusivePtrVirtualBase {
|
||||
public:
|
||||
public:
|
||||
virtual ~FileFormat() {}
|
||||
/// File extension used by this file format
|
||||
virtual String extension() = 0;
|
||||
|
||||
@@ -25,12 +25,12 @@ void export_image(const SetP& set, const CardP& card, const String& filename) {
|
||||
}
|
||||
|
||||
class UnzoomedDataViewer : public DataViewer {
|
||||
public:
|
||||
public:
|
||||
UnzoomedDataViewer(bool use_zoom_settings)
|
||||
: use_zoom_settings(use_zoom_settings)
|
||||
{}
|
||||
virtual Rotation getRotation() const;
|
||||
private:
|
||||
private:
|
||||
bool use_zoom_settings;
|
||||
};
|
||||
Rotation UnzoomedDataViewer::getRotation() const {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
/// The file format of MSE1 files
|
||||
class MSE1FileFormat : public FileFormat {
|
||||
public:
|
||||
public:
|
||||
virtual String extension() { return _("mse"); }
|
||||
virtual String name() { return _("Magic Set Editor version 1 files (*.mse)"); }
|
||||
virtual bool canImport() { return true; }
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
/// The file format of MSE2 files
|
||||
class MSE2FileFormat : public FileFormat {
|
||||
public:
|
||||
public:
|
||||
virtual String extension() { return _("mse-set"); }
|
||||
virtual String matches() { return _("*.mse-set;set"); }
|
||||
virtual String name() { return _("Magic Set Editor sets (*.mse-set)"); }
|
||||
|
||||
@@ -22,13 +22,13 @@
|
||||
|
||||
/// The file format of Mtg Editor files
|
||||
class MtgEditorFileFormat : public FileFormat {
|
||||
public:
|
||||
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);
|
||||
private:
|
||||
private:
|
||||
// Filter: se filename -> image directory
|
||||
// based on MtgEditor's: CardSet.getImageFolder
|
||||
String filter1(const String& str);
|
||||
|
||||
+2
-2
@@ -34,7 +34,7 @@ DECLARE_DYNAMIC_ARG(Game*, game_for_reading);
|
||||
|
||||
/// A description of a card game
|
||||
class Game : public Packaged {
|
||||
public:
|
||||
public:
|
||||
Game();
|
||||
|
||||
OptionalScript init_script; ///< Script of variables available to other scripts in this game
|
||||
@@ -73,7 +73,7 @@ class Game : public Packaged {
|
||||
virtual String typeName() const;
|
||||
Version fileVersion() const;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
virtual void validate(Version);
|
||||
|
||||
DECLARE_REFLECTION_OVERRIDE();
|
||||
|
||||
@@ -76,7 +76,7 @@ struct dependency_check : public unary_function<bool, PackagedP> {
|
||||
bool operator () (PackagedP package) {
|
||||
return package->name() == dep->package && package->version >= dep->version;
|
||||
}
|
||||
private:
|
||||
private:
|
||||
PackageDependencyP dep;
|
||||
};
|
||||
|
||||
@@ -268,7 +268,7 @@ DownloadableInstaller::DownloadableInstaller(const InstallerP& installer)
|
||||
|
||||
DownloadableInstaller::~DownloadableInstaller() {
|
||||
if (!installer_file.empty()) {
|
||||
wxRemoveFile(installer_file);
|
||||
remove_file(installer_file);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ DECLARE_POINTER_TYPE(InstallablePackage);
|
||||
/** Installers will be sent around the internet, etc. so they are fairly selfcontained.
|
||||
*/
|
||||
class Installer : public Packaged {
|
||||
public:
|
||||
public:
|
||||
String prefered_filename; ///< What filename should be used (by default), when creating the installer
|
||||
vector<PackageDescriptionP> packages; ///< Packages to install
|
||||
|
||||
@@ -42,7 +42,7 @@ class Installer : public Packaged {
|
||||
*/
|
||||
void addPackage(Packaged& package);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
virtual String typeName() const;
|
||||
virtual Version fileVersion() const;
|
||||
virtual void validate(Version file_app_version);
|
||||
@@ -56,7 +56,7 @@ class Installer : public Packaged {
|
||||
* TODO: try to merge these!
|
||||
*/
|
||||
class PackageDescription : public IntrusivePtrBase<PackageDescription> {
|
||||
public:
|
||||
public:
|
||||
PackageDescription();
|
||||
PackageDescription(const Packaged& package);
|
||||
|
||||
@@ -80,7 +80,7 @@ class PackageDescription : public IntrusivePtrBase<PackageDescription> {
|
||||
|
||||
/// A description of the contents of an installer
|
||||
class InstallerDescription : public IntrusivePtrBase<InstallerDescription> {
|
||||
public:
|
||||
public:
|
||||
vector<PackageDescriptionP> packages;
|
||||
|
||||
DECLARE_REFLECTION();
|
||||
@@ -88,7 +88,7 @@ class InstallerDescription : public IntrusivePtrBase<InstallerDescription> {
|
||||
|
||||
/// Information on an installer that can be downloaded
|
||||
class DownloadableInstaller : public IntrusivePtrBase<DownloadableInstaller> {
|
||||
public:
|
||||
public:
|
||||
DownloadableInstaller() : downloadable(true) {}
|
||||
DownloadableInstaller(const InstallerP& installer);
|
||||
~DownloadableInstaller();
|
||||
@@ -133,7 +133,7 @@ inline bool flag(int flags, int flag) { return (flags & flag) == flag; }
|
||||
|
||||
/// A package that can be installed, or is already installed
|
||||
class InstallablePackage : public IntrusivePtrVirtualBase {
|
||||
public:
|
||||
public:
|
||||
/// A new package
|
||||
InstallablePackage(const PackageDescriptionP&, const DownloadableInstallerP&);
|
||||
/// An installed package
|
||||
|
||||
@@ -245,7 +245,7 @@ void Keyword::prepare(const vector<KeywordParamP>& param_types, bool force) {
|
||||
|
||||
/// A node in a trie to match keywords
|
||||
class KeywordTrie {
|
||||
public:
|
||||
public:
|
||||
KeywordTrie();
|
||||
~KeywordTrie();
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ class Value;
|
||||
// ----------------------------------------------------------------------------- : Keyword parameters
|
||||
|
||||
class ParamReferenceType : public IntrusivePtrBase<ParamReferenceType> {
|
||||
public:
|
||||
public:
|
||||
String name; ///< Name of the parameter reference type
|
||||
String description; ///< Description (for status bar)
|
||||
StringScript script; ///< Code to insert into the reminder text script, input is the actual parameter name
|
||||
@@ -34,7 +34,7 @@ class ParamReferenceType : public IntrusivePtrBase<ParamReferenceType> {
|
||||
|
||||
/// Parameter type of keywords
|
||||
class KeywordParam : public IntrusivePtrBase<KeywordParam> {
|
||||
public:
|
||||
public:
|
||||
KeywordParam();
|
||||
String name; ///< Name of the parameter type
|
||||
String description; ///< Description of the parameter type
|
||||
@@ -73,7 +73,7 @@ class KeywordParam : public IntrusivePtrBase<KeywordParam> {
|
||||
|
||||
/// Information on when and how to use a keyword
|
||||
class KeywordMode : public IntrusivePtrBase<KeywordMode> {
|
||||
public:
|
||||
public:
|
||||
KeywordMode() : is_default(false) {}
|
||||
|
||||
String name; ///< Name of the mode
|
||||
@@ -87,7 +87,7 @@ class KeywordMode : public IntrusivePtrBase<KeywordMode> {
|
||||
|
||||
/// A keyword for a set or a game
|
||||
class Keyword : public IntrusivePtrVirtualBase {
|
||||
public:
|
||||
public:
|
||||
Keyword() : fixed(false), valid(false) {}
|
||||
|
||||
String keyword; ///< The keyword, only for human use
|
||||
@@ -183,7 +183,7 @@ private:
|
||||
|
||||
/// A script value containing the value of a keyword parameter
|
||||
class KeywordParamValue : public ScriptValue {
|
||||
public:
|
||||
public:
|
||||
KeywordParamValue(const String& type, const String& separator_before, const String& separator_after, const String& value)
|
||||
: type_name(type), separator_before(separator_before), separator_after(separator_after), value(value)
|
||||
{}
|
||||
|
||||
+8
-8
@@ -39,7 +39,7 @@ enum PackSelectType
|
||||
|
||||
/// A card pack description for playtesting
|
||||
class PackType : public IntrusivePtrBase<PackType> {
|
||||
public:
|
||||
public:
|
||||
PackType();
|
||||
|
||||
String name; ///< Name of this pack
|
||||
@@ -53,14 +53,14 @@ class PackType : public IntrusivePtrBase<PackType> {
|
||||
/// Update scripts, returns true if there is a change
|
||||
bool update(Context& ctx);
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_REFLECTION();
|
||||
};
|
||||
void after_reading(PackType&, Version);
|
||||
|
||||
/// An item in a PackType
|
||||
class PackItem : public IntrusivePtrBase<PackItem> {
|
||||
public:
|
||||
public:
|
||||
PackItem();
|
||||
PackItem(const String& name, int amount);
|
||||
|
||||
@@ -71,7 +71,7 @@ class PackItem : public IntrusivePtrBase<PackItem> {
|
||||
/// Update scripts, returns true if there is a change
|
||||
bool update(Context& ctx);
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_REFLECTION();
|
||||
};
|
||||
|
||||
@@ -84,7 +84,7 @@ inline String type_name(const PackType&) {
|
||||
// A PackType that is instantiated for a particular Set,
|
||||
// i.e. we now know the actual cards
|
||||
class PackInstance : public IntrusivePtrBase<PackInstance> {
|
||||
public:
|
||||
public:
|
||||
PackInstance(const PackType& pack_type, PackGenerator& parent);
|
||||
|
||||
/// Expect to pick this many copies from this pack, updates expected_copies
|
||||
@@ -104,7 +104,7 @@ class PackInstance : public IntrusivePtrBase<PackInstance> {
|
||||
inline size_t get_card_copies() const { return card_copies; }
|
||||
inline double get_expected_copies() const { return expected_copies; }
|
||||
|
||||
private:
|
||||
private:
|
||||
const PackType& pack_type;
|
||||
PackGenerator& parent;
|
||||
int depth; //< 0 = no items, otherwise 1+max depth of items refered to
|
||||
@@ -121,7 +121,7 @@ class PackInstance : public IntrusivePtrBase<PackInstance> {
|
||||
};
|
||||
|
||||
class PackGenerator {
|
||||
public:
|
||||
public:
|
||||
/// Reset the generator, possibly switching the set or reseeding
|
||||
void reset(const SetP& set, int seed);
|
||||
/// Reset the generator, but not the set
|
||||
@@ -139,7 +139,7 @@ class PackGenerator {
|
||||
// only for PackInstance
|
||||
SetP set; ///< The set
|
||||
mt19937 gen; ///< Random generator
|
||||
private:
|
||||
private:
|
||||
/// Details for each PackType
|
||||
map<String,PackInstanceP> instances;
|
||||
int max_depth;
|
||||
|
||||
+5
-5
@@ -36,7 +36,7 @@ typedef intrusive_ptr<OrderCache<CardP> > OrderCacheP;
|
||||
|
||||
/// A set of cards
|
||||
class Set : public Packaged {
|
||||
public:
|
||||
public:
|
||||
/// Create a set, the set should be open()ed later
|
||||
Set();
|
||||
/// Create a set using the given game
|
||||
@@ -119,12 +119,12 @@ class Set : public Packaged {
|
||||
/// Validate that the set is correctly loaded
|
||||
virtual void validate(Version = app_version);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
virtual VCSP getVCS() {
|
||||
return vcs;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_REFLECTION();
|
||||
template <typename Handler>
|
||||
void reflect_cards(Handler& handler);
|
||||
@@ -154,7 +154,7 @@ void mark_dependency_member(const Set& set, const String& name, const Dependency
|
||||
/** To listen to events, derived classes should override onAction(const Action&, bool undone)
|
||||
*/
|
||||
class SetView : public ActionListener {
|
||||
public:
|
||||
public:
|
||||
SetView();
|
||||
~SetView();
|
||||
|
||||
@@ -163,7 +163,7 @@ class SetView : public ActionListener {
|
||||
/// Change the set that is being viewed
|
||||
void setSet(const SetP& set);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
/// The set that is currently being viewed, should not be modified directly!
|
||||
SetP set;
|
||||
|
||||
|
||||
+10
-10
@@ -56,7 +56,7 @@ enum FilenameConflicts
|
||||
|
||||
/// Settings of a single column in the card list
|
||||
class ColumnSettings {
|
||||
public:
|
||||
public:
|
||||
ColumnSettings();
|
||||
UInt width;
|
||||
int position;
|
||||
@@ -67,7 +67,7 @@ class ColumnSettings {
|
||||
|
||||
/// Settings for a Game
|
||||
class GameSettings : public IntrusivePtrBase<GameSettings> {
|
||||
public:
|
||||
public:
|
||||
GameSettings();
|
||||
|
||||
/// Where the settings have defaults, initialize with the values from the game
|
||||
@@ -87,13 +87,13 @@ class GameSettings : public IntrusivePtrBase<GameSettings> {
|
||||
int pack_seed;
|
||||
|
||||
DECLARE_REFLECTION();
|
||||
private:
|
||||
private:
|
||||
bool initialized;
|
||||
};
|
||||
|
||||
/// Settings for a StyleSheet
|
||||
class StyleSheetSettings : public IntrusivePtrBase<StyleSheetSettings> {
|
||||
public:
|
||||
public:
|
||||
StyleSheetSettings();
|
||||
|
||||
// Rendering/display settings
|
||||
@@ -126,7 +126,7 @@ enum PageLayoutType
|
||||
* Settings are loaded at startup, and stored at shutdown.
|
||||
*/
|
||||
class Settings {
|
||||
public:
|
||||
public:
|
||||
/// Default constructor initializes default settings
|
||||
Settings();
|
||||
|
||||
@@ -171,16 +171,16 @@ class Settings {
|
||||
/// Get the settings object for a specific stylesheet
|
||||
StyleSheetSettings& stylesheetSettingsFor(const StyleSheet& stylesheet);
|
||||
|
||||
private:
|
||||
private:
|
||||
map<String,GameSettingsP> game_settings;
|
||||
map<String,StyleSheetSettingsP> stylesheet_settings;
|
||||
public:
|
||||
public:
|
||||
StyleSheetSettings default_stylesheet_settings; ///< The default settings for stylesheets
|
||||
|
||||
// --------------------------------------------------- : Exports
|
||||
private:
|
||||
private:
|
||||
DelayedIndexMaps<FieldP,ValueP> export_options;
|
||||
public:
|
||||
public:
|
||||
|
||||
/// Get the options for an export template
|
||||
IndexMap<FieldP,ValueP>& exportOptionsFor(const ExportTemplate& export_template);
|
||||
@@ -212,7 +212,7 @@ class Settings {
|
||||
/// Store the settings in the standard location
|
||||
void write();
|
||||
|
||||
private:
|
||||
private:
|
||||
/// Name of the settings file
|
||||
String settingsFile();
|
||||
/// Clear settings before reading them
|
||||
|
||||
@@ -22,7 +22,7 @@ DECLARE_POINTER_TYPE(StatsCategory);
|
||||
/// A dimension that can be plotted as an axis in a graph
|
||||
/** Dimensions can be generated automatically based on card fields */
|
||||
class StatsDimension : public IntrusivePtrBase<StatsDimension> {
|
||||
public:
|
||||
public:
|
||||
StatsDimension();
|
||||
StatsDimension(const Field&);
|
||||
|
||||
@@ -48,7 +48,7 @@ class StatsDimension : public IntrusivePtrBase<StatsDimension> {
|
||||
/// A category for statistics
|
||||
/** Can be generated automatically based on a dimension */
|
||||
class StatsCategory : public IntrusivePtrBase<StatsCategory> {
|
||||
public:
|
||||
public:
|
||||
StatsCategory();
|
||||
StatsCategory(const StatsDimensionP&);
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ DECLARE_DYNAMIC_ARG(StyleSheet*, stylesheet_for_reading);
|
||||
|
||||
/// A collection of style information for card and set fields
|
||||
class StyleSheet : public Packaged {
|
||||
public:
|
||||
public:
|
||||
StyleSheet();
|
||||
|
||||
GameP game; ///< The game this stylesheet is made for
|
||||
@@ -67,7 +67,7 @@ class StyleSheet : public Packaged {
|
||||
/// Validate the stylesheet
|
||||
virtual void validate(Version = app_version);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
|
||||
DECLARE_REFLECTION();
|
||||
};
|
||||
|
||||
+10
-10
@@ -48,7 +48,7 @@ enum WhichHandle
|
||||
|
||||
/// A control point (corner) of a SymbolShape (polygon/bezier-gon)
|
||||
class ControlPoint : public IntrusivePtrBase<ControlPoint> {
|
||||
public:
|
||||
public:
|
||||
Vector2D pos; ///< position of the control point itself
|
||||
Vector2D delta_before; ///< delta to bezier control point, for curve before point
|
||||
Vector2D delta_after; ///< delta to bezier control point, for curve after point
|
||||
@@ -80,7 +80,7 @@ class ControlPoint : public IntrusivePtrBase<ControlPoint> {
|
||||
|
||||
/// A specific handle of a ControlPoint
|
||||
class SelectedHandle {
|
||||
public:
|
||||
public:
|
||||
ControlPointP point; ///< the selected point
|
||||
WhichHandle handle; ///< the selected handle of the point
|
||||
|
||||
@@ -109,7 +109,7 @@ class SelectedHandle {
|
||||
|
||||
/// Bounding box of a symbol part
|
||||
class Bounds {
|
||||
public:
|
||||
public:
|
||||
inline Bounds() : min(Vector2D::infinity()), max(-Vector2D::infinity()) {}
|
||||
inline explicit Bounds(const Vector2D& p) : min(p), max(p) {}
|
||||
inline Bounds(const Vector2D& min, const Vector2D& max) : min(min), max(max) {}
|
||||
@@ -135,7 +135,7 @@ class Bounds {
|
||||
|
||||
/// A part of a symbol, not necesserly a shape
|
||||
class SymbolPart : public IntrusivePtrVirtualBase {
|
||||
public:
|
||||
public:
|
||||
/// Name/label for this part
|
||||
String name;
|
||||
/// Position and size of the part.
|
||||
@@ -196,7 +196,7 @@ inline size_t mod(int a, size_t size) {
|
||||
|
||||
/// A single shape (polygon/bezier-gon) in a Symbol
|
||||
class SymbolShape : public SymbolPart {
|
||||
public:
|
||||
public:
|
||||
/// The points of this polygon
|
||||
vector<ControlPointP> points;
|
||||
/// How is this part combined with parts below it?
|
||||
@@ -231,7 +231,7 @@ class SymbolShape : public SymbolPart {
|
||||
|
||||
/// A group of symbol parts
|
||||
class SymbolGroup : public SymbolPart {
|
||||
public:
|
||||
public:
|
||||
vector<SymbolPartP> parts; ///< The parts in this group, first item is on top
|
||||
|
||||
SymbolGroup();
|
||||
@@ -259,7 +259,7 @@ enum SymbolSymmetryType
|
||||
/// A mirror, reflecting the part of the symbol in the group
|
||||
/** Can handle rotation symmetry with any number of reflections */
|
||||
class SymbolSymmetry : public SymbolGroup {
|
||||
public:
|
||||
public:
|
||||
SymbolSymmetryType kind; ///< What kind of symmetry
|
||||
int copies; ///< How many times is the orignal reflected (including the original itself)
|
||||
bool clip; ///< Clip the orignal so it doesn't intersect the mirror(s)
|
||||
@@ -284,7 +284,7 @@ class SymbolSymmetry : public SymbolGroup {
|
||||
|
||||
/// An editable symbol, consists of any number of SymbolParts
|
||||
class Symbol : public SymbolGroup {
|
||||
public:
|
||||
public:
|
||||
/// Actions performed on this symbol and the parts in it
|
||||
ActionStack actions;
|
||||
|
||||
@@ -304,7 +304,7 @@ SymbolP default_symbol();
|
||||
/** To listen to events, derived classes should override onAction(const Action&, bool undone)
|
||||
*/
|
||||
class SymbolView : public ActionListener {
|
||||
public:
|
||||
public:
|
||||
SymbolView();
|
||||
~SymbolView();
|
||||
|
||||
@@ -313,7 +313,7 @@ class SymbolView : public ActionListener {
|
||||
/// Change the symbol that is being viewed
|
||||
void setSymbol(const SymbolP& symbol);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
/// The symbol that is currently being viewed, should not be modified directly!
|
||||
SymbolP symbol;
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ IMPLEMENT_REFLECTION(SymbolFont) {
|
||||
|
||||
/// A symbol in a symbol font
|
||||
class SymbolInFont : public IntrusivePtrBase<SymbolInFont> {
|
||||
public:
|
||||
public:
|
||||
SymbolInFont();
|
||||
|
||||
/// Get a shrunk, zoomed image
|
||||
@@ -89,7 +89,7 @@ class SymbolInFont : public IntrusivePtrBase<SymbolInFont> {
|
||||
double text_margin_right;
|
||||
double text_margin_top;
|
||||
double text_margin_bottom;
|
||||
private:
|
||||
private:
|
||||
ScriptableImage image; ///< The image for this symbol
|
||||
double img_size; ///< Font size used by the image
|
||||
wxSize actual_size; ///< Actual image size, only known after loading the image
|
||||
|
||||
@@ -25,7 +25,7 @@ struct CharInfo;
|
||||
|
||||
/// A font that is drawn using images
|
||||
class SymbolFont : public Packaged {
|
||||
public:
|
||||
public:
|
||||
SymbolFont();
|
||||
~SymbolFont();
|
||||
|
||||
@@ -37,7 +37,7 @@ class SymbolFont : public Packaged {
|
||||
|
||||
/// A symbol to be drawn
|
||||
class DrawableSymbol {
|
||||
public:
|
||||
public:
|
||||
inline DrawableSymbol(const String& text, const String& draw_text, SymbolInFont& symbol)
|
||||
: text(text), draw_text(draw_text), symbol(&symbol)
|
||||
{}
|
||||
@@ -81,7 +81,7 @@ class SymbolFont : public Packaged {
|
||||
/** Return the code representing the symbol */
|
||||
String insertSymbolCode(int menu_id) const;
|
||||
|
||||
private:
|
||||
private:
|
||||
double img_size; ///< Font size that the images use
|
||||
RealSize spacing; ///< Spacing between sybmols (for the default font size)
|
||||
// writing text
|
||||
@@ -102,7 +102,7 @@ class SymbolFont : public Packaged {
|
||||
|
||||
/// Size of a single symbol, including spacing
|
||||
RealSize symbolSize (double font_size, const DrawableSymbol& sym);
|
||||
public:
|
||||
public:
|
||||
/// The default size of symbols, including spacing
|
||||
RealSize defaultSymbolSize(double font_size);
|
||||
|
||||
@@ -120,7 +120,7 @@ enum MenuItemType
|
||||
|
||||
/// Description of a menu to insert symbols from a symbol font into the text
|
||||
class InsertSymbolMenu : public IntrusivePtrBase<InsertSymbolMenu> {
|
||||
public:
|
||||
public:
|
||||
InsertSymbolMenu();
|
||||
|
||||
MenuItemType type;
|
||||
@@ -143,7 +143,7 @@ class InsertSymbolMenu : public IntrusivePtrBase<InsertSymbolMenu> {
|
||||
|
||||
/// A reference to an actual symbol font
|
||||
class SymbolFontRef {
|
||||
public:
|
||||
public:
|
||||
SymbolFontRef();
|
||||
|
||||
// Script update
|
||||
@@ -159,7 +159,7 @@ class SymbolFontRef {
|
||||
Scriptable<Alignment> alignment; ///< Alignment of symbols in a line of text
|
||||
SymbolFontP font; ///< The font, if it is loaded
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_REFLECTION();
|
||||
|
||||
/// (re)load the symbol font based on name
|
||||
|
||||
@@ -20,7 +20,7 @@ DECLARE_POINTER_TYPE(AutoReplace);
|
||||
|
||||
/// A word in a WordList
|
||||
class WordListWord : public IntrusivePtrBase<WordListWord> {
|
||||
public:
|
||||
public:
|
||||
WordListWord();
|
||||
|
||||
String name; ///< Name of the list / the word
|
||||
@@ -36,7 +36,7 @@ class WordListWord : public IntrusivePtrBase<WordListWord> {
|
||||
|
||||
/// A list of words for a drop down box
|
||||
class WordList : public WordListWord {
|
||||
public:
|
||||
public:
|
||||
DECLARE_REFLECTION();
|
||||
};
|
||||
|
||||
@@ -44,7 +44,7 @@ class WordList : public WordListWord {
|
||||
|
||||
/// Autoreplace specific shortcut words
|
||||
class AutoReplace : public IntrusivePtrVirtualBase {
|
||||
public:
|
||||
public:
|
||||
AutoReplace();
|
||||
|
||||
bool enabled;
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ class Rotation;
|
||||
|
||||
/// A bezier curve for evaluation
|
||||
class BezierCurve {
|
||||
public:
|
||||
public:
|
||||
/// coefficients of the equation (x,y) = at^3 + bt^2 + ct + d
|
||||
Vector2D a, b, c, d;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ class Package;
|
||||
/** The actual generation is independend of the script execution
|
||||
*/
|
||||
class GeneratedImage : public ScriptValue, public IntrusiveFromThis<GeneratedImage> {
|
||||
public:
|
||||
public:
|
||||
/// Options for generating the image
|
||||
struct Options {
|
||||
Options(int width = 0, int height = 0, Package* package = nullptr, Package* local_package = nullptr, PreserveAspect preserve_aspect = ASPECT_STRETCH, bool saturate = false)
|
||||
@@ -243,7 +243,7 @@ private:
|
||||
|
||||
/// Flip an image horizontally
|
||||
class FlipImageHorizontal : public SimpleFilterImage {
|
||||
public:
|
||||
public:
|
||||
inline FlipImageHorizontal(const GeneratedImageP& image)
|
||||
: SimpleFilterImage(image)
|
||||
{}
|
||||
@@ -338,7 +338,7 @@ private:
|
||||
|
||||
/// Return a built in image
|
||||
class BuiltInImage : public GeneratedImage {
|
||||
public:
|
||||
public:
|
||||
inline BuiltInImage(const String& name)
|
||||
: name(name)
|
||||
{}
|
||||
|
||||
+2
-2
@@ -145,7 +145,7 @@ void set_alpha(Image& img, double alpha);
|
||||
/** It is created by treating black in the source image as transparent and white (red) as opaque
|
||||
*/
|
||||
class AlphaMask : public IntrusivePtrBase<AlphaMask> {
|
||||
public:
|
||||
public:
|
||||
AlphaMask();
|
||||
AlphaMask(const Image& mask);
|
||||
~AlphaMask();
|
||||
@@ -181,7 +181,7 @@ class AlphaMask : public IntrusivePtrBase<AlphaMask> {
|
||||
/// Is the mask loaded?
|
||||
inline bool isLoaded() const { return alpha; }
|
||||
|
||||
private:
|
||||
private:
|
||||
wxSize size; ///< Size of the mask
|
||||
Byte* alpha; ///< Data of alpha mask
|
||||
mutable int *lefts, *rights; ///< Row sizes
|
||||
|
||||
@@ -38,14 +38,14 @@ private:
|
||||
|
||||
/// A button that changes images on mouseenter/leave
|
||||
class HoverButtonBase : public wxControl {
|
||||
public:
|
||||
public:
|
||||
HoverButtonBase(Window* parent, int id, bool accepts_focus = true);
|
||||
|
||||
virtual bool AcceptsFocus() const;
|
||||
|
||||
virtual void SetHelpText(const String& s) { help_text = s; }
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
const bool accepts_focus;
|
||||
@@ -62,7 +62,7 @@ class HoverButtonBase : public wxControl {
|
||||
void onPaint (wxPaintEvent&);
|
||||
void onEraseBackground(wxEraseEvent&) {}
|
||||
|
||||
protected:
|
||||
protected:
|
||||
bool hover, focus, mouse_down, key_down;
|
||||
String help_text;
|
||||
|
||||
@@ -75,7 +75,7 @@ class HoverButtonBase : public wxControl {
|
||||
|
||||
/// A button that changes images on mouseenter/leave
|
||||
class HoverButton : public HoverButtonBase {
|
||||
public:
|
||||
public:
|
||||
/// Create a HoverButton, name is the resource name of the images to use
|
||||
/** name+"_normal", name+"_hover", name+"_focus", name+"_down"
|
||||
* are the resource names of the images used.
|
||||
@@ -85,7 +85,7 @@ class HoverButton : public HoverButtonBase {
|
||||
/// Load different bitmaps for this button
|
||||
void loadBitmaps(const String& name);
|
||||
|
||||
private:
|
||||
private:
|
||||
String bitmaps; ///< Name of the loaded bitmaps
|
||||
Bitmap bg_normal, bg_hover, bg_focus, bg_down; ///< Bitmaps for the states of the button
|
||||
Color background;
|
||||
@@ -94,7 +94,7 @@ class HoverButton : public HoverButtonBase {
|
||||
|
||||
const Bitmap* last_drawn;
|
||||
const Bitmap* toDraw() const;
|
||||
protected:
|
||||
protected:
|
||||
int drawDelta() const;
|
||||
virtual void refreshIfNeeded();
|
||||
virtual void draw(DC& dc);
|
||||
|
||||
@@ -23,7 +23,7 @@ DECLARE_EVENT_TYPE(EVENT_ITEM_SELECT, <not used>)
|
||||
DEFINE_EVENT_TYPE(EVENT_ITEM_SELECT);
|
||||
|
||||
class AutoReplaceList : public ItemList {
|
||||
public:
|
||||
public:
|
||||
AutoReplaceList(Window* parent, int id, const Game& game);
|
||||
|
||||
/// The items
|
||||
@@ -45,7 +45,7 @@ class AutoReplaceList : public ItemList {
|
||||
|
||||
using ItemList::refreshList;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
/// Get all items
|
||||
virtual void getItems(vector<VoidP>& out) const;
|
||||
/// Return the AutoReplace at the given position in the sorted list
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//| License: GNU General Public License 2 or later (see file COPYING) |
|
||||
//+----------------------------------------------------------------------------+
|
||||
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
// ----------------------------------------------------------------------------- : Includes
|
||||
|
||||
@@ -17,11 +17,11 @@ class AutoReplaceList;
|
||||
|
||||
/// A window for editing the AutoReplace words
|
||||
class AutoReplaceWindow : public wxDialog {
|
||||
public:
|
||||
public:
|
||||
/// Edit auto replace words for the given game
|
||||
AutoReplaceWindow(Window* parent, const Game& game);
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
AutoReplaceList* list;
|
||||
|
||||
@@ -24,7 +24,7 @@ enum ExportCardSelectionType
|
||||
};
|
||||
|
||||
class ExportCardSelectionChoice : public IntrusivePtrBase<ExportCardSelectionChoice> {
|
||||
public:
|
||||
public:
|
||||
ExportCardSelectionChoice();
|
||||
ExportCardSelectionChoice(const Set& set);
|
||||
ExportCardSelectionChoice(const String& label, const vector<CardP>& cards);
|
||||
@@ -40,7 +40,7 @@ typedef vector<ExportCardSelectionChoiceP> ExportCardSelectionChoices;
|
||||
|
||||
/// Base class for export windows, deals with card selection
|
||||
class ExportWindowBase : public wxDialog {
|
||||
public:
|
||||
public:
|
||||
ExportWindowBase(Window* parent, const String& window_title,
|
||||
const SetP& set, const ExportCardSelectionChoices& cards_choices, long style = wxDEFAULT_DIALOG_STYLE);
|
||||
/// Create the controls, return a sizer containing them
|
||||
@@ -49,13 +49,13 @@ class ExportWindowBase : public wxDialog {
|
||||
/// Get the selected cards
|
||||
const vector<CardP>& getSelection() const { return *cards; }
|
||||
|
||||
protected:
|
||||
protected:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
SetP set; ///< Set to export
|
||||
const vector<CardP>* cards; ///< Cards to export
|
||||
|
||||
private:
|
||||
private:
|
||||
ExportCardSelectionChoices cards_choices; ///< Ways to select cards
|
||||
size_t active_choice;
|
||||
wxStaticText* card_count;
|
||||
@@ -72,7 +72,7 @@ class ExportWindowBase : public wxDialog {
|
||||
/** this is used when printing or exporting
|
||||
*/
|
||||
class CardSelectWindow : public wxDialog {
|
||||
public:
|
||||
public:
|
||||
CardSelectWindow(Window* parent, const SetP& set, const String& label, const String& title, bool sizer=true);
|
||||
|
||||
/// Is the given card selected?
|
||||
@@ -82,7 +82,7 @@ class CardSelectWindow : public wxDialog {
|
||||
/// Change which cards are selected
|
||||
void setSelection(const vector<CardP>& cards);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
SelectCardList* list;
|
||||
|
||||
@@ -18,7 +18,7 @@ class FindInfo;
|
||||
|
||||
/// An editor for data values (usually a card)
|
||||
class DataEditor : public CardViewer {
|
||||
public:
|
||||
public:
|
||||
DataEditor(Window* parent, int id, long style = wxBORDER_THEME);
|
||||
|
||||
// --------------------------------------------------- : Utility for ValueViewers/Editors
|
||||
@@ -88,7 +88,7 @@ class DataEditor : public CardViewer {
|
||||
|
||||
// --------------------------------------------------- : ValueViewers
|
||||
|
||||
protected:
|
||||
protected:
|
||||
/// Create an editor for the given style (as opposed to a normal viewer)
|
||||
virtual ValueViewerP makeViewer(const StyleP&);
|
||||
|
||||
@@ -100,7 +100,7 @@ class DataEditor : public CardViewer {
|
||||
ValueViewer* hovered_viewer; ///< The editor under the mouse cursor
|
||||
vector<ValueViewer*> viewers_in_search_order; ///< The editable viewers, sorted by tab index, for find/replace
|
||||
|
||||
private:
|
||||
private:
|
||||
// --------------------------------------------------- : Events
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ struct CardSelectEvent : public wxCommandEvent {
|
||||
CardP getCard() const;
|
||||
/// All focused cards
|
||||
void getSelection(vector<CardP>& out) const;
|
||||
private:
|
||||
private:
|
||||
CardListBase* getTheCardList() const;
|
||||
};
|
||||
|
||||
@@ -58,7 +58,7 @@ struct CardSelectEvent : public wxCommandEvent {
|
||||
* (size_t) index refers to the index in the actual card list.
|
||||
*/
|
||||
class CardListBase : public ItemList, public SetView {
|
||||
public:
|
||||
public:
|
||||
CardListBase(Window* parent, int id, long additional_style = 0);
|
||||
~CardListBase();
|
||||
|
||||
@@ -85,12 +85,12 @@ class CardListBase : public ItemList, public SetView {
|
||||
virtual void onAction(const Action&, bool undone);
|
||||
|
||||
// --------------------------------------------------- : The cards
|
||||
public:
|
||||
public:
|
||||
/// Return the card at the given position in the sorted card list
|
||||
inline CardP getCard(long pos) const { return static_pointer_cast<Card>(getItem(pos)); }
|
||||
/// Get a list of all focused cards
|
||||
void getSelection(vector<CardP>& out) const;
|
||||
protected:
|
||||
protected:
|
||||
/// Get a list of all cards
|
||||
virtual void getItems(vector<VoidP>& out) const;
|
||||
|
||||
@@ -121,17 +121,17 @@ class CardListBase : public ItemList, public SetView {
|
||||
virtual wxListItemAttr* OnGetItemAttr(long pos) const;
|
||||
|
||||
// --------------------------------------------------- : Data
|
||||
private:
|
||||
private:
|
||||
// display stuff
|
||||
vector<FieldP> column_fields; ///< The field to use for each column (by column index)
|
||||
FieldP alternate_sort_field; ///< Second field to sort by, if the column doesn't suffice
|
||||
|
||||
mutable wxListItemAttr item_attr; // for OnGetItemAttr
|
||||
|
||||
public:
|
||||
public:
|
||||
/// Open a dialog for selecting columns to be shown
|
||||
void selectColumns();
|
||||
private:
|
||||
private:
|
||||
/// Store the column sizes in the settings
|
||||
void storeColumns();
|
||||
/// All card lists; used to exchange column sizes
|
||||
|
||||
@@ -25,10 +25,10 @@ DECLARE_POINTER_TYPE(Field);
|
||||
* <ok> <cancel>
|
||||
*/
|
||||
class CardListColumnSelectDialog : public wxDialog {
|
||||
public:
|
||||
public:
|
||||
CardListColumnSelectDialog(Window* parent, const GameP& game);
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
// gui items
|
||||
|
||||
@@ -115,7 +115,7 @@ bool CardViewer::shouldDraw(const ValueViewer& v) const {
|
||||
|
||||
// helper class for overdrawDC()
|
||||
class CardViewer::OverdrawDC_aux : private wxClientDC {
|
||||
protected:
|
||||
protected:
|
||||
wxBufferedDC bufferedDC;
|
||||
|
||||
OverdrawDC_aux(CardViewer* window)
|
||||
@@ -125,7 +125,7 @@ class CardViewer::OverdrawDC_aux : private wxClientDC {
|
||||
}
|
||||
};
|
||||
class CardViewer::OverdrawDC : private OverdrawDC_aux, public RotatedDC {
|
||||
public:
|
||||
public:
|
||||
OverdrawDC(CardViewer* window)
|
||||
: OverdrawDC_aux(window)
|
||||
, RotatedDC(bufferedDC, window->getRotation(), QUALITY_LOW)
|
||||
|
||||
@@ -22,7 +22,7 @@ DECLARE_LOCAL_EVENT_TYPE(EVENT_SIZE_CHANGE, <not used>)
|
||||
|
||||
/// A control to view a single card
|
||||
class CardViewer : public wxControl, public DataViewer {
|
||||
public:
|
||||
public:
|
||||
CardViewer(Window* parent, int id, long style = wxBORDER_THEME);
|
||||
|
||||
/// Get a dc to draw on the card outside onPaint
|
||||
@@ -39,7 +39,7 @@ class CardViewer : public wxControl, public DataViewer {
|
||||
|
||||
virtual bool AcceptsFocus() const { return false; }
|
||||
|
||||
protected:
|
||||
protected:
|
||||
/// Return the desired size of control
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
@@ -51,7 +51,7 @@ class CardViewer : public wxControl, public DataViewer {
|
||||
|
||||
virtual void drawViewer(RotatedDC& dc, ValueViewer& v);
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
void onEraseBackground(wxEraseEvent&) {}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
/// A drop down list of recent choices, for autocomplete
|
||||
class DropDownMRUList : public DropDownList {
|
||||
public:
|
||||
public:
|
||||
DropDownMRUList(Window* parent, vector<String> const& choices)
|
||||
: DropDownList(parent)
|
||||
, choices(choices)
|
||||
@@ -23,7 +23,7 @@ class DropDownMRUList : public DropDownList {
|
||||
|
||||
vector<String> choices;
|
||||
|
||||
protected:
|
||||
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); }
|
||||
@@ -34,7 +34,7 @@ class DropDownMRUList : public DropDownList {
|
||||
|
||||
/// Text control that forwards focus events to the parent
|
||||
class TextCtrlWithFocus : public wxTextCtrl {
|
||||
public:
|
||||
public:
|
||||
DECLARE_EVENT_TABLE();
|
||||
void forwardFocusEvent(wxFocusEvent&);
|
||||
void forwardKeyEvent(wxKeyEvent&);
|
||||
|
||||
@@ -18,7 +18,7 @@ class TextCtrlWithFocus;
|
||||
|
||||
/// A search/filter textbox
|
||||
class FilterCtrl : public wxControl {
|
||||
public:
|
||||
public:
|
||||
FilterCtrl(wxWindow* parent, int id, String const& placeholder);
|
||||
|
||||
/// Set the filter text
|
||||
@@ -36,7 +36,7 @@ class FilterCtrl : public wxControl {
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
bool changing;
|
||||
String value;
|
||||
|
||||
@@ -18,13 +18,13 @@ typedef intrusive_ptr<Filter<Card> > CardListFilterP;
|
||||
|
||||
/// A card list that lists a subset of the cards in the set
|
||||
class FilteredCardList : public CardListBase {
|
||||
public:
|
||||
public:
|
||||
FilteredCardList(Window* parent, int id, long additional_style = 0);
|
||||
|
||||
/// Change the filter to use
|
||||
void setFilter(const CardListFilterP& filter);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
/// Get only the subset of the cards
|
||||
virtual void getItems(vector<VoidP>& out) const;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ DECLARE_LOCAL_EVENT_TYPE(EVENT_GALLERY_ACTIVATE, <not used>)
|
||||
/** A derived class should implement the abstract members to determine how the items look.
|
||||
*/
|
||||
class GalleryList : public wxPanel {
|
||||
public:
|
||||
public:
|
||||
GalleryList(Window* parent, int id, int direction = wxHORIZONTAL, bool always_focused = true);
|
||||
|
||||
/// Select the given column
|
||||
@@ -49,7 +49,7 @@ class GalleryList : public wxPanel {
|
||||
/// Redraw only the selected items
|
||||
void RefreshSelection();
|
||||
|
||||
protected:
|
||||
protected:
|
||||
static const size_t NO_SELECTION = (size_t)-1;
|
||||
size_t active_subcolumn; ///< The active subcolumn
|
||||
wxSize item_size; ///< The total size of a single item (over all columns)
|
||||
@@ -82,7 +82,7 @@ class GalleryList : public wxPanel {
|
||||
};
|
||||
vector<SubColumn> subcolumns;
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
void onLeftDown (wxMouseEvent& ev);
|
||||
@@ -126,9 +126,9 @@ class GalleryList : public wxPanel {
|
||||
return direction == wxHORIZONTAL ? s.x : s.y;
|
||||
}
|
||||
|
||||
public:
|
||||
public:
|
||||
typedef SubColumn SubColumn_for_typeof;
|
||||
protected:
|
||||
protected:
|
||||
/// Send an event
|
||||
void sendEvent(WXTYPE type);
|
||||
|
||||
|
||||
+33
-33
@@ -30,7 +30,7 @@ DECLARE_LOCAL_EVENT_TYPE(EVENT_GRAPH_SELECT, <not used>)
|
||||
/// A group in a table or graph
|
||||
/** A group is rendered as a single bar or pie slice */
|
||||
class GraphGroup : public IntrusivePtrBase<GraphGroup> {
|
||||
public:
|
||||
public:
|
||||
GraphGroup(const String& name, UInt size, const Color& color = *wxBLACK)
|
||||
: name(name), color(color), size(size)
|
||||
{}
|
||||
@@ -50,7 +50,7 @@ enum AutoColor
|
||||
/// An axis in a graph, consists of a list of groups
|
||||
/** The sum of groups.sum = sum of all elements in the data */
|
||||
class GraphAxis : public IntrusivePtrBase<GraphAxis> {
|
||||
public:
|
||||
public:
|
||||
GraphAxis(const String& name, AutoColor auto_color = AUTO_COLOR_EVEN, bool numeric = false, double bin_size = 0, const map<String,Color>* colors = nullptr, const vector<String>* order = nullptr)
|
||||
: name(name)
|
||||
, auto_color(auto_color)
|
||||
@@ -80,7 +80,7 @@ class GraphAxis : public IntrusivePtrBase<GraphAxis> {
|
||||
|
||||
/// A single data point of a graph
|
||||
class GraphElement : public IntrusivePtrBase<GraphElement> {
|
||||
public:
|
||||
public:
|
||||
GraphElement(size_t original_index) : original_index(original_index) {}
|
||||
|
||||
size_t original_index; ///< Corresponding index in the original input
|
||||
@@ -89,7 +89,7 @@ class GraphElement : public IntrusivePtrBase<GraphElement> {
|
||||
|
||||
/// Data to be displayed in a graph, not processed yet
|
||||
class GraphDataPre {
|
||||
public:
|
||||
public:
|
||||
vector<GraphAxisP> axes;
|
||||
vector<GraphElementP> elements;
|
||||
/// Split compound elements, "a,b,c" -> "a" and "b" and "c"
|
||||
@@ -104,7 +104,7 @@ struct GraphDataElement {
|
||||
|
||||
/// Data to be displayed in a graph
|
||||
class GraphData : public IntrusivePtrBase<GraphData> {
|
||||
public:
|
||||
public:
|
||||
GraphData(const GraphDataPre&);
|
||||
~GraphData();
|
||||
|
||||
@@ -136,7 +136,7 @@ enum DrawLayer
|
||||
/// A type of graph
|
||||
/** It is rendered into a sub-rectangle of the screen */
|
||||
class Graph : public IntrusivePtrVirtualBase {
|
||||
public:
|
||||
public:
|
||||
/// Determine the size of this graph viewer, return -1 if the viewer stretches
|
||||
virtual RealSize determineSize(RotatedDC& dc) const { return RealSize(-1,-1); }
|
||||
/// Draw this graph, filling the internalRect() of the dc.
|
||||
@@ -148,19 +148,19 @@ class Graph : public IntrusivePtrVirtualBase {
|
||||
/// Get the data
|
||||
inline const GraphDataP& getData() const { return data; }
|
||||
|
||||
protected:
|
||||
protected:
|
||||
/// Data of the graph
|
||||
GraphDataP data;
|
||||
};
|
||||
|
||||
/// Base class for 1 dimensional graph components
|
||||
class Graph1D : public Graph {
|
||||
public:
|
||||
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);
|
||||
protected:
|
||||
protected:
|
||||
size_t axis;
|
||||
/// Find an item, return the position along the axis, or -1 if not found
|
||||
virtual int findItem(const RealPoint& pos, const RealRect& screen_rect, bool tight) const { return -1; }
|
||||
@@ -170,10 +170,10 @@ class Graph1D : public Graph {
|
||||
|
||||
/// Base class for 2 dimensional graph components
|
||||
class Graph2D : public Graph {
|
||||
public:
|
||||
public:
|
||||
inline Graph2D(size_t axis1, size_t axis2) : axis1(axis1), axis2(axis2) {}
|
||||
virtual void setData(const GraphDataP& d);
|
||||
protected:
|
||||
protected:
|
||||
size_t axis1, axis2;
|
||||
vector<UInt> values; // axis1.size * axis2.size array
|
||||
inline GraphAxis& axis1_data() const { return *data->axes.at(axis1); }
|
||||
@@ -182,7 +182,7 @@ class Graph2D : public Graph {
|
||||
|
||||
/// A bar graph
|
||||
class BarGraph : public Graph1D {
|
||||
public:
|
||||
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;
|
||||
@@ -190,7 +190,7 @@ class BarGraph : public Graph1D {
|
||||
|
||||
// A bar graph with stacked bars
|
||||
class BarGraph2D : public Graph2D {
|
||||
public:
|
||||
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;
|
||||
@@ -198,7 +198,7 @@ class BarGraph2D : public Graph2D {
|
||||
|
||||
/// A pie graph
|
||||
class PieGraph : public Graph1D {
|
||||
public:
|
||||
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;
|
||||
@@ -206,12 +206,12 @@ class PieGraph : public Graph1D {
|
||||
|
||||
/// A scatter plot
|
||||
class ScatterGraph : public Graph2D {
|
||||
public:
|
||||
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);
|
||||
protected:
|
||||
protected:
|
||||
UInt max_value;
|
||||
double max_value_x, max_value_y; ///< highest sum of two adjacent scaled values (radii)
|
||||
static double scale(double x); ///< nonlinear scaling
|
||||
@@ -219,10 +219,10 @@ class ScatterGraph : public Graph2D {
|
||||
|
||||
/// A scatter plot with an extra dimension
|
||||
class ScatterGraphPlus : public ScatterGraph {
|
||||
public:
|
||||
public:
|
||||
inline ScatterGraphPlus(size_t axis1, size_t axis2, size_t axis3) : ScatterGraph(axis1, axis2), axis3(axis3) {}
|
||||
virtual void setData(const GraphDataP& d);
|
||||
protected:
|
||||
protected:
|
||||
size_t axis3;
|
||||
vector<UInt> values3D; // axis1.size * axis2.size * axis3.size array
|
||||
inline GraphAxis& axis3_data() const { return *data->axes.at(axis3); }
|
||||
@@ -230,21 +230,21 @@ class ScatterGraphPlus : public ScatterGraph {
|
||||
|
||||
/// A scatter plot with a pie graph for the third dimension
|
||||
class ScatterPieGraph : public ScatterGraphPlus {
|
||||
public:
|
||||
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;
|
||||
};
|
||||
|
||||
/// The legend, used for pie graphs
|
||||
class GraphLegend : public Graph1D {
|
||||
public:
|
||||
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;
|
||||
private:
|
||||
private:
|
||||
mutable RealSize size, item_size;
|
||||
Alignment alignment;
|
||||
bool reverse;
|
||||
@@ -252,14 +252,14 @@ class GraphLegend : public Graph1D {
|
||||
|
||||
/// Simple statistics like the mean
|
||||
class GraphStats : public Graph1D {
|
||||
public:
|
||||
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);
|
||||
private:
|
||||
private:
|
||||
mutable RealSize size, item_size;
|
||||
mutable double label_width;
|
||||
Alignment alignment;
|
||||
@@ -277,13 +277,13 @@ enum DrawLines
|
||||
|
||||
/// Draws a horizontal/vertical axis for group labels
|
||||
class GraphLabelAxis : public Graph1D {
|
||||
public:
|
||||
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;
|
||||
private:
|
||||
private:
|
||||
Direction direction;
|
||||
int levels;
|
||||
bool rotate;
|
||||
@@ -293,16 +293,16 @@ class GraphLabelAxis : public Graph1D {
|
||||
|
||||
/// Draws an a vertical axis for counts
|
||||
class GraphValueAxis : public Graph1D {
|
||||
public:
|
||||
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;
|
||||
private:
|
||||
private:
|
||||
bool highlight_value;
|
||||
};
|
||||
|
||||
/// A graph with margins
|
||||
class GraphWithMargins : public Graph {
|
||||
public:
|
||||
public:
|
||||
inline GraphWithMargins(const GraphP& graph,
|
||||
double margin_left, double margin_top, double margin_right, double margin_bottom,
|
||||
bool upside_down = false)
|
||||
@@ -313,7 +313,7 @@ class GraphWithMargins : public Graph {
|
||||
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);
|
||||
private:
|
||||
private:
|
||||
const GraphP graph;
|
||||
double margin_left, margin_top, margin_right, margin_bottom;
|
||||
bool upside_down; // put the coordinate system upside down, since graphs are usually bottom-to-top
|
||||
@@ -321,13 +321,13 @@ class GraphWithMargins : public Graph {
|
||||
|
||||
/// A display containing multiple graphs
|
||||
class GraphContainer : public Graph {
|
||||
public:
|
||||
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 add(const GraphP& graph);
|
||||
private:
|
||||
private:
|
||||
vector<GraphP> items;
|
||||
};
|
||||
|
||||
@@ -335,7 +335,7 @@ class GraphContainer : public Graph {
|
||||
|
||||
/// A control showing statistics in a graphical form
|
||||
class GraphControl : public wxControl {
|
||||
public:
|
||||
public:
|
||||
/// Create a graph control
|
||||
GraphControl(Window* parent, int id);
|
||||
|
||||
@@ -360,7 +360,7 @@ class GraphControl : public wxControl {
|
||||
/// Get the current dimensionality
|
||||
size_t getDimensionality() const;
|
||||
|
||||
private:
|
||||
private:
|
||||
/// Graph object
|
||||
GraphP graph;
|
||||
GraphType layout; /// < The current layout
|
||||
|
||||
@@ -49,7 +49,7 @@ ImageFieldP ImageCardList::findImageField() {
|
||||
|
||||
/// A request for a thumbnail of a card image
|
||||
class CardThumbnailRequest : public ThumbnailRequest {
|
||||
public:
|
||||
public:
|
||||
CardThumbnailRequest(ImageCardList* parent, const LocalFileName& filename)
|
||||
: ThumbnailRequest(
|
||||
parent,
|
||||
|
||||
@@ -19,15 +19,15 @@ DECLARE_POINTER_TYPE(ImageField);
|
||||
/// A card list that allows the shows thumbnails of card images
|
||||
/** This card list also allows the list to be modified */
|
||||
class ImageCardList : public CardListBase {
|
||||
public:
|
||||
public:
|
||||
~ImageCardList();
|
||||
ImageCardList(Window* parent, int id, long additional_style = 0);
|
||||
protected:
|
||||
protected:
|
||||
virtual int OnGetItemImage(long pos) const;
|
||||
virtual void onRebuild();
|
||||
virtual void onBeforeChangeSet();
|
||||
virtual bool allowModify() const { return true; }
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
void onIdle(wxIdleEvent&);
|
||||
|
||||
@@ -42,13 +42,13 @@ class ImageCardList : public CardListBase {
|
||||
// ----------------------------------------------------------------------------- : FilteredImageCardList
|
||||
|
||||
class FilteredImageCardList : public ImageCardList {
|
||||
public:
|
||||
public:
|
||||
FilteredImageCardList(Window* parent, int id, long additional_style = 0);
|
||||
|
||||
/// Change the filter to use, if null then don't use a filter
|
||||
void setFilter(const CardListFilterP& filter);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
/// Get only the subset of the cards
|
||||
virtual void getItems(vector<VoidP>& out) const;
|
||||
virtual void onChangeSet();
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* TODO: This is reverse of normal
|
||||
*/
|
||||
class ItemList : public wxListView {
|
||||
public:
|
||||
public:
|
||||
ItemList(Window* parent, int id, long additional_style = 0, bool multi_sel = false);
|
||||
|
||||
// --------------------------------------------------- : Selection
|
||||
@@ -56,7 +56,7 @@ class ItemList : public wxListView {
|
||||
virtual bool doDelete() { return false; }
|
||||
|
||||
// --------------------------------------------------- : Virtual interface
|
||||
protected:
|
||||
protected:
|
||||
/// Get a list of all items
|
||||
virtual void getItems(vector<VoidP>& out) const = 0;
|
||||
|
||||
@@ -108,7 +108,7 @@ class ItemList : public wxListView {
|
||||
bool sort_ascending; ///< Sort order
|
||||
vector<VoidP> sorted_list; ///< Sorted list of items, can be considered a map: pos->item
|
||||
|
||||
private:
|
||||
private:
|
||||
struct ItemComparer; // for comparing items
|
||||
|
||||
// --------------------------------------------------- : Window events
|
||||
|
||||
@@ -37,7 +37,7 @@ struct KeywordSelectEvent : public wxCommandEvent {
|
||||
|
||||
/// A control that lists the keywords in a set and its game
|
||||
class KeywordList : public ItemList, public SetView {
|
||||
public:
|
||||
public:
|
||||
KeywordList(Window* parent, int id, long additional_style = 0);
|
||||
~KeywordList();
|
||||
|
||||
@@ -68,7 +68,7 @@ class KeywordList : public ItemList, public SetView {
|
||||
bool doDelete();
|
||||
|
||||
// --------------------------------------------------- : The keywords
|
||||
protected:
|
||||
protected:
|
||||
/// Get a list of all keywords
|
||||
virtual void getItems(vector<VoidP>& out) const;
|
||||
/// Return the keyword at the given position in the sorted keyword list
|
||||
@@ -88,7 +88,7 @@ class KeywordList : public ItemList, public SetView {
|
||||
/// Get the color for an item
|
||||
virtual wxListItemAttr* OnGetItemAttr(long pos) const;
|
||||
|
||||
private:
|
||||
private:
|
||||
void storeColumns();
|
||||
|
||||
mutable wxListItemAttr item_attr; // for OnGetItemAttr
|
||||
|
||||
@@ -17,7 +17,7 @@ DECLARE_POINTER_TYPE(ExportTemplate);
|
||||
|
||||
/// A data editor with a platform native look
|
||||
class NativeLookEditor : public DataEditor {
|
||||
public:
|
||||
public:
|
||||
NativeLookEditor(Window* parent, int id, long style = wxBORDER_THEME);
|
||||
|
||||
/// Uses a native look
|
||||
@@ -27,12 +27,12 @@ class NativeLookEditor : public DataEditor {
|
||||
virtual void draw(DC& dc);
|
||||
virtual void drawViewer(RotatedDC& dc, ValueViewer& v);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
// Best size doesn't really matter, as long as it is not too small
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
virtual void onInit();
|
||||
|
||||
private:
|
||||
private:
|
||||
static const int margin = 6;
|
||||
static const int margin_left = 4;
|
||||
static const int vspace = 10;
|
||||
@@ -54,11 +54,11 @@ class NativeLookEditor : public DataEditor {
|
||||
|
||||
/// Editor for set.data
|
||||
class SetInfoEditor : public NativeLookEditor {
|
||||
public:
|
||||
public:
|
||||
SetInfoEditor(Window* parent, int id, long style = wxBORDER_THEME);
|
||||
|
||||
virtual Package& getStylePackage() const;
|
||||
protected:
|
||||
protected:
|
||||
virtual void onChangeSet();
|
||||
};
|
||||
|
||||
@@ -66,14 +66,14 @@ class SetInfoEditor : public NativeLookEditor {
|
||||
|
||||
/// Editor for styling data
|
||||
class StylingEditor : public NativeLookEditor {
|
||||
public:
|
||||
public:
|
||||
StylingEditor(Window* parent, int id, long style = wxBORDER_THEME);
|
||||
|
||||
/// Show the styling for given stylesheet in the editor
|
||||
void showStylesheet(const StyleSheetP& stylesheet);
|
||||
/// Show the styling for given card
|
||||
void showCard(const CardP& card);
|
||||
protected:
|
||||
protected:
|
||||
virtual void onChangeSet();
|
||||
};
|
||||
|
||||
@@ -81,14 +81,14 @@ class StylingEditor : public NativeLookEditor {
|
||||
|
||||
/// Editor for export options
|
||||
class ExportOptionsEditor : public NativeLookEditor {
|
||||
public:
|
||||
public:
|
||||
ExportOptionsEditor(Window* parent, int id, long style = wxBORDER_THEME);
|
||||
|
||||
/// Show the options for given export template
|
||||
void showExport(const ExportTemplateP& export_template);
|
||||
|
||||
virtual Package& getStylePackage() const;
|
||||
private:
|
||||
private:
|
||||
ExportTemplateP export_template;
|
||||
};
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ DECLARE_POINTER_TYPE(Packaged);
|
||||
|
||||
/// A list of Packages of a specific type
|
||||
class PackageList : public GalleryList {
|
||||
public:
|
||||
public:
|
||||
PackageList(Window* parent, int id, int direction = wxHORIZONTAL, bool always_focused = true);
|
||||
|
||||
/// Shows packages that match a specific patern, and that are of the given type
|
||||
@@ -51,13 +51,13 @@ class PackageList : public GalleryList {
|
||||
int requiredWidth() const;
|
||||
using GalleryList::column_count;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
/// Draw an item
|
||||
virtual void drawItem(DC& dc, int x, int y, size_t item);
|
||||
/// Return how many items there are in the list
|
||||
virtual size_t itemCount() const;
|
||||
|
||||
private:
|
||||
private:
|
||||
// The default icon to use
|
||||
// wxIcon default_icon;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
/// A card list with check boxes
|
||||
class SelectCardList : public CardListBase {
|
||||
public:
|
||||
public:
|
||||
SelectCardList(Window* parent, int id, long additional_style = 0);
|
||||
~SelectCardList();
|
||||
/// Select all cards
|
||||
@@ -30,10 +30,10 @@ class SelectCardList : public CardListBase {
|
||||
/// Change which cards are selected
|
||||
void setSelection(const vector<CardP>& cards);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
virtual int OnGetItemImage(long pos) const;
|
||||
virtual void onChangeSet();
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
std::set<CardP> selected; ///< which cards are selected?
|
||||
|
||||
@@ -27,7 +27,7 @@ DECLARE_POINTER_TYPE(FakeTextValue);
|
||||
* 2. Ignore the problem, it will not happen in practice
|
||||
*/
|
||||
class TextCtrl : public DataEditor {
|
||||
public:
|
||||
public:
|
||||
TextCtrl(Window* parent, int id, bool multi_line, long style = wxBORDER_THEME);
|
||||
~TextCtrl();
|
||||
|
||||
@@ -57,11 +57,11 @@ class TextCtrl : public DataEditor {
|
||||
|
||||
virtual void onChangeSet();
|
||||
|
||||
protected:
|
||||
protected:
|
||||
virtual void onInit();
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
private:
|
||||
private:
|
||||
bool multi_line; ///< Multi line text control?
|
||||
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
/// A combination of a TreeCtrl and a ListCtrl. A tree with multiple columns.
|
||||
class TreeList : public wxPanel {
|
||||
public:
|
||||
public:
|
||||
TreeList(Window* parent, int id, long style = wxBORDER_THEME);
|
||||
|
||||
/// Expand/collapse an item
|
||||
@@ -28,8 +28,7 @@ class TreeList : public wxPanel {
|
||||
/// (re)build the list
|
||||
void rebuild(bool full = true);
|
||||
|
||||
public:
|
||||
|
||||
public:
|
||||
/// An item in the tree list
|
||||
class Item : public IntrusivePtrBase<Item> {
|
||||
public:
|
||||
@@ -47,7 +46,7 @@ class TreeList : public wxPanel {
|
||||
};
|
||||
typedef intrusive_ptr<Item> ItemP;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
|
||||
/// The items in the tree list
|
||||
vector<ItemP> items;
|
||||
@@ -72,7 +71,7 @@ class TreeList : public wxPanel {
|
||||
static const int header_height = 17;
|
||||
static const int level_width = 17;
|
||||
|
||||
private:
|
||||
private:
|
||||
size_t total_lines; // number of shown items
|
||||
size_t first_line; // first visible line
|
||||
size_t visible_lines; // number of (partially) visible lines
|
||||
|
||||
@@ -20,10 +20,10 @@
|
||||
|
||||
// Class that intercepts all events not directed to a DropDownList, and closes the list
|
||||
class DropDownHider : public wxEvtHandler {
|
||||
public:
|
||||
public:
|
||||
DropDownHider(DropDownList& list) : list(list) {}
|
||||
|
||||
private:
|
||||
private:
|
||||
DropDownList& list;
|
||||
|
||||
virtual bool ProcessEvent(wxEvent& ev) {
|
||||
|
||||
@@ -18,10 +18,10 @@ DECLARE_POINTER_TYPE(Set);
|
||||
// ----------------------------------------------------------------------------- : HtmlExportWindow
|
||||
|
||||
class HtmlExportWindow : public ExportWindowBase {
|
||||
public:
|
||||
public:
|
||||
HtmlExportWindow(Window* parent, const SetP& set, const ExportCardSelectionChoices& cards_choices);
|
||||
|
||||
private:
|
||||
private:
|
||||
PackageList* list; ///< List of templates
|
||||
ExportOptionsEditor* options; ///< Editor for template options
|
||||
SetP set; ///< Set to export
|
||||
|
||||
@@ -27,7 +27,7 @@ enum PreferedProperty
|
||||
|
||||
/// A slice of an image, i.e. a selected rectangle
|
||||
class ImageSlice {
|
||||
public:
|
||||
public:
|
||||
ImageSlice(const Image& source, const wxSize& target_size);
|
||||
|
||||
Image source; ///< The source image
|
||||
@@ -57,14 +57,14 @@ class ImageSlice {
|
||||
|
||||
/// Dialog for selecting a slice of an image
|
||||
class ImageSliceWindow : public wxDialog {
|
||||
public:
|
||||
public:
|
||||
ImageSliceWindow(Window* parent, const Image& source, const wxSize& target_size, const AlphaMask& target_mask);
|
||||
|
||||
/// Return the sliced image
|
||||
Image getImage() const;
|
||||
|
||||
// --------------------------------------------------- : Data
|
||||
private:
|
||||
private:
|
||||
// The slice we are extracting
|
||||
ImageSlice slice;
|
||||
// Gui items
|
||||
@@ -114,14 +114,14 @@ class ImageSliceWindow : public wxDialog {
|
||||
|
||||
/// A preview of the sliced image
|
||||
class ImageSlicePreview : public wxControl {
|
||||
public:
|
||||
public:
|
||||
ImageSlicePreview(Window* parent, int id, ImageSlice& slice, const AlphaMask& mask);
|
||||
|
||||
/// Notify that the slice was updated
|
||||
void update();
|
||||
|
||||
// --------------------------------------------------- : Data
|
||||
private:
|
||||
private:
|
||||
Bitmap bitmap;
|
||||
ImageSlice& slice;
|
||||
const AlphaMask& mask;
|
||||
@@ -149,14 +149,14 @@ class ImageSlicePreview : public wxControl {
|
||||
|
||||
// A overview of the slicing of the image, allows to select the sliced area
|
||||
class ImageSliceSelector : public wxControl {
|
||||
public:
|
||||
public:
|
||||
ImageSliceSelector(Window* parent, int id, ImageSlice& slice);
|
||||
|
||||
/// Notify that the slice was updated
|
||||
void update();
|
||||
|
||||
// --------------------------------------------------- : Data
|
||||
private:
|
||||
private:
|
||||
ImageSlice& slice;
|
||||
Bitmap bitmap, bitmap_no_sel; ///< Bitmaps showing selection
|
||||
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
|
||||
/// A window for selecting a subset of the cards from a set to export to images
|
||||
class ImagesExportWindow : public ExportWindowBase {
|
||||
public:
|
||||
public:
|
||||
ImagesExportWindow(Window* parent, const SetP& set, const ExportCardSelectionChoices& choices);
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
void onOk(wxCommandEvent&);
|
||||
|
||||
@@ -22,14 +22,14 @@ SetP new_set_window(Window* parent);
|
||||
|
||||
/// "Create a new set" dialog. First select game, then matching style.
|
||||
class NewSetWindow : public wxDialog {
|
||||
public:
|
||||
public:
|
||||
/// The newly created set, if any
|
||||
SetP set;
|
||||
|
||||
NewSetWindow(Window* parent);
|
||||
|
||||
// --------------------------------------------------- : data
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
// gui items
|
||||
@@ -59,14 +59,14 @@ StyleSheetP select_stylesheet(const Game& game, const String& failed_name);
|
||||
|
||||
/// "Create a new set" dialog. First select game, then matching style.
|
||||
class SelectStyleSheetWindow : public wxDialog {
|
||||
public:
|
||||
public:
|
||||
/// The selected stylesheet, if any
|
||||
StyleSheetP stylesheet;
|
||||
|
||||
SelectStyleSheetWindow(Window* parent, const Game& game, const String& failed_name);
|
||||
|
||||
// --------------------------------------------------- : data
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
const Game& game;
|
||||
|
||||
@@ -119,7 +119,7 @@ void PackageUpdateList::TreeItem::setIcon(const Image& img) {
|
||||
/// wx doesn't allow seeking on InputStreams from a wxURL
|
||||
/// The built in buffer class is too stupid to seek, so we must do it ourselfs
|
||||
class SeekAtStartInputStream : public wxFilterInputStream {
|
||||
public:
|
||||
public:
|
||||
SeekAtStartInputStream(wxInputStream& stream)
|
||||
: wxFilterInputStream(stream)
|
||||
, buffer_pos(0)
|
||||
@@ -129,33 +129,33 @@ class SeekAtStartInputStream : public wxFilterInputStream {
|
||||
}
|
||||
|
||||
bool IsSeekable() const { return true; }
|
||||
protected:
|
||||
virtual size_t OnSysRead(void *buffer, size_t bufsize) {
|
||||
protected:
|
||||
virtual size_t OnSysRead(void *buffer, size_t bufsize) {
|
||||
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) {
|
||||
return m_parent_i_stream->LastRead() + len;
|
||||
}
|
||||
virtual wxFileOffset OnSysSeek(wxFileOffset seek, wxSeekMode mode) {
|
||||
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 {
|
||||
}
|
||||
virtual wxFileOffset OnSysTell() const {
|
||||
assert(buffer_pos < buffer_size);
|
||||
return buffer_pos;
|
||||
}
|
||||
private:
|
||||
}
|
||||
private:
|
||||
size_t buffer_size, buffer_pos;
|
||||
Byte buffer[1024];
|
||||
};
|
||||
|
||||
/// Retrieve the icon for a package
|
||||
class PackageIconRequest : public ThumbnailRequest {
|
||||
public:
|
||||
public:
|
||||
PackageIconRequest(PackageUpdateList* list, PackageUpdateList::TreeItem* ti)
|
||||
: ThumbnailRequest(
|
||||
list,
|
||||
@@ -177,7 +177,7 @@ class PackageIconRequest : public ThumbnailRequest {
|
||||
ti->setIcon(image);
|
||||
list->Refresh(false);
|
||||
}
|
||||
private:
|
||||
private:
|
||||
PackageUpdateList* list;
|
||||
PackageUpdateList::TreeItem* ti;
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
/// A list of installed and downloadable packages
|
||||
class PackageUpdateList : public TreeList {
|
||||
public:
|
||||
public:
|
||||
PackageUpdateList(Window* parent, const InstallablePackages& packages, bool show_only_installable, int id = wxID_ANY);
|
||||
~PackageUpdateList();
|
||||
|
||||
@@ -28,7 +28,7 @@ class PackageUpdateList : public TreeList {
|
||||
return static_pointer_cast<TreeItem>(items[item])->package;
|
||||
}
|
||||
|
||||
protected:
|
||||
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;
|
||||
@@ -37,18 +37,18 @@ class PackageUpdateList : public TreeList {
|
||||
virtual String columnText(size_t column) const;
|
||||
virtual int columnWidth(size_t column) const;
|
||||
|
||||
private:
|
||||
private:
|
||||
/// The list of packages we are displaying
|
||||
const InstallablePackages& packages;
|
||||
/// Show only packages with an installer?
|
||||
bool show_only_installable;
|
||||
|
||||
class TreeItem;
|
||||
public:
|
||||
public:
|
||||
typedef intrusive_ptr<TreeItem> TreeItemP;
|
||||
private:
|
||||
private:
|
||||
class TreeItem : public Item {
|
||||
public:
|
||||
public:
|
||||
TreeItem() : position_type(TYPE_OTHER), position_hint(1000000) {}
|
||||
String label;
|
||||
vector<TreeItemP> children;
|
||||
|
||||
@@ -44,7 +44,7 @@ struct HtmlWindowToBrowser : public wxHtmlWindow {
|
||||
|
||||
/// Handle downloading of installers
|
||||
class DownloadableInstallerList {
|
||||
public:
|
||||
public:
|
||||
DownloadableInstallerList() : status(NONE) {}
|
||||
|
||||
/// start downloading, return true if we are done
|
||||
@@ -52,7 +52,7 @@ class DownloadableInstallerList {
|
||||
|
||||
vector<DownloadableInstallerP> installers;
|
||||
|
||||
private:
|
||||
private:
|
||||
enum Status { NONE, DOWNLOADING, DONE } status;
|
||||
wxMutex lock;
|
||||
|
||||
@@ -99,13 +99,13 @@ wxThread::ExitCode DownloadableInstallerList::Thread::Entry() {
|
||||
|
||||
/// Information on a package
|
||||
class PackageInfoPanel : public wxPanel {
|
||||
public:
|
||||
public:
|
||||
PackageInfoPanel(Window* parent);
|
||||
|
||||
void setPackage(const InstallablePackageP& package);
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
private:
|
||||
private:
|
||||
InstallablePackageP package;
|
||||
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//| License: GNU General Public License 2 or later (see file COPYING) |
|
||||
//+----------------------------------------------------------------------------+
|
||||
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
// ----------------------------------------------------------------------------- : Includes
|
||||
|
||||
@@ -18,14 +18,14 @@ class PackageInfoPanel;
|
||||
|
||||
/// A window that displays the installed packages and updates to them
|
||||
class PackagesWindow : public wxDialog {
|
||||
public:
|
||||
public:
|
||||
/// Show the packages window, optionally downloading the package database from the website
|
||||
PackagesWindow(Window* parent, bool download_package_list = true);
|
||||
/// Show the packages window for an installer
|
||||
PackagesWindow(Window* parent, const InstallerP& installer);
|
||||
~PackagesWindow();
|
||||
|
||||
private:
|
||||
private:
|
||||
PackageUpdateList* package_list; ///< List of available packages
|
||||
PackageInfoPanel* package_info; ///< Description of the selected package
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
// A page from the preferences dialog
|
||||
class PreferencesPage : public wxPanel {
|
||||
public:
|
||||
public:
|
||||
PreferencesPage(Window* parent)
|
||||
: wxPanel(parent, wxID_ANY)
|
||||
{}
|
||||
@@ -34,22 +34,22 @@ class PreferencesPage : public wxPanel {
|
||||
|
||||
// Preferences page for global MSE settings
|
||||
class GlobalPreferencesPage : public PreferencesPage {
|
||||
public:
|
||||
public:
|
||||
GlobalPreferencesPage(Window* parent);
|
||||
void store();
|
||||
|
||||
private:
|
||||
private:
|
||||
wxComboBox* language;
|
||||
wxCheckBox* open_sets_in_new_window;
|
||||
};
|
||||
|
||||
// Preferences page for card viewing related settings
|
||||
class DisplayPreferencesPage : public PreferencesPage {
|
||||
public:
|
||||
public:
|
||||
DisplayPreferencesPage(Window* parent);
|
||||
void store();
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
wxCheckBox* high_quality, *borders, *draw_editing, *spellcheck_enabled;
|
||||
@@ -72,11 +72,11 @@ class DisplayPreferencesPage : public PreferencesPage {
|
||||
// i.e. Apprentice, Magic Workstation
|
||||
// perhaps in the future also directories for packages?
|
||||
class DirsPreferencesPage : public PreferencesPage {
|
||||
public:
|
||||
public:
|
||||
DirsPreferencesPage(Window* parent);
|
||||
void store();
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
wxTextCtrl* apprentice;
|
||||
@@ -86,11 +86,11 @@ class DirsPreferencesPage : public PreferencesPage {
|
||||
|
||||
// Preferences page for automatic updates
|
||||
class UpdatePreferencesPage : public PreferencesPage {
|
||||
public:
|
||||
public:
|
||||
UpdatePreferencesPage(Window* parent);
|
||||
void store();
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
wxChoice* check_at_startup;
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
|
||||
/// Dialog for the program settings, rendered as a set of pages
|
||||
class PreferencesWindow : public wxDialog {
|
||||
public:
|
||||
public:
|
||||
PreferencesWindow(Window* parent);
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
/// Close the dialog, and store all settings
|
||||
|
||||
@@ -52,7 +52,7 @@ void PageLayout::init(const StyleSheet& stylesheet, PageLayoutType type, const R
|
||||
|
||||
/// A printout object specifying how to print a specified set of cards
|
||||
class CardsPrintout : public wxPrintout {
|
||||
public:
|
||||
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);
|
||||
@@ -63,7 +63,7 @@ class CardsPrintout : public wxPrintout {
|
||||
/// Print a page
|
||||
virtual bool OnPrintPage(int page);
|
||||
|
||||
private:
|
||||
private:
|
||||
PrintJobP job; ///< Cards to print
|
||||
DataViewer viewer;
|
||||
double scale_x, scale_y; // priter pixel per mm
|
||||
|
||||
@@ -22,7 +22,7 @@ class StyleSheet;
|
||||
|
||||
/// Layout of a page of cards
|
||||
class PageLayout {
|
||||
public:
|
||||
public:
|
||||
// layout
|
||||
RealSize page_size; ///< Size of a page (in millimetres)
|
||||
RealSize card_size; ///< Size of a card (in millimetres)
|
||||
@@ -41,7 +41,7 @@ class PageLayout {
|
||||
};
|
||||
|
||||
class PrintJob : public IntrusivePtrBase<PrintJob> {
|
||||
public:
|
||||
public:
|
||||
PrintJob(SetP const& set) : set(set) {}
|
||||
|
||||
// set and cards to print
|
||||
|
||||
@@ -17,14 +17,14 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
class ProfilerPanel : public wxPanel {
|
||||
public:
|
||||
public:
|
||||
ProfilerPanel(wxWindow* parent, bool fancy_effects);
|
||||
~ProfilerPanel();
|
||||
|
||||
virtual bool AcceptsFocus() const { return false; }
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
private:
|
||||
private:
|
||||
bool fancy_effects;
|
||||
wxTimer timer;
|
||||
wxStopWatch stopwatch;
|
||||
|
||||
@@ -412,19 +412,19 @@ void CardsPanel::doSelectAll() {
|
||||
// ----------------------------------------------------------------------------- : Searching
|
||||
|
||||
class CardsPanel::SearchFindInfo : public FindInfo {
|
||||
public:
|
||||
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) {
|
||||
// Select the card
|
||||
panel.card_list->setCard(card);
|
||||
return true;
|
||||
}
|
||||
private:
|
||||
private:
|
||||
CardsPanel& panel;
|
||||
};
|
||||
|
||||
class CardsPanel::ReplaceFindInfo : public FindInfo {
|
||||
public:
|
||||
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) {
|
||||
// Select the card
|
||||
@@ -438,7 +438,7 @@ class CardsPanel::ReplaceFindInfo : public FindInfo {
|
||||
}
|
||||
}
|
||||
virtual bool searchSelection() const { return true; }
|
||||
private:
|
||||
private:
|
||||
CardsPanel& panel;
|
||||
};
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class FilterCtrl;
|
||||
|
||||
/// A card list and card editor panel
|
||||
class CardsPanel : public SetWindowPanel {
|
||||
public:
|
||||
public:
|
||||
CardsPanel(Window* parent, int id);
|
||||
~CardsPanel();
|
||||
|
||||
@@ -61,21 +61,21 @@ class CardsPanel : public SetWindowPanel {
|
||||
virtual bool doFind (wxFindReplaceData&);
|
||||
virtual bool doReplace (wxFindReplaceData&);
|
||||
virtual bool doReplaceAll(wxFindReplaceData&);
|
||||
private:
|
||||
private:
|
||||
/// Do a search or replace action for the given FindInfo in all cards
|
||||
bool search(FindInfo& find, bool from_start);
|
||||
class SearchFindInfo;
|
||||
class ReplaceFindInfo;
|
||||
friend class CardsPanel::SearchFindInfo;
|
||||
friend class CardsPanel::ReplaceFindInfo;
|
||||
public:
|
||||
|
||||
public:
|
||||
|
||||
// --------------------------------------------------- : Selection
|
||||
virtual CardP selectedCard() const;
|
||||
virtual void selectCard(const CardP& card);
|
||||
virtual void selectFirstCard();
|
||||
|
||||
private:
|
||||
|
||||
private:
|
||||
// --------------------------------------------------- : Controls
|
||||
wxSizer* s_left;
|
||||
wxSplitterWindow* splitter;
|
||||
|
||||
@@ -23,7 +23,7 @@ DECLARE_POINTER_TYPE(ConsoleMessage);
|
||||
// ----------------------------------------------------------------------------- : MessageControl
|
||||
|
||||
class ConsoleMessage : public IntrusivePtrBase<ConsoleMessage> {
|
||||
public:
|
||||
public:
|
||||
MessageType type;
|
||||
String text; // string message
|
||||
Bitmap bitmap; // image message instead of string
|
||||
@@ -43,7 +43,7 @@ class ConsoleMessage : public IntrusivePtrBase<ConsoleMessage> {
|
||||
};
|
||||
|
||||
class MessageCtrl : public wxPanel {
|
||||
public:
|
||||
public:
|
||||
MessageCtrl(wxWindow* parent, int id)
|
||||
: wxPanel(parent, id, wxDefaultPosition, wxDefaultSize, wxBORDER_THEME | wxVSCROLL)
|
||||
{
|
||||
@@ -102,7 +102,7 @@ class MessageCtrl : public wxPanel {
|
||||
return ok;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
// --------------------------------------------------- : Data
|
||||
@@ -389,7 +389,7 @@ END_EVENT_TABLE()
|
||||
// ----------------------------------------------------------------------------- : TextCtrl with history
|
||||
|
||||
class HistoryTextCtrl : public wxTextCtrl {
|
||||
public:
|
||||
public:
|
||||
HistoryTextCtrl(wxWindow* parent, wxWindowID id)
|
||||
: wxTextCtrl(parent, id, _(""), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER)
|
||||
, history_pos(0)
|
||||
@@ -403,7 +403,7 @@ class HistoryTextCtrl : public wxTextCtrl {
|
||||
return command;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
vector<String> history; // TODO: save command history to settings?
|
||||
int history_pos; // position when browsing through history
|
||||
|
||||
@@ -22,7 +22,7 @@ class FilterCtrl;
|
||||
|
||||
/// A panel for listing and editing the keywords in a set
|
||||
class KeywordsPanel : public SetWindowPanel {
|
||||
public:
|
||||
public:
|
||||
KeywordsPanel(Window* parent, int id);
|
||||
~KeywordsPanel();
|
||||
|
||||
@@ -47,7 +47,7 @@ class KeywordsPanel : public SetWindowPanel {
|
||||
virtual bool canSelectAll() const;
|
||||
virtual void doSelectAll();
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
/// Find the code to insert based on the ref_scripts for the parameters of the current keyword
|
||||
|
||||
@@ -20,7 +20,7 @@ class wxFindReplaceData;
|
||||
/** This class is a virtual base class for all actual panels used in the set window.
|
||||
*/
|
||||
class SetWindowPanel : public wxPanel, public SetView {
|
||||
public:
|
||||
public:
|
||||
SetWindowPanel(Window* parent, int id, bool autoTabbing = true);
|
||||
|
||||
/// We will probably want to respond to set changes
|
||||
@@ -78,7 +78,7 @@ class SetWindowPanel : public wxPanel, public SetView {
|
||||
virtual void selectFirstCard() {} ///< Switch the view to the first card
|
||||
virtual void selectionChoices(ExportCardSelectionChoices& out) {} ///< Card subsets that can be exported from this panel
|
||||
|
||||
protected:
|
||||
protected:
|
||||
/// Have any controls been created?
|
||||
bool isInitialized() const;
|
||||
};
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
/// A card list that contains the
|
||||
class RandomCardList : public CardListBase {
|
||||
public:
|
||||
public:
|
||||
RandomCardList(Window* parent, int id, long style = 0);
|
||||
|
||||
/// Reset the list
|
||||
@@ -35,7 +35,7 @@ class RandomCardList : public CardListBase {
|
||||
const vector<CardP>* getCardsPtr() const { return &cards; }
|
||||
vector<CardP> cards;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
virtual void getItems(vector<VoidP>& out) const;
|
||||
virtual void onChangeSet();
|
||||
};
|
||||
@@ -64,12 +64,12 @@ void RandomCardList::getItems(vector<VoidP>& out) const {
|
||||
// ----------------------------------------------------------------------------- : PackTotalsPanel
|
||||
|
||||
class PackTotalsPanel : public wxPanel {
|
||||
public:
|
||||
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;
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
GameP game;
|
||||
void onPaint(wxPaintEvent&);
|
||||
@@ -150,7 +150,7 @@ END_EVENT_TABLE()
|
||||
// ----------------------------------------------------------------------------- : SelectableLabel
|
||||
|
||||
class SelectableLabel : public HoverButtonBase {
|
||||
public:
|
||||
public:
|
||||
SelectableLabel(wxWindow* parent, int id, const String& label, bool interactive = true)
|
||||
: HoverButtonBase(parent, id, false)
|
||||
, label(label)
|
||||
@@ -192,7 +192,7 @@ class SelectableLabel : public HoverButtonBase {
|
||||
void onDoubleClick(wxMouseEvent&) {
|
||||
if (interactive) HoverButtonBase::onClick();
|
||||
}
|
||||
private:
|
||||
private:
|
||||
String label;
|
||||
bool interactive;
|
||||
wxWindow* buddy;
|
||||
@@ -229,10 +229,10 @@ void PackAmountPicker::destroy(wxFlexGridSizer* sizer) {
|
||||
// ----------------------------------------------------------------------------- : CustomPackDialog
|
||||
|
||||
class CustomPackDialog : public wxDialog {
|
||||
public:
|
||||
public:
|
||||
CustomPackDialog(Window* parent, const SetP& set, const PackTypeP& edited_pack, bool can_remove);
|
||||
PackTypeP get() const { return edited_pack; }
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
SetP set;
|
||||
|
||||
@@ -37,7 +37,7 @@ struct PackAmountPicker {
|
||||
|
||||
/// A SetWindowPanel for creating random booster packs
|
||||
class RandomPackPanel : public SetWindowPanel {
|
||||
public:
|
||||
public:
|
||||
RandomPackPanel(Window* parent, int id);
|
||||
~RandomPackPanel();
|
||||
|
||||
@@ -62,7 +62,7 @@ class RandomPackPanel : public SetWindowPanel {
|
||||
virtual bool canCopy() const;
|
||||
virtual void doCopy();
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
CardViewer* preview; ///< Card preview
|
||||
@@ -93,7 +93,7 @@ class RandomPackPanel : public SetWindowPanel {
|
||||
|
||||
void onCardSelect(CardSelectEvent& ev);
|
||||
void onPackTypeClick(wxCommandEvent& ev);
|
||||
public:
|
||||
public:
|
||||
typedef PackItem PackItem_for_typeof;
|
||||
};
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ class SetInfoEditor;
|
||||
// ----------------------------------------------------------------------------- : SetInfoPanel
|
||||
|
||||
class SetInfoPanel : public SetWindowPanel {
|
||||
public:
|
||||
public:
|
||||
SetInfoPanel(Window* parent, int id);
|
||||
|
||||
// --------------------------------------------------- : UI
|
||||
@@ -37,10 +37,10 @@ class SetInfoPanel : public SetWindowPanel {
|
||||
virtual void doPaste();
|
||||
virtual void doSelectAll();
|
||||
|
||||
protected:
|
||||
protected:
|
||||
virtual void onChangeSet();
|
||||
|
||||
private:
|
||||
private:
|
||||
SetInfoEditor* editor;
|
||||
};
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
/// A list of fields of which the statistics can be shown
|
||||
class StatCategoryList : public GalleryList {
|
||||
public:
|
||||
public:
|
||||
StatCategoryList(Window* parent, int id)
|
||||
: GalleryList(parent, id, wxVERTICAL)
|
||||
{
|
||||
@@ -40,11 +40,11 @@ class StatCategoryList : public GalleryList {
|
||||
return *categories.at(subcolumns[0].selection);
|
||||
}
|
||||
|
||||
protected:
|
||||
protected:
|
||||
virtual size_t itemCount() const;
|
||||
virtual void drawItem(DC& dc, int x, int y, size_t item);
|
||||
|
||||
private:
|
||||
private:
|
||||
GameP game;
|
||||
vector<StatsCategoryP> categories; ///< Categories, sorted by position_hint
|
||||
};
|
||||
@@ -98,7 +98,7 @@ void StatCategoryList::drawItem(DC& dc, int x, int y, size_t item) {
|
||||
|
||||
/// A list of fields of which the statistics can be shown
|
||||
class StatDimensionList : public GalleryList {
|
||||
public:
|
||||
public:
|
||||
StatDimensionList(Window* parent, int id, bool show_empty, int dimension_count = 3)
|
||||
: GalleryList(parent, id, wxVERTICAL, false)
|
||||
, dimension_count(dimension_count)
|
||||
@@ -145,7 +145,7 @@ class StatDimensionList : public GalleryList {
|
||||
RefreshSelection();
|
||||
}
|
||||
|
||||
protected:
|
||||
protected:
|
||||
virtual size_t itemCount() const;
|
||||
virtual void drawItem(DC& dc, int x, int y, size_t item);
|
||||
|
||||
@@ -183,7 +183,7 @@ class StatDimensionList : public GalleryList {
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
GameP game;
|
||||
bool show_empty;
|
||||
vector<StatsDimensionP> dimensions; ///< Dimensions, sorted by position_hint
|
||||
@@ -523,7 +523,7 @@ void StatsPanel::onGraphSelect(wxCommandEvent&) {
|
||||
// ----------------------------------------------------------------------------- : Filtering card list
|
||||
|
||||
class StatsFilter : public Filter<Card> {
|
||||
public:
|
||||
public:
|
||||
StatsFilter(GraphData& data, const vector<int> match) {
|
||||
data.indices(match, indices);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ class FilteredCardList;
|
||||
|
||||
/// A panel for showing statistics on cards
|
||||
class StatsPanel : public SetWindowPanel {
|
||||
public:
|
||||
public:
|
||||
StatsPanel(Window* parent, int id);
|
||||
~StatsPanel();
|
||||
|
||||
@@ -44,7 +44,7 @@ class StatsPanel : public SetWindowPanel {
|
||||
virtual void selectCard(const CardP& card);
|
||||
|
||||
// --------------------------------------------------- : Data
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
#if USE_SEPARATE_DIMENSION_LISTS
|
||||
|
||||
@@ -19,7 +19,7 @@ class StylingEditor;
|
||||
|
||||
/// A panel showing a list of stylesheets, and an editor for styling
|
||||
class StylePanel : public SetWindowPanel {
|
||||
public:
|
||||
public:
|
||||
StylePanel(Window* parent, int id);
|
||||
|
||||
virtual void onChangeSet();
|
||||
@@ -42,7 +42,7 @@ class StylePanel : public SetWindowPanel {
|
||||
// --------------------------------------------------- : Selection
|
||||
virtual void selectCard(const CardP& card);
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
CardViewer* preview; ///< Card preview
|
||||
|
||||
@@ -72,7 +72,7 @@ private:
|
||||
void switchSet(const SetP& new_set);
|
||||
|
||||
// --------------------------------------------------- : Action related
|
||||
protected:
|
||||
protected:
|
||||
/// We want to respond to set changes
|
||||
virtual void onChangeSet();
|
||||
/// Actions that change the set
|
||||
|
||||
@@ -17,7 +17,7 @@ class wxSpinCtrl;
|
||||
|
||||
/// Editor for drawing basic shapes such as rectangles and polygons
|
||||
class SymbolBasicShapeEditor : public SymbolEditorBase {
|
||||
public:
|
||||
public:
|
||||
SymbolBasicShapeEditor(SymbolControl* control);
|
||||
|
||||
// --------------------------------------------------- : Drawing
|
||||
@@ -45,7 +45,7 @@ class SymbolBasicShapeEditor : public SymbolEditorBase {
|
||||
virtual bool isEditing();
|
||||
|
||||
// --------------------------------------------------- : Data
|
||||
private:
|
||||
private:
|
||||
int mode;
|
||||
SymbolShapeP shape;
|
||||
Vector2D start;
|
||||
|
||||
@@ -23,7 +23,7 @@ DECLARE_POINTER_TYPE(SymbolEditorBase);
|
||||
* That object handles all events and the drawing. This class is mostly just a proxy.
|
||||
*/
|
||||
class SymbolControl : public wxControl, public SymbolViewer {
|
||||
public:
|
||||
public:
|
||||
SymbolControl(SymbolWindow* parent, int id, const SymbolP& symbol);
|
||||
|
||||
virtual void onChangeSymbol();
|
||||
@@ -57,14 +57,14 @@ class SymbolControl : public wxControl, public SymbolViewer {
|
||||
/// Are we editing?
|
||||
bool isEditing();
|
||||
|
||||
private:
|
||||
private:
|
||||
/// Switch the a different editor object
|
||||
void switchEditor(const SymbolEditorBaseP& e);
|
||||
|
||||
/// Draw the editor
|
||||
void draw(DC& dc);
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
// --------------------------------------------------- : Data
|
||||
@@ -79,7 +79,7 @@ class SymbolControl : public wxControl, public SymbolViewer {
|
||||
/// Parent window
|
||||
SymbolWindow* parent;
|
||||
|
||||
private:
|
||||
private:
|
||||
/// The current editor
|
||||
SymbolEditorBaseP editor;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ class SymbolControl;
|
||||
* NOTE : Do not confuse with SymbolEditor (a FieldEditor)
|
||||
*/
|
||||
class SymbolEditorBase : public IntrusivePtrVirtualBase {
|
||||
protected:
|
||||
protected:
|
||||
/// The control for which we are editing
|
||||
SymbolControl& control;
|
||||
|
||||
@@ -33,7 +33,7 @@ class SymbolEditorBase : public IntrusivePtrVirtualBase {
|
||||
|
||||
void SetStatusText(const String& text);
|
||||
|
||||
public:
|
||||
public:
|
||||
SymbolEditorBase(SymbolControl* control)
|
||||
: control(*control)
|
||||
{}
|
||||
|
||||
@@ -27,7 +27,7 @@ DECLARE_LOCAL_EVENT_TYPE(EVENT_PART_ACTIVATE, <not used>)
|
||||
// ----------------------------------------------------------------------------- : SymbolPartList
|
||||
|
||||
class SymbolPartList : public wxScrolledWindow, public SymbolView {
|
||||
public:
|
||||
public:
|
||||
SymbolPartList(Window* parent, int id, SymbolPartsSelection& selection, SymbolP symbol = SymbolP());
|
||||
|
||||
/// Another symbol is being viewed
|
||||
@@ -40,9 +40,9 @@ class SymbolPartList : public wxScrolledWindow, public SymbolView {
|
||||
/// Update only a subset of the parts
|
||||
void updateParts(const set<SymbolPartP>& parts);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
private:
|
||||
private:
|
||||
SymbolPartsSelection& selection; ///< Store selection here
|
||||
int number_of_items;
|
||||
|
||||
|
||||
@@ -20,14 +20,14 @@ class CurveDragAction;
|
||||
|
||||
// Symbol editor for editing control points and handles
|
||||
class SymbolPointEditor : public SymbolEditorBase {
|
||||
public:
|
||||
public:
|
||||
SymbolPointEditor(SymbolControl* control, const SymbolShapeP& part);
|
||||
|
||||
// --------------------------------------------------- : Drawing
|
||||
|
||||
virtual void draw(DC& dc);
|
||||
|
||||
private:
|
||||
private:
|
||||
/// Draws a gradient on the selected line to indicate curve dragging
|
||||
void drawHoveredLine(DC& dc);
|
||||
/// Draw all handles belonging to selected points
|
||||
@@ -53,7 +53,7 @@ class SymbolPointEditor : public SymbolEditorBase {
|
||||
/// Retrieve a pen for the drawing of other things
|
||||
wxPen otherPen(WhichPen p);
|
||||
|
||||
public:
|
||||
public:
|
||||
// --------------------------------------------------- : UI
|
||||
|
||||
virtual void initUI (wxToolBar* tb, wxMenuBar* mb);
|
||||
@@ -76,7 +76,7 @@ class SymbolPointEditor : public SymbolEditorBase {
|
||||
virtual void onChar(wxKeyEvent& ev);
|
||||
virtual bool isEditing();
|
||||
|
||||
private:
|
||||
private:
|
||||
// --------------------------------------------------- : Data
|
||||
|
||||
// The symbol part we are editing
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user