Patch level : 1.32 nopatch

Files correlati     : tutto quanto fa spettacolo
Ricompilazione Demo : [ ]
Commento            :


git-svn-id: svn://10.65.10.50/trunk@10255 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2002-05-27 12:59:35 +00:00
parent 4ee7e590fb
commit 168f67951c
5 changed files with 36 additions and 37 deletions

View File

@ -129,18 +129,12 @@ void TArray::resize(
CHECK(arraysize > _size, "Can't reduce array size.");
TObject** newdata = new TObject* [arraysize];
/*
int i = 0;
if (_data != NULL)
for (i = 0; i < size(); i++) newdata[i] = _data[i];
while (i < arraysize) newdata[i++] = NULL;
*/
memset(newdata, 0, arraysize*sizeof(TObject*));
if (_data != NULL)
{
memcpy(newdata, _data, _size*sizeof(TObject*));
if (_data != NULL) delete _data;
delete _data;
}
_size = arraysize;
_data = newdata;
}
@ -398,7 +392,6 @@ int TArray::insert(
return add(object, index);
}
int TArray::add(const TObject& object, int index)
{
TObject* objptr = object.dup();
@ -420,8 +413,6 @@ TObject* TArray::remove(
int index, // @parm Indica la posizione dell'elemento da eliminare
bool dopack) // @parm Indica se si vuole richiamare la funzione
// <mf TArray::pack> (default FALSE) per spostare gli elementi successivi dell'array
{
CHECKD(index >= 0, "Can't remove array item ", index);

View File

@ -424,11 +424,6 @@ WINDOW create_interface(WINDOW parent, short x, short y, short dx, short dy,
if (x <= 0 || y <= 0 || dx <= 0 || dy <= 0)
{
RCT max_rct; xvt_vobj_get_client_rect(parent, &max_rct);
#ifndef WIN32
if (parent == TASK_WIN)
max_rct.bottom -= 26; // Non contare la status bar
#endif
if (dy <= 0)
{
if (y < -1)
@ -494,22 +489,24 @@ WINDOW create_interface(WINDOW parent, short x, short y, short dx, short dy,
xvt_vobj_move(win, &r);
}
XI_RCT rct; xi_get_xi_rct(itf, &rct);
// Aggiunge rettangolo di cornice per pagine con tag buttons
if (tag)
{
XI_RCT rct; xi_get_xi_rct(itf, &rct);
rct.top += Y_FU_MULTIPLE; // Lascia lo spazio per i Bottoni di cambio pagina
def = xi_add_rect_def(NULL, tag ? MASK_RECT_ID : -1, &rct, XI_ATR_VISIBLE, 0, 0);
XI_OBJ* obj = xi_create(itf, def);
CHECK(obj, "Can't create page rectangle");
def = xi_add_rect_def(NULL, MASK_RECT_ID, &rct, XI_ATR_VISIBLE, 0, 0);
XI_OBJ* obj = xi_create(itf, def);
CHECK(obj, "Can't create page rectangle");
// Fa coincidere esattamente il rettangolo con la finestra che lo contiene
RCT& rect = (RCT &) obj->v.rect->rct;
const int oldy = rect.top;
xvt_vobj_get_client_rect(win, &rect);
rect.top = oldy;
xi_dequeue();
xi_tree_free(def);
// Fa coincidere esattamente il rettangolo con la finestra che lo contiene
RCT& rect = (RCT &) obj->v.rect->rct;
const int oldy = rect.top;
xvt_vobj_get_client_rect(win, &rect);
rect.top = oldy;
xi_dequeue();
xi_tree_free(def);
}
return win;
}

View File

@ -19,7 +19,7 @@ void os_set_event_hook();
unsigned long os_get_free_memory();
bool os_is_removable_drive(const char* path);
bool os_is_network_drive(const char* path);
bool os_is_local_drive(const char* path);
bool os_is_fixed_drive(const char* path);
bool os_test_disk_free_space(const char* path, unsigned long filesize);
unsigned long os_get_disk_size(const char* path);

View File

@ -169,7 +169,7 @@ bool os_is_network_drive(const char* path)
bool os_is_fixed_drive(const char* path)
{
UINT dt = GetDriveType(path);
return dt == DRIVE_FIXED || dt == DRIVE_CDROM;
return dt == DRIVE_FIXED;
}
bool os_test_disk_free_space(const char* path, unsigned long filesize)

View File

@ -38,7 +38,7 @@ TIndwin::TIndwin(long max, const char* txt, bool cancel, bool bar, int div)
int hor = maxlen+3; if (hor > 78) hor = 78;
int ver = lines+1;
ver += bar ? 2 : 0;
ver += bar ? 1 : 0;
ver += cancel ? 2 : 0;
set_win(create_interface(TASK_WIN, -1, -1, hor, ver, TITLE_TEXT, this, FALSE));
@ -57,9 +57,7 @@ TIndwin::TIndwin(long max, const char* txt, bool cancel, bool bar, int div)
}
if (cancel)
{
_cancel = new TPushbutton_control(win(), DLG_CANCEL, -11, -1, 10, 2, "", "Annulla", BMP_CANCEL);
}
open_modal();
do_events();
}
@ -152,10 +150,23 @@ void TIndwin::update_bar()
MASK_LIGHT_COLOR, BTN_BACK_COLOR, MASK_DARK_COLOR);
b.left += 2; b.right -= 2;
b.top += 2; b.bottom -= 2;
// Rettangolo in rilievo
b.right = b.left + int((b.right-b.left)*prc);
xi_draw_3d_rect(w, &b, FALSE, 2,
BTN_LIGHT_COLOR, BTN_BACK_COLOR, BTN_DARK_COLOR);
set_brush(COLOR_BLUE, PAT_SOLID);
xvt_dwin_draw_rect(w, &b);
set_pen(BTN_BACK_COLOR);
const int nStep = b.bottom-b.top;
for (int x = b.left+nStep; x < b.right; x += nStep)
{
for (int i = 0; i < 2; i++)
{
PNT pt = { b.top, x+i };
xvt_dwin_draw_set_pos(w, pt);
pt.v = b.bottom;
xvt_dwin_draw_line(w, pt);
}
}
set_color(COLOR_WHITE, COLOR_DKBLUE);
}
else
{