"wxGDIObject * => &" related changes (see mail to the list)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1142 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1998-12-09 17:30:17 +00:00
parent e7003166c3
commit 8bbe427f8e
66 changed files with 2551 additions and 2698 deletions

View File

@@ -222,7 +222,7 @@ public:
protected:
static bool IsImmutable(const wxString& key)
{ return key[0u] == wxCONFIG_IMMUTABLE_PREFIX; }
{ return !key.IsEmpty() && key[0u] == wxCONFIG_IMMUTABLE_PREFIX; }
private:
// are we doing automatic environment variable expansion?

View File

@@ -75,7 +75,6 @@ public:
wxBitmap( const char **bits );
wxBitmap( char **bits );
wxBitmap( const wxBitmap& bmp );
wxBitmap( const wxBitmap* bmp );
wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM );
~wxBitmap();
wxBitmap& operator = ( const wxBitmap& bmp );

View File

@@ -37,20 +37,19 @@ class wxBrush: public wxGDIObject
public:
wxBrush(void);
wxBrush();
wxBrush( const wxColour &colour, int style );
wxBrush( const wxBitmap &stippleBitmap );
wxBrush( const wxBrush &brush );
wxBrush( const wxBrush *brush );
~wxBrush(void);
~wxBrush();
wxBrush& operator = ( const wxBrush& brush );
bool operator == ( const wxBrush& brush );
bool operator != ( const wxBrush& brush );
bool Ok(void) const;
bool Ok() const;
int GetStyle(void) const;
wxColour &GetColour(void) const;
wxBitmap *GetStipple(void) const;
int GetStyle() const;
wxColour &GetColour() const;
wxBitmap *GetStipple() const;
void SetColour( const wxColour& col );
@@ -58,7 +57,7 @@ class wxBrush: public wxGDIObject
void SetStyle( int style );
void SetStipple( const wxBitmap& stipple );
void Unshare(void);
void Unshare();
// no data :-)
};

View File

@@ -50,7 +50,6 @@ public:
// copy ctors and assignment operators
wxColour( const wxColour& col );
wxColour( const wxColour* col );
wxColour& operator = ( const wxColour& col );
// dtor

View File

@@ -19,14 +19,6 @@
#include "wx/object.h"
#include "wx/gdicmn.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxWindow;
class wxCursor;
//-----------------------------------------------------------------------------
// wxCursor
//-----------------------------------------------------------------------------
@@ -37,22 +29,16 @@ class wxCursor: public wxObject
public:
wxCursor(void);
wxCursor();
wxCursor( int cursorId );
wxCursor( const wxCursor &cursor );
wxCursor( const wxCursor *cursor );
~wxCursor(void);
~wxCursor();
wxCursor& operator = ( const wxCursor& cursor );
bool operator == ( const wxCursor& cursor );
bool operator != ( const wxCursor& cursor );
bool Ok(void) const;
bool operator == ( const wxCursor& cursor ) const;
bool operator != ( const wxCursor& cursor ) const;
bool Ok() const;
private:
public:
friend wxWindow;
GdkCursor *GetCursor(void) const;
GdkCursor *GetCursor() const;
// no data :-)
};

View File

@@ -189,16 +189,16 @@ public:
virtual void Clear() = 0;
virtual void SetFont( const wxFont &font ) = 0;
virtual wxFont *GetFont() { return &m_font; };
virtual const wxFont& GetFont() const { return m_font; };
virtual void SetPen( const wxPen &pen ) = 0;
virtual wxPen *GetPen() { return &m_pen; };
virtual const wxPen& GetPen() const { return m_pen; };
virtual void SetBrush( const wxBrush &brush ) = 0;
virtual wxBrush *GetBrush() { return &m_brush; };
virtual const wxBrush& GetBrush() const { return m_brush; };
virtual void SetBackground( const wxBrush &brush ) = 0;
virtual wxBrush *GetBackground() { return &m_backgroundBrush; };
virtual const wxBrush& GetBackground() const { return m_backgroundBrush; };
virtual void SetLogicalFunction( int function ) = 0;
virtual int GetLogicalFunction() { return m_logicalFunction; };

View File

@@ -47,30 +47,29 @@ class wxFont: public wxGDIObject
DECLARE_DYNAMIC_CLASS(wxFont)
public:
wxFont(void);
wxFont();
wxFont( int PointSize, int FontIdOrFamily, int Style, int Weight,
bool underlined = FALSE, const char *Face= ( const char *) NULL );
wxFont( int PointSize, const char *Face, int Family, int Style, int Weight,
bool underlined = FALSE );
bool underlined = FALSE, const char *Face = ( const char *) NULL );
wxFont( int PointSize, const char *Face, int Family,
int Style, int Weight, bool underlined = FALSE );
wxFont( const wxFont& font );
wxFont( const wxFont* font );
~wxFont(void);
~wxFont();
wxFont& operator = ( const wxFont& font );
bool operator == ( const wxFont& font );
bool operator != ( const wxFont& font );
bool Ok() const;
int GetPointSize(void) const;
wxString GetFaceName(void) const;
int GetFamily(void) const;
wxString GetFamilyString(void) const;
int GetFontId(void) const;
wxString GetFaceString(void) const;
int GetStyle(void) const;
wxString GetStyleString(void) const;
int GetWeight(void) const;
wxString GetWeightString(void) const;
bool GetUnderlined(void) const;
int GetPointSize() const;
wxString GetFaceName() const;
int GetFamily() const;
wxString GetFamilyString() const;
int GetFontId() const;
wxString GetFaceString() const;
int GetStyle() const;
wxString GetStyleString() const;
int GetWeight() const;
wxString GetWeightString() const;
bool GetUnderlined() const;
wxFont( char *xFontName );
@@ -90,10 +89,10 @@ class wxFontNameDirectory: public wxObject
DECLARE_DYNAMIC_CLASS(wxFontNameDirectory)
public:
wxFontNameDirectory(void);
wxFontNameDirectory();
~wxFontNameDirectory();
void Initialize(void);
void Initialize();
void Initialize(int fontid, int family, const char *name);
int FindOrCreateFontId(const char *name, int family);
@@ -101,11 +100,10 @@ class wxFontNameDirectory: public wxObject
int GetFamily(int fontid);
int GetFontId(const char *name);
char* GetFontName(int fontid);
int GetNewFontId(void);
int GetNewFontId();
char* GetPostScriptName(int fontid, int weight, int style);
char* GetScreenName(int fontid, int weight, int style);
class wxHashTable *table;
int nextFontId;
};

View File

@@ -35,9 +35,8 @@ class wxIcon: public wxBitmap
public:
wxIcon(void);
wxIcon();
wxIcon( const wxIcon& icon);
wxIcon( const wxIcon* icon);
wxIcon( const char **bits, int width=-1, int height=-1 );
wxIcon( char **bits, int width=-1, int height=-1 );

View File

@@ -50,7 +50,9 @@ public:
// the item's text = name
void SetName(const wxString& str);
void SetText(const wxString& str) { SetName(str); } // compatibility
const wxString& GetName() const { return m_text; }
const wxString& GetText() const { return GetName(); }
// what kind of menu item we are
void SetCheckable(bool checkable) { m_isCheckMenu = checkable; }

View File

@@ -37,15 +37,14 @@ class wxPalette: public wxGDIObject
public:
wxPalette(void);
wxPalette();
wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue );
wxPalette( const wxPalette& palette );
wxPalette( const wxPalette* palette );
~wxPalette(void);
~wxPalette();
wxPalette& operator = ( const wxPalette& palette );
bool operator == ( const wxPalette& palette );
bool operator != ( const wxPalette& palette );
bool Ok(void) const;
bool Ok() const;
bool Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
int GetPixel( const unsigned char red, const unsigned char green, const unsigned char blue ) const;

View File

@@ -37,11 +37,10 @@ class wxPen: public wxGDIObject
public:
wxPen(void);
wxPen();
wxPen( const wxColour &colour, int width, int style );
wxPen( const wxPen& pen );
wxPen( const wxPen* pen );
~wxPen(void);
~wxPen();
wxPen& operator = ( const wxPen& pen );
bool operator == ( const wxPen& pen );
bool operator != ( const wxPen& pen );
@@ -52,14 +51,14 @@ class wxPen: public wxGDIObject
void SetJoin( int joinStyle );
void SetStyle( int style );
void SetWidth( int width );
wxColour &GetColour(void) const;
int GetCap(void) const;
int GetJoin(void) const;
int GetStyle(void) const;
int GetWidth(void) const;
bool Ok(void) const;
wxColour &GetColour() const;
int GetCap() const;
int GetJoin() const;
int GetStyle() const;
int GetWidth() const;
bool Ok() const;
void Unshare(void);
void Unshare();
// no data :-)
};

View File

