2011-12-15 22:22:55 +00:00
/*
* This file is part of OpenTTD .
* OpenTTD is free software ; you can redistribute it and / or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , version 2.
* OpenTTD is distributed in the hope that it will be useful , but WITHOUT ANY WARRANTY ; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE .
* See the GNU General Public License for more details . You should have received a copy of the GNU General Public License along with OpenTTD . If not , see < http : //www.gnu.org/licenses/>.
*/
/** @file graph_widget.h Types related to the graph widgets. */
# ifndef WIDGETS_GRAPH_WIDGET_H
# define WIDGETS_GRAPH_WIDGET_H
2011-12-16 16:23:50 +00:00
# include "../economy_type.h"
2012-01-03 20:26:05 +00:00
# include "../company_type.h"
2011-12-16 16:23:50 +00:00
2011-12-19 20:46:17 +00:00
/** Widgets of the #GraphLegendWindow class. */
2023-12-29 21:15:25 +00:00
enum GraphLegendWidgets : WidgetID {
2011-12-16 19:08:39 +00:00
WID_GL_BACKGROUND , ///< Background of the window.
2011-12-15 22:22:55 +00:00
2011-12-16 19:08:39 +00:00
WID_GL_FIRST_COMPANY , ///< First company in the legend.
WID_GL_LAST_COMPANY = WID_GL_FIRST_COMPANY + MAX_COMPANIES - 1 , ///< Last company in the legend.
2011-12-15 22:22:55 +00:00
} ;
2011-12-19 20:46:17 +00:00
/** Widgets of the #OperatingProfitGraphWindow class, #IncomeGraphWindow class, #DeliveredCargoGraphWindow class, and #CompanyValueGraphWindow class. */
2023-12-29 21:15:25 +00:00
enum CompanyValueWidgets : WidgetID {
2011-12-16 16:27:45 +00:00
WID_CV_KEY_BUTTON , ///< Key button.
WID_CV_BACKGROUND , ///< Background of the window.
WID_CV_GRAPH , ///< Graph itself.
WID_CV_RESIZE , ///< Resize button.
2011-12-15 22:22:55 +00:00
} ;
2023-06-06 18:31:59 +00:00
/** Extra widgets of the #DeliveredCargoGraphWindow class. */
enum DeliveredCargoGraphWindowWidgets {
WID_DCG_BY_COMPANY = 0x40 , ///< By company button.
WID_DCG_BY_CARGO , ///< By cargo button.
} ;
2011-12-19 20:46:17 +00:00
/** Widget of the #PerformanceHistoryGraphWindow class. */
2023-12-29 21:15:25 +00:00
enum PerformanceHistoryGraphWidgets : WidgetID {
2011-12-16 16:27:45 +00:00
WID_PHG_KEY , ///< Key button.
WID_PHG_DETAILED_PERFORMANCE , ///< Detailed performance.
WID_PHG_BACKGROUND , ///< Background of the window.
WID_PHG_GRAPH , ///< Graph itself.
WID_PHG_RESIZE , ///< Resize button.
2011-12-15 22:22:55 +00:00
} ;
2011-12-19 20:46:17 +00:00
/** Widget of the #PaymentRatesGraphWindow class. */
2023-12-29 21:15:25 +00:00
enum CargoPaymentRatesWidgets : WidgetID {
2011-12-16 16:27:45 +00:00
WID_CPR_BACKGROUND , ///< Background of the window.
WID_CPR_HEADER , ///< Header.
WID_CPR_GRAPH , ///< Graph itself.
WID_CPR_RESIZE , ///< Resize button.
WID_CPR_FOOTER , ///< Footer.
WID_CPR_ENABLE_CARGOES , ///< Enable cargoes button.
WID_CPR_DISABLE_CARGOES , ///< Disable cargoes button.
2019-02-06 22:10:58 +00:00
WID_CPR_MATRIX , ///< Cargo list.
WID_CPR_MATRIX_SCROLLBAR , ///< Cargo list scrollbar.
2021-06-13 23:52:46 +00:00
WID_CPR_DAYS , ///< Days in transit mode.
WID_CPR_SPEED , ///< Speed mode.
2011-12-15 22:22:55 +00:00
} ;
2021-06-23 06:21:29 +00:00
/** Widget of the #StationCargoGraphWindow class. */
enum StationCargoWidgets {
WID_SCG_CAPTION , ///< Window title
WID_SCG_BACKGROUND , ///< Background of the window.
WID_SCG_HEADER , ///< Header.
WID_SCG_GRAPH , ///< Graph itself.
WID_SCG_RESIZE , ///< Resize button.
WID_SCG_FOOTER , ///< Footer.
WID_SCG_ENABLE_CARGOES , ///< Enable cargoes button.
WID_SCG_DISABLE_CARGOES , ///< Disable cargoes button.
WID_SCG_MATRIX , ///< Cargo list.
WID_SCG_MATRIX_SCROLLBAR , ///< Cargo list scrollbar.
} ;
2011-12-19 20:46:17 +00:00
/** Widget of the #PerformanceRatingDetailWindow class. */
2023-12-29 21:15:25 +00:00
enum PerformanceRatingDetailsWidgets : WidgetID {
2011-12-16 16:27:45 +00:00
WID_PRD_SCORE_FIRST , ///< First entry in the score list.
WID_PRD_SCORE_LAST = WID_PRD_SCORE_FIRST + ( SCORE_END - SCORE_BEGIN ) - 1 , ///< Last entry in the score list.
2011-12-15 22:22:55 +00:00
2011-12-16 16:27:45 +00:00
WID_PRD_COMPANY_FIRST , ///< First company.
WID_PRD_COMPANY_LAST = WID_PRD_COMPANY_FIRST + MAX_COMPANIES - 1 , ///< Last company.
2011-12-15 22:22:55 +00:00
} ;
2023-06-06 17:19:19 +00:00
/** Widget of the #ExcludingCargoBaseGraphWindow class. */
enum ExcludingCargoBaseGraphWindowWidgets {
WID_ECBG_FOOTER = 0x80 , ///< Footer.
WID_ECBG_ENABLE_CARGOES , ///< Enable cargoes button.
WID_ECBG_DISABLE_CARGOES , ///< Disable cargoes button.
WID_ECBG_MATRIX , ///< Cargo list.
WID_ECBG_MATRIX_SCROLLBAR , ///< Cargo list scrollbar.
WID_ECBG_CARGO_FIRST , ///< First cargo in the list.
} ;
2011-12-15 22:22:55 +00:00
# endif /* WIDGETS_GRAPH_WIDGET_H */