--without-optimise Do not optimise the code.
- --with-profile Add profiling info to the
- object files. Currently
- broken.
+ --with-profile Add profiling info to the object
+ files. Currently broken, I think.
- --with-mem_tracing Add built-in memory tracing.
+ --with-mem_tracing Add built-in memory tracing.
+ This doesn't work well with gcc.
- --with-debug_info Add debug info to object
- files.
+ --with-dmalloc Use the dmalloc memory debugger.
+ Read more at www.letters.com/dmalloc/
+
+ --with-debug_info Add debug info to object files and
+ executables.
--with-debug_flag Define __DEBUG__ and __WXDEBUG__ when
compiling.
#include "bitmaps/save.xpm"
#include "bitmaps/copy.xpm"
#include "bitmaps/cut.xpm"
-// #include "bitmaps/paste.xpm"
+#include "bitmaps/paste.xpm"
#include "bitmaps/print.xpm"
-#include "bitmaps/preview.xpm"
#include "bitmaps/help.xpm"
#endif
bitmaps[2] = new wxBitmap( save_xpm );
bitmaps[3] = new wxBitmap( copy_xpm );
bitmaps[4] = new wxBitmap( cut_xpm );
-// bitmaps[5] = new wxBitmap( paste_xpm );
- bitmaps[5] = new wxBitmap( preview_xpm );
+ bitmaps[5] = new wxBitmap( paste_xpm );
bitmaps[6] = new wxBitmap( print_xpm );
bitmaps[7] = new wxBitmap( help_xpm );
#endif
#endif
int currentX = 5;
- toolBar->AddTool(0, *bitmaps[0], wxNullBitmap, FALSE, currentX, -1, NULL, "New file");
+ toolBar->AddTool(0, *(bitmaps[0]), wxNullBitmap, FALSE, currentX, -1, NULL, "New file");
currentX += width + 5;
toolBar->AddTool(1, *bitmaps[1], wxNullBitmap, FALSE, currentX, -1, NULL, "Open file");
currentX += width + 5;
void wxExit(void)
{
gtk_main_quit();
-};
+}
bool wxYield(void)
{
while (gtk_events_pending() > 0) gtk_main_iteration();
return TRUE;
-};
+}
//-----------------------------------------------------------------------------
// wxApp
gint wxapp_idle_callback( gpointer WXUNUSED(data) )
{
- if (wxTheApp) while (wxTheApp->ProcessIdle()) {};
+ if (wxTheApp) while (wxTheApp->ProcessIdle()) {}
usleep( 10000 );
return TRUE;
-};
+}
wxApp::wxApp()
{
m_idleTag = 0;
m_topWindow = NULL;
m_exitOnFrameDelete = TRUE;
-};
+}
wxApp::~wxApp(void)
{
gtk_idle_remove( m_idleTag );
-};
+}
bool wxApp::OnInit(void)
{
return TRUE;
-};
+}
bool wxApp::OnInitGui(void)
{
m_idleTag = gtk_idle_add( wxapp_idle_callback, NULL );
return TRUE;
-};
+}
int wxApp::OnRun(void)
{
return MainLoop();
-};
+}
bool wxApp::ProcessIdle(void)
{
ProcessEvent( event );
return event.MoreRequested();
-};
+}
void wxApp::OnIdle( wxIdleEvent &event )
{
event.RequestMore(TRUE);
inOnIdle = FALSE;
-};
+}
bool wxApp::SendIdleEvents(void)
{
node = node->Next();
}
return needMore;
-};
+}
bool wxApp::SendIdleEvents( wxWindow* win )
{
node = node->Next();
}
return needMore ;
-};
+}
int wxApp::OnExit(void)
{
return 0;
-};
+}
int wxApp::MainLoop(void)
{
gtk_main();
return 0;
-};
+}
void wxApp::ExitMainLoop(void)
{
gtk_main_quit();
-};
+}
bool wxApp::Initialized(void)
{
return m_initialized;
-};
+}
bool wxApp::Pending(void)
{
return FALSE;
-};
+}
void wxApp::Dispatch(void)
{
-};
+}
void wxApp::DeletePendingObjects(void)
{
delete node;
node = wxPendingDelete.First();
- };
-};
+ }
+}
wxWindow *wxApp::GetTopWindow(void)
{
wxNode *node = wxTopLevelWindows.First();
if (!node) return NULL;
return (wxWindow*)node->Data();
-};
+}
void wxApp::SetTopWindow( wxWindow *win )
{
m_topWindow = win;
-};
+}
void wxApp::CommonInit(void)
{
g_globalCursor = new wxCursor;
*/
-};
+}
void wxApp::CommonCleanUp(void)
{
wxCleanUpResourceSystem();
wxSystemSettings::Done();
-};
+}
wxLog *wxApp::CreateLogTarget()
{
{
printf( _("wxWindows error: No initializer - use IMPLEMENT_APP macro.\n") );
return 0;
- };
+ }
wxAppInitializerFunction app_ini = wxApp::GetInitializerFunction();
wxObject *test_app = app_ini();
wxTheApp = (wxApp*) test_app;
- };
+ }
if (!wxTheApp)
{
printf( _("wxWindows error: wxTheApp == NULL\n") );
return 0;
- };
+ }
wxTheApp->argc = argc;
wxTheApp->argv = argv;
#endif
return retValue;
-};
+}
//-----------------------------------------------------------------------------
// main()
wxMask::wxMask(void)
{
m_bitmap = NULL;
-};
+}
wxMask::wxMask( const wxBitmap& WXUNUSED(bitmap), const wxColour& WXUNUSED(colour) )
{
-};
+}
wxMask::wxMask( const wxBitmap& WXUNUSED(bitmap), int WXUNUSED(paletteIndex) )
{
-};
+}
wxMask::wxMask( const wxBitmap& WXUNUSED(bitmap) )
{
-};
+}
wxMask::~wxMask(void)
{
#else
if (m_bitmap) gdk_bitmap_unref( m_bitmap );
#endif
-};
+}
GdkBitmap *wxMask::GetBitmap(void) const
{
return m_bitmap;
-};
+}
//-----------------------------------------------------------------------------
// wxBitmap
#ifdef USE_GDK_IMLIB
m_image = NULL;
#endif
-};
+}
wxBitmapRefData::~wxBitmapRefData(void)
{
if (m_bitmap) gdk_bitmap_unref( m_bitmap );
if (m_mask) delete m_mask;
if (m_palette) delete m_palette;
-};
+}
//-----------------------------------------------------------------------------
wxBitmap::wxBitmap(void)
{
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
-};
+}
wxBitmap::wxBitmap( int width, int height, int depth )
{
M_BMPDATA->m_bpp = depth;
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
-};
+}
wxBitmap::wxBitmap( char **bits )
{
{
M_BMPDATA->m_mask = new wxMask();
M_BMPDATA->m_mask->m_bitmap = mask;
- };
+ }
gdk_window_get_size( M_BMPDATA->m_pixmap, &(M_BMPDATA->m_width), &(M_BMPDATA->m_height) );
M_BMPDATA->m_bpp = 24; // ?
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
-};
+}
wxBitmap::wxBitmap( const wxBitmap& bmp )
{
Ref( bmp );
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
-};
+}
wxBitmap::wxBitmap( const wxBitmap* bmp )
{
if (bmp) Ref( *bmp );
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
-};
+}
wxBitmap::wxBitmap( const wxString &filename, int type )
{
LoadFile( filename, type );
-};
+
+ if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
+}
// CMB 15/5/98: add constructor for xbm bitmaps
wxBitmap::wxBitmap( const char bits[], int width, int height, int WXUNUSED(depth))
wxBitmap::~wxBitmap(void)
{
if (wxTheBitmapList) wxTheBitmapList->DeleteObject(this);
-};
+}
wxBitmap& wxBitmap::operator = ( const wxBitmap& bmp )
{
if (*this == bmp) return (*this);
Ref( bmp );
return *this;
-};
+}
bool wxBitmap::operator == ( const wxBitmap& bmp )
{
return m_refData == bmp.m_refData;
-};
+}
bool wxBitmap::operator != ( const wxBitmap& bmp )
{
return m_refData != bmp.m_refData;
-};
+}
bool wxBitmap::Ok(void) const
{
return m_refData != NULL;
-};
+}
int wxBitmap::GetHeight(void) const
{
if (!Ok()) return 0;
return M_BMPDATA->m_height;
-};
+}
int wxBitmap::GetWidth(void) const
{
if (!Ok()) return 0;
return M_BMPDATA->m_width;
-};
+}
int wxBitmap::GetDepth(void) const
{
if (!Ok()) return 0;
return M_BMPDATA->m_bpp;
-};
+}
void wxBitmap::SetHeight( int height )
{
if (!Ok()) return;
M_BMPDATA->m_height = height;
-};
+}
void wxBitmap::SetWidth( int width )
{
if (!Ok()) return;
M_BMPDATA->m_width = width;
-};
+}
void wxBitmap::SetDepth( int depth )
{
if (!Ok()) return;
M_BMPDATA->m_bpp = depth;
-};
+}
wxMask *wxBitmap::GetMask(void) const
{
if (!Ok()) return NULL;
return M_BMPDATA->m_mask;
-};
+}
void wxBitmap::SetMask( wxMask *mask )
{
if (M_BMPDATA->m_mask) delete M_BMPDATA->m_mask;
M_BMPDATA->m_mask = mask;
-};
+}
void wxBitmap::Resize( int height, int width )
{
Render();
#endif
-};
+}
bool wxBitmap::SaveFile( const wxString &name, int WXUNUSED(type),
wxPalette *WXUNUSED(palette) )
#endif
return FALSE;
-};
+}
bool wxBitmap::LoadFile( const wxString &name, int WXUNUSED(type) )
{
{
UnRef();
return FALSE;
- };
+ }
Render();
#endif
return FALSE;
-};
+}
wxPalette *wxBitmap::GetPalette(void) const
{
if (!Ok()) return NULL;
return M_BMPDATA->m_palette;
-};
+}
GdkPixmap *wxBitmap::GetPixmap(void) const
{
if (!Ok()) return NULL;
return M_BMPDATA->m_pixmap;
-};
+}
GdkBitmap *wxBitmap::GetBitmap(void) const
{
if (!Ok()) return NULL;
return M_BMPDATA->m_bitmap;
-};
+}
void wxBitmap::DestroyImage(void)
{
{
gdk_imlib_destroy_image( M_BMPDATA->m_image );
M_BMPDATA->m_image = NULL;
- };
-};
+ }
+}
void wxBitmap::RecreateImage(void)
{
-};
+}
void wxBitmap::Render(void)
{
{
M_BMPDATA->m_mask = new wxMask();
M_BMPDATA->m_mask->m_bitmap = mask;
- };
+ }
#endif
-};
+}
wxBrushRefData::wxBrushRefData(void)
{
m_style = 0;
-};
+}
//-----------------------------------------------------------------------------
wxBrush::wxBrush(void)
{
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
-};
+}
wxBrush::wxBrush( const wxColour &colour, int style )
{
M_BRUSHDATA->m_colour = colour;
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
-};
+}
wxBrush::wxBrush( const wxString &colourName, int style )
{
M_BRUSHDATA->m_colour = colourName;
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
-};
+}
wxBrush::wxBrush( const wxBitmap &stippleBitmap )
{
M_BRUSHDATA->m_stipple = stippleBitmap;
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
-};
+}
wxBrush::wxBrush( const wxBrush &brush )
{
Ref( brush );
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
-};
+}
wxBrush::wxBrush( const wxBrush *brush )
{
if (brush) Ref( *brush );
if (wxTheBrushList) wxTheBrushList->Append( this );
-};
+}
wxBrush::~wxBrush(void)
{
if (wxTheBrushList) wxTheBrushList->RemoveBrush( this );
-};
+}
wxBrush& wxBrush::operator = ( const wxBrush& brush )
{
if (*this == brush) return (*this);
Ref( brush );
return *this;
-};
+}
bool wxBrush::operator == ( const wxBrush& brush )
{
return m_refData == brush.m_refData;
-};
+}
bool wxBrush::operator != ( const wxBrush& brush )
{
return m_refData != brush.m_refData;
-};
+}
bool wxBrush::Ok(void) const
{
return ((m_refData) && M_BRUSHDATA->m_colour.Ok());
-};
+}
int wxBrush::GetStyle(void) const
{
return M_BRUSHDATA->m_style;
-};
+}
wxColour &wxBrush::GetColour(void) const
{
return M_BRUSHDATA->m_colour;
-};
+}
wxBitmap *wxBrush::GetStipple(void) const
{
return &M_BRUSHDATA->m_stipple;
-};
+}
m_color.pixel = 0;
m_colormap = NULL;
m_hasPixel = FALSE;
-};
+}
wxColourRefData::~wxColourRefData(void)
{
FreeColour();
-};
+}
void wxColourRefData::FreeColour(void)
{
// if (m_hasPixel) gdk_colors_free( m_colormap, &m_color, 1, 0 );
-};
+}
//-----------------------------------------------------------------------------
wxColour::wxColour(void)
{
-};
+}
wxColour::wxColour( char red, char green, char blue )
{
M_COLDATA->m_color.green = ((unsigned short)green) << SHIFT;
M_COLDATA->m_color.blue = ((unsigned short)blue) << SHIFT;
M_COLDATA->m_color.pixel = 0;
-};
+}
wxColour::wxColour( const wxString &colourName )
{
wxFAIL_MSG( "wxColour: couldn't find colour" );
delete m_refData;
m_refData = NULL;
- };
- };
-};
+ }
+ }
+}
wxColour::wxColour( const wxColour& col )
{
Ref( col );
-};
+}
wxColour::wxColour( const wxColour* col )
{
if (col) Ref( *col );
-};
+}
wxColour::~wxColour(void)
{
-};
+}
wxColour& wxColour::operator = ( const wxColour& col )
{
if (*this == col) return (*this);
Ref( col );
return *this;
-};
+}
wxColour& wxColour::operator = ( const wxString& colourName )
{
wxFAIL_MSG( "wxColour: couldn't find colour" );
delete m_refData;
m_refData = NULL;
- };
- };
+ }
+ }
return *this;
-};
+}
bool wxColour::operator == ( const wxColour& col )
{
return m_refData == col.m_refData;
-};
+}
bool wxColour::operator != ( const wxColour& col)
{
return m_refData != col.m_refData;
-};
+}
void wxColour::Set( const unsigned char red, const unsigned char green, const unsigned char blue )
{
M_COLDATA->m_color.green = ((unsigned short)green) << SHIFT;
M_COLDATA->m_color.blue = ((unsigned short)blue) << SHIFT;
M_COLDATA->m_color.pixel = 0;
-};
+}
unsigned char wxColour::Red(void) const
{
if (!Ok()) return 0;
return (unsigned char)(M_COLDATA->m_color.red >> SHIFT);
-};
+}
unsigned char wxColour::Green(void) const
{
if (!Ok()) return 0;
return (unsigned char)(M_COLDATA->m_color.green >> SHIFT);
-};
+}
unsigned char wxColour::Blue(void) const
{
if (!Ok()) return 0;
return (unsigned char)(M_COLDATA->m_color.blue >> SHIFT);
-};
+}
bool wxColour::Ok(void) const
{
return (m_refData);
-};
+}
void wxColour::CalcPixel( GdkColormap *cmap )
{
#endif
M_COLDATA->m_colormap = cmap;
-};
+}
int wxColour::GetPixel(void)
{
if (!Ok()) return 0;
return M_COLDATA->m_color.pixel;
-};
+}
GdkColor *wxColour::GetColor(void)
{
if (!Ok()) return NULL;
return &M_COLDATA->m_color;
-};
+}
wxCursorRefData::wxCursorRefData(void)
{
m_cursor = NULL;
-};
+}
wxCursorRefData::~wxCursorRefData(void)
{
if (m_cursor) gdk_cursor_destroy( m_cursor );
-};
+}
//-----------------------------------------------------------------------------
wxCursor::wxCursor(void)
{
-};
+}
wxCursor::wxCursor( int cursorId )
{
case wxCURSOR_IBEAM: gdk_cur = GDK_XTERM; break;
case wxCURSOR_PENCIL: gdk_cur = GDK_PENCIL; break;
case wxCURSOR_NO_ENTRY: gdk_cur = GDK_PIRATE; break;
- };
+ }
M_CURSORDATA->m_cursor = gdk_cursor_new( gdk_cur );
wxCURSOR_BASED_ARROW_DOWN
*/
-};
+}
wxCursor::wxCursor( const wxCursor &cursor )
{
Ref( cursor );
-};
+}
wxCursor::wxCursor( const wxCursor *cursor )
{
UnRef();
if (cursor) Ref( *cursor );
-};
+}
wxCursor::~wxCursor(void)
{
-};
+}
wxCursor& wxCursor::operator = ( const wxCursor& cursor )
{
if (*this == cursor) return (*this);
Ref( cursor );
return *this;
-};
+}
bool wxCursor::operator == ( const wxCursor& cursor )
{
return m_refData == cursor.m_refData;
-};
+}
bool wxCursor::operator != ( const wxCursor& cursor )
{
return m_refData != cursor.m_refData;
-};
+}
bool wxCursor::Ok(void) const
{
return TRUE;
-};
+}
GdkCursor *wxCursor::GetCursor(void) const
{
return M_CURSORDATA->m_cursor;
-};
+}
//-----------------------------------------------------------------------------
// busy cursor routines
void wxEndBusyCursor(void)
{
g_isBusy = FALSE;
-};
+}
void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) )
{
g_isBusy = TRUE;
-};
+}
bool wxIsBusy(void)
{
return g_isBusy;
-};
+}
void wxSetCursor( const wxCursor& cursor )
{
extern wxCursor *g_globalCursor;
if (g_globalCursor) (*g_globalCursor) = cursor;
- if (cursor.Ok()) {};
-};
+ if (cursor.Ok()) {}
+}
m_backgroundBrush = *wxWHITE_BRUSH;
// m_palette = wxAPP_COLOURMAP;
-};
+}
wxDC::~wxDC(void)
{
-};
+}
void wxDC::DrawArc( long WXUNUSED(x1), long WXUNUSED(y1), long WXUNUSED(x2), long WXUNUSED(y2),
double WXUNUSED(xc), double WXUNUSED(yc) )
{
-};
+}
void wxDC::DrawIcon( const wxIcon &WXUNUSED(icon), long WXUNUSED(x), long WXUNUSED(y), bool WXUNUSED(useMask) )
{
-};
+}
void wxDC::DrawPoint( wxPoint& point )
{
DrawPoint( point.x, point.y );
-};
+}
void wxDC::DrawPolygon( wxList *list, long xoffset, long yoffset, int fillStyle )
{
wxPoint *point = (wxPoint *)node->Data();
points[i].x = point->x;
points[i++].y = point->y;
- };
+ }
DrawPolygon( n, points, xoffset, yoffset, fillStyle );
delete[] points;
-};
+}
void wxDC::DrawLines( wxList *list, long xoffset, long yoffset )
{
wxPoint *point = (wxPoint *)node->Data();
points[i].x = point->x;
points[i++].y = point->y;
- };
+ }
DrawLines( n, points, xoffset, yoffset );
delete []points;
-};
+}
void wxDC::DrawSpline( long x1, long y1, long x2, long y2, long x3, long y3 )
{
wxPoint *p = (wxPoint*)node->Data();
delete p;
node = node->Next();
- };
-};
+ }
+}
void wxDC::DrawSpline( wxList *points )
{
DrawOpenSpline( points );
-};
+}
void wxDC::DrawSpline( int n, wxPoint points[] )
{
wxList list;
for (int i = 0; i < n; i++) list.Append( (wxObject*)&points[i] );
DrawSpline( &list );
-};
+}
void wxDC::SetClippingRegion( long x, long y, long width, long height )
{
m_clipY1 = y;
m_clipX2 = x + width;
m_clipY2 = y + height;
-};
+}
void wxDC::DestroyClippingRegion(void)
{
m_clipping = FALSE;
-};
+}
void wxDC::GetClippingBox( long *x, long *y, long *width, long *height ) const
{
}
else
*x = *y = *width = *height = 0;
-};
+}
void wxDC::GetSize( int* width, int* height ) const
{
*width = m_maxX-m_minX;
*height = m_maxY-m_minY;
-};
+}
void wxDC::GetSizeMM( long* width, long* height ) const
{
GetSize( &w, &h );
*width = long( double(w) / (m_scaleX*m_mm_to_pix_x) );
*height = long( double(h) / (m_scaleY*m_mm_to_pix_y) );
-};
+}
void wxDC::SetTextForeground( const wxColour &col )
{
if (!Ok()) return;
m_textForegroundColour = col;
-};
+}
void wxDC::SetTextBackground( const wxColour &col )
{
if (!Ok()) return;
m_textBackgroundColour = col;
-};
+}
void wxDC::SetMapMode( int mode )
{
case MM_TEXT:
SetLogicalScale( 1.0, 1.0 );
break;
- };
+ }
if (mode != MM_TEXT)
{
m_needComputeScaleX = TRUE;
m_needComputeScaleY = TRUE;
- };
-};
+ }
+}
void wxDC::SetUserScale( double x, double y )
{
m_userScaleX = x;
m_userScaleY = y;
ComputeScaleAndOrigin();
-};
+}
void wxDC::GetUserScale( double *x, double *y )
{
if (x) *x = m_userScaleX;
if (y) *y = m_userScaleY;
-};
+}
void wxDC::SetLogicalScale( double x, double y )
{
m_logicalScaleX = x;
m_logicalScaleY = y;
ComputeScaleAndOrigin();
-};
+}
void wxDC::GetLogicalScale( double *x, double *y )
{
if (x) *x = m_logicalScaleX;
if (y) *y = m_logicalScaleY;
-};
+}
void wxDC::SetLogicalOrigin( long x, long y )
{
m_logicalOriginX = x * m_signX; // is this still correct ?
m_logicalOriginY = y * m_signY;
ComputeScaleAndOrigin();
-};
+}
void wxDC::GetLogicalOrigin( long *x, long *y )
{
if (x) *x = m_logicalOriginX;
if (y) *y = m_logicalOriginY;
-};
+}
void wxDC::SetDeviceOrigin( long x, long y )
{
m_deviceOriginX = x;
m_deviceOriginY = y;
ComputeScaleAndOrigin();
-};
+}
void wxDC::GetDeviceOrigin( long *x, long *y )
{
if (x) *x = m_deviceOriginX;
if (y) *y = m_deviceOriginY;
-};
+}
void wxDC::SetAxisOrientation( bool xLeftRight, bool yBottomUp )
{
m_signX = (xLeftRight ? 1 : -1);
m_signY = (yBottomUp ? -1 : 1);
ComputeScaleAndOrigin();
-};
+}
long wxDC::DeviceToLogicalX(long x) const
{
return XDEV2LOG(x);
-};
+}
long wxDC::DeviceToLogicalY(long y) const
{
return YDEV2LOG(y);
-};
+}
long wxDC::DeviceToLogicalXRel(long x) const
{
return XDEV2LOGREL(x);
-};
+}
long wxDC::DeviceToLogicalYRel(long y) const
{
return YDEV2LOGREL(y);
-};
+}
long wxDC::LogicalToDeviceX(long x) const
{
return XLOG2DEV(x);
-};
+}
long wxDC::LogicalToDeviceY(long y) const
{
return YLOG2DEV(y);
-};
+}
long wxDC::LogicalToDeviceXRel(long x) const
{
return XLOG2DEVREL(x);
-};
+}
long wxDC::LogicalToDeviceYRel(long y) const
{
return YLOG2DEVREL(y);
-};
+}
void wxDC::CalcBoundingBox( long x, long y )
{
if (y < m_minY) m_minY = y;
if (x > m_maxX) m_maxX = x;
if (y > m_maxY) m_maxY = y;
-};
+}
void wxDC::ComputeScaleAndOrigin(void)
{
m_pen = tempPen;
SetPen(pen);
}
-};
+}
{
m_ok = FALSE;
m_cmap = gdk_colormap_get_system();
-};
+}
wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) )
{
m_ok = FALSE;
m_cmap = gdk_colormap_get_system();
-};
+}
wxMemoryDC::~wxMemoryDC(void)
{
-};
+}
void wxMemoryDC::SelectObject( const wxBitmap& bitmap )
{
{
m_ok = FALSE;
m_window = NULL;
- };
-};
+ }
+}
void wxMemoryDC::GetSize( int *width, int *height ) const
{
{
if (width) (*width) = 0;
if (height) (*height) = 0;
- };
-};
+ }
+}
gdk_gc_set_subwindow( m_brushGC, GDK_INCLUDE_INFERIORS );
gdk_gc_set_subwindow( m_textGC, GDK_INCLUDE_INFERIORS );
gdk_gc_set_subwindow( m_bgGC, GDK_INCLUDE_INFERIORS );
-};
+}
wxScreenDC::~wxScreenDC(void)
{
EndDrawingOnTop();
-};
+}
bool wxScreenDC::StartDrawingOnTop( wxWindow *WXUNUSED(window) )
{
{
StartDrawingOnTop();
return;
- };
+ }
wxRectangle rect;
rect.x = 0;
rect.y = 0;
StartDrawingOnTop( &rect );
return TRUE;
*/
-};
+}
bool wxScreenDC::StartDrawingOnTop( wxRectangle *WXUNUSED(rect) )
{
y = rect->y;
width = rect->width;
height = rect->height;
- };
+ }
GTK cannot set transparent backgrounds. :-(
return TRUE;
*/
-};
+}
bool wxScreenDC::EndDrawingOnTop(void)
{
m_isOk = FALSE;
return TRUE;
*/
-};
+}
+
wxDropTarget::wxDropTarget()
{
-};
+}
wxDropTarget::~wxDropTarget()
{
-};
+}
void wxDropTarget::Drop( GdkEvent *event, int x, int y )
{
printf( "Drop data is of type %s.\n", event->dropdataavailable.data_type );
OnDrop( x, y, (char *)event->dropdataavailable.data);
-};
+}
void wxDropTarget::UnregisterWidget( GtkWidget *widget )
{
if (!widget) return;
gtk_widget_dnd_drop_set( widget, FALSE, NULL, 0, FALSE );
-};
+}
void wxDropTarget::RegisterWidget( GtkWidget *widget )
{
break;
default:
break;
- };
+ }
}
char *str = WXSTRINGCAST formats;
gtk_widget_dnd_drop_set( widget, TRUE, &str, valid, FALSE );
-};
+}
// ----------------------------------------------------------------------------
// wxTextDropTarget
{
OnDropText( x, y, (const char*)pData );
return TRUE;
-};
+}
bool wxTextDropTarget::OnDropText( long x, long y, const char *psz )
{
printf( "Got dropped text: %s.\n", psz );
printf( "At x: %d, y: %d.\n", (int)x, (int)y );
return TRUE;
-};
+}
size_t wxTextDropTarget::GetFormatCount() const
{
delete ptr;
source->m_retValue = wxDropSource::Copy;
-};
+}
wxDropSource::wxDropSource( wxWindow *win )
{
m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY );
m_goaheadCursor = wxCursor( wxCURSOR_HAND );
-};
+}
wxDropSource::wxDropSource( wxDataObject &data, wxWindow *win )
{
m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY );
m_goaheadCursor = wxCursor( wxCURSOR_HAND );
-};
+}
void wxDropSource::SetData( wxDataObject &data )
{
m_data = &data;
-};
+}
wxDropSource::~wxDropSource(void)
{
// if (m_data) delete m_data;
g_blockEventsOnDrag = FALSE;
-};
+}
wxDropSource::DragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) )
{
{
g_free( gdk_dnd.drag_startwindows );
gdk_dnd.drag_startwindows = NULL;
- };
+ }
gdk_dnd.drag_numwindows = gdk_dnd.drag_really = 0;
XWindowAttributes dnd_winattr;
g_blockEventsOnDrag = FALSE;
return m_retValue;
-};
+}
void wxDropSource::RegisterWindow(void)
{
gtk_signal_connect( GTK_OBJECT(m_widget), "drag_request_event",
GTK_SIGNAL_FUNC(gtk_drag_callback), (gpointer)this );
-};
+}
void wxDropSource::UnregisterWindow(void)
{
gtk_widget_dnd_drag_set( m_widget, FALSE, NULL, 0 );
gtk_signal_disconnect_by_data( GTK_OBJECT(m_widget), (gpointer)this );
-};
+}
}
dialog->OnOK( event );
-};
+}
void gtk_filedialog_cancel_callback( GtkWidget *WXUNUSED(widget), gpointer data )
{
wxFileDialog *dialog = (wxFileDialog*)data;
wxCommandEvent event(wxEVT_NULL);
dialog->OnCancel( event );
-};
+}
IMPLEMENT_DYNAMIC_CLASS(wxFileDialog,wxDialog)
gtk_signal_connect( GTK_OBJECT(sel->cancel_button), "clicked",
GTK_SIGNAL_FUNC(gtk_filedialog_cancel_callback), (gpointer*)this );
-};
+}
int wxFileDialog::ShowModal(void)
{
{
m_fileName = gtk_file_selection_get_filename( GTK_FILE_SELECTION(m_widget) );
m_path = gtk_file_selection_get_filename( GTK_FILE_SELECTION(m_widget) );
- };
+ }
return ret;
-};
+}
char *wxFileSelector(const char *title,
}
else
return NULL;
-};
+}
char* wxLoadFileSelector(const char *what, const char *extension, const char *default_name,
wxWindow *parent )
sprintf(wild, "*.%s", ext);
return wxFileSelector (prompt, NULL, default_name, ext, wild, 0, parent);
-};
+}
char* wxSaveFileSelector(const char *what, const char *extension, const char *default_name,
wxWindow *parent )
sprintf(wild, "*.%s", ext);
return wxFileSelector (prompt, NULL, default_name, ext, wild, 0, parent);
-};
+}
"wxDEFAULT", "wxDECORATIVE", "wxMODERN", "wxROMAN", "wxSCRIPT",
"wxSWISS", "wxTELETYPE",
};
+
static char *wx_font_style [] = {
"wxDEFAULT", "wxNORMAL", "wxSLANT", "wxITALIC",
};
+
static char *wx_font_weight [] = {
"wxDEFAULT", "wxNORMAL", "wxBOLD", "wxLIGHT",
};
m_fontId = 0;
m_faceName = NULL;
m_font = NULL;
-};
+}
wxFontRefData::~wxFontRefData(void)
{
wxNode *next = node->Next();
gdk_font_unref( font );
node = next;
- };
+ }
if (m_faceName)
{
delete m_faceName;
m_faceName = NULL;
- };
+ }
if (m_font) gdk_font_unref( m_font );
-};
+}
//-----------------------------------------------------------------------------
wxFont::wxFont(void)
{
if (wxTheFontList) wxTheFontList->Append( this );
-};
+}
wxFont::wxFont( char *xFontName )
{
M_FONTDATA->m_byXFontName = TRUE;
M_FONTDATA->m_font = gdk_font_load( xFontName );
-};
+}
wxFont::wxFont(int PointSize, int FontIdOrFamily, int Style, int Weight,
bool Underlined, const char* Face)
{
M_FONTDATA->m_fontId = FontIdOrFamily;
M_FONTDATA->m_family = wxTheFontNameDirectory->GetFamily( FontIdOrFamily );
- };
+ }
M_FONTDATA->m_style = Style;
M_FONTDATA->m_weight = Weight;
M_FONTDATA->m_pointSize = PointSize;
M_FONTDATA->m_underlined = Underlined;
if (wxTheFontList) wxTheFontList->Append( this );
-};
+}
wxFont::wxFont(int PointSize, const char *Face, int Family, int Style,
int Weight, bool Underlined)
M_FONTDATA->m_underlined = Underlined;
if (wxTheFontList) wxTheFontList->Append( this );
-};
+}
wxFont::wxFont( const wxFont& font )
{
Ref( font );
-};
+}
wxFont::wxFont( const wxFont* font )
{
UnRef();
if (font) Ref( *font );
-};
+}
wxFont::~wxFont(void)
{
if (wxTheFontList) wxTheFontList->DeleteObject( this );
-};
+}
wxFont& wxFont::operator = ( const wxFont& font )
{
if (*this == font) return (*this);
Ref( font );
return *this;
-};
+}
bool wxFont::operator == ( const wxFont& font )
{
return m_refData == font.m_refData;
-};
+}
bool wxFont::operator != ( const wxFont& font )
{
return m_refData != font.m_refData;
-};
+}
bool wxFont::Ok()
{
return (m_refData != NULL);
-};
+}
int wxFont::GetPointSize(void) const
{
return M_FONTDATA->m_pointSize;
-};
+}
wxString wxFont::GetFaceString(void) const
{
wxString s = wxTheFontNameDirectory->GetFontName( M_FONTDATA->m_fontId );
return s;
-};
+}
wxString wxFont::GetFaceName(void) const
{
wxString s = wxTheFontNameDirectory->GetFontName( M_FONTDATA->m_fontId );
return s;
-};
+}
int wxFont::GetFamily(void) const
{
return M_FONTDATA->m_family;
-};
+}
wxString wxFont::GetFamilyString(void) const
{
wxString s = wx_font_family[M_FONTDATA->m_family];
return s;
-};
+}
int wxFont::GetFontId(void) const
{
return M_FONTDATA->m_fontId; // stub
-};
+}
int wxFont::GetStyle(void) const
{
return M_FONTDATA->m_style;
-};
+}
wxString wxFont::GetStyleString(void) const
{
wxString s = wx_font_style[M_FONTDATA->m_style];
return s;
-};
+}
int wxFont::GetWeight(void) const
{
return M_FONTDATA->m_weight;
-};
+}
wxString wxFont::GetWeightString(void) const
{
wxString s = wx_font_weight[M_FONTDATA->m_weight];
return s;
-};
+}
bool wxFont::GetUnderlined(void) const
{
return M_FONTDATA->m_underlined;
-};
+}
//-----------------------------------------------------------------------------
// get internal representation of font
font = wxLoadQueryNearestFont( point_scale, M_FONTDATA->m_fontId, M_FONTDATA->m_style,
M_FONTDATA->m_weight, M_FONTDATA->m_underlined );
M_FONTDATA->m_scaled_xfonts.Append( int_scale, (wxObject*)font );
- };
+ }
if (!font)
printf("could not load any font");
// wxError("could not load any font", "wxFont");
return font;
-};
+}
//-----------------------------------------------------------------------------
// local utilities to find a X font
case wxNORMAL:
default: return wxWEIGHT_NORMAL;
}
-}
+};
static int SCoordinate(int s)
{
case wxNORMAL:
default: return wxSTYLE_NORMAL;
}
-}
+};
//-----------------------------------------------------------------------------
// wxSuffixMap
{
if (m_frameMenuBar) delete m_frameMenuBar;
if (m_frameStatusBar) delete m_frameStatusBar;
+ if (m_frameToolBar) delete m_frameToolBar;
// if (m_mainWindow) gtk_widget_destroy( m_mainWindow );
wxIcon::wxIcon( char **bits, int WXUNUSED(width), int WXUNUSED(height) ) :
wxBitmap( bits )
{
-};
+}
(win->m_height == alloc->height))
{
return;
- };
+ }
win->SetSize( alloc->x, alloc->y, alloc->width, alloc->height );
-};
+}
// page change callback
static void gtk_page_change_callback( GtkNotebook *WXUNUSED(widget),
mdi_frame->m_currentChild = child_frame;
mdi_frame->SetMDIMenuBar( child_frame->m_menuBar );
return;
- };
+ }
node = node->Next();
}
}
m_clientWindow = NULL;
m_currentChild = NULL;
m_parentFrameActive = TRUE;
-};
+}
wxMDIParentFrame::wxMDIParentFrame( wxWindow *parent,
wxWindowID id, const wxString& title,
m_currentChild = NULL;
m_parentFrameActive = TRUE;
Create( parent, id, title, pos, size, style, name );
-};
+}
wxMDIParentFrame::~wxMDIParentFrame(void)
{
-};
+}
bool wxMDIParentFrame::Create( wxWindow *parent,
wxWindowID id, const wxString& title,
OnCreateClient();
return TRUE;
-};
+}
void wxMDIParentFrame::GtkOnSize( int x, int y, int width, int height )
{
GetClientSize( &x, &y );
m_mdiMenuBar->SetSize( 1, 1, x-2, 26 );
}
-};
+}
void wxMDIParentFrame::SetMDIMenuBar( wxMenuBar *menu_bar )
{
m_mdiMenuBar->SetSize( 1, 1, x-2, 26 );
m_mdiMenuBar->Show( TRUE );
}
-};
+}
void wxMDIParentFrame::GetClientSize(int *width, int *height ) const
{
wxFrame::GetClientSize( width, height );
-};
+}
wxMDIChildFrame *wxMDIParentFrame::GetActiveChild(void) const
{
return m_currentChild;
-};
+}
wxMDIClientWindow *wxMDIParentFrame::GetClientWindow(void) const
{
return m_clientWindow;
-};
+}
wxMDIClientWindow *wxMDIParentFrame::OnCreateClient(void)
{
m_clientWindow = new wxMDIClientWindow( this );
return m_clientWindow;
-};
+}
void wxMDIParentFrame::ActivateNext(void)
{
if (m_clientWindow)
gtk_notebook_next_page( GTK_NOTEBOOK(m_clientWindow->m_widget) );
-};
+}
void wxMDIParentFrame::ActivatePrevious(void)
{
if (m_clientWindow)
gtk_notebook_prev_page( GTK_NOTEBOOK(m_clientWindow->m_widget) );
-};
+}
void wxMDIParentFrame::OnActivate( wxActivateEvent& WXUNUSED(event) )
{
-};
+}
void wxMDIParentFrame::OnSysColourChanged( wxSysColourChangedEvent& WXUNUSED(event) )
{
-};
+}
//-----------------------------------------------------------------------------
// wxMDIChildFrame
{
m_menuBar = NULL;
m_page = NULL;
-};
+}
wxMDIChildFrame::wxMDIChildFrame( wxMDIParentFrame *parent,
wxWindowID id, const wxString& title,
m_menuBar = NULL;
m_page = NULL;
Create( parent, id, title, wxDefaultPosition, size, style, name );
-};
+}
wxMDIChildFrame::~wxMDIChildFrame(void)
{
{
mdi_frame->SetMDIMenuBar( NULL );
mdi_frame->m_currentChild = NULL;
- };
+ }
delete m_menuBar;
}
-};
+}
bool wxMDIChildFrame::Create( wxMDIParentFrame *parent,
wxWindowID id, const wxString& title,
{
m_title = title;
return wxWindow::Create( parent->GetClientWindow(), id, wxDefaultPosition, size, style, name );
-};
+}
void wxMDIChildFrame::GetClientSize( int *width, int *height ) const
{
if (menuitem->IsSubMenu())
SetInvokingWindow( menuitem->GetSubMenu(), win );
node = node->Next();
- };
-};
+ }
+}
void wxMDIChildFrame::SetMenuBar( wxMenuBar *menu_bar )
{
wxMenu *menu = (wxMenu*)node->Data();
SetInvokingWindow( menu, this );
node = node->Next();
- };
+ }
m_menuBar->m_parent = mdi_frame;
}
gtk_myfixed_put( GTK_MYFIXED(mdi_frame->m_mainWindow),
m_menuBar->m_widget, m_menuBar->m_x, m_menuBar->m_y );
}
-};
+}
wxMenuBar *wxMDIChildFrame::GetMenuBar()
{
return m_menuBar;
-};
+}
void wxMDIChildFrame::Activate(void)
{
-};
+}
void wxMDIChildFrame::OnActivate( wxActivateEvent &WXUNUSED(event) )
{
-};
+}
//-----------------------------------------------------------------------------
// wxMDIClientWindow
wxMDIClientWindow::wxMDIClientWindow(void)
{
-};
+}
wxMDIClientWindow::wxMDIClientWindow( wxMDIParentFrame *parent, long style )
{
CreateClient( parent, style );
-};
+}
wxMDIClientWindow::~wxMDIClientWindow(void)
{
-};
+}
bool wxMDIClientWindow::CreateClient( wxMDIParentFrame *parent, long style )
{
Show( TRUE );
return TRUE;
-};
+}
void wxMDIClientWindow::AddChild( wxWindow *child )
{
{
wxFAIL_MSG("wxNotebook::AddChild: Child has to be wxMDIChildFrame");
return;
- };
+ }
m_children.Append( child );
gtk_notebook_set_page( GTK_NOTEBOOK(m_widget), m_children.Number()-1 );
gtk_page_change_callback( NULL, mdi_child->m_page, 0, this );
-};
+}
m_page = NULL;
m_client = NULL;
m_parent = NULL;
- };
+ }
//private:
int m_id;
(win->m_height == alloc->height))
{
return;
- };
+ }
/*
printf( "OnResize from " );
printf( " W: %d H: %d ", win->m_width, win->m_height );
printf( " .\n" );
*/
-};
+}
//-----------------------------------------------------------------------------
// wxNotebook
wxNotebook::wxNotebook()
{
Init();
-};
+}
wxNotebook::wxNotebook( wxWindow *parent, wxWindowID id,
const wxPoint& pos, const wxSize& size,
{
Init();
Create( parent, id, pos, size, style, name );
-};
+}
wxNotebook::~wxNotebook()
{
gtk_signal_disconnect(GTK_OBJECT(m_widget), m_idHandler);
DeleteAllPages();
-};
+}
bool wxNotebook::Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos, const wxSize& size,
Show( TRUE );
return TRUE;
-};
+}
int wxNotebook::GetSelection() const
{
if (page->m_page == g_page)
break;
node = node->Next();
- };
+ }
wxCHECK_MSG( node != NULL, -1, "wxNotebook: no selection?" );
return page->m_id;
-};
+}
int wxNotebook::GetPageCount() const
{
return m_pages.Number();
-};
+}
int wxNotebook::GetRowCount() const
{
return 1;
-};
+}
wxString wxNotebook::GetPageText( int page ) const
{
return nb_page->m_text;
else
return "";
-};
+}
int wxNotebook::GetPageImage( int page ) const
{
return nb_page->m_image;
else
return 0;
-};
+}
wxNotebookPage* wxNotebook::GetNotebookPage(int page) const
{
if (nb_page->m_id == page)
return nb_page;
node = node->Next();
- };
+ }
wxLogDebug( "Notebook page %d not found!", page );
return NULL;
-};
+}
int wxNotebook::SetSelection( int page )
{
break;
page_num++;
child = child->next;
- };
+ }
if (!child) return -1;
gtk_notebook_set_page( GTK_NOTEBOOK(m_widget), page_num );
return selOld;
-};
+}
void wxNotebook::AdvanceSelection(bool bForward)
{
void wxNotebook::SetImageList( wxImageList* imageList )
{
m_imageList = imageList;
-};
+}
bool wxNotebook::SetPageText( int page, const wxString &text )
{
nb_page->m_text = text;
return TRUE;
-};
+}
bool wxNotebook::SetPageImage( int page, int image )
{
nb_page->m_image = image;
return TRUE;
-};
+}
void wxNotebook::SetPageSize( const wxSize &WXUNUSED(size) )
{
wxFAIL_MSG(_("wxNotebook::SetPageSize not implemented"));
-};
+}
void wxNotebook::SetPadding( const wxSize &WXUNUSED(padding) )
{
wxFAIL_MSG(_("wxNotebook::SetPadding not implemented"));
-};
+}
bool wxNotebook::DeleteAllPages()
{
DeletePage( page->m_id );
page_node = m_pages.First();
- };
+ }
return TRUE;
-};
+}
bool wxNotebook::DeletePage( int page )
{
if (nb_page->m_page == (GtkNotebookPage*)child->data) break;
page_num++;
child = child->next;
- };
+ }
wxASSERT( child );
m_pages.DeleteObject( nb_page );
return TRUE;
-};
+}
bool wxNotebook::AddPage(wxWindow* win, const wxString& text,
bool bSelect, int imageId)
if ( page->m_client == win )
break; // found
node = node->Next();
- };
+ }
wxCHECK_MSG(page != NULL, FALSE,
_("Can't add a page whose parent is not the notebook!"));
}
return TRUE;
-};
+}
wxWindow *wxNotebook::GetPage( int page ) const
{
return NULL;
else
return nb_page->m_client;
-};
+}
void wxNotebook::AddChild( wxWindow *win )
{
}
m_pages.Append( page );
-};
+}
// override these 2 functions to do nothing: everything is done in OnSize
void wxNotebook::SetConstraintSizes( bool WXUNUSED(recurse) )
m_style = wxSOLID;
m_joinStyle = wxJOIN_ROUND;
m_capStyle = wxCAP_ROUND;
-};
+}
//-----------------------------------------------------------------------------
wxPen::wxPen(void)
{
if (wxThePenList) wxThePenList->AddPen( this );
-};
+}
wxPen::wxPen( const wxColour &colour, int width, int style )
{
M_PENDATA->m_style = style;
M_PENDATA->m_colour = colour;
if (wxThePenList) wxThePenList->AddPen( this );
-};
+}
wxPen::wxPen( const wxString &colourName, int width, int style )
{
M_PENDATA->m_style = style;
M_PENDATA->m_colour = colourName;
if (wxThePenList) wxThePenList->AddPen( this );
-};
+}
wxPen::wxPen( const wxPen& pen )
{
Ref( pen );
if (wxThePenList) wxThePenList->AddPen( this );
-};
+}
wxPen::wxPen( const wxPen* pen )
{
UnRef();
if (pen) Ref( *pen );
if (wxThePenList) wxThePenList->AddPen( this );
-};
+}
wxPen::~wxPen(void)
{
if (wxThePenList) wxThePenList->RemovePen( this );
-};
+}
wxPen& wxPen::operator = ( const wxPen& pen )
{
if (*this == pen) return (*this);
Ref( pen );
return *this;
-};
+}
bool wxPen::operator == ( const wxPen& pen )
{
return m_refData == pen.m_refData;
-};
+}
bool wxPen::operator != ( const wxPen& pen )
{
return m_refData != pen.m_refData;
-};
+}
void wxPen::SetColour( const wxColour &colour )
{
m_refData = new wxPenRefData();
M_PENDATA->m_colour = colour;
-};
+}
void wxPen::SetColour( const wxString &colourName )
{
m_refData = new wxPenRefData();
M_PENDATA->m_colour = colourName;
-};
+}
void wxPen::SetColour( int red, int green, int blue )
{
m_refData = new wxPenRefData();
M_PENDATA->m_colour.Set( red, green, blue );
-};
+}
void wxPen::SetCap( int capStyle )
{
m_refData = new wxPenRefData();
M_PENDATA->m_capStyle = capStyle;
-};
+}
void wxPen::SetJoin( int joinStyle )
{
m_refData = new wxPenRefData();
M_PENDATA->m_joinStyle = joinStyle;
-};
+}
void wxPen::SetStyle( int style )
{
m_refData = new wxPenRefData();
M_PENDATA->m_style = style;
-};
+}
void wxPen::SetWidth( int width )
{
m_refData = new wxPenRefData();
M_PENDATA->m_width = width;
-};
+}
int wxPen::GetCap(void) const
{
return M_PENDATA->m_capStyle;
-};
+}
int wxPen::GetJoin(void) const
{
return 0;
else
return M_PENDATA->m_joinStyle;
-};
+}
int wxPen::GetStyle(void) const
{
return 0;
else
return M_PENDATA->m_style;
-};
+}
int wxPen::GetWidth(void) const
{
return 0;
else
return M_PENDATA->m_width;
-};
+}
wxColour &wxPen::GetColour(void) const
{
return wxNullColour;
else
return M_PENDATA->m_colour;
-};
+}
bool wxPen::Ok(void) const
{
return (m_refData);
-};
+}
wxRegionRefData::wxRegionRefData(void)
{
m_region = NULL;
-};
+}
wxRegionRefData::~wxRegionRefData(void)
{
if (m_region) gdk_region_destroy( m_region );
-};
+}
//-----------------------------------------------------------------------------
rect.height = h;
M_REGIONDATA->m_region = gdk_region_union_with_rect( reg, &rect );
gdk_region_destroy( reg );
-};
+}
wxRegion::wxRegion( const wxPoint& topLeft, const wxPoint& bottomRight )
{
rect.height = bottomRight.y - rect.y;
M_REGIONDATA->m_region = gdk_region_union_with_rect( reg, &rect );
gdk_region_destroy( reg );
-};
+}
wxRegion::wxRegion( const wxRect& rect )
{
g_rect.height = rect.height;
M_REGIONDATA->m_region = gdk_region_union_with_rect( reg, &g_rect );
gdk_region_destroy( reg );
-};
+}
wxRegion::wxRegion(void)
{
m_refData = new wxRegionRefData();
M_REGIONDATA->m_region = gdk_region_new();
-};
+}
wxRegion::~wxRegion(void)
{
-};
+}
void wxRegion::Clear(void)
{
UnRef();
m_refData = new wxRegionRefData();
M_REGIONDATA->m_region = gdk_region_new();
-};
+}
bool wxRegion::Union( long x, long y, long width, long height )
{
gdk_region_destroy( M_REGIONDATA->m_region );
M_REGIONDATA->m_region = reg;
return TRUE;
-};
+}
bool wxRegion::Union( const wxRect& rect )
{
gdk_region_destroy( M_REGIONDATA->m_region );
M_REGIONDATA->m_region = reg;
return TRUE;
-};
+}
bool wxRegion::Union( const wxRegion& region )
{
gdk_region_destroy( M_REGIONDATA->m_region );
M_REGIONDATA->m_region = reg;
return TRUE;
-};
+}
bool wxRegion::Intersect( long x, long y, long width, long height )
{
wxRegion reg( x, y, width, height );
Intersect( reg );
return TRUE;
-};
+}
bool wxRegion::Intersect( const wxRect& rect )
{
wxRegion reg( rect );
Intersect( reg );
return TRUE;
-};
+}
bool wxRegion::Intersect( const wxRegion& region )
{
gdk_region_destroy( M_REGIONDATA->m_region );
M_REGIONDATA->m_region = reg;
return TRUE;
-};
+}
bool wxRegion::Subtract( long x, long y, long width, long height )
{
wxRegion reg( x, y, width, height );
Subtract( reg );
return TRUE;
-};
+}
bool wxRegion::Subtract( const wxRect& rect )
{
wxRegion reg( rect );
Subtract( reg );
return TRUE;
-};
+}
bool wxRegion::Subtract( const wxRegion& region )
{
gdk_region_destroy( M_REGIONDATA->m_region );
M_REGIONDATA->m_region = reg;
return TRUE;
-};
+}
bool wxRegion::Xor( long x, long y, long width, long height )
{
wxRegion reg( x, y, width, height );
Xor( reg );
return TRUE;
-};
+}
bool wxRegion::Xor( const wxRect& rect )
{
wxRegion reg( rect );
Xor( reg );
return TRUE;
-};
+}
bool wxRegion::Xor( const wxRegion& region )
{
gdk_region_destroy( M_REGIONDATA->m_region );
M_REGIONDATA->m_region = reg;
return TRUE;
-};
+}
void wxRegion::GetBox( long& x, long& y, long&w, long &h ) const
{
y = 0;
w = -1;
h = -1;
-};
+}
wxRect wxRegion::GetBox(void) const
{
return wxRect( 0, 0, -1, -1 );
-};
+}
bool wxRegion::Empty(void) const
{
return gdk_region_empty( M_REGIONDATA->m_region );
-};
+}
wxRegionContain wxRegion::Contains( long x, long y ) const
{
return wxInRegion;
else
return wxOutRegion;
-};
+}
wxRegionContain wxRegion::Contains( long x, long y, long w, long h ) const
{
case GDK_OVERLAP_RECTANGLE_IN: return wxInRegion;
case GDK_OVERLAP_RECTANGLE_OUT: return wxOutRegion;
case GDK_OVERLAP_RECTANGLE_PART: return wxPartRegion;
- };
+ }
return wxOutRegion;
-};
+}
GdkRegion *wxRegion::GetRegion(void) const
{
return M_REGIONDATA->m_region;
-};
+}
new wxColour( style->bg[0].red >> SHIFT,
style->bg[0].green >> SHIFT,
style->bg[0].blue >> SHIFT );
- };
+ }
return *g_systemBtnFaceColour;
- };
+ }
case wxSYS_COLOUR_BTNSHADOW:
{
GtkStyle *style = gtk_widget_get_default_style();
new wxColour( style->dark[0].red >> SHIFT,
style->dark[0].green >> SHIFT,
style->dark[0].blue >> SHIFT );
- };
+ }
return *g_systemBtnShadowColour;
- };
+ }
case wxSYS_COLOUR_GRAYTEXT:
case wxSYS_COLOUR_BTNHIGHLIGHT:
{
new wxColour( style->light[0].red >> SHIFT,
style->light[0].green >> SHIFT,
style->light[0].blue >> SHIFT );
- };
+ }
return *g_systemBtnHighlightColour;
- };
+ }
case wxSYS_COLOUR_HIGHLIGHT:
{
GtkStyle *style = gtk_widget_get_default_style();
new wxColour( style->bg[GTK_STATE_SELECTED].red >> SHIFT,
style->bg[GTK_STATE_SELECTED].green >> SHIFT,
style->bg[GTK_STATE_SELECTED].blue >> SHIFT );
- };
+ }
return *g_systemHighlightColour;
- };
+ }
case wxSYS_COLOUR_MENUTEXT:
case wxSYS_COLOUR_WINDOWTEXT:
case wxSYS_COLOUR_CAPTIONTEXT:
case wxSYS_COLOUR_INFOTEXT:
{
return *wxBLACK;
- };
+ }
case wxSYS_COLOUR_HIGHLIGHTTEXT:
{
return *wxWHITE;
- };
+ }
case wxSYS_COLOUR_INFOBK:
case wxSYS_COLOUR_APPWORKSPACE:
{
return *wxWHITE; // ?
- };
- };
+ }
+ }
return *wxWHITE;
-};
+}
wxFont wxSystemSettings::GetSystemFont( int index )
{
case wxSYS_SYSTEM_FIXED_FONT:
{
return *wxNORMAL_FONT;
- };
+ }
case wxSYS_ANSI_VAR_FONT:
case wxSYS_SYSTEM_FONT:
case wxSYS_DEVICE_DEFAULT_FONT:
if (!g_systemFont)
g_systemFont = new wxFont( "-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*" );
return *g_systemFont;
- };
- };
+ }
+ }
return wxNullFont;
}
-;
int wxSystemSettings::GetSystemMetric( int index )
{
return gdk_screen_width();
case wxSYS_SCREEN_Y:
return gdk_screen_height();
- };
+ }
return 0;
-}
-;
-
+}
\ No newline at end of file
timer->Notify();
if (timer->OneShot()) timer->Stop();
return TRUE;
-};
+}
wxTimer::wxTimer(void)
{
m_tag = -1;
m_time = 1000;
m_oneShot = FALSE;
-};
+}
wxTimer::~wxTimer(void)
{
Stop();
-};
+}
int wxTimer::Interval(void)
{
return m_time;
-};
+}
bool wxTimer::OneShot(void)
{
return m_oneShot;
-};
+}
void wxTimer::Notify(void)
{
-};
+}
void wxTimer::Start( int millisecs, bool oneShot )
{
if (millisecs != -1) m_time = millisecs;
m_oneShot = oneShot;
m_tag = gtk_timeout_add( millisecs, timeout_callback, this );
-};
+}
void wxTimer::Stop(void)
{
if (m_tag != -1)
gtk_timeout_remove( m_tag );
m_tag = -1;
-};
+}
void wxExit(void)
{
gtk_main_quit();
-};
+}
bool wxYield(void)
{
while (gtk_events_pending() > 0) gtk_main_iteration();
return TRUE;
-};
+}
//-----------------------------------------------------------------------------
// wxApp
gint wxapp_idle_callback( gpointer WXUNUSED(data) )
{
- if (wxTheApp) while (wxTheApp->ProcessIdle()) {};
+ if (wxTheApp) while (wxTheApp->ProcessIdle()) {}
usleep( 10000 );
return TRUE;
-};
+}
wxApp::wxApp()
{
m_idleTag = 0;
m_topWindow = NULL;
m_exitOnFrameDelete = TRUE;
-};
+}
wxApp::~wxApp(void)
{
gtk_idle_remove( m_idleTag );
-};
+}
bool wxApp::OnInit(void)
{
return TRUE;
-};
+}
bool wxApp::OnInitGui(void)
{
m_idleTag = gtk_idle_add( wxapp_idle_callback, NULL );
return TRUE;
-};
+}
int wxApp::OnRun(void)
{
return MainLoop();
-};
+}
bool wxApp::ProcessIdle(void)
{
ProcessEvent( event );
return event.MoreRequested();
-};
+}
void wxApp::OnIdle( wxIdleEvent &event )
{
event.RequestMore(TRUE);
inOnIdle = FALSE;
-};
+}
bool wxApp::SendIdleEvents(void)
{
node = node->Next();
}
return needMore;
-};
+}
bool wxApp::SendIdleEvents( wxWindow* win )
{
node = node->Next();
}
return needMore ;
-};
+}
int wxApp::OnExit(void)
{
return 0;
-};
+}
int wxApp::MainLoop(void)
{
gtk_main();
return 0;
-};
+}
void wxApp::ExitMainLoop(void)
{
gtk_main_quit();
-};
+}
bool wxApp::Initialized(void)
{
return m_initialized;
-};
+}
bool wxApp::Pending(void)
{
return FALSE;
-};
+}
void wxApp::Dispatch(void)
{
-};
+}
void wxApp::DeletePendingObjects(void)
{
delete node;
node = wxPendingDelete.First();
- };
-};
+ }
+}
wxWindow *wxApp::GetTopWindow(void)
{
wxNode *node = wxTopLevelWindows.First();
if (!node) return NULL;
return (wxWindow*)node->Data();
-};
+}
void wxApp::SetTopWindow( wxWindow *win )
{
m_topWindow = win;
-};
+}
void wxApp::CommonInit(void)
{
g_globalCursor = new wxCursor;
*/
-};
+}
void wxApp::CommonCleanUp(void)
{
wxCleanUpResourceSystem();
wxSystemSettings::Done();
-};
+}
wxLog *wxApp::CreateLogTarget()
{
{
printf( _("wxWindows error: No initializer - use IMPLEMENT_APP macro.\n") );
return 0;
- };
+ }
wxAppInitializerFunction app_ini = wxApp::GetInitializerFunction();
wxObject *test_app = app_ini();
wxTheApp = (wxApp*) test_app;
- };
+ }
if (!wxTheApp)
{
printf( _("wxWindows error: wxTheApp == NULL\n") );
return 0;
- };
+ }
wxTheApp->argc = argc;
wxTheApp->argv = argv;
#endif
return retValue;
-};
+}
//-----------------------------------------------------------------------------
// main()
wxMask::wxMask(void)
{
m_bitmap = NULL;
-};
+}
wxMask::wxMask( const wxBitmap& WXUNUSED(bitmap), const wxColour& WXUNUSED(colour) )
{
-};
+}
wxMask::wxMask( const wxBitmap& WXUNUSED(bitmap), int WXUNUSED(paletteIndex) )
{
-};
+}
wxMask::wxMask( const wxBitmap& WXUNUSED(bitmap) )
{
-};
+}
wxMask::~wxMask(void)
{
#else
if (m_bitmap) gdk_bitmap_unref( m_bitmap );
#endif
-};
+}
GdkBitmap *wxMask::GetBitmap(void) const
{
return m_bitmap;
-};
+}
//-----------------------------------------------------------------------------
// wxBitmap
#ifdef USE_GDK_IMLIB
m_image = NULL;
#endif
-};
+}
wxBitmapRefData::~wxBitmapRefData(void)
{
if (m_bitmap) gdk_bitmap_unref( m_bitmap );
if (m_mask) delete m_mask;
if (m_palette) delete m_palette;
-};
+}
//-----------------------------------------------------------------------------
wxBitmap::wxBitmap(void)
{
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
-};
+}
wxBitmap::wxBitmap( int width, int height, int depth )
{
M_BMPDATA->m_bpp = depth;
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
-};
+}
wxBitmap::wxBitmap( char **bits )
{
{
M_BMPDATA->m_mask = new wxMask();
M_BMPDATA->m_mask->m_bitmap = mask;
- };
+ }
gdk_window_get_size( M_BMPDATA->m_pixmap, &(M_BMPDATA->m_width), &(M_BMPDATA->m_height) );
M_BMPDATA->m_bpp = 24; // ?
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
-};
+}
wxBitmap::wxBitmap( const wxBitmap& bmp )
{
Ref( bmp );
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
-};
+}
wxBitmap::wxBitmap( const wxBitmap* bmp )
{
if (bmp) Ref( *bmp );
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
-};
+}
wxBitmap::wxBitmap( const wxString &filename, int type )
{
LoadFile( filename, type );
-};
+
+ if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
+}
// CMB 15/5/98: add constructor for xbm bitmaps
wxBitmap::wxBitmap( const char bits[], int width, int height, int WXUNUSED(depth))
wxBitmap::~wxBitmap(void)
{
if (wxTheBitmapList) wxTheBitmapList->DeleteObject(this);
-};
+}
wxBitmap& wxBitmap::operator = ( const wxBitmap& bmp )
{
if (*this == bmp) return (*this);
Ref( bmp );
return *this;
-};
+}
bool wxBitmap::operator == ( const wxBitmap& bmp )
{
return m_refData == bmp.m_refData;
-};
+}
bool wxBitmap::operator != ( const wxBitmap& bmp )
{
return m_refData != bmp.m_refData;
-};
+}
bool wxBitmap::Ok(void) const
{
return m_refData != NULL;
-};
+}
int wxBitmap::GetHeight(void) const
{
if (!Ok()) return 0;
return M_BMPDATA->m_height;
-};
+}
int wxBitmap::GetWidth(void) const
{
if (!Ok()) return 0;
return M_BMPDATA->m_width;
-};
+}
int wxBitmap::GetDepth(void) const
{
if (!Ok()) return 0;
return M_BMPDATA->m_bpp;
-};
+}
void wxBitmap::SetHeight( int height )
{
if (!Ok()) return;
M_BMPDATA->m_height = height;
-};
+}
void wxBitmap::SetWidth( int width )
{
if (!Ok()) return;
M_BMPDATA->m_width = width;
-};
+}
void wxBitmap::SetDepth( int depth )
{
if (!Ok()) return;
M_BMPDATA->m_bpp = depth;
-};
+}
wxMask *wxBitmap::GetMask(void) const
{
if (!Ok()) return NULL;
return M_BMPDATA->m_mask;
-};
+}
void wxBitmap::SetMask( wxMask *mask )
{
if (M_BMPDATA->m_mask) delete M_BMPDATA->m_mask;
M_BMPDATA->m_mask = mask;
-};
+}
void wxBitmap::Resize( int height, int width )
{
Render();
#endif
-};
+}
bool wxBitmap::SaveFile( const wxString &name, int WXUNUSED(type),
wxPalette *WXUNUSED(palette) )
#endif
return FALSE;
-};
+}
bool wxBitmap::LoadFile( const wxString &name, int WXUNUSED(type) )
{
{
UnRef();
return FALSE;
- };
+ }
Render();
#endif
return FALSE;
-};
+}
wxPalette *wxBitmap::GetPalette(void) const
{
if (!Ok()) return NULL;
return M_BMPDATA->m_palette;
-};
+}
GdkPixmap *wxBitmap::GetPixmap(void) const
{
if (!Ok()) return NULL;
return M_BMPDATA->m_pixmap;
-};
+}
GdkBitmap *wxBitmap::GetBitmap(void) const
{
if (!Ok()) return NULL;
return M_BMPDATA->m_bitmap;
-};
+}
void wxBitmap::DestroyImage(void)
{
{
gdk_imlib_destroy_image( M_BMPDATA->m_image );
M_BMPDATA->m_image = NULL;
- };
-};
+ }
+}
void wxBitmap::RecreateImage(void)
{
-};
+}
void wxBitmap::Render(void)
{
{
M_BMPDATA->m_mask = new wxMask();
M_BMPDATA->m_mask->m_bitmap = mask;
- };
+ }
#endif
-};
+}
wxBrushRefData::wxBrushRefData(void)
{
m_style = 0;
-};
+}
//-----------------------------------------------------------------------------
wxBrush::wxBrush(void)
{
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
-};
+}
wxBrush::wxBrush( const wxColour &colour, int style )
{
M_BRUSHDATA->m_colour = colour;
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
-};
+}
wxBrush::wxBrush( const wxString &colourName, int style )
{
M_BRUSHDATA->m_colour = colourName;
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
-};
+}
wxBrush::wxBrush( const wxBitmap &stippleBitmap )
{
M_BRUSHDATA->m_stipple = stippleBitmap;
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
-};
+}
wxBrush::wxBrush( const wxBrush &brush )
{
Ref( brush );
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
-};
+}
wxBrush::wxBrush( const wxBrush *brush )
{
if (brush) Ref( *brush );
if (wxTheBrushList) wxTheBrushList->Append( this );
-};
+}
wxBrush::~wxBrush(void)
{
if (wxTheBrushList) wxTheBrushList->RemoveBrush( this );
-};
+}
wxBrush& wxBrush::operator = ( const wxBrush& brush )
{
if (*this == brush) return (*this);
Ref( brush );
return *this;
-};
+}
bool wxBrush::operator == ( const wxBrush& brush )
{
return m_refData == brush.m_refData;
-};
+}
bool wxBrush::operator != ( const wxBrush& brush )
{
return m_refData != brush.m_refData;
-};
+}
bool wxBrush::Ok(void) const
{
return ((m_refData) && M_BRUSHDATA->m_colour.Ok());
-};
+}
int wxBrush::GetStyle(void) const
{
return M_BRUSHDATA->m_style;
-};
+}
wxColour &wxBrush::GetColour(void) const
{
return M_BRUSHDATA->m_colour;
-};
+}
wxBitmap *wxBrush::GetStipple(void) const
{
return &M_BRUSHDATA->m_stipple;
-};
+}
m_color.pixel = 0;
m_colormap = NULL;
m_hasPixel = FALSE;
-};
+}
wxColourRefData::~wxColourRefData(void)
{
FreeColour();
-};
+}
void wxColourRefData::FreeColour(void)
{
// if (m_hasPixel) gdk_colors_free( m_colormap, &m_color, 1, 0 );
-};
+}
//-----------------------------------------------------------------------------
wxColour::wxColour(void)
{
-};
+}
wxColour::wxColour( char red, char green, char blue )
{
M_COLDATA->m_color.green = ((unsigned short)green) << SHIFT;
M_COLDATA->m_color.blue = ((unsigned short)blue) << SHIFT;
M_COLDATA->m_color.pixel = 0;
-};
+}
wxColour::wxColour( const wxString &colourName )
{
wxFAIL_MSG( "wxColour: couldn't find colour" );
delete m_refData;
m_refData = NULL;
- };
- };
-};
+ }
+ }
+}
wxColour::wxColour( const wxColour& col )
{
Ref( col );
-};
+}
wxColour::wxColour( const wxColour* col )
{
if (col) Ref( *col );
-};
+}
wxColour::~wxColour(void)
{
-};
+}
wxColour& wxColour::operator = ( const wxColour& col )
{
if (*this == col) return (*this);
Ref( col );
return *this;
-};
+}
wxColour& wxColour::operator = ( const wxString& colourName )
{
wxFAIL_MSG( "wxColour: couldn't find colour" );
delete m_refData;
m_refData = NULL;
- };
- };
+ }
+ }
return *this;
-};
+}
bool wxColour::operator == ( const wxColour& col )
{
return m_refData == col.m_refData;
-};
+}
bool wxColour::operator != ( const wxColour& col)
{
return m_refData != col.m_refData;
-};
+}
void wxColour::Set( const unsigned char red, const unsigned char green, const unsigned char blue )
{
M_COLDATA->m_color.green = ((unsigned short)green) << SHIFT;
M_COLDATA->m_color.blue = ((unsigned short)blue) << SHIFT;
M_COLDATA->m_color.pixel = 0;
-};
+}
unsigned char wxColour::Red(void) const
{
if (!Ok()) return 0;
return (unsigned char)(M_COLDATA->m_color.red >> SHIFT);
-};
+}
unsigned char wxColour::Green(void) const
{
if (!Ok()) return 0;
return (unsigned char)(M_COLDATA->m_color.green >> SHIFT);
-};
+}
unsigned char wxColour::Blue(void) const
{
if (!Ok()) return 0;
return (unsigned char)(M_COLDATA->m_color.blue >> SHIFT);
-};
+}
bool wxColour::Ok(void) const
{
return (m_refData);
-};
+}
void wxColour::CalcPixel( GdkColormap *cmap )
{
#endif
M_COLDATA->m_colormap = cmap;
-};
+}
int wxColour::GetPixel(void)
{
if (!Ok()) return 0;
return M_COLDATA->m_color.pixel;
-};
+}
GdkColor *wxColour::GetColor(void)
{
if (!Ok()) return NULL;
return &M_COLDATA->m_color;
-};
+}
wxCursorRefData::wxCursorRefData(void)
{
m_cursor = NULL;
-};
+}
wxCursorRefData::~wxCursorRefData(void)
{
if (m_cursor) gdk_cursor_destroy( m_cursor );
-};
+}
//-----------------------------------------------------------------------------
wxCursor::wxCursor(void)
{
-};
+}
wxCursor::wxCursor( int cursorId )
{
case wxCURSOR_IBEAM: gdk_cur = GDK_XTERM; break;
case wxCURSOR_PENCIL: gdk_cur = GDK_PENCIL; break;
case wxCURSOR_NO_ENTRY: gdk_cur = GDK_PIRATE; break;
- };
+ }
M_CURSORDATA->m_cursor = gdk_cursor_new( gdk_cur );
wxCURSOR_BASED_ARROW_DOWN
*/
-};
+}
wxCursor::wxCursor( const wxCursor &cursor )
{
Ref( cursor );
-};
+}
wxCursor::wxCursor( const wxCursor *cursor )
{
UnRef();
if (cursor) Ref( *cursor );
-};
+}
wxCursor::~wxCursor(void)
{
-};
+}
wxCursor& wxCursor::operator = ( const wxCursor& cursor )
{
if (*this == cursor) return (*this);
Ref( cursor );
return *this;
-};
+}
bool wxCursor::operator == ( const wxCursor& cursor )
{
return m_refData == cursor.m_refData;
-};
+}
bool wxCursor::operator != ( const wxCursor& cursor )
{
return m_refData != cursor.m_refData;
-};
+}
bool wxCursor::Ok(void) const
{
return TRUE;
-};
+}
GdkCursor *wxCursor::GetCursor(void) const
{
return M_CURSORDATA->m_cursor;
-};
+}
//-----------------------------------------------------------------------------
// busy cursor routines
void wxEndBusyCursor(void)
{
g_isBusy = FALSE;
-};
+}
void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) )
{
g_isBusy = TRUE;
-};
+}
bool wxIsBusy(void)
{
return g_isBusy;
-};
+}
void wxSetCursor( const wxCursor& cursor )
{
extern wxCursor *g_globalCursor;
if (g_globalCursor) (*g_globalCursor) = cursor;
- if (cursor.Ok()) {};
-};
+ if (cursor.Ok()) {}
+}
m_backgroundBrush = *wxWHITE_BRUSH;
// m_palette = wxAPP_COLOURMAP;
-};
+}
wxDC::~wxDC(void)
{
-};
+}
void wxDC::DrawArc( long WXUNUSED(x1), long WXUNUSED(y1), long WXUNUSED(x2), long WXUNUSED(y2),
double WXUNUSED(xc), double WXUNUSED(yc) )
{
-};
+}
void wxDC::DrawIcon( const wxIcon &WXUNUSED(icon), long WXUNUSED(x), long WXUNUSED(y), bool WXUNUSED(useMask) )
{
-};
+}
void wxDC::DrawPoint( wxPoint& point )
{
DrawPoint( point.x, point.y );
-};
+}
void wxDC::DrawPolygon( wxList *list, long xoffset, long yoffset, int fillStyle )
{
wxPoint *point = (wxPoint *)node->Data();
points[i].x = point->x;
points[i++].y = point->y;
- };
+ }
DrawPolygon( n, points, xoffset, yoffset, fillStyle );
delete[] points;
-};
+}
void wxDC::DrawLines( wxList *list, long xoffset, long yoffset )
{
wxPoint *point = (wxPoint *)node->Data();
points[i].x = point->x;
points[i++].y = point->y;
- };
+ }
DrawLines( n, points, xoffset, yoffset );
delete []points;
-};
+}
void wxDC::DrawSpline( long x1, long y1, long x2, long y2, long x3, long y3 )
{
wxPoint *p = (wxPoint*)node->Data();
delete p;
node = node->Next();
- };
-};
+ }
+}
void wxDC::DrawSpline( wxList *points )
{
DrawOpenSpline( points );
-};
+}
void wxDC::DrawSpline( int n, wxPoint points[] )
{
wxList list;
for (int i = 0; i < n; i++) list.Append( (wxObject*)&points[i] );
DrawSpline( &list );
-};
+}
void wxDC::SetClippingRegion( long x, long y, long width, long height )
{
m_clipY1 = y;
m_clipX2 = x + width;
m_clipY2 = y + height;
-};
+}
void wxDC::DestroyClippingRegion(void)
{
m_clipping = FALSE;
-};
+}
void wxDC::GetClippingBox( long *x, long *y, long *width, long *height ) const
{
}
else
*x = *y = *width = *height = 0;
-};
+}
void wxDC::GetSize( int* width, int* height ) const
{
*width = m_maxX-m_minX;
*height = m_maxY-m_minY;
-};
+}
void wxDC::GetSizeMM( long* width, long* height ) const
{
GetSize( &w, &h );
*width = long( double(w) / (m_scaleX*m_mm_to_pix_x) );
*height = long( double(h) / (m_scaleY*m_mm_to_pix_y) );
-};
+}
void wxDC::SetTextForeground( const wxColour &col )
{
if (!Ok()) return;
m_textForegroundColour = col;
-};
+}
void wxDC::SetTextBackground( const wxColour &col )
{
if (!Ok()) return;
m_textBackgroundColour = col;
-};
+}
void wxDC::SetMapMode( int mode )
{
case MM_TEXT:
SetLogicalScale( 1.0, 1.0 );
break;
- };
+ }
if (mode != MM_TEXT)
{
m_needComputeScaleX = TRUE;
m_needComputeScaleY = TRUE;
- };
-};
+ }
+}
void wxDC::SetUserScale( double x, double y )
{
m_userScaleX = x;
m_userScaleY = y;
ComputeScaleAndOrigin();
-};
+}
void wxDC::GetUserScale( double *x, double *y )
{
if (x) *x = m_userScaleX;
if (y) *y = m_userScaleY;
-};
+}
void wxDC::SetLogicalScale( double x, double y )
{
m_logicalScaleX = x;
m_logicalScaleY = y;
ComputeScaleAndOrigin();
-};
+}
void wxDC::GetLogicalScale( double *x, double *y )
{
if (x) *x = m_logicalScaleX;
if (y) *y = m_logicalScaleY;
-};
+}
void wxDC::SetLogicalOrigin( long x, long y )
{
m_logicalOriginX = x * m_signX; // is this still correct ?
m_logicalOriginY = y * m_signY;
ComputeScaleAndOrigin();
-};
+}
void wxDC::GetLogicalOrigin( long *x, long *y )
{
if (x) *x = m_logicalOriginX;
if (y) *y = m_logicalOriginY;
-};
+}
void wxDC::SetDeviceOrigin( long x, long y )
{
m_deviceOriginX = x;
m_deviceOriginY = y;
ComputeScaleAndOrigin();
-};
+}
void wxDC::GetDeviceOrigin( long *x, long *y )
{
if (x) *x = m_deviceOriginX;
if (y) *y = m_deviceOriginY;
-};
+}
void wxDC::SetAxisOrientation( bool xLeftRight, bool yBottomUp )
{
m_signX = (xLeftRight ? 1 : -1);
m_signY = (yBottomUp ? -1 : 1);
ComputeScaleAndOrigin();
-};
+}
long wxDC::DeviceToLogicalX(long x) const
{
return XDEV2LOG(x);
-};
+}
long wxDC::DeviceToLogicalY(long y) const
{
return YDEV2LOG(y);
-};
+}
long wxDC::DeviceToLogicalXRel(long x) const
{
return XDEV2LOGREL(x);
-};
+}
long wxDC::DeviceToLogicalYRel(long y) const
{
return YDEV2LOGREL(y);
-};
+}
long wxDC::LogicalToDeviceX(long x) const
{
return XLOG2DEV(x);
-};
+}
long wxDC::LogicalToDeviceY(long y) const
{
return YLOG2DEV(y);
-};
+}
long wxDC::LogicalToDeviceXRel(long x) const
{
return XLOG2DEVREL(x);
-};
+}
long wxDC::LogicalToDeviceYRel(long y) const
{
return YLOG2DEVREL(y);
-};
+}
void wxDC::CalcBoundingBox( long x, long y )
{
if (y < m_minY) m_minY = y;
if (x > m_maxX) m_maxX = x;
if (y > m_maxY) m_maxY = y;
-};
+}
void wxDC::ComputeScaleAndOrigin(void)
{
m_pen = tempPen;
SetPen(pen);
}
-};
+}
{
m_ok = FALSE;
m_cmap = gdk_colormap_get_system();
-};
+}
wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) )
{
m_ok = FALSE;
m_cmap = gdk_colormap_get_system();
-};
+}
wxMemoryDC::~wxMemoryDC(void)
{
-};
+}
void wxMemoryDC::SelectObject( const wxBitmap& bitmap )
{
{
m_ok = FALSE;
m_window = NULL;
- };
-};
+ }
+}
void wxMemoryDC::GetSize( int *width, int *height ) const
{
{
if (width) (*width) = 0;
if (height) (*height) = 0;
- };
-};
+ }
+}
gdk_gc_set_subwindow( m_brushGC, GDK_INCLUDE_INFERIORS );
gdk_gc_set_subwindow( m_textGC, GDK_INCLUDE_INFERIORS );
gdk_gc_set_subwindow( m_bgGC, GDK_INCLUDE_INFERIORS );
-};
+}
wxScreenDC::~wxScreenDC(void)
{
EndDrawingOnTop();
-};
+}
bool wxScreenDC::StartDrawingOnTop( wxWindow *WXUNUSED(window) )
{
{
StartDrawingOnTop();
return;
- };
+ }
wxRectangle rect;
rect.x = 0;
rect.y = 0;
StartDrawingOnTop( &rect );
return TRUE;
*/
-};
+}
bool wxScreenDC::StartDrawingOnTop( wxRectangle *WXUNUSED(rect) )
{
y = rect->y;
width = rect->width;
height = rect->height;
- };
+ }
GTK cannot set transparent backgrounds. :-(
return TRUE;
*/
-};
+}
bool wxScreenDC::EndDrawingOnTop(void)
{
m_isOk = FALSE;
return TRUE;
*/
-};
+}
+
wxDropTarget::wxDropTarget()
{
-};
+}
wxDropTarget::~wxDropTarget()
{
-};
+}
void wxDropTarget::Drop( GdkEvent *event, int x, int y )
{
printf( "Drop data is of type %s.\n", event->dropdataavailable.data_type );
OnDrop( x, y, (char *)event->dropdataavailable.data);
-};
+}
void wxDropTarget::UnregisterWidget( GtkWidget *widget )
{
if (!widget) return;
gtk_widget_dnd_drop_set( widget, FALSE, NULL, 0, FALSE );
-};
+}
void wxDropTarget::RegisterWidget( GtkWidget *widget )
{
break;
default:
break;
- };
+ }
}
char *str = WXSTRINGCAST formats;
gtk_widget_dnd_drop_set( widget, TRUE, &str, valid, FALSE );
-};
+}
// ----------------------------------------------------------------------------
// wxTextDropTarget
{
OnDropText( x, y, (const char*)pData );
return TRUE;
-};
+}
bool wxTextDropTarget::OnDropText( long x, long y, const char *psz )
{
printf( "Got dropped text: %s.\n", psz );
printf( "At x: %d, y: %d.\n", (int)x, (int)y );
return TRUE;
-};
+}
size_t wxTextDropTarget::GetFormatCount() const
{
delete ptr;
source->m_retValue = wxDropSource::Copy;
-};
+}
wxDropSource::wxDropSource( wxWindow *win )
{
m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY );
m_goaheadCursor = wxCursor( wxCURSOR_HAND );
-};
+}
wxDropSource::wxDropSource( wxDataObject &data, wxWindow *win )
{
m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY );
m_goaheadCursor = wxCursor( wxCURSOR_HAND );
-};
+}
void wxDropSource::SetData( wxDataObject &data )
{
m_data = &data;
-};
+}
wxDropSource::~wxDropSource(void)
{
// if (m_data) delete m_data;
g_blockEventsOnDrag = FALSE;
-};
+}
wxDropSource::DragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) )
{
{
g_free( gdk_dnd.drag_startwindows );
gdk_dnd.drag_startwindows = NULL;
- };
+ }
gdk_dnd.drag_numwindows = gdk_dnd.drag_really = 0;
XWindowAttributes dnd_winattr;
g_blockEventsOnDrag = FALSE;
return m_retValue;
-};
+}
void wxDropSource::RegisterWindow(void)
{
gtk_signal_connect( GTK_OBJECT(m_widget), "drag_request_event",
GTK_SIGNAL_FUNC(gtk_drag_callback), (gpointer)this );
-};
+}
void wxDropSource::UnregisterWindow(void)
{
gtk_widget_dnd_drag_set( m_widget, FALSE, NULL, 0 );
gtk_signal_disconnect_by_data( GTK_OBJECT(m_widget), (gpointer)this );
-};
+}
}
dialog->OnOK( event );
-};
+}
void gtk_filedialog_cancel_callback( GtkWidget *WXUNUSED(widget), gpointer data )
{
wxFileDialog *dialog = (wxFileDialog*)data;
wxCommandEvent event(wxEVT_NULL);
dialog->OnCancel( event );
-};
+}
IMPLEMENT_DYNAMIC_CLASS(wxFileDialog,wxDialog)
gtk_signal_connect( GTK_OBJECT(sel->cancel_button), "clicked",
GTK_SIGNAL_FUNC(gtk_filedialog_cancel_callback), (gpointer*)this );
-};
+}
int wxFileDialog::ShowModal(void)
{
{
m_fileName = gtk_file_selection_get_filename( GTK_FILE_SELECTION(m_widget) );
m_path = gtk_file_selection_get_filename( GTK_FILE_SELECTION(m_widget) );
- };
+ }
return ret;
-};
+}
char *wxFileSelector(const char *title,
}
else
return NULL;
-};
+}
char* wxLoadFileSelector(const char *what, const char *extension, const char *default_name,
wxWindow *parent )
sprintf(wild, "*.%s", ext);
return wxFileSelector (prompt, NULL, default_name, ext, wild, 0, parent);
-};
+}
char* wxSaveFileSelector(const char *what, const char *extension, const char *default_name,
wxWindow *parent )
sprintf(wild, "*.%s", ext);
return wxFileSelector (prompt, NULL, default_name, ext, wild, 0, parent);
-};
+}
"wxDEFAULT", "wxDECORATIVE", "wxMODERN", "wxROMAN", "wxSCRIPT",
"wxSWISS", "wxTELETYPE",
};
+
static char *wx_font_style [] = {
"wxDEFAULT", "wxNORMAL", "wxSLANT", "wxITALIC",
};
+
static char *wx_font_weight [] = {
"wxDEFAULT", "wxNORMAL", "wxBOLD", "wxLIGHT",
};
m_fontId = 0;
m_faceName = NULL;
m_font = NULL;
-};
+}
wxFontRefData::~wxFontRefData(void)
{
wxNode *next = node->Next();
gdk_font_unref( font );
node = next;
- };
+ }
if (m_faceName)
{
delete m_faceName;
m_faceName = NULL;
- };
+ }
if (m_font) gdk_font_unref( m_font );
-};
+}
//-----------------------------------------------------------------------------
wxFont::wxFont(void)
{
if (wxTheFontList) wxTheFontList->Append( this );
-};
+}
wxFont::wxFont( char *xFontName )
{
M_FONTDATA->m_byXFontName = TRUE;
M_FONTDATA->m_font = gdk_font_load( xFontName );
-};
+}
wxFont::wxFont(int PointSize, int FontIdOrFamily, int Style, int Weight,
bool Underlined, const char* Face)
{
M_FONTDATA->m_fontId = FontIdOrFamily;
M_FONTDATA->m_family = wxTheFontNameDirectory->GetFamily( FontIdOrFamily );
- };
+ }
M_FONTDATA->m_style = Style;
M_FONTDATA->m_weight = Weight;
M_FONTDATA->m_pointSize = PointSize;
M_FONTDATA->m_underlined = Underlined;
if (wxTheFontList) wxTheFontList->Append( this );
-};
+}
wxFont::wxFont(int PointSize, const char *Face, int Family, int Style,
int Weight, bool Underlined)
M_FONTDATA->m_underlined = Underlined;
if (wxTheFontList) wxTheFontList->Append( this );
-};
+}
wxFont::wxFont( const wxFont& font )
{
Ref( font );
-};
+}
wxFont::wxFont( const wxFont* font )
{
UnRef();
if (font) Ref( *font );
-};
+}
wxFont::~wxFont(void)
{
if (wxTheFontList) wxTheFontList->DeleteObject( this );
-};
+}
wxFont& wxFont::operator = ( const wxFont& font )
{
if (*this == font) return (*this);
Ref( font );
return *this;
-};
+}
bool wxFont::operator == ( const wxFont& font )
{
return m_refData == font.m_refData;
-};
+}
bool wxFont::operator != ( const wxFont& font )
{
return m_refData != font.m_refData;
-};
+}
bool wxFont::Ok()
{
return (m_refData != NULL);
-};
+}
int wxFont::GetPointSize(void) const
{
return M_FONTDATA->m_pointSize;
-};
+}
wxString wxFont::GetFaceString(void) const
{
wxString s = wxTheFontNameDirectory->GetFontName( M_FONTDATA->m_fontId );
return s;
-};
+}
wxString wxFont::GetFaceName(void) const
{
wxString s = wxTheFontNameDirectory->GetFontName( M_FONTDATA->m_fontId );
return s;
-};
+}
int wxFont::GetFamily(void) const
{
return M_FONTDATA->m_family;
-};
+}
wxString wxFont::GetFamilyString(void) const
{
wxString s = wx_font_family[M_FONTDATA->m_family];
return s;
-};
+}
int wxFont::GetFontId(void) const
{
return M_FONTDATA->m_fontId; // stub
-};
+}
int wxFont::GetStyle(void) const
{
return M_FONTDATA->m_style;
-};
+}
wxString wxFont::GetStyleString(void) const
{
wxString s = wx_font_style[M_FONTDATA->m_style];
return s;
-};
+}
int wxFont::GetWeight(void) const
{
return M_FONTDATA->m_weight;
-};
+}
wxString wxFont::GetWeightString(void) const
{
wxString s = wx_font_weight[M_FONTDATA->m_weight];
return s;
-};
+}
bool wxFont::GetUnderlined(void) const
{
return M_FONTDATA->m_underlined;
-};
+}
//-----------------------------------------------------------------------------
// get internal representation of font
font = wxLoadQueryNearestFont( point_scale, M_FONTDATA->m_fontId, M_FONTDATA->m_style,
M_FONTDATA->m_weight, M_FONTDATA->m_underlined );
M_FONTDATA->m_scaled_xfonts.Append( int_scale, (wxObject*)font );
- };
+ }
if (!font)
printf("could not load any font");
// wxError("could not load any font", "wxFont");
return font;
-};
+}
//-----------------------------------------------------------------------------
// local utilities to find a X font
case wxNORMAL:
default: return wxWEIGHT_NORMAL;
}
-}
+};
static int SCoordinate(int s)
{
case wxNORMAL:
default: return wxSTYLE_NORMAL;
}
-}
+};
//-----------------------------------------------------------------------------
// wxSuffixMap
{
if (m_frameMenuBar) delete m_frameMenuBar;
if (m_frameStatusBar) delete m_frameStatusBar;
+ if (m_frameToolBar) delete m_frameToolBar;
// if (m_mainWindow) gtk_widget_destroy( m_mainWindow );
wxIcon::wxIcon( char **bits, int WXUNUSED(width), int WXUNUSED(height) ) :
wxBitmap( bits )
{
-};
+}
(win->m_height == alloc->height))
{
return;
- };
+ }
win->SetSize( alloc->x, alloc->y, alloc->width, alloc->height );
-};
+}
// page change callback
static void gtk_page_change_callback( GtkNotebook *WXUNUSED(widget),
mdi_frame->m_currentChild = child_frame;
mdi_frame->SetMDIMenuBar( child_frame->m_menuBar );
return;
- };
+ }
node = node->Next();
}
}
m_clientWindow = NULL;
m_currentChild = NULL;
m_parentFrameActive = TRUE;
-};
+}
wxMDIParentFrame::wxMDIParentFrame( wxWindow *parent,
wxWindowID id, const wxString& title,
m_currentChild = NULL;
m_parentFrameActive = TRUE;
Create( parent, id, title, pos, size, style, name );
-};
+}
wxMDIParentFrame::~wxMDIParentFrame(void)
{
-};
+}
bool wxMDIParentFrame::Create( wxWindow *parent,
wxWindowID id, const wxString& title,
OnCreateClient();
return TRUE;
-};
+}
void wxMDIParentFrame::GtkOnSize( int x, int y, int width, int height )
{
GetClientSize( &x, &y );
m_mdiMenuBar->SetSize( 1, 1, x-2, 26 );
}
-};
+}
void wxMDIParentFrame::SetMDIMenuBar( wxMenuBar *menu_bar )
{
m_mdiMenuBar->SetSize( 1, 1, x-2, 26 );
m_mdiMenuBar->Show( TRUE );
}
-};
+}
void wxMDIParentFrame::GetClientSize(int *width, int *height ) const
{
wxFrame::GetClientSize( width, height );
-};
+}
wxMDIChildFrame *wxMDIParentFrame::GetActiveChild(void) const
{
return m_currentChild;
-};
+}
wxMDIClientWindow *wxMDIParentFrame::GetClientWindow(void) const
{
return m_clientWindow;
-};
+}
wxMDIClientWindow *wxMDIParentFrame::OnCreateClient(void)
{
m_clientWindow = new wxMDIClientWindow( this );
return m_clientWindow;
-};
+}
void wxMDIParentFrame::ActivateNext(void)
{
if (m_clientWindow)
gtk_notebook_next_page( GTK_NOTEBOOK(m_clientWindow->m_widget) );
-};
+}
void wxMDIParentFrame::ActivatePrevious(void)
{
if (m_clientWindow)
gtk_notebook_prev_page( GTK_NOTEBOOK(m_clientWindow->m_widget) );
-};
+}
void wxMDIParentFrame::OnActivate( wxActivateEvent& WXUNUSED(event) )
{
-};
+}
void wxMDIParentFrame::OnSysColourChanged( wxSysColourChangedEvent& WXUNUSED(event) )
{
-};
+}
//-----------------------------------------------------------------------------
// wxMDIChildFrame
{
m_menuBar = NULL;
m_page = NULL;
-};
+}
wxMDIChildFrame::wxMDIChildFrame( wxMDIParentFrame *parent,
wxWindowID id, const wxString& title,
m_menuBar = NULL;
m_page = NULL;
Create( parent, id, title, wxDefaultPosition, size, style, name );
-};
+}
wxMDIChildFrame::~wxMDIChildFrame(void)
{
{
mdi_frame->SetMDIMenuBar( NULL );
mdi_frame->m_currentChild = NULL;
- };
+ }
delete m_menuBar;
}
-};
+}
bool wxMDIChildFrame::Create( wxMDIParentFrame *parent,
wxWindowID id, const wxString& title,
{
m_title = title;
return wxWindow::Create( parent->GetClientWindow(), id, wxDefaultPosition, size, style, name );
-};
+}
void wxMDIChildFrame::GetClientSize( int *width, int *height ) const
{
if (menuitem->IsSubMenu())
SetInvokingWindow( menuitem->GetSubMenu(), win );
node = node->Next();
- };
-};
+ }
+}
void wxMDIChildFrame::SetMenuBar( wxMenuBar *menu_bar )
{
wxMenu *menu = (wxMenu*)node->Data();
SetInvokingWindow( menu, this );
node = node->Next();
- };
+ }
m_menuBar->m_parent = mdi_frame;
}
gtk_myfixed_put( GTK_MYFIXED(mdi_frame->m_mainWindow),
m_menuBar->m_widget, m_menuBar->m_x, m_menuBar->m_y );
}
-};
+}
wxMenuBar *wxMDIChildFrame::GetMenuBar()
{
return m_menuBar;
-};
+}
void wxMDIChildFrame::Activate(void)
{
-};
+}
void wxMDIChildFrame::OnActivate( wxActivateEvent &WXUNUSED(event) )
{
-};
+}
//-----------------------------------------------------------------------------
// wxMDIClientWindow
wxMDIClientWindow::wxMDIClientWindow(void)
{
-};
+}
wxMDIClientWindow::wxMDIClientWindow( wxMDIParentFrame *parent, long style )
{
CreateClient( parent, style );
-};
+}
wxMDIClientWindow::~wxMDIClientWindow(void)
{
-};
+}
bool wxMDIClientWindow::CreateClient( wxMDIParentFrame *parent, long style )
{
Show( TRUE );
return TRUE;
-};
+}
void wxMDIClientWindow::AddChild( wxWindow *child )
{
{
wxFAIL_MSG("wxNotebook::AddChild: Child has to be wxMDIChildFrame");
return;
- };
+ }
m_children.Append( child );
gtk_notebook_set_page( GTK_NOTEBOOK(m_widget), m_children.Number()-1 );
gtk_page_change_callback( NULL, mdi_child->m_page, 0, this );
-};
+}
m_page = NULL;
m_client = NULL;
m_parent = NULL;
- };
+ }
//private:
int m_id;
(win->m_height == alloc->height))
{
return;
- };
+ }
/*
printf( "OnResize from " );
printf( " W: %d H: %d ", win->m_width, win->m_height );
printf( " .\n" );
*/
-};
+}
//-----------------------------------------------------------------------------
// wxNotebook
wxNotebook::wxNotebook()
{
Init();
-};
+}
wxNotebook::wxNotebook( wxWindow *parent, wxWindowID id,
const wxPoint& pos, const wxSize& size,
{
Init();
Create( parent, id, pos, size, style, name );
-};
+}
wxNotebook::~wxNotebook()
{
gtk_signal_disconnect(GTK_OBJECT(m_widget), m_idHandler);
DeleteAllPages();
-};
+}
bool wxNotebook::Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos, const wxSize& size,
Show( TRUE );
return TRUE;
-};
+}
int wxNotebook::GetSelection() const
{
if (page->m_page == g_page)
break;
node = node->Next();
- };
+ }
wxCHECK_MSG( node != NULL, -1, "wxNotebook: no selection?" );
return page->m_id;
-};
+}
int wxNotebook::GetPageCount() const
{
return m_pages.Number();
-};
+}
int wxNotebook::GetRowCount() const
{
return 1;
-};
+}
wxString wxNotebook::GetPageText( int page ) const
{
return nb_page->m_text;
else
return "";
-};
+}
int wxNotebook::GetPageImage( int page ) const
{
return nb_page->m_image;
else
return 0;
-};
+}
wxNotebookPage* wxNotebook::GetNotebookPage(int page) const
{
if (nb_page->m_id == page)
return nb_page;
node = node->Next();
- };
+ }
wxLogDebug( "Notebook page %d not found!", page );
return NULL;
-};
+}
int wxNotebook::SetSelection( int page )
{
break;
page_num++;
child = child->next;
- };
+ }
if (!child) return -1;
gtk_notebook_set_page( GTK_NOTEBOOK(m_widget), page_num );
return selOld;
-};
+}
void wxNotebook::AdvanceSelection(bool bForward)
{
void wxNotebook::SetImageList( wxImageList* imageList )
{
m_imageList = imageList;
-};
+}
bool wxNotebook::SetPageText( int page, const wxString &text )
{
nb_page->m_text = text;
return TRUE;
-};
+}
bool wxNotebook::SetPageImage( int page, int image )
{
nb_page->m_image = image;
return TRUE;
-};
+}
void wxNotebook::SetPageSize( const wxSize &WXUNUSED(size) )
{
wxFAIL_MSG(_("wxNotebook::SetPageSize not implemented"));
-};
+}
void wxNotebook::SetPadding( const wxSize &WXUNUSED(padding) )
{
wxFAIL_MSG(_("wxNotebook::SetPadding not implemented"));
-};
+}
bool wxNotebook::DeleteAllPages()
{
DeletePage( page->m_id );
page_node = m_pages.First();
- };
+ }
return TRUE;
-};
+}
bool wxNotebook::DeletePage( int page )
{
if (nb_page->m_page == (GtkNotebookPage*)child->data) break;
page_num++;
child = child->next;
- };
+ }
wxASSERT( child );
m_pages.DeleteObject( nb_page );
return TRUE;
-};
+}
bool wxNotebook::AddPage(wxWindow* win, const wxString& text,
bool bSelect, int imageId)
if ( page->m_client == win )
break; // found
node = node->Next();
- };
+ }
wxCHECK_MSG(page != NULL, FALSE,
_("Can't add a page whose parent is not the notebook!"));
}
return TRUE;
-};
+}
wxWindow *wxNotebook::GetPage( int page ) const
{
return NULL;
else
return nb_page->m_client;
-};
+}
void wxNotebook::AddChild( wxWindow *win )
{
}
m_pages.Append( page );
-};
+}
// override these 2 functions to do nothing: everything is done in OnSize
void wxNotebook::SetConstraintSizes( bool WXUNUSED(recurse) )
m_style = wxSOLID;
m_joinStyle = wxJOIN_ROUND;
m_capStyle = wxCAP_ROUND;
-};
+}
//-----------------------------------------------------------------------------
wxPen::wxPen(void)
{
if (wxThePenList) wxThePenList->AddPen( this );
-};
+}
wxPen::wxPen( const wxColour &colour, int width, int style )
{
M_PENDATA->m_style = style;
M_PENDATA->m_colour = colour;
if (wxThePenList) wxThePenList->AddPen( this );
-};
+}
wxPen::wxPen( const wxString &colourName, int width, int style )
{
M_PENDATA->m_style = style;
M_PENDATA->m_colour = colourName;
if (wxThePenList) wxThePenList->AddPen( this );
-};
+}
wxPen::wxPen( const wxPen& pen )
{
Ref( pen );
if (wxThePenList) wxThePenList->AddPen( this );
-};
+}
wxPen::wxPen( const wxPen* pen )
{
UnRef();
if (pen) Ref( *pen );
if (wxThePenList) wxThePenList->AddPen( this );
-};
+}
wxPen::~wxPen(void)
{
if (wxThePenList) wxThePenList->RemovePen( this );
-};
+}
wxPen& wxPen::operator = ( const wxPen& pen )
{
if (*this == pen) return (*this);
Ref( pen );
return *this;
-};
+}
bool wxPen::operator == ( const wxPen& pen )
{
return m_refData == pen.m_refData;
-};
+}
bool wxPen::operator != ( const wxPen& pen )
{
return m_refData != pen.m_refData;
-};
+}
void wxPen::SetColour( const wxColour &colour )
{
m_refData = new wxPenRefData();
M_PENDATA->m_colour = colour;
-};
+}
void wxPen::SetColour( const wxString &colourName )
{
m_refData = new wxPenRefData();
M_PENDATA->m_colour = colourName;
-};
+}
void wxPen::SetColour( int red, int green, int blue )
{
m_refData = new wxPenRefData();
M_PENDATA->m_colour.Set( red, green, blue );
-};
+}
void wxPen::SetCap( int capStyle )
{
m_refData = new wxPenRefData();
M_PENDATA->m_capStyle = capStyle;
-};
+}
void wxPen::SetJoin( int joinStyle )
{
m_refData = new wxPenRefData();
M_PENDATA->m_joinStyle = joinStyle;
-};
+}
void wxPen::SetStyle( int style )
{
m_refData = new wxPenRefData();
M_PENDATA->m_style = style;
-};
+}
void wxPen::SetWidth( int width )
{
m_refData = new wxPenRefData();
M_PENDATA->m_width = width;
-};
+}
int wxPen::GetCap(void) const
{
return M_PENDATA->m_capStyle;
-};
+}
int wxPen::GetJoin(void) const
{
return 0;
else
return M_PENDATA->m_joinStyle;
-};
+}
int wxPen::GetStyle(void) const
{
return 0;
else
return M_PENDATA->m_style;
-};
+}
int wxPen::GetWidth(void) const
{
return 0;
else
return M_PENDATA->m_width;
-};
+}
wxColour &wxPen::GetColour(void) const
{
return wxNullColour;
else
return M_PENDATA->m_colour;
-};
+}
bool wxPen::Ok(void) const
{
return (m_refData);
-};
+}
wxRegionRefData::wxRegionRefData(void)
{
m_region = NULL;
-};
+}
wxRegionRefData::~wxRegionRefData(void)
{
if (m_region) gdk_region_destroy( m_region );
-};
+}
//-----------------------------------------------------------------------------
rect.height = h;
M_REGIONDATA->m_region = gdk_region_union_with_rect( reg, &rect );
gdk_region_destroy( reg );
-};
+}
wxRegion::wxRegion( const wxPoint& topLeft, const wxPoint& bottomRight )
{
rect.height = bottomRight.y - rect.y;
M_REGIONDATA->m_region = gdk_region_union_with_rect( reg, &rect );
gdk_region_destroy( reg );
-};
+}
wxRegion::wxRegion( const wxRect& rect )
{
g_rect.height = rect.height;
M_REGIONDATA->m_region = gdk_region_union_with_rect( reg, &g_rect );
gdk_region_destroy( reg );
-};
+}
wxRegion::wxRegion(void)
{
m_refData = new wxRegionRefData();
M_REGIONDATA->m_region = gdk_region_new();
-};
+}
wxRegion::~wxRegion(void)
{
-};
+}
void wxRegion::Clear(void)
{
UnRef();
m_refData = new wxRegionRefData();
M_REGIONDATA->m_region = gdk_region_new();
-};
+}
bool wxRegion::Union( long x, long y, long width, long height )
{
gdk_region_destroy( M_REGIONDATA->m_region );
M_REGIONDATA->m_region = reg;
return TRUE;
-};
+}
bool wxRegion::Union( const wxRect& rect )
{
gdk_region_destroy( M_REGIONDATA->m_region );
M_REGIONDATA->m_region = reg;
return TRUE;
-};
+}
bool wxRegion::Union( const wxRegion& region )
{
gdk_region_destroy( M_REGIONDATA->m_region );
M_REGIONDATA->m_region = reg;
return TRUE;
-};
+}
bool wxRegion::Intersect( long x, long y, long width, long height )
{
wxRegion reg( x, y, width, height );
Intersect( reg );
return TRUE;
-};
+}
bool wxRegion::Intersect( const wxRect& rect )
{
wxRegion reg( rect );
Intersect( reg );
return TRUE;
-};
+}
bool wxRegion::Intersect( const wxRegion& region )
{
gdk_region_destroy( M_REGIONDATA->m_region );
M_REGIONDATA->m_region = reg;
return TRUE;
-};
+}
bool wxRegion::Subtract( long x, long y, long width, long height )
{
wxRegion reg( x, y, width, height );
Subtract( reg );
return TRUE;
-};
+}
bool wxRegion::Subtract( const wxRect& rect )
{
wxRegion reg( rect );
Subtract( reg );
return TRUE;
-};
+}
bool wxRegion::Subtract( const wxRegion& region )
{
gdk_region_destroy( M_REGIONDATA->m_region );
M_REGIONDATA->m_region = reg;
return TRUE;
-};
+}
bool wxRegion::Xor( long x, long y, long width, long height )
{
wxRegion reg( x, y, width, height );
Xor( reg );
return TRUE;
-};
+}
bool wxRegion::Xor( const wxRect& rect )
{
wxRegion reg( rect );
Xor( reg );
return TRUE;
-};
+}
bool wxRegion::Xor( const wxRegion& region )
{
gdk_region_destroy( M_REGIONDATA->m_region );
M_REGIONDATA->m_region = reg;
return TRUE;
-};
+}
void wxRegion::GetBox( long& x, long& y, long&w, long &h ) const
{
y = 0;
w = -1;
h = -1;
-};
+}
wxRect wxRegion::GetBox(void) const
{
return wxRect( 0, 0, -1, -1 );
-};
+}
bool wxRegion::Empty(void) const
{
return gdk_region_empty( M_REGIONDATA->m_region );
-};
+}
wxRegionContain wxRegion::Contains( long x, long y ) const
{
return wxInRegion;
else
return wxOutRegion;
-};
+}
wxRegionContain wxRegion::Contains( long x, long y, long w, long h ) const
{
case GDK_OVERLAP_RECTANGLE_IN: return wxInRegion;
case GDK_OVERLAP_RECTANGLE_OUT: return wxOutRegion;
case GDK_OVERLAP_RECTANGLE_PART: return wxPartRegion;
- };
+ }
return wxOutRegion;
-};
+}
GdkRegion *wxRegion::GetRegion(void) const
{
return M_REGIONDATA->m_region;
-};
+}
new wxColour( style->bg[0].red >> SHIFT,
style->bg[0].green >> SHIFT,
style->bg[0].blue >> SHIFT );
- };
+ }
return *g_systemBtnFaceColour;
- };
+ }
case wxSYS_COLOUR_BTNSHADOW:
{
GtkStyle *style = gtk_widget_get_default_style();
new wxColour( style->dark[0].red >> SHIFT,
style->dark[0].green >> SHIFT,
style->dark[0].blue >> SHIFT );
- };
+ }
return *g_systemBtnShadowColour;
- };
+ }
case wxSYS_COLOUR_GRAYTEXT:
case wxSYS_COLOUR_BTNHIGHLIGHT:
{
new wxColour( style->light[0].red >> SHIFT,
style->light[0].green >> SHIFT,
style->light[0].blue >> SHIFT );
- };
+ }
return *g_systemBtnHighlightColour;
- };
+ }
case wxSYS_COLOUR_HIGHLIGHT:
{
GtkStyle *style = gtk_widget_get_default_style();
new wxColour( style->bg[GTK_STATE_SELECTED].red >> SHIFT,
style->bg[GTK_STATE_SELECTED].green >> SHIFT,
style->bg[GTK_STATE_SELECTED].blue >> SHIFT );
- };
+ }
return *g_systemHighlightColour;
- };
+ }
case wxSYS_COLOUR_MENUTEXT:
case wxSYS_COLOUR_WINDOWTEXT:
case wxSYS_COLOUR_CAPTIONTEXT:
case wxSYS_COLOUR_INFOTEXT:
{
return *wxBLACK;
- };
+ }
case wxSYS_COLOUR_HIGHLIGHTTEXT:
{
return *wxWHITE;
- };
+ }
case wxSYS_COLOUR_INFOBK:
case wxSYS_COLOUR_APPWORKSPACE:
{
return *wxWHITE; // ?
- };
- };
+ }
+ }
return *wxWHITE;
-};
+}
wxFont wxSystemSettings::GetSystemFont( int index )
{
case wxSYS_SYSTEM_FIXED_FONT:
{
return *wxNORMAL_FONT;
- };
+ }
case wxSYS_ANSI_VAR_FONT:
case wxSYS_SYSTEM_FONT:
case wxSYS_DEVICE_DEFAULT_FONT:
if (!g_systemFont)
g_systemFont = new wxFont( "-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*" );
return *g_systemFont;
- };
- };
+ }
+ }
return wxNullFont;
}
-;
int wxSystemSettings::GetSystemMetric( int index )
{
return gdk_screen_width();
case wxSYS_SCREEN_Y:
return gdk_screen_height();
- };
+ }
return 0;
-}
-;
-
+}
\ No newline at end of file
timer->Notify();
if (timer->OneShot()) timer->Stop();
return TRUE;
-};
+}
wxTimer::wxTimer(void)
{
m_tag = -1;
m_time = 1000;
m_oneShot = FALSE;
-};
+}
wxTimer::~wxTimer(void)
{
Stop();
-};
+}
int wxTimer::Interval(void)
{
return m_time;
-};
+}
bool wxTimer::OneShot(void)
{
return m_oneShot;
-};
+}
void wxTimer::Notify(void)
{
-};
+}
void wxTimer::Start( int millisecs, bool oneShot )
{
if (millisecs != -1) m_time = millisecs;
m_oneShot = oneShot;
m_tag = gtk_timeout_add( millisecs, timeout_callback, this );
-};
+}
void wxTimer::Stop(void)
{
if (m_tag != -1)
gtk_timeout_remove( m_tag );
m_tag = -1;
-};
+}