Patch level : 2.2
Files correlati : Ricompilazione Demo : [ ] Commento : Corretti alcuni problemi di compatibilita' tra wxWindows 2.4.0 e wxWidgets 2.6.1 git-svn-id: svn://10.65.10.50/trunk@13377 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
85dbb537b5
commit
93f7c60c80
@ -124,7 +124,7 @@ int FamilySorter(const void* p1,const void* p2)
|
|||||||
return strcmp(s1, s2);
|
return strcmp(s1, s2);
|
||||||
}
|
}
|
||||||
|
|
||||||
int OsWin32_EnumerateFamilies(unsigned int hDC, char** families, int max_count)
|
int OsWin32_EnumerateFamilies(WXHDC hDC, char** families, int max_count)
|
||||||
{
|
{
|
||||||
XvtData data;
|
XvtData data;
|
||||||
data.families = families;
|
data.families = families;
|
||||||
@ -136,7 +136,7 @@ int OsWin32_EnumerateFamilies(unsigned int hDC, char** families, int max_count)
|
|||||||
return data.cur_count;
|
return data.cur_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
int OsWin32_EnumerateSizes(unsigned int hDC, const char* name, long* sizes, short* scalable, int max_count)
|
int OsWin32_EnumerateSizes(WXHDC hDC, const char* name, long* sizes, short* scalable, int max_count)
|
||||||
{
|
{
|
||||||
XvtData data;
|
XvtData data;
|
||||||
data.sizes = sizes;
|
data.sizes = sizes;
|
||||||
@ -183,7 +183,7 @@ void* OsWin32_GetPrinterInfo(int& size, const char* printer)
|
|||||||
return pdm;
|
return pdm;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OsWin32_SetCaptionStyle(unsigned int handle, bool set)
|
void OsWin32_SetCaptionStyle(WXHWND handle, bool set)
|
||||||
{
|
{
|
||||||
HWND hwnd = (HWND)handle;
|
HWND hwnd = (HWND)handle;
|
||||||
DWORD s = ::GetWindowLong(hwnd, GWL_STYLE);
|
DWORD s = ::GetWindowLong(hwnd, GWL_STYLE);
|
||||||
@ -391,7 +391,7 @@ bool OsWin32_DrawBitmap(HBITMAP hBMP, wxDC& dc, const wxRect& dst, const wxRect&
|
|||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OsWin32_DrawDottedRect(unsigned int hDC, int left, int top, int right, int bottom)
|
void OsWin32_DrawDottedRect(WXHDC hDC, int left, int top, int right, int bottom)
|
||||||
{
|
{
|
||||||
LOGBRUSH lBrush;
|
LOGBRUSH lBrush;
|
||||||
lBrush.lbHatch = 0; lBrush.lbStyle = BS_SOLID;
|
lBrush.lbHatch = 0; lBrush.lbStyle = BS_SOLID;
|
||||||
@ -448,7 +448,7 @@ static wxString FindHelpFile(const char* topic)
|
|||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
int OsWin32_Help(unsigned int handle, const char* hlp, unsigned int cmd, const char* topic)
|
int OsWin32_Help(WXHWND handle, const char* hlp, unsigned int cmd, const char* topic)
|
||||||
{
|
{
|
||||||
HWND hwnd = (HWND)handle;
|
HWND hwnd = (HWND)handle;
|
||||||
|
|
||||||
|
@ -4,21 +4,21 @@ void* OsWin32_ConvertFromNativePrinterInfo(void* hGlobal, unsigned int& nSize);
|
|||||||
void* OsWin32_ConvertToNativePrinterInfo(void* data, unsigned int nSize);
|
void* OsWin32_ConvertToNativePrinterInfo(void* data, unsigned int nSize);
|
||||||
HBITMAP OsWin32_CreateBitmap(const wxImage& img, wxDC& dc);
|
HBITMAP OsWin32_CreateBitmap(const wxImage& img, wxDC& dc);
|
||||||
bool OsWin32_DrawBitmap(HBITMAP hBMP, wxDC& dc, const wxRect& dst, const wxRect& src);
|
bool OsWin32_DrawBitmap(HBITMAP hBMP, wxDC& dc, const wxRect& dst, const wxRect& src);
|
||||||
void OsWin32_DrawDottedRect(unsigned int hDC, int left, int top, int right, int bottom);
|
void OsWin32_DrawDottedRect(WXHDC hDC, int left, int top, int right, int bottom);
|
||||||
|
|
||||||
wxString OsWin32_File2App(const char* filename);
|
wxString OsWin32_File2App(const char* filename);
|
||||||
bool OsWin32_GotoUrl(const char* url, const char* action);
|
bool OsWin32_GotoUrl(const char* url, const char* action);
|
||||||
unsigned int OsWin32_LoadIcon(const char* file);
|
unsigned int OsWin32_LoadIcon(const char* file);
|
||||||
|
|
||||||
int OsWin32_EnumerateFamilies(unsigned int hDC, char** families, int max_count);
|
int OsWin32_EnumerateFamilies(WXHDC hDC, char** families, int max_count);
|
||||||
int OsWin32_EnumerateSizes(unsigned int hDC, const char* name, long* sizes, short* scalable, int max_count);
|
int OsWin32_EnumerateSizes(WXHDC hDC, const char* name, long* sizes, short* scalable, int max_count);
|
||||||
void OsWin32_SetCaptionStyle(unsigned int handle, bool set);
|
void OsWin32_SetCaptionStyle(WXHWND handle, bool set);
|
||||||
void* OsWin32_GetPrinterInfo(int& size, const char* printer);
|
void* OsWin32_GetPrinterInfo(int& size, const char* printer);
|
||||||
|
|
||||||
void OsWin32_PlaceProcessInWindow(unsigned int instance, const char* name, unsigned int parent);
|
void OsWin32_PlaceProcessInWindow(unsigned int instance, const char* name, unsigned int parent);
|
||||||
void OsWin32_UpdateWindow(unsigned int handle);
|
void OsWin32_UpdateWindow(unsigned int handle);
|
||||||
|
|
||||||
int OsWin32_Help(unsigned int handle, const char* hlp, unsigned int cmd, const char* topic);
|
int OsWin32_Help(WXHWND handle, const char* hlp, unsigned int cmd, const char* topic);
|
||||||
bool OsWin32_TestNetworkVersion();
|
bool OsWin32_TestNetworkVersion();
|
||||||
|
|
||||||
bool OsWin32_HL_Crypt(unsigned short* data);
|
bool OsWin32_HL_Crypt(unsigned short* data);
|
||||||
@ -33,7 +33,6 @@ bool OsWin32_SL_Logout() ;
|
|||||||
bool OsWin32_SL_ReadBlock(unsigned short reg, unsigned short size, unsigned short* data);
|
bool OsWin32_SL_ReadBlock(unsigned short reg, unsigned short size, unsigned short* data);
|
||||||
bool OsWin32_SL_WriteBlock(unsigned short reg, unsigned short size, const unsigned short* data);
|
bool OsWin32_SL_WriteBlock(unsigned short reg, unsigned short size, const unsigned short* data);
|
||||||
|
|
||||||
//BOOL OsWin32_SpoolRow(const char* pData, unsigned int cbBytes, unsigned int hPrnDC);
|
|
||||||
void OsWin32_SpoolNewLine(unsigned int hdc);
|
void OsWin32_SpoolNewLine(unsigned int hdc);
|
||||||
bool OsWin32_IsGenericTextOnly(void* devmode);
|
bool OsWin32_IsGenericTextOnly(void* devmode);
|
||||||
|
|
||||||
|
@ -397,7 +397,10 @@ wxDC& TDC::GetDC(bool bPaint)
|
|||||||
{
|
{
|
||||||
if (_dc == NULL)
|
if (_dc == NULL)
|
||||||
{
|
{
|
||||||
_dc = new wxClientDC(_owner);
|
if (_owner == NULL || (unsigned long)_owner == SCREEN_WIN)
|
||||||
|
_dc = new wxScreenDC();
|
||||||
|
else
|
||||||
|
_dc = new wxClientDC(_owner);
|
||||||
_dirty = -1;
|
_dirty = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -483,11 +486,7 @@ void TDC::KillDC()
|
|||||||
{
|
{
|
||||||
if (_dc != NULL)
|
if (_dc != NULL)
|
||||||
{
|
{
|
||||||
#if wxCHECK_VERSION(2,6,1)
|
|
||||||
SetClippingBox(NULL);
|
SetClippingBox(NULL);
|
||||||
#else
|
|
||||||
SetClippingBox(NULL);
|
|
||||||
#endif
|
|
||||||
delete _dc;
|
delete _dc;
|
||||||
_dc = NULL;
|
_dc = NULL;
|
||||||
}
|
}
|
||||||
@ -623,6 +622,13 @@ bool TDCMapper::HasValidDC(WINDOW owner) const
|
|||||||
|
|
||||||
class TwxWindowBase : public wxWindow
|
class TwxWindowBase : public wxWindow
|
||||||
{
|
{
|
||||||
|
#ifdef LINUX
|
||||||
|
private:
|
||||||
|
wxString m_strTitle;
|
||||||
|
virtual void SetTitle(const wxString& title) { wxWindow::SetTitle(m_strTitle = title); }
|
||||||
|
virtual wxString GetTitle() const { return m_strTitle; }
|
||||||
|
#endif
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TwxWindowBase() { }
|
TwxWindowBase() { }
|
||||||
TwxWindowBase(wxWindow *parent, wxWindowID id, const wxString &title,
|
TwxWindowBase(wxWindow *parent, wxWindowID id, const wxString &title,
|
||||||
@ -639,18 +645,11 @@ TwxWindowBase::TwxWindowBase(wxWindow *parent, wxWindowID id, const wxString &ti
|
|||||||
// Evita inutili sfarfallamenti in quanto wxWidgets crea le finestre visibili per default
|
// Evita inutili sfarfallamenti in quanto wxWidgets crea le finestre visibili per default
|
||||||
wxWindowBase::Show(false);
|
wxWindowBase::Show(false);
|
||||||
Create(parent, id, pos, size, style, title);
|
Create(parent, id, pos, size, style, title);
|
||||||
|
SetTitle(title); // Triste necessita', la Create sembra ignorare il titolo
|
||||||
}
|
}
|
||||||
|
|
||||||
class TwxWindow : public TwxWindowBase
|
class TwxWindow : public TwxWindowBase
|
||||||
{
|
{
|
||||||
#ifdef LINUX
|
|
||||||
private:
|
|
||||||
wxString m_strTitle;
|
|
||||||
public:
|
|
||||||
virtual void SetTitle(const wxString& title) { wxWindow::SetTitle(m_strTitle = title); }
|
|
||||||
virtual wxString GetTitle() const { return m_strTitle; }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MENU_ITEM* m_menu;
|
MENU_ITEM* m_menu;
|
||||||
|
|
||||||
@ -1914,7 +1913,7 @@ BOOLEAN xvt_help_process_event(XVT_HELP_INFO hi, WINDOW win, EVENT *ev)
|
|||||||
BOOLEAN bProcessed = FALSE;
|
BOOLEAN bProcessed = FALSE;
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
unsigned int hwnd = (unsigned int)xvt_vobj_get_attr(win, ATTR_NATIVE_WINDOW);
|
WXHWND hwnd = (WXHWND)xvt_vobj_get_attr(win, ATTR_NATIVE_WINDOW);
|
||||||
switch (ev->type)
|
switch (ev->type)
|
||||||
{
|
{
|
||||||
case E_COMMAND:
|
case E_COMMAND:
|
||||||
@ -2065,6 +2064,11 @@ bool TFontId::Underline() const
|
|||||||
return (m_wMask & XVT_FS_UNDERLINE) != 0;
|
return (m_wMask & XVT_FS_UNDERLINE) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int TFontId::Weight() const
|
||||||
|
{
|
||||||
|
return (m_wMask & XVT_FS_BOLD) ? wxBOLD : wxNORMAL;
|
||||||
|
}
|
||||||
|
|
||||||
wxFont& TFontId::Font(wxDC* dc, WINDOW win) const
|
wxFont& TFontId::Font(wxDC* dc, WINDOW win) const
|
||||||
{
|
{
|
||||||
int nSize = PointSize();
|
int nSize = PointSize();
|
||||||
@ -2075,9 +2079,9 @@ wxFont& TFontId::Font(wxDC* dc, WINDOW win) const
|
|||||||
if (dc != lastDC)
|
if (dc != lastDC)
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
const char* strDefaultFaceName = "Courier New";
|
const char* DEFAULT_FONT_NAME = "Courier New";
|
||||||
#else
|
#else
|
||||||
const char* strDefaultFaceName = "Courier";
|
const char* DEFAULT_FONT_NAME = "Courier";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const wxSize ppi = dc->GetPPI();
|
const wxSize ppi = dc->GetPPI();
|
||||||
@ -2091,7 +2095,7 @@ wxFont& TFontId::Font(wxDC* dc, WINDOW win) const
|
|||||||
while (nMin <= nMax)
|
while (nMin <= nMax)
|
||||||
{
|
{
|
||||||
const int nFontSize = (nMin+nMax)/2;
|
const int nFontSize = (nMin+nMax)/2;
|
||||||
wxFont courier(-nFontSize, wxDEFAULT, wxNORMAL, wxNORMAL, FALSE, strDefaultFaceName);
|
wxFont courier(-nFontSize, wxDEFAULT, wxNORMAL, wxNORMAL, FALSE, DEFAULT_FONT_NAME);
|
||||||
dc->SetFont(courier);
|
dc->SetFont(courier);
|
||||||
int tw; dc->GetTextExtent(str, &tw, NULL);
|
int tw; dc->GetTextExtent(str, &tw, NULL);
|
||||||
if (tw <= nTarget10)
|
if (tw <= nTarget10)
|
||||||
@ -2117,7 +2121,7 @@ wxFont& TFontId::Font(wxDC* dc, WINDOW win) const
|
|||||||
for (int i = 15; i > 0; i--)
|
for (int i = 15; i > 0; i--)
|
||||||
{
|
{
|
||||||
const int nFontSize = nBest-i;
|
const int nFontSize = nBest-i;
|
||||||
wxFont courier(-nFontSize, Family(), wxNORMAL, wxNORMAL, FALSE, strDefaultFaceName);
|
wxFont courier(-nFontSize, Family(), wxNORMAL, wxNORMAL, FALSE, DEFAULT_FONT_NAME);
|
||||||
dc->SetFont(courier);
|
dc->SetFont(courier);
|
||||||
int tw; dc->GetTextExtent(str, &tw, NULL);
|
int tw; dc->GetTextExtent(str, &tw, NULL);
|
||||||
if (tw > nTarget10 && bPrevGood)
|
if (tw > nTarget10 && bPrevGood)
|
||||||
@ -2138,16 +2142,14 @@ wxFont& TFontId::Font(wxDC* dc, WINDOW win) const
|
|||||||
lastDC = dc;
|
lastDC = dc;
|
||||||
}
|
}
|
||||||
nSize = (int)(nSize * dPrintScale + 0.5);
|
nSize = (int)(nSize * dPrintScale + 0.5);
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
// In Windows rendo negativa la dimensione perche' e' piu' preciso!
|
// In Windows rendo negativa la dimensione perche' e' piu' preciso!
|
||||||
nSize = -nSize;
|
nSize = -nSize;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
const int nWeight = (m_wMask & XVT_FS_BOLD) ? wxBOLD : wxNORMAL;
|
|
||||||
wxFont* font = wxTheFontList->FindOrCreateFont(
|
wxFont* font = wxTheFontList->FindOrCreateFont(
|
||||||
nSize, Family(), Style(), nWeight, Underline(), FaceName());
|
nSize, Family(), Style(), Weight(), Underline(), FaceName());
|
||||||
return *font;
|
return *font;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2321,7 +2323,7 @@ void xvt_dwin_draw_dotted_rect(WINDOW win, RCT *rctp)
|
|||||||
if (can_draw_dots)
|
if (can_draw_dots)
|
||||||
{
|
{
|
||||||
CAST_DC(win, dc);
|
CAST_DC(win, dc);
|
||||||
OsWin32_DrawDottedRect((unsigned int)dc.GetHDC(), rctp->left, rctp->top, rctp->right, rctp->bottom);
|
OsWin32_DrawDottedRect(dc.GetHDC(), rctp->left, rctp->top, rctp->right, rctp->bottom);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -2369,8 +2371,7 @@ void xvt_dwin_draw_text(WINDOW win, int x, int y, const char *s, int len)
|
|||||||
#ifdef LINUX
|
#ifdef LINUX
|
||||||
if (tdc._dct.opaque_text)
|
if (tdc._dct.opaque_text)
|
||||||
{
|
{
|
||||||
RCT back;
|
RCT back;
|
||||||
|
|
||||||
back.left = x;
|
back.left = x;
|
||||||
back.right = x + xvt_dwin_get_text_width(win, str, -1);
|
back.right = x + xvt_dwin_get_text_width(win, str, -1);
|
||||||
back.top = y - delta;
|
back.top = y - delta;
|
||||||
@ -2477,7 +2478,7 @@ BOOLEAN xvt_dwin_is_update_needed(WINDOW win, RCT* rctp)
|
|||||||
{
|
{
|
||||||
if (win != NULL_WIN && rctp != NULL)
|
if (win != NULL_WIN && rctp != NULL)
|
||||||
{
|
{
|
||||||
if (win == PRINTER_WIN)
|
if (win == PRINTER_WIN || win == SCREEN_WIN)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
CAST_WIN(win, w);
|
CAST_WIN(win, w);
|
||||||
const wxRect rect1 = NormalizeRCT(rctp);
|
const wxRect rect1 = NormalizeRCT(rctp);
|
||||||
@ -2495,8 +2496,7 @@ void xvt_dwin_scroll_rect(WINDOW win, RCT *rctp, int dh, int dv)
|
|||||||
if (rctp != NULL)
|
if (rctp != NULL)
|
||||||
{
|
{
|
||||||
wxRect rct = NormalizeRCT(rctp);
|
wxRect rct = NormalizeRCT(rctp);
|
||||||
if (rct.width > 0 && rct.height > 0)
|
if (rct.width > 0 && rct.height > 0)
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
w.ScrollWindow(dh, dv, &rct);
|
w.ScrollWindow(dh, dv, &rct);
|
||||||
#else
|
#else
|
||||||
@ -2645,7 +2645,7 @@ XVT_FNTID xvt_font_create(void)
|
|||||||
return (XVT_FNTID)pFont;
|
return (XVT_FNTID)pFont;
|
||||||
}
|
}
|
||||||
|
|
||||||
void xvt_font_deserialize(XVT_FNTID font_id, const char *buf)
|
void xvt_font_deserialize(XVT_FNTID font_id, const char* buf)
|
||||||
{
|
{
|
||||||
// 01\\Courier\\0\\10\\WIN01/-13/0/0/0/400/0/0/0/0/1/2/1/49/Courier
|
// 01\\Courier\\0\\10\\WIN01/-13/0/0/0/400/0/0/0/0/1/2/1/49/Courier
|
||||||
|
|
||||||
@ -3041,6 +3041,7 @@ XVT_IMAGE xvt_image_capture(WINDOW win, const RCT* src)
|
|||||||
|
|
||||||
wxBitmap bmp(r.GetWidth(), r.GetHeight());
|
wxBitmap bmp(r.GetWidth(), r.GetHeight());
|
||||||
CAST_DC(win, wdc);
|
CAST_DC(win, wdc);
|
||||||
|
|
||||||
wxMemoryDC mdc;
|
wxMemoryDC mdc;
|
||||||
mdc.SelectObject(bmp);
|
mdc.SelectObject(bmp);
|
||||||
mdc.Blit(wxPoint(0,0), r.GetSize(), &wdc, r.GetPosition());
|
mdc.Blit(wxPoint(0,0), r.GetSize(), &wdc, r.GetPosition());
|
||||||
@ -4452,8 +4453,8 @@ long xvt_vobj_get_attr(WINDOW win, long data)
|
|||||||
ret = wxSystemSettings::GetMetric(wxSYS_SCREEN_X);
|
ret = wxSystemSettings::GetMetric(wxSYS_SCREEN_X);
|
||||||
break;
|
break;
|
||||||
case ATTR_SCREEN_WINDOW:
|
case ATTR_SCREEN_WINDOW:
|
||||||
ret = NULL_WIN; // Non bellissimo ma per ora...
|
ret = 882L; // Scelta arbitraria ma accettabile
|
||||||
break;
|
break;
|
||||||
case ATTR_SPEECH_MODE:
|
case ATTR_SPEECH_MODE:
|
||||||
ret = m_nSpeechMode;
|
ret = m_nSpeechMode;
|
||||||
break;
|
break;
|
||||||
@ -4486,14 +4487,18 @@ RCT* xvt_vobj_get_client_rect(WINDOW win, RCT *rctp)
|
|||||||
if (win == PRINTER_WIN)
|
if (win == PRINTER_WIN)
|
||||||
{
|
{
|
||||||
l = h = 6000; // circa A4 height
|
l = h = 6000; // circa A4 height
|
||||||
}
|
} else
|
||||||
else
|
if (win == SCREEN_WIN)
|
||||||
|
{
|
||||||
|
l = wxSystemSettings::GetMetric(wxSYS_SCREEN_X);
|
||||||
|
h = wxSystemSettings::GetMetric(wxSYS_SCREEN_Y) - 32; // Puerile tentativo di escludere la task bar
|
||||||
|
} else
|
||||||
{
|
{
|
||||||
CAST_WIN(win, w);
|
CAST_WIN(win, w);
|
||||||
w.GetClientSize(&l, &h);
|
w.GetClientSize(&l, &h);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // NULL_WIN -> SREEN_WINDOW
|
else // NULL_WIN = schermo intero
|
||||||
{
|
{
|
||||||
l = wxSystemSettings::GetMetric(wxSYS_SCREEN_X);
|
l = wxSystemSettings::GetMetric(wxSYS_SCREEN_X);
|
||||||
h = wxSystemSettings::GetMetric(wxSYS_SCREEN_Y);
|
h = wxSystemSettings::GetMetric(wxSYS_SCREEN_Y);
|
||||||
@ -4698,7 +4703,7 @@ WINDOW xvt_win_create(WIN_TYPE wtype, const RCT* rct_p, const char* title, int m
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
OsWin32_SetCaptionStyle((unsigned int)w->GetHWND(), wtype == W_DOC);
|
OsWin32_SetCaptionStyle(w->GetHWND(), wtype == W_DOC);
|
||||||
#else
|
#else
|
||||||
OsLinux_SetCaptionStyle((wxWindow*)w, style);
|
OsLinux_SetCaptionStyle((wxWindow*)w, style);
|
||||||
#endif
|
#endif
|
||||||
@ -4737,8 +4742,7 @@ WINDOW xvt_win_create(WIN_TYPE wtype, const RCT* rct_p, const char* title, int m
|
|||||||
e.type = E_CREATE;
|
e.type = E_CREATE;
|
||||||
eh((WINDOW)w, &e);
|
eh((WINDOW)w, &e);
|
||||||
|
|
||||||
// Rende visibili i giusti flag di visibilita e disabilitazione
|
// xvt_app_process_pending_events(); // Vietatissimo: arrivano E_PAINT prima di assegnare TWindow::_win
|
||||||
xvt_app_process_pending_events();
|
|
||||||
|
|
||||||
return (WINDOW)w;
|
return (WINDOW)w;
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@ public:
|
|||||||
XVT_FONT_STYLE_MASK Mask() const { return m_wMask; }
|
XVT_FONT_STYLE_MASK Mask() const { return m_wMask; }
|
||||||
int Style() const;
|
int Style() const;
|
||||||
bool Underline() const;
|
bool Underline() const;
|
||||||
|
int Weight() const;
|
||||||
|
|
||||||
void SetFaceName(const char* f) { m_strFace = f; }
|
void SetFaceName(const char* f) { m_strFace = f; }
|
||||||
const char* FaceName() const;
|
const char* FaceName() const;
|
||||||
|
@ -459,7 +459,7 @@ long xvt_fmap_get_family_sizes(PRINT_RCD *precp, char *family, long *size_array,
|
|||||||
{
|
{
|
||||||
const TwxPrintOut& po = m_PrintoutCache.Get((TPRINT_RCD*)precp);
|
const TwxPrintOut& po = m_PrintoutCache.Get((TPRINT_RCD*)precp);
|
||||||
if (!po.HasBadDriver())
|
if (!po.HasBadDriver())
|
||||||
size = OsWin32_EnumerateSizes((unsigned int)po.GetDC()->GetHDC(), family, size_array, scalable, max_sizes);
|
size = OsWin32_EnumerateSizes(po.GetDC()->GetHDC(), family, size_array, scalable, max_sizes);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -481,7 +481,7 @@ long xvt_fmap_get_families(PRINT_RCD *precp, char **family_array, long max_famil
|
|||||||
if (xvt_print_is_valid(precp))
|
if (xvt_print_is_valid(precp))
|
||||||
{
|
{
|
||||||
TwxPrintOut& po = m_PrintoutCache.Get((TPRINT_RCD*)precp);
|
TwxPrintOut& po = m_PrintoutCache.Get((TPRINT_RCD*)precp);
|
||||||
size = OsWin32_EnumerateFamilies((unsigned int)po.GetDC()->GetHDC(), family_array, max_families);
|
size = OsWin32_EnumerateFamilies(po.GetDC()->GetHDC(), family_array, max_families);
|
||||||
if (size == 0)
|
if (size == 0)
|
||||||
po.SetBadDriver(true);
|
po.SetBadDriver(true);
|
||||||
}
|
}
|
||||||
@ -489,7 +489,7 @@ long xvt_fmap_get_families(PRINT_RCD *precp, char **family_array, long max_famil
|
|||||||
{
|
{
|
||||||
wxFrame* tw = (wxFrame*)TASK_WIN;
|
wxFrame* tw = (wxFrame*)TASK_WIN;
|
||||||
wxClientDC dc(tw);
|
wxClientDC dc(tw);
|
||||||
size = OsWin32_EnumerateFamilies((unsigned int)dc.GetHDC(), family_array, max_families);
|
size = OsWin32_EnumerateFamilies(dc.GetHDC(), family_array, max_families);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
size = OsLinux_EnumerateFamilies(family_array, max_families);
|
size = OsLinux_EnumerateFamilies(family_array, max_families);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user