// (c) 1995-2014 by Artsoft Entertainment
// Holger Schemel
// info@artsoft.org
-// http://www.artsoft.org/
+// https://www.artsoft.org/
// ----------------------------------------------------------------------------
// gadgets.h
// ============================================================================
#define GD_TYPE_NORMAL_BUTTON (1 << 0)
#define GD_TYPE_TEXT_BUTTON (1 << 1)
#define GD_TYPE_CHECK_BUTTON (1 << 2)
-#define GD_TYPE_RADIO_BUTTON (1 << 3)
-#define GD_TYPE_DRAWING_AREA (1 << 4)
-#define GD_TYPE_TEXT_INPUT_ALPHANUMERIC (1 << 5)
-#define GD_TYPE_TEXT_INPUT_NUMERIC (1 << 6)
-#define GD_TYPE_TEXT_AREA (1 << 7)
-#define GD_TYPE_SELECTBOX (1 << 8)
-#define GD_TYPE_SCROLLBAR_VERTICAL (1 << 9)
-#define GD_TYPE_SCROLLBAR_HORIZONTAL (1 << 10)
+#define GD_TYPE_CHECK_BUTTON_2 (1 << 3)
+#define GD_TYPE_RADIO_BUTTON (1 << 4)
+#define GD_TYPE_DRAWING_AREA (1 << 5)
+#define GD_TYPE_TEXT_INPUT_ALPHANUMERIC (1 << 6)
+#define GD_TYPE_TEXT_INPUT_NUMERIC (1 << 7)
+#define GD_TYPE_TEXT_AREA (1 << 8)
+#define GD_TYPE_SELECTBOX (1 << 9)
+#define GD_TYPE_SCROLLBAR_VERTICAL (1 << 10)
+#define GD_TYPE_SCROLLBAR_HORIZONTAL (1 << 11)
#define GD_TYPE_BUTTON (GD_TYPE_NORMAL_BUTTON | \
GD_TYPE_TEXT_BUTTON | \
GD_TYPE_CHECK_BUTTON | \
+ GD_TYPE_CHECK_BUTTON_2 | \
GD_TYPE_RADIO_BUTTON)
#define GD_TYPE_SCROLLBAR (GD_TYPE_SCROLLBAR_VERTICAL | \
GD_TYPE_SCROLLBAR_HORIZONTAL)
int cursor_x_preferred; // "preferred" x cursor position
int size; // maximal size of input text
int xsize, ysize; // size of text area (in chars)
+
+ // automatically determined values
+ boolean cropped; // text area cropped to fit viewport
+ int full_x, full_y; // text area position when not cropped
+ int crop_width, crop_height; // size of text area when cropped
+ int crop_xsize, crop_ysize; // size of text area when cropped
+
+ // runtime values
+ boolean full_open; // opening state of text area
};
struct GadgetSelectbox
void InitGadgetsSoundCallback(void (*activating_function)(void),
void (*selecting_function)(void));
+void InitGadgetScreenBorders(int, int);
struct GadgetInfo *CreateGadget(int, ...);
void FreeGadget(struct GadgetInfo *);