which included commits to RCS files with non-trunk default branches. git-svn-id: svn://10.65.10.50/trunk@5758 c028cbd2-c16b-5b4b-a496-9718f37d4682
140 lines
3.5 KiB
C
Executable File
140 lines
3.5 KiB
C
Executable File
/*******************************************************************************
|
|
* Copyright 1991-1995 by ORCA Software, Inc. *
|
|
* *
|
|
* All rights reserved. May not be reproduced or distributed, in printed or *
|
|
* electronic form, without permission of ORCA Software, Inc. *
|
|
*******************************************************************************/
|
|
|
|
/******************************************************************
|
|
STX module
|
|
******************************************************************/
|
|
#define NULL_STX (STX)0
|
|
|
|
#define STX_ATR_ENABLED XI_ATR_ENABLED
|
|
#define STX_ATR_EDITMENU XI_ATR_EDITMENU
|
|
#define STX_ATR_AUTOSELECT XI_ATR_AUTOSELECT
|
|
#define STX_ATR_AUTOSCROLL XI_ATR_AUTOSCROLL
|
|
#define STX_ATR_RJUST XI_ATR_RJUST
|
|
#define STX_ATR_BORDER XI_ATR_BORDER
|
|
#define STX_ATR_VISIBLE XI_ATR_VISIBLE
|
|
#define STX_ATR_READONLY XI_ATR_READONLY
|
|
#define STX_ATR_PASSWORD XI_ATR_PASSWORD
|
|
|
|
typedef enum
|
|
{
|
|
STX_CB_CHAR,
|
|
STX_CB_CHANGE,
|
|
STX_CB_DBL,
|
|
STX_CB_FOCUS
|
|
}
|
|
STX_CB_TYPE;
|
|
|
|
typedef struct _stx_cb_data
|
|
{
|
|
STX stx;
|
|
STX_CB_TYPE cb_type;
|
|
int cid;
|
|
WINDOW win;
|
|
union
|
|
{
|
|
/* nothing for change notify */
|
|
BOOLEAN refused;
|
|
struct
|
|
{
|
|
int ch;
|
|
BOOLEAN shift;
|
|
BOOLEAN control;
|
|
BOOLEAN is_paste;
|
|
BOOLEAN refused;
|
|
} chr;
|
|
} v;
|
|
} STX_CB_DATA;
|
|
|
|
typedef void (*STX_CB)(STX_CB_DATA *stx_cb_data);
|
|
|
|
typedef struct _stx_def
|
|
{
|
|
int cid;
|
|
PNT pnt;
|
|
short pixel_width;
|
|
short pix_char_width;
|
|
unsigned long attrib;
|
|
short text_size;
|
|
FONT_OBJ font;
|
|
COLOR back_color;
|
|
COLOR enabled_color; /* but inactive */
|
|
COLOR disabled_color;
|
|
COLOR active_color;
|
|
COLOR active_back_color;
|
|
COLOR disabled_back_color;
|
|
COLOR hilight_color; /* for well and platform fields */
|
|
COLOR shadow_color; /* for well and platform fields */
|
|
XI_RCT xi_rct;
|
|
STX_CB stx_cb;
|
|
long app_data;
|
|
char *parent;
|
|
BOOLEAN well;
|
|
BOOLEAN platform;
|
|
BOOLEAN auto_tab;
|
|
} STX_DEF;
|
|
|
|
typedef struct _stx_data
|
|
{
|
|
int cid;
|
|
WINDOW win;
|
|
RCT rct;
|
|
unsigned long attrib;
|
|
short pix_baseline;
|
|
FONT_OBJ font;
|
|
COLOR back_color;
|
|
COLOR enabled_color; /* but inactive */
|
|
COLOR disabled_color;
|
|
COLOR disabled_back_color;
|
|
COLOR active_color;
|
|
COLOR active_back_color;
|
|
COLOR hilight_color; /* for well and platform fields */
|
|
COLOR shadow_color; /* for well and platform fields */
|
|
STX_CB stx_cb;
|
|
short text_size;
|
|
char *text;
|
|
BOOLEAN has_focus;
|
|
TXT_DATA *txt;
|
|
long app_data;
|
|
BOOLEAN have_mouse;
|
|
BOOLEAN use_text_edit;
|
|
TXEDIT txedit;
|
|
BOOLEAN well;
|
|
BOOLEAN platform;
|
|
BOOLEAN auto_tab;
|
|
char *buf;
|
|
long timer_id;
|
|
BOOLEAN timer_set;
|
|
} STX_DATA;
|
|
|
|
#define STX_LOSE_FOCUS NULL_STX
|
|
|
|
STX stx_create(WINDOW win, STX_DEF *stx_def);
|
|
void stx_delete(STX stx);
|
|
BOOLEAN stx_event(STX stx, EVENT *ep);
|
|
void stx_focus_cb(long stx, BOOLEAN set);
|
|
unsigned long stx_get_attrib(STX stx);
|
|
int stx_get_cid(STX stx);
|
|
long stx_get_app_data(STX stx);
|
|
void stx_get_sel(STX stx, int *c1, int *c2);
|
|
RCT* stx_get_rect(STX stx, RCT *rct);
|
|
RCT* stx_get_inside_rect( STX stx, RCT* rect );
|
|
char* stx_get_text(STX stx, char *s, int len);
|
|
TXEDIT stx_get_txedit(STX stx);
|
|
void stx_set_app_data(STX stx, long data);
|
|
void stx_set_attrib(STX stx, unsigned long attrib);
|
|
void stx_set_bufsize(STX stx, short size);
|
|
void stx_set_focus(STX stx);
|
|
void stx_set_pos(STX stx, PNT p);
|
|
void stx_set_sel(STX stx, int c1, int c2);
|
|
void stx_set_text(STX stx, char *s);
|
|
|
|
|
|
|
|
|
|
|