Patch level : 10.0 0020
Files correlati : Ricompilazione Demo : [ ] Commento : Sistemate le definizioni di XI_R4 git-svn-id: svn://10.65.10.50/trunk@16429 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
94d905ef34
commit
167570049d
@ -807,11 +807,8 @@ TGrid_control::TGrid_control(
|
||||
listdef->app_data = (long)this;
|
||||
|
||||
XI_LIST_DEF* l = listdef->v.list;
|
||||
#ifdef XI_R4
|
||||
l->min_heading_height = xi_button_calc_height_font(xi_get_system_font()) * lines_in_header;
|
||||
#else
|
||||
l->min_heading_height = xi_button_calc_height_font_id(xvt_default_font()) * lines_in_header;
|
||||
#endif
|
||||
// l->min_heading_height = xi_button_calc_height_font_id(xvt_default_font()) * lines_in_header;
|
||||
l->sizable_columns = true;
|
||||
l->movable_columns = true;
|
||||
l->fixed_columns = fixed_columns;
|
||||
|
@ -284,11 +284,7 @@ XVT_FNTID xvt_load_default_font()
|
||||
return font;
|
||||
}
|
||||
|
||||
#ifdef XI_R4
|
||||
static byte event_map[XIE_XVT_POST_EVENT+1];
|
||||
#else
|
||||
static byte event_map[XIE_POST_NAVIGATION+1];
|
||||
#endif
|
||||
static byte event_map[XIE_LAST_EVENT];
|
||||
|
||||
enum event_action { a_ignore, a_xvt, a_xvt_post, a_obj, a_child, a_update, a_select, a_post, a_debug };
|
||||
|
||||
@ -360,12 +356,14 @@ void init_controls()
|
||||
xi_set_pref(XI_PREF_NATIVE_CTRLS, NATIVE_CONTROLS);
|
||||
xi_set_pref(XI_PREF_3D_LOOK, CAMPI_SCAVATI);
|
||||
xi_set_pref(XI_PREF_CARET_WIDTH, 2);
|
||||
#ifdef XI_R4
|
||||
//#ifdef XI_R4
|
||||
xi_set_pref(XI_PREF_COMBO_ICON, ICO_COMBO);
|
||||
xi_set_pref(XI_PREF_OPTIMIZE_CELL_REQUESTS, true);
|
||||
/*
|
||||
#else
|
||||
xi_set_pref(XI_PREF_COMBO_ICON, COMBO_ICON);
|
||||
#endif
|
||||
*/
|
||||
|
||||
xi_init();
|
||||
|
||||
@ -1139,6 +1137,7 @@ void TControl::change_attrib(unsigned long mask, bool on, XI_OBJ* obj)
|
||||
else attr &= ~mask;
|
||||
if (attr != old_attr) // C'e' un vero cambiamento d'attributo
|
||||
{
|
||||
/*
|
||||
#ifndef XI_R4
|
||||
// Se la finestra e' chiusa e il campo e un bottone o e' editabile allora cambia l'attributo
|
||||
// senza ridisegnare il campo, il che provocherebbe problemi di funzionamento degli sheet
|
||||
@ -1155,6 +1154,7 @@ void TControl::change_attrib(unsigned long mask, bool on, XI_OBJ* obj)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
// Usa tranquillamente il metodo ortodosso
|
||||
xi_set_attrib(obj, attr);
|
||||
}
|
||||
@ -1275,8 +1275,9 @@ void TText_control::set_caption(const char* text)
|
||||
xi_set_text(_obj, (char*)c);
|
||||
_obj->v.text->fore_color = color;
|
||||
|
||||
#ifdef XI_R4
|
||||
//#ifdef XI_R4
|
||||
xi_set_obj_font_id(_obj, xvt_default_font(bold, big));
|
||||
/*
|
||||
#else
|
||||
FONT_OBJ* &font = _obj->v.text->font;
|
||||
|
||||
@ -1296,6 +1297,7 @@ void TText_control::set_caption(const char* text)
|
||||
}
|
||||
xi_invalidate_rect(parent(), &rct);
|
||||
#endif
|
||||
*/
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
|
@ -5020,13 +5020,13 @@ const char* TMemo_field::reformat(const char* data) const
|
||||
|
||||
const char* TMemo_field::raw2win(const char* data) const
|
||||
{
|
||||
#ifdef XI_R4
|
||||
//#ifdef XI_R4
|
||||
if (strchr(data, '\r') == NULL)
|
||||
return data;
|
||||
TString& s = _ctl_data._park;
|
||||
s = data;
|
||||
s.replace('\r', '\n');
|
||||
#else
|
||||
/* #else
|
||||
if (strchr(data, '\n') == NULL)
|
||||
return data;
|
||||
|
||||
@ -5034,14 +5034,15 @@ const char* TMemo_field::raw2win(const char* data) const
|
||||
s = data;
|
||||
for (int i = 0; s[i]; i++)
|
||||
if (s[i] == '\n') s[i] = '\r';
|
||||
#endif
|
||||
#endif */
|
||||
return s;
|
||||
}
|
||||
|
||||
const char* TMemo_field::win2raw(const char* data) const
|
||||
{
|
||||
#ifdef XI_R4
|
||||
//#ifdef XI_R4
|
||||
return data;
|
||||
/*
|
||||
#else
|
||||
if (strchr(data, '\r') == NULL)
|
||||
return data;
|
||||
@ -5050,6 +5051,7 @@ const char* TMemo_field::win2raw(const char* data) const
|
||||
if (*s == '\r') *s = '\n';
|
||||
return _ctl_data._park;
|
||||
#endif
|
||||
*/
|
||||
}
|
||||
|
||||
bool TMemo_field::on_key(KEY k)
|
||||
|
@ -507,11 +507,8 @@ TSpreadsheet::TSpreadsheet(
|
||||
listdef->app_data = (long)this;
|
||||
XI_LIST_DEF* l = listdef->v.list;
|
||||
l->width = rct.right - rct.left;
|
||||
#ifdef XI_R4
|
||||
l->min_heading_height = xi_button_calc_height_font(xi_get_system_font()) * lines_in_header;
|
||||
#else
|
||||
l->min_heading_height = xi_button_calc_height_font_id(xvt_default_font()) * lines_in_header;
|
||||
#endif
|
||||
// l->min_heading_height = xi_button_calc_height_font_id(xvt_default_font()) * lines_in_header;
|
||||
l->sizable_columns = TRUE;
|
||||
l->movable_columns = TRUE;
|
||||
l->scroll_bar = TRUE;
|
||||
@ -1436,13 +1433,15 @@ bool TSpreadsheet::event_handler(XI_OBJ* itf, XI_EVENT *xiev)
|
||||
_edit_field->set_focusdirty(_cell_dirty = FALSE);
|
||||
|
||||
// Azzera il flag di update_pending
|
||||
#ifdef XI_R4
|
||||
//#ifdef XI_R4
|
||||
XinEvent e; e.type = XinEventPaint;
|
||||
xi_eh(_obj->itf->v.itf->xin_win, &e);
|
||||
/*
|
||||
#else
|
||||
EVENT e; e.type = E_UPDATE;
|
||||
xi_eh(_obj->itf->v.itf->xvt_win, &e);
|
||||
#endif
|
||||
*/
|
||||
owner().mask().notify_focus_field(id()); // Non si ripete mai abbastanza!
|
||||
}
|
||||
XI_OBJ row;
|
||||
|
@ -75,13 +75,15 @@ void TIndwin::set_text(
|
||||
// passato, quindi occorre dimensionare correttamente il primo passato
|
||||
// (es. inserire degli spazi) quando se ne prevede uno piu' lungo.
|
||||
{
|
||||
#ifdef XI_R4
|
||||
//#ifdef XI_R4
|
||||
_text->set_caption(t);
|
||||
/*
|
||||
#else
|
||||
TString testo(t);
|
||||
testo.replace('\n', '\r');
|
||||
_text->set_caption(testo);
|
||||
#endif
|
||||
*/
|
||||
}
|
||||
|
||||
void TIndwin::setmax(long m)
|
||||
|
@ -208,11 +208,8 @@ TSheet_control::TSheet_control(
|
||||
listdef->app_data = (long)this;
|
||||
|
||||
XI_LIST_DEF* l = listdef->v.list;
|
||||
#ifdef XI_R4
|
||||
l->min_heading_height = xi_button_calc_height_font(xi_get_system_font()) * lines_in_header;
|
||||
#else
|
||||
l->min_heading_height = xi_button_calc_height_font_id(xvt_default_font()) * lines_in_header;
|
||||
#endif
|
||||
l->min_heading_height = xi_button_calc_height_font(xi_get_system_font()) * lines_in_header;
|
||||
// l->min_heading_height = xi_button_calc_height_font_id(xvt_default_font()) * lines_in_header;
|
||||
l->max_lines_in_cell = lines_in_cell;
|
||||
l->sizable_columns = TRUE;
|
||||
l->movable_columns = TRUE;
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <xi.h>
|
||||
#include <controls.h>
|
||||
#include <image.h>
|
||||
#include <virtkeyb.h>
|
||||
|
7
xi/xi.h
7
xi/xi.h
@ -672,13 +672,12 @@ typedef enum _xi_event_type
|
||||
XIE_COL_MOVE,
|
||||
XIE_COL_SIZE,
|
||||
XIE_DROP_ROW,
|
||||
#if defined(XI_R3_COMPAT) || !defined(XI_R4_API)
|
||||
XIE_POST_NAVIGATION,
|
||||
#if defined(XI_R3_COMPAT) || !defined(XI_R4_API)
|
||||
XIE_XVT_EVENT,
|
||||
XIE_XVT_POST_EVENT
|
||||
#else
|
||||
XIE_POST_NAVIGATION
|
||||
XIE_XVT_POST_EVENT,
|
||||
#endif
|
||||
XIE_LAST_EVENT
|
||||
}
|
||||
|
||||
XI_EVENT_TYPE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user