Misc warning fixes by ABX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22864 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -27,136 +27,342 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Metafile Functions */
|
/* Metafile Functions */
|
||||||
/* Win32s/Borland need these macros, although META_SETBKCOLOR is defined */
|
// some compilers have them in their include files
|
||||||
#if 1 // !defined(META_SETBKCOLOR) // || defined(WIN32)
|
|
||||||
|
|
||||||
|
#ifndef META_SETBKCOLOR
|
||||||
#define META_SETBKCOLOR 0x0201
|
#define META_SETBKCOLOR 0x0201
|
||||||
|
#endif
|
||||||
|
#ifndef META_SETBKMODE
|
||||||
#define META_SETBKMODE 0x0102
|
#define META_SETBKMODE 0x0102
|
||||||
|
#endif
|
||||||
|
#ifndef META_SETMAPMODE
|
||||||
#define META_SETMAPMODE 0x0103
|
#define META_SETMAPMODE 0x0103
|
||||||
|
#endif
|
||||||
|
#ifndef META_SETROP2
|
||||||
#define META_SETROP2 0x0104
|
#define META_SETROP2 0x0104
|
||||||
|
#endif
|
||||||
|
#ifndef META_SETRELABS
|
||||||
#define META_SETRELABS 0x0105
|
#define META_SETRELABS 0x0105
|
||||||
|
#endif
|
||||||
|
#ifndef META_SETPOLYFILLMODE
|
||||||
#define META_SETPOLYFILLMODE 0x0106
|
#define META_SETPOLYFILLMODE 0x0106
|
||||||
|
#endif
|
||||||
|
#ifndef META_SETSTRETCHBLTMODE
|
||||||
#define META_SETSTRETCHBLTMODE 0x0107
|
#define META_SETSTRETCHBLTMODE 0x0107
|
||||||
|
#endif
|
||||||
|
#ifndef META_SETTEXTCHAREXTRA
|
||||||
#define META_SETTEXTCHAREXTRA 0x0108
|
#define META_SETTEXTCHAREXTRA 0x0108
|
||||||
|
#endif
|
||||||
|
#ifndef META_SETTEXTCOLOR
|
||||||
#define META_SETTEXTCOLOR 0x0209
|
#define META_SETTEXTCOLOR 0x0209
|
||||||
|
#endif
|
||||||
|
#ifndef META_SETTEXTJUSTIFICATION
|
||||||
#define META_SETTEXTJUSTIFICATION 0x020A
|
#define META_SETTEXTJUSTIFICATION 0x020A
|
||||||
|
#endif
|
||||||
|
#ifndef META_SETWINDOWORG
|
||||||
#define META_SETWINDOWORG 0x020B
|
#define META_SETWINDOWORG 0x020B
|
||||||
|
#endif
|
||||||
|
#ifndef META_SETWINDOWEXT
|
||||||
#define META_SETWINDOWEXT 0x020C
|
#define META_SETWINDOWEXT 0x020C
|
||||||
|
#endif
|
||||||
|
#ifndef META_SETVIEWPORTORG
|
||||||
#define META_SETVIEWPORTORG 0x020D
|
#define META_SETVIEWPORTORG 0x020D
|
||||||
|
#endif
|
||||||
|
#ifndef META_SETVIEWPORTEXT
|
||||||
#define META_SETVIEWPORTEXT 0x020E
|
#define META_SETVIEWPORTEXT 0x020E
|
||||||
|
#endif
|
||||||
|
#ifndef META_OFFSETWINDOWORG
|
||||||
#define META_OFFSETWINDOWORG 0x020F
|
#define META_OFFSETWINDOWORG 0x020F
|
||||||
|
#endif
|
||||||
|
#ifndef META_SCALEWINDOWEXT
|
||||||
#define META_SCALEWINDOWEXT 0x0410
|
#define META_SCALEWINDOWEXT 0x0410
|
||||||
|
#endif
|
||||||
|
#ifndef META_OFFSETVIEWPORTORG
|
||||||
#define META_OFFSETVIEWPORTORG 0x0211
|
#define META_OFFSETVIEWPORTORG 0x0211
|
||||||
|
#endif
|
||||||
|
#ifndef META_SCALEVIEWPORTEXT
|
||||||
#define META_SCALEVIEWPORTEXT 0x0412
|
#define META_SCALEVIEWPORTEXT 0x0412
|
||||||
|
#endif
|
||||||
|
#ifndef META_LINETO
|
||||||
#define META_LINETO 0x0213
|
#define META_LINETO 0x0213
|
||||||
|
#endif
|
||||||
|
#ifndef META_MOVETO
|
||||||
#define META_MOVETO 0x0214
|
#define META_MOVETO 0x0214
|
||||||
|
#endif
|
||||||
|
#ifndef META_EXCLUDECLIPRECT
|
||||||
#define META_EXCLUDECLIPRECT 0x0415
|
#define META_EXCLUDECLIPRECT 0x0415
|
||||||
|
#endif
|
||||||
|
#ifndef META_INTERSECTCLIPRECT
|
||||||
#define META_INTERSECTCLIPRECT 0x0416
|
#define META_INTERSECTCLIPRECT 0x0416
|
||||||
|
#endif
|
||||||
|
#ifndef META_ARC
|
||||||
#define META_ARC 0x0817
|
#define META_ARC 0x0817
|
||||||
|
#endif
|
||||||
|
#ifndef META_ELLIPSE
|
||||||
#define META_ELLIPSE 0x0418
|
#define META_ELLIPSE 0x0418
|
||||||
|
#endif
|
||||||
|
#ifndef META_FLOODFILL
|
||||||
#define META_FLOODFILL 0x0419
|
#define META_FLOODFILL 0x0419
|
||||||
|
#endif
|
||||||
|
#ifndef META_PIE
|
||||||
#define META_PIE 0x081A
|
#define META_PIE 0x081A
|
||||||
|
#endif
|
||||||
|
#ifndef META_RECTANGLE
|
||||||
#define META_RECTANGLE 0x041B
|
#define META_RECTANGLE 0x041B
|
||||||
|
#endif
|
||||||
|
#ifndef META_ROUNDRECT
|
||||||
#define META_ROUNDRECT 0x061C
|
#define META_ROUNDRECT 0x061C
|
||||||
|
#endif
|
||||||
|
#ifndef META_PATBLT
|
||||||
#define META_PATBLT 0x061D
|
#define META_PATBLT 0x061D
|
||||||
|
#endif
|
||||||
|
#ifndef META_SAVEDC
|
||||||
#define META_SAVEDC 0x001E
|
#define META_SAVEDC 0x001E
|
||||||
|
#endif
|
||||||
|
#ifndef META_SETPIXEL
|
||||||
#define META_SETPIXEL 0x041F
|
#define META_SETPIXEL 0x041F
|
||||||
|
#endif
|
||||||
|
#ifndef META_OFFSETCLIPRGN
|
||||||
#define META_OFFSETCLIPRGN 0x0220
|
#define META_OFFSETCLIPRGN 0x0220
|
||||||
|
#endif
|
||||||
|
#ifndef META_TEXTOUT
|
||||||
#define META_TEXTOUT 0x0521
|
#define META_TEXTOUT 0x0521
|
||||||
|
#endif
|
||||||
|
#ifndef META_BITBLT
|
||||||
#define META_BITBLT 0x0922
|
#define META_BITBLT 0x0922
|
||||||
|
#endif
|
||||||
|
#ifndef META_STRETCHBLT
|
||||||
#define META_STRETCHBLT 0x0B23
|
#define META_STRETCHBLT 0x0B23
|
||||||
|
#endif
|
||||||
|
#ifndef META_POLYGON
|
||||||
#define META_POLYGON 0x0324
|
#define META_POLYGON 0x0324
|
||||||
|
#endif
|
||||||
|
#ifndef META_POLYLINE
|
||||||
#define META_POLYLINE 0x0325
|
#define META_POLYLINE 0x0325
|
||||||
|
#endif
|
||||||
|
#ifndef META_ESCAPE
|
||||||
#define META_ESCAPE 0x0626
|
#define META_ESCAPE 0x0626
|
||||||
|
#endif
|
||||||
|
#ifndef META_RESTOREDC
|
||||||
#define META_RESTOREDC 0x0127
|
#define META_RESTOREDC 0x0127
|
||||||
|
#endif
|
||||||
|
#ifndef META_FILLREGION
|
||||||
#define META_FILLREGION 0x0228
|
#define META_FILLREGION 0x0228
|
||||||
|
#endif
|
||||||
|
#ifndef META_FRAMEREGION
|
||||||
#define META_FRAMEREGION 0x0429
|
#define META_FRAMEREGION 0x0429
|
||||||
|
#endif
|
||||||
|
#ifndef META_INVERTREGION
|
||||||
#define META_INVERTREGION 0x012A
|
#define META_INVERTREGION 0x012A
|
||||||
|
#endif
|
||||||
|
#ifndef META_PAINTREGION
|
||||||
#define META_PAINTREGION 0x012B
|
#define META_PAINTREGION 0x012B
|
||||||
|
#endif
|
||||||
|
#ifndef META_SELECTCLIPREGION
|
||||||
#define META_SELECTCLIPREGION 0x012C
|
#define META_SELECTCLIPREGION 0x012C
|
||||||
|
#endif
|
||||||
|
#ifndef META_SELECTOBJECT
|
||||||
#define META_SELECTOBJECT 0x012D
|
#define META_SELECTOBJECT 0x012D
|
||||||
|
#endif
|
||||||
|
#ifndef META_SETTEXTALIGN
|
||||||
#define META_SETTEXTALIGN 0x012E
|
#define META_SETTEXTALIGN 0x012E
|
||||||
|
#endif
|
||||||
|
#ifndef META_DRAWTEXT
|
||||||
#define META_DRAWTEXT 0x062F
|
#define META_DRAWTEXT 0x062F
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef META_CHORD
|
||||||
#define META_CHORD 0x0830
|
#define META_CHORD 0x0830
|
||||||
|
#endif
|
||||||
|
#ifndef META_SETMAPPERFLAGS
|
||||||
#define META_SETMAPPERFLAGS 0x0231
|
#define META_SETMAPPERFLAGS 0x0231
|
||||||
|
#endif
|
||||||
|
#ifndef META_EXTTEXTOUT
|
||||||
#define META_EXTTEXTOUT 0x0a32
|
#define META_EXTTEXTOUT 0x0a32
|
||||||
|
#endif
|
||||||
|
#ifndef META_SETDIBTODEV
|
||||||
#define META_SETDIBTODEV 0x0d33
|
#define META_SETDIBTODEV 0x0d33
|
||||||
|
#endif
|
||||||
|
#ifndef META_SELECTPALETTE
|
||||||
#define META_SELECTPALETTE 0x0234
|
#define META_SELECTPALETTE 0x0234
|
||||||
|
#endif
|
||||||
|
#ifndef META_REALIZEPALETTE
|
||||||
#define META_REALIZEPALETTE 0x0035
|
#define META_REALIZEPALETTE 0x0035
|
||||||
|
#endif
|
||||||
|
#ifndef META_ANIMATEPALETTE
|
||||||
#define META_ANIMATEPALETTE 0x0436
|
#define META_ANIMATEPALETTE 0x0436
|
||||||
|
#endif
|
||||||
|
#ifndef META_SETPALENTRIES
|
||||||
#define META_SETPALENTRIES 0x0037
|
#define META_SETPALENTRIES 0x0037
|
||||||
|
#endif
|
||||||
|
#ifndef META_POLYPOLYGON
|
||||||
#define META_POLYPOLYGON 0x0538
|
#define META_POLYPOLYGON 0x0538
|
||||||
|
#endif
|
||||||
|
#ifndef META_RESIZEPALETTE
|
||||||
#define META_RESIZEPALETTE 0x0139
|
#define META_RESIZEPALETTE 0x0139
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef META_DIBBITBLT
|
||||||
#define META_DIBBITBLT 0x0940
|
#define META_DIBBITBLT 0x0940
|
||||||
|
#endif
|
||||||
|
#ifndef META_DIBSTRETCHBLT
|
||||||
#define META_DIBSTRETCHBLT 0x0b41
|
#define META_DIBSTRETCHBLT 0x0b41
|
||||||
|
#endif
|
||||||
|
#ifndef META_DIBCREATEPATTERNBRUSH
|
||||||
#define META_DIBCREATEPATTERNBRUSH 0x0142
|
#define META_DIBCREATEPATTERNBRUSH 0x0142
|
||||||
|
#endif
|
||||||
|
#ifndef META_STRETCHDIB
|
||||||
#define META_STRETCHDIB 0x0f43
|
#define META_STRETCHDIB 0x0f43
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef META_EXTFLOODFILL
|
||||||
#define META_EXTFLOODFILL 0x0548
|
#define META_EXTFLOODFILL 0x0548
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef META_RESETDC
|
||||||
#define META_RESETDC 0x014C
|
#define META_RESETDC 0x014C
|
||||||
|
#endif
|
||||||
|
#ifndef META_STARTDOC
|
||||||
#define META_STARTDOC 0x014D
|
#define META_STARTDOC 0x014D
|
||||||
|
#endif
|
||||||
|
#ifndef META_STARTPAGE
|
||||||
#define META_STARTPAGE 0x004F
|
#define META_STARTPAGE 0x004F
|
||||||
|
#endif
|
||||||
|
#ifndef META_ENDPAGE
|
||||||
#define META_ENDPAGE 0x0050
|
#define META_ENDPAGE 0x0050
|
||||||
|
#endif
|
||||||
|
#ifndef META_ABORTDOC
|
||||||
#define META_ABORTDOC 0x0052
|
#define META_ABORTDOC 0x0052
|
||||||
|
#endif
|
||||||
|
#ifndef META_ENDDOC
|
||||||
#define META_ENDDOC 0x005E
|
#define META_ENDDOC 0x005E
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef META_DELETEOBJECT
|
||||||
#define META_DELETEOBJECT 0x01f0
|
#define META_DELETEOBJECT 0x01f0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef META_CREATEPALETTE
|
||||||
#define META_CREATEPALETTE 0x00f7
|
#define META_CREATEPALETTE 0x00f7
|
||||||
|
#endif
|
||||||
|
#ifndef META_CREATEBRUSH
|
||||||
#define META_CREATEBRUSH 0x00F8
|
#define META_CREATEBRUSH 0x00F8
|
||||||
|
#endif
|
||||||
|
#ifndef META_CREATEPATTERNBRUSH
|
||||||
#define META_CREATEPATTERNBRUSH 0x01F9
|
#define META_CREATEPATTERNBRUSH 0x01F9
|
||||||
|
#endif
|
||||||
|
#ifndef META_CREATEPENINDIRECT
|
||||||
#define META_CREATEPENINDIRECT 0x02FA
|
#define META_CREATEPENINDIRECT 0x02FA
|
||||||
|
#endif
|
||||||
|
#ifndef META_CREATEFONTINDIRECT
|
||||||
#define META_CREATEFONTINDIRECT 0x02FB
|
#define META_CREATEFONTINDIRECT 0x02FB
|
||||||
|
#endif
|
||||||
|
#ifndef META_CREATEBRUSHINDIRECT
|
||||||
#define META_CREATEBRUSHINDIRECT 0x02FC
|
#define META_CREATEBRUSHINDIRECT 0x02FC
|
||||||
|
#endif
|
||||||
|
#ifndef META_CREATEBITMAPINDIRECT
|
||||||
#define META_CREATEBITMAPINDIRECT 0x02FD
|
#define META_CREATEBITMAPINDIRECT 0x02FD
|
||||||
|
#endif
|
||||||
|
#ifndef META_CREATEBITMAP
|
||||||
#define META_CREATEBITMAP 0x06FE
|
#define META_CREATEBITMAP 0x06FE
|
||||||
|
#endif
|
||||||
|
#ifndef META_CREATEREGION
|
||||||
#define META_CREATEREGION 0x06FF
|
#define META_CREATEREGION 0x06FF
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Background Modes */
|
/* Background Modes */
|
||||||
|
#ifndef TRANSPARENT
|
||||||
#define TRANSPARENT 1
|
#define TRANSPARENT 1
|
||||||
|
#endif
|
||||||
|
#ifndef OPAQUE
|
||||||
#define OPAQUE 2
|
#define OPAQUE 2
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Pen Styles */
|
/* Pen Styles */
|
||||||
|
#ifndef PS_SOLID
|
||||||
#define PS_SOLID 0
|
#define PS_SOLID 0
|
||||||
|
#endif
|
||||||
|
#ifndef PS_DASH
|
||||||
#define PS_DASH 1
|
#define PS_DASH 1
|
||||||
|
#endif
|
||||||
|
#ifndef PS_DOT
|
||||||
#define PS_DOT 2
|
#define PS_DOT 2
|
||||||
|
#endif
|
||||||
|
#ifndef PS_DASHDOT
|
||||||
#define PS_DASHDOT 3
|
#define PS_DASHDOT 3
|
||||||
|
#endif
|
||||||
|
#ifndef PS_DASHDOTDOT
|
||||||
#define PS_DASHDOTDOT 4
|
#define PS_DASHDOTDOT 4
|
||||||
|
#endif
|
||||||
|
#ifndef PS_NULL
|
||||||
#define PS_NULL 5
|
#define PS_NULL 5
|
||||||
|
#endif
|
||||||
|
#ifndef PS_INSIDEFRAME
|
||||||
#define PS_INSIDEFRAME 6
|
#define PS_INSIDEFRAME 6
|
||||||
|
#endif
|
||||||
|
|
||||||
/* PitchAndFamily family values (high 4 bits) */
|
/* PitchAndFamily family values (high 4 bits) */
|
||||||
/* Win32s/Borland don't need this */
|
#ifndef FF_DONTCARE
|
||||||
#ifndef FF_DONTCARE // !defined(__BORLANDC__) && !defined(WIN32)
|
|
||||||
#define FF_DONTCARE 0x00
|
#define FF_DONTCARE 0x00
|
||||||
|
#endif
|
||||||
|
#ifndef FF_ROMAN
|
||||||
#define FF_ROMAN 0x10
|
#define FF_ROMAN 0x10
|
||||||
|
#endif
|
||||||
|
#ifndef FF_SWISS
|
||||||
#define FF_SWISS 0x20
|
#define FF_SWISS 0x20
|
||||||
|
#endif
|
||||||
|
#ifndef FF_MODERN
|
||||||
#define FF_MODERN 0x30
|
#define FF_MODERN 0x30
|
||||||
|
#endif
|
||||||
|
#ifndef FF_SCRIPT
|
||||||
#define FF_SCRIPT 0x40
|
#define FF_SCRIPT 0x40
|
||||||
|
#endif
|
||||||
|
#ifndef FF_DECORATIVE
|
||||||
#define FF_DECORATIVE 0x50
|
#define FF_DECORATIVE 0x50
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Brush Styles */
|
/* Brush Styles */
|
||||||
|
#ifndef BS_SOLID
|
||||||
#define BS_SOLID 0
|
#define BS_SOLID 0
|
||||||
|
#endif
|
||||||
|
#ifndef BS_NULL
|
||||||
#define BS_NULL 1
|
#define BS_NULL 1
|
||||||
|
#endif
|
||||||
|
#ifndef BS_HOLLOW
|
||||||
#define BS_HOLLOW BS_NULL
|
#define BS_HOLLOW BS_NULL
|
||||||
|
#endif
|
||||||
|
#ifndef BS_HATCHED
|
||||||
#define BS_HATCHED 2
|
#define BS_HATCHED 2
|
||||||
|
#endif
|
||||||
|
#ifndef BS_PATTERN
|
||||||
#define BS_PATTERN 3
|
#define BS_PATTERN 3
|
||||||
|
#endif
|
||||||
|
#ifndef BS_INDEXED
|
||||||
#define BS_INDEXED 4
|
#define BS_INDEXED 4
|
||||||
|
#endif
|
||||||
|
#ifndef BS_DIBPATTERN
|
||||||
#define BS_DIBPATTERN 5
|
#define BS_DIBPATTERN 5
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Hatch Styles */
|
/* Hatch Styles */
|
||||||
|
#ifndef HS_HORIZONTAL
|
||||||
#define HS_HORIZONTAL 0
|
#define HS_HORIZONTAL 0
|
||||||
|
#endif
|
||||||
|
#ifndef HS_VERTICAL
|
||||||
#define HS_VERTICAL 1
|
#define HS_VERTICAL 1
|
||||||
|
#endif
|
||||||
|
#ifndef HS_FDIAGONAL
|
||||||
#define HS_FDIAGONAL 2
|
#define HS_FDIAGONAL 2
|
||||||
|
#endif
|
||||||
|
#ifndef HS_BDIAGONAL
|
||||||
#define HS_BDIAGONAL 3
|
#define HS_BDIAGONAL 3
|
||||||
|
#endif
|
||||||
|
#ifndef HS_CROSS
|
||||||
#define HS_CROSS 4
|
#define HS_CROSS 4
|
||||||
|
#endif
|
||||||
|
#ifndef HS_DIAGCROSS
|
||||||
#define HS_DIAGCROSS 5
|
#define HS_DIAGCROSS 5
|
||||||
|
#endif
|
||||||
#endif // metafile functions
|
|
||||||
|
|
||||||
class WXDLLIMPEXP_OGL wxMetaRecord: public wxObject
|
class WXDLLIMPEXP_OGL wxMetaRecord: public wxObject
|
||||||
{
|
{
|
||||||
|
@@ -103,15 +103,15 @@ BEGIN_EVENT_TABLE(MyFrame,wxFrame)
|
|||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
MyFrame::MyFrame()
|
MyFrame::MyFrame()
|
||||||
: wxFrame( (wxFrame *)NULL, -1, "wxPlotWindow sample",
|
: wxFrame( (wxFrame *)NULL, -1, _T("wxPlotWindow sample"),
|
||||||
wxPoint(20,20), wxSize(470,500) )
|
wxPoint(20,20), wxSize(470,500) )
|
||||||
{
|
{
|
||||||
wxMenu *file_menu = new wxMenu();
|
wxMenu *file_menu = new wxMenu();
|
||||||
file_menu->Append( ID_ABOUT, "&About..");
|
file_menu->Append( ID_ABOUT, _T("&About.."));
|
||||||
file_menu->Append( ID_QUIT, "E&xit\tAlt-X");
|
file_menu->Append( ID_QUIT, _T("E&xit\tAlt-X"));
|
||||||
|
|
||||||
wxMenuBar *menu_bar = new wxMenuBar();
|
wxMenuBar *menu_bar = new wxMenuBar();
|
||||||
menu_bar->Append(file_menu, "&File");
|
menu_bar->Append(file_menu, _T("&File"));
|
||||||
|
|
||||||
SetMenuBar( menu_bar );
|
SetMenuBar( menu_bar );
|
||||||
|
|
||||||
@@ -132,7 +132,7 @@ MyFrame::MyFrame()
|
|||||||
oo->Add( 1000, 2000 );
|
oo->Add( 1000, 2000 );
|
||||||
m_plot->Add( oo );
|
m_plot->Add( oo );
|
||||||
|
|
||||||
m_log = new wxTextCtrl( this, -1, "This is the log window.\n", wxPoint(0,0), wxSize(100,100), wxTE_MULTILINE );
|
m_log = new wxTextCtrl( this, -1, _T("This is the log window.\n"), wxPoint(0,0), wxSize(100,100), wxTE_MULTILINE );
|
||||||
wxLog *old_log = wxLog::SetActiveTarget( new wxLogTextCtrl( m_log ) );
|
wxLog *old_log = wxLog::SetActiveTarget( new wxLogTextCtrl( m_log ) );
|
||||||
delete old_log;
|
delete old_log;
|
||||||
|
|
||||||
@@ -152,23 +152,23 @@ void MyFrame::OnQuit( wxCommandEvent &WXUNUSED(event) )
|
|||||||
|
|
||||||
void MyFrame::OnAbout( wxCommandEvent &WXUNUSED(event) )
|
void MyFrame::OnAbout( wxCommandEvent &WXUNUSED(event) )
|
||||||
{
|
{
|
||||||
(void)wxMessageBox( "wxPlotWindow Demo\n"
|
(void)wxMessageBox( _T("wxPlotWindow Demo\n"
|
||||||
"Robert Roebling (c) 1999,2000",
|
"Robert Roebling (c) 1999,2000"),
|
||||||
"About wxPlotWindow Demo", wxICON_INFORMATION | wxOK );
|
_T("About wxPlotWindow Demo"), wxICON_INFORMATION | wxOK );
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnPlotClick( wxPlotEvent &event )
|
void MyFrame::OnPlotClick( wxPlotEvent &event )
|
||||||
{
|
{
|
||||||
double x = event.GetPosition() * m_plot->GetUnitsPerValue();
|
double x = event.GetPosition() * m_plot->GetUnitsPerValue();
|
||||||
double y = event.GetCurve()->GetY( event.GetPosition() );
|
double y = event.GetCurve()->GetY( event.GetPosition() );
|
||||||
wxLogMessage( "Clicked on curve at x coordinate: %f, value: %f", x, y );
|
wxLogMessage( _T("Clicked on curve at x coordinate: %f, value: %f"), x, y );
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnPlotDClick( wxPlotEvent &event )
|
void MyFrame::OnPlotDClick( wxPlotEvent &event )
|
||||||
{
|
{
|
||||||
double x = event.GetPosition() * m_plot->GetUnitsPerValue();
|
double x = event.GetPosition() * m_plot->GetUnitsPerValue();
|
||||||
double y = event.GetCurve()->GetY( event.GetPosition() );
|
double y = event.GetCurve()->GetY( event.GetPosition() );
|
||||||
wxLogMessage( "Double clicked on curve at x coordinate: %f, value: %f", x, y );
|
wxLogMessage( _T("Double clicked on curve at x coordinate: %f, value: %f"), x, y );
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@@ -136,7 +136,7 @@ wxPlotOnOffCurve::wxPlotOnOffCurve( int offsetY )
|
|||||||
|
|
||||||
void wxPlotOnOffCurve::Add( wxInt32 on, wxInt32 off, void *clientData )
|
void wxPlotOnOffCurve::Add( wxInt32 on, wxInt32 off, void *clientData )
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( on > 0, wxT("plot index < 0") );
|
wxASSERT_MSG( on > 0, _T("plot index < 0") );
|
||||||
wxASSERT( on <= off );
|
wxASSERT( on <= off );
|
||||||
|
|
||||||
if (m_minX == -1)
|
if (m_minX == -1)
|
||||||
@@ -204,7 +204,7 @@ BEGIN_EVENT_TABLE(wxPlotArea, wxWindow)
|
|||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
wxPlotArea::wxPlotArea( wxPlotWindow *parent )
|
wxPlotArea::wxPlotArea( wxPlotWindow *parent )
|
||||||
: wxWindow( parent, -1, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER, "plotarea" )
|
: wxWindow( parent, -1, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER, _T("plotarea") )
|
||||||
{
|
{
|
||||||
m_owner = parent;
|
m_owner = parent;
|
||||||
|
|
||||||
@@ -462,7 +462,7 @@ BEGIN_EVENT_TABLE(wxPlotXAxisArea, wxWindow)
|
|||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
wxPlotXAxisArea::wxPlotXAxisArea( wxPlotWindow *parent )
|
wxPlotXAxisArea::wxPlotXAxisArea( wxPlotWindow *parent )
|
||||||
: wxWindow( parent, -1, wxDefaultPosition, wxSize(-1,40), 0, "plotxaxisarea" )
|
: wxWindow( parent, -1, wxDefaultPosition, wxSize(-1,40), 0, _T("plotxaxisarea") )
|
||||||
{
|
{
|
||||||
m_owner = parent;
|
m_owner = parent;
|
||||||
|
|
||||||
@@ -543,7 +543,7 @@ void wxPlotXAxisArea::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
|||||||
}
|
}
|
||||||
|
|
||||||
dc.SetBrush( *wxWHITE_BRUSH );
|
dc.SetBrush( *wxWHITE_BRUSH );
|
||||||
dc.SetPen( *wxTRANSPARENT_PEN );
|
dc.SetPen( *_TRANSPARENT_PEN );
|
||||||
dc.DrawRectangle( 4, 5, client_width-14, 10 );
|
dc.DrawRectangle( 4, 5, client_width-14, 10 );
|
||||||
dc.DrawRectangle( 0, 20, client_width, 20 );
|
dc.DrawRectangle( 0, 20, client_width, 20 );
|
||||||
dc.SetPen( *wxBLACK_PEN );
|
dc.SetPen( *wxBLACK_PEN );
|
||||||
@@ -558,14 +558,14 @@ void wxPlotXAxisArea::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
|||||||
wxString label;
|
wxString label;
|
||||||
if (range < 50)
|
if (range < 50)
|
||||||
{
|
{
|
||||||
label.Printf( wxT("%f"), current );
|
label.Printf( _T("%f"), current );
|
||||||
while (label.Last() == wxT('0'))
|
while (label.Last() == _T('0'))
|
||||||
label.RemoveLast();
|
label.RemoveLast();
|
||||||
if ((label.Last() == wxT('.')) || (label.Last() == wxT(',')))
|
if ((label.Last() == _T('.')) || (label.Last() == _T(',')))
|
||||||
label.Append( wxT('0') );
|
label.Append( _T('0') );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
label.Printf( wxT("%d"), (int)floor(current) );
|
label.Printf( _T("%d"), (int)floor(current) );
|
||||||
dc.DrawText( label, x-4, 20 );
|
dc.DrawText( label, x-4, 20 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -589,7 +589,7 @@ BEGIN_EVENT_TABLE(wxPlotYAxisArea, wxWindow)
|
|||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
wxPlotYAxisArea::wxPlotYAxisArea( wxPlotWindow *parent )
|
wxPlotYAxisArea::wxPlotYAxisArea( wxPlotWindow *parent )
|
||||||
: wxWindow( parent, -1, wxDefaultPosition, wxSize(60,-1), 0, "plotyaxisarea" )
|
: wxWindow( parent, -1, wxDefaultPosition, wxSize(60,-1), 0, _T("plotyaxisarea") )
|
||||||
{
|
{
|
||||||
m_owner = parent;
|
m_owner = parent;
|
||||||
|
|
||||||
@@ -664,14 +664,14 @@ void wxPlotYAxisArea::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
|||||||
wxString label;
|
wxString label;
|
||||||
if (range < 50)
|
if (range < 50)
|
||||||
{
|
{
|
||||||
label.Printf( wxT("%f"), current );
|
label.Printf( _T("%f"), current );
|
||||||
while (label.Last() == wxT('0'))
|
while (label.Last() == _T('0'))
|
||||||
label.RemoveLast();
|
label.RemoveLast();
|
||||||
if ((label.Last() == wxT('.')) || (label.Last() == wxT(',')))
|
if ((label.Last() == _T('.')) || (label.Last() == _T(',')))
|
||||||
label.Append( wxT('0') );
|
label.Append( _T('0') );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
label.Printf( wxT("%d"), (int)floor(current) );
|
label.Printf( _T("%d"), (int)floor(current) );
|
||||||
dc.DrawText( label, 5, y-7 );
|
dc.DrawText( label, 5, y-7 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -713,7 +713,7 @@ BEGIN_EVENT_TABLE(wxPlotWindow, wxScrolledWindow)
|
|||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
wxPlotWindow::wxPlotWindow( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, int flag )
|
wxPlotWindow::wxPlotWindow( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, int flag )
|
||||||
: wxScrolledWindow( parent, id, pos, size, flag, "plotcanvas" )
|
: wxScrolledWindow( parent, id, pos, size, flag, _T("plotcanvas") )
|
||||||
{
|
{
|
||||||
m_xUnitsPerValue = 1.0;
|
m_xUnitsPerValue = 1.0;
|
||||||
m_xZoom = 1.0;
|
m_xZoom = 1.0;
|
||||||
@@ -1052,7 +1052,7 @@ static wxBitmap *GetEnlargeBitmap()
|
|||||||
s_loaded = TRUE; // set it to TRUE anyhow, we won't try again
|
s_loaded = TRUE; // set it to TRUE anyhow, we won't try again
|
||||||
|
|
||||||
#if defined(__WXMSW__) || defined(__WXPM__)
|
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||||
s_bitmap = new wxBitmap("plot_enl_bmp", wxBITMAP_TYPE_RESOURCE);
|
s_bitmap = new wxBitmap(_T("plot_enl_bmp"), wxBITMAP_TYPE_RESOURCE);
|
||||||
#else
|
#else
|
||||||
s_bitmap = new wxBitmap( plot_enl_xpm );
|
s_bitmap = new wxBitmap( plot_enl_xpm );
|
||||||
#endif
|
#endif
|
||||||
@@ -1071,7 +1071,7 @@ static wxBitmap *GetShrinkBitmap()
|
|||||||
s_loaded = TRUE; // set it to TRUE anyhow, we won't try again
|
s_loaded = TRUE; // set it to TRUE anyhow, we won't try again
|
||||||
|
|
||||||
#if defined(__WXMSW__) || defined(__WXPM__)
|
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||||
s_bitmap = new wxBitmap("plot_shr_bmp", wxBITMAP_TYPE_RESOURCE);
|
s_bitmap = new wxBitmap(_T("plot_shr_bmp"), wxBITMAP_TYPE_RESOURCE);
|
||||||
#else
|
#else
|
||||||
s_bitmap = new wxBitmap( plot_shr_xpm );
|
s_bitmap = new wxBitmap( plot_shr_xpm );
|
||||||
#endif
|
#endif
|
||||||
@@ -1090,7 +1090,7 @@ static wxBitmap *GetZoomInBitmap()
|
|||||||
s_loaded = TRUE; // set it to TRUE anyhow, we won't try again
|
s_loaded = TRUE; // set it to TRUE anyhow, we won't try again
|
||||||
|
|
||||||
#if defined(__WXMSW__) || defined(__WXPM__)
|
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||||
s_bitmap = new wxBitmap("plot_zin_bmp", wxBITMAP_TYPE_RESOURCE);
|
s_bitmap = new wxBitmap(_T("plot_zin_bmp"), wxBITMAP_TYPE_RESOURCE);
|
||||||
#else
|
#else
|
||||||
s_bitmap = new wxBitmap( plot_zin_xpm );
|
s_bitmap = new wxBitmap( plot_zin_xpm );
|
||||||
#endif
|
#endif
|
||||||
@@ -1109,7 +1109,7 @@ static wxBitmap *GetZoomOutBitmap()
|
|||||||
s_loaded = TRUE; // set it to TRUE anyhow, we won't try again
|
s_loaded = TRUE; // set it to TRUE anyhow, we won't try again
|
||||||
|
|
||||||
#if defined(__WXMSW__) || defined(__WXPM__)
|
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||||
s_bitmap = new wxBitmap("plot_zot_bmp", wxBITMAP_TYPE_RESOURCE);
|
s_bitmap = new wxBitmap(_T("plot_zot_bmp"), wxBITMAP_TYPE_RESOURCE);
|
||||||
#else
|
#else
|
||||||
s_bitmap = new wxBitmap( plot_zot_xpm );
|
s_bitmap = new wxBitmap( plot_zot_xpm );
|
||||||
#endif
|
#endif
|
||||||
@@ -1128,7 +1128,7 @@ static wxBitmap *GetUpBitmap()
|
|||||||
s_loaded = TRUE; // set it to TRUE anyhow, we won't try again
|
s_loaded = TRUE; // set it to TRUE anyhow, we won't try again
|
||||||
|
|
||||||
#if defined(__WXMSW__) || defined(__WXPM__)
|
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||||
s_bitmap = new wxBitmap("plot_up_bmp", wxBITMAP_TYPE_RESOURCE);
|
s_bitmap = new wxBitmap(_T("plot_up_bmp"), wxBITMAP_TYPE_RESOURCE);
|
||||||
#else
|
#else
|
||||||
s_bitmap = new wxBitmap( plot_up_xpm );
|
s_bitmap = new wxBitmap( plot_up_xpm );
|
||||||
#endif
|
#endif
|
||||||
@@ -1147,7 +1147,7 @@ static wxBitmap *GetDownBitmap()
|
|||||||
s_loaded = TRUE; // set it to TRUE anyhow, we won't try again
|
s_loaded = TRUE; // set it to TRUE anyhow, we won't try again
|
||||||
|
|
||||||
#if defined(__WXMSW__) || defined(__WXPM__)
|
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||||
s_bitmap = new wxBitmap("plot_dwn_bmp", wxBITMAP_TYPE_RESOURCE);
|
s_bitmap = new wxBitmap(_T("plot_dwn_bmp"), wxBITMAP_TYPE_RESOURCE);
|
||||||
#else
|
#else
|
||||||
s_bitmap = new wxBitmap( plot_dwn_xpm );
|
s_bitmap = new wxBitmap( plot_dwn_xpm );
|
||||||
#endif
|
#endif
|
||||||
|
@@ -229,7 +229,6 @@ static bool wxGetDefaultDeviceName(wxString& deviceName, wxString& portName)
|
|||||||
deviceName.clear();
|
deviceName.clear();
|
||||||
|
|
||||||
LPDEVNAMES lpDevNames;
|
LPDEVNAMES lpDevNames;
|
||||||
LPTSTR lpszDriverName;
|
|
||||||
LPTSTR lpszDeviceName;
|
LPTSTR lpszDeviceName;
|
||||||
LPTSTR lpszPortName;
|
LPTSTR lpszPortName;
|
||||||
|
|
||||||
@@ -263,7 +262,6 @@ static bool wxGetDefaultDeviceName(wxString& deviceName, wxString& portName)
|
|||||||
if (pd.hDevNames)
|
if (pd.hDevNames)
|
||||||
{
|
{
|
||||||
lpDevNames = (LPDEVNAMES)GlobalLock(pd.hDevNames);
|
lpDevNames = (LPDEVNAMES)GlobalLock(pd.hDevNames);
|
||||||
lpszDriverName = (LPTSTR)lpDevNames + lpDevNames->wDriverOffset;
|
|
||||||
lpszDeviceName = (LPTSTR)lpDevNames + lpDevNames->wDeviceOffset;
|
lpszDeviceName = (LPTSTR)lpDevNames + lpDevNames->wDeviceOffset;
|
||||||
lpszPortName = (LPTSTR)lpDevNames + lpDevNames->wOutputOffset;
|
lpszPortName = (LPTSTR)lpDevNames + lpDevNames->wOutputOffset;
|
||||||
|
|
||||||
|
@@ -949,7 +949,6 @@ BOOL TmFromOleDate(DATE dtSrc, struct tm& tmDest)
|
|||||||
if (dtSrc > MAX_DATE || dtSrc < MIN_DATE) // about year 100 to about 9999
|
if (dtSrc > MAX_DATE || dtSrc < MIN_DATE) // about year 100 to about 9999
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
long nDays; // Number of days since Dec. 30, 1899
|
|
||||||
long nDaysAbsolute; // Number of days since 1/1/0
|
long nDaysAbsolute; // Number of days since 1/1/0
|
||||||
long nSecsInDay; // Time in seconds since midnight
|
long nSecsInDay; // Time in seconds since midnight
|
||||||
long nMinutesInDay; // Minutes in day
|
long nMinutesInDay; // Minutes in day
|
||||||
@@ -964,9 +963,6 @@ BOOL TmFromOleDate(DATE dtSrc, struct tm& tmDest)
|
|||||||
|
|
||||||
double dblDate = dtSrc; // tempory serial date
|
double dblDate = dtSrc; // tempory serial date
|
||||||
|
|
||||||
// If a valid date, then this conversion should not overflow
|
|
||||||
nDays = (long)dblDate;
|
|
||||||
|
|
||||||
// Round to the second
|
// Round to the second
|
||||||
dblDate += ((dtSrc > 0.0) ? HALF_SECOND : -HALF_SECOND);
|
dblDate += ((dtSrc > 0.0) ? HALF_SECOND : -HALF_SECOND);
|
||||||
|
|
||||||
|
@@ -4427,8 +4427,6 @@ wxKeyEvent wxWindowMSW::CreateKeyEvent(wxEventType evType,
|
|||||||
// WM_KEYDOWN one
|
// WM_KEYDOWN one
|
||||||
bool wxWindowMSW::HandleChar(WXWPARAM wParam, WXLPARAM lParam, bool isASCII)
|
bool wxWindowMSW::HandleChar(WXWPARAM wParam, WXLPARAM lParam, bool isASCII)
|
||||||
{
|
{
|
||||||
bool ctrlDown = FALSE;
|
|
||||||
|
|
||||||
int id;
|
int id;
|
||||||
if ( isASCII )
|
if ( isASCII )
|
||||||
{
|
{
|
||||||
@@ -4453,7 +4451,7 @@ bool wxWindowMSW::HandleChar(WXWPARAM wParam, WXLPARAM lParam, bool isASCII)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ctrlDown = TRUE;
|
//ctrlDown = TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user