Cleanup: indentation of public/protected/private keywords

This commit is contained in:
Twan van Laarhoven
2020-05-12 21:57:37 +02:00
parent 86aec577a2
commit 0c3712b61a
167 changed files with 751 additions and 752 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ public:
bool isThreadSafe;
virtual bool threadSafe() const {return isThreadSafe;}
private:
private:
int id;
inline ChoiceStyle& style() { return *static_cast<ChoiceStyle*>(viewer().getStyle().get()); }
+4 -4
View File
@@ -20,7 +20,7 @@ DECLARE_POINTER_TYPE(ThumbnailRequest);
/// An editor 'control' for editing ChoiceValues
class ChoiceValueEditor : public ChoiceValueViewer, public ValueEditor {
public:
public:
DECLARE_VALUE_EDITOR(Choice);
~ChoiceValueEditor();
@@ -32,7 +32,7 @@ class ChoiceValueEditor : public ChoiceValueViewer, public ValueEditor {
virtual void draw(RotatedDC& dc);
virtual void determineSize(bool);
private:
private:
DropDownListP drop_down;
friend class DropDownChoiceList;
/// Change the choice
@@ -89,10 +89,10 @@ private:
/// A drop down list of choices
class DropDownChoiceList : public DropDownChoiceListBase {
public:
public:
DropDownChoiceList(Window* parent, bool is_submenu, ValueViewer& cve, ChoiceField::ChoiceP group);
protected:
protected:
virtual void onShow();
virtual void select(size_t item);
virtual size_t selection() const;
+2 -2
View File
@@ -17,7 +17,7 @@
// A drop down list of color choices
class DropDownColorList : public DropDownList {
public:
public:
DropDownColorList(Window* parent, ColorValueEditor& cve);
protected:
@@ -29,7 +29,7 @@ class DropDownColorList : public DropDownList {
virtual void select(size_t item);
virtual size_t selection() const;
private:
private:
ColorValueEditor& cve;
mutable Color default_color;
+2 -2
View File
@@ -18,7 +18,7 @@ DECLARE_SHARED_POINTER_TYPE(DropDownList);
/// An editor 'control' for editing ColorValues
class ColorValueEditor : public ColorValueViewer, public ValueEditor {
public:
public:
DECLARE_VALUE_EDITOR(Color);
// --------------------------------------------------- : Events
@@ -29,7 +29,7 @@ class ColorValueEditor : public ColorValueViewer, public ValueEditor {
virtual void draw(RotatedDC& dc);
virtual void determineSize(bool);
private:
private:
DropDownListP drop_down;
friend class DropDownColorList;
/// Change the color
+2 -2
View File
@@ -32,7 +32,7 @@ DECLARE_POINTER_TYPE(ValueActionPerformer);
* Note that ValueEditor does NOT inherit from ValueViewer, because that leads to all kinds of problems
*/
class ValueEditor {
public:
public:
virtual ~ValueEditor() {}
// --------------------------------------------------- : Events
@@ -126,7 +126,7 @@ class ValueEditor {
virtual void onShow(bool) {}
// --------------------------------------------------- : Helpers
protected:
protected:
/// Retrieve the parent editor object
virtual DataEditor& editor() const = 0;
+2 -2
View File
@@ -16,7 +16,7 @@
/// An editor 'control' for editing ImageValues
class ImageValueEditor : public ImageValueViewer, public ValueEditor {
public:
public:
DECLARE_VALUE_EDITOR(Image);
virtual bool onLeftDClick(const RealPoint&, wxMouseEvent&);
@@ -31,7 +31,7 @@ class ImageValueEditor : public ImageValueViewer, public ValueEditor {
virtual bool onChar(wxKeyEvent&);
private:
private:
// Open the image slice window showing the give image
void sliceImage(const Image&);
};
+1 -1
View File
@@ -16,7 +16,7 @@
/// An editor 'control' for editing InfoValues
class InfoValueEditor : public InfoValueViewer, public ValueEditor {
public:
public:
DECLARE_VALUE_EDITOR(Info);
virtual void determineSize(bool);
+2 -2
View File
@@ -17,7 +17,7 @@
/// An editor 'control' for editing MultipleChoiceValues
class MultipleChoiceValueEditor : public MultipleChoiceValueViewer, public ValueEditor {
public:
public:
DECLARE_VALUE_EDITOR(MultipleChoice);
~MultipleChoiceValueEditor();
@@ -29,7 +29,7 @@ class MultipleChoiceValueEditor : public MultipleChoiceValueViewer, public Value
virtual bool onChar(wxKeyEvent& ev);
virtual void onLoseFocus();
private:
private:
DropDownListP drop_down;
vector<int> active; ///< Which choices are active? (note: vector<bool> is evil)
friend class DropDownMultipleChoiceList;
+3 -3
View File
@@ -16,10 +16,10 @@
/// A drop down list of color choices
class DropDownPackageChoiceList : public DropDownList {
public:
public:
DropDownPackageChoiceList(Window* parent, PackageChoiceValueEditor* editor);
protected:
protected:
virtual size_t itemCount() const;
virtual String itemText(size_t item) const;
virtual bool lineBelow(size_t item) const;
@@ -27,7 +27,7 @@ class DropDownPackageChoiceList : public DropDownList {
virtual void select(size_t selection);
virtual size_t selection() const;
private:
private:
PackageChoiceValueEditor& editor;
};
+3 -3
View File
@@ -4,7 +4,7 @@
//| License: GNU General Public License 2 or later (see file COPYING) |
//+----------------------------------------------------------------------------+
#pragma once
#pragma once
// ----------------------------------------------------------------------------- : Includes
@@ -18,7 +18,7 @@ DECLARE_SHARED_POINTER_TYPE(DropDownList);
/// An editor 'control' for editing PackageChoiceValues
class PackageChoiceValueEditor : public PackageChoiceValueViewer, public ValueEditor {
public:
public:
DECLARE_VALUE_EDITOR(PackageChoice);
virtual void draw(RotatedDC& dc);
@@ -27,7 +27,7 @@ class PackageChoiceValueEditor : public PackageChoiceValueViewer, public ValueEd
virtual bool onChar(wxKeyEvent& ev);
virtual void onLoseFocus();
private:
private:
DropDownListP drop_down;
friend class DropDownPackageChoiceList;
/// Change the choice
+2 -2
View File
@@ -18,7 +18,7 @@ class ValueActionPerformer;
/// An editor 'control' for editing SymbolValues
class SymbolValueEditor : public SymbolValueViewer, public ValueEditor {
public:
public:
DECLARE_VALUE_EDITOR(Symbol);
virtual void draw(RotatedDC& dc);
@@ -27,7 +27,7 @@ class SymbolValueEditor : public SymbolValueViewer, public ValueEditor {
virtual bool onLeftDClick(const RealPoint& pos, wxMouseEvent&);
virtual bool onMotion (const RealPoint& pos, wxMouseEvent&);
virtual void determineSize(bool);
private:
private:
/// Draw a button, buttons are numbered from the right
void drawButton(RotatedDC& dc, int button, const String& text);
/// Is there a button at the given position? returns the button index, or -1 if there is no button
+6 -6
View File
@@ -30,9 +30,9 @@ DECLARE_SHARED_POINTER_TYPE(DropDownList);
/// A scrollbar to scroll a TextValueEditor
/** implemented as the scrollbar of a Window because that functions better */
class TextValueEditorScrollBar : public wxWindow {
public:
public:
TextValueEditorScrollBar(TextValueEditor& tve);
private:
private:
DECLARE_EVENT_TABLE();
TextValueEditor& tve;
@@ -65,7 +65,7 @@ END_EVENT_TABLE ()
// ----------------------------------------------------------------------------- : WordListPos
class WordListPos : public IntrusivePtrBase<WordListPos> {
public:
public:
WordListPos(size_t start, size_t end, WordListP word_list)
: start(start), end(end)
, rect(-1,-1,-1,-1)
@@ -107,7 +107,7 @@ struct DropDownWordListItem {
};
class DropDownWordList : public DropDownList {
public:
public:
DropDownWordList(Window* parent, bool is_submenu, TextValueEditor& tve, const WordListPosP& pos, const WordListWordP& list);
void setWords(const WordListWordP& words2);
@@ -115,7 +115,7 @@ class DropDownWordList : public DropDownList {
inline WordListPosP getPos() const { return pos; }
protected:
protected:
virtual void redrawArrowOnParent();
virtual size_t itemCount() const { return items.size(); }
virtual bool lineBelow(size_t item) const { return items[item].flags & FLAG_LINE_BELOW; }
@@ -125,7 +125,7 @@ class DropDownWordList : public DropDownList {
virtual size_t selection() const;
virtual void select(size_t item);
virtual bool stayOpen(size_t selection) const;
private:
private:
TextValueEditor& tve;
WordListPosP pos;
WordListWordP words; ///< The words we are listing
+4 -4
View File
@@ -28,7 +28,7 @@ enum IndexType
/** Okay, this class responds to pretty much every event available... :)
*/
class TextValueEditor : public TextValueViewer, public ValueEditor {
public:
public:
DECLARE_VALUE_EDITOR(Text);
~TextValueEditor();
@@ -83,9 +83,9 @@ class TextValueEditor : public TextValueViewer, public ValueEditor {
// --------------------------------------------------- : Search/replace
virtual bool search(FindInfo& find, bool from_start);
private:
private:
bool matchSubstr(const String& s, size_t pos, FindInfo& find);
public:
public:
// --------------------------------------------------- : Other
@@ -97,7 +97,7 @@ class TextValueEditor : public TextValueViewer, public ValueEditor {
virtual void draw(RotatedDC&);
// --------------------------------------------------- : Data
private:
private:
size_t selection_start, selection_end; ///< Cursor position/selection (if any), cursor positions
size_t selection_start_i, selection_end_i; ///< Cursor position/selection, character indices
bool selecting; ///< Selecting text?