1994-09-19 09:50:07 +00:00
|
|
|
#ifndef __XVTILITY_H
|
|
|
|
#define __XVTILITY_H
|
|
|
|
|
|
|
|
#ifndef XVT_INCL
|
|
|
|
#include <xvt.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __KEYS_H
|
|
|
|
#include <keys.h>
|
|
|
|
#endif
|
|
|
|
|
1999-05-24 13:34:11 +00:00
|
|
|
// User defined events
|
|
|
|
const long E_DROP_FILES = 883L;
|
|
|
|
|
|
|
|
// Viswin EVENTS
|
|
|
|
// vista la mania degli 883, eccoti un po' di concerti di Mozart
|
|
|
|
const long E_ADDLINE_ONSCREEN = 467L;
|
|
|
|
const long E_ADDLINE = 488L;
|
1994-09-19 09:50:07 +00:00
|
|
|
|
2009-11-23 15:42:18 +00:00
|
|
|
PNT xvtil_taskwin_size();
|
1994-09-19 09:50:07 +00:00
|
|
|
RCT& resize_rect(short x, short y, short dx, short dy, WIN_TYPE wt, WINDOW parent);
|
|
|
|
|
2009-02-23 11:37:37 +00:00
|
|
|
// align='L|T','C','R|B' grow= '+','=','-'
|
|
|
|
RCT& xvtil_align_rect(const RCT& inner, const RCT& outer, char halign, char valign, char grow);
|
|
|
|
|
2005-09-23 15:57:29 +00:00
|
|
|
WINDOW xvtil_create_window
|
1994-11-28 11:01:27 +00:00
|
|
|
(
|
2005-09-23 15:57:29 +00:00
|
|
|
WIN_TYPE wt,
|
|
|
|
short x, short y, short dx, short dy,
|
|
|
|
const char* caption,
|
|
|
|
int menu, WINDOW parent,
|
|
|
|
long flags,
|
|
|
|
EVENT_HANDLER eh,
|
|
|
|
long app_data
|
|
|
|
);
|
|
|
|
|
|
|
|
WINDOW xvtil_create_statbar();
|
|
|
|
void xvtil_statbar_set(const char* text, bool def = FALSE);
|
|
|
|
void xvtil_statbar_refresh();
|
2008-01-31 14:02:52 +00:00
|
|
|
void xvtil_statbar_destroy();
|
2015-11-30 16:18:56 +00:00
|
|
|
int xvtil_statbar_height();
|
2005-09-23 15:57:29 +00:00
|
|
|
|
2009-10-21 13:40:18 +00:00
|
|
|
bool xvtil_popup_message(const char* msg);
|
|
|
|
bool xvtil_popup_warning(const char* msg);
|
|
|
|
bool xvtil_popup_error(const char* msg);
|
2015-11-30 16:18:56 +00:00
|
|
|
bool xvtil_system_error(unsigned long lasterror, ...);
|
2009-10-21 13:40:18 +00:00
|
|
|
|
2005-09-23 15:57:29 +00:00
|
|
|
void beep(int severity = 0);
|
|
|
|
void do_events();
|
|
|
|
|
|
|
|
void set_xvt_hooks();
|
|
|
|
void ignore_xvt_errors(bool ie);
|
|
|
|
|
|
|
|
void customize_colors();
|
|
|
|
void customize_controls(bool on);
|
|
|
|
|
|
|
|
KEY e_char_to_key(const EVENT* ep);
|
|
|
|
void dispatch_event(WINDOW win, const EVENT& e, bool post);
|
|
|
|
void dispatch_e_menu(WINDOW win, MENU_TAG item);
|
|
|
|
void dispatch_e_char(WINDOW win, KEY key);
|
|
|
|
void dispatch_e_scroll(WINDOW win, KEY key);
|
|
|
|
|
|
|
|
// One-liner for waiting!
|
|
|
|
class TWait_cursor
|
|
|
|
{
|
|
|
|
public:
|
2015-06-17 07:16:13 +00:00
|
|
|
TWait_cursor() { xvt_scr_set_busy_cursor(); }
|
|
|
|
~TWait_cursor() { xvt_scr_reset_busy_cursor(); }
|
2005-09-23 15:57:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
void xvtil_set_font(WINDOW win, const char* family, int style, int dim = 0);
|
|
|
|
bool xvtil_test_menu_tag(MENU_TAG tag);
|
|
|
|
|
|
|
|
COLOR trans_color(char c);
|
|
|
|
PAT_STYLE trans_brush(char p);
|
|
|
|
PEN_STYLE trans_pen (char p);
|
|
|
|
|
2009-12-01 10:17:22 +00:00
|
|
|
extern short CHARX, CHARY, ROWY;
|
1994-11-28 11:01:27 +00:00
|
|
|
|
1994-09-19 09:50:07 +00:00
|
|
|
#endif
|