*** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4168 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
2695a14e85
commit
004fd0c883
@ -216,6 +216,8 @@ protected:
|
||||
WXHBRUSH m_oldBrush;
|
||||
WXHFONT m_oldFont;
|
||||
WXHPALETTE m_oldPalette;
|
||||
|
||||
float m_scaleFactor; // wxPSDC wants to have this. Will disappear.
|
||||
};
|
||||
#endif
|
||||
// _WX_DC_H_
|
||||
|
@ -65,6 +65,7 @@ public:
|
||||
virtual wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def);
|
||||
virtual bool OnDrop(wxCoord x, wxCoord y);
|
||||
virtual bool OnData(wxCoord x, wxCoord y);
|
||||
virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult vResult);
|
||||
virtual bool GetData();
|
||||
|
||||
// implementation
|
||||
@ -94,6 +95,7 @@ public:
|
||||
virtual bool OnData( wxCoord x
|
||||
,wxCoord y
|
||||
);
|
||||
virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult vResult);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@ -115,6 +117,7 @@ public:
|
||||
virtual bool OnData( wxCoord x
|
||||
,wxCoord y
|
||||
);
|
||||
virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult vResult);
|
||||
};
|
||||
|
||||
#endif //__OS2DNDH__
|
||||
|
@ -24,8 +24,8 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxStatusLineNameStr;
|
||||
class WXDLLEXPORT wxMenuBar;
|
||||
class WXDLLEXPORT wxStatusBar;
|
||||
|
||||
class WXDLLEXPORT wxFrame: public wxWindow {
|
||||
|
||||
class WXDLLEXPORT wxFrame: public wxWindow
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxFrame)
|
||||
|
||||
public:
|
||||
|
@ -30,7 +30,7 @@
|
||||
// General features
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#define wxUSE_NET_API 1 // Utilize OS/2's UPM netapi's
|
||||
#define wxUSE_NET_API 0 // Utilize OS/2's UPM netapi's
|
||||
|
||||
#define wxUSE_CONFIG 1
|
||||
// Use wxConfig, with CreateConfig in wxApp
|
||||
@ -70,8 +70,6 @@
|
||||
#define wxUSE_DRAG_AND_DROP 1
|
||||
// 0 for no drag and drop
|
||||
|
||||
#define wxUSE_TOOLBAR 1
|
||||
// Define 1 to use toolbar classes
|
||||
#define wxUSE_BUTTONBAR 1
|
||||
// Define 1 to use buttonbar classes (enhanced toolbar
|
||||
// for MS Windows)
|
||||
|
@ -30,7 +30,7 @@
|
||||
// General features
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#define wxUSE_NET_API 1 // Utilize OS/2's UPM netapi's
|
||||
#define wxUSE_NET_API 0 // Utilize OS/2's UPM netapi's
|
||||
|
||||
#define wxUSE_CONFIG 1
|
||||
// Use wxConfig, with CreateConfig in wxApp
|
||||
|
@ -7,9 +7,5 @@
|
||||
#include "wx/motif/tbar95.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/tbar95.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/tbar95.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_TBAR95_H_BASE_
|
||||
|
@ -29,6 +29,10 @@
|
||||
#include <osfcn.h>
|
||||
#endif
|
||||
|
||||
#ifdef __VISAGECPP__
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
static int yyinput()
|
||||
#else
|
||||
@ -131,6 +135,7 @@ int read();
|
||||
* done when it reached the ';' after the YY_FATAL_ERROR() call.
|
||||
*/
|
||||
|
||||
#if !defined(__VISAGECPP__)
|
||||
#define YY_FATAL_ERROR(msg) \
|
||||
do \
|
||||
{ \
|
||||
@ -139,6 +144,18 @@ int read();
|
||||
exit( 1 ); \
|
||||
} \
|
||||
while ( 0 )
|
||||
#else
|
||||
// suppress expression always false warning
|
||||
int os2var = 0;
|
||||
#define YY_FATAL_ERROR(msg) \
|
||||
do \
|
||||
{ \
|
||||
(void) fputs( msg, stderr ); \
|
||||
(void) putc( '\n', stderr ); \
|
||||
exit( 1 ); \
|
||||
} \
|
||||
while ( os2var == 0 )
|
||||
#endif
|
||||
|
||||
/* default yywrap function - always treat EOF as an EOF */
|
||||
int yywrap(void) { return 1; }
|
||||
@ -154,6 +171,7 @@ int yywrap(void) { return 1; }
|
||||
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
|
||||
|
||||
/* special action meaning "start processing a new file" */
|
||||
#if !defined(__VISAGECPP__)
|
||||
#define YY_NEW_FILE \
|
||||
do \
|
||||
{ \
|
||||
@ -161,11 +179,20 @@ int yywrap(void) { return 1; }
|
||||
yy_load_buffer_state(); \
|
||||
} \
|
||||
while ( 0 )
|
||||
#else
|
||||
#define YY_NEW_FILE \
|
||||
do \
|
||||
{ \
|
||||
yy_init_buffer( yy_current_buffer, yyin ); \
|
||||
yy_load_buffer_state(); \
|
||||
} \
|
||||
while ( os2var == 0 )
|
||||
#endif
|
||||
|
||||
/* default declaration of generated scanner - a define so the user can
|
||||
* easily add parameters
|
||||
*/
|
||||
#define YY_DECL int yylex YY_PROTO(( void ))
|
||||
#define YY_DECL int yylex YY_PROTO(( void ))
|
||||
|
||||
/* code executed at the end of each rule */
|
||||
#define YY_BREAK break;
|
||||
@ -246,6 +273,7 @@ static int my_unput(char);
|
||||
#define EOB_ACT_LAST_MATCH 2
|
||||
|
||||
/* return all but the first 'n' matched characters back to the input stream */
|
||||
#if !defined(__VISAGECPP__)
|
||||
#define yyless(n) \
|
||||
do \
|
||||
{ \
|
||||
@ -255,6 +283,17 @@ static int my_unput(char);
|
||||
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
|
||||
} \
|
||||
while ( 0 )
|
||||
#else
|
||||
#define yyless(n) \
|
||||
do \
|
||||
{ \
|
||||
/* undo effects of setting up yytext */ \
|
||||
*yy_cp = yy_hold_char; \
|
||||
yy_c_buf_p = yy_cp = yy_bp + n; \
|
||||
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
|
||||
} \
|
||||
while ( os2var == 0 )
|
||||
#endif
|
||||
|
||||
#undef unput
|
||||
#define unput(c) yyunput( c, yytext )
|
||||
@ -477,7 +516,13 @@ YY_DECL
|
||||
yy_init = 0;
|
||||
}
|
||||
|
||||
#if !defined(__VISAGECPP__)
|
||||
while ( 1 ) /* loops until end-of-file is reached */
|
||||
#else
|
||||
os2var = 1;
|
||||
if (os2var == 0) return 0;
|
||||
while ( os2var == 1 ) /* loops until end-of-file is reached */
|
||||
#endif
|
||||
{
|
||||
yy_cp = yy_c_buf_p;
|
||||
|
||||
@ -729,6 +774,10 @@ case YY_STATE_EOF(INITIAL):
|
||||
"fatal flex scanner internal error--no action found" );
|
||||
}
|
||||
}
|
||||
#if defined(__VISAGECPP__)
|
||||
// VA complains about proc maybe not returning a value so return one
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -736,9 +785,9 @@ case YY_STATE_EOF(INITIAL):
|
||||
*
|
||||
* synopsis
|
||||
* int yy_get_next_buffer();
|
||||
*
|
||||
*
|
||||
* returns a code representing an action
|
||||
* EOB_ACT_LAST_MATCH -
|
||||
* EOB_ACT_LAST_MATCH -
|
||||
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
|
||||
* EOB_ACT_END_OF_FILE - end of file
|
||||
*/
|
||||
@ -1175,7 +1224,7 @@ static int my_unput(char c)
|
||||
|
||||
#endif
|
||||
|
||||
/* Public */
|
||||
/* Public */
|
||||
void LexFromFile(FILE *fd)
|
||||
{
|
||||
lex_read_from_string = 0;
|
||||
|
@ -4,7 +4,7 @@ static char yysccsid[] = "@(#)yaccpar 1.7 (Berkeley) 09/09/90";
|
||||
#define YYBYACC 1
|
||||
#line 2 "parser.y"
|
||||
#include "string.h"
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER) || defined(__VISAGECPP__)
|
||||
#include <io.h>
|
||||
#endif
|
||||
#include "wx/expr.h"
|
||||
@ -262,7 +262,8 @@ yyparse()
|
||||
register char *yys;
|
||||
extern char *getenv();
|
||||
|
||||
if (yys = getenv("YYDEBUG"))
|
||||
yys = getenv("YYDEBUG");
|
||||
if (yys)
|
||||
{
|
||||
yyn = *yys;
|
||||
if (yyn >= '0' && yyn <= '9')
|
||||
@ -279,7 +280,8 @@ yyparse()
|
||||
*yyssp = yystate = 0;
|
||||
|
||||
yyloop:
|
||||
if (yyn = yydefred[yystate]) goto yyreduce;
|
||||
yyn = yydefred[yystate];
|
||||
if (yyn != 0) goto yyreduce;
|
||||
if (yychar < 0)
|
||||
{
|
||||
if ((yychar = yylex()) < 0) yychar = 0;
|
||||
|
@ -452,9 +452,9 @@ bool wxImage::CanRead( const wxString &name )
|
||||
bool wxImage::CanRead( wxInputStream &stream )
|
||||
{
|
||||
wxList &list=GetHandlers();
|
||||
|
||||
|
||||
for ( wxList::Node *node = list.GetFirst(); node; node = node->GetNext() )
|
||||
{
|
||||
{
|
||||
wxImageHandler *handler=(wxImageHandler*)node->GetData();
|
||||
if (handler->CanRead( stream ))
|
||||
return TRUE;
|
||||
@ -1692,6 +1692,341 @@ wxImage::wxImage( const wxBitmap &bitmap )
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __WXPM__
|
||||
// OS/2 Presentation manager conversion routings
|
||||
|
||||
wxBitmap wxImage::ConvertToBitmap() const
|
||||
{
|
||||
if ( !Ok() )
|
||||
return wxNullBitmap;
|
||||
wxBitmap bitmap; // remove
|
||||
// TODO:
|
||||
/*
|
||||
int sizeLimit = 1024*768*3;
|
||||
|
||||
// width and height of the device-dependent bitmap
|
||||
int width = GetWidth();
|
||||
int bmpHeight = GetHeight();
|
||||
|
||||
// calc the number of bytes per scanline and padding
|
||||
int bytePerLine = width*3;
|
||||
int sizeDWORD = sizeof( DWORD );
|
||||
int lineBoundary = bytePerLine % sizeDWORD;
|
||||
int padding = 0;
|
||||
if( lineBoundary > 0 )
|
||||
{
|
||||
padding = sizeDWORD - lineBoundary;
|
||||
bytePerLine += padding;
|
||||
}
|
||||
// calc the number of DIBs and heights of DIBs
|
||||
int numDIB = 1;
|
||||
int hRemain = 0;
|
||||
int height = sizeLimit/bytePerLine;
|
||||
if( height >= bmpHeight )
|
||||
height = bmpHeight;
|
||||
else
|
||||
{
|
||||
numDIB = bmpHeight / height;
|
||||
hRemain = bmpHeight % height;
|
||||
if( hRemain >0 ) numDIB++;
|
||||
}
|
||||
|
||||
// set bitmap parameters
|
||||
wxBitmap bitmap;
|
||||
wxCHECK_MSG( Ok(), bitmap, wxT("invalid image") );
|
||||
bitmap.SetWidth( width );
|
||||
bitmap.SetHeight( bmpHeight );
|
||||
bitmap.SetDepth( wxDisplayDepth() );
|
||||
|
||||
// create a DIB header
|
||||
int headersize = sizeof(BITMAPINFOHEADER);
|
||||
LPBITMAPINFO lpDIBh = (BITMAPINFO *) malloc( headersize );
|
||||
wxCHECK_MSG( lpDIBh, bitmap, wxT("could not allocate memory for DIB header") );
|
||||
// Fill in the DIB header
|
||||
lpDIBh->bmiHeader.biSize = headersize;
|
||||
lpDIBh->bmiHeader.biWidth = (DWORD)width;
|
||||
lpDIBh->bmiHeader.biHeight = (DWORD)(-height);
|
||||
lpDIBh->bmiHeader.biSizeImage = bytePerLine*height;
|
||||
// the general formula for biSizeImage:
|
||||
// ( ( ( ((DWORD)width*24) +31 ) & ~31 ) >> 3 ) * height;
|
||||
lpDIBh->bmiHeader.biPlanes = 1;
|
||||
lpDIBh->bmiHeader.biBitCount = 24;
|
||||
lpDIBh->bmiHeader.biCompression = BI_RGB;
|
||||
lpDIBh->bmiHeader.biClrUsed = 0;
|
||||
// These seem not really needed for our purpose here.
|
||||
lpDIBh->bmiHeader.biClrImportant = 0;
|
||||
lpDIBh->bmiHeader.biXPelsPerMeter = 0;
|
||||
lpDIBh->bmiHeader.biYPelsPerMeter = 0;
|
||||
// memory for DIB data
|
||||
unsigned char *lpBits;
|
||||
lpBits = (unsigned char *)malloc( lpDIBh->bmiHeader.biSizeImage );
|
||||
if( !lpBits )
|
||||
{
|
||||
wxFAIL_MSG( wxT("could not allocate memory for DIB") );
|
||||
free( lpDIBh );
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
// create and set the device-dependent bitmap
|
||||
HDC hdc = ::GetDC(NULL);
|
||||
HDC memdc = ::CreateCompatibleDC( hdc );
|
||||
HBITMAP hbitmap;
|
||||
hbitmap = ::CreateCompatibleBitmap( hdc, width, bmpHeight );
|
||||
::SelectObject( memdc, hbitmap);
|
||||
|
||||
// copy image data into DIB data and then into DDB (in a loop)
|
||||
unsigned char *data = GetData();
|
||||
int i, j, n;
|
||||
int origin = 0;
|
||||
unsigned char *ptdata = data;
|
||||
unsigned char *ptbits;
|
||||
|
||||
for( n=0; n<numDIB; n++ )
|
||||
{
|
||||
if( numDIB > 1 && n == numDIB-1 && hRemain > 0 )
|
||||
{
|
||||
// redefine height and size of the (possibly) last smaller DIB
|
||||
// memory is not reallocated
|
||||
height = hRemain;
|
||||
lpDIBh->bmiHeader.biHeight = (DWORD)(-height);
|
||||
lpDIBh->bmiHeader.biSizeImage = bytePerLine*height;
|
||||
}
|
||||
ptbits = lpBits;
|
||||
|
||||
for( j=0; j<height; j++ )
|
||||
{
|
||||
for( i=0; i<width; i++ )
|
||||
{
|
||||
*(ptbits++) = *(ptdata+2);
|
||||
*(ptbits++) = *(ptdata+1);
|
||||
*(ptbits++) = *(ptdata );
|
||||
ptdata += 3;
|
||||
}
|
||||
for( i=0; i< padding; i++ ) *(ptbits++) = 0;
|
||||
}
|
||||
::StretchDIBits( memdc, 0, origin, width, height,\
|
||||
0, 0, width, height, lpBits, lpDIBh, DIB_RGB_COLORS, SRCCOPY);
|
||||
origin += height;
|
||||
// if numDIB = 1, lines below can also be used
|
||||
// hbitmap = CreateDIBitmap( hdc, &(lpDIBh->bmiHeader), CBM_INIT, lpBits, lpDIBh, DIB_RGB_COLORS );
|
||||
// The above line is equivalent to the following two lines.
|
||||
// hbitmap = ::CreateCompatibleBitmap( hdc, width, height );
|
||||
// ::SetDIBits( hdc, hbitmap, 0, height, lpBits, lpDIBh, DIB_RGB_COLORS);
|
||||
// or the following lines
|
||||
// hbitmap = ::CreateCompatibleBitmap( hdc, width, height );
|
||||
// HDC memdc = ::CreateCompatibleDC( hdc );
|
||||
// ::SelectObject( memdc, hbitmap);
|
||||
// ::SetDIBitsToDevice( memdc, 0, 0, width, height,
|
||||
// 0, 0, 0, height, (void *)lpBits, lpDIBh, DIB_RGB_COLORS);
|
||||
// ::SelectObject( memdc, 0 );
|
||||
// ::DeleteDC( memdc );
|
||||
}
|
||||
bitmap.SetHBITMAP( (WXHBITMAP) hbitmap );
|
||||
|
||||
// similarly, created an mono-bitmap for the possible mask
|
||||
if( HasMask() )
|
||||
{
|
||||
hbitmap = ::CreateBitmap( (WORD)width, (WORD)bmpHeight, 1, 1, NULL );
|
||||
::SelectObject( memdc, hbitmap);
|
||||
if( numDIB == 1 ) height = bmpHeight;
|
||||
else height = sizeLimit/bytePerLine;
|
||||
lpDIBh->bmiHeader.biHeight = (DWORD)(-height);
|
||||
lpDIBh->bmiHeader.biSizeImage = bytePerLine*height;
|
||||
origin = 0;
|
||||
unsigned char r = GetMaskRed();
|
||||
unsigned char g = GetMaskGreen();
|
||||
unsigned char b = GetMaskBlue();
|
||||
unsigned char zero = 0, one = 255;
|
||||
ptdata = data;
|
||||
for( n=0; n<numDIB; n++ )
|
||||
{
|
||||
if( numDIB > 1 && n == numDIB - 1 && hRemain > 0 )
|
||||
{
|
||||
// redefine height and size of the (possibly) last smaller DIB
|
||||
// memory is not reallocated
|
||||
height = hRemain;
|
||||
lpDIBh->bmiHeader.biHeight = (DWORD)(-height);
|
||||
lpDIBh->bmiHeader.biSizeImage = bytePerLine*height;
|
||||
}
|
||||
ptbits = lpBits;
|
||||
for( int j=0; j<height; j++ )
|
||||
{
|
||||
for(i=0; i<width; i++ )
|
||||
{
|
||||
if( (*(ptdata++)!=r) | (*(ptdata++)!=g) | (*(ptdata++)!=b) )
|
||||
{
|
||||
*(ptbits++) = one;
|
||||
*(ptbits++) = one;
|
||||
*(ptbits++) = one;
|
||||
}
|
||||
else
|
||||
{
|
||||
*(ptbits++) = zero;
|
||||
*(ptbits++) = zero;
|
||||
*(ptbits++) = zero;
|
||||
}
|
||||
}
|
||||
for( i=0; i< padding; i++ ) *(ptbits++) = zero;
|
||||
}
|
||||
::StretchDIBits( memdc, 0, origin, width, height,\
|
||||
0, 0, width, height, lpBits, lpDIBh, DIB_RGB_COLORS, SRCCOPY);
|
||||
origin += height;
|
||||
}
|
||||
// create a wxMask object
|
||||
wxMask *mask = new wxMask();
|
||||
mask->SetMaskBitmap( (WXHBITMAP) hbitmap );
|
||||
bitmap.SetMask( mask );
|
||||
}
|
||||
|
||||
// free allocated resources
|
||||
::SelectObject( memdc, 0 );
|
||||
::DeleteDC( memdc );
|
||||
::ReleaseDC(NULL, hdc);
|
||||
free(lpDIBh);
|
||||
free(lpBits);
|
||||
|
||||
// check the wxBitmap object
|
||||
if( bitmap.GetHBITMAP() )
|
||||
bitmap.SetOk( TRUE );
|
||||
else
|
||||
bitmap.SetOk( FALSE );
|
||||
*/
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
wxImage::wxImage( const wxBitmap &bitmap )
|
||||
{
|
||||
// check the bitmap
|
||||
if( !bitmap.Ok() )
|
||||
{
|
||||
wxFAIL_MSG( wxT("invalid bitmap") );
|
||||
return;
|
||||
}
|
||||
|
||||
// create an wxImage object
|
||||
int width = bitmap.GetWidth();
|
||||
int height = bitmap.GetHeight();
|
||||
Create( width, height );
|
||||
unsigned char *data = GetData();
|
||||
if( !data )
|
||||
{
|
||||
wxFAIL_MSG( wxT("could not allocate data for image") );
|
||||
return;
|
||||
}
|
||||
|
||||
// calc the number of bytes per scanline and padding in the DIB
|
||||
int bytePerLine = width*3;
|
||||
int sizeDWORD = sizeof( DWORD );
|
||||
int lineBoundary = bytePerLine % sizeDWORD;
|
||||
int padding = 0;
|
||||
if( lineBoundary > 0 )
|
||||
{
|
||||
padding = sizeDWORD - lineBoundary;
|
||||
bytePerLine += padding;
|
||||
}
|
||||
// TODO:
|
||||
/*
|
||||
// create a DIB header
|
||||
int headersize = sizeof(BITMAPINFOHEADER);
|
||||
LPBITMAPINFO lpDIBh = (BITMAPINFO *) malloc( headersize );
|
||||
if( !lpDIBh )
|
||||
{
|
||||
wxFAIL_MSG( wxT("could not allocate data for DIB header") );
|
||||
free( data );
|
||||
return;
|
||||
}
|
||||
// Fill in the DIB header
|
||||
lpDIBh->bmiHeader.biSize = headersize;
|
||||
lpDIBh->bmiHeader.biWidth = width;
|
||||
lpDIBh->bmiHeader.biHeight = -height;
|
||||
lpDIBh->bmiHeader.biSizeImage = bytePerLine * height;
|
||||
lpDIBh->bmiHeader.biPlanes = 1;
|
||||
lpDIBh->bmiHeader.biBitCount = 24;
|
||||
lpDIBh->bmiHeader.biCompression = BI_RGB;
|
||||
lpDIBh->bmiHeader.biClrUsed = 0;
|
||||
// These seem not really needed for our purpose here.
|
||||
lpDIBh->bmiHeader.biClrImportant = 0;
|
||||
lpDIBh->bmiHeader.biXPelsPerMeter = 0;
|
||||
lpDIBh->bmiHeader.biYPelsPerMeter = 0;
|
||||
// memory for DIB data
|
||||
unsigned char *lpBits;
|
||||
lpBits = (unsigned char *) malloc( lpDIBh->bmiHeader.biSizeImage );
|
||||
if( !lpBits )
|
||||
{
|
||||
wxFAIL_MSG( wxT("could not allocate data for DIB") );
|
||||
free( data );
|
||||
free( lpDIBh );
|
||||
return;
|
||||
}
|
||||
|
||||
// copy data from the device-dependent bitmap to the DIB
|
||||
HDC hdc = ::GetDC(NULL);
|
||||
HBITMAP hbitmap;
|
||||
hbitmap = (HBITMAP) bitmap.GetHBITMAP();
|
||||
::GetDIBits( hdc, hbitmap, 0, height, lpBits, lpDIBh, DIB_RGB_COLORS );
|
||||
|
||||
// copy DIB data into the wxImage object
|
||||
int i, j;
|
||||
unsigned char *ptdata = data;
|
||||
unsigned char *ptbits = lpBits;
|
||||
for( i=0; i<height; i++ )
|
||||
{
|
||||
for( j=0; j<width; j++ )
|
||||
{
|
||||
*(ptdata++) = *(ptbits+2);
|
||||
*(ptdata++) = *(ptbits+1);
|
||||
*(ptdata++) = *(ptbits );
|
||||
ptbits += 3;
|
||||
}
|
||||
ptbits += padding;
|
||||
}
|
||||
|
||||
// similarly, set data according to the possible mask bitmap
|
||||
if( bitmap.GetMask() && bitmap.GetMask()->GetMaskBitmap() )
|
||||
{
|
||||
hbitmap = (HBITMAP) bitmap.GetMask()->GetMaskBitmap();
|
||||
// memory DC created, color set, data copied, and memory DC deleted
|
||||
HDC memdc = ::CreateCompatibleDC( hdc );
|
||||
::SetTextColor( memdc, RGB( 0, 0, 0 ) );
|
||||
::SetBkColor( memdc, RGB( 255, 255, 255 ) );
|
||||
::GetDIBits( memdc, hbitmap, 0, height, lpBits, lpDIBh, DIB_RGB_COLORS );
|
||||
::DeleteDC( memdc );
|
||||
// background color set to RGB(16,16,16) in consistent with wxGTK
|
||||
unsigned char r=16, g=16, b=16;
|
||||
ptdata = data;
|
||||
ptbits = lpBits;
|
||||
for( i=0; i<height; i++ )
|
||||
{
|
||||
for( j=0; j<width; j++ )
|
||||
{
|
||||
if( *ptbits != 0 )
|
||||
ptdata += 3;
|
||||
else
|
||||
{
|
||||
*(ptdata++) = r;
|
||||
*(ptdata++) = g;
|
||||
*(ptdata++) = b;
|
||||
}
|
||||
ptbits += 3;
|
||||
}
|
||||
ptbits += padding;
|
||||
}
|
||||
SetMaskColour( r, g, b );
|
||||
SetMask( TRUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
SetMask( FALSE );
|
||||
}
|
||||
// free allocated resources
|
||||
::ReleaseDC(NULL, hdc);
|
||||
free(lpDIBh);
|
||||
free(lpBits);
|
||||
*/
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// A module to allow wxImage initialization/cleanup
|
||||
// without calling these functions from app.cpp or from
|
||||
// the user's application.
|
||||
|
@ -64,7 +64,7 @@ static int my_input(void);
|
||||
|
||||
"'"{WORDCHAR}*"'" {int len = strlen(yytext);
|
||||
yytext[len-1] = 0;
|
||||
yylval.s = strdup(yytext+1);
|
||||
yylval.s = strdup(yytext+1);
|
||||
Return(WORD);}
|
||||
|
||||
\"({STRINGCHAR}|\\\"|\|\\\\|\\)*\" {yylval.s = strdup(yytext); Return(STRING);}
|
||||
@ -123,7 +123,7 @@ static int lex_input() {
|
||||
# define input() my_input()
|
||||
static int my_unput(char c)
|
||||
{
|
||||
if (lex_read_from_string) {
|
||||
if (lex_read_from_string != 0) {
|
||||
/* Make sure we have something */
|
||||
if (lex_string_ptr) {
|
||||
if (c == '\n') yylineno--;
|
||||
@ -138,7 +138,7 @@ static int my_unput(char c)
|
||||
|
||||
#endif
|
||||
|
||||
/* Public */
|
||||
/* Public */
|
||||
void LexFromFile(FILE *fd)
|
||||
{
|
||||
lex_read_from_string = 0;
|
||||
|
@ -419,7 +419,7 @@ void wxPostScriptDC::DestroyClippingRegion()
|
||||
m_clipping = FALSE;
|
||||
fprintf( m_pstream, "grestore\n" );
|
||||
}
|
||||
|
||||
|
||||
wxDC::DestroyClippingRegion();
|
||||
}
|
||||
|
||||
@ -1329,8 +1329,8 @@ void wxPostScriptDC::SetAxisOrientation( bool xLeftRight, bool yBottomUp )
|
||||
m_signX = (xLeftRight ? 1 : -1);
|
||||
m_signY = (yBottomUp ? 1 : -1);
|
||||
|
||||
// FIXME there is no such function in MSW
|
||||
#ifndef __WXMSW__
|
||||
// FIXME there is no such function in MSW nor in OS2/PM
|
||||
#if !defined(__WXMSW__) && !defined(__WXPM__)
|
||||
ComputeScaleAndOrigin();
|
||||
#endif
|
||||
}
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <ctype.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifndef __WINDOWS__
|
||||
#if !defined(__WINDOWS__) && !defined(__OS2__)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
@ -82,7 +82,7 @@ wxExtHelpController::DisplayHelp(wxString const &relativeURL)
|
||||
wxBusyCursor b; // display a busy cursor
|
||||
|
||||
|
||||
#ifdef __WXMSW__
|
||||
#if defined(__WXMSW__)
|
||||
wxString url;
|
||||
url << m_MapFile << '\\' << relativeURL.BeforeFirst('#');
|
||||
bool bOk = (int)ShellExecute(NULL, "open", url,
|
||||
@ -94,6 +94,19 @@ wxExtHelpController::DisplayHelp(wxString const &relativeURL)
|
||||
}
|
||||
else
|
||||
return true;
|
||||
#elif defined(__WXPM__)
|
||||
wxString url;
|
||||
url << m_MapFile << '\\' << relativeURL.BeforeFirst('#');
|
||||
// will have to fix for OS/2, later.....DW
|
||||
// bool bOk = (int)ShellExecute(NULL, "open", url,
|
||||
// NULL, NULL, SW_SHOWNORMAL ) > 32;
|
||||
// if ( !bOk )
|
||||
// {
|
||||
// wxLogSysError(_("Cannot open URL '%s'"), relativeURL.c_str());
|
||||
// return false;
|
||||
// }
|
||||
// else
|
||||
return TRUE;
|
||||
#else
|
||||
// assume UNIX
|
||||
wxString command;
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#ifndef __WINDOWS__
|
||||
#if !defined(__WINDOWS__) && !defined(__OS2__)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
@ -227,7 +227,7 @@ wxHTMLHelpControllerBase::DisplayContents()
|
||||
file = file.BeforeLast(wxT('#'));
|
||||
if(contents.Length() && wxFileExists(file))
|
||||
rc = DisplaySection(CONTENTS_ID);
|
||||
|
||||
|
||||
// if not found, open homemade toc:
|
||||
return rc ? TRUE : KeywordSearch(wxT(""));
|
||||
}
|
||||
@ -296,7 +296,7 @@ wxHTMLHelpControllerBase::KeywordSearch(const wxString& k)
|
||||
node = node->Next();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(idx == 1)
|
||||
rc = DisplayHelp(urls[0]);
|
||||
else if(idx == 0)
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#ifndef __WINDOWS__
|
||||
#if !defined(__WINDOWS__) && !defined(__OS2__)
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
@ -69,7 +69,7 @@ public:
|
||||
delete [] src;
|
||||
return doc;
|
||||
}
|
||||
|
||||
|
||||
virtual bool CanRead(const wxFSFile& file) const
|
||||
{
|
||||
wxString filename = file.GetLocation();
|
||||
@ -158,7 +158,7 @@ wxHelpFrame::wxHelpFrame(wxWindow *parent, int id,
|
||||
wxButton *btn_contents = new wxButton(this, m_IdContents, _("Contents"));
|
||||
m_combo = new wxComboBox(this, m_IdCombo);
|
||||
wxButton *btn_search = new wxButton(this, m_IdSearch, _("Search"));
|
||||
|
||||
|
||||
m_filter = new wxForceHtmlFilter;
|
||||
|
||||
wxLayoutConstraints *c;
|
||||
@ -176,7 +176,7 @@ wxHelpFrame::wxHelpFrame(wxWindow *parent, int id,
|
||||
c->top.SameAs(this, wxTop, 2*LAYOUT_Y_MARGIN);
|
||||
c->height.AsIs();
|
||||
btn_fwd->SetConstraints(c);
|
||||
|
||||
|
||||
c = new wxLayoutConstraints;
|
||||
c->left.SameAs(btn_fwd, wxRight, 2*LAYOUT_X_MARGIN);
|
||||
c->width.Absolute(BUTTON_WIDTH);
|
||||
@ -207,7 +207,7 @@ wxHelpFrame::wxHelpFrame(wxWindow *parent, int id,
|
||||
m_htmlwin->SetConstraints(c);
|
||||
SetAutoLayout(TRUE);
|
||||
CreateStatusBar();
|
||||
|
||||
|
||||
m_htmlwin->SetRelatedFrame(this, title);
|
||||
m_htmlwin->SetRelatedStatusBar(0);
|
||||
m_htmlwin->AddFilter(m_filter);
|
||||
|
@ -578,9 +578,9 @@ void wxListLineData::DoDraw( wxDC *dc, bool hilight, bool paintBG )
|
||||
long dev_y = dc->LogicalToDeviceY( m_bound_all.y-2 );
|
||||
long dev_w = dc->LogicalToDeviceXRel( m_bound_all.width+4 );
|
||||
long dev_h = dc->LogicalToDeviceYRel( m_bound_all.height+4 );
|
||||
|
||||
|
||||
if (!m_owner->IsExposed( dev_x, dev_y, dev_w, dev_h ))
|
||||
{
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@ -599,7 +599,7 @@ void wxListLineData::DoDraw( wxDC *dc, bool hilight, bool paintBG )
|
||||
dc->DrawRectangle( m_bound_hilight.x, m_bound_hilight.y,
|
||||
m_bound_hilight.width, m_bound_hilight.height );
|
||||
}
|
||||
|
||||
|
||||
dc->SetBackgroundMode(wxTRANSPARENT);
|
||||
if (m_mode == wxLC_REPORT)
|
||||
{
|
||||
@ -691,7 +691,7 @@ void wxListLineData::Draw( wxDC *dc )
|
||||
|
||||
bool wxListLineData::IsInRect( int x, int y, const wxRect &rect )
|
||||
{
|
||||
return ((x >= rect.x) && (x <= rect.x+rect.width) &&
|
||||
return ((x >= rect.x) && (x <= rect.x+rect.width) &&
|
||||
(y >= rect.y) && (y <= rect.y+rect.height));
|
||||
}
|
||||
|
||||
@ -765,7 +765,7 @@ void wxListHeaderWindow::DoDrawRect( wxDC *dc, int x, int y, int w, int h )
|
||||
dc->DrawRectangle( x, y+h, w+1, 1 ); // bottom (outer)
|
||||
|
||||
wxPen pen( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNSHADOW ), 1, wxSOLID );
|
||||
|
||||
|
||||
dc->SetPen( pen );
|
||||
dc->DrawLine( x+w-m_corner, y, x+w-1, y+h ); // right (inner)
|
||||
dc->DrawRectangle( x+1, y+h-1, w-2, 1 ); // bottom (inner)
|
||||
@ -991,7 +991,7 @@ void wxListTextCtrl::OnKillFocus( wxFocusEvent &WXUNUSED(event) )
|
||||
if (wxPendingDelete.Member(this)) return;
|
||||
|
||||
wxPendingDelete.Append(this);
|
||||
|
||||
|
||||
if ((*m_accept) && ((*m_res) != m_startValue))
|
||||
m_owner->OnRenameAccept();
|
||||
}
|
||||
@ -1080,7 +1080,7 @@ wxListMainWindow::wxListMainWindow( wxWindow *parent, wxWindowID id,
|
||||
wxListMainWindow::~wxListMainWindow()
|
||||
{
|
||||
if (m_hilightBrush) delete m_hilightBrush;
|
||||
|
||||
|
||||
delete m_renameTimer;
|
||||
}
|
||||
|
||||
@ -1112,13 +1112,13 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
||||
PrepareDC( dc );
|
||||
|
||||
if (m_dirty) return;
|
||||
|
||||
|
||||
if (m_lines.GetCount() == 0) return;
|
||||
|
||||
dc.BeginDrawing();
|
||||
|
||||
dc.SetFont( GetFont() );
|
||||
|
||||
|
||||
if (m_mode & wxLC_REPORT)
|
||||
{
|
||||
int lineSpacing = 0;
|
||||
@ -1133,7 +1133,7 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
||||
for (int i = 0; i < m_visibleLines+2; i++)
|
||||
{
|
||||
if (!node) break;
|
||||
|
||||
|
||||
line = (wxListLineData*)node->Data();
|
||||
line->Draw( &dc );
|
||||
node = node->Next();
|
||||
@ -1149,7 +1149,7 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
||||
node = node->Next();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (m_current) m_current->DrawRubberBand( &dc, m_hasFocus );
|
||||
|
||||
dc.EndDrawing();
|
||||
@ -1210,7 +1210,7 @@ void wxListMainWindow::EditLabel( long item )
|
||||
{
|
||||
wxNode *node = m_lines.Nth( item );
|
||||
wxCHECK_RET( node, wxT("wrong index in wxListCtrl::Edit()") );
|
||||
|
||||
|
||||
m_currentEdit = (wxListLineData*) node->Data();
|
||||
|
||||
wxListEvent le( wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, GetParent()->GetId() );
|
||||
@ -1218,10 +1218,10 @@ void wxListMainWindow::EditLabel( long item )
|
||||
le.m_itemIndex = GetIndexOfLine( m_currentEdit );
|
||||
m_currentEdit->GetItem( 0, le.m_item );
|
||||
GetParent()->GetEventHandler()->ProcessEvent( le );
|
||||
|
||||
|
||||
if (!le.IsAllowed())
|
||||
return;
|
||||
|
||||
|
||||
// We have to call this here because the label in
|
||||
// question might just have been added and no screen
|
||||
// update taken place.
|
||||
@ -1234,7 +1234,7 @@ void wxListMainWindow::EditLabel( long item )
|
||||
int w = 0;
|
||||
int h = 0;
|
||||
m_currentEdit->GetLabelExtent( x, y, w, h );
|
||||
|
||||
|
||||
wxClientDC dc(this);
|
||||
PrepareDC( dc );
|
||||
x = dc.LogicalToDeviceX( x );
|
||||
@ -1248,7 +1248,7 @@ void wxListMainWindow::EditLabel( long item )
|
||||
void wxListMainWindow::OnRenameTimer()
|
||||
{
|
||||
wxCHECK_RET( m_current, wxT("invalid m_current") );
|
||||
|
||||
|
||||
Edit( m_lines.IndexOf( m_current ) );
|
||||
}
|
||||
|
||||
@ -1260,9 +1260,9 @@ void wxListMainWindow::OnRenameAccept()
|
||||
m_currentEdit->GetItem( 0, le.m_item );
|
||||
le.m_item.m_text = m_renameRes;
|
||||
GetParent()->GetEventHandler()->ProcessEvent( le );
|
||||
|
||||
|
||||
if (!le.IsAllowed()) return;
|
||||
|
||||
|
||||
wxListItem info;
|
||||
info.m_mask = wxLIST_MASK_TEXT;
|
||||
info.m_itemId = le.m_itemIndex;
|
||||
@ -1283,7 +1283,7 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
|
||||
PrepareDC(dc);
|
||||
long x = dc.DeviceToLogicalX( (long)event.GetX() );
|
||||
long y = dc.DeviceToLogicalY( (long)event.GetY() );
|
||||
|
||||
|
||||
/* Did we actually hit an item ? */
|
||||
long hitResult = 0;
|
||||
wxNode *node = m_lines.First();
|
||||
@ -1328,9 +1328,9 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
|
||||
m_usedKeys = FALSE;
|
||||
m_lastOnSame = FALSE;
|
||||
m_renameTimer->Stop();
|
||||
|
||||
|
||||
SendNotify( line, wxEVT_COMMAND_LIST_ITEM_ACTIVATED );
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1352,13 +1352,13 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
|
||||
SendNotify( line, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (event.MiddleDown())
|
||||
{
|
||||
SendNotify( line, wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (event.LeftDown())
|
||||
{
|
||||
m_usedKeys = FALSE;
|
||||
@ -1403,12 +1403,12 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
|
||||
}
|
||||
|
||||
if (numOfLine < numOfCurrent)
|
||||
{
|
||||
int i = numOfLine;
|
||||
numOfLine = numOfCurrent;
|
||||
numOfCurrent = i;
|
||||
{
|
||||
int i = numOfLine;
|
||||
numOfLine = numOfCurrent;
|
||||
numOfCurrent = i;
|
||||
}
|
||||
|
||||
|
||||
wxNode *node = m_lines.Nth( numOfCurrent );
|
||||
for (int i = 0; i <= numOfLine-numOfCurrent; i++)
|
||||
{
|
||||
@ -1440,17 +1440,17 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
|
||||
void wxListMainWindow::MoveToFocus()
|
||||
{
|
||||
if (!m_current) return;
|
||||
|
||||
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
int w = 0;
|
||||
int h = 0;
|
||||
m_current->GetExtent( x, y, w, h );
|
||||
|
||||
|
||||
int w_p = 0;
|
||||
int h_p = 0;
|
||||
GetClientSize( &w_p, &h_p );
|
||||
|
||||
|
||||
if (m_mode & wxLC_REPORT)
|
||||
{
|
||||
int y_s = m_yScroll*GetScrollPos( wxVERTICAL );
|
||||
@ -1483,7 +1483,7 @@ void wxListMainWindow::OnArrowChar( wxListLineData *newCurrent, bool shiftDown )
|
||||
void wxListMainWindow::OnKeyDown( wxKeyEvent &event )
|
||||
{
|
||||
wxWindow *parent = GetParent();
|
||||
|
||||
|
||||
/* we propagate the key event up */
|
||||
wxKeyEvent ke( wxEVT_KEY_DOWN );
|
||||
ke.m_shiftDown = event.m_shiftDown;
|
||||
@ -1495,14 +1495,14 @@ void wxListMainWindow::OnKeyDown( wxKeyEvent &event )
|
||||
ke.m_y = event.m_y;
|
||||
ke.SetEventObject( parent );
|
||||
if (parent->GetEventHandler()->ProcessEvent( ke )) return;
|
||||
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
void wxListMainWindow::OnChar( wxKeyEvent &event )
|
||||
{
|
||||
wxWindow *parent = GetParent();
|
||||
|
||||
|
||||
/* we send a list_key event up */
|
||||
wxListEvent le( wxEVT_COMMAND_LIST_KEY_DOWN, GetParent()->GetId() );
|
||||
le.m_code = event.KeyCode();
|
||||
@ -1520,7 +1520,7 @@ void wxListMainWindow::OnChar( wxKeyEvent &event )
|
||||
ke.m_y = event.m_y;
|
||||
ke.SetEventObject( parent );
|
||||
if (parent->GetEventHandler()->ProcessEvent( ke )) return;
|
||||
|
||||
|
||||
if (event.KeyCode() == WXK_TAB)
|
||||
{
|
||||
wxNavigationKeyEvent nevent;
|
||||
@ -1528,7 +1528,7 @@ void wxListMainWindow::OnChar( wxKeyEvent &event )
|
||||
nevent.SetCurrentFocus( m_parent );
|
||||
if (m_parent->GetEventHandler()->ProcessEvent( nevent )) return;
|
||||
}
|
||||
|
||||
|
||||
/* no item -> nothing to do */
|
||||
if (!m_current)
|
||||
{
|
||||
@ -1565,9 +1565,9 @@ void wxListMainWindow::OnChar( wxKeyEvent &event )
|
||||
case WXK_PRIOR:
|
||||
{
|
||||
int steps = 0;
|
||||
if (m_mode & wxLC_REPORT)
|
||||
{
|
||||
steps = m_visibleLines-1;
|
||||
if (m_mode & wxLC_REPORT)
|
||||
{
|
||||
steps = m_visibleLines-1;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1584,9 +1584,9 @@ void wxListMainWindow::OnChar( wxKeyEvent &event )
|
||||
case WXK_NEXT:
|
||||
{
|
||||
int steps = 0;
|
||||
if (m_mode & wxLC_REPORT)
|
||||
{
|
||||
steps = m_visibleLines-1;
|
||||
if (m_mode & wxLC_REPORT)
|
||||
{
|
||||
steps = m_visibleLines-1;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1670,7 +1670,7 @@ void wxListMainWindow::OnSetFocus( wxFocusEvent &WXUNUSED(event) )
|
||||
RefreshLine( m_current );
|
||||
|
||||
if (!GetParent()) return;
|
||||
|
||||
|
||||
#ifdef __WXGTK__
|
||||
g_focusWindow = GetParent();
|
||||
#endif
|
||||
@ -1690,7 +1690,7 @@ void wxListMainWindow::OnSize( wxSizeEvent &WXUNUSED(event) )
|
||||
{
|
||||
/*
|
||||
We don't even allow the wxScrolledWindow::AdjustScrollbars() call
|
||||
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
@ -1898,7 +1898,7 @@ int wxListMainWindow::GetColumnWidth( int col )
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2101,11 +2101,11 @@ void wxListMainWindow::CalculatePositions()
|
||||
int iconSpacing = 0;
|
||||
if (m_mode & wxLC_ICON) iconSpacing = m_normal_spacing;
|
||||
if (m_mode & wxLC_SMALL_ICON) iconSpacing = m_small_spacing;
|
||||
|
||||
|
||||
// we take the first line (which also can be an icon or
|
||||
// an a text item in wxLC_ICON and wxLC_LIST modes) to
|
||||
// measure the size of the line
|
||||
|
||||
|
||||
int lineWidth = 0;
|
||||
int lineHeight = 0;
|
||||
int lineSpacing = 0;
|
||||
@ -2150,7 +2150,7 @@ void wxListMainWindow::CalculatePositions()
|
||||
// at first we try without any scrollbar. if the items don't
|
||||
// fit into the window, we recalculate after subtracting an
|
||||
// approximated 15 pt for the horizontal scrollbar
|
||||
|
||||
|
||||
GetSize( &clientWidth, &clientHeight );
|
||||
clientHeight -= 4; // sunken frame
|
||||
|
||||
@ -2366,9 +2366,9 @@ void wxListMainWindow::InsertItem( wxListItem &item )
|
||||
else if (m_mode & wxLC_LIST) mode = wxLC_LIST;
|
||||
else if (m_mode & wxLC_ICON) mode = wxLC_ICON;
|
||||
else if (m_mode & wxLC_SMALL_ICON) mode = wxLC_ICON; // no typo
|
||||
|
||||
|
||||
wxListLineData *line = new wxListLineData( this, mode, m_hilightBrush );
|
||||
|
||||
|
||||
if (m_mode & wxLC_REPORT)
|
||||
{
|
||||
line->InitItems( GetColumnCount() );
|
||||
@ -2378,7 +2378,7 @@ void wxListMainWindow::InsertItem( wxListItem &item )
|
||||
{
|
||||
line->InitItems( 1 );
|
||||
}
|
||||
|
||||
|
||||
line->SetItem( 0, item );
|
||||
if ((item.m_itemId >= 0) && (item.m_itemId < (int)m_lines.GetCount()))
|
||||
{
|
||||
@ -2414,7 +2414,7 @@ void wxListMainWindow::InsertColumn( long col, wxListItem &item )
|
||||
wxListCtrlCompare list_ctrl_compare_func_2;
|
||||
long list_ctrl_compare_data;
|
||||
|
||||
int list_ctrl_compare_func_1( const void *arg1, const void *arg2 )
|
||||
int LINKAGEMODE list_ctrl_compare_func_1( const void *arg1, const void *arg2 )
|
||||
{
|
||||
wxListLineData *line1 = *((wxListLineData**)arg1);
|
||||
wxListLineData *line2 = *((wxListLineData**)arg2);
|
||||
@ -2520,7 +2520,7 @@ bool wxListCtrl::Create( wxWindow *parent, wxWindowID id,
|
||||
#if wxUSE_VALIDATORS
|
||||
SetValidator( validator );
|
||||
#endif
|
||||
|
||||
|
||||
if (s & wxSUNKEN_BORDER) s -= wxSUNKEN_BORDER;
|
||||
|
||||
m_mainWin = new wxListMainWindow( this, -1, wxPoint(0,0), size, s );
|
||||
@ -2583,18 +2583,18 @@ void wxListCtrl::SetWindowStyleFlag( long flag )
|
||||
{
|
||||
if (!m_headerWin)
|
||||
{
|
||||
m_headerWin = new wxListHeaderWindow( this, -1, m_mainWin,
|
||||
m_headerWin = new wxListHeaderWindow( this, -1, m_mainWin,
|
||||
wxPoint(0,0), wxSize(width,23), wxTAB_TRAVERSAL );
|
||||
if (HasFlag(wxLC_NO_HEADER))
|
||||
m_headerWin->Show( FALSE );
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
if (flag & wxLC_NO_HEADER)
|
||||
m_headerWin->Show( FALSE );
|
||||
else
|
||||
m_headerWin->Show( TRUE );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -2605,7 +2605,7 @@ void wxListCtrl::SetWindowStyleFlag( long flag )
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
wxWindow::SetWindowStyleFlag( flag );
|
||||
}
|
||||
|
||||
@ -2999,7 +2999,7 @@ bool wxListCtrl::SetBackgroundColour( const wxColour &colour )
|
||||
m_mainWin->SetBackgroundColour( colour );
|
||||
m_mainWin->m_dirty = TRUE;
|
||||
}
|
||||
|
||||
|
||||
if (m_headerWin)
|
||||
{
|
||||
// m_headerWin->SetBackgroundColour( colour );
|
||||
@ -3012,13 +3012,13 @@ bool wxListCtrl::SetForegroundColour( const wxColour &colour )
|
||||
{
|
||||
if ( !wxWindow::SetForegroundColour( colour ) )
|
||||
return FALSE;
|
||||
|
||||
|
||||
if (m_mainWin)
|
||||
{
|
||||
m_mainWin->SetForegroundColour( colour );
|
||||
m_mainWin->m_dirty = TRUE;
|
||||
}
|
||||
|
||||
|
||||
if (m_headerWin)
|
||||
{
|
||||
m_headerWin->SetForegroundColour( colour );
|
||||
@ -3031,13 +3031,13 @@ bool wxListCtrl::SetFont( const wxFont &font )
|
||||
{
|
||||
if ( !wxWindow::SetFont( font ) )
|
||||
return FALSE;
|
||||
|
||||
|
||||
if (m_mainWin)
|
||||
{
|
||||
m_mainWin->SetFont( font );
|
||||
m_mainWin->m_dirty = TRUE;
|
||||
}
|
||||
|
||||
|
||||
if (m_headerWin)
|
||||
{
|
||||
m_headerWin->SetFont( font );
|
||||
|
@ -963,7 +963,7 @@ void wxTreeCtrl::Expand(const wxTreeItemId& itemId)
|
||||
wxTreeEvent event( wxEVT_COMMAND_TREE_ITEM_EXPANDING, GetId() );
|
||||
event.m_item = item;
|
||||
event.SetEventObject( this );
|
||||
|
||||
|
||||
// if ( ProcessEvent( event ) && event.m_code ) TODO: Was this a typo ?
|
||||
if ( ProcessEvent( event ) && !event.IsAllowed() )
|
||||
{
|
||||
@ -1285,7 +1285,7 @@ void wxTreeCtrl::ScrollTo(const wxTreeItemId &item)
|
||||
// FIXME: tree sorting functions are not reentrant and not MT-safe!
|
||||
static wxTreeCtrl *s_treeBeingSorted = NULL;
|
||||
|
||||
static int tree_ctrl_compare_func(wxGenericTreeItem **item1,
|
||||
static int LINKAGEMODE tree_ctrl_compare_func(wxGenericTreeItem **item1,
|
||||
wxGenericTreeItem **item2)
|
||||
{
|
||||
wxCHECK_MSG( s_treeBeingSorted, 0, wxT("bug in wxTreeCtrl::SortChildren()") );
|
||||
@ -1939,7 +1939,7 @@ void wxTreeCtrl::OnMouse( wxMouseEvent &event )
|
||||
|
||||
if (item == NULL) return; /* we hit the blank area */
|
||||
|
||||
if (event.RightDown()) {
|
||||
if (event.RightDown()) {
|
||||
wxTreeEvent nevent(wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK,GetId());
|
||||
nevent.m_item=item;
|
||||
nevent.m_code=0;
|
||||
|
@ -436,8 +436,6 @@ bool wxGetClipboardFormatName(wxDataFormat dataFormat,
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxClipboard, wxObject)
|
||||
|
||||
wxClipboard* wxTheClipboard = (wxClipboard *)NULL;
|
||||
|
||||
wxClipboard::wxClipboard()
|
||||
{
|
||||
}
|
||||
|
@ -81,6 +81,16 @@ bool wxDropTarget::OnData(
|
||||
return FALSE;
|
||||
};
|
||||
|
||||
wxDragResult wxDropTarget::OnData(
|
||||
wxCoord x
|
||||
, wxCoord y
|
||||
, wxDragResult vResult
|
||||
)
|
||||
{
|
||||
//TODO:
|
||||
return (wxDragResult)0;
|
||||
};
|
||||
|
||||
bool wxDropTarget::GetData()
|
||||
{
|
||||
//TODO:
|
||||
@ -99,11 +109,6 @@ bool wxDropTarget::IsAcceptable(
|
||||
// wxTextDropTarget
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxTextDropTarget::wxTextDropTarget()
|
||||
{
|
||||
// TODO:
|
||||
}
|
||||
|
||||
wxTextDropTarget::~wxTextDropTarget()
|
||||
{
|
||||
// TODO:
|
||||
@ -122,11 +127,6 @@ bool wxTextDropTarget::OnData(
|
||||
// wxFileDropTarget
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxFileDropTarget::wxFileDropTarget()
|
||||
{
|
||||
// TODO:
|
||||
}
|
||||
|
||||
wxFileDropTarget::~wxFileDropTarget()
|
||||
{
|
||||
// TODO:
|
||||
|
@ -51,7 +51,9 @@ bool wxFrame::m_useNativeStatusBar = FALSE;
|
||||
|
||||
wxFrame::wxFrame()
|
||||
{
|
||||
#if wxUSE_TOOLBAR
|
||||
m_frameToolBar = NULL ;
|
||||
#endif
|
||||
m_frameMenuBar = NULL;
|
||||
m_frameStatusBar = NULL;
|
||||
|
||||
@ -74,7 +76,9 @@ bool wxFrame::Create( wxWindow *parent
|
||||
SetName(name);
|
||||
m_windowStyle = style;
|
||||
m_frameMenuBar = NULL;
|
||||
#if wxUSE_TOOLBAR
|
||||
m_frameToolBar = NULL ;
|
||||
#endif
|
||||
m_frameStatusBar = NULL;
|
||||
|
||||
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE));
|
||||
@ -666,6 +670,7 @@ bool wxFrame::ProcessCommand(int id)
|
||||
wxPoint wxFrame::GetClientAreaOrigin() const
|
||||
{
|
||||
wxPoint pt(0, 0);
|
||||
#if wxUSE_TOOLBAR
|
||||
if (GetToolBar())
|
||||
{
|
||||
int w, h;
|
||||
@ -680,6 +685,7 @@ wxPoint wxFrame::GetClientAreaOrigin() const
|
||||
pt.y += h;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return pt;
|
||||
}
|
||||
|
||||
@ -905,7 +911,9 @@ bool wxFrame::HandleSize(int x, int y, WXUINT id)
|
||||
if ( !m_iconized )
|
||||
{
|
||||
PositionStatusBar();
|
||||
#if wxUSE_TOOLBAR
|
||||
PositionToolBar();
|
||||
#endif
|
||||
|
||||
wxSizeEvent event(wxSize(x, y), m_windowId);
|
||||
event.SetEventObject( this );
|
||||
|
@ -88,7 +88,6 @@ GENERICOBJS= \
|
||||
..\generic\$D\colrdlgg.obj \
|
||||
..\generic\$D\dcpsg.obj \
|
||||
..\generic\$D\grid.obj \
|
||||
..\generic\$D\gridg.obj \
|
||||
..\generic\$D\helpext.obj \
|
||||
..\generic\$D\helphtml.obj \
|
||||
..\generic\$D\helpwxht.obj \
|
||||
@ -114,6 +113,7 @@ GENERICOBJS= \
|
||||
..\generic\$D\treectrl.obj \
|
||||
..\generic\$D\tipdlg.obj
|
||||
|
||||
# ..\generic\$D\gridg.obj \
|
||||
# ..\generic\$D\notebook.obj \
|
||||
|
||||
GENLIBOBJS= \
|
||||
@ -123,7 +123,6 @@ GENLIBOBJS= \
|
||||
colrdlgg.obj \
|
||||
dcpsg.obj \
|
||||
grid.obj \
|
||||
gridg.obj \
|
||||
helpext.obj \
|
||||
helphtml.obj \
|
||||
helpwxht.obj \
|
||||
@ -462,22 +461,20 @@ OS2LIBOBJS1 = \
|
||||
gsocket.obj \
|
||||
helpwin.obj \
|
||||
icon.obj \
|
||||
imaglist.obj \
|
||||
iniconf.obj \
|
||||
joystick.obj \
|
||||
listbox.obj \
|
||||
listctrl.obj \
|
||||
main.obj \
|
||||
mdi.obj \
|
||||
menu.obj \
|
||||
menuitem.obj \
|
||||
metafile.obj \
|
||||
minifram.obj \
|
||||
msgdlg.obj
|
||||
msgdlg.obj \
|
||||
nativdlg.obj \
|
||||
notebook.obj
|
||||
|
||||
OS2LIBOBJS2 = \
|
||||
nativdlg.obj \
|
||||
notebook.obj \
|
||||
ownerdrw.obj \
|
||||
palette.obj \
|
||||
pen.obj \
|
||||
@ -495,15 +492,13 @@ OS2LIBOBJS2 = \
|
||||
statbox.obj \
|
||||
stattext.obj \
|
||||
statline.obj \
|
||||
statbrpm.obj \
|
||||
tabctrl.obj \
|
||||
taskbar.obj \
|
||||
textctrl.obj \
|
||||
thread.obj \
|
||||
timer.obj \
|
||||
toolbar.obj \
|
||||
# toolbar.obj \
|
||||
tooltip.obj \
|
||||
treectrl.obj \
|
||||
utils.obj \
|
||||
utilsexc.obj \
|
||||
wave.obj \
|
||||
@ -663,7 +658,6 @@ $(GENLIBOBJS):
|
||||
copy ..\generic\$D\colrdlgg.obj
|
||||
copy ..\generic\$D\dcpsg.obj
|
||||
copy ..\generic\$D\grid.obj
|
||||
copy ..\generic\$D\gridg.obj
|
||||
copy ..\generic\$D\helpext.obj
|
||||
copy ..\generic\$D\helphtml.obj
|
||||
copy ..\generic\$D\helpwxht.obj
|
||||
@ -723,11 +717,9 @@ $(OS2LIBOBJS1):
|
||||
copy ..\os2\$D\gsocket.obj
|
||||
copy ..\os2\$D\helpwin.obj
|
||||
copy ..\os2\$D\icon.obj
|
||||
copy ..\os2\$D\imaglist.obj
|
||||
copy ..\os2\$D\iniconf.obj
|
||||
copy ..\os2\$D\joystick.obj
|
||||
copy ..\os2\$D\listbox.obj
|
||||
copy ..\os2\$D\listctrl.obj
|
||||
copy ..\os2\$D\main.obj
|
||||
copy ..\os2\$D\mdi.obj
|
||||
copy ..\os2\$D\menu.obj
|
||||
@ -735,10 +727,10 @@ $(OS2LIBOBJS1):
|
||||
copy ..\os2\$D\metafile.obj
|
||||
copy ..\os2\$D\minifram.obj
|
||||
copy ..\os2\$D\msgdlg.obj
|
||||
|
||||
$(OS2LIBOBJS2):
|
||||
copy ..\os2\$D\nativdlg.obj
|
||||
copy ..\os2\$D\notebook.obj
|
||||
|
||||
$(OS2LIBOBJS2):
|
||||
copy ..\os2\$D\ownerdrw.obj
|
||||
copy ..\os2\$D\palette.obj
|
||||
copy ..\os2\$D\pen.obj
|
||||
@ -756,15 +748,13 @@ $(OS2LIBOBJS2):
|
||||
copy ..\os2\$D\statbox.obj
|
||||
copy ..\os2\$D\statline.obj
|
||||
copy ..\os2\$D\stattext.obj
|
||||
copy ..\os2\$D\statbrpm.obj
|
||||
copy ..\os2\$D\tabctrl.obj
|
||||
copy ..\os2\$D\taskbar.obj
|
||||
copy ..\os2\$D\textctrl.obj
|
||||
copy ..\os2\$D\thread.obj
|
||||
copy ..\os2\$D\timer.obj
|
||||
copy ..\os2\$D\toolbar.obj
|
||||
# copy ..\os2\$D\toolbar.obj
|
||||
copy ..\os2\$D\tooltip.obj
|
||||
copy ..\os2\$D\treectrl.obj
|
||||
copy ..\os2\$D\utils.obj
|
||||
copy ..\os2\$D\utilsexc.obj
|
||||
copy ..\os2\$D\wave.obj
|
||||
|
@ -24,6 +24,9 @@
|
||||
|
||||
#include "assert.h"
|
||||
|
||||
#if !USE_SHARED_LIBRARIES
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPalette, wxGDIObject)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Palette
|
||||
|
@ -24,6 +24,10 @@
|
||||
#include "wx/os2/private.h"
|
||||
#include "assert.h"
|
||||
|
||||
#if !USE_SHARED_LIBRARIES
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPen, wxGDIObject)
|
||||
#endif
|
||||
|
||||
wxPenRefData::wxPenRefData()
|
||||
{
|
||||
m_style = wxSOLID;
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxBitmapRadioButton, wxRadioButton)
|
||||
#endif
|
||||
|
||||
bool wxRadioButton::OS2Command(WXUINT param, WXWORD id)
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "wx/os2/tabctrl.h"
|
||||
#include "wx/app.h"
|
||||
#include "wx/os2/private.h"
|
||||
#include "wx/os2/imaglist.h"
|
||||
#include "wx/generic/imaglist.h"
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxTabCtrl, wxControl)
|
||||
|
@ -65,17 +65,17 @@ bool wxGetHostName(
|
||||
#if wxUSE_NET_API
|
||||
char zServer[256];
|
||||
char zComputer[256];
|
||||
unsigned long ulLevel;
|
||||
unsigned short nLevel = 0;
|
||||
unsigned char* zBuffer;
|
||||
unsigned long ulBuffer;
|
||||
unsigned long* pulTotalAvail;
|
||||
unsigned short nBuffer;
|
||||
unsigned short* pnTotalAvail;
|
||||
|
||||
NetBiosGetInfo( (const unsigned char*)zServer
|
||||
,(const unsigned char*)zComputer
|
||||
,ulLevel
|
||||
,nLevel
|
||||
,zBuffer
|
||||
,ulBuffer
|
||||
,pulTotalAvail
|
||||
,nBuffer
|
||||
,pnTotalAvail
|
||||
);
|
||||
strcpy(zBuf, zServer);
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user