class WXDLLEXPORT wxClientData;
class WXDLLEXPORT wxDC;
class WXDLLEXPORT wxMenu;
+ class WXDLLEXPORT wxWindow;
#endif // wxUSE_GUI
// ----------------------------------------------------------------------------
#ifndef _WX_SETUP_H_
#define _WX_SETUP_H_
-/*
- * General features
- *
- */
+// ----------------------------------------------------------------------------
+// global settings
+// ----------------------------------------------------------------------------
-#define wxUSE_CONFIG 1
- // Use wxConfig, with CreateConfig in wxApp
+// define this to 0 when building wxBase library
+#define wxUSE_GUI 1
#define WXWIN_COMPATIBILITY 0
// Compatibility with 1.68 API.
// the compatibility code is now very minimal so there
// is little advantage to setting it to 1.
+// ----------------------------------------------------------------------------
+// General features
+// ----------------------------------------------------------------------------
+
+#define wxUSE_CONFIG 1
+ // Use wxConfig, with CreateConfig in wxApp
+
#define wxUSE_POSTSCRIPT 0
// 0 for no PostScript device context
#define wxUSE_AFM_FOR_POSTSCRIPT 0
// Created: 01/02/97
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_TIMER_H_
bool OneShot() const { return oneShot; }
protected:
- bool oneShot ;
- int milli ;
- int lastMilli ;
+ bool oneShot;
+ int milli;
+ int lastMilli;
long id;
# define HAVE_WCSLEN 1
# include <tchar.h>
+
+# define T(x) _T(x)
+
# if wxUSE_UNICODE // temporary - preserve binary compatibility
typedef _TCHAR wxChar;
typedef _TSCHAR wxSChar;
wxDocTemplate *wxDocManager::SelectDocumentType(wxDocTemplate **templates,
int noTemplates)
{
- const wxChar **strings = new wxChar *[noTemplates];
+ wxChar **strings = new wxChar *[noTemplates];
wxChar **data = new wxChar *[noTemplates];
int i;
int n = 0;
{
if (templates[i]->IsVisible())
{
- strings[n] = templates[i]->m_description;
+ strings[n] = (wxChar *)templates[i]->m_description.c_str();
data[n] = (wxChar *)templates[i];
n ++;
}
wxDocTemplate *wxDocManager::SelectViewType(wxDocTemplate **templates,
int noTemplates)
{
- const wxChar **strings = new wxChar *[noTemplates];
+ wxChar **strings = new wxChar *[noTemplates];
wxChar **data = new wxChar *[noTemplates];
int i;
int n = 0;
{
if (templates[i]->IsVisible() && (templates[i]->GetViewName() != T("")))
{
- strings[n] = templates[i]->m_viewTypeName;
+ strings[n] = (wxChar *)templates[i]->m_viewTypeName.c_str();
data[n] = (wxChar *)templates[i];
n ++;
}
return (DdeDisconnect((HCONV) m_hConv) != 0);
}
-bool wxDDEConnection::Execute(wxChar *data, int size, wxIPCFormat format)
+bool wxDDEConnection::Execute(const wxChar *data, int size, wxIPCFormat format)
{
DWORD result;
if (size < 0)
#define PALVERSION 0x300
#define MAXPALETTE 256 /* max. # supported palette entries */
-DWORD PASCAL lread(int fh, VOID FAR *pv, DWORD ul);
-DWORD PASCAL lwrite(int fh, VOID FAR *pv, DWORD ul);
-
-BOOL WriteDIB (LPTSTR szFile,HANDLE hdib);
-WORD PaletteSize (VOID FAR * pv);
-WORD DibNumColors (VOID FAR * pv);
-// HANDLE DibFromBitmap (HBITMAP hbm, DWORD biStyle, WORD biBits, HPALETTE hpal);
-BOOL PASCAL MakeBitmapAndPalette(HDC,HANDLE,HPALETTE *,HBITMAP *);
+static DWORD PASCAL lread(int fh, VOID FAR *pv, DWORD ul);
+static DWORD PASCAL lwrite(int fh, VOID FAR *pv, DWORD ul);
+
+static BOOL WriteDIB (LPTSTR szFile,HANDLE hdib);
+static WORD PaletteSize (VOID FAR * pv);
+static WORD DibNumColors (VOID FAR * pv);
+// HANDLE DibFromBitmap (HBITMAP hbm, DWORD biStyle, WORD biBits, HPALETTE hpal);
+static BOOL PASCAL MakeBitmapAndPalette(HDC,HANDLE,HPALETTE *,HBITMAP *);
/****************************************************************************
* *
p < (WORD *)&pMFHead ->checksum; ++p)
pMFHead ->checksum ^= *p;
- FILE *fd = fopen(filename.mb_str(wxConvFile), "rb");
+ FILE *fd = fopen(filename.fn_str(), "rb");
if (!fd) return FALSE;
wxChar tempFileBuf[256];
bool wxPNGReader::ReadFile(wxChar * ImageFileName)
{
- int number_passes;
-
if (ImageFileName)
wxStrcpy(filename, ImageFileName);
- FILE *fp;
- png_struct *png_ptr;
- png_info *info_ptr;
-
/* open the file */
- fp = fopen(wxConvFile.cWX2MB(filename), "rb");
+ FILE *fp = fopen(wxConvFile.cWX2MB(filename), "rb");
if (!fp)
return FALSE;
/* allocate the necessary structures */
- png_ptr = new (png_struct);
+ png_struct *png_ptr = new (png_struct);
if (!png_ptr)
{
fclose(fp);
return FALSE;
}
- info_ptr = new (png_info);
+ png_info *info_ptr = new (png_info);
if (!info_ptr)
{
fclose(fp);
delete(png_ptr);
return FALSE;
}
+
/* set error handling */
if (setjmp(png_ptr->jmpbuf))
{
byte *row_pointers = new byte[row_stride];
/* turn on interlace handling */
+ int number_passes;
if (info_ptr->interlace_type)
number_passes = png_set_interlace_handling(png_ptr);
else
m_lDlgCode |= DLGC_WANTTAB;
// do create the control - either an EDIT or RICHEDIT
- const wxChar *windowClass = T("EDIT(");
+ const wxChar *windowClass = T("EDIT");
#if wxUSE_RICHEDIT
if ( m_windowStyle & wxTE_RICH )
{
msStyle |= ES_AUTOVSCROLL;
m_isRich = TRUE;
- windowClass = T("RICHEDIT(");
+ windowClass = T("RICHEDIT");
}
else
m_isRich = FALSE;
// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart and Markus Holzem
-// Licence: wxWindows license
+// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
// ----------------------------------------------------------------------------
#ifdef __WIN32__
- #define _EXPORT /**/
+ #define _EXPORT
#else
#define _EXPORT _export
#endif
// ----------------------------------------------------------------------------
// wxTimer class
// ----------------------------------------------------------------------------
-wxTimer::wxTimer(void)
+
+wxTimer::wxTimer()
{
- milli = 0 ;
- lastMilli = -1 ;
+ milli = 0;
+ lastMilli = -1;
id = 0;
}
-wxTimer::~wxTimer(void)
+wxTimer::~wxTimer()
{
Stop();
bool wxTimer::Start(int milliseconds, bool mode)
{
- oneShot = mode ;
+ oneShot = mode;
if (milliseconds < 0)
milliseconds = lastMilli;
}
}
-void wxTimer::Stop(void)
+void wxTimer::Stop()
{
- if (id) {
+ if ( id )
+ {
KillTimer(NULL, (UINT)id);
- wxTimerList.DeleteObject(this); /* @@@@ */
+ wxTimerList.DeleteObject(this);
}
- id = 0 ;
- milli = 0 ;
+ id = 0;
+ milli = 0;
}
// ----------------------------------------------------------------------------
// private functions
// ----------------------------------------------------------------------------
+
void wxProcessTimer(wxTimer& timer)
{
// Avoid to process spurious timer events
{
TraverseCounter counter(this, item, recursively);
- return counter.GetCount();
+ return counter.GetCount() - 1;
}
// ----------------------------------------------------------------------------
if (dc)
{
xpmAttr.valuemask = XpmReturnPixels;
- int errorStatus = XpmReadFileToImage(&dc, wxMBSTRINGCAST name.mb_str(wxConvFile), &ximage, (XImage **) NULL, &xpmAttr);
+ int errorStatus = XpmReadFileToImage(&dc, wxMBSTRINGCAST name.fn_str(), &ximage, (XImage **) NULL, &xpmAttr);
DeleteDC(dc);
if (errorStatus == XpmSuccess)
{
ximage.height = M_BITMAPHANDLERDATA->m_height;
ximage.depth = M_BITMAPHANDLERDATA->m_depth;
ximage.bitmap = (HBITMAP)M_BITMAPHANDLERDATA->m_hBitmap;
- int errorStatus = XpmWriteFileFromImage(&dc, wxMBSTRINGCAST name.mb_str(wxConvFile),
+ int errorStatus = XpmWriteFileFromImage(&dc, wxMBSTRINGCAST name.fn_str(),
&ximage, (XImage *) NULL, (XpmAttributes *) NULL);
if (dc)