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
+4 -4
View File
@@ -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;
};
+6 -6
View File
@@ -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;
+5 -5
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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;
};
+8 -8
View File
@@ -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;
+3 -3
View File
@@ -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;
};
+3 -3
View File
@@ -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;
};
+7 -7
View File
@@ -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);
}
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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