@@ -155,7 +155,8 @@ public:
virtual bool OnClose();
virtual void AddChild( wxWindow *child );
wxList& GetChildren() const;
wxList& GetChildren() { return m_children; }
virtual void RemoveChild( wxWindow *child );
void SetReturnCode( int retCode );
int GetReturnCode();
@@ -167,7 +168,7 @@ public:
{ m_parent = p; }
virtual wxWindow *ReParent( wxWindow *newParent );
wxEvtHandler *GetEventHandler();
wxEvtHandler *GetEventHandler() const;
void SetEventHandler( wxEvtHandler *handler );
void PushEventHandler( wxEvtHandler *handler );
wxEvtHandler *PopEventHandler( bool deleteHandler = FALSE );
@@ -187,7 +188,7 @@ public:
bool IsBeingDeleted();
void SetId( wxWindowID id );
wxWindowID GetId();
wxWindowID GetId() const;
void SetCursor( const wxCursor &cursor );
@@ -213,13 +214,13 @@ public:
const wxFont *theFont = (const wxFont *) NULL, bool use16 = FALSE) const;
virtual void SetFont( const wxFont &font );
virtual wxFont *GetFont();
virtual const wxFont& GetFont() { return m_font; }
// For backward compatibility
inline virtual void SetButtonFont(const wxFont& font) { SetFont(font); }
inline virtual void SetLabelFont(const wxFont& font) { SetFont(font); }
inline virtual wxFont *GetLabelFont() { return GetFont(); };
inline virtual wxFont *GetButtonFont() { return GetFont(); };
inline virtual const wxFont& GetLabelFont() { return GetFont(); };
inline virtual const wxFont& GetButtonFont() { return GetFont(); };
virtual void SetWindowStyleFlag( long flag );
virtual long GetWindowStyleFlag() const;

View File

@@ -75,7 +75,6 @@ public:
wxBitmap( const char **bits );
wxBitmap( char **bits );
wxBitmap( const wxBitmap& bmp );
wxBitmap( const wxBitmap* bmp );
wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM );
~wxBitmap();
wxBitmap& operator = ( const wxBitmap& bmp );

View File

@@ -37,20 +37,19 @@ class wxBrush: public wxGDIObject
public:
wxBrush(void);
wxBrush();
wxBrush( const wxColour &colour, int style );
wxBrush( const wxBitmap &stippleBitmap );
wxBrush( const wxBrush &brush );
wxBrush( const wxBrush *brush );
~wxBrush(void);
~wxBrush();
wxBrush& operator = ( const wxBrush& brush );
bool operator == ( const wxBrush& brush );
bool operator != ( const wxBrush& brush );
bool Ok(void) const;
bool Ok() const;
int GetStyle(void) const;
wxColour &GetColour(void) const;
wxBitmap *GetStipple(void) const;
int GetStyle() const;
wxColour &GetColour() const;
wxBitmap *GetStipple() const;
void SetColour( const wxColour& col );
@@ -58,7 +57,7 @@ class wxBrush: public wxGDIObject
void SetStyle( int style );
void SetStipple( const wxBitmap& stipple );
void Unshare(void);
void Unshare();
// no data :-)
};

View File

@@ -50,7 +50,6 @@ public:
// copy ctors and assignment operators
wxColour( const wxColour& col );
wxColour( const wxColour* col );
wxColour& operator = ( const wxColour& col );
// dtor

View File

@@ -19,14 +19,6 @@
#include "wx/object.h"
#include "wx/gdicmn.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxWindow;
class wxCursor;
//-----------------------------------------------------------------------------
// wxCursor
//-----------------------------------------------------------------------------
@@ -37,22 +29,16 @@ class wxCursor: public wxObject
public:
wxCursor(void);
wxCursor();
wxCursor( int cursorId );
wxCursor( const wxCursor &cursor );
wxCursor( const wxCursor *cursor );
~wxCursor(void);
~wxCursor();
wxCursor& operator = ( const wxCursor& cursor );
bool operator == ( const wxCursor& cursor );
bool operator != ( const wxCursor& cursor );
bool Ok(void) const;
bool operator == ( const wxCursor& cursor ) const;
bool operator != ( const wxCursor& cursor ) const;
bool Ok() const;
private:
public:
friend wxWindow;
GdkCursor *GetCursor(void) const;
GdkCursor *GetCursor() const;
// no data :-)
};

View File

@@ -189,16 +189,16 @@ public:
virtual void Clear() = 0;
virtual void SetFont( const wxFont &font ) = 0;
virtual wxFont *GetFont() { return &m_font; };
virtual const wxFont& GetFont() const { return m_font; };
virtual void SetPen( const wxPen &pen ) = 0;
virtual wxPen *GetPen() { return &m_pen; };
virtual const wxPen& GetPen() const { return m_pen; };
virtual void SetBrush( const wxBrush &brush ) = 0;
virtual wxBrush *GetBrush() { return &m_brush; };
virtual const wxBrush& GetBrush() const { return m_brush; };
virtual void SetBackground( const wxBrush &brush ) = 0;
virtual wxBrush *GetBackground() { return &m_backgroundBrush; };
virtual const wxBrush& GetBackground() const { return m_backgroundBrush; };
virtual void SetLogicalFunction( int function ) = 0;
virtual int GetLogicalFunction() { return m_logicalFunction; };

View File

@@ -47,30 +47,29 @@ class wxFont: public wxGDIObject
DECLARE_DYNAMIC_CLASS(wxFont)
public:
wxFont(void);
wxFont();
wxFont( int PointSize, int FontIdOrFamily, int Style, int Weight,
bool underlined = FALSE, const char *Face= ( const char *) NULL );
wxFont( int PointSize, const char *Face, int Family, int Style, int Weight,
bool underlined = FALSE );
bool underlined = FALSE, const char *Face = ( const char *) NULL );
wxFont( int PointSize, const char *Face, int Family,
int Style, int Weight, bool underlined = FALSE );
wxFont( const wxFont& font );
wxFont( const wxFont* font );
~wxFont(void);
~wxFont();
wxFont& operator = ( const wxFont& font );
bool operator == ( const wxFont& font );
bool operator != ( const wxFont& font );
bool Ok() const;
int GetPointSize(void) const;
wxString GetFaceName(void) const;
int GetFamily(void) const;
wxString GetFamilyString(void) const;
int GetFontId(void) const;
wxString GetFaceString(void) const;
int GetStyle(void) const;
wxString GetStyleString(void) const;
int GetWeight(void) const;
wxString GetWeightString(void) const;
bool GetUnderlined(void) const;
int GetPointSize() const;
wxString GetFaceName() const;
int GetFamily() const;
wxString GetFamilyString() const;
int GetFontId() const;
wxString GetFaceString() const;
int GetStyle() const;
wxString GetStyleString() const;
int GetWeight() const;
wxString GetWeightString() const;
bool GetUnderlined() const;
wxFont( char *xFontName );
@@ -90,10 +89,10 @@ class wxFontNameDirectory: public wxObject
DECLARE_DYNAMIC_CLASS(wxFontNameDirectory)
public:
wxFontNameDirectory(void);
wxFontNameDirectory();
~wxFontNameDirectory();
void Initialize(void);
void Initialize();
void Initialize(int fontid, int family, const char *name);
int FindOrCreateFontId(const char *name, int family);
@@ -101,11 +100,10 @@ class wxFontNameDirectory: public wxObject
int GetFamily(int fontid);
int GetFontId(const char *name);
char* GetFontName(int fontid);
int GetNewFontId(void);
int GetNewFontId();
char* GetPostScriptName(int fontid, int weight, int style);
char* GetScreenName(int fontid, int weight, int style);
class wxHashTable *table;
int nextFontId;
};

View File

@@ -35,9 +35,8 @@ class wxIcon: public wxBitmap
public:
wxIcon(void);
wxIcon();
wxIcon( const wxIcon& icon);
wxIcon( const wxIcon* icon);
wxIcon( const char **bits, int width=-1, int height=-1 );
wxIcon( char **bits, int width=-1, int height=-1 );

View File

@@ -50,7 +50,9 @@ public:
// the item's text = name
void SetName(const wxString& str);
void SetText(const wxString& str) { SetName(str); } // compatibility
const wxString& GetName() const { return m_text; }
const wxString& GetText() const { return GetName(); }
// what kind of menu item we are
void SetCheckable(bool checkable) { m_isCheckMenu = checkable; }

View File

@@ -37,15 +37,14 @@ class wxPalette: public wxGDIObject
public:
wxPalette(void);
wxPalette();
wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue );
wxPalette( const wxPalette& palette );
wxPalette( const wxPalette* palette );
~wxPalette(void);
~wxPalette();
wxPalette& operator = ( const wxPalette& palette );
bool operator == ( const wxPalette& palette );
bool operator != ( const wxPalette& palette );
bool Ok(void) const;
bool Ok() const;
bool Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
int GetPixel( const unsigned char red, const unsigned char green, const unsigned char blue ) const;

View File

@@ -37,11 +37,10 @@ class wxPen: public wxGDIObject
public:
wxPen(void);
wxPen();
wxPen( const wxColour &colour, int width, int style );
wxPen( const wxPen& pen );
wxPen( const wxPen* pen );
~wxPen(void);
~wxPen();
wxPen& operator = ( const wxPen& pen );
bool operator == ( const wxPen& pen );
bool operator != ( const wxPen& pen );
@@ -52,14 +51,14 @@ class wxPen: public wxGDIObject
void SetJoin( int joinStyle );
void SetStyle( int style );
void SetWidth( int width );
wxColour &GetColour(void) const;
int GetCap(void) const;
int GetJoin(void) const;
int GetStyle(void) const;
int GetWidth(void) const;
bool Ok(void) const;
wxColour &GetColour() const;
int GetCap() const;
int GetJoin() const;
int GetStyle() const;
int GetWidth() const;
bool Ok() const;
void Unshare(void);
void Unshare();
// no data :-)
};

View File

