Modifiche per controllo Browsefile
git-svn-id: svn://10.65.10.50/trunk@677 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
e4b6713417
commit
2b82c13c08
@ -828,7 +828,7 @@ void TViswin::update ()
|
|||||||
if (_isopen)
|
if (_isopen)
|
||||||
paint_waitbar (FALSE);
|
paint_waitbar (FALSE);
|
||||||
#if XVT_OS == XVT_OS_WIN
|
#if XVT_OS == XVT_OS_WIN
|
||||||
else
|
else if (parent() == TASK_WIN)
|
||||||
cpb_win_picture_draw_at (win(), _modpic, 4,
|
cpb_win_picture_draw_at (win(), _modpic, 4,
|
||||||
4 + (int) (rows () - 3l) * CHARY);
|
4 + (int) (rows () - 3l) * CHARY);
|
||||||
#endif
|
#endif
|
||||||
@ -1809,7 +1809,9 @@ TViswin ::TViswin (const char *fname,
|
|||||||
const char *title,
|
const char *title,
|
||||||
bool editbutton,
|
bool editbutton,
|
||||||
bool printbutton,
|
bool printbutton,
|
||||||
bool linkbutton):
|
bool linkbutton,
|
||||||
|
int height,
|
||||||
|
WINDOW parent):
|
||||||
_filename (fname), _txt (fname, BUFFERSIZE), _islink (linkbutton), _isedit (editbutton),
|
_filename (fname), _txt (fname, BUFFERSIZE), _islink (linkbutton), _isedit (editbutton),
|
||||||
_isprint (printbutton), _isbar (FALSE), _istimer (FALSE), _iscross (FALSE),
|
_isprint (printbutton), _isbar (FALSE), _istimer (FALSE), _iscross (FALSE),
|
||||||
_isselection (FALSE), _sel_displayed (FALSE), _cross_displayed (FALSE),
|
_isselection (FALSE), _sel_displayed (FALSE), _cross_displayed (FALSE),
|
||||||
@ -1827,14 +1829,19 @@ TViswin ::TViswin (const char *fname,
|
|||||||
|
|
||||||
for (int i = 0; i < MAXBUT; i++)
|
for (int i = 0; i < MAXBUT; i++)
|
||||||
_button[i] = NULL_WIN;
|
_button[i] = NULL_WIN;
|
||||||
|
|
||||||
|
if (parent == NULL_WIN)
|
||||||
|
parent = TASK_WIN;
|
||||||
|
|
||||||
|
bool toplevel = parent == TASK_WIN;
|
||||||
|
|
||||||
const int larg = 76;
|
const int larg = 76;
|
||||||
const int alt = 20;
|
const int alt = 20;
|
||||||
RCT r;
|
RCT r;
|
||||||
get_client_rect (TASK_WIN, &r);
|
get_client_rect (parent, &r);
|
||||||
int maxlarg = r.right / CHARX - 6; // Calculates max window width
|
int maxlarg = r.right / CHARX - 6; // Calculates max window width
|
||||||
|
|
||||||
int maxalt = r.bottom / CHARY - 6;
|
int maxalt = height == 0 ? (r.bottom / CHARY - 6) : height;
|
||||||
if (larg > maxlarg)
|
if (larg > maxlarg)
|
||||||
maxlarg = larg;
|
maxlarg = larg;
|
||||||
if (alt > maxalt)
|
if (alt > maxalt)
|
||||||
@ -1845,37 +1852,50 @@ TViswin ::TViswin (const char *fname,
|
|||||||
_picture[i] = cpb_picture_load (BMP_MODULE1 + i);
|
_picture[i] = cpb_picture_load (BMP_MODULE1 + i);
|
||||||
_modpic = cpb_picture_load (BMP_MODULE);
|
_modpic = cpb_picture_load (BMP_MODULE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
create (-1, -1, maxlarg, maxalt, title,
|
long flags = WSF_HSCROLL | WSF_VSCROLL;
|
||||||
WSF_CLOSE | WSF_HSCROLL | WSF_VSCROLL | WSF_SIZE);
|
if (toplevel)
|
||||||
|
{
|
||||||
|
flags |= (WSF_CLOSE | WSF_SIZE);
|
||||||
|
}
|
||||||
|
|
||||||
|
WIN_TYPE rt = toplevel ? W_DOC : W_PLAIN;
|
||||||
|
|
||||||
|
|
||||||
|
create (-1, parent == TASK_WIN ? -1 : 0, maxlarg, maxalt, title, flags, rt, parent);
|
||||||
|
|
||||||
set_opaque_text (TRUE);
|
set_opaque_text (TRUE);
|
||||||
set_font (FF_FIXED);
|
set_font (FF_FIXED);
|
||||||
|
|
||||||
add_button (DLG_QUIT, DLG_QUIT_TITLE);
|
if (toplevel)
|
||||||
_buttons = 1;
|
|
||||||
|
|
||||||
if (_isedit)
|
|
||||||
{
|
{
|
||||||
add_button (DLG_EDIT, DLG_EDIT_TITLE);
|
add_button (DLG_QUIT, DLG_QUIT_TITLE);
|
||||||
_buttons++;
|
_buttons = 1;
|
||||||
}
|
|
||||||
if (_islink)
|
|
||||||
{
|
if (_isedit)
|
||||||
_link_button = add_button (DLG_LINK, DLG_LINK_TITLE);
|
{
|
||||||
_buttons++;
|
add_button (DLG_EDIT, DLG_EDIT_TITLE);
|
||||||
xvt_enable_control (_link_button, FALSE);
|
_buttons++;
|
||||||
}
|
}
|
||||||
if (_isprint)
|
if (_islink)
|
||||||
{
|
{
|
||||||
add_button (DLG_PRINT, DLG_PRINT_TITLE);
|
_link_button = add_button (DLG_LINK, DLG_LINK_TITLE);
|
||||||
_buttons++;
|
_buttons++;
|
||||||
}
|
xvt_enable_control (_link_button, FALSE);
|
||||||
|
}
|
||||||
//#if XVT_OS == XVT_OS_SCOUNIX
|
if (_isprint)
|
||||||
// maximize();
|
{
|
||||||
// #endif
|
add_button (DLG_PRINT, DLG_PRINT_TITLE);
|
||||||
|
_buttons++;
|
||||||
|
}
|
||||||
|
|
||||||
|
//#if XVT_OS == XVT_OS_SCOUNIX
|
||||||
|
// maximize();
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
else _buttons = 0;
|
||||||
|
|
||||||
_curbut = 0;
|
_curbut = 0;
|
||||||
|
|
||||||
if (_isopen)
|
if (_isopen)
|
||||||
|
@ -136,7 +136,9 @@ public:
|
|||||||
const char* title = NULL,
|
const char* title = NULL,
|
||||||
bool editbutton = TRUE,
|
bool editbutton = TRUE,
|
||||||
bool printbutton = TRUE,
|
bool printbutton = TRUE,
|
||||||
bool linkbutton = TRUE);
|
bool linkbutton = TRUE,
|
||||||
|
int height = 0,
|
||||||
|
WINDOW parent = NULL_WIN);
|
||||||
|
|
||||||
virtual ~TViswin ();
|
virtual ~TViswin ();
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user