Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
Antares::Map::Control Class Referencefinal

Sub-Component for drawing the map and handle user-events. More...

#include <control.h>

Inheritance diagram for Antares::Map::Control:

Public Types

enum  { gridSize = 75 }
 

Public Member Functions

Constructor & Destructor
 Control (wxWindow *parent, Component &component)
 Default Constructor.
 
 Control (wxWindow *parent, Component &component, size_t uID)
 Default Constructor.
 
virtual ~Control ()
 Destructor.
 
const size_t & getUid () const
 get Control id
 
Zoom
double zoom () const
 
void zoom (const double v)
 
void forceReload ()
 
const wxColour & getBackgroundColor ()
 
void setBackgroundColor (const wxColour &newColor)
 
Rendering the map
void render (wxPaintEvent &evt)
 Renders the map on screen.
 
wxBitmap getRenderedMapImage (const MapRenderOptions &mapOptions)
 Renders the map in an image object for further on-disk storage.
 

Friends

class Component
 

Drawing the map graph elements

Managernodes
 All nodes.
 
Antares::Component::ButtonpBtnSelectionArea
 The toggle button for selecting areas with the mouse.
 
Antares::Component::ButtonpBtnSelectionLink
 The toggle button for selecting links with the mouse.
 
Antares::Component::ButtonpBtnSelectionConstraint
 The toggle button for selecting clusters with the mouse.
 
Yuni::Event< void(int, int)> onPopupEvent
 Popup event.
 
static size_t newUID = 0
 Control id management.
 
void paintGraph (wxDC &dc, bool inFile=false)
 Paints the.
 
void refresh ()
 
void reset ()
 
void mouseMoved (wxMouseEvent &evt)
 
void mouseLeftDown (wxMouseEvent &evt)
 
void mouseWheelMoved (wxMouseEvent &evt)
 
void mouseLeftUp (wxMouseEvent &evt)
 
void rightClick (wxMouseEvent &evt)
 
void mouseLeftWindow (wxMouseEvent &evt)
 
void keyPressed (wxKeyEvent &evt)
 
void keyReleased (wxKeyEvent &evt)
 
void keyChar (wxKeyEvent &evt)
 
void mouseDblClick (wxMouseEvent &evt)
 
uint areasCount () const
 Get how many area we have.
 
void setpInfosAreaCount (wxStaticText *infosAreaCount)
 
wxStaticText * getpInfosAreaCount ()
 
uint connectionsCount () const
 Get how many connections we have.
 
void setpInfosConnxCount (wxStaticText *infosConnxCount)
 
wxStaticText * getpInfosConnxCount ()
 
void setPointX (wxTextCtrl *textCtrl)
 
wxTextCtrl * getPointX ()
 
void setPointY (wxTextCtrl *textCtrl)
 
wxTextCtrl * getPointY ()
 
void addNewNode (uint count=1)
 
void addNewNodeWhereTheMouseIs ()
 
void addNewLoadNodeWhereTheMouseIs ()
 
void addNewThermalNodeWhereTheMouseIs ()
 
void addNewNuclearNodeWhereTheMouseIs ()
 
void addNewCCGTNodeWhereTheMouseIs ()
 
void addNewCoalNodeWhereTheMouseIs ()
 
void addNewOilNodeWhereTheMouseIs ()
 
void addNewHydroNodeWhereTheMouseIs ()
 
void addNewPSPPNodeWhereTheMouseIs ()
 
void addNewRENWNodeWhereTheMouseIs ()
 
void addNewWindNodeWhereTheMouseIs ()
 
void addNewSolarNodeWhereTheMouseIs ()
 
void addNewBioMNodeWhereTheMouseIs ()
 
void addNewVoidNodeWhereTheMouseIs ()
 
void addNewVirtualNodeWhereTheMouseIs ()
 
void recenter ()
 
void recenter (int x, int y)
 
void computeBoundingBoxOfSelectedNodes ()
 

Detailed Description

Sub-Component for drawing the map and handle user-events.

Constructor & Destructor Documentation

◆ Control() [1/2]

Antares::Map::Control::Control ( wxWindow * parent,
Component & component )

Default Constructor.

Parameters
parentThe parent window
componentThe parent component (Map::Component)

◆ Control() [2/2]

Antares::Map::Control::Control ( wxWindow * parent,
Component & component,
size_t uID )

Default Constructor.

Parameters
parentThe parent window
componentThe parent component (Map::Component)
idThe unique id for this control

Member Function Documentation

◆ getRenderedMapImage()

wxBitmap Antares::Map::Control::getRenderedMapImage ( const MapRenderOptions & mapOptions)

Renders the map in an image object for further on-disk storage.

Parameters
optionsStructure containing the image rendering options

◆ paintGraph()

void Antares::Map::Control::paintGraph ( wxDC & dc,
bool inFile = false )

Paints the.

Parameters
evtA wxPaintEvent

◆ recenter()

void Antares::Map::Control::recenter ( )

VB changes to be validate

◆ render()

void Antares::Map::Control::render ( wxPaintEvent & evt)

Renders the map on screen.

Parameters
evtA wxPaintEvent

Member Data Documentation

◆ pBtnSelectionConstraint

Antares::Component::Button* Antares::Map::Control::pBtnSelectionConstraint

The toggle button for selecting clusters with the mouse.

The toggle button for selecting constraints with the mouse


The documentation for this class was generated from the following files: