mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 21:27:01 -04:00
Cleanup: indentation of public/protected/private keywords
This commit is contained in:
@@ -38,14 +38,14 @@ private:
|
||||
|
||||
/// A button that changes images on mouseenter/leave
|
||||
class HoverButtonBase : public wxControl {
|
||||
public:
|
||||
public:
|
||||
HoverButtonBase(Window* parent, int id, bool accepts_focus = true);
|
||||
|
||||
virtual bool AcceptsFocus() const;
|
||||
|
||||
virtual void SetHelpText(const String& s) { help_text = s; }
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
const bool accepts_focus;
|
||||
@@ -62,7 +62,7 @@ class HoverButtonBase : public wxControl {
|
||||
void onPaint (wxPaintEvent&);
|
||||
void onEraseBackground(wxEraseEvent&) {}
|
||||
|
||||
protected:
|
||||
protected:
|
||||
bool hover, focus, mouse_down, key_down;
|
||||
String help_text;
|
||||
|
||||
@@ -75,7 +75,7 @@ class HoverButtonBase : public wxControl {
|
||||
|
||||
/// A button that changes images on mouseenter/leave
|
||||
class HoverButton : public HoverButtonBase {
|
||||
public:
|
||||
public:
|
||||
/// Create a HoverButton, name is the resource name of the images to use
|
||||
/** name+"_normal", name+"_hover", name+"_focus", name+"_down"
|
||||
* are the resource names of the images used.
|
||||
@@ -85,7 +85,7 @@ class HoverButton : public HoverButtonBase {
|
||||
/// Load different bitmaps for this button
|
||||
void loadBitmaps(const String& name);
|
||||
|
||||
private:
|
||||
private:
|
||||
String bitmaps; ///< Name of the loaded bitmaps
|
||||
Bitmap bg_normal, bg_hover, bg_focus, bg_down; ///< Bitmaps for the states of the button
|
||||
Color background;
|
||||
@@ -94,7 +94,7 @@ class HoverButton : public HoverButtonBase {
|
||||
|
||||
const Bitmap* last_drawn;
|
||||
const Bitmap* toDraw() const;
|
||||
protected:
|
||||
protected:
|
||||
int drawDelta() const;
|
||||
virtual void refreshIfNeeded();
|
||||
virtual void draw(DC& dc);
|
||||
|
||||
@@ -23,7 +23,7 @@ DECLARE_EVENT_TYPE(EVENT_ITEM_SELECT, <not used>)
|
||||
DEFINE_EVENT_TYPE(EVENT_ITEM_SELECT);
|
||||
|
||||
class AutoReplaceList : public ItemList {
|
||||
public:
|
||||
public:
|
||||
AutoReplaceList(Window* parent, int id, const Game& game);
|
||||
|
||||
/// The items
|
||||
@@ -45,7 +45,7 @@ class AutoReplaceList : public ItemList {
|
||||
|
||||
using ItemList::refreshList;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
/// Get all items
|
||||
virtual void getItems(vector<VoidP>& out) const;
|
||||
/// Return the AutoReplace at the given position in the sorted list
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//| License: GNU General Public License 2 or later (see file COPYING) |
|
||||
//+----------------------------------------------------------------------------+
|
||||
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
// ----------------------------------------------------------------------------- : Includes
|
||||
|
||||
@@ -17,11 +17,11 @@ class AutoReplaceList;
|
||||
|
||||
/// A window for editing the AutoReplace words
|
||||
class AutoReplaceWindow : public wxDialog {
|
||||
public:
|
||||
public:
|
||||
/// Edit auto replace words for the given game
|
||||
AutoReplaceWindow(Window* parent, const Game& game);
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
AutoReplaceList* list;
|
||||
|
||||
@@ -24,7 +24,7 @@ enum ExportCardSelectionType
|
||||
};
|
||||
|
||||
class ExportCardSelectionChoice : public IntrusivePtrBase<ExportCardSelectionChoice> {
|
||||
public:
|
||||
public:
|
||||
ExportCardSelectionChoice();
|
||||
ExportCardSelectionChoice(const Set& set);
|
||||
ExportCardSelectionChoice(const String& label, const vector<CardP>& cards);
|
||||
@@ -40,7 +40,7 @@ typedef vector<ExportCardSelectionChoiceP> ExportCardSelectionChoices;
|
||||
|
||||
/// Base class for export windows, deals with card selection
|
||||
class ExportWindowBase : public wxDialog {
|
||||
public:
|
||||
public:
|
||||
ExportWindowBase(Window* parent, const String& window_title,
|
||||
const SetP& set, const ExportCardSelectionChoices& cards_choices, long style = wxDEFAULT_DIALOG_STYLE);
|
||||
/// Create the controls, return a sizer containing them
|
||||
@@ -49,13 +49,13 @@ class ExportWindowBase : public wxDialog {
|
||||
/// Get the selected cards
|
||||
const vector<CardP>& getSelection() const { return *cards; }
|
||||
|
||||
protected:
|
||||
protected:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
SetP set; ///< Set to export
|
||||
const vector<CardP>* cards; ///< Cards to export
|
||||
|
||||
private:
|
||||
private:
|
||||
ExportCardSelectionChoices cards_choices; ///< Ways to select cards
|
||||
size_t active_choice;
|
||||
wxStaticText* card_count;
|
||||
@@ -72,7 +72,7 @@ class ExportWindowBase : public wxDialog {
|
||||
/** this is used when printing or exporting
|
||||
*/
|
||||
class CardSelectWindow : public wxDialog {
|
||||
public:
|
||||
public:
|
||||
CardSelectWindow(Window* parent, const SetP& set, const String& label, const String& title, bool sizer=true);
|
||||
|
||||
/// Is the given card selected?
|
||||
@@ -82,7 +82,7 @@ class CardSelectWindow : public wxDialog {
|
||||
/// Change which cards are selected
|
||||
void setSelection(const vector<CardP>& cards);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
SelectCardList* list;
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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&) {}
|
||||
|
||||
@@ -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&);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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?
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -20,10 +20,10 @@
|
||||
|
||||
// Class that intercepts all events not directed to a DropDownList, and closes the list
|
||||
class DropDownHider : public wxEvtHandler {
|
||||
public:
|
||||
public:
|
||||
DropDownHider(DropDownList& list) : list(list) {}
|
||||
|
||||
private:
|
||||
private:
|
||||
DropDownList& list;
|
||||
|
||||
virtual bool ProcessEvent(wxEvent& ev) {
|
||||
|
||||
@@ -18,10 +18,10 @@ DECLARE_POINTER_TYPE(Set);
|
||||
// ----------------------------------------------------------------------------- : HtmlExportWindow
|
||||
|
||||
class HtmlExportWindow : public ExportWindowBase {
|
||||
public:
|
||||
public:
|
||||
HtmlExportWindow(Window* parent, const SetP& set, const ExportCardSelectionChoices& cards_choices);
|
||||
|
||||
private:
|
||||
private:
|
||||
PackageList* list; ///< List of templates
|
||||
ExportOptionsEditor* options; ///< Editor for template options
|
||||
SetP set; ///< Set to export
|
||||
|
||||
@@ -27,7 +27,7 @@ enum PreferedProperty
|
||||
|
||||
/// A slice of an image, i.e. a selected rectangle
|
||||
class ImageSlice {
|
||||
public:
|
||||
public:
|
||||
ImageSlice(const Image& source, const wxSize& target_size);
|
||||
|
||||
Image source; ///< The source image
|
||||
@@ -57,14 +57,14 @@ class ImageSlice {
|
||||
|
||||
/// Dialog for selecting a slice of an image
|
||||
class ImageSliceWindow : public wxDialog {
|
||||
public:
|
||||
public:
|
||||
ImageSliceWindow(Window* parent, const Image& source, const wxSize& target_size, const AlphaMask& target_mask);
|
||||
|
||||
/// Return the sliced image
|
||||
Image getImage() const;
|
||||
|
||||
// --------------------------------------------------- : Data
|
||||
private:
|
||||
private:
|
||||
// The slice we are extracting
|
||||
ImageSlice slice;
|
||||
// Gui items
|
||||
@@ -114,14 +114,14 @@ class ImageSliceWindow : public wxDialog {
|
||||
|
||||
/// A preview of the sliced image
|
||||
class ImageSlicePreview : public wxControl {
|
||||
public:
|
||||
public:
|
||||
ImageSlicePreview(Window* parent, int id, ImageSlice& slice, const AlphaMask& mask);
|
||||
|
||||
/// Notify that the slice was updated
|
||||
void update();
|
||||
|
||||
// --------------------------------------------------- : Data
|
||||
private:
|
||||
private:
|
||||
Bitmap bitmap;
|
||||
ImageSlice& slice;
|
||||
const AlphaMask& mask;
|
||||
@@ -149,14 +149,14 @@ class ImageSlicePreview : public wxControl {
|
||||
|
||||
// A overview of the slicing of the image, allows to select the sliced area
|
||||
class ImageSliceSelector : public wxControl {
|
||||
public:
|
||||
public:
|
||||
ImageSliceSelector(Window* parent, int id, ImageSlice& slice);
|
||||
|
||||
/// Notify that the slice was updated
|
||||
void update();
|
||||
|
||||
// --------------------------------------------------- : Data
|
||||
private:
|
||||
private:
|
||||
ImageSlice& slice;
|
||||
Bitmap bitmap, bitmap_no_sel; ///< Bitmaps showing selection
|
||||
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
|
||||
/// A window for selecting a subset of the cards from a set to export to images
|
||||
class ImagesExportWindow : public ExportWindowBase {
|
||||
public:
|
||||
public:
|
||||
ImagesExportWindow(Window* parent, const SetP& set, const ExportCardSelectionChoices& choices);
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
void onOk(wxCommandEvent&);
|
||||
|
||||
@@ -22,14 +22,14 @@ SetP new_set_window(Window* parent);
|
||||
|
||||
/// "Create a new set" dialog. First select game, then matching style.
|
||||
class NewSetWindow : public wxDialog {
|
||||
public:
|
||||
public:
|
||||
/// The newly created set, if any
|
||||
SetP set;
|
||||
|
||||
NewSetWindow(Window* parent);
|
||||
|
||||
// --------------------------------------------------- : data
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
// gui items
|
||||
@@ -59,14 +59,14 @@ StyleSheetP select_stylesheet(const Game& game, const String& failed_name);
|
||||
|
||||
/// "Create a new set" dialog. First select game, then matching style.
|
||||
class SelectStyleSheetWindow : public wxDialog {
|
||||
public:
|
||||
public:
|
||||
/// The selected stylesheet, if any
|
||||
StyleSheetP stylesheet;
|
||||
|
||||
SelectStyleSheetWindow(Window* parent, const Game& game, const String& failed_name);
|
||||
|
||||
// --------------------------------------------------- : data
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
const Game& game;
|
||||
|
||||
@@ -119,7 +119,7 @@ void PackageUpdateList::TreeItem::setIcon(const Image& img) {
|
||||
/// wx doesn't allow seeking on InputStreams from a wxURL
|
||||
/// The built in buffer class is too stupid to seek, so we must do it ourselfs
|
||||
class SeekAtStartInputStream : public wxFilterInputStream {
|
||||
public:
|
||||
public:
|
||||
SeekAtStartInputStream(wxInputStream& stream)
|
||||
: wxFilterInputStream(stream)
|
||||
, buffer_pos(0)
|
||||
@@ -129,33 +129,33 @@ class SeekAtStartInputStream : public wxFilterInputStream {
|
||||
}
|
||||
|
||||
bool IsSeekable() const { return true; }
|
||||
protected:
|
||||
virtual size_t OnSysRead(void *buffer, size_t bufsize) {
|
||||
protected:
|
||||
virtual size_t OnSysRead(void *buffer, size_t bufsize) {
|
||||
size_t len = min(buffer_size - buffer_pos, bufsize);
|
||||
memcpy(buffer, this->buffer + buffer_pos, len);
|
||||
buffer_pos += len;
|
||||
m_parent_i_stream->Read((Byte*)buffer + len, bufsize - len);
|
||||
return m_parent_i_stream->LastRead() + len;
|
||||
}
|
||||
virtual wxFileOffset OnSysSeek(wxFileOffset seek, wxSeekMode mode) {
|
||||
return m_parent_i_stream->LastRead() + len;
|
||||
}
|
||||
virtual wxFileOffset OnSysSeek(wxFileOffset seek, wxSeekMode mode) {
|
||||
if (mode == wxFromStart) buffer_pos = seek;
|
||||
else if (mode == wxFromCurrent) buffer_pos += seek;
|
||||
else assert(false);
|
||||
assert(buffer_pos < buffer_size);
|
||||
return buffer_pos;
|
||||
}
|
||||
virtual wxFileOffset OnSysTell() const {
|
||||
}
|
||||
virtual wxFileOffset OnSysTell() const {
|
||||
assert(buffer_pos < buffer_size);
|
||||
return buffer_pos;
|
||||
}
|
||||
private:
|
||||
}
|
||||
private:
|
||||
size_t buffer_size, buffer_pos;
|
||||
Byte buffer[1024];
|
||||
};
|
||||
|
||||
/// Retrieve the icon for a package
|
||||
class PackageIconRequest : public ThumbnailRequest {
|
||||
public:
|
||||
public:
|
||||
PackageIconRequest(PackageUpdateList* list, PackageUpdateList::TreeItem* ti)
|
||||
: ThumbnailRequest(
|
||||
list,
|
||||
@@ -177,7 +177,7 @@ class PackageIconRequest : public ThumbnailRequest {
|
||||
ti->setIcon(image);
|
||||
list->Refresh(false);
|
||||
}
|
||||
private:
|
||||
private:
|
||||
PackageUpdateList* list;
|
||||
PackageUpdateList::TreeItem* ti;
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
/// A list of installed and downloadable packages
|
||||
class PackageUpdateList : public TreeList {
|
||||
public:
|
||||
public:
|
||||
PackageUpdateList(Window* parent, const InstallablePackages& packages, bool show_only_installable, int id = wxID_ANY);
|
||||
~PackageUpdateList();
|
||||
|
||||
@@ -28,7 +28,7 @@ class PackageUpdateList : public TreeList {
|
||||
return static_pointer_cast<TreeItem>(items[item])->package;
|
||||
}
|
||||
|
||||
protected:
|
||||
protected:
|
||||
// overridden methods from TreeList
|
||||
virtual void initItems();
|
||||
virtual void drawItem(DC& dc, size_t index, size_t column, int x, int y, bool selected) const;
|
||||
@@ -37,18 +37,18 @@ class PackageUpdateList : public TreeList {
|
||||
virtual String columnText(size_t column) const;
|
||||
virtual int columnWidth(size_t column) const;
|
||||
|
||||
private:
|
||||
private:
|
||||
/// The list of packages we are displaying
|
||||
const InstallablePackages& packages;
|
||||
/// Show only packages with an installer?
|
||||
bool show_only_installable;
|
||||
|
||||
class TreeItem;
|
||||
public:
|
||||
public:
|
||||
typedef intrusive_ptr<TreeItem> TreeItemP;
|
||||
private:
|
||||
private:
|
||||
class TreeItem : public Item {
|
||||
public:
|
||||
public:
|
||||
TreeItem() : position_type(TYPE_OTHER), position_hint(1000000) {}
|
||||
String label;
|
||||
vector<TreeItemP> children;
|
||||
|
||||
@@ -44,7 +44,7 @@ struct HtmlWindowToBrowser : public wxHtmlWindow {
|
||||
|
||||
/// Handle downloading of installers
|
||||
class DownloadableInstallerList {
|
||||
public:
|
||||
public:
|
||||
DownloadableInstallerList() : status(NONE) {}
|
||||
|
||||
/// start downloading, return true if we are done
|
||||
@@ -52,7 +52,7 @@ class DownloadableInstallerList {
|
||||
|
||||
vector<DownloadableInstallerP> installers;
|
||||
|
||||
private:
|
||||
private:
|
||||
enum Status { NONE, DOWNLOADING, DONE } status;
|
||||
wxMutex lock;
|
||||
|
||||
@@ -99,13 +99,13 @@ wxThread::ExitCode DownloadableInstallerList::Thread::Entry() {
|
||||
|
||||
/// Information on a package
|
||||
class PackageInfoPanel : public wxPanel {
|
||||
public:
|
||||
public:
|
||||
PackageInfoPanel(Window* parent);
|
||||
|
||||
void setPackage(const InstallablePackageP& package);
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
private:
|
||||
private:
|
||||
InstallablePackageP package;
|
||||
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//| License: GNU General Public License 2 or later (see file COPYING) |
|
||||
//+----------------------------------------------------------------------------+
|
||||
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
// ----------------------------------------------------------------------------- : Includes
|
||||
|
||||
@@ -18,14 +18,14 @@ class PackageInfoPanel;
|
||||
|
||||
/// A window that displays the installed packages and updates to them
|
||||
class PackagesWindow : public wxDialog {
|
||||
public:
|
||||
public:
|
||||
/// Show the packages window, optionally downloading the package database from the website
|
||||
PackagesWindow(Window* parent, bool download_package_list = true);
|
||||
/// Show the packages window for an installer
|
||||
PackagesWindow(Window* parent, const InstallerP& installer);
|
||||
~PackagesWindow();
|
||||
|
||||
private:
|
||||
private:
|
||||
PackageUpdateList* package_list; ///< List of available packages
|
||||
PackageInfoPanel* package_info; ///< Description of the selected package
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
// A page from the preferences dialog
|
||||
class PreferencesPage : public wxPanel {
|
||||
public:
|
||||
public:
|
||||
PreferencesPage(Window* parent)
|
||||
: wxPanel(parent, wxID_ANY)
|
||||
{}
|
||||
@@ -34,22 +34,22 @@ class PreferencesPage : public wxPanel {
|
||||
|
||||
// Preferences page for global MSE settings
|
||||
class GlobalPreferencesPage : public PreferencesPage {
|
||||
public:
|
||||
public:
|
||||
GlobalPreferencesPage(Window* parent);
|
||||
void store();
|
||||
|
||||
private:
|
||||
private:
|
||||
wxComboBox* language;
|
||||
wxCheckBox* open_sets_in_new_window;
|
||||
};
|
||||
|
||||
// Preferences page for card viewing related settings
|
||||
class DisplayPreferencesPage : public PreferencesPage {
|
||||
public:
|
||||
public:
|
||||
DisplayPreferencesPage(Window* parent);
|
||||
void store();
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
wxCheckBox* high_quality, *borders, *draw_editing, *spellcheck_enabled;
|
||||
@@ -72,11 +72,11 @@ class DisplayPreferencesPage : public PreferencesPage {
|
||||
// i.e. Apprentice, Magic Workstation
|
||||
// perhaps in the future also directories for packages?
|
||||
class DirsPreferencesPage : public PreferencesPage {
|
||||
public:
|
||||
public:
|
||||
DirsPreferencesPage(Window* parent);
|
||||
void store();
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
wxTextCtrl* apprentice;
|
||||
@@ -86,11 +86,11 @@ class DirsPreferencesPage : public PreferencesPage {
|
||||
|
||||
// Preferences page for automatic updates
|
||||
class UpdatePreferencesPage : public PreferencesPage {
|
||||
public:
|
||||
public:
|
||||
UpdatePreferencesPage(Window* parent);
|
||||
void store();
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
wxChoice* check_at_startup;
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
|
||||
/// Dialog for the program settings, rendered as a set of pages
|
||||
class PreferencesWindow : public wxDialog {
|
||||
public:
|
||||
public:
|
||||
PreferencesWindow(Window* parent);
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
/// Close the dialog, and store all settings
|
||||
|
||||
@@ -52,7 +52,7 @@ void PageLayout::init(const StyleSheet& stylesheet, PageLayoutType type, const R
|
||||
|
||||
/// A printout object specifying how to print a specified set of cards
|
||||
class CardsPrintout : public wxPrintout {
|
||||
public:
|
||||
public:
|
||||
CardsPrintout(PrintJobP const& job);
|
||||
/// Number of pages, and something else I don't understand...
|
||||
virtual void GetPageInfo(int* pageMin, int* pageMax, int* pageFrom, int* pageTo);
|
||||
@@ -63,7 +63,7 @@ class CardsPrintout : public wxPrintout {
|
||||
/// Print a page
|
||||
virtual bool OnPrintPage(int page);
|
||||
|
||||
private:
|
||||
private:
|
||||
PrintJobP job; ///< Cards to print
|
||||
DataViewer viewer;
|
||||
double scale_x, scale_y; // priter pixel per mm
|
||||
|
||||
@@ -22,7 +22,7 @@ class StyleSheet;
|
||||
|
||||
/// Layout of a page of cards
|
||||
class PageLayout {
|
||||
public:
|
||||
public:
|
||||
// layout
|
||||
RealSize page_size; ///< Size of a page (in millimetres)
|
||||
RealSize card_size; ///< Size of a card (in millimetres)
|
||||
@@ -41,7 +41,7 @@ class PageLayout {
|
||||
};
|
||||
|
||||
class PrintJob : public IntrusivePtrBase<PrintJob> {
|
||||
public:
|
||||
public:
|
||||
PrintJob(SetP const& set) : set(set) {}
|
||||
|
||||
// set and cards to print
|
||||
|
||||
@@ -17,14 +17,14 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
class ProfilerPanel : public wxPanel {
|
||||
public:
|
||||
public:
|
||||
ProfilerPanel(wxWindow* parent, bool fancy_effects);
|
||||
~ProfilerPanel();
|
||||
|
||||
virtual bool AcceptsFocus() const { return false; }
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
private:
|
||||
private:
|
||||
bool fancy_effects;
|
||||
wxTimer timer;
|
||||
wxStopWatch stopwatch;
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -17,7 +17,7 @@ class wxSpinCtrl;
|
||||
|
||||
/// Editor for drawing basic shapes such as rectangles and polygons
|
||||
class SymbolBasicShapeEditor : public SymbolEditorBase {
|
||||
public:
|
||||
public:
|
||||
SymbolBasicShapeEditor(SymbolControl* control);
|
||||
|
||||
// --------------------------------------------------- : Drawing
|
||||
@@ -45,7 +45,7 @@ class SymbolBasicShapeEditor : public SymbolEditorBase {
|
||||
virtual bool isEditing();
|
||||
|
||||
// --------------------------------------------------- : Data
|
||||
private:
|
||||
private:
|
||||
int mode;
|
||||
SymbolShapeP shape;
|
||||
Vector2D start;
|
||||
|
||||
@@ -23,7 +23,7 @@ DECLARE_POINTER_TYPE(SymbolEditorBase);
|
||||
* That object handles all events and the drawing. This class is mostly just a proxy.
|
||||
*/
|
||||
class SymbolControl : public wxControl, public SymbolViewer {
|
||||
public:
|
||||
public:
|
||||
SymbolControl(SymbolWindow* parent, int id, const SymbolP& symbol);
|
||||
|
||||
virtual void onChangeSymbol();
|
||||
@@ -57,14 +57,14 @@ class SymbolControl : public wxControl, public SymbolViewer {
|
||||
/// Are we editing?
|
||||
bool isEditing();
|
||||
|
||||
private:
|
||||
private:
|
||||
/// Switch the a different editor object
|
||||
void switchEditor(const SymbolEditorBaseP& e);
|
||||
|
||||
/// Draw the editor
|
||||
void draw(DC& dc);
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
// --------------------------------------------------- : Data
|
||||
@@ -79,7 +79,7 @@ class SymbolControl : public wxControl, public SymbolViewer {
|
||||
/// Parent window
|
||||
SymbolWindow* parent;
|
||||
|
||||
private:
|
||||
private:
|
||||
/// The current editor
|
||||
SymbolEditorBaseP editor;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ class SymbolControl;
|
||||
* NOTE : Do not confuse with SymbolEditor (a FieldEditor)
|
||||
*/
|
||||
class SymbolEditorBase : public IntrusivePtrVirtualBase {
|
||||
protected:
|
||||
protected:
|
||||
/// The control for which we are editing
|
||||
SymbolControl& control;
|
||||
|
||||
@@ -33,7 +33,7 @@ class SymbolEditorBase : public IntrusivePtrVirtualBase {
|
||||
|
||||
void SetStatusText(const String& text);
|
||||
|
||||
public:
|
||||
public:
|
||||
SymbolEditorBase(SymbolControl* control)
|
||||
: control(*control)
|
||||
{}
|
||||
|
||||
@@ -27,7 +27,7 @@ DECLARE_LOCAL_EVENT_TYPE(EVENT_PART_ACTIVATE, <not used>)
|
||||
// ----------------------------------------------------------------------------- : SymbolPartList
|
||||
|
||||
class SymbolPartList : public wxScrolledWindow, public SymbolView {
|
||||
public:
|
||||
public:
|
||||
SymbolPartList(Window* parent, int id, SymbolPartsSelection& selection, SymbolP symbol = SymbolP());
|
||||
|
||||
/// Another symbol is being viewed
|
||||
@@ -40,9 +40,9 @@ class SymbolPartList : public wxScrolledWindow, public SymbolView {
|
||||
/// Update only a subset of the parts
|
||||
void updateParts(const set<SymbolPartP>& parts);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
private:
|
||||
private:
|
||||
SymbolPartsSelection& selection; ///< Store selection here
|
||||
int number_of_items;
|
||||
|
||||
|
||||
@@ -20,14 +20,14 @@ class CurveDragAction;
|
||||
|
||||
// Symbol editor for editing control points and handles
|
||||
class SymbolPointEditor : public SymbolEditorBase {
|
||||
public:
|
||||
public:
|
||||
SymbolPointEditor(SymbolControl* control, const SymbolShapeP& part);
|
||||
|
||||
// --------------------------------------------------- : Drawing
|
||||
|
||||
virtual void draw(DC& dc);
|
||||
|
||||
private:
|
||||
private:
|
||||
/// Draws a gradient on the selected line to indicate curve dragging
|
||||
void drawHoveredLine(DC& dc);
|
||||
/// Draw all handles belonging to selected points
|
||||
@@ -53,7 +53,7 @@ class SymbolPointEditor : public SymbolEditorBase {
|
||||
/// Retrieve a pen for the drawing of other things
|
||||
wxPen otherPen(WhichPen p);
|
||||
|
||||
public:
|
||||
public:
|
||||
// --------------------------------------------------- : UI
|
||||
|
||||
virtual void initUI (wxToolBar* tb, wxMenuBar* mb);
|
||||
@@ -76,7 +76,7 @@ class SymbolPointEditor : public SymbolEditorBase {
|
||||
virtual void onChar(wxKeyEvent& ev);
|
||||
virtual bool isEditing();
|
||||
|
||||
private:
|
||||
private:
|
||||
// --------------------------------------------------- : Data
|
||||
|
||||
// The symbol part we are editing
|
||||
|
||||
@@ -20,14 +20,14 @@ DECLARE_POINTER_TYPE(SymbolPartShearAction);
|
||||
|
||||
/// Editor that allows the user to select symbol parts
|
||||
class SymbolSelectEditor : public SymbolEditorBase {
|
||||
public:
|
||||
public:
|
||||
SymbolSelectEditor(SymbolControl* control, bool rotate);
|
||||
|
||||
// --------------------------------------------------- : Drawing
|
||||
|
||||
virtual void draw(DC& dc);
|
||||
|
||||
private:
|
||||
private:
|
||||
/// Draw handles on all sides
|
||||
void drawHandles(DC& dc);
|
||||
/// Draw a handle, dx and dy indicate the side, can be {-1,0,1}
|
||||
@@ -36,7 +36,7 @@ class SymbolSelectEditor : public SymbolEditorBase {
|
||||
/// Draw the rotation center
|
||||
void drawRotationCenter(DC& dc, const Vector2D& pos);
|
||||
|
||||
public:
|
||||
public:
|
||||
// --------------------------------------------------- : UI
|
||||
|
||||
virtual void initUI (wxToolBar* tb, wxMenuBar* mb);
|
||||
@@ -60,7 +60,7 @@ class SymbolSelectEditor : public SymbolEditorBase {
|
||||
|
||||
virtual bool isEditing();
|
||||
|
||||
private:
|
||||
private:
|
||||
// The part under the mouse cursor
|
||||
SymbolPartP highlightPart;
|
||||
// Actions
|
||||
|
||||
@@ -27,7 +27,7 @@ enum SelectMode
|
||||
|
||||
/// The selected parts of a symbol, enforcing constraints
|
||||
class SymbolPartsSelection {
|
||||
public:
|
||||
public:
|
||||
inline SymbolPartsSelection() : root(nullptr) {}
|
||||
|
||||
void setSymbol(const SymbolP& symbol);
|
||||
@@ -69,7 +69,7 @@ class SymbolPartsSelection {
|
||||
return *selection.begin();
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
Symbol* root;
|
||||
set<SymbolPartP> selection;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class SymmetryMoveAction;
|
||||
|
||||
/// Editor for adding symmetries
|
||||
class SymbolSymmetryEditor : public SymbolEditorBase {
|
||||
public:
|
||||
public:
|
||||
/** The symmetry parameter is optional, if it is not set, then only new ones can be created */
|
||||
SymbolSymmetryEditor(SymbolControl* control, const SymbolSymmetryP& symmetry);
|
||||
|
||||
@@ -48,7 +48,7 @@ class SymbolSymmetryEditor : public SymbolEditorBase {
|
||||
virtual bool isEditing();
|
||||
|
||||
// --------------------------------------------------- : Data
|
||||
private:
|
||||
private:
|
||||
SymbolSymmetryP& symmetry;
|
||||
// controls
|
||||
wxSpinCtrl* copies;
|
||||
|
||||
@@ -20,7 +20,7 @@ DECLARE_POINTER_TYPE(ValueActionPerformer);
|
||||
|
||||
/// The window for editing symbols
|
||||
class SymbolWindow : public wxFrame {
|
||||
public:
|
||||
public:
|
||||
/// Construct a SymbolWindow
|
||||
SymbolWindow(Window* parent);
|
||||
/// Construct a SymbolWindow showing a symbol from a file
|
||||
@@ -29,7 +29,7 @@ class SymbolWindow : public wxFrame {
|
||||
SymbolWindow(Window* parent, ValueActionPerformer* performer);
|
||||
~SymbolWindow();
|
||||
|
||||
private:
|
||||
private:
|
||||
// --------------------------------------------------- : Children
|
||||
|
||||
/// Actual initialisation
|
||||
@@ -66,7 +66,7 @@ class SymbolWindow : public wxFrame {
|
||||
|
||||
bool inSelectionEvent; ///< Prevent recursion in onSelect...
|
||||
|
||||
public:
|
||||
public:
|
||||
void onSelectFromControl();
|
||||
};
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ String safe_filename(const String& str) {
|
||||
// ----------------------------------------------------------------------------- : ThumbnailThreadWorker
|
||||
|
||||
class ThumbnailThreadWorker : public wxThread {
|
||||
public:
|
||||
public:
|
||||
ThumbnailThreadWorker(ThumbnailThread* parent);
|
||||
|
||||
virtual ExitCode Entry();
|
||||
|
||||
@@ -20,7 +20,7 @@ class ThumbnailThreadWorker;
|
||||
|
||||
/// A request for some kind of thumbnail
|
||||
class ThumbnailRequest : public IntrusivePtrVirtualBase {
|
||||
public:
|
||||
public:
|
||||
ThumbnailRequest(void* owner, const String& cache_name, const wxDateTime& modified)
|
||||
: owner(owner), cache_name(cache_name), modified(modified) {}
|
||||
|
||||
@@ -51,7 +51,7 @@ class ThumbnailRequest : public IntrusivePtrVirtualBase {
|
||||
* Thumbnails are cached, and need not be generated in a thread
|
||||
*/
|
||||
class ThumbnailThread {
|
||||
public:
|
||||
public:
|
||||
ThumbnailThread();
|
||||
|
||||
/// Request a thumbnail, it may be store()d immediatly if the thumbnail is cached
|
||||
@@ -65,7 +65,7 @@ class ThumbnailThread {
|
||||
/** *must* be called at application exit */
|
||||
void abortAll();
|
||||
|
||||
private:
|
||||
private:
|
||||
wxMutex mutex; ///< Mutex used by the worker when accessing the request lists or the thread pointer
|
||||
wxCondition completed; ///< Event signaled when a request is completed
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ bool update_available() {
|
||||
// Checks if the current version is the latest version
|
||||
// If not, displays a message
|
||||
class CheckUpdateThread : public wxThread {
|
||||
public:
|
||||
public:
|
||||
virtual void* Entry() {
|
||||
Work();
|
||||
return 0;
|
||||
|
||||
@@ -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()); }
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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&);
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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?
|
||||
|
||||
@@ -24,10 +24,10 @@ DECLARE_POINTER_TYPE(Set);
|
||||
* - new game, new style?
|
||||
*/
|
||||
class WelcomeWindow : public wxFrame {
|
||||
public:
|
||||
public:
|
||||
WelcomeWindow();
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
// MSE logos
|
||||
@@ -54,15 +54,15 @@ class WelcomeWindow : public wxFrame {
|
||||
|
||||
/// An extended hover button, not only has base images, but also has two labels
|
||||
class HoverButtonExt : public HoverButton {
|
||||
public:
|
||||
public:
|
||||
HoverButtonExt(Window* parent, int id, const wxImage& icon_name, const String& label, const String& sub_label);
|
||||
|
||||
private:
|
||||
private:
|
||||
Bitmap icon;
|
||||
String label, sub_label;
|
||||
wxFont font_large, font_small;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
virtual void draw(DC& dc);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user