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>
29#include "../notebook/mapnotebook.h"
32#include <wx/textctrl.h>
132 void onCenterXY(
void*);
145 void drawerVisible();
157 void renameNodeFromArea(
const Data::Area* area);
179 void selectOnly(
const Data::Area::Vector& areas);
205 size_t getActiveLayerID()
207 return pMapActiveLayer ? pMapActiveLayer->
getUid() : 0;
224 Drawer(wxWindow* parent,
Component& com) :
228 void onDraw(wxPaintEvent& evt);
229 void onSize(wxSizeEvent& evt);
232 void drawFromDevice(wxDC& dc);
236 DECLARE_EVENT_TABLE()
239 void onApplicationQuit();
245 void addNewEmptyLayer()
251 void evtOnPopupEvent(
int x,
int y);
253 void evtOnSelectionHide(wxCommandEvent&);
255 void evtOnSelectionShow(wxCommandEvent&);
259 void evtPopupCopy(wxCommandEvent&);
260 void evtPopupCopyAll(wxCommandEvent&);
261 void evtPopupCopyAllAreas(wxCommandEvent&);
262 void evtPopupCopyAllLinks(wxCommandEvent&);
265 void evtPopupPaste(wxCommandEvent&);
266 void evtPopupPasteSpecial(wxCommandEvent&);
267 void onSelectAll(
void*);
272 template<
unsigned int N>
273 inline void evtNewArea(wxCommandEvent&)
276 pMapActiveLayer->addNewNode(N);
280 void onToggleMouseSelectionArea(
void*);
281 void onToggleMouseSelectionLink(
void*);
282 void onToggleMouseSelectionPlant(
void*);
283 void onToggleMouseSelectionConstraint(
void*);
285 void onCenter(
void*);
287 void onEvtCenterXY(wxCommandEvent& WXUNUSED(event));
290 Control* pMapActiveLayer;
292 std::vector<Control*> mapLayersPtrList;
294 wxStaticText* pInfosAreaCount;
295 wxStaticText* pInfosConnxCount;
300 wxWindow* pBtnSelectionArea;
302 wxWindow* pBtnSelectionLink;
304 wxWindow* pBtnSelectionPlant;
306 wxWindow* pBtnSelectionConstraint;
309 wxMenu* pSelectionPopUpMenu;
MapNotebook.
Definition mapnotebook.h:35
Panel implementation.
Definition panel.h:36
std::vector< AreaLink * > Vector
Vector of links.
Definition links.h:53
Definition for a single area.
Definition area.h:52
Standard study MAP.
Definition component.h:42
bool loadFromStudy(Data::Study &study)
Load the map's settings from an existing Antares study.
Definition component.cpp:542
void unselectAll(bool canRefresh=true)
Select all nodes of type "area".
Definition component.cpp:791
void refreshHeaderInformations()
Refresh the header informations (how many areas/connexions)
Definition component.cpp:713
bool saveToAttachedStudy(bool incremental=true)
Save the map's settings to the attached study (if any)
Definition component.cpp:598
void selectOnly(const Data::Area::Vector &areas)
Select only items from a list of areas.
Definition component.cpp:812
void reimportNodeColors(const Data::Area *area)
Refresh the internal cache about the color of a single area.
Definition component.cpp:756
void recenterView()
Recenter scrollbars to the center of the map.
Definition component.cpp:1096
void reverseSelection()
Reverse the selection.
Definition component.cpp:846
Data::Study::Ptr attachedStudy()
Get the study attached to the map.
Definition component.cpp:537
virtual ~Component()
Destructor.
Definition component.cpp:119
void moveNodeFromAreaX(const Data::Area *area, int x)
Refresh the internal cache about the X-coordinate of a single area.
Definition component.cpp:766
void attachStudy(Data::Study::Ptr study)
Attach a study to the map to reflect changes.
Definition component.cpp:473
void selectAll()
Select all nodes of type "area".
Definition component.cpp:802
Yuni::Event< void(int, int)> onPopupEvent
Popup event.
Definition component.h:212
void moveNodeFromAreaY(const Data::Area *area, int y)
Refresh the internal cache about the X-coordinate of a single area.
Definition component.cpp:776
uint selectedAreaCount() const
Get how many areas have been selected.
Definition component.cpp:786
void setFocus()
Set the focus to the map.
Definition component.cpp:652
bool saveToStudy(Data::Study &study, bool incremental=true)
Save the map's settings to a study.
Definition component.cpp:583
bool loadFromAttachedStudy()
Load the map's settings from the attached study.
Definition component.cpp:568
Yuni::Event< void(Component &)> onDblClick
Event: Double-Click on a item.
Definition component.h:216
bool saveToImageFile(const AnyString &filePath, const MapRenderOptions &options)
Save the map into an image file.
Definition component.cpp:604
Yuni::Event< void(const wxString &)> onStatusBarText
Status bar event.
Definition component.h:214
void detachStudy(bool canRefresh=true)
Detach the study (if any) currently attached to the map.
Definition component.cpp:527
const size_t & getUid() const
get Control id
Definition control.h:83