12 #ifndef LINKGRAPH_GUI_H 13 #define LINKGRAPH_GUI_H 15 #include "../company_func.h" 16 #include "../station_base.h" 17 #include "../widget_type.h" 40 typedef std::map<StationID, LinkProperties> StationLinkMap;
41 typedef std::map<StationID, StationLinkMap> LinkMap;
42 typedef std::vector<std::pair<StationID, uint> > StationSupplyList;
44 static const uint8 LINK_COLOURS[];
55 window(w), widget_id(wid), cargo_mask(cargo_mask), company_mask(company_mask), scale(scale)
60 void SetCargoMask(uint32 cargo_mask);
61 void SetCompanyMask(uint32 company_mask);
88 static void AddStats(uint new_cap, uint new_usg, uint new_flow,
bool new_shared,
LinkProperties &cargo);
89 static void DrawVertex(
int x,
int y,
int size,
int colour,
int border_colour);
103 virtual void DrawWidget(
const Rect &r,
int widget)
const;
104 virtual void OnClick(
Point pt,
int widget,
int click_count);
105 virtual void OnInvalidateData(
int data = 0,
bool gui_scope =
true);
110 void UpdateOverlayCompanies();
111 void UpdateOverlayCargoes();
Properties of a link between two stations.
Data about how and where to blit pixels.
LinkGraphOverlay(const Window *w, uint wid, uint32 cargo_mask, uint32 company_mask, uint scale)
Create a link graph overlay for the specified window.
Some typedefs for the main game.
LinkMap cached_links
Cache for links to reduce recalculation.
uint32 GetCompanyMask()
Get a bitmask of the currently shown companies.
High level window description.
uint32 GetCargoMask()
Get a bitmask of the currently shown cargoes.
uint usage
Actual usage of the link.
void ShowLinkGraphLegend()
Open a link graph legend window.
Menu window to select cargoes and companies to show in a link graph overlay.
uint scale
Width of link lines.
Data structure for an opened window.
bool shared
If this is a shared link to be drawn dashed.
const uint widget_id
ID of Widget in Window to be drawn to.
uint32 company_mask
Bitmask of companies to be displayed.
const Window * window
Window to be drawn into.
Coordinates of a point in 2D.
uint capacity
Capacity of the link.
uint32 cargo_mask
Bitmask of cargos to be displayed.
Specification of a rectangle with absolute coordinates of all edges.
Dimensions (a width and height) of a rectangle in 2D.
Handles drawing of links into some window.
uint planned
Planned usage of the link.
StationSupplyList cached_stations
Cache for stations to be drawn.