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
+3 -3
View File
@@ -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();
+7 -7
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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)
+3 -3
View File
@@ -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&) {}
+3 -3
View File
@@ -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&);
+2 -2
View File
@@ -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;
+2 -2
View File
@@ -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;
+5 -5
View File
@@ -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
View File
@@ -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
+1 -1
View File
@@ -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,
+5 -5
View File
@@ -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();
+3 -3
View File
@@ -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
+3 -3
View File
@@ -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
+9 -9
View File
@@ -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;
};
+3 -3
View File
@@ -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;
+3 -3
View File
@@ -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?
+3 -3
View File
@@ -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();
+4 -5
View File
@@ -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