21 #ifndef __ANTARES_TOOLBOX_MAP_COMPONENT_H__
22 #define __ANTARES_TOOLBOX_MAP_COMPONENT_H__
24 #include <antares/study/study.h>
26 #include <wx/stattext.h>
27 #include <ui/common/component/panel.h>
28 #include "../button.h"
29 #include "../notebook/mapnotebook.h"
32 #include <wx/textctrl.h>
34 namespace Antares::Map
130 void onCenterXY(
void*);
143 void drawerVisible();
155 void renameNodeFromArea(
const Data::Area* area);
177 void selectOnly(
const Data::Area::Vector& areas);
204 size_t getActiveLayerID()
206 return pMapActiveLayer ? pMapActiveLayer->
getUid() : 0;
223 Drawer(wxWindow* parent,
Component& com):
229 void onDraw(wxPaintEvent& evt);
230 void onSize(wxSizeEvent& evt);
233 void drawFromDevice(wxDC& dc);
237 DECLARE_EVENT_TABLE()
240 void onApplicationQuit();
247 void addNewEmptyLayer()
254 void evtOnPopupEvent(
int x,
int y);
256 void evtOnSelectionHide(wxCommandEvent&);
258 void evtOnSelectionShow(wxCommandEvent&);
262 void evtPopupCopy(wxCommandEvent&);
263 void evtPopupCopyAll(wxCommandEvent&);
264 void evtPopupCopyAllAreas(wxCommandEvent&);
265 void evtPopupCopyAllLinks(wxCommandEvent&);
268 void evtPopupPaste(wxCommandEvent&);
269 void evtPopupPasteSpecial(wxCommandEvent&);
270 void onSelectAll(
void*);
275 template<
unsigned int N>
276 inline void evtNewArea(wxCommandEvent&)
280 pMapActiveLayer->addNewNode(N);
285 void onToggleMouseSelectionArea(
void*);
286 void onToggleMouseSelectionLink(
void*);
287 void onToggleMouseSelectionPlant(
void*);
288 void onToggleMouseSelectionConstraint(
void*);
290 void onCenter(
void*);
292 void onEvtCenterXY(wxCommandEvent& WXUNUSED(event));
295 Control* pMapActiveLayer;
297 std::vector<Control*> mapLayersPtrList;
299 wxStaticText* pInfosAreaCount;
300 wxStaticText* pInfosConnxCount;
305 wxWindow* pBtnSelectionArea;
307 wxWindow* pBtnSelectionLink;
309 wxWindow* pBtnSelectionPlant;
311 wxWindow* pBtnSelectionConstraint;
314 wxMenu* pSelectionPopUpMenu;
MapNotebook.
Definition: mapnotebook.h:33
Definition: notebook.h:61
Panel implementation.
Definition: panel.h:34
std::vector< AreaLink * > Vector
Vector of links.
Definition: links.h:61
Definition for a single area.
Definition: area.h:51
Standard study MAP.
Definition: component.h:40
Component(wxWindow *parent)
Default Constructor.
Definition: component.cpp:57
bool loadFromStudy(Data::Study &study)
Load the map's settings from an existing Antares study.
Definition: component.cpp:578
void unselectAll(bool canRefresh=true)
Select all nodes of type "area".
Definition: component.cpp:866
void refreshHeaderInformations()
Refresh the header informations (how many areas/connexions)
Definition: component.cpp:772
bool saveToAttachedStudy(bool incremental=true)
Save the map's settings to the attached study (if any)
Definition: component.cpp:642
void selectOnly(const Data::Area::Vector &areas)
Select only items from a list of areas.
Definition: component.cpp:889
void reimportNodeColors(const Data::Area *area)
Refresh the internal cache about the color of a single area.
Definition: component.cpp:825
void recenterView()
Recenter scrollbars to the center of the map.
Definition: component.cpp:1207
void reverseSelection()
Reverse the selection.
Definition: component.cpp:923
Data::Study::Ptr attachedStudy()
Get the study attached to the map.
Definition: component.cpp:573
virtual ~Component()
Destructor.
Definition: component.cpp:117
void moveNodeFromAreaX(const Data::Area *area, int x)
Refresh the internal cache about the X-coordinate of a single area.
Definition: component.cpp:837
void attachStudy(Data::Study::Ptr study)
Attach a study to the map to reflect changes.
Definition: component.cpp:509
void selectAll()
Select all nodes of type "area".
Definition: component.cpp:879
Yuni::Event< void(int, int)> onPopupEvent
Popup event.
Definition: component.h:211
void moveNodeFromAreaY(const Data::Area *area, int y)
Refresh the internal cache about the X-coordinate of a single area.
Definition: component.cpp:849
uint selectedAreaCount() const
Get how many areas have been selected.
Definition: component.cpp:861
void setFocus()
Set the focus to the map.
Definition: component.cpp:705
bool saveToStudy(Data::Study &study, bool incremental=true)
Save the map's settings to a study.
Definition: component.cpp:623
bool loadFromAttachedStudy()
Load the map's settings from the attached study.
Definition: component.cpp:606
Yuni::Event< void(Component &)> onDblClick
Event: Double-Click on a item.
Definition: component.h:215
bool saveToImageFile(const AnyString &filePath, const MapRenderOptions &options)
Save the map into an image file.
Definition: component.cpp:648
Yuni::Event< void(const wxString &)> onStatusBarText
Status bar event.
Definition: component.h:213
void detachStudy(bool canRefresh=true)
Detach the study (if any) currently attached to the map.
Definition: component.cpp:563
const size_t & getUid() const
get Control id
Definition: control.h:82
Definition: settings.h:46