mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 05:07:00 -04:00
default smart pointer type switched to intrusive_ptr
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@337 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
// ----------------------------------------------------------------------------- : BooleanField
|
||||
|
||||
BooleanField::BooleanField() {
|
||||
choices->choices.push_back(new_shared1<Choice>(_("yes")));
|
||||
choices->choices.push_back(new_shared1<Choice>(_("no")));
|
||||
choices->choices.push_back(new_intrusive1<Choice>(_("yes")));
|
||||
choices->choices.push_back(new_intrusive1<Choice>(_("no")));
|
||||
choices->initIds();
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ class ChoiceField : public Field {
|
||||
DECLARE_FIELD_TYPE(Choice);
|
||||
|
||||
class Choice;
|
||||
typedef shared_ptr<Choice> ChoiceP;
|
||||
typedef intrusive_ptr<Choice> ChoiceP;
|
||||
|
||||
ChoiceP choices; ///< A choice group of possible choices
|
||||
OptionalScript script; ///< Script to apply to all values
|
||||
@@ -47,7 +47,7 @@ class ChoiceField : public Field {
|
||||
};
|
||||
|
||||
/// An item that can be chosen for this field
|
||||
class ChoiceField::Choice {
|
||||
class ChoiceField::Choice : public IntrusivePtrBase<ChoiceField::Choice> {
|
||||
public:
|
||||
Choice();
|
||||
Choice(const String& name);
|
||||
|
||||
@@ -27,7 +27,7 @@ class ColorField : public Field {
|
||||
DECLARE_FIELD_TYPE(Color);
|
||||
|
||||
class Choice;
|
||||
typedef shared_ptr<Choice> ChoiceP;
|
||||
typedef intrusive_ptr<Choice> ChoiceP;
|
||||
|
||||
OptionalScript script; ///< Script to apply to all values
|
||||
OptionalScript default_script; ///< Script that generates the default value
|
||||
@@ -42,7 +42,7 @@ class ColorField : public Field {
|
||||
};
|
||||
|
||||
/// A color that can be chosen for this field
|
||||
class ColorField::Choice {
|
||||
class ColorField::Choice : public IntrusivePtrBase<ColorField::Choice> {
|
||||
public:
|
||||
String name; ///< Name of the color
|
||||
Color color; ///< The actual color
|
||||
|
||||
@@ -32,8 +32,9 @@ IMPLEMENT_REFLECTION(SymbolStyle) {
|
||||
SymbolVariation::SymbolVariation()
|
||||
: border_radius(0.05)
|
||||
{}
|
||||
SymbolVariation::~SymbolVariation() {}
|
||||
|
||||
IMPLEMENT_REFLECTION(SymbolVariation) {
|
||||
IMPLEMENT_REFLECTION_NO_SCRIPT(SymbolVariation) {
|
||||
REFLECT(name);
|
||||
REFLECT(border_radius);
|
||||
REFLECT_NAMELESS(filter);
|
||||
|
||||
@@ -47,9 +47,10 @@ class SymbolStyle : public Style {
|
||||
};
|
||||
|
||||
/// Styling for a symbol variation, defines color, border, etc.
|
||||
class SymbolVariation {
|
||||
class SymbolVariation : public IntrusivePtrBase<SymbolVariation> {
|
||||
public:
|
||||
SymbolVariation();
|
||||
~SymbolVariation();
|
||||
String name; ///< Name of this variation
|
||||
SymbolFilterP filter; ///< Filter to color the symbol
|
||||
double border_radius; ///< Border radius for the symbol
|
||||
|
||||
@@ -48,7 +48,7 @@ class TextField : public Field {
|
||||
// ----------------------------------------------------------------------------- : TextStyle
|
||||
|
||||
/// Background behind text
|
||||
class TextBackground {
|
||||
class TextBackground : public IntrusivePtrBase<TextBackground> {
|
||||
public:
|
||||
ScriptableImage image; ///< background image, stretched to text size
|
||||
RealSize displacement;
|
||||
|
||||
Reference in New Issue
Block a user