Patch level : 2.0 476

Files correlati     : xvaga.dll
Ricompilazione Demo : [ ]
Commento            :

Riaggiustata iconizzazione programmi eseguiti in cascata.
ATTENZIONE! Occorre aggiustare anche wx240.dll !!!!!!!!!!


git-svn-id: svn://10.65.10.50/trunk@11167 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2003-05-22 15:07:21 +00:00
parent e3abddbd95
commit 5d8e9d48f3
2 changed files with 22 additions and 14 deletions

View File

@ -266,6 +266,7 @@ TDC::TDC(wxWindow* owner) : _dc(NULL)
_dct.opaque_text = FALSE; _dct.opaque_text = FALSE;
_font.SetPointSize(9); // Default font _font.SetPointSize(9); // Default font
_deltaf = 0;
SetClippingBox(NULL); // Reset clip area SetClippingBox(NULL); // Reset clip area
@ -415,6 +416,10 @@ wxDC& TDC::GetDC(bool bPaint)
{ {
_dc->SetFont(_font.Font(_dc)); _dc->SetFont(_font.Font(_dc));
_real_font = _font; _real_font = _font;
int height, desc, lead;
_dc->GetTextExtent("Campo", NULL, &height, &desc, &lead);
_deltaf = height-desc;
} }
_dirty = false; _dirty = false;
@ -1927,7 +1932,7 @@ void xvt_dwin_draw_dotted_rect(WINDOW win, RCT *rctp)
OsWin32_DrawDottedRect(dc.GetHDC(), rctp->left, rctp->top, rctp->right, rctp->bottom); OsWin32_DrawDottedRect(dc.GetHDC(), rctp->left, rctp->top, rctp->right, rctp->bottom);
#else #else
DRAW_CTOOLS dct; DRAW_CTOOLS dct;
xvt_dwin_get_draw_ctools(win, &dt); xvt_dwin_get_draw_ctools(win, &dct);
CPEN pen; CPEN pen;
pen.width = 1; pen.width = 1;
@ -1958,6 +1963,7 @@ void xvt_dwin_draw_text(WINDOW win, int x, int y, const char *s, int len)
{ {
if (s && *s && len != 0) if (s && *s && len != 0)
{ {
/*
CAST_DC(win, dc); CAST_DC(win, dc);
wxRect rct; dc.GetClippingBox(rct); wxRect rct; dc.GetClippingBox(rct);
const int maxx = rct.GetRight(); const int maxx = rct.GetRight();
@ -1966,13 +1972,22 @@ void xvt_dwin_draw_text(WINDOW win, int x, int y, const char *s, int len)
wxString str(s); wxString str(s);
if (len >= 0) if (len >= 0)
str.Truncate(len); str.Truncate(len);
int height, desc, lead; int height, desc, lead;
dc.GetTextExtent(str, NULL, &height, &desc, &lead); dc.GetTextExtent(str, NULL, &height, &desc, &lead);
y -= height-desc; // Triste necessita'! y -= height-desc; // Triste necessita'!
dc.DrawText(str, x, y); dc.DrawText(str, x, y);
} }
*/
CAST_TDC(win, tdc);
RCT rct;
const bool noclip = !tdc.GetClippingBox(&rct);
if (noclip || x < rct.right)
{
wxString str(s);
if (len >= 0)
str.Truncate(len);
tdc.GetDC().DrawText(str, x, y-tdc.GetFontDelta());
}
} }
} }
@ -2081,7 +2096,6 @@ void xvt_dwin_scroll_rect(WINDOW win, RCT *rctp, int dh, int dv)
} }
else else
w.ScrollWindow(dh, dv); w.ScrollWindow(dh, dv);
// xvt_dwin_update(win); // Useless
} }
} }
@ -3450,20 +3464,12 @@ long xvt_sys_execute(const char* cmdline, BOOLEAN sync, BOOLEAN iconizetask)
if (iconizetask) if (iconizetask)
{ {
wxEnableTopLevelWindows(FALSE); wxEnableTopLevelWindows(FALSE);
#ifdef WIN32 ((wxFrame*)_task_win)->Iconize();
::PostMessage((HWND)_task_win->GetHWND(), WM_SYSCOMMAND, SC_MINIMIZE, 0L);
#else
_task_win->Hide();
#endif
} }
exitcode = wxExecute(cmdline, wxEXEC_SYNC); exitcode = wxExecute(cmdline, wxEXEC_SYNC);
if (iconizetask) if (iconizetask)
{ {
#ifdef WIN32 ((wxFrame*)_task_win)->Restore();
::SendMessage((HWND)_task_win->GetHWND(), WM_SYSCOMMAND, SC_RESTORE, 0L);
#else
_task_win->Show();
#endif
wxEnableTopLevelWindows(TRUE); wxEnableTopLevelWindows(TRUE);
_task_win->Raise(); _task_win->Raise();
} }

View File

@ -49,6 +49,7 @@ protected:
wxDC* _dc; wxDC* _dc;
RCT _clip; RCT _clip;
int _dirty; // false = 0, true = 1, very_dirty = -1; int _dirty; // false = 0, true = 1, very_dirty = -1;
int _deltaf;
DRAW_CTOOLS _real_dct; DRAW_CTOOLS _real_dct;
TFontId _real_font; TFontId _real_font;
@ -65,6 +66,7 @@ public:
void SetClippingBox(const RCT* pRct); void SetClippingBox(const RCT* pRct);
bool GetClippingBox(RCT* pRct) const; bool GetClippingBox(RCT* pRct) const;
void SetDirty(int d = 1); void SetDirty(int d = 1);
int GetFontDelta() const { return _deltaf; }
virtual wxDC& GetDC(bool bPaint = false); virtual wxDC& GetDC(bool bPaint = false);
void KillDC(); void KillDC();