Patch level : 10.0
Files correlati : xvaga.dll Ricompilazione Demo : [ ] Commento : Migliorata gestione propertygrid git-svn-id: svn://10.65.10.50/trunk@19655 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
4350d942ca
commit
b1340210ed
@ -2,6 +2,7 @@
|
||||
#include "wx/filename.h"
|
||||
#include "wx/image.h"
|
||||
#include "wx/paper.h"
|
||||
#include "wx/printdlg.h"
|
||||
|
||||
#include "oswin32.h"
|
||||
#include "aclapi.h"
|
||||
@ -35,7 +36,7 @@ static int AdjustDevmodePlease(PDEVMODE dm)
|
||||
// 1) "NRG SP 4100N PCL 5e"
|
||||
// 2) aggiungere qui le altre
|
||||
// Ma per ora zappiamo tutti i driver troppo grandi (> 3Kb)
|
||||
if (dm->dmDriverExtra > 3*1024)
|
||||
if (dm->dmDriverExtra > 3*1024)
|
||||
dm->dmDriverExtra = 0;
|
||||
|
||||
// Controllo il formato della carta
|
||||
@ -174,13 +175,11 @@ void* OsWin32_GetPrinterInfo(int& size, const char* printer)
|
||||
LPDEVMODE pdm = NULL;
|
||||
size = 0;
|
||||
|
||||
char name[_MAX_PATH];
|
||||
char name[_MAX_PATH] = "";
|
||||
if (printer == NULL || *printer == '\0')
|
||||
{
|
||||
if (::GetProfileString("windows", "device", ",,,", name, sizeof(name)) == 0)
|
||||
return NULL;
|
||||
char* comma = strchr(name, ',');
|
||||
if (comma) *comma = '\0';
|
||||
unsigned long namelen = _MAX_PATH;
|
||||
::GetDefaultPrinter(name, &namelen);
|
||||
}
|
||||
else
|
||||
wxStrncpy(name, printer, sizeof(name));
|
||||
@ -963,6 +962,7 @@ bool OsWin32_GotoUrl(const char* url, const char* action)
|
||||
return ok;
|
||||
}
|
||||
|
||||
/*
|
||||
void OsWin32_SpoolNewLine(unsigned int hdc)
|
||||
{
|
||||
char output[4];
|
||||
@ -976,16 +976,13 @@ void OsWin32_SpoolNewLine(unsigned int hdc)
|
||||
bool OsWin32_IsGenericTextOnly(void* data)
|
||||
{
|
||||
LPDEVMODE pdm = (LPDEVMODE)data;
|
||||
|
||||
if (pdm->dmYResolution == 6) // Win 9x only
|
||||
return true;
|
||||
|
||||
if (strstr((const char*)pdm->dmDeviceName, "eneric") != NULL)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
#ifdef SPEECH_API
|
||||
|
||||
|
@ -38,8 +38,10 @@ bool OsWin32_SL_Logout() ;
|
||||
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);
|
||||
|
||||
/*
|
||||
void OsWin32_SpoolNewLine(unsigned int hdc);
|
||||
bool OsWin32_IsGenericTextOnly(void* devmode);
|
||||
*/
|
||||
|
||||
int OsWin32_GetSessionId();
|
||||
bool OsWin32_IsWindowsServer();
|
||||
|
@ -475,6 +475,7 @@ XVTDLL BOOLEAN xvt_odbc_driver(XVT_ODBC handle, char* str, int max_size);
|
||||
|
||||
typedef BOOLEAN PROP_CALLBACK(WINDOW win, XVT_TREEVIEW_NODE node, void* app_data);
|
||||
XVTDLL XVT_TREEVIEW_NODE xvt_prop_add(WINDOW win, const char* type, const char* name, const char* value, const char* label);
|
||||
XVTDLL XVT_TREEVIEW_NODE xvt_prop_current(WINDOW win);
|
||||
XVTDLL XVT_TREEVIEW_NODE xvt_prop_find(WINDOW win, const char* name);
|
||||
XVTDLL BOOLEAN xvt_prop_for_each(WINDOW win, PROP_CALLBACK pcb, void* jolly);
|
||||
XVTDLL int xvt_prop_get_string(WINDOW win, XVT_TREEVIEW_NODE node, char* label, int maxlen);
|
||||
|
@ -2315,6 +2315,15 @@ XVT_TREEVIEW_NODE xvt_prop_add(WINDOW win, const char* type, const char* name, c
|
||||
return NULL;
|
||||
}
|
||||
|
||||
XVT_TREEVIEW_NODE xvt_prop_current(WINDOW win)
|
||||
{
|
||||
XVT_TREEVIEW_NODE node = NULL;
|
||||
wxPropertyGrid* pg = wxDynamicCast((wxObject*)win, wxPropertyGrid);
|
||||
if (pg != NULL)
|
||||
node = pg->GetSelection();
|
||||
return node;
|
||||
}
|
||||
|
||||
XVT_TREEVIEW_NODE xvt_prop_find(WINDOW win, const char* name)
|
||||
{
|
||||
XVT_TREEVIEW_NODE node = NULL;
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include "xvt.h"
|
||||
#include "xvtart.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef __WXMSW__
|
||||
#include "wx/dcps.h"
|
||||
#include "wx/msw/printdlg.h"
|
||||
#include "oswin32.h"
|
||||
@ -24,16 +24,16 @@
|
||||
|
||||
struct TPRINT_RCD : public PRINT_RCD
|
||||
{
|
||||
#ifdef WIN32
|
||||
#ifdef __WXMSW__
|
||||
unsigned char m_data[16*1024];
|
||||
unsigned int m_size; // Dimensione della struct DEVMODE
|
||||
|
||||
void SetData(void * data, unsigned int nSize);
|
||||
#else
|
||||
wxPrintNativeDataBase * m_data;
|
||||
wxPrintNativeDataBase* m_data;
|
||||
unsigned int m_size; // Dimensione di wxPostScriptPrintNativeData
|
||||
|
||||
void GetData(wxPrintNativeDataBase * data) const;
|
||||
void GetData(wxPrintNativeDataBase* data) const;
|
||||
void SetData(void * data);
|
||||
#endif
|
||||
|
||||
@ -45,7 +45,7 @@ struct TPRINT_RCD : public PRINT_RCD
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef __WXMSW__
|
||||
|
||||
void TPRINT_RCD::SetData(void* data, unsigned int nSize)
|
||||
{
|
||||
@ -540,11 +540,13 @@ BOOLEAN xvt_print_close_page(PRINT_RCD* precp)
|
||||
const TwxPrintOut& po = m_PrintoutCache.Get(NULL);
|
||||
wxDC* dc = po.GetDC();
|
||||
dc->EndPage();
|
||||
#ifdef WIN32
|
||||
/*
|
||||
#ifdef __WXMSW__
|
||||
TPRINT_RCD* prcd = (TPRINT_RCD*)precp;
|
||||
if (OsWin32_IsGenericTextOnly(prcd->m_data))
|
||||
OsWin32_SpoolNewLine((unsigned int)dc->GetHDC());
|
||||
#endif
|
||||
*/
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
@ -695,7 +697,7 @@ BOOLEAN xvt_print_is_valid(const PRINT_RCD* precp)
|
||||
{
|
||||
const TPRINT_RCD* rcd = (const TPRINT_RCD*)precp;
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef __WXMSW__
|
||||
ok = OsWin32_CheckPrinterInfo(rcd->m_data, rcd->m_size);
|
||||
#else
|
||||
wxPrintData data;
|
||||
|
Loading…
x
Reference in New Issue
Block a user