controls.cpp Allungati listbox

maskfld.cpp   Accorciati editfield
sheet.h       Aggiunto metodo Fields_array
window.cpp    Corretta set_transparent delle TImage


git-svn-id: svn://10.65.10.50/trunk@2993 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1996-06-14 15:47:47 +00:00
parent 7db3ee31d7
commit 24acb6e796
4 changed files with 16 additions and 13 deletions

@ -134,8 +134,8 @@ XVT_FNTID xvt_default_font(bool bold)
return bold ? FAT_FONT : DEF_FONT;
}
static byte event_map[XIE_COL_SIZE+1];
enum event_action { a_ignore, a_xvt, a_xvt_post, a_obj, a_child, a_update, a_select };
static byte event_map[XIE_POST_NAVIGATION+1];
enum event_action { a_ignore, a_xvt, a_xvt_post, a_obj, a_child, a_update, a_select, a_debug };
void init_controls()
{
@ -149,7 +149,7 @@ void init_controls()
xi_set_pref(XI_PREF_COLOR_DARK, MASK_DARK_COLOR);
xi_set_pref(XI_PREF_COLOR_DISABLED, DISABLED_COLOR);
xi_set_pref(XI_PREF_AUTOSEL_ON_MOUSE, TRUE);
// xi_set_pref(XI_PREF_AUTOSEL_ON_MOUSE, TRUE); // Da' problemi nelle ricerche
xi_set_pref(XI_PREF_CARET_WIDTH, 2);
xi_init();
@ -196,6 +196,7 @@ void init_controls()
event_map[XIE_COL_DELETE] = a_ignore;
event_map[XIE_COL_MOVE] = a_ignore;
event_map[XIE_COL_SIZE] = a_ignore;
event_map[XIE_POST_NAVIGATION]= a_debug;
if (_picture == NULL)
_picture = new TPicture_array;
@ -403,6 +404,8 @@ HIDDEN void xi_event_handler(XI_OBJ* itf, XI_EVENT* xiev)
else
notify_xvt = TRUE;
break;
case a_debug:
break; // Put your breakpoint here
default:
break;
}
@ -886,7 +889,7 @@ void TField_control::create(WINDOW win, short cid,
XI_OBJ_DEF* def = xi_add_field_def(frm_def, cid,
rct.top, rct.left,
width * XI_FU_MULTIPLE - 3*XI_FU_MULTIPLE/4,
width * XI_FU_MULTIPLE + XI_FU_MULTIPLE/4,
attrib, cid, maxlen+1,
NORMAL_COLOR, NORMAL_BACK_COLOR,
NORMAL_COLOR, DISABLED_BACK_COLOR,

@ -2627,7 +2627,7 @@ void TEdit_field::create(WINDOW parent)
_ctl = new TField_control(parent, _ctl_data._dlg,
_ctl_data._x, _ctl_data._y,
_ctl_data._width+1, _ctl_data._size,
_ctl_data._width, _ctl_data._size,
_ctl_data._flags, "");
if (_browse && !enabled_default())

@ -190,6 +190,8 @@ public:
// @cmember Ritorna il cursore
TCursor* cursor() const
{ return _cursor; }
const TArray& fields_array() const { return _fields; }
// @cmember Costruttore
TCursor_sheet(TCursor* cursor, const char* fields,

@ -496,14 +496,12 @@ void TImage::convert_transparent_color()
{
const COLOR trans = xvt_image_get_pixel(_image, 0, 0);
if (trans != MASK_BACK_COLOR && xvt_image_get_format(_image) == XVT_IMAGE_CL8)
{
short dx, dy; xvt_image_get_dimensions(_image, &dx, &dy);
for (short y = 0; y < dy; y++) for (short x = 0; x < dx; x++)
{
const COLOR c = xvt_image_get_pixel(_image, x, y);
if (c == trans)
xvt_image_set_pixel(_image, x, y, MASK_BACK_COLOR);
}
{
for (int index = 0; index < 256; index++)
if (xvt_image_get_clut(_image, index) == trans)
break;
if (index < 256)
xvt_image_set_clut(_image, index, MASK_BACK_COLOR);
}
}