Patch level : 10.0

Files correlati     : xvaga.dll
Ricompilazione Demo : [ ]
Commento            :
0000875: griglie - patch 98
 la prima nota, in questa versione emette delle righe di separazione campi della griglia non corrispondenti alle colonne, se si allarga la colonna la riga divisoria finta sparisce.


git-svn-id: svn://10.65.10.50/trunk@17310 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2008-09-26 13:35:22 +00:00
parent f01717c80b
commit 50fe8cea88
3 changed files with 54 additions and 20 deletions

View File

@ -38,8 +38,8 @@
#endif
#define XVT_ASSERT(test) _AssertBox((test), __FUNCTION__, __FILE__ , __LINE__)
#define CAST_WIN(win,w) wxWindow& w = *wxStaticCast((wxWindow*)win, wxWindow);
#define CAST_TWIN(win,w) TwxWindow& w = *wxStaticCast((wxWindow*)win, TwxWindow);
#define CAST_WIN(win,w) wxWindow& w = *wxStaticCast((wxObject*)win, wxWindow);
#define CAST_TWIN(win,w) TwxWindow& w = *wxStaticCast((wxObject*)win, TwxWindow);
#define CAST_TDC(win,dc) TDC& dc = GetTDCMapper().GetTDC(win);
#define CAST_DC(win,dc) wxDC& dc = GetTDCMapper().GetDC(win);
#define CAST_FONT(font_id, font) TFontId& font = *wxStaticCast(font_id, TFontId);
@ -1025,7 +1025,10 @@ char* xvt_dm_post_string_prompt(const char* message, char* response, int respons
XVT_ASSERT(message && response && response_len > 0);
wxTextEntryDialog dlg(NULL, message, _GetAppTitle(), response);
if (dlg.ShowModal() == wxID_OK)
{
wxStrncpy(response, dlg.GetValue(), response_len);
response[response_len-1] = '\0';
}
else
*response = '\0';
return response;
@ -1692,13 +1695,10 @@ void xvt_dwin_scroll_rect(WINDOW win, RCT *rctp, int dh, int dv)
CAST_WIN(win, w);
if (rctp != NULL)
{
wxRect rct = NormalizeRCT(rctp);
if (rct.width > 0 && rct.height > 0)
#ifdef WIN32
w.ScrollWindow(dh, dv, &rct);
#else
xvt_dwin_invalidate_rect(win, rctp);
#endif
const wxRect rct = NormalizeRCT(rctp);
if (!rct.IsEmpty())
// w.ScrollWindow(dh, dv, &rct); // Metodo ortodosso ma impreciso di un pixel
xvt_dwin_invalidate_rect(win, rctp); // Pezza "TEMPORANEA" per evitare artefatti
}
else
w.ScrollWindow(dh, dv);
@ -1805,7 +1805,7 @@ void xvt_dwin_draw_line(WINDOW win, PNT pnt)
wxDC& dc = tdc.GetDC();
if (tdc._pnt != to)
dc.DrawLine(tdc._pnt, to);
dc.DrawPoint(to);
// dc.DrawPoint(to); // Un giorno capiro' il perche' servisse
tdc._pnt = to;
}
@ -2886,6 +2886,17 @@ void xvt_res_free_menu_tree(MENU_ITEM* tree)
}
}
XVT_FNTID xvt_res_get_font(int rid)
{
XVT_FNTID f = xvt_font_create();
if (rid <= 0)
{
CAST_FONT(f, font);
font.Copy(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
}
return f;
}
XVT_IMAGE xvt_res_get_image(int rid)
{
const wxString strFileName = _GetResourceName("Image", rid);
@ -4547,8 +4558,7 @@ WINDOW statbar_create(int cid, int left, int top, int right, int bottom,
pStatusBar = w->CreateStatusBar(3, nStyle);
if (pStatusBar != NULL)
{
const wxSize sz = pStatusBar->GetSize();
const int widths[4] = { -4, -3, -2, 0 };
const int widths[4] = { -4, -5, -2, 0 };
pStatusBar->SetStatusWidths(3, widths);
}
}

View File

@ -289,6 +289,7 @@ XVTDLL BOOLEAN xvt_rect_set_pos(RCT *rctp, PNT pos);
XVTDLL void xvt_rect_inflate(RCT *rctp, short ix, short iy);
XVTDLL void xvt_res_free_menu_tree(MENU_ITEM* tree);
XVTDLL XVT_FNTID xvt_res_get_font(int rid);
XVTDLL XVT_IMAGE xvt_res_get_image(int rid);
XVTDLL MENU_ITEM* xvt_res_get_menu(int rid);
XVTDLL char* xvt_res_get_str(int rid, char *s, int sz_s);

View File

@ -263,6 +263,14 @@ WINDOW xvt_ctl_create_def(WIN_DEF *win_def_p, WINDOW parent_win, long app_data)
long style = 0;
TwxOutlookBar* tob = new TwxOutlookBar(pParent, id, rct.GetPosition(), rct.GetSize(), style);
win = (WINDOW)tob;
XVT_FNTID font_id = win_def_p->v.ctl.font_id;
if (font_id == NULL)
font_id = xvt_dwin_get_font(parent_win);
if (font_id != NULL)
{
const wxFont& font = ((TFontId*)font_id)->Font(NULL, win);
tob->SetFont(font);
}
}
break;
default:
@ -1199,9 +1207,7 @@ void TwxOutlookBar::OnDrawItem(wxDC& dc, const wxRect& rect, size_t n) const
nTextOffset += nTextOffset+szIco.x;
}
wxFont font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
font.SetWeight(wxFONTWEIGHT_BOLD);
dc.SetFont(font);
dc.SetFont(GetFont()); // Imposta il font predefinito per questo controllo
wxColour color = wxSystemSettings::GetColour(wxSYS_COLOUR_CAPTIONTEXT);
dc.SetTextForeground(color);
@ -1419,13 +1425,30 @@ BOOLEAN xvt_toolbar_add_control(WINDOW win, int cid, TOOL_TYPE type, const char
default:
{
const wxBitmap& bmp = _GetToolResource(ico, tb.GetToolBitmapSize().y);
wxString tip;
for (const char* t = title; *t; t++) if (*t != '~' && *t != '&')
tip << *t;
wxString cap, tip;
wxChar acc = 0;
for (const char* t = title; *t; t++)
{
if (*t == '~' || *t == '&')
{
cap << '&';
acc = toupper(*(t+1));
}
else
{
cap << *t;
tip << *t;
}
}
if (acc > '\0')
{
if (acc >= 'A' && acc <= 'Z')
tip << "\n(Alt+" << acc << ")";
}
if (idx < 0)
ok = tb.AddTool(cid, title, bmp, wxNullBitmap, wxItemKind(type), tip) != NULL;
ok = tb.AddTool(cid, cap, bmp, wxNullBitmap, wxItemKind(type), tip) != NULL;
else
ok = tb.InsertTool(idx, cid, title, bmp, wxNullBitmap, wxItemKind(type), tip) != NULL;
ok = tb.InsertTool(idx, cid, cap, bmp, wxNullBitmap, wxItemKind(type), tip) != NULL;
}
break;
}