@@ -155,7 +155,8 @@ public:
virtual bool OnClose();
virtual void AddChild( wxWindow *child );
wxList& GetChildren() const;
wxList& GetChildren() { return m_children; }
virtual void RemoveChild( wxWindow *child );
void SetReturnCode( int retCode );
int GetReturnCode();
@@ -167,7 +168,7 @@ public:
{ m_parent = p; }
virtual wxWindow *ReParent( wxWindow *newParent );
wxEvtHandler *GetEventHandler();
wxEvtHandler *GetEventHandler() const;
void SetEventHandler( wxEvtHandler *handler );
void PushEventHandler( wxEvtHandler *handler );
wxEvtHandler *PopEventHandler( bool deleteHandler = FALSE );
@@ -187,7 +188,7 @@ public:
bool IsBeingDeleted();
void SetId( wxWindowID id );
wxWindowID GetId();
wxWindowID GetId() const;
void SetCursor( const wxCursor &cursor );
@@ -213,13 +214,13 @@ public:
const wxFont *theFont = (const wxFont *) NULL, bool use16 = FALSE) const;
virtual void SetFont( const wxFont &font );
virtual wxFont *GetFont();
virtual const wxFont& GetFont() { return m_font; }
// For backward compatibility
inline virtual void SetButtonFont(const wxFont& font) { SetFont(font); }
inline virtual void SetLabelFont(const wxFont& font) { SetFont(font); }
inline virtual wxFont *GetLabelFont() { return GetFont(); };
inline virtual wxFont *GetButtonFont() { return GetFont(); };
inline virtual const wxFont& GetLabelFont() { return GetFont(); };
inline virtual const wxFont& GetButtonFont() { return GetFont(); };
virtual void SetWindowStyleFlag( long flag );
virtual long GetWindowStyleFlag() const;

View File

@@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 04/01/98
// RCS-ID:
// RCS-ID: $Id$
// Copyright:
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@@ -123,7 +123,7 @@ BEGIN_EVENT_TABLE(DnDFrame, wxFrame)
END_EVENT_TABLE()
// `Main program' equivalent, creating windows and returning main app frame
bool DnDApp::OnInit(void)
bool DnDApp::OnInit()
{
// create the main frame window
DnDFrame *frame = new DnDFrame((wxFrame *) NULL, "Drag & Drop wxWindows App",
@@ -195,8 +195,8 @@ DnDFrame::DnDFrame(wxFrame *frame, char *title, int x, int y, int w, int h)
// Top-left listbox
c = new wxLayoutConstraints;
c->left.SameAs (this, wxLeft);
c->top.SameAs (this, wxTop);
c->left.SameAs(this, wxLeft);
c->top.SameAs(this, wxTop);
c->right.PercentOf(this, wxRight, 50);
c->height.PercentOf(this, wxHeight, 40);
m_ctrlFile->SetConstraints(c);
@@ -291,7 +291,7 @@ void DnDFrame::OnHelp(wxCommandEvent& /* event */)
void DnDFrame::OnLogClear(wxCommandEvent& /* event */ )
{
// m_ctrlLog->Clear();
m_ctrlLog->Clear();
}
bool DnDFrame::OnClose()

View File

@@ -21,6 +21,8 @@
#endif
#include "wx/toolbar.h"
#include <wx/log.h>
#include "test.h"
#if defined(__WXGTK__) || defined(__WXMOTIF__)
@@ -38,7 +40,6 @@
IMPLEMENT_APP(MyApp)
// The `main program' equivalent, creating the windows and returning the
// main frame
bool MyApp::OnInit(void)
@@ -51,11 +52,7 @@ bool MyApp::OnInit(void)
frame->CreateStatusBar();
// Give it an icon
#ifdef __WXMSW__
frame->SetIcon(wxIcon("mondrian"));
#else
frame->SetIcon( wxIcon(mondrian_xpm) );
#endif
frame->SetIcon(wxICON(mondrian));
// Make a menubar
wxMenu *fileMenu = new wxMenu;
@@ -92,8 +89,6 @@ bool MyApp::OnInit(void)
bool MyApp::InitToolbar(wxToolBar* toolBar)
{
toolBar->SetMargins(5, 5);
// Set up toolbar
wxBitmap* toolBarBitmaps[8];
@@ -167,7 +162,7 @@ END_EVENT_TABLE()
// Define my frame constructor
MyFrame::MyFrame(wxFrame* parent, wxWindowID id, const wxString& title, const wxPoint& pos,
const wxSize& size, long style):
wxFrame(parent, id, title, pos, size, style)
wxFrame(parent, id, title, pos, size, style), m_timer(this)
{
m_textWindow = new wxTextCtrl(this, -1, "", wxPoint(0, 0), wxSize(-1, -1), wxTE_MULTILINE);
}
@@ -179,7 +174,10 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
(void)wxMessageBox("wxWindows wxToolBar demo\n", "About wxToolBar");
// (void)wxMessageBox("wxWindows wxToolBar demo\n", "About wxToolBar");
wxLogStatus("Started timer.");
m_timer.Start(500, TRUE);
}
// Define the behaviour for the frame closing

View File

@@ -17,6 +17,17 @@ class MyApp: public wxApp
bool InitToolbar(wxToolBar* toolBar);
};
class MyTimer : public wxTimer
{
public:
MyTimer(wxFrame *frame) { m_frame = frame; }
virtual void Notify() { wxLogStatus(m_frame, "Timer arrived!"); }
private:
wxFrame *m_frame;
};
// Define a new frame
class MyFrame: public wxFrame
{
@@ -34,6 +45,8 @@ public:
private:
wxTextCtrl* m_textWindow;
MyTimer m_timer;
DECLARE_EVENT_TABLE()
};

View File

@@ -50,7 +50,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxColourData, wxObject)
* wxColourData
*/
wxColourData::wxColourData(void)
wxColourData::wxColourData()
{
int i;
for (i = 0; i < 16; i++)
@@ -60,7 +60,7 @@ wxColourData::wxColourData(void)
dataColour.Set(0,0,0);
}
wxColourData::~wxColourData(void)
wxColourData::~wxColourData()
{
}
@@ -94,7 +94,7 @@ void wxColourData::operator=(const wxColourData& data)
* Font data
*/
wxFontData::wxFontData(void)
wxFontData::wxFontData()
{
// Intialize colour to black.
fontColour.Set(0, 0, 0);
@@ -106,7 +106,7 @@ wxFontData::wxFontData(void)
maxSize = 0;
}
wxFontData::~wxFontData(void)
wxFontData::~wxFontData()
{
}
@@ -126,7 +126,7 @@ void wxFontData::operator=(const wxFontData& data)
* Print data
*/
wxPrintData::wxPrintData(void)
wxPrintData::wxPrintData()
{
#ifdef __WXMSW__
printData = NULL;
@@ -147,7 +147,7 @@ wxPrintData::wxPrintData(void)
printSetupDialog = FALSE;
}
wxPrintData::~wxPrintData(void)
wxPrintData::~wxPrintData()
{
#ifdef __WXMSW__
PRINTDLG *pd = (PRINTDLG *)printData;
@@ -159,7 +159,7 @@ wxPrintData::~wxPrintData(void)
}
#ifdef __WXMSW__
void wxPrintData::ConvertToNative(void)
void wxPrintData::ConvertToNative()
{
PRINTDLG *pd = (PRINTDLG*) printData;
if ( pd == NULL )
@@ -174,8 +174,6 @@ void wxPrintData::ConvertToNative(void)
pd->hDevMode = NULL; // Will be created by PrintDlg
pd->hDevNames = NULL; // Ditto
// Why had I put this #ifdef in?? Seems fine to me.
#if 1
pd->Flags = PD_RETURNDEFAULT;
pd->nCopies = 1;
@@ -196,7 +194,6 @@ void wxPrintData::ConvertToNative(void)
GlobalFree(pd->hDevNames);
pd->hDevNames = NULL;
}
#endif
}
if ( pd->hDevMode )
@@ -245,7 +242,7 @@ void wxPrintData::ConvertToNative(void)
pd->Flags |= PD_PRINTSETUP;
}
void wxPrintData::ConvertFromNative(void)
void wxPrintData::ConvertFromNative()
{
PRINTDLG *pd = (PRINTDLG*) printData;
if ( pd == NULL )
@@ -308,7 +305,7 @@ void wxPrintData::operator=(const wxPrintData& data)
* wxPageSetupData
*/
wxPageSetupData::wxPageSetupData(void)
wxPageSetupData::wxPageSetupData()
{
#if defined(__WIN95__)
m_pageSetupData = NULL;
@@ -330,7 +327,7 @@ wxPageSetupData::wxPageSetupData(void)
m_getDefaultInfo = FALSE;
}
wxPageSetupData::~wxPageSetupData(void)
wxPageSetupData::~wxPageSetupData()
{
#if defined(__WIN95__) && defined(__WXMSW__)
PAGESETUPDLG *pd = (PAGESETUPDLG *)m_pageSetupData;
@@ -360,7 +357,7 @@ void wxPageSetupData::operator=(const wxPageSetupData& data)
}
#if defined(__WXMSW__) && defined(__WIN95__)
void wxPageSetupData::ConvertToNative(void)
void wxPageSetupData::ConvertToNative()
{
PAGESETUPDLG *pd = (PAGESETUPDLG*) m_pageSetupData;
if ( m_pageSetupData == NULL )
@@ -422,7 +419,7 @@ void wxPageSetupData::ConvertToNative(void)
}
}
void wxPageSetupData::ConvertFromNative(void)
void wxPageSetupData::ConvertFromNative()
{
PAGESETUPDLG *pd = (PAGESETUPDLG *) m_pageSetupData ;
if ( !pd )

View File

@@ -211,15 +211,14 @@ bool wxConfigBase::Write(const wxString& key, bool value)
}
wxString wxConfigBase::ExpandEnvVars(const wxString& str) const
{
{
wxString tmp; // Required for BC++
if (IsExpandingEnvVars())
tmp = wxExpandEnvVars(str);
else
tmp = str;
return tmp;
}
}
// ----------------------------------------------------------------------------
// wxConfigPathChanger
@@ -410,5 +409,3 @@ void wxSplitPath(wxArrayString& aParts, const char *sz)
pc++;
}
}

