mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 05:07:00 -04:00
Cleanup: indentation of public/protected/private keywords
This commit is contained in:
@@ -72,12 +72,12 @@ class DataViewer : public SetView {
|
||||
virtual void onChangeSet();
|
||||
|
||||
// --------------------------------------------------- : The viewers
|
||||
private:
|
||||
private:
|
||||
/// Create some viewers for the given styles
|
||||
void addStyles(IndexMap<FieldP,StyleP>& styles);
|
||||
/// Update style scripts
|
||||
void updateStyles(bool only_content_dependent);
|
||||
protected:
|
||||
protected:
|
||||
/// Set the styles for the data to be shown, recreating the viewers
|
||||
void setStyles(const StyleSheetP& stylesheet, IndexMap<FieldP,StyleP>& styles, IndexMap<FieldP,StyleP>* extra_styles = nullptr);
|
||||
/// Set the data to be shown in the viewers, refresh them
|
||||
|
||||
@@ -37,7 +37,7 @@ enum SymbolSet
|
||||
|
||||
/// Base class for symbol filters
|
||||
class SymbolFilter : public IntrusivePtrVirtualBase {
|
||||
public:
|
||||
public:
|
||||
virtual ~SymbolFilter() {}
|
||||
/// What color should the symbol have at location (x, y)?
|
||||
/** x,y are in the range [0...1) */
|
||||
@@ -57,7 +57,7 @@ intrusive_ptr<SymbolFilter> read_new<SymbolFilter>(Reader& reader);
|
||||
|
||||
/// Symbol filter that returns solid colors
|
||||
class SolidFillSymbolFilter : public SymbolFilter {
|
||||
public:
|
||||
public:
|
||||
inline SolidFillSymbolFilter() {}
|
||||
inline SolidFillSymbolFilter(const Color& fill_color, const Color& border_color)
|
||||
: fill_color(fill_color), border_color(border_color)
|
||||
@@ -65,20 +65,20 @@ class SolidFillSymbolFilter : public SymbolFilter {
|
||||
virtual Color color(double x, double y, SymbolSet point) const;
|
||||
virtual String fillType() const;
|
||||
virtual bool operator == (const SymbolFilter& that) const;
|
||||
private:
|
||||
private:
|
||||
Color fill_color, border_color;
|
||||
DECLARE_REFLECTION_OVERRIDE();
|
||||
};
|
||||
|
||||
/// Symbol filter that returns some gradient
|
||||
class GradientSymbolFilter : public SymbolFilter {
|
||||
public:
|
||||
public:
|
||||
inline GradientSymbolFilter() {}
|
||||
inline GradientSymbolFilter(const Color& fill_color_1, const Color& border_color_1, const Color& fill_color_2, const Color& border_color_2)
|
||||
: fill_color_1(fill_color_1), border_color_1(border_color_1)
|
||||
, fill_color_2(fill_color_2), border_color_2(border_color_2)
|
||||
{}
|
||||
protected:
|
||||
protected:
|
||||
Color fill_color_1, border_color_1;
|
||||
Color fill_color_2, border_color_2;
|
||||
template <typename T>
|
||||
@@ -90,7 +90,7 @@ class GradientSymbolFilter : public SymbolFilter {
|
||||
|
||||
/// Symbol filter that returns a linear gradient
|
||||
class LinearGradientSymbolFilter : public GradientSymbolFilter {
|
||||
public:
|
||||
public:
|
||||
LinearGradientSymbolFilter();
|
||||
LinearGradientSymbolFilter(const Color& fill_color_1, const Color& border_color_1, const Color& fill_color_2, const Color& border_color_2
|
||||
,double center_x, double center_y, double end_x, double end_y);
|
||||
@@ -102,7 +102,7 @@ class LinearGradientSymbolFilter : public GradientSymbolFilter {
|
||||
/// return time on the gradient, used by GradientSymbolFilter::color
|
||||
inline double t(double x, double y) const;
|
||||
|
||||
private:
|
||||
private:
|
||||
double center_x, center_y;
|
||||
double end_x, end_y;
|
||||
mutable double len;
|
||||
@@ -111,7 +111,7 @@ class LinearGradientSymbolFilter : public GradientSymbolFilter {
|
||||
|
||||
/// Symbol filter that returns a radial gradient
|
||||
class RadialGradientSymbolFilter : public GradientSymbolFilter {
|
||||
public:
|
||||
public:
|
||||
inline RadialGradientSymbolFilter() {}
|
||||
inline RadialGradientSymbolFilter(const Color& fill_color_1, const Color& border_color_1, const Color& fill_color_2, const Color& border_color_2)
|
||||
: GradientSymbolFilter(fill_color_1, border_color_1, fill_color_2, border_color_2)
|
||||
|
||||
@@ -29,7 +29,7 @@ enum HighlightStyle
|
||||
|
||||
/// Class that knows how to draw a symbol
|
||||
class SymbolViewer : public SymbolView {
|
||||
public:
|
||||
public:
|
||||
// --------------------------------------------------- : Data
|
||||
SymbolViewer(const SymbolP& symbol, bool editing_hints, double size = 500, double border_radius = 0.05);
|
||||
|
||||
@@ -61,7 +61,7 @@ class SymbolViewer : public SymbolView {
|
||||
void onAction(const Action&, bool) {}
|
||||
|
||||
|
||||
private:
|
||||
private:
|
||||
typedef shared_ptr<wxMemoryDC> MemoryDCP;
|
||||
/// Inside a reflection?
|
||||
int in_symmetry;
|
||||
|
||||
@@ -194,7 +194,7 @@ struct TextElementsFromString {
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
/// Create a text element for a piece of text, text[start..end)
|
||||
void addText(TextElements& te, const String& text, size_t start, size_t end, const TextStyle& style, Context& ctx) {
|
||||
String content = untag(text.substr(start, end - start));
|
||||
|
||||
+10
-10
@@ -48,7 +48,7 @@ struct CharInfo {
|
||||
|
||||
/// A section of text that can be rendered using a TextViewer
|
||||
class TextElement : public IntrusivePtrBase<TextElement> {
|
||||
public:
|
||||
public:
|
||||
/// What section of the input string is this element?
|
||||
size_t start, end;
|
||||
|
||||
@@ -71,7 +71,7 @@ class TextElement : public IntrusivePtrBase<TextElement> {
|
||||
|
||||
/// A list of text elements
|
||||
class TextElements {
|
||||
public:
|
||||
public:
|
||||
/// Draw all the elements (as need to show the range start..end)
|
||||
void draw (RotatedDC& dc, double scale, const RealRect& rect, const double* xs, DrawWhat what, size_t start, size_t end) const;
|
||||
// Get information on all characters in the range [start...end) and store them in out
|
||||
@@ -98,7 +98,7 @@ class TextElements {
|
||||
|
||||
/// A text element that just shows text
|
||||
class SimpleTextElement : public TextElement {
|
||||
public:
|
||||
public:
|
||||
SimpleTextElement(const String& content, size_t start, size_t end)
|
||||
: TextElement(start, end), content(content)
|
||||
{}
|
||||
@@ -107,7 +107,7 @@ class SimpleTextElement : public TextElement {
|
||||
|
||||
/// A text element that uses a normal font
|
||||
class FontTextElement : public SimpleTextElement {
|
||||
public:
|
||||
public:
|
||||
FontTextElement(const String& content, size_t start, size_t end, const FontP& font, DrawWhat draw_as, LineBreak break_style)
|
||||
: SimpleTextElement(content, start, end)
|
||||
, font(font), draw_as(draw_as), break_style(break_style)
|
||||
@@ -117,7 +117,7 @@ class FontTextElement : public SimpleTextElement {
|
||||
virtual void getCharInfo(RotatedDC& dc, double scale, vector<CharInfo>& out) const;
|
||||
virtual double minScale() const;
|
||||
virtual double scaleStep() const;
|
||||
private:
|
||||
private:
|
||||
FontP font;
|
||||
DrawWhat draw_as;
|
||||
LineBreak break_style;
|
||||
@@ -125,7 +125,7 @@ class FontTextElement : public SimpleTextElement {
|
||||
|
||||
/// A text element that uses a symbol font
|
||||
class SymbolTextElement : public SimpleTextElement {
|
||||
public:
|
||||
public:
|
||||
SymbolTextElement(const String& content, size_t start, size_t end, const SymbolFontRef& font, Context* ctx)
|
||||
: SimpleTextElement(content, start, end)
|
||||
, font(font), ctx(*ctx)
|
||||
@@ -135,7 +135,7 @@ class SymbolTextElement : public SimpleTextElement {
|
||||
virtual void getCharInfo(RotatedDC& dc, double scale, vector<CharInfo>& out) const;
|
||||
virtual double minScale() const;
|
||||
virtual double scaleStep() const;
|
||||
private:
|
||||
private:
|
||||
const SymbolFontRef& font; // owned by TextStyle
|
||||
Context& ctx;
|
||||
};
|
||||
@@ -144,7 +144,7 @@ class SymbolTextElement : public SimpleTextElement {
|
||||
|
||||
/// A TextElement consisting of sub elements
|
||||
class CompoundTextElement : public TextElement {
|
||||
public:
|
||||
public:
|
||||
CompoundTextElement(size_t start, size_t end) : TextElement(start, end) {}
|
||||
|
||||
virtual void draw (RotatedDC& dc, double scale, const RealRect& rect, const double* xs, DrawWhat what, size_t start, size_t end) const;
|
||||
@@ -157,7 +157,7 @@ class CompoundTextElement : public TextElement {
|
||||
|
||||
/// A TextElement drawn using a grey background
|
||||
class AtomTextElement : public CompoundTextElement {
|
||||
public:
|
||||
public:
|
||||
AtomTextElement(size_t start, size_t end) : CompoundTextElement(start, end) {}
|
||||
|
||||
virtual void draw(RotatedDC& dc, double scale, const RealRect& rect, const double* xs, DrawWhat what, size_t start, size_t end) const;
|
||||
@@ -165,7 +165,7 @@ class AtomTextElement : public CompoundTextElement {
|
||||
|
||||
/// A TextElement drawn using a red wavy underline
|
||||
class ErrorTextElement : public CompoundTextElement {
|
||||
public:
|
||||
public:
|
||||
ErrorTextElement(size_t start, size_t end) : CompoundTextElement(start, end) {}
|
||||
|
||||
virtual void draw(RotatedDC& dc, double scale, const RealRect& rect, const double* xs, DrawWhat what, size_t start, size_t end) const;
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
* - line_id The index of a line, 0 is the first line.
|
||||
*/
|
||||
class TextViewer {
|
||||
public:
|
||||
public:
|
||||
/// Information on a line in the textbox
|
||||
struct Line;
|
||||
|
||||
@@ -116,11 +116,11 @@ class TextViewer {
|
||||
/// Set exact scroll position
|
||||
void setExactScrollPosition(double pos);
|
||||
|
||||
private:
|
||||
private:
|
||||
/// Scroll all lines a given amount
|
||||
void scrollBy(double delta);
|
||||
|
||||
private:
|
||||
private:
|
||||
// --------------------------------------------------- : More drawing
|
||||
double scale; ///< Scale when drawing
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
/// Viewer that displays a choice value
|
||||
class ChoiceValueViewer : public ValueViewer {
|
||||
public:
|
||||
public:
|
||||
DECLARE_VALUE_VIEWER(Choice) : ValueViewer(parent,style) {}
|
||||
|
||||
virtual bool prepare(RotatedDC& dc);
|
||||
|
||||
@@ -18,7 +18,7 @@ DECLARE_POINTER_TYPE(AlphaMask);
|
||||
|
||||
/// Viewer that displays a color value
|
||||
class ColorValueViewer : public ValueViewer {
|
||||
public:
|
||||
public:
|
||||
DECLARE_VALUE_VIEWER(Color) : ValueViewer(parent,style) {}
|
||||
|
||||
virtual void draw(RotatedDC& dc);
|
||||
|
||||
@@ -18,14 +18,14 @@ DECLARE_POINTER_TYPE(AlphaMask);
|
||||
|
||||
/// Viewer that displays an image value
|
||||
class ImageValueViewer : public ValueViewer {
|
||||
public:
|
||||
public:
|
||||
DECLARE_VALUE_VIEWER(Image) : ValueViewer(parent,style) {}
|
||||
|
||||
virtual void draw(RotatedDC& dc);
|
||||
virtual void onValueChange();
|
||||
virtual void onStyleChange(int);
|
||||
|
||||
private:
|
||||
private:
|
||||
Bitmap bitmap; ///< Cached bitmap
|
||||
RealSize size; ///< Size of cached bitmap
|
||||
Radians angle; ///< Angle of cached bitmap
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
/// Viewer that displays a text value
|
||||
class InfoValueViewer : public ValueViewer {
|
||||
public:
|
||||
public:
|
||||
DECLARE_VALUE_VIEWER(Info) : ValueViewer(parent,style) {}
|
||||
|
||||
virtual void draw(RotatedDC& dc);
|
||||
|
||||
@@ -16,15 +16,15 @@
|
||||
|
||||
/// Viewer that displays a multiple choice value
|
||||
class MultipleChoiceValueViewer : public ValueViewer {
|
||||
public:
|
||||
public:
|
||||
DECLARE_VALUE_VIEWER(MultipleChoice) : ValueViewer(parent,style), item_height(0) {}
|
||||
|
||||
virtual bool prepare(RotatedDC& dc);
|
||||
virtual void draw(RotatedDC& dc);
|
||||
virtual void onStyleChange(int);
|
||||
protected:
|
||||
protected:
|
||||
double item_height; ///< Height of a single item, or 0 if non uniform
|
||||
private:
|
||||
private:
|
||||
void drawChoice(RotatedDC& dc, RealPoint& pos, const String& choice, bool active = true);
|
||||
};
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//| License: GNU General Public License 2 or later (see file COPYING) |
|
||||
//+----------------------------------------------------------------------------+
|
||||
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
// ----------------------------------------------------------------------------- : Includes
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
/// Viewer that displays a package choice value
|
||||
class PackageChoiceValueViewer : public ValueViewer {
|
||||
public:
|
||||
public:
|
||||
DECLARE_VALUE_VIEWER(PackageChoice) : ValueViewer(parent,style) { initItems(); }
|
||||
|
||||
virtual void draw(RotatedDC& dc);
|
||||
@@ -26,9 +26,9 @@ class PackageChoiceValueViewer : public ValueViewer {
|
||||
String name;
|
||||
Bitmap image;
|
||||
};
|
||||
protected:
|
||||
protected:
|
||||
vector<Item> items;
|
||||
private:
|
||||
private:
|
||||
void initItems();
|
||||
struct ComparePackagePosHint;
|
||||
};
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
|
||||
/// Viewer that displays a symbol value
|
||||
class SymbolValueViewer : public ValueViewer {
|
||||
public:
|
||||
public:
|
||||
DECLARE_VALUE_VIEWER(Symbol) : ValueViewer(parent,style) {}
|
||||
|
||||
virtual void draw(RotatedDC& dc);
|
||||
void onValueChange();
|
||||
|
||||
protected:
|
||||
protected:
|
||||
vector<Bitmap> symbols; ///< Cached images
|
||||
};
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
/// Viewer that displays a text value
|
||||
class TextValueViewer : public ValueViewer {
|
||||
public:
|
||||
public:
|
||||
DECLARE_VALUE_VIEWER(Text) : ValueViewer(parent,style) {}
|
||||
|
||||
virtual bool prepare(RotatedDC& dc);
|
||||
@@ -27,7 +27,7 @@ class TextValueViewer : public ValueViewer {
|
||||
virtual void onAction(const Action&, bool undone);
|
||||
virtual double getStretch() const;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
TextViewer v;
|
||||
};
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ DECLARE_POINTER_TYPE(Value);
|
||||
/// The virtual viewer control for a single field on a card (or in the set data)
|
||||
/** A viewer can only display a value, not edit it, ValueEditor is used for that */
|
||||
class ValueViewer : public StyleListener {
|
||||
public:
|
||||
public:
|
||||
/// Construct a ValueViewer, set the value at a later time
|
||||
ValueViewer(DataViewer& parent, const StyleP& style);
|
||||
virtual ~ValueViewer() {}
|
||||
@@ -71,7 +71,7 @@ class ValueViewer : public StyleListener {
|
||||
virtual ValueEditor* getEditor() { return 0; }
|
||||
|
||||
DataViewer& viewer; ///< Our parent object
|
||||
protected:
|
||||
protected:
|
||||
ValueP valueP; ///< The value we are currently viewing
|
||||
|
||||
/// Set the pen for drawing the border, returns true if a border needs to be drawn
|
||||
@@ -86,7 +86,7 @@ class ValueViewer : public StyleListener {
|
||||
const AlphaMask& getMask(int w = 0, int h = 0) const;
|
||||
const AlphaMask& getMask(const Rotation& rot) const;
|
||||
|
||||
public:
|
||||
public:
|
||||
/// Should this viewer render using a platform native look?
|
||||
bool nativeLook() const;
|
||||
/// Is this the currently selected viewer?
|
||||
|
||||
Reference in New Issue
Block a user