Patch level : 10.0

Files correlati     : tutti
Ricompilazione Demo : [ ]
Commento            :
Supporto per controlli nativi trapsarenti


git-svn-id: svn://10.65.10.50/trunk@17382 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2008-10-08 08:49:04 +00:00
parent bd28cd4d64
commit 4ef1fd286c
4 changed files with 30 additions and 4 deletions

View File

@ -132,7 +132,8 @@ TInfo_mask::TInfo_mask()
add_row(TR("File temporanei"), temp, temp.find(' ') >= 0);
const long mbfree = xvt_fsys_get_disk_free_space(firm2dir(-1), 'M');
add_row(TR("Spazio su disco"), mbfree, mbfree < 512);
TString16 strmb; strmb.format("%ld Mb", mbfree);
add_row(TR("Spazio su disco"), strmb, mbfree < 512);
TString printer(userini.get("Name", "Printer"));
if (printer.blank())

View File

@ -796,12 +796,12 @@ bool TSocketClient::HttpIsRedirectedServer(CONNID id, TString & http_server, TFi
static const TString& bytes2str(long b)
{
TString& tmp = get_tmp_string();
TString& tmp = get_tmp_string(50);
if (b > 0)
{
const long mega = 1024*1024;
if (b >= mega)
tmp.format("%ld MBytes", (b+mega/2)/mega);
tmp.format("%.1lf MBytes", double(b)/mega);
else
{
const long kappa = 1024;

View File

@ -13,7 +13,7 @@ int TIndwin::_indwin_count = 0;
word TIndwin::measure_text(TToken_string& s, word& maxlen) const
{
word lines = 0;
for(const char* t = s.get(0); t; t = s.get())
FOR_EACH_TOKEN(s, t)
{
const word l = strlen(t);
if (l > maxlen) maxlen = l;
@ -46,9 +46,19 @@ TIndwin::TIndwin(long tot, const char* txt, bool cancel, bool bar, int div)
if (bar)
{
XVT_COLOR_COMPONENT xcc[4];
memset(xcc, 0, sizeof(xcc));
xcc[0].type = XVT_COLOR_BACKGROUND;
xcc[0].color = MASK_BACK_COLOR;
xcc[1].type = XVT_COLOR_BLEND;
xcc[1].color = BTN_LIGHT_COLOR;
xcc[2].type = XVT_COLOR_BORDER;
xcc[2].color = BTN_DARK_COLOR;
WIN_DEF wd; memset(&wd, 0, sizeof(wd));
wd.wtype = WC_HGAUGE;
get_bar_rct(wd.rct);
wd.ctlcolors = xcc;
_gauge = xvt_ctl_create_def(&wd, win(), tot);
}

View File

@ -1323,11 +1323,21 @@ int TOutlook_window::selected() const
TOutlook_window::TOutlook_window(int x, int y, int dx, int dy, WINDOW parent, TOutlook_field* owner)
: TControl_host_window(x, y, dx, dy, parent, owner)
{
XVT_COLOR_COMPONENT xcc[4]; memset(xcc, 0, sizeof(xcc));
xcc[0].type = XVT_COLOR_BACKGROUND;
xcc[0].color = BTN_BACK_COLOR;
xcc[1].type = XVT_COLOR_BLEND;
xcc[1].color = BTN_LIGHT_COLOR;
xcc[2].type = XVT_COLOR_BORDER;
xcc[2].color = BTN_DARK_COLOR;
WIN_DEF wd; memset(&wd, 0, sizeof(wd));
wd.wtype = WC_OUTLOOKBAR;
wd.v.ctl.ctrl_id = owner->dlg();
wd.v.ctl.font_id = xvt_default_font(true); // Fat font
wd.rct = resize_rect(x, y, dx, dy, wd.wtype, parent);
wd.ctlcolors = xcc;
_ctrl = xvt_ctl_create_def(&wd, win(), 0);
}
@ -1419,10 +1429,15 @@ int TSlider_window::get() const
TSlider_window::TSlider_window(int x, int y, int dx, int dy, WINDOW parent, TSlider_field* owner)
: TField_window(0, 0, 0, 0, NULL, NULL)
{
XVT_COLOR_COMPONENT xcc[2]; memset(xcc, 0, sizeof(xcc));
xcc[0].type = XVT_COLOR_BLEND;
xcc[0].color = MASK_BACK_COLOR;
set_owner(owner);
WIN_DEF wd; memset(&wd, 0, sizeof(wd));
wd.rct = resize_rect(x, y, dx, dy, wd.wtype, parent);
wd.wtype = (wd.rct.right-wd.rct.left) > (wd.rct.bottom-wd.rct.top) ? WC_HSLIDER : WC_VSLIDER;
wd.ctlcolors = xcc;
wd.v.ctl.ctrl_id = owner->dlg();
real mi, ma; owner->range(mi, ma);