Files
OpenRCT2-Web/src/interface/widget.h
T

70 lines
2.2 KiB
C
Raw Normal View History

/*****************************************************************************
* Copyright (c) 2014 Ted John
* OpenRCT2, an open source clone of Roller Coaster Tycoon 2.
*
* This file is part of OpenRCT2.
*
* OpenRCT2 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, either version 3 of the License, or
* (at your option) any later version.
2015-10-20 20:16:30 +02:00
* This program 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.
2015-10-20 20:16:30 +02:00
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************************/
#ifndef _WIDGET_H_
#define _WIDGET_H_
2014-04-03 19:49:00 +01:00
#include "window.h"
typedef enum {
WWT_EMPTY = 0,
WWT_FRAME = 1,
WWT_RESIZE = 2,
WWT_IMGBTN = 3,
WWT_4 = 4,
2014-04-09 22:35:29 +01:00
WWT_5 = 5,
2014-05-07 20:53:33 +02:00
WWT_COLORBTN = 6,
WWT_TRNBTN = 7,
WWT_TAB = 8,
WWT_FLATBTN = 9,
WWT_DROPDOWN_BUTTON = 10,
2014-04-09 22:35:29 +01:00
WWT_11,
2014-05-23 11:30:19 +02:00
WWT_12, // looks like a normal label to me
2014-04-09 22:35:29 +01:00
WWT_13,
WWT_14,
2014-05-14 14:06:39 +02:00
WWT_SPINNER = 15,
WWT_DROPDOWN = 16,
WWT_VIEWPORT = 17,
2014-04-09 22:35:29 +01:00
WWT_18,
2014-04-28 17:35:12 +01:00
WWT_GROUPBOX = 19,
WWT_CAPTION = 20,
WWT_CLOSEBOX = 21,
WWT_SCROLL = 22,
2014-05-14 14:06:39 +02:00
WWT_CHECKBOX = 23,
2014-04-09 22:35:29 +01:00
WWT_24,
WWT_25,
2015-06-07 08:40:55 +01:00
WWT_TEXT_BOX = 27,
WWT_LAST = 26,
} WINDOW_WIDGET_TYPES;
#define WIDGETS_END WWT_LAST, 0, 0, 0, 0, 0, 0, 0
2014-04-03 19:49:00 +01:00
void widget_scroll_update_thumbs(rct_window *w, int widget_index);
2014-04-09 22:35:29 +01:00
void widget_draw(rct_drawpixelinfo *dpi, rct_window *w, int widgetIndex);
2014-04-03 19:49:00 +01:00
2014-04-24 18:53:42 +01:00
int widget_is_enabled(rct_window *w, int widgetIndex);
2014-04-11 02:42:39 +01:00
int widget_is_disabled(rct_window *w, int widgetIndex);
int widget_is_pressed(rct_window *w, int widgetIndex);
int widget_is_highlighted(rct_window *w, int widgetIndex);
2014-04-17 15:12:41 +01:00
int widget_is_active_tool(rct_window *w, int widgetIndex);
void widget_scroll_get_part(rct_window *w, rct_widget* widget, int x, int y, int *output_x, int *output_y, int *output_scroll_area, int *scroll_id);
void widget_set_checkbox_value(rct_window *w, int widgetIndex, int value);
#endif