Use new WX object macro

Added in 2010.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
Ralph Sennhauser
2026-07-19 07:35:47 +02:00
parent 8523fa5ab4
commit aae1bbbab2
25 changed files with 38 additions and 38 deletions
@@ -1,4 +1,4 @@
/* Copyright (C) 2025 Wildfire Games.
/* Copyright (C) 2026 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@@ -29,7 +29,7 @@
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_CLASS(DragCommand, AtlasWindowCommand);
wxIMPLEMENT_CLASS(DragCommand, AtlasWindowCommand);
DragCommand::DragCommand(DraggableListCtrl* ctrl, long src, long tgt)
: AtlasWindowCommand(true, _("Drag")), m_Ctrl(ctrl), m_Src(src), m_Tgt(tgt)
@@ -104,7 +104,7 @@ bool DragCommand::Merge(AtlasWindowCommand* command)
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_CLASS(DeleteCommand, AtlasWindowCommand);
wxIMPLEMENT_CLASS(DeleteCommand, AtlasWindowCommand);
DeleteCommand::DeleteCommand(DraggableListCtrl* ctrl, long itemID)
: AtlasWindowCommand(true, _("Delete")), m_Ctrl(ctrl), m_ItemID(itemID)
@@ -25,7 +25,7 @@ class DraggableListCtrl;
class DragCommand : public AtlasWindowCommand
{
DECLARE_CLASS(DragCommand);
wxDECLARE_CLASS(DragCommand);
public:
DragCommand(DraggableListCtrl* ctrl, long src, long tgt);
@@ -44,7 +44,7 @@ private:
class DeleteCommand : public AtlasWindowCommand
{
DECLARE_CLASS(DeleteCommand);
wxDECLARE_CLASS(DeleteCommand);
public:
DeleteCommand(DraggableListCtrl* ctrl, long itemID);
@@ -1,4 +1,4 @@
/* Copyright (C) 2025 Wildfire Games.
/* Copyright (C) 2026 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@@ -27,7 +27,7 @@
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_CLASS(EditCommand_Dialog, AtlasWindowCommand);
wxIMPLEMENT_CLASS(EditCommand_Dialog, AtlasWindowCommand);
EditCommand_Dialog::EditCommand_Dialog(EditableListCtrl* ctrl, long row, int col, AtObj& newData)
: AtlasWindowCommand(true, _("Edit")), m_Ctrl(ctrl), m_Row(row), m_Col(col), m_NewData(newData)
@@ -60,7 +60,7 @@ bool EditCommand_Dialog::Undo()
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_CLASS(EditCommand_Text, AtlasWindowCommand);
wxIMPLEMENT_CLASS(EditCommand_Text, AtlasWindowCommand);
EditCommand_Text::EditCommand_Text(EditableListCtrl* ctrl, long row, int col, wxString newText)
: AtlasWindowCommand(true, _("Edit")), m_Ctrl(ctrl), m_Row(row), m_Col(col), m_NewText(newText)
@@ -93,7 +93,7 @@ bool EditCommand_Text::Undo()
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_CLASS(PasteCommand, AtlasWindowCommand);
wxIMPLEMENT_CLASS(PasteCommand, AtlasWindowCommand);
PasteCommand::PasteCommand(EditableListCtrl* ctrl, long row, AtObj& newData)
: AtlasWindowCommand(true, _("Paste")), m_Ctrl(ctrl), m_Row(row), m_NewData(newData)
@@ -26,7 +26,7 @@ class EditableListCtrl;
class EditCommand_Dialog : public AtlasWindowCommand
{
DECLARE_CLASS(EditCommand_Dialog);
wxDECLARE_CLASS(EditCommand_Dialog);
public:
EditCommand_Dialog(EditableListCtrl* ctrl, long row, int col, AtObj& newData);
@@ -46,7 +46,7 @@ private:
class EditCommand_Text : public AtlasWindowCommand
{
DECLARE_CLASS(EditCommand_Text);
wxDECLARE_CLASS(EditCommand_Text);
public:
EditCommand_Text(EditableListCtrl* ctrl, long row, int col, wxString newText);
@@ -65,7 +65,7 @@ private:
class PasteCommand : public AtlasWindowCommand
{
DECLARE_CLASS(PasteCommand);
wxDECLARE_CLASS(PasteCommand);
public:
PasteCommand(EditableListCtrl* ctrl, long row, AtObj& newData);
@@ -186,7 +186,7 @@ private:
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_DYNAMIC_CLASS(QuickFileCtrl, wxPanel);
wxIMPLEMENT_DYNAMIC_CLASS(QuickFileCtrl, wxPanel);
QuickFileCtrl::QuickFileCtrl(wxWindow* parent,
wxRect& location,
@@ -33,7 +33,7 @@
class wxSize;
class wxWindow;
IMPLEMENT_CLASS(AtlasDialog, wxDialog);
wxIMPLEMENT_CLASS(AtlasDialog, wxDialog);
wxBEGIN_EVENT_TABLE(AtlasDialog, wxDialog)
EVT_MENU(wxID_UNDO, AtlasDialog::OnUndo)
@@ -35,7 +35,7 @@ class AtlasDialog : public wxDialog, public IAtlasSerialiser
friend class FieldEditCtrl_Dialog;
friend class AtlasWindowCommandProc;
DECLARE_CLASS(AtlasDialog);
wxDECLARE_CLASS(AtlasDialog);
public:
AtlasDialog(wxWindow* parent, const wxString& title, const wxSize& size);
@@ -95,7 +95,7 @@ wxEND_EVENT_TABLE()
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_CLASS(AtlasWindow, wxFrame);
wxIMPLEMENT_CLASS(AtlasWindow, wxFrame);
wxBEGIN_EVENT_TABLE(AtlasWindow, wxFrame)
EVT_MENU(wxID_NEW, AtlasWindow::OnNew)
@@ -39,7 +39,7 @@ class AtlasWindow : public wxFrame, public IAtlasSerialiser
{
friend class AtlasWindowCommandProc;
DECLARE_CLASS(AtlasWindow);
wxDECLARE_CLASS(AtlasWindow);
public:
@@ -1,4 +1,4 @@
/* Copyright (C) 2025 Wildfire Games.
/* Copyright (C) 2026 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@@ -26,10 +26,10 @@
#include <wx/log.h>
#include <wx/translation.h>
IMPLEMENT_ABSTRACT_CLASS(AtlasWindowCommand, wxCommand);
wxIMPLEMENT_ABSTRACT_CLASS(AtlasWindowCommand, wxCommand);
IMPLEMENT_CLASS(AtlasCommand_Begin, AtlasWindowCommand);
IMPLEMENT_CLASS(AtlasCommand_End, AtlasWindowCommand);
wxIMPLEMENT_CLASS(AtlasCommand_Begin, AtlasWindowCommand);
wxIMPLEMENT_CLASS(AtlasCommand_End, AtlasWindowCommand);
AtlasCommand_Begin::AtlasCommand_Begin(const wxString& description, IAtlasSerialiser* object)
: AtlasWindowCommand(true, description),
@@ -29,7 +29,7 @@ class IAtlasSerialiser;
class AtlasWindowCommand : public wxCommand
{
DECLARE_ABSTRACT_CLASS(AtlasWindowCommand);
wxDECLARE_ABSTRACT_CLASS(AtlasWindowCommand);
friend class AtlasWindowCommandProc;
@@ -53,7 +53,7 @@ private:
class AtlasCommand_Begin : public AtlasWindowCommand
{
DECLARE_CLASS(AtlasCommand_Begin);
wxDECLARE_CLASS(AtlasCommand_Begin);
friend class AtlasCommand_End;
@@ -70,7 +70,7 @@ private:
class AtlasCommand_End : public AtlasWindowCommand
{
DECLARE_CLASS(AtlasCommand_End);
wxDECLARE_CLASS(AtlasCommand_End);
public:
AtlasCommand_End() : AtlasWindowCommand(true, _T("[error]")) {}
@@ -187,4 +187,4 @@ public:
Viewing;
};
IMPLEMENT_DYNAMIC_CLASS(ActorViewerTool, StateDrivenTool<ActorViewerTool>);
wxIMPLEMENT_DYNAMIC_CLASS(ActorViewerTool, StateDrivenTool<ActorViewerTool>);
@@ -143,4 +143,4 @@ public:
Lowering;
};
IMPLEMENT_DYNAMIC_CLASS(AlterElevation, StateDrivenTool<AlterElevation>);
wxIMPLEMENT_DYNAMIC_CLASS(AlterElevation, StateDrivenTool<AlterElevation>);
@@ -151,7 +151,7 @@ void RegisterToolBarButton(wxToolBar* toolbar, int buttonId, const wxString& too
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_CLASS(WorldCommand, AtlasWindowCommand);
wxIMPLEMENT_CLASS(WorldCommand, AtlasWindowCommand);
WorldCommand::WorldCommand(AtlasMessage::mWorldCommand* command)
: AtlasWindowCommand(true, wxString::FromAscii(command->GetName())), m_Command(command), m_AlreadyDone(false)
@@ -75,7 +75,7 @@ extern void RegisterToolBarButton(wxToolBar* toolbar, int buttonId, const wxStri
namespace AtlasMessage { struct mWorldCommand; }
class WorldCommand : public AtlasWindowCommand
{
DECLARE_CLASS(WorldCommand);
wxDECLARE_CLASS(WorldCommand);
bool m_AlreadyDone;
public:
@@ -83,4 +83,4 @@ public:
Waiting;
};
IMPLEMENT_DYNAMIC_CLASS(FillTerrain, StateDrivenTool<FillTerrain>);
wxIMPLEMENT_DYNAMIC_CLASS(FillTerrain, StateDrivenTool<FillTerrain>);
@@ -120,4 +120,4 @@ public:
Flattening;
};
IMPLEMENT_DYNAMIC_CLASS(FlattenElevation, StateDrivenTool<FlattenElevation>);
wxIMPLEMENT_DYNAMIC_CLASS(FlattenElevation, StateDrivenTool<FlattenElevation>);
@@ -219,4 +219,4 @@ public:
Eyedropper;
};
IMPLEMENT_DYNAMIC_CLASS(PaintTerrain, StateDrivenTool<PaintTerrain>);
wxIMPLEMENT_DYNAMIC_CLASS(PaintTerrain, StateDrivenTool<PaintTerrain>);
@@ -66,4 +66,4 @@ public:
Waiting;
};
IMPLEMENT_DYNAMIC_CLASS(PickWaterHeight, StateDrivenTool<PickWaterHeight>);
wxIMPLEMENT_DYNAMIC_CLASS(PickWaterHeight, StateDrivenTool<PickWaterHeight>);
@@ -143,4 +143,4 @@ public:
PikeLowering;
};
IMPLEMENT_DYNAMIC_CLASS(PikeElevation, StateDrivenTool<PikeElevation>);
wxIMPLEMENT_DYNAMIC_CLASS(PikeElevation, StateDrivenTool<PikeElevation>);
@@ -246,4 +246,4 @@ public:
Placing;
};
IMPLEMENT_DYNAMIC_CLASS(PlaceObject, StateDrivenTool<PlaceObject>);
wxIMPLEMENT_DYNAMIC_CLASS(PlaceObject, StateDrivenTool<PlaceObject>);
@@ -83,4 +83,4 @@ public:
Waiting;
};
IMPLEMENT_DYNAMIC_CLASS(ReplaceTerrain, StateDrivenTool<ReplaceTerrain>);
wxIMPLEMENT_DYNAMIC_CLASS(ReplaceTerrain, StateDrivenTool<ReplaceTerrain>);
@@ -143,4 +143,4 @@ public:
Roughing;
};
IMPLEMENT_DYNAMIC_CLASS(SmoothElevation, StateDrivenTool<SmoothElevation>);
wxIMPLEMENT_DYNAMIC_CLASS(SmoothElevation, StateDrivenTool<SmoothElevation>);
@@ -624,4 +624,4 @@ public:
Rotating;
};
IMPLEMENT_DYNAMIC_CLASS(TransformObject, StateDrivenTool<TransformObject>);
wxIMPLEMENT_DYNAMIC_CLASS(TransformObject, StateDrivenTool<TransformObject>);
@@ -167,4 +167,4 @@ public:
Dragging;
};
IMPLEMENT_DYNAMIC_CLASS(TransformPath, StateDrivenTool<TransformPath>);
wxIMPLEMENT_DYNAMIC_CLASS(TransformPath, StateDrivenTool<TransformPath>);