View File

@@ -393,8 +393,7 @@ void wxInitializeStockObjects ()
wxCROSS_CURSOR = new wxCursor (wxCURSOR_CROSS);
}
void
wxDeleteStockObjects ()
void wxDeleteStockObjects ()
{
wxDELETE(wxNORMAL_FONT);
wxDELETE(wxSMALL_FONT);
@@ -609,9 +608,14 @@ wxFont *wxFontList::
}
void wxBitmapList::AddBitmap(wxBitmap *bitmap)
{ Append(bitmap); }
{
Append(bitmap);
}
void wxBitmapList::RemoveBitmap(wxBitmap *bitmap)
{ DeleteObject(bitmap); }
{
DeleteObject(bitmap);
}
wxSize wxGetDisplaySize()
{
@@ -620,7 +624,8 @@ wxSize wxGetDisplaySize()
return wxSize(x, y);
}
wxResourceCache::~wxResourceCache () {
wxResourceCache::~wxResourceCache ()
{
wxNode *node = First ();
while (node) {
wxGDIObject *item = (wxGDIObject *)node->Data();

View File

@@ -2102,7 +2102,7 @@ wxBitmap wxResourceCreateBitmap(const wxString& resource, wxResourceTable *table
{
wxLogWarning(_("Failed to find XBM resource %s.\n"
"Forgot to use wxResourceLoadBitmapData?"), (const char*) name);
return (wxBitmap *) NULL;
return wxNullBitmap;
}
return wxBitmap(item->GetValue1(), (int)item->GetValue2(), (int)item->GetValue3()) ;
#else
@@ -2118,7 +2118,7 @@ wxBitmap wxResourceCreateBitmap(const wxString& resource, wxResourceTable *table
{
wxLogWarning(_("Failed to find XPM resource %s.\n"
"Forgot to use wxResourceLoadBitmapData?"), (const char*) name);
return (wxBitmap *) NULL;
return wxNullBitmap;
}
return wxBitmap(item->GetValue1());
#else
@@ -2257,7 +2257,7 @@ wxIcon wxResourceCreateIcon(const wxString& resource, wxResourceTable *table)
{
wxLogWarning(_("Failed to find XBM resource %s.\n"
"Forgot to use wxResourceLoadIconData?"), (const char*) name);
return (wxIcon *) NULL;
return wxNullIcon;
}
return wxIcon((const char **)item->GetValue1(), (int)item->GetValue2(), (int)item->GetValue3());
#else

View File

@@ -232,7 +232,7 @@ bool wxApp::SendIdleEvents( wxWindow* win )
if (event.MoreRequested())
needMore = TRUE;
wxNode* node = win->GetChildren()->First();
wxNode* node = win->GetChildren().First();
while (node)
{
wxWindow* win = (wxWindow*) node->Data();

View File

@@ -24,7 +24,7 @@
IMPLEMENT_DYNAMIC_CLASS(wxMask,wxObject)
wxMask::wxMask(void)
wxMask::wxMask()
{
m_bitmap = (GdkBitmap *) NULL;
}
@@ -41,7 +41,7 @@ wxMask::wxMask( const wxBitmap& WXUNUSED(bitmap) )
{
}
wxMask::~wxMask(void)
wxMask::~wxMask()
{
if (m_bitmap) gdk_bitmap_unref( m_bitmap );
}
@@ -70,7 +70,7 @@ public:
wxPalette *m_palette;
};
wxBitmapRefData::wxBitmapRefData(void)
wxBitmapRefData::wxBitmapRefData()
{
m_pixmap = (GdkPixmap *) NULL;
m_bitmap = (GdkBitmap *) NULL;
@@ -81,7 +81,7 @@ wxBitmapRefData::wxBitmapRefData(void)
m_palette = (wxPalette *) NULL;
}
wxBitmapRefData::~wxBitmapRefData(void)
wxBitmapRefData::~wxBitmapRefData()
{
if (m_pixmap) gdk_pixmap_unref( m_pixmap );
if (m_bitmap) gdk_bitmap_unref( m_bitmap );
@@ -95,7 +95,7 @@ wxBitmapRefData::~wxBitmapRefData(void)
IMPLEMENT_DYNAMIC_CLASS(wxBitmap,wxGDIObject)
wxBitmap::wxBitmap(void)
wxBitmap::wxBitmap()
{
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
}
@@ -173,13 +173,6 @@ wxBitmap::wxBitmap( const wxBitmap& 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 );
@@ -203,7 +196,7 @@ wxBitmap::wxBitmap( const char bits[], int width, int height, int WXUNUSED(depth
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
}
wxBitmap::~wxBitmap(void)
wxBitmap::~wxBitmap()
{
if (wxTheBitmapList) wxTheBitmapList->DeleteObject(this);
}

View File

@@ -21,7 +21,7 @@ class wxBrushRefData: public wxObjectRefData
{
public:
wxBrushRefData(void);
wxBrushRefData();
wxBrushRefData( const wxBrushRefData& data );
int m_style;
@@ -29,7 +29,7 @@ class wxBrushRefData: public wxObjectRefData
wxColour m_colour;
};
wxBrushRefData::wxBrushRefData(void)
wxBrushRefData::wxBrushRefData()
{
m_style = 0;
}
@@ -47,7 +47,7 @@ wxBrushRefData::wxBrushRefData( const wxBrushRefData& data )
IMPLEMENT_DYNAMIC_CLASS(wxBrush,wxGDIObject)
wxBrush::wxBrush(void)
wxBrush::wxBrush()
{
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
}
@@ -78,14 +78,7 @@ wxBrush::wxBrush( const wxBrush &brush )
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
}
wxBrush::wxBrush( const wxBrush *brush )
{
if (brush) Ref( *brush );
if (wxTheBrushList) wxTheBrushList->Append( this );
}
wxBrush::~wxBrush(void)
wxBrush::~wxBrush()
{
if (wxTheBrushList) wxTheBrushList->RemoveBrush( this );
}
@@ -107,12 +100,12 @@ bool wxBrush::operator != ( const wxBrush& brush )
return m_refData != brush.m_refData;
}
bool wxBrush::Ok(void) const
bool wxBrush::Ok() const
{
return ((m_refData) && M_BRUSHDATA->m_colour.Ok());
}
int wxBrush::GetStyle(void) const
int wxBrush::GetStyle() const
{
if (m_refData == NULL)
{
@@ -123,7 +116,7 @@ int wxBrush::GetStyle(void) const
return M_BRUSHDATA->m_style;
}
wxColour &wxBrush::GetColour(void) const
wxColour &wxBrush::GetColour() const
{
if (m_refData == NULL)
{
@@ -134,7 +127,7 @@ wxColour &wxBrush::GetColour(void) const
return M_BRUSHDATA->m_colour;
}
wxBitmap *wxBrush::GetStipple(void) const
wxBitmap *wxBrush::GetStipple() const
{
if (m_refData == NULL)
{
@@ -169,7 +162,7 @@ void wxBrush::SetStipple( const wxBitmap& stipple )
M_BRUSHDATA->m_stipple = stipple;
}
void wxBrush::Unshare(void)
void wxBrush::Unshare()
{
if (!m_refData)
{

View File

@@ -102,11 +102,6 @@ wxColour::wxColour( const wxColour& col )
Ref( col );
}
wxColour::wxColour( const wxColour* col )
{
if (col) Ref( *col );
}
wxColour::~wxColour()
{
}

View File

@@ -22,18 +22,18 @@ class wxCursorRefData: public wxObjectRefData
{
public:
wxCursorRefData(void);
~wxCursorRefData(void);
wxCursorRefData();
~wxCursorRefData();
GdkCursor *m_cursor;
};
wxCursorRefData::wxCursorRefData(void)
wxCursorRefData::wxCursorRefData()
{
m_cursor = (GdkCursor *) NULL;
}
wxCursorRefData::~wxCursorRefData(void)
wxCursorRefData::~wxCursorRefData()
{
if (m_cursor) gdk_cursor_destroy( m_cursor );
}
@@ -44,7 +44,7 @@ wxCursorRefData::~wxCursorRefData(void)
IMPLEMENT_DYNAMIC_CLASS(wxCursor,wxObject)
wxCursor::wxCursor(void)
wxCursor::wxCursor()
{
}
@@ -103,13 +103,7 @@ wxCursor::wxCursor( const wxCursor &cursor )
Ref( cursor );
}
wxCursor::wxCursor( const wxCursor *cursor )
{
UnRef();
if (cursor) Ref( *cursor );
}
wxCursor::~wxCursor(void)
wxCursor::~wxCursor()
{
}
@@ -120,22 +114,22 @@ wxCursor& wxCursor::operator = ( const wxCursor& cursor )
return *this;
}
bool wxCursor::operator == ( const wxCursor& cursor )
bool wxCursor::operator == ( const wxCursor& cursor ) const
{
return m_refData == cursor.m_refData;
}
bool wxCursor::operator != ( const wxCursor& cursor )
bool wxCursor::operator != ( const wxCursor& cursor ) const
{
return m_refData != cursor.m_refData;
}
bool wxCursor::Ok(void) const
bool wxCursor::Ok() const
{
return (m_refData != NULL);
}
GdkCursor *wxCursor::GetCursor(void) const
GdkCursor *wxCursor::GetCursor() const
{
return M_CURSORDATA->m_cursor;
}
@@ -146,7 +140,7 @@ GdkCursor *wxCursor::GetCursor(void) const
bool g_isBusy = FALSE;
void wxEndBusyCursor(void)
void wxEndBusyCursor()
{
g_isBusy = FALSE;
}
@@ -156,7 +150,7 @@ void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) )
g_isBusy = TRUE;
}
bool wxIsBusy(void)
bool wxIsBusy()
{
return g_isBusy;
}

View File

@@ -27,10 +27,10 @@ extern wxFontNameDirectory *wxTheFontNameDirectory;
class wxFontRefData: public wxObjectRefData
{
public:
public:
wxFontRefData(void);
~wxFontRefData(void);
wxFontRefData();
~wxFontRefData();
wxList m_scaled_xfonts;
int m_pointSize;
@@ -45,7 +45,7 @@ class wxFontRefData: public wxObjectRefData
friend wxFont;
};
wxFontRefData::wxFontRefData(void) : m_scaled_xfonts(wxKEY_INTEGER)
wxFontRefData::wxFontRefData() : m_scaled_xfonts(wxKEY_INTEGER)
{
m_byXFontName = FALSE;
m_pointSize = 12;
@@ -58,7 +58,7 @@ wxFontRefData::wxFontRefData(void) : m_scaled_xfonts(wxKEY_INTEGER)
m_font = (GdkFont *) NULL;
}
wxFontRefData::~wxFontRefData(void)
wxFontRefData::~wxFontRefData()
{
wxNode *node = m_scaled_xfonts.First();
while (node)
@@ -82,7 +82,7 @@ wxFontRefData::~wxFontRefData(void)
IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
wxFont::wxFont(void)
wxFont::wxFont()
{
if (wxTheFontList) wxTheFontList->Append( this );
}
@@ -150,15 +150,7 @@ wxFont::wxFont( const wxFont& font )
if (wxTheFontList) wxTheFontList->Append( this );
}
wxFont::wxFont( const wxFont* font )
{
UnRef();
if (font) Ref( *font );
if (wxTheFontList) wxTheFontList->Append( this );
}
wxFont::~wxFont(void)
wxFont::~wxFont()
{
if (wxTheFontList) wxTheFontList->DeleteObject( this );
}
@@ -185,7 +177,7 @@ bool wxFont::Ok() const
return (m_refData != NULL);
}
int wxFont::GetPointSize(void) const
int wxFont::GetPointSize() const
{
if (!Ok())
{
@@ -196,7 +188,7 @@ int wxFont::GetPointSize(void) const
return M_FONTDATA->m_pointSize;
}
wxString wxFont::GetFaceString(void) const
wxString wxFont::GetFaceString() const
{
if (!Ok())
{
@@ -208,7 +200,7 @@ wxString wxFont::GetFaceString(void) const
return s;
}
wxString wxFont::GetFaceName(void) const
wxString wxFont::GetFaceName() const
{
if (!Ok())
{
@@ -220,7 +212,7 @@ wxString wxFont::GetFaceName(void) const
return s;
}
int wxFont::GetFamily(void) const
int wxFont::GetFamily() const
{
if (!Ok())
{
@@ -231,7 +223,7 @@ int wxFont::GetFamily(void) const
return M_FONTDATA->m_family;
}
wxString wxFont::GetFamilyString(void) const
wxString wxFont::GetFamilyString() const
{
if (!Ok())
{
@@ -253,7 +245,7 @@ wxString wxFont::GetFamilyString(void) const
return "wxDEFAULT";
}
int wxFont::GetFontId(void) const
int wxFont::GetFontId() const
{
if (!Ok())
{
@@ -264,7 +256,7 @@ int wxFont::GetFontId(void) const
return M_FONTDATA->m_fontId; // stub
}
int wxFont::GetStyle(void) const
int wxFont::GetStyle() const
{
if (!Ok())
{
@@ -275,7 +267,7 @@ int wxFont::GetStyle(void) const
return M_FONTDATA->m_style;
}
wxString wxFont::GetStyleString(void) const
wxString wxFont::GetStyleString() const
{
if (!Ok())
{
@@ -294,7 +286,7 @@ wxString wxFont::GetStyleString(void) const
return wxString("wxDEFAULT");
}
int wxFont::GetWeight(void) const
int wxFont::GetWeight() const
{
if (!Ok())
{
@@ -305,7 +297,7 @@ int wxFont::GetWeight(void) const
return M_FONTDATA->m_weight;
}
wxString wxFont::GetWeightString(void) const
wxString wxFont::GetWeightString() const
{
if (!Ok())
{
@@ -324,7 +316,7 @@ wxString wxFont::GetWeightString(void) const
return wxString("wxDEFAULT");
}
bool wxFont::GetUnderlined(void) const
bool wxFont::GetUnderlined() const
{
if (!Ok())
{
@@ -365,13 +357,13 @@ GdkFont *wxFont::GetInternalFont(float scale) const
}
else
{
/*
/*
if (int_scale == 100) printf( "int_scale.\n" );
if (M_FONTDATA->m_style == wxSWISS) printf( "swiss.\n" );
if (M_FONTDATA->m_pointSize == 12) printf( "12.\n" );
if (M_FONTDATA->m_weight == wxNORMAL) printf( "normal.\n" );
if (M_FONTDATA->m_underlined == FALSE) printf( "false.\n" );
*/
*/
if ((int_scale == 100) &&
(M_FONTDATA->m_family == wxSWISS) &&
(M_FONTDATA->m_style == wxNORMAL) &&
@@ -390,7 +382,7 @@ GdkFont *wxFont::GetInternalFont(float scale) const
}
if (!font)
printf("could not load any font");
// wxError("could not load any font", "wxFont");
// wxError("could not load any font", "wxFont");
return font;
}
@@ -580,7 +572,7 @@ static int SCoordinate(int s)
class wxSuffixMap {
public:
~wxSuffixMap(void);
~wxSuffixMap();
inline char *GetName(int weight, int style)
{
@@ -630,7 +622,7 @@ static void SearchResource(const char *prefix, const char **names, int count, ch
*v = copystring(internal);
}
wxSuffixMap::~wxSuffixMap(void)
wxSuffixMap::~wxSuffixMap()
{
int k, j;
@@ -670,7 +662,7 @@ void wxSuffixMap::Initialize(const char *resname, const char *devresname)
SearchResource(devresname, names, 3, &v);
/* Expand macros in the found string: */
found:
found:
int len, closer = 0, startpos = 0;
len = (v ? strlen(v) : 0);
@@ -752,7 +744,7 @@ void wxSuffixMap::Initialize(const char *resname, const char *devresname)
//-----------------------------------------------------------------------------
class wxFontNameItem : public wxObject {
DECLARE_DYNAMIC_CLASS(wxFontNameItem)
DECLARE_DYNAMIC_CLASS(wxFontNameItem)
public:
wxFontNameItem(const char *name, int id, int family);
~wxFontNameItem();
@@ -760,10 +752,10 @@ public:
inline char* GetScreenName(int w, int s) {return screen.GetName(w, s);}
inline char* GetPostScriptName(int w, int s) {return printing.GetName(w, s);}
inline char* GetAFMName(int w, int s) {return afm.GetName(w, s);}
inline char* GetName(void) {return name;}
inline int GetFamily(void) {return family;}
inline int GetId(void) {return id;}
inline bool IsRoman(void) {return isroman;}
inline char* GetName() {return name;}
inline int GetFamily() {return family;}
inline int GetId() {return id;}
inline bool IsRoman() {return isroman;}
#if defined(__WXDEBUG__)
void Dump(ostream& str);
#endif
@@ -788,7 +780,7 @@ wxFontNameItem::wxFontNameItem(const char *Name, int Id, int Family)
afm. Initialize(name, "Afm");
}
wxFontNameItem::~wxFontNameItem(void)
wxFontNameItem::~wxFontNameItem()
{
if (name)
delete[] name;
@@ -808,7 +800,7 @@ void wxFontNameItem::Dump(ostream& str)
IMPLEMENT_DYNAMIC_CLASS(wxFontNameDirectory, wxObject)
wxFontNameDirectory::wxFontNameDirectory(void)
wxFontNameDirectory::wxFontNameDirectory()
{
table = new wxHashTable(wxKEY_INTEGER, 20);
nextFontId = -1;
@@ -827,7 +819,7 @@ wxFontNameDirectory::~wxFontNameDirectory()
delete table;
}
int wxFontNameDirectory::GetNewFontId(void)
int wxFontNameDirectory::GetNewFontId()
{
return (nextFontId--);
}

View File

@@ -524,7 +524,7 @@ void wxFrame::SetMenuBar( wxMenuBar *menuBar )
if (m_sizeSet) GtkOnSize( m_x, m_y, m_width, m_height );
}
wxMenuBar *wxFrame::GetMenuBar(void) const
wxMenuBar *wxFrame::GetMenuBar() const
{
return m_frameMenuBar;
}
@@ -549,7 +549,7 @@ wxToolBar* wxFrame::OnCreateToolBar( long style, wxWindowID id, const wxString&
return new wxToolBar( this, id, wxDefaultPosition, wxDefaultSize, style, name );
}
wxToolBar *wxFrame::GetToolBar(void) const
wxToolBar *wxFrame::GetToolBar() const
{
return m_frameToolBar;
}
@@ -575,7 +575,7 @@ wxStatusBar *wxFrame::OnCreateStatusBar( int number, long style, wxWindowID id,
// Set the height according to the font and the border size
wxClientDC dc(statusBar);
dc.SetFont( *statusBar->GetFont() );
dc.SetFont( statusBar->GetFont() );
long x, y;
dc.GetTextExtent( "X", &x, &y );
@@ -606,7 +606,7 @@ void wxFrame::SetStatusWidths(int n, const int widths_field[] )
m_frameStatusBar->SetStatusWidths(n, widths_field);
}
wxStatusBar *wxFrame::GetStatusBar(void) const
wxStatusBar *wxFrame::GetStatusBar() const
{
return m_frameStatusBar;
}

View File

@@ -38,11 +38,6 @@ wxIcon::wxIcon( const wxIcon& icon ) : wxBitmap()
Ref(icon);
}
wxIcon::wxIcon( const wxIcon* icon ) : wxBitmap()
{
if (icon) Ref(*icon);
}
wxIcon& wxIcon::operator = ( const wxIcon& icon )
{
if (*this == icon) return (*this);

View File

@@ -218,10 +218,9 @@ wxMenuItem::wxMenuItem()
m_menuItem = (GtkWidget *) NULL;
}
// it's valid for this function to be called even if m_menuItem == NULL
void wxMenuItem::SetName(const wxString& str)
{
wxCHECK_RET( m_menuItem, "invalid menu item" );
m_text = "";
for ( const char *pc = str; *pc != '\0'; pc++ )
{
@@ -231,9 +230,12 @@ void wxMenuItem::SetName(const wxString& str)
m_text << *pc;
}
if ( m_menuItem )
{
GtkLabel *label = GTK_LABEL( GTK_BIN(m_menuItem)->child );
gtk_label_set( label, m_text.c_str());
}
}
void wxMenuItem::Check( bool check )

View File

@@ -29,12 +29,12 @@ class wxPaletteRefData: public wxObjectRefData
GdkColormap *m_colormap;
};
wxPaletteRefData::wxPaletteRefData(void)
wxPaletteRefData::wxPaletteRefData()
{
m_colormap = (GdkColormap *) NULL;
};
wxPaletteRefData::~wxPaletteRefData(void)
wxPaletteRefData::~wxPaletteRefData()
{
if (m_colormap) gdk_colormap_unref( m_colormap );
};
@@ -45,7 +45,7 @@ wxPaletteRefData::~wxPaletteRefData(void)
IMPLEMENT_DYNAMIC_CLASS(wxPalette,wxGDIObject)
wxPalette::wxPalette(void)
wxPalette::wxPalette()
{
};
@@ -60,13 +60,7 @@ wxPalette::wxPalette( const wxPalette& palette )
Ref( palette );
};
wxPalette::wxPalette( const wxPalette* palette )
{
UnRef();
if (palette) Ref( *palette );
};
wxPalette::~wxPalette(void)
wxPalette::~wxPalette()
{
};

View File

@@ -55,7 +55,7 @@ wxPenRefData::wxPenRefData( const wxPenRefData& data )
IMPLEMENT_DYNAMIC_CLASS(wxPen,wxGDIObject)
wxPen::wxPen(void)
wxPen::wxPen()
{
if (wxThePenList) wxThePenList->AddPen( this );
}
@@ -76,14 +76,6 @@ wxPen::wxPen( const wxPen& pen )
if (wxThePenList) wxThePenList->AddPen( this );
}
wxPen::wxPen( const wxPen* pen )
{
UnRef();
if (pen) Ref( *pen );
if (wxThePenList) wxThePenList->AddPen( this );
}
wxPen::~wxPen()
{
if (wxThePenList) wxThePenList->RemovePen( this );

View File

@@ -109,7 +109,7 @@ static char *GetIniFile(char *dest, const char *filename)
return dest;
}
static void wxXMergeDatabases(void)
static void wxXMergeDatabases()
{
XrmDatabase homeDB, serverDB, applicationDB;
char filenamebuf[1024];
@@ -159,7 +159,7 @@ static void wxXMergeDatabases(void)
// called on application exit
//-----------------------------------------------------------------------------
void wxFlushResources(void)
void wxFlushResources()
{
char nameBuffer[512];

View File

@@ -1655,7 +1655,7 @@ void wxWindow::Fit()
int maxX = 0;
int maxY = 0;
wxNode *node = m_childrenFirst();
wxNode *node = m_children.First();
while ( node )
{
wxWindow *win = (wxWindow *)node->Data();
@@ -1803,11 +1803,6 @@ void wxWindow::AddChild( wxWindow *child )
m_children.Append( child );
}
wxList& wxWindow::GetChildren() const
{
return m_children;
}
wxWindow *wxWindow::ReParent( wxWindow *newParent )
{
wxWindow *oldParent = GetParent();
@@ -1855,7 +1850,7 @@ void wxWindow::Lower()
if (m_widget) gdk_window_lower( m_widget->window );
}
wxEvtHandler *wxWindow::GetEventHandler()
wxEvtHandler *wxWindow::GetEventHandler() const
{
return m_eventHandler;
}
@@ -1934,7 +1929,7 @@ void wxWindow::SetId( wxWindowID id )
m_windowId = id;
}
wxWindowID wxWindow::GetId()
wxWindowID wxWindow::GetId() const
{
return m_windowId;
}
@@ -1951,7 +1946,8 @@ void wxWindow::SetCursor( const wxCursor &cursor )
if (cursor.Ok())
{
if (*((wxCursor*)&cursor) == m_cursor) return;
if ( cursor == *m_cursor )
return;
*m_cursor = cursor;
}
else
@@ -2278,11 +2274,6 @@ void wxWindow::SetFont( const wxFont &font )
ApplyWidgetStyle();
}
wxFont *wxWindow::GetFont()
{
return &m_font;
}
void wxWindow::SetWindowStyleFlag( long flag )
{
m_windowStyle = flag;
@@ -2795,7 +2786,7 @@ bool wxWindow::DoPhase(int phase)
{
noChanges = 0;
noFailures = 0;
wxNode *node = m_children.first();
wxNode *node = m_children.First();
while (node)
{
wxWindow *child = (wxWindow *)node->Data();

View File

@@ -232,7 +232,7 @@ bool wxApp::SendIdleEvents( wxWindow* win )
if (event.MoreRequested())
needMore = TRUE;
wxNode* node = win->GetChildren()->First();
wxNode* node = win->GetChildren().First();
while (node)
{
wxWindow* win = (wxWindow*) node->Data();

View File

@@ -24,7 +24,7 @@
IMPLEMENT_DYNAMIC_CLASS(wxMask,wxObject)
wxMask::wxMask(void)
wxMask::wxMask()
{
m_bitmap = (GdkBitmap *) NULL;
}
@@ -41,7 +41,7 @@ wxMask::wxMask( const wxBitmap& WXUNUSED(bitmap) )
{
}
wxMask::~wxMask(void)
wxMask::~wxMask()
{
if (m_bitmap) gdk_bitmap_unref( m_bitmap );
}
@@ -70,7 +70,7 @@ public:
wxPalette *m_palette;
};
wxBitmapRefData::wxBitmapRefData(void)
wxBitmapRefData::wxBitmapRefData()
{
m_pixmap = (GdkPixmap *) NULL;
m_bitmap = (GdkBitmap *) NULL;
@@ -81,7 +81,7 @@ wxBitmapRefData::wxBitmapRefData(void)
m_palette = (wxPalette *) NULL;
}
wxBitmapRefData::~wxBitmapRefData(void)
wxBitmapRefData::~wxBitmapRefData()
{
if (m_pixmap) gdk_pixmap_unref( m_pixmap );
if (m_bitmap) gdk_bitmap_unref( m_bitmap );
@@ -95,7 +95,7 @@ wxBitmapRefData::~wxBitmapRefData(void)
IMPLEMENT_DYNAMIC_CLASS(wxBitmap,wxGDIObject)
wxBitmap::wxBitmap(void)
wxBitmap::wxBitmap()
{
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
}
@@ -173,13 +173,6 @@ wxBitmap::wxBitmap( const wxBitmap& 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 );
@@ -203,7 +196,7 @@ wxBitmap::wxBitmap( const char bits[], int width, int height, int WXUNUSED(depth
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
}
wxBitmap::~wxBitmap(void)
wxBitmap::~wxBitmap()
{
if (wxTheBitmapList) wxTheBitmapList->DeleteObject(this);
}

View File

@@ -21,7 +21,7 @@ class wxBrushRefData: public wxObjectRefData
{
public:
wxBrushRefData(void);
wxBrushRefData();
wxBrushRefData( const wxBrushRefData& data );
int m_style;
@@ -29,7 +29,7 @@ class wxBrushRefData: public wxObjectRefData
wxColour m_colour;
};
wxBrushRefData::wxBrushRefData(void)
wxBrushRefData::wxBrushRefData()
{
m_style = 0;
}
@@ -47,7 +47,7 @@ wxBrushRefData::wxBrushRefData( const wxBrushRefData& data )
IMPLEMENT_DYNAMIC_CLASS(wxBrush,wxGDIObject)
wxBrush::wxBrush(void)
wxBrush::wxBrush()
{
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
}
@@ -78,14 +78,7 @@ wxBrush::wxBrush( const wxBrush &brush )
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
}
wxBrush::wxBrush( const wxBrush *brush )
{
if (brush) Ref( *brush );
if (wxTheBrushList) wxTheBrushList->Append( this );
}
wxBrush::~wxBrush(void)
wxBrush::~wxBrush()
{
if (wxTheBrushList) wxTheBrushList->RemoveBrush( this );
}
@@ -107,12 +100,12 @@ bool wxBrush::operator != ( const wxBrush& brush )
return m_refData != brush.m_refData;
}
bool wxBrush::Ok(void) const
bool wxBrush::Ok() const
{
return ((m_refData) && M_BRUSHDATA->m_colour.Ok());
}
int wxBrush::GetStyle(void) const
int wxBrush::GetStyle() const
{
if (m_refData == NULL)
{
@@ -123,7 +116,7 @@ int wxBrush::GetStyle(void) const
return M_BRUSHDATA->m_style;
}
wxColour &wxBrush::GetColour(void) const
wxColour &wxBrush::GetColour() const
{
if (m_refData == NULL)
{
@@ -134,7 +127,7 @@ wxColour &wxBrush::GetColour(void) const
return M_BRUSHDATA->m_colour;
}
wxBitmap *wxBrush::GetStipple(void) const
wxBitmap *wxBrush::GetStipple() const
{
if (m_refData == NULL)
{
@@ -169,7 +162,7 @@ void wxBrush::SetStipple( const wxBitmap& stipple )
M_BRUSHDATA->m_stipple = stipple;
}
void wxBrush::Unshare(void)
void wxBrush::Unshare()
{
if (!m_refData)
{

View File

@@ -102,11 +102,6 @@ wxColour::wxColour( const wxColour& col )
Ref( col );
}
wxColour::wxColour( const wxColour* col )
{
if (col) Ref( *col );
}
wxColour::~wxColour()
{
}

View File

@@ -22,18 +22,18 @@ class wxCursorRefData: public wxObjectRefData
{
public:
wxCursorRefData(void);
~wxCursorRefData(void);
wxCursorRefData();
~wxCursorRefData();
GdkCursor *m_cursor;
};
wxCursorRefData::wxCursorRefData(void)
wxCursorRefData::wxCursorRefData()
{
m_cursor = (GdkCursor *) NULL;
}
wxCursorRefData::~wxCursorRefData(void)
wxCursorRefData::~wxCursorRefData()
{
if (m_cursor) gdk_cursor_destroy( m_cursor );
}
@@ -44,7 +44,7 @@ wxCursorRefData::~wxCursorRefData(void)
IMPLEMENT_DYNAMIC_CLASS(wxCursor,wxObject)
wxCursor::wxCursor(void)
wxCursor::wxCursor()
{
}
@@ -103,13 +103,7 @@ wxCursor::wxCursor( const wxCursor &cursor )
Ref( cursor );
}
wxCursor::wxCursor( const wxCursor *cursor )
{
UnRef();
if (cursor) Ref( *cursor );
}
wxCursor::~wxCursor(void)
wxCursor::~wxCursor()
{
}
@@ -120,22 +114,22 @@ wxCursor& wxCursor::operator = ( const wxCursor& cursor )
return *this;
}
bool wxCursor::operator == ( const wxCursor& cursor )
bool wxCursor::operator == ( const wxCursor& cursor ) const
{
return m_refData == cursor.m_refData;
}
bool wxCursor::operator != ( const wxCursor& cursor )
bool wxCursor::operator != ( const wxCursor& cursor ) const
{
return m_refData != cursor.m_refData;
}
bool wxCursor::Ok(void) const
bool wxCursor::Ok() const
{
return (m_refData != NULL);
}
GdkCursor *wxCursor::GetCursor(void) const
GdkCursor *wxCursor::GetCursor() const
{
return M_CURSORDATA->m_cursor;
}
@@ -146,7 +140,7 @@ GdkCursor *wxCursor::GetCursor(void) const
bool g_isBusy = FALSE;
void wxEndBusyCursor(void)
void wxEndBusyCursor()
{
g_isBusy = FALSE;
}
@@ -156,7 +150,7 @@ void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) )
g_isBusy = TRUE;
}
bool wxIsBusy(void)
bool wxIsBusy()
{
return g_isBusy;
}

View File

@@ -27,10 +27,10 @@ extern wxFontNameDirectory *wxTheFontNameDirectory;
class wxFontRefData: public wxObjectRefData
{
public:
public:
wxFontRefData(void);
~wxFontRefData(void);
wxFontRefData();
~wxFontRefData();
wxList m_scaled_xfonts;
int m_pointSize;
@@ -45,7 +45,7 @@ class wxFontRefData: public wxObjectRefData
friend wxFont;
};
wxFontRefData::wxFontRefData(void) : m_scaled_xfonts(wxKEY_INTEGER)
wxFontRefData::wxFontRefData() : m_scaled_xfonts(wxKEY_INTEGER)
{
m_byXFontName = FALSE;
m_pointSize = 12;
@@ -58,7 +58,7 @@ wxFontRefData::wxFontRefData(void) : m_scaled_xfonts(wxKEY_INTEGER)
m_font = (GdkFont *) NULL;
}
wxFontRefData::~wxFontRefData(void)
wxFontRefData::~wxFontRefData()
{
wxNode *node = m_scaled_xfonts.First();
while (node)
@@ -82,7 +82,7 @@ wxFontRefData::~wxFontRefData(void)
IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
wxFont::wxFont(void)
wxFont::wxFont()
{
if (wxTheFontList) wxTheFontList->Append( this );
}
@@ -150,15 +150,7 @@ wxFont::wxFont( const wxFont& font )
if (wxTheFontList) wxTheFontList->Append( this );
}
wxFont::wxFont( const wxFont* font )
{
UnRef();
if (font) Ref( *font );
if (wxTheFontList) wxTheFontList->Append( this );
}
wxFont::~wxFont(void)
wxFont::~wxFont()
{
if (wxTheFontList) wxTheFontList->DeleteObject( this );
}
@@ -185,7 +177,7 @@ bool wxFont::Ok() const
return (m_refData != NULL);
}
int wxFont::GetPointSize(void) const
int wxFont::GetPointSize() const
{
if (!Ok())
{
@@ -196,7 +188,7 @@ int wxFont::GetPointSize(void) const
return M_FONTDATA->m_pointSize;
}
wxString wxFont::GetFaceString(void) const
wxString wxFont::GetFaceString() const
{
if (!Ok())
{
@@ -208,7 +200,7 @@ wxString wxFont::GetFaceString(void) const
return s;
}
wxString wxFont::GetFaceName(void) const
wxString wxFont::GetFaceName() const
{
if (!Ok())
{
@@ -220,7 +212,7 @@ wxString wxFont::GetFaceName(void) const
return s;
}
int wxFont::GetFamily(void) const
int wxFont::GetFamily() const
{
if (!Ok())
{
@@ -231,7 +223,7 @@ int wxFont::GetFamily(void) const
return M_FONTDATA->m_family;
}
wxString wxFont::GetFamilyString(void) const
wxString wxFont::GetFamilyString() const
{
if (!Ok())
{
@@ -253,7 +245,7 @@ wxString wxFont::GetFamilyString(void) const
return "wxDEFAULT";
}
int wxFont::GetFontId(void) const
int wxFont::GetFontId() const
{
if (!Ok())
{
@@ -264,7 +256,7 @@ int wxFont::GetFontId(void) const
return M_FONTDATA->m_fontId; // stub
}
int wxFont::GetStyle(void) const
int wxFont::GetStyle() const
{
if (!Ok())
{
@@ -275,7 +267,7 @@ int wxFont::GetStyle(void) const
return M_FONTDATA->m_style;
}
wxString wxFont::GetStyleString(void) const
wxString wxFont::GetStyleString() const
{
if (!Ok())
{
@@ -294,7 +286,7 @@ wxString wxFont::GetStyleString(void) const
return wxString("wxDEFAULT");
}
int wxFont::GetWeight(void) const
int wxFont::GetWeight() const
{
if (!Ok())
{
@@ -305,7 +297,7 @@ int wxFont::GetWeight(void) const
return M_FONTDATA->m_weight;
}
wxString wxFont::GetWeightString(void) const
wxString wxFont::GetWeightString() const
{
if (!Ok())
{
@@ -324,7 +316,7 @@ wxString wxFont::GetWeightString(void) const
return wxString("wxDEFAULT");
}
bool wxFont::GetUnderlined(void) const
bool wxFont::GetUnderlined() const
{
if (!Ok())
{
@@ -365,13 +357,13 @@ GdkFont *wxFont::GetInternalFont(float scale) const
}
else
{
/*
/*
if (int_scale == 100) printf( "int_scale.\n" );
if (M_FONTDATA->m_style == wxSWISS) printf( "swiss.\n" );
if (M_FONTDATA->m_pointSize == 12) printf( "12.\n" );
if (M_FONTDATA->m_weight == wxNORMAL) printf( "normal.\n" );
if (M_FONTDATA->m_underlined == FALSE) printf( "false.\n" );
*/
*/
if ((int_scale == 100) &&
(M_FONTDATA->m_family == wxSWISS) &&
(M_FONTDATA->m_style == wxNORMAL) &&
@@ -390,7 +382,7 @@ GdkFont *wxFont::GetInternalFont(float scale) const
}
if (!font)
printf("could not load any font");
// wxError("could not load any font", "wxFont");
// wxError("could not load any font", "wxFont");
return font;
}
@@ -580,7 +572,7 @@ static int SCoordinate(int s)
class wxSuffixMap {
public:
~wxSuffixMap(void);
~wxSuffixMap();
inline char *GetName(int weight, int style)
{
@@ -630,7 +622,7 @@ static void SearchResource(const char *prefix, const char **names, int count, ch
*v = copystring(internal);
}
wxSuffixMap::~wxSuffixMap(void)
wxSuffixMap::~wxSuffixMap()
{
int k, j;
@@ -670,7 +662,7 @@ void wxSuffixMap::Initialize(const char *resname, const char *devresname)
SearchResource(devresname, names, 3, &v);
/* Expand macros in the found string: */
found:
found:
int len, closer = 0, startpos = 0;
len = (v ? strlen(v) : 0);
@@ -752,7 +744,7 @@ void wxSuffixMap::Initialize(const char *resname, const char *devresname)
//-----------------------------------------------------------------------------
class wxFontNameItem : public wxObject {
DECLARE_DYNAMIC_CLASS(wxFontNameItem)
DECLARE_DYNAMIC_CLASS(wxFontNameItem)
public:
wxFontNameItem(const char *name, int id, int family);
~wxFontNameItem();
@@ -760,10 +752,10 @@ public:
inline char* GetScreenName(int w, int s) {return screen.GetName(w, s);}
inline char* GetPostScriptName(int w, int s) {return printing.GetName(w, s);}
inline char* GetAFMName(int w, int s) {return afm.GetName(w, s);}
inline char* GetName(void) {return name;}
inline int GetFamily(void) {return family;}
inline int GetId(void) {return id;}
inline bool IsRoman(void) {return isroman;}
inline char* GetName() {return name;}
inline int GetFamily() {return family;}
inline int GetId() {return id;}
inline bool IsRoman() {return isroman;}
#if defined(__WXDEBUG__)
void Dump(ostream& str);
#endif
@@ -788,7 +780,7 @@ wxFontNameItem::wxFontNameItem(const char *Name, int Id, int Family)
afm. Initialize(name, "Afm");
}
wxFontNameItem::~wxFontNameItem(void)
wxFontNameItem::~wxFontNameItem()
{
if (name)
delete[] name;
@@ -808,7 +800,7 @@ void wxFontNameItem::Dump(ostream& str)
IMPLEMENT_DYNAMIC_CLASS(wxFontNameDirectory, wxObject)
wxFontNameDirectory::wxFontNameDirectory(void)
wxFontNameDirectory::wxFontNameDirectory()
{
table = new wxHashTable(wxKEY_INTEGER, 20);
nextFontId = -1;
@@ -827,7 +819,7 @@ wxFontNameDirectory::~wxFontNameDirectory()
delete table;
}
int wxFontNameDirectory::GetNewFontId(void)
int wxFontNameDirectory::GetNewFontId()
{
return (nextFontId--);
}

View File

@@ -524,7 +524,7 @@ void wxFrame::SetMenuBar( wxMenuBar *menuBar )
if (m_sizeSet) GtkOnSize( m_x, m_y, m_width, m_height );
}
wxMenuBar *wxFrame::GetMenuBar(void) const
wxMenuBar *wxFrame::GetMenuBar() const
{
return m_frameMenuBar;
}
@@ -549,7 +549,7 @@ wxToolBar* wxFrame::OnCreateToolBar( long style, wxWindowID id, const wxString&
return new wxToolBar( this, id, wxDefaultPosition, wxDefaultSize, style, name );
}
wxToolBar *wxFrame::GetToolBar(void) const
wxToolBar *wxFrame::GetToolBar() const
{
return m_frameToolBar;
}
@@ -575,7 +575,7 @@ wxStatusBar *wxFrame::OnCreateStatusBar( int number, long style, wxWindowID id,
// Set the height according to the font and the border size
wxClientDC dc(statusBar);
dc.SetFont( *statusBar->GetFont() );
dc.SetFont( statusBar->GetFont() );
long x, y;
dc.GetTextExtent( "X", &x, &y );
@@ -606,7 +606,7 @@ void wxFrame::SetStatusWidths(int n, const int widths_field[] )
m_frameStatusBar->SetStatusWidths(n, widths_field);
}
wxStatusBar *wxFrame::GetStatusBar(void) const
wxStatusBar *wxFrame::GetStatusBar() const
{
return m_frameStatusBar;
}

View File

@@ -38,11 +38,6 @@ wxIcon::wxIcon( const wxIcon& icon ) : wxBitmap()
Ref(icon);
}
wxIcon::wxIcon( const wxIcon* icon ) : wxBitmap()
{
if (icon) Ref(*icon);
}
wxIcon& wxIcon::operator = ( const wxIcon& icon )
{
if (*this == icon) return (*this);

View File

@@ -218,10 +218,9 @@ wxMenuItem::wxMenuItem()
m_menuItem = (GtkWidget *) NULL;
}
// it's valid for this function to be called even if m_menuItem == NULL
void wxMenuItem::SetName(const wxString& str)
{
wxCHECK_RET( m_menuItem, "invalid menu item" );
m_text = "";
for ( const char *pc = str; *pc != '\0'; pc++ )
{
@@ -231,9 +230,12 @@ void wxMenuItem::SetName(const wxString& str)
m_text << *pc;
}
if ( m_menuItem )
{
GtkLabel *label = GTK_LABEL( GTK_BIN(m_menuItem)->child );
gtk_label_set( label, m_text.c_str());
}
}
void wxMenuItem::Check( bool check )

View File

@@ -29,12 +29,12 @@ class wxPaletteRefData: public wxObjectRefData
GdkColormap *m_colormap;
};
wxPaletteRefData::wxPaletteRefData(void)
wxPaletteRefData::wxPaletteRefData()
{
m_colormap = (GdkColormap *) NULL;
};
wxPaletteRefData::~wxPaletteRefData(void)
wxPaletteRefData::~wxPaletteRefData()
{
if (m_colormap) gdk_colormap_unref( m_colormap );
};
@@ -45,7 +45,7 @@ wxPaletteRefData::~wxPaletteRefData(void)
IMPLEMENT_DYNAMIC_CLASS(wxPalette,wxGDIObject)
wxPalette::wxPalette(void)
wxPalette::wxPalette()
{
};
@@ -60,13 +60,7 @@ wxPalette::wxPalette( const wxPalette& palette )
Ref( palette );
};
wxPalette::wxPalette( const wxPalette* palette )
{
UnRef();
if (palette) Ref( *palette );
};
wxPalette::~wxPalette(void)
wxPalette::~wxPalette()
{
};

View File

@@ -55,7 +55,7 @@ wxPenRefData::wxPenRefData( const wxPenRefData& data )
IMPLEMENT_DYNAMIC_CLASS(wxPen,wxGDIObject)
wxPen::wxPen(void)
wxPen::wxPen()
{
if (wxThePenList) wxThePenList->AddPen( this );
}
@@ -76,14 +76,6 @@ wxPen::wxPen( const wxPen& pen )
if (wxThePenList) wxThePenList->AddPen( this );
}
wxPen::wxPen( const wxPen* pen )
{
UnRef();
if (pen) Ref( *pen );
if (wxThePenList) wxThePenList->AddPen( this );
}
wxPen::~wxPen()
{
if (wxThePenList) wxThePenList->RemovePen( this );

View File

@@ -109,7 +109,7 @@ static char *GetIniFile(char *dest, const char *filename)
return dest;
}
static void wxXMergeDatabases(void)
static void wxXMergeDatabases()
{
XrmDatabase homeDB, serverDB, applicationDB;
char filenamebuf[1024];
@@ -159,7 +159,7 @@ static void wxXMergeDatabases(void)
// called on application exit
//-----------------------------------------------------------------------------
void wxFlushResources(void)
void wxFlushResources()
{
char nameBuffer[512];

View File

@@ -1655,7 +1655,7 @@ void wxWindow::Fit()
int maxX = 0;
int maxY = 0;
wxNode *node = m_childrenFirst();
wxNode *node = m_children.First();
while ( node )
{
wxWindow *win = (wxWindow *)node->Data();
@@ -1803,11 +1803,6 @@ void wxWindow::AddChild( wxWindow *child )
m_children.Append( child );
}
wxList& wxWindow::GetChildren() const
{
return m_children;
}
wxWindow *wxWindow::ReParent( wxWindow *newParent )
{
wxWindow *oldParent = GetParent();
@@ -1855,7 +1850,7 @@ void wxWindow::Lower()
if (m_widget) gdk_window_lower( m_widget->window );
}
wxEvtHandler *wxWindow::GetEventHandler()
wxEvtHandler *wxWindow::GetEventHandler() const
{
return m_eventHandler;
}
@@ -1934,7 +1929,7 @@ void wxWindow::SetId( wxWindowID id )
m_windowId = id;
}
wxWindowID wxWindow::GetId()
wxWindowID wxWindow::GetId() const
{
return m_windowId;
}
@@ -1951,7 +1946,8 @@ void wxWindow::SetCursor( const wxCursor &cursor )
if (cursor.Ok())
{
if (*((wxCursor*)&cursor) == m_cursor) return;
if ( cursor == *m_cursor )
return;
*m_cursor = cursor;
}
else
@@ -2278,11 +2274,6 @@ void wxWindow::SetFont( const wxFont &font )
ApplyWidgetStyle();
}
wxFont *wxWindow::GetFont()
{
return &m_font;
}
void wxWindow::SetWindowStyleFlag( long flag )
{
m_windowStyle = flag;
@@ -2795,7 +2786,7 @@ bool wxWindow::DoPhase(int phase)
{
noChanges = 0;
noFailures = 0;
wxNode *node = m_children.first();
wxNode *node = m_children.First();
while (node)
{
wxWindow *child = (wxWindow *)node->Data();

View File

@@ -8,8 +8,7 @@
########################### Programs #################################
# Replace this with your own path if necessary
#WXDIR = /home/karl/wxWindows
WXDIR = /home/jacs/wx2
WXDIR = $(wx)
# C++ compiler
CC = g++