"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:
@@ -222,7 +222,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
static bool IsImmutable(const wxString& key)
|
static bool IsImmutable(const wxString& key)
|
||||||
{ return key[0u] == wxCONFIG_IMMUTABLE_PREFIX; }
|
{ return !key.IsEmpty() && key[0u] == wxCONFIG_IMMUTABLE_PREFIX; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// are we doing automatic environment variable expansion?
|
// are we doing automatic environment variable expansion?
|
||||||
|
@@ -75,7 +75,6 @@ public:
|
|||||||
wxBitmap( const char **bits );
|
wxBitmap( const char **bits );
|
||||||
wxBitmap( char **bits );
|
wxBitmap( char **bits );
|
||||||
wxBitmap( const wxBitmap& bmp );
|
wxBitmap( const wxBitmap& bmp );
|
||||||
wxBitmap( const wxBitmap* bmp );
|
|
||||||
wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM );
|
wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM );
|
||||||
~wxBitmap();
|
~wxBitmap();
|
||||||
wxBitmap& operator = ( const wxBitmap& bmp );
|
wxBitmap& operator = ( const wxBitmap& bmp );
|
||||||
|
@@ -37,20 +37,19 @@ class wxBrush: public wxGDIObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxBrush(void);
|
wxBrush();
|
||||||
wxBrush( const wxColour &colour, int style );
|
wxBrush( const wxColour &colour, int style );
|
||||||
wxBrush( const wxBitmap &stippleBitmap );
|
wxBrush( const wxBitmap &stippleBitmap );
|
||||||
wxBrush( const wxBrush &brush );
|
wxBrush( const wxBrush &brush );
|
||||||
wxBrush( const wxBrush *brush );
|
~wxBrush();
|
||||||
~wxBrush(void);
|
|
||||||
wxBrush& operator = ( const wxBrush& brush );
|
wxBrush& operator = ( const wxBrush& brush );
|
||||||
bool operator == ( const wxBrush& brush );
|
bool 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;
|
int GetStyle() const;
|
||||||
wxColour &GetColour(void) const;
|
wxColour &GetColour() const;
|
||||||
wxBitmap *GetStipple(void) const;
|
wxBitmap *GetStipple() const;
|
||||||
|
|
||||||
|
|
||||||
void SetColour( const wxColour& col );
|
void SetColour( const wxColour& col );
|
||||||
@@ -58,7 +57,7 @@ class wxBrush: public wxGDIObject
|
|||||||
void SetStyle( int style );
|
void SetStyle( int style );
|
||||||
void SetStipple( const wxBitmap& stipple );
|
void SetStipple( const wxBitmap& stipple );
|
||||||
|
|
||||||
void Unshare(void);
|
void Unshare();
|
||||||
|
|
||||||
// no data :-)
|
// no data :-)
|
||||||
};
|
};
|
||||||
|
@@ -50,7 +50,6 @@ public:
|
|||||||
|
|
||||||
// copy ctors and assignment operators
|
// copy ctors and assignment operators
|
||||||
wxColour( const wxColour& col );
|
wxColour( const wxColour& col );
|
||||||
wxColour( const wxColour* col );
|
|
||||||
wxColour& operator = ( const wxColour& col );
|
wxColour& operator = ( const wxColour& col );
|
||||||
|
|
||||||
// dtor
|
// dtor
|
||||||
|
@@ -19,14 +19,6 @@
|
|||||||
#include "wx/object.h"
|
#include "wx/object.h"
|
||||||
#include "wx/gdicmn.h"
|
#include "wx/gdicmn.h"
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
// classes
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
class wxWindow;
|
|
||||||
|
|
||||||
class wxCursor;
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// wxCursor
|
// wxCursor
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -37,22 +29,16 @@ class wxCursor: public wxObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxCursor(void);
|
wxCursor();
|
||||||
wxCursor( int cursorId );
|
wxCursor( int cursorId );
|
||||||
wxCursor( const wxCursor &cursor );
|
wxCursor( const wxCursor &cursor );
|
||||||
wxCursor( const wxCursor *cursor );
|
~wxCursor();
|
||||||
~wxCursor(void);
|
|
||||||
wxCursor& operator = ( const wxCursor& cursor );
|
wxCursor& operator = ( const wxCursor& cursor );
|
||||||
bool operator == ( const wxCursor& cursor );
|
bool operator == ( const wxCursor& cursor ) const;
|
||||||
bool operator != ( const wxCursor& cursor );
|
bool operator != ( const wxCursor& cursor ) const;
|
||||||
bool Ok(void) const;
|
bool Ok() const;
|
||||||
|
|
||||||
private:
|
GdkCursor *GetCursor() const;
|
||||||
public:
|
|
||||||
|
|
||||||
friend wxWindow;
|
|
||||||
|
|
||||||
GdkCursor *GetCursor(void) const;
|
|
||||||
|
|
||||||
// no data :-)
|
// no data :-)
|
||||||
};
|
};
|
||||||
|
@@ -189,16 +189,16 @@ public:
|
|||||||
virtual void Clear() = 0;
|
virtual void Clear() = 0;
|
||||||
|
|
||||||
virtual void SetFont( const wxFont &font ) = 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 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 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 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 void SetLogicalFunction( int function ) = 0;
|
||||||
virtual int GetLogicalFunction() { return m_logicalFunction; };
|
virtual int GetLogicalFunction() { return m_logicalFunction; };
|
||||||
|
@@ -47,30 +47,29 @@ class wxFont: public wxGDIObject
|
|||||||
DECLARE_DYNAMIC_CLASS(wxFont)
|
DECLARE_DYNAMIC_CLASS(wxFont)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxFont(void);
|
wxFont();
|
||||||
wxFont( int PointSize, int FontIdOrFamily, int Style, int Weight,
|
wxFont( int PointSize, int FontIdOrFamily, int Style, int Weight,
|
||||||
bool underlined = FALSE, const char *Face = ( const char *) NULL );
|
bool underlined = FALSE, const char *Face = ( const char *) NULL );
|
||||||
wxFont( int PointSize, const char *Face, int Family, int Style, int Weight,
|
wxFont( int PointSize, const char *Face, int Family,
|
||||||
bool underlined = FALSE );
|
int Style, int Weight, bool underlined = FALSE );
|
||||||
wxFont( const wxFont& font );
|
wxFont( const wxFont& font );
|
||||||
wxFont( const wxFont* font );
|
~wxFont();
|
||||||
~wxFont(void);
|
|
||||||
wxFont& operator = ( const wxFont& font );
|
wxFont& operator = ( const wxFont& font );
|
||||||
bool operator == ( const wxFont& font );
|
bool operator == ( const wxFont& font );
|
||||||
bool operator != ( const wxFont& font );
|
bool operator != ( const wxFont& font );
|
||||||
bool Ok() const;
|
bool Ok() const;
|
||||||
|
|
||||||
int GetPointSize(void) const;
|
int GetPointSize() const;
|
||||||
wxString GetFaceName(void) const;
|
wxString GetFaceName() const;
|
||||||
int GetFamily(void) const;
|
int GetFamily() const;
|
||||||
wxString GetFamilyString(void) const;
|
wxString GetFamilyString() const;
|
||||||
int GetFontId(void) const;
|
int GetFontId() const;
|
||||||
wxString GetFaceString(void) const;
|
wxString GetFaceString() const;
|
||||||
int GetStyle(void) const;
|
int GetStyle() const;
|
||||||
wxString GetStyleString(void) const;
|
wxString GetStyleString() const;
|
||||||
int GetWeight(void) const;
|
int GetWeight() const;
|
||||||
wxString GetWeightString(void) const;
|
wxString GetWeightString() const;
|
||||||
bool GetUnderlined(void) const;
|
bool GetUnderlined() const;
|
||||||
|
|
||||||
wxFont( char *xFontName );
|
wxFont( char *xFontName );
|
||||||
|
|
||||||
@@ -90,10 +89,10 @@ class wxFontNameDirectory: public wxObject
|
|||||||
DECLARE_DYNAMIC_CLASS(wxFontNameDirectory)
|
DECLARE_DYNAMIC_CLASS(wxFontNameDirectory)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxFontNameDirectory(void);
|
wxFontNameDirectory();
|
||||||
~wxFontNameDirectory();
|
~wxFontNameDirectory();
|
||||||
|
|
||||||
void Initialize(void);
|
void Initialize();
|
||||||
void Initialize(int fontid, int family, const char *name);
|
void Initialize(int fontid, int family, const char *name);
|
||||||
|
|
||||||
int FindOrCreateFontId(const char *name, int family);
|
int FindOrCreateFontId(const char *name, int family);
|
||||||
@@ -101,11 +100,10 @@ class wxFontNameDirectory: public wxObject
|
|||||||
int GetFamily(int fontid);
|
int GetFamily(int fontid);
|
||||||
int GetFontId(const char *name);
|
int GetFontId(const char *name);
|
||||||
char* GetFontName(int fontid);
|
char* GetFontName(int fontid);
|
||||||
int GetNewFontId(void);
|
int GetNewFontId();
|
||||||
char* GetPostScriptName(int fontid, int weight, int style);
|
char* GetPostScriptName(int fontid, int weight, int style);
|
||||||
char* GetScreenName(int fontid, int weight, int style);
|
char* GetScreenName(int fontid, int weight, int style);
|
||||||
|
|
||||||
|
|
||||||
class wxHashTable *table;
|
class wxHashTable *table;
|
||||||
int nextFontId;
|
int nextFontId;
|
||||||
};
|
};
|
||||||
|
@@ -35,9 +35,8 @@ class wxIcon: public wxBitmap
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxIcon(void);
|
wxIcon();
|
||||||
wxIcon( const wxIcon& icon);
|
wxIcon( const wxIcon& icon);
|
||||||
wxIcon( const wxIcon* icon);
|
|
||||||
wxIcon( const char **bits, int width=-1, int height=-1 );
|
wxIcon( const char **bits, int width=-1, int height=-1 );
|
||||||
wxIcon( char **bits, int width=-1, int height=-1 );
|
wxIcon( char **bits, int width=-1, int height=-1 );
|
||||||
|
|
||||||
|
@@ -50,7 +50,9 @@ public:
|
|||||||
|
|
||||||
// the item's text = name
|
// the item's text = name
|
||||||
void SetName(const wxString& str);
|
void SetName(const wxString& str);
|
||||||
|
void SetText(const wxString& str) { SetName(str); } // compatibility
|
||||||
const wxString& GetName() const { return m_text; }
|
const wxString& GetName() const { return m_text; }
|
||||||
|
const wxString& GetText() const { return GetName(); }
|
||||||
|
|
||||||
// what kind of menu item we are
|
// what kind of menu item we are
|
||||||
void SetCheckable(bool checkable) { m_isCheckMenu = checkable; }
|
void SetCheckable(bool checkable) { m_isCheckMenu = checkable; }
|
||||||
|
@@ -37,15 +37,14 @@ class wxPalette: public wxGDIObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxPalette(void);
|
wxPalette();
|
||||||
wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue );
|
wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue );
|
||||||
wxPalette( const wxPalette& palette );
|
wxPalette( const wxPalette& palette );
|
||||||
wxPalette( const wxPalette* palette );
|
~wxPalette();
|
||||||
~wxPalette(void);
|
|
||||||
wxPalette& operator = ( const wxPalette& palette );
|
wxPalette& operator = ( const wxPalette& palette );
|
||||||
bool operator == ( const wxPalette& palette );
|
bool 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);
|
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;
|
int GetPixel( const unsigned char red, const unsigned char green, const unsigned char blue ) const;
|
||||||
|
@@ -37,11 +37,10 @@ class wxPen: public wxGDIObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxPen(void);
|
wxPen();
|
||||||
wxPen( const wxColour &colour, int width, int style );
|
wxPen( const wxColour &colour, int width, int style );
|
||||||
wxPen( const wxPen& pen );
|
wxPen( const wxPen& pen );
|
||||||
wxPen( const wxPen* pen );
|
~wxPen();
|
||||||
~wxPen(void);
|
|
||||||
wxPen& operator = ( const wxPen& pen );
|
wxPen& operator = ( const wxPen& pen );
|
||||||
bool operator == ( const wxPen& pen );
|
bool 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 SetJoin( int joinStyle );
|
||||||
void SetStyle( int style );
|
void SetStyle( int style );
|
||||||
void SetWidth( int width );
|
void SetWidth( int width );
|
||||||
wxColour &GetColour(void) const;
|
wxColour &GetColour() const;
|
||||||
int GetCap(void) const;
|
int GetCap() const;
|
||||||
int GetJoin(void) const;
|
int GetJoin() const;
|
||||||
int GetStyle(void) const;
|
int GetStyle() const;
|
||||||
int GetWidth(void) const;
|
int GetWidth() const;
|
||||||
bool Ok(void) const;
|
bool Ok() const;
|
||||||
|
|
||||||
void Unshare(void);
|
void Unshare();
|
||||||
|
|
||||||
// no data :-)
|
// no data :-)
|
||||||
};
|
};
|
||||||
|
@@ -155,7 +155,8 @@ public:
|
|||||||
virtual bool OnClose();
|
virtual bool OnClose();
|
||||||
|
|
||||||
virtual void AddChild( wxWindow *child );
|
virtual void AddChild( wxWindow *child );
|
||||||
wxList& GetChildren() const;
|
wxList& GetChildren() { return m_children; }
|
||||||
|
|
||||||
virtual void RemoveChild( wxWindow *child );
|
virtual void RemoveChild( wxWindow *child );
|
||||||
void SetReturnCode( int retCode );
|
void SetReturnCode( int retCode );
|
||||||
int GetReturnCode();
|
int GetReturnCode();
|
||||||
@@ -167,7 +168,7 @@ public:
|
|||||||
{ m_parent = p; }
|
{ m_parent = p; }
|
||||||
virtual wxWindow *ReParent( wxWindow *newParent );
|
virtual wxWindow *ReParent( wxWindow *newParent );
|
||||||
|
|
||||||
wxEvtHandler *GetEventHandler();
|
wxEvtHandler *GetEventHandler() const;
|
||||||
void SetEventHandler( wxEvtHandler *handler );
|
void SetEventHandler( wxEvtHandler *handler );
|
||||||
void PushEventHandler( wxEvtHandler *handler );
|
void PushEventHandler( wxEvtHandler *handler );
|
||||||
wxEvtHandler *PopEventHandler( bool deleteHandler = FALSE );
|
wxEvtHandler *PopEventHandler( bool deleteHandler = FALSE );
|
||||||
@@ -187,7 +188,7 @@ public:
|
|||||||
bool IsBeingDeleted();
|
bool IsBeingDeleted();
|
||||||
|
|
||||||
void SetId( wxWindowID id );
|
void SetId( wxWindowID id );
|
||||||
wxWindowID GetId();
|
wxWindowID GetId() const;
|
||||||
|
|
||||||
void SetCursor( const wxCursor &cursor );
|
void SetCursor( const wxCursor &cursor );
|
||||||
|
|
||||||
@@ -213,13 +214,13 @@ public:
|
|||||||
const wxFont *theFont = (const wxFont *) NULL, bool use16 = FALSE) const;
|
const wxFont *theFont = (const wxFont *) NULL, bool use16 = FALSE) const;
|
||||||
|
|
||||||
virtual void SetFont( const wxFont &font );
|
virtual void SetFont( const wxFont &font );
|
||||||
virtual wxFont *GetFont();
|
virtual const wxFont& GetFont() { return m_font; }
|
||||||
|
|
||||||
// For backward compatibility
|
// For backward compatibility
|
||||||
inline virtual void SetButtonFont(const wxFont& font) { SetFont(font); }
|
inline virtual void SetButtonFont(const wxFont& font) { SetFont(font); }
|
||||||
inline virtual void SetLabelFont(const wxFont& font) { SetFont(font); }
|
inline virtual void SetLabelFont(const wxFont& font) { SetFont(font); }
|
||||||
inline virtual wxFont *GetLabelFont() { return GetFont(); };
|
inline virtual const wxFont& GetLabelFont() { return GetFont(); };
|
||||||
inline virtual wxFont *GetButtonFont() { return GetFont(); };
|
inline virtual const wxFont& GetButtonFont() { return GetFont(); };
|
||||||
|
|
||||||
virtual void SetWindowStyleFlag( long flag );
|
virtual void SetWindowStyleFlag( long flag );
|
||||||
virtual long GetWindowStyleFlag() const;
|
virtual long GetWindowStyleFlag() const;
|
||||||
|
@@ -75,7 +75,6 @@ public:
|
|||||||
wxBitmap( const char **bits );
|
wxBitmap( const char **bits );
|
||||||
wxBitmap( char **bits );
|
wxBitmap( char **bits );
|
||||||
wxBitmap( const wxBitmap& bmp );
|
wxBitmap( const wxBitmap& bmp );
|
||||||
wxBitmap( const wxBitmap* bmp );
|
|
||||||
wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM );
|
wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM );
|
||||||
~wxBitmap();
|
~wxBitmap();
|
||||||
wxBitmap& operator = ( const wxBitmap& bmp );
|
wxBitmap& operator = ( const wxBitmap& bmp );
|
||||||
|
@@ -37,20 +37,19 @@ class wxBrush: public wxGDIObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxBrush(void);
|
wxBrush();
|
||||||
wxBrush( const wxColour &colour, int style );
|
wxBrush( const wxColour &colour, int style );
|
||||||
wxBrush( const wxBitmap &stippleBitmap );
|
wxBrush( const wxBitmap &stippleBitmap );
|
||||||
wxBrush( const wxBrush &brush );
|
wxBrush( const wxBrush &brush );
|
||||||
wxBrush( const wxBrush *brush );
|
~wxBrush();
|
||||||
~wxBrush(void);
|
|
||||||
wxBrush& operator = ( const wxBrush& brush );
|
wxBrush& operator = ( const wxBrush& brush );
|
||||||
bool operator == ( const wxBrush& brush );
|
bool 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;
|
int GetStyle() const;
|
||||||
wxColour &GetColour(void) const;
|
wxColour &GetColour() const;
|
||||||
wxBitmap *GetStipple(void) const;
|
wxBitmap *GetStipple() const;
|
||||||
|
|
||||||
|
|
||||||
void SetColour( const wxColour& col );
|
void SetColour( const wxColour& col );
|
||||||
@@ -58,7 +57,7 @@ class wxBrush: public wxGDIObject
|
|||||||
void SetStyle( int style );
|
void SetStyle( int style );
|
||||||
void SetStipple( const wxBitmap& stipple );
|
void SetStipple( const wxBitmap& stipple );
|
||||||
|
|
||||||
void Unshare(void);
|
void Unshare();
|
||||||
|
|
||||||
// no data :-)
|
// no data :-)
|
||||||
};
|
};
|
||||||
|
@@ -50,7 +50,6 @@ public:
|
|||||||
|
|
||||||
// copy ctors and assignment operators
|
// copy ctors and assignment operators
|
||||||
wxColour( const wxColour& col );
|
wxColour( const wxColour& col );
|
||||||
wxColour( const wxColour* col );
|
|
||||||
wxColour& operator = ( const wxColour& col );
|
wxColour& operator = ( const wxColour& col );
|
||||||
|
|
||||||
// dtor
|
// dtor
|
||||||
|
@@ -19,14 +19,6 @@
|
|||||||
#include "wx/object.h"
|
#include "wx/object.h"
|
||||||
#include "wx/gdicmn.h"
|
#include "wx/gdicmn.h"
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
// classes
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
class wxWindow;
|
|
||||||
|
|
||||||
class wxCursor;
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// wxCursor
|
// wxCursor
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -37,22 +29,16 @@ class wxCursor: public wxObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxCursor(void);
|
wxCursor();
|
||||||
wxCursor( int cursorId );
|
wxCursor( int cursorId );
|
||||||
wxCursor( const wxCursor &cursor );
|
wxCursor( const wxCursor &cursor );
|
||||||
wxCursor( const wxCursor *cursor );
|
~wxCursor();
|
||||||
~wxCursor(void);
|
|
||||||
wxCursor& operator = ( const wxCursor& cursor );
|
wxCursor& operator = ( const wxCursor& cursor );
|
||||||
bool operator == ( const wxCursor& cursor );
|
bool operator == ( const wxCursor& cursor ) const;
|
||||||
bool operator != ( const wxCursor& cursor );
|
bool operator != ( const wxCursor& cursor ) const;
|
||||||
bool Ok(void) const;
|
bool Ok() const;
|
||||||
|
|
||||||
private:
|
GdkCursor *GetCursor() const;
|
||||||
public:
|
|
||||||
|
|
||||||
friend wxWindow;
|
|
||||||
|
|
||||||
GdkCursor *GetCursor(void) const;
|
|
||||||
|
|
||||||
// no data :-)
|
// no data :-)
|
||||||
};
|
};
|
||||||
|
@@ -189,16 +189,16 @@ public:
|
|||||||
virtual void Clear() = 0;
|
virtual void Clear() = 0;
|
||||||
|
|
||||||
virtual void SetFont( const wxFont &font ) = 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 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 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 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 void SetLogicalFunction( int function ) = 0;
|
||||||
virtual int GetLogicalFunction() { return m_logicalFunction; };
|
virtual int GetLogicalFunction() { return m_logicalFunction; };
|
||||||
|
@@ -47,30 +47,29 @@ class wxFont: public wxGDIObject
|
|||||||
DECLARE_DYNAMIC_CLASS(wxFont)
|
DECLARE_DYNAMIC_CLASS(wxFont)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxFont(void);
|
wxFont();
|
||||||
wxFont( int PointSize, int FontIdOrFamily, int Style, int Weight,
|
wxFont( int PointSize, int FontIdOrFamily, int Style, int Weight,
|
||||||
bool underlined = FALSE, const char *Face = ( const char *) NULL );
|
bool underlined = FALSE, const char *Face = ( const char *) NULL );
|
||||||
wxFont( int PointSize, const char *Face, int Family, int Style, int Weight,
|
wxFont( int PointSize, const char *Face, int Family,
|
||||||
bool underlined = FALSE );
|
int Style, int Weight, bool underlined = FALSE );
|
||||||
wxFont( const wxFont& font );
|
wxFont( const wxFont& font );
|
||||||
wxFont( const wxFont* font );
|
~wxFont();
|
||||||
~wxFont(void);
|
|
||||||
wxFont& operator = ( const wxFont& font );
|
wxFont& operator = ( const wxFont& font );
|
||||||
bool operator == ( const wxFont& font );
|
bool operator == ( const wxFont& font );
|
||||||
bool operator != ( const wxFont& font );
|
bool operator != ( const wxFont& font );
|
||||||
bool Ok() const;
|
bool Ok() const;
|
||||||
|
|
||||||
int GetPointSize(void) const;
|
int GetPointSize() const;
|
||||||
wxString GetFaceName(void) const;
|
wxString GetFaceName() const;
|
||||||
int GetFamily(void) const;
|
int GetFamily() const;
|
||||||
wxString GetFamilyString(void) const;
|
wxString GetFamilyString() const;
|
||||||
int GetFontId(void) const;
|
int GetFontId() const;
|
||||||
wxString GetFaceString(void) const;
|
wxString GetFaceString() const;
|
||||||
int GetStyle(void) const;
|
int GetStyle() const;
|
||||||
wxString GetStyleString(void) const;
|
wxString GetStyleString() const;
|
||||||
int GetWeight(void) const;
|
int GetWeight() const;
|
||||||
wxString GetWeightString(void) const;
|
wxString GetWeightString() const;
|
||||||
bool GetUnderlined(void) const;
|
bool GetUnderlined() const;
|
||||||
|
|
||||||
wxFont( char *xFontName );
|
wxFont( char *xFontName );
|
||||||
|
|
||||||
@@ -90,10 +89,10 @@ class wxFontNameDirectory: public wxObject
|
|||||||
DECLARE_DYNAMIC_CLASS(wxFontNameDirectory)
|
DECLARE_DYNAMIC_CLASS(wxFontNameDirectory)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxFontNameDirectory(void);
|
wxFontNameDirectory();
|
||||||
~wxFontNameDirectory();
|
~wxFontNameDirectory();
|
||||||
|
|
||||||
void Initialize(void);
|
void Initialize();
|
||||||
void Initialize(int fontid, int family, const char *name);
|
void Initialize(int fontid, int family, const char *name);
|
||||||
|
|
||||||
int FindOrCreateFontId(const char *name, int family);
|
int FindOrCreateFontId(const char *name, int family);
|
||||||
@@ -101,11 +100,10 @@ class wxFontNameDirectory: public wxObject
|
|||||||
int GetFamily(int fontid);
|
int GetFamily(int fontid);
|
||||||
int GetFontId(const char *name);
|
int GetFontId(const char *name);
|
||||||
char* GetFontName(int fontid);
|
char* GetFontName(int fontid);
|
||||||
int GetNewFontId(void);
|
int GetNewFontId();
|
||||||
char* GetPostScriptName(int fontid, int weight, int style);
|
char* GetPostScriptName(int fontid, int weight, int style);
|
||||||
char* GetScreenName(int fontid, int weight, int style);
|
char* GetScreenName(int fontid, int weight, int style);
|
||||||
|
|
||||||
|
|
||||||
class wxHashTable *table;
|
class wxHashTable *table;
|
||||||
int nextFontId;
|
int nextFontId;
|
||||||
};
|
};
|
||||||
|
@@ -35,9 +35,8 @@ class wxIcon: public wxBitmap
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxIcon(void);
|
wxIcon();
|
||||||
wxIcon( const wxIcon& icon);
|
wxIcon( const wxIcon& icon);
|
||||||
wxIcon( const wxIcon* icon);
|
|
||||||
wxIcon( const char **bits, int width=-1, int height=-1 );
|
wxIcon( const char **bits, int width=-1, int height=-1 );
|
||||||
wxIcon( char **bits, int width=-1, int height=-1 );
|
wxIcon( char **bits, int width=-1, int height=-1 );
|
||||||
|
|
||||||
|
@@ -50,7 +50,9 @@ public:
|
|||||||
|
|
||||||
// the item's text = name
|
// the item's text = name
|
||||||
void SetName(const wxString& str);
|
void SetName(const wxString& str);
|
||||||
|
void SetText(const wxString& str) { SetName(str); } // compatibility
|
||||||
const wxString& GetName() const { return m_text; }
|
const wxString& GetName() const { return m_text; }
|
||||||
|
const wxString& GetText() const { return GetName(); }
|
||||||
|
|
||||||
// what kind of menu item we are
|
// what kind of menu item we are
|
||||||
void SetCheckable(bool checkable) { m_isCheckMenu = checkable; }
|
void SetCheckable(bool checkable) { m_isCheckMenu = checkable; }
|
||||||
|
@@ -37,15 +37,14 @@ class wxPalette: public wxGDIObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxPalette(void);
|
wxPalette();
|
||||||
wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue );
|
wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue );
|
||||||
wxPalette( const wxPalette& palette );
|
wxPalette( const wxPalette& palette );
|
||||||
wxPalette( const wxPalette* palette );
|
~wxPalette();
|
||||||
~wxPalette(void);
|
|
||||||
wxPalette& operator = ( const wxPalette& palette );
|
wxPalette& operator = ( const wxPalette& palette );
|
||||||
bool operator == ( const wxPalette& palette );
|
bool 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);
|
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;
|
int GetPixel( const unsigned char red, const unsigned char green, const unsigned char blue ) const;
|
||||||
|
@@ -37,11 +37,10 @@ class wxPen: public wxGDIObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxPen(void);
|
wxPen();
|
||||||
wxPen( const wxColour &colour, int width, int style );
|
wxPen( const wxColour &colour, int width, int style );
|
||||||
wxPen( const wxPen& pen );
|
wxPen( const wxPen& pen );
|
||||||
wxPen( const wxPen* pen );
|
~wxPen();
|
||||||
~wxPen(void);
|
|
||||||
wxPen& operator = ( const wxPen& pen );
|
wxPen& operator = ( const wxPen& pen );
|
||||||
bool operator == ( const wxPen& pen );
|
bool 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 SetJoin( int joinStyle );
|
||||||
void SetStyle( int style );
|
void SetStyle( int style );
|
||||||
void SetWidth( int width );
|
void SetWidth( int width );
|
||||||
wxColour &GetColour(void) const;
|
wxColour &GetColour() const;
|
||||||
int GetCap(void) const;
|
int GetCap() const;
|
||||||
int GetJoin(void) const;
|
int GetJoin() const;
|
||||||
int GetStyle(void) const;
|
int GetStyle() const;
|
||||||
int GetWidth(void) const;
|
int GetWidth() const;
|
||||||
bool Ok(void) const;
|
bool Ok() const;
|
||||||
|
|
||||||
void Unshare(void);
|
void Unshare();
|
||||||
|
|
||||||
// no data :-)
|
// no data :-)
|
||||||
};
|
};
|
||||||
|
@@ -155,7 +155,8 @@ public:
|
|||||||
virtual bool OnClose();
|
virtual bool OnClose();
|
||||||
|
|
||||||
virtual void AddChild( wxWindow *child );
|
virtual void AddChild( wxWindow *child );
|
||||||
wxList& GetChildren() const;
|
wxList& GetChildren() { return m_children; }
|
||||||
|
|
||||||
virtual void RemoveChild( wxWindow *child );
|
virtual void RemoveChild( wxWindow *child );
|
||||||
void SetReturnCode( int retCode );
|
void SetReturnCode( int retCode );
|
||||||
int GetReturnCode();
|
int GetReturnCode();
|
||||||
@@ -167,7 +168,7 @@ public:
|
|||||||
{ m_parent = p; }
|
{ m_parent = p; }
|
||||||
virtual wxWindow *ReParent( wxWindow *newParent );
|
virtual wxWindow *ReParent( wxWindow *newParent );
|
||||||
|
|
||||||
wxEvtHandler *GetEventHandler();
|
wxEvtHandler *GetEventHandler() const;
|
||||||
void SetEventHandler( wxEvtHandler *handler );
|
void SetEventHandler( wxEvtHandler *handler );
|
||||||
void PushEventHandler( wxEvtHandler *handler );
|
void PushEventHandler( wxEvtHandler *handler );
|
||||||
wxEvtHandler *PopEventHandler( bool deleteHandler = FALSE );
|
wxEvtHandler *PopEventHandler( bool deleteHandler = FALSE );
|
||||||
@@ -187,7 +188,7 @@ public:
|
|||||||
bool IsBeingDeleted();
|
bool IsBeingDeleted();
|
||||||
|
|
||||||
void SetId( wxWindowID id );
|
void SetId( wxWindowID id );
|
||||||
wxWindowID GetId();
|
wxWindowID GetId() const;
|
||||||
|
|
||||||
void SetCursor( const wxCursor &cursor );
|
void SetCursor( const wxCursor &cursor );
|
||||||
|
|
||||||
@@ -213,13 +214,13 @@ public:
|
|||||||
const wxFont *theFont = (const wxFont *) NULL, bool use16 = FALSE) const;
|
const wxFont *theFont = (const wxFont *) NULL, bool use16 = FALSE) const;
|
||||||
|
|
||||||
virtual void SetFont( const wxFont &font );
|
virtual void SetFont( const wxFont &font );
|
||||||
virtual wxFont *GetFont();
|
virtual const wxFont& GetFont() { return m_font; }
|
||||||
|
|
||||||
// For backward compatibility
|
// For backward compatibility
|
||||||
inline virtual void SetButtonFont(const wxFont& font) { SetFont(font); }
|
inline virtual void SetButtonFont(const wxFont& font) { SetFont(font); }
|
||||||
inline virtual void SetLabelFont(const wxFont& font) { SetFont(font); }
|
inline virtual void SetLabelFont(const wxFont& font) { SetFont(font); }
|
||||||
inline virtual wxFont *GetLabelFont() { return GetFont(); };
|
inline virtual const wxFont& GetLabelFont() { return GetFont(); };
|
||||||
inline virtual wxFont *GetButtonFont() { return GetFont(); };
|
inline virtual const wxFont& GetButtonFont() { return GetFont(); };
|
||||||
|
|
||||||
virtual void SetWindowStyleFlag( long flag );
|
virtual void SetWindowStyleFlag( long flag );
|
||||||
virtual long GetWindowStyleFlag() const;
|
virtual long GetWindowStyleFlag() const;
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
// Author: Vadim Zeitlin
|
// Author: Vadim Zeitlin
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 04/01/98
|
// Created: 04/01/98
|
||||||
// RCS-ID:
|
// RCS-ID: $Id$
|
||||||
// Copyright:
|
// Copyright:
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -123,7 +123,7 @@ BEGIN_EVENT_TABLE(DnDFrame, wxFrame)
|
|||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
// `Main program' equivalent, creating windows and returning main app frame
|
// `Main program' equivalent, creating windows and returning main app frame
|
||||||
bool DnDApp::OnInit(void)
|
bool DnDApp::OnInit()
|
||||||
{
|
{
|
||||||
// create the main frame window
|
// create the main frame window
|
||||||
DnDFrame *frame = new DnDFrame((wxFrame *) NULL, "Drag & Drop wxWindows App",
|
DnDFrame *frame = new DnDFrame((wxFrame *) NULL, "Drag & Drop wxWindows App",
|
||||||
@@ -291,7 +291,7 @@ void DnDFrame::OnHelp(wxCommandEvent& /* event */)
|
|||||||
|
|
||||||
void DnDFrame::OnLogClear(wxCommandEvent& /* event */ )
|
void DnDFrame::OnLogClear(wxCommandEvent& /* event */ )
|
||||||
{
|
{
|
||||||
// m_ctrlLog->Clear();
|
m_ctrlLog->Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DnDFrame::OnClose()
|
bool DnDFrame::OnClose()
|
||||||
|
@@ -21,6 +21,8 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/toolbar.h"
|
#include "wx/toolbar.h"
|
||||||
|
#include <wx/log.h>
|
||||||
|
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
#if defined(__WXGTK__) || defined(__WXMOTIF__)
|
#if defined(__WXGTK__) || defined(__WXMOTIF__)
|
||||||
@@ -38,7 +40,6 @@
|
|||||||
|
|
||||||
IMPLEMENT_APP(MyApp)
|
IMPLEMENT_APP(MyApp)
|
||||||
|
|
||||||
|
|
||||||
// The `main program' equivalent, creating the windows and returning the
|
// The `main program' equivalent, creating the windows and returning the
|
||||||
// main frame
|
// main frame
|
||||||
bool MyApp::OnInit(void)
|
bool MyApp::OnInit(void)
|
||||||
@@ -51,11 +52,7 @@ bool MyApp::OnInit(void)
|
|||||||
frame->CreateStatusBar();
|
frame->CreateStatusBar();
|
||||||
|
|
||||||
// Give it an icon
|
// Give it an icon
|
||||||
#ifdef __WXMSW__
|
frame->SetIcon(wxICON(mondrian));
|
||||||
frame->SetIcon(wxIcon("mondrian"));
|
|
||||||
#else
|
|
||||||
frame->SetIcon( wxIcon(mondrian_xpm) );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Make a menubar
|
// Make a menubar
|
||||||
wxMenu *fileMenu = new wxMenu;
|
wxMenu *fileMenu = new wxMenu;
|
||||||
@@ -92,8 +89,6 @@ bool MyApp::OnInit(void)
|
|||||||
|
|
||||||
bool MyApp::InitToolbar(wxToolBar* toolBar)
|
bool MyApp::InitToolbar(wxToolBar* toolBar)
|
||||||
{
|
{
|
||||||
toolBar->SetMargins(5, 5);
|
|
||||||
|
|
||||||
// Set up toolbar
|
// Set up toolbar
|
||||||
wxBitmap* toolBarBitmaps[8];
|
wxBitmap* toolBarBitmaps[8];
|
||||||
|
|
||||||
@@ -167,7 +162,7 @@ END_EVENT_TABLE()
|
|||||||
// Define my frame constructor
|
// Define my frame constructor
|
||||||
MyFrame::MyFrame(wxFrame* parent, wxWindowID id, const wxString& title, const wxPoint& pos,
|
MyFrame::MyFrame(wxFrame* parent, wxWindowID id, const wxString& title, const wxPoint& pos,
|
||||||
const wxSize& size, long style):
|
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);
|
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 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
|
// Define the behaviour for the frame closing
|
||||||
|
@@ -17,6 +17,17 @@ class MyApp: public wxApp
|
|||||||
bool InitToolbar(wxToolBar* toolBar);
|
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
|
// Define a new frame
|
||||||
class MyFrame: public wxFrame
|
class MyFrame: public wxFrame
|
||||||
{
|
{
|
||||||
@@ -34,6 +45,8 @@ public:
|
|||||||
private:
|
private:
|
||||||
wxTextCtrl* m_textWindow;
|
wxTextCtrl* m_textWindow;
|
||||||
|
|
||||||
|
MyTimer m_timer;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -50,7 +50,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxColourData, wxObject)
|
|||||||
* wxColourData
|
* wxColourData
|
||||||
*/
|
*/
|
||||||
|
|
||||||
wxColourData::wxColourData(void)
|
wxColourData::wxColourData()
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < 16; i++)
|
for (i = 0; i < 16; i++)
|
||||||
@@ -60,7 +60,7 @@ wxColourData::wxColourData(void)
|
|||||||
dataColour.Set(0,0,0);
|
dataColour.Set(0,0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxColourData::~wxColourData(void)
|
wxColourData::~wxColourData()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,7 +94,7 @@ void wxColourData::operator=(const wxColourData& data)
|
|||||||
* Font data
|
* Font data
|
||||||
*/
|
*/
|
||||||
|
|
||||||
wxFontData::wxFontData(void)
|
wxFontData::wxFontData()
|
||||||
{
|
{
|
||||||
// Intialize colour to black.
|
// Intialize colour to black.
|
||||||
fontColour.Set(0, 0, 0);
|
fontColour.Set(0, 0, 0);
|
||||||
@@ -106,7 +106,7 @@ wxFontData::wxFontData(void)
|
|||||||
maxSize = 0;
|
maxSize = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFontData::~wxFontData(void)
|
wxFontData::~wxFontData()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ void wxFontData::operator=(const wxFontData& data)
|
|||||||
* Print data
|
* Print data
|
||||||
*/
|
*/
|
||||||
|
|
||||||
wxPrintData::wxPrintData(void)
|
wxPrintData::wxPrintData()
|
||||||
{
|
{
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
printData = NULL;
|
printData = NULL;
|
||||||
@@ -147,7 +147,7 @@ wxPrintData::wxPrintData(void)
|
|||||||
printSetupDialog = FALSE;
|
printSetupDialog = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPrintData::~wxPrintData(void)
|
wxPrintData::~wxPrintData()
|
||||||
{
|
{
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
PRINTDLG *pd = (PRINTDLG *)printData;
|
PRINTDLG *pd = (PRINTDLG *)printData;
|
||||||
@@ -159,7 +159,7 @@ wxPrintData::~wxPrintData(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
void wxPrintData::ConvertToNative(void)
|
void wxPrintData::ConvertToNative()
|
||||||
{
|
{
|
||||||
PRINTDLG *pd = (PRINTDLG*) printData;
|
PRINTDLG *pd = (PRINTDLG*) printData;
|
||||||
if ( pd == NULL )
|
if ( pd == NULL )
|
||||||
@@ -174,8 +174,6 @@ void wxPrintData::ConvertToNative(void)
|
|||||||
pd->hDevMode = NULL; // Will be created by PrintDlg
|
pd->hDevMode = NULL; // Will be created by PrintDlg
|
||||||
pd->hDevNames = NULL; // Ditto
|
pd->hDevNames = NULL; // Ditto
|
||||||
|
|
||||||
// Why had I put this #ifdef in?? Seems fine to me.
|
|
||||||
#if 1
|
|
||||||
pd->Flags = PD_RETURNDEFAULT;
|
pd->Flags = PD_RETURNDEFAULT;
|
||||||
pd->nCopies = 1;
|
pd->nCopies = 1;
|
||||||
|
|
||||||
@@ -196,7 +194,6 @@ void wxPrintData::ConvertToNative(void)
|
|||||||
GlobalFree(pd->hDevNames);
|
GlobalFree(pd->hDevNames);
|
||||||
pd->hDevNames = NULL;
|
pd->hDevNames = NULL;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( pd->hDevMode )
|
if ( pd->hDevMode )
|
||||||
@@ -245,7 +242,7 @@ void wxPrintData::ConvertToNative(void)
|
|||||||
pd->Flags |= PD_PRINTSETUP;
|
pd->Flags |= PD_PRINTSETUP;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxPrintData::ConvertFromNative(void)
|
void wxPrintData::ConvertFromNative()
|
||||||
{
|
{
|
||||||
PRINTDLG *pd = (PRINTDLG*) printData;
|
PRINTDLG *pd = (PRINTDLG*) printData;
|
||||||
if ( pd == NULL )
|
if ( pd == NULL )
|
||||||
@@ -308,7 +305,7 @@ void wxPrintData::operator=(const wxPrintData& data)
|
|||||||
* wxPageSetupData
|
* wxPageSetupData
|
||||||
*/
|
*/
|
||||||
|
|
||||||
wxPageSetupData::wxPageSetupData(void)
|
wxPageSetupData::wxPageSetupData()
|
||||||
{
|
{
|
||||||
#if defined(__WIN95__)
|
#if defined(__WIN95__)
|
||||||
m_pageSetupData = NULL;
|
m_pageSetupData = NULL;
|
||||||
@@ -330,7 +327,7 @@ wxPageSetupData::wxPageSetupData(void)
|
|||||||
m_getDefaultInfo = FALSE;
|
m_getDefaultInfo = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPageSetupData::~wxPageSetupData(void)
|
wxPageSetupData::~wxPageSetupData()
|
||||||
{
|
{
|
||||||
#if defined(__WIN95__) && defined(__WXMSW__)
|
#if defined(__WIN95__) && defined(__WXMSW__)
|
||||||
PAGESETUPDLG *pd = (PAGESETUPDLG *)m_pageSetupData;
|
PAGESETUPDLG *pd = (PAGESETUPDLG *)m_pageSetupData;
|
||||||
@@ -360,7 +357,7 @@ void wxPageSetupData::operator=(const wxPageSetupData& data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__WXMSW__) && defined(__WIN95__)
|
#if defined(__WXMSW__) && defined(__WIN95__)
|
||||||
void wxPageSetupData::ConvertToNative(void)
|
void wxPageSetupData::ConvertToNative()
|
||||||
{
|
{
|
||||||
PAGESETUPDLG *pd = (PAGESETUPDLG*) m_pageSetupData;
|
PAGESETUPDLG *pd = (PAGESETUPDLG*) m_pageSetupData;
|
||||||
if ( m_pageSetupData == NULL )
|
if ( m_pageSetupData == NULL )
|
||||||
@@ -422,7 +419,7 @@ void wxPageSetupData::ConvertToNative(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxPageSetupData::ConvertFromNative(void)
|
void wxPageSetupData::ConvertFromNative()
|
||||||
{
|
{
|
||||||
PAGESETUPDLG *pd = (PAGESETUPDLG *) m_pageSetupData ;
|
PAGESETUPDLG *pd = (PAGESETUPDLG *) m_pageSetupData ;
|
||||||
if ( !pd )
|
if ( !pd )
|
||||||
|
@@ -220,7 +220,6 @@ wxString wxConfigBase::ExpandEnvVars(const wxString& str) const
|
|||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxConfigPathChanger
|
// wxConfigPathChanger
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -410,5 +409,3 @@ void wxSplitPath(wxArrayString& aParts, const char *sz)
|
|||||||
pc++;
|
pc++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -393,8 +393,7 @@ void wxInitializeStockObjects ()
|
|||||||
wxCROSS_CURSOR = new wxCursor (wxCURSOR_CROSS);
|
wxCROSS_CURSOR = new wxCursor (wxCURSOR_CROSS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void wxDeleteStockObjects ()
|
||||||
wxDeleteStockObjects ()
|
|
||||||
{
|
{
|
||||||
wxDELETE(wxNORMAL_FONT);
|
wxDELETE(wxNORMAL_FONT);
|
||||||
wxDELETE(wxSMALL_FONT);
|
wxDELETE(wxSMALL_FONT);
|
||||||
@@ -609,9 +608,14 @@ wxFont *wxFontList::
|
|||||||
}
|
}
|
||||||
|
|
||||||
void wxBitmapList::AddBitmap(wxBitmap *bitmap)
|
void wxBitmapList::AddBitmap(wxBitmap *bitmap)
|
||||||
{ Append(bitmap); }
|
{
|
||||||
|
Append(bitmap);
|
||||||
|
}
|
||||||
|
|
||||||
void wxBitmapList::RemoveBitmap(wxBitmap *bitmap)
|
void wxBitmapList::RemoveBitmap(wxBitmap *bitmap)
|
||||||
{ DeleteObject(bitmap); }
|
{
|
||||||
|
DeleteObject(bitmap);
|
||||||
|
}
|
||||||
|
|
||||||
wxSize wxGetDisplaySize()
|
wxSize wxGetDisplaySize()
|
||||||
{
|
{
|
||||||
@@ -620,7 +624,8 @@ wxSize wxGetDisplaySize()
|
|||||||
return wxSize(x, y);
|
return wxSize(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxResourceCache::~wxResourceCache () {
|
wxResourceCache::~wxResourceCache ()
|
||||||
|
{
|
||||||
wxNode *node = First ();
|
wxNode *node = First ();
|
||||||
while (node) {
|
while (node) {
|
||||||
wxGDIObject *item = (wxGDIObject *)node->Data();
|
wxGDIObject *item = (wxGDIObject *)node->Data();
|
||||||
|
@@ -2102,7 +2102,7 @@ wxBitmap wxResourceCreateBitmap(const wxString& resource, wxResourceTable *table
|
|||||||
{
|
{
|
||||||
wxLogWarning(_("Failed to find XBM resource %s.\n"
|
wxLogWarning(_("Failed to find XBM resource %s.\n"
|
||||||
"Forgot to use wxResourceLoadBitmapData?"), (const char*) name);
|
"Forgot to use wxResourceLoadBitmapData?"), (const char*) name);
|
||||||
return (wxBitmap *) NULL;
|
return wxNullBitmap;
|
||||||
}
|
}
|
||||||
return wxBitmap(item->GetValue1(), (int)item->GetValue2(), (int)item->GetValue3()) ;
|
return wxBitmap(item->GetValue1(), (int)item->GetValue2(), (int)item->GetValue3()) ;
|
||||||
#else
|
#else
|
||||||
@@ -2118,7 +2118,7 @@ wxBitmap wxResourceCreateBitmap(const wxString& resource, wxResourceTable *table
|
|||||||
{
|
{
|
||||||
wxLogWarning(_("Failed to find XPM resource %s.\n"
|
wxLogWarning(_("Failed to find XPM resource %s.\n"
|
||||||
"Forgot to use wxResourceLoadBitmapData?"), (const char*) name);
|
"Forgot to use wxResourceLoadBitmapData?"), (const char*) name);
|
||||||
return (wxBitmap *) NULL;
|
return wxNullBitmap;
|
||||||
}
|
}
|
||||||
return wxBitmap(item->GetValue1());
|
return wxBitmap(item->GetValue1());
|
||||||
#else
|
#else
|
||||||
@@ -2257,7 +2257,7 @@ wxIcon wxResourceCreateIcon(const wxString& resource, wxResourceTable *table)
|
|||||||
{
|
{
|
||||||
wxLogWarning(_("Failed to find XBM resource %s.\n"
|
wxLogWarning(_("Failed to find XBM resource %s.\n"
|
||||||
"Forgot to use wxResourceLoadIconData?"), (const char*) name);
|
"Forgot to use wxResourceLoadIconData?"), (const char*) name);
|
||||||
return (wxIcon *) NULL;
|
return wxNullIcon;
|
||||||
}
|
}
|
||||||
return wxIcon((const char **)item->GetValue1(), (int)item->GetValue2(), (int)item->GetValue3());
|
return wxIcon((const char **)item->GetValue1(), (int)item->GetValue2(), (int)item->GetValue3());
|
||||||
#else
|
#else
|
||||||
|
@@ -232,7 +232,7 @@ bool wxApp::SendIdleEvents( wxWindow* win )
|
|||||||
if (event.MoreRequested())
|
if (event.MoreRequested())
|
||||||
needMore = TRUE;
|
needMore = TRUE;
|
||||||
|
|
||||||
wxNode* node = win->GetChildren()->First();
|
wxNode* node = win->GetChildren().First();
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
wxWindow* win = (wxWindow*) node->Data();
|
wxWindow* win = (wxWindow*) node->Data();
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxMask,wxObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxMask,wxObject)
|
||||||
|
|
||||||
wxMask::wxMask(void)
|
wxMask::wxMask()
|
||||||
{
|
{
|
||||||
m_bitmap = (GdkBitmap *) NULL;
|
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 );
|
if (m_bitmap) gdk_bitmap_unref( m_bitmap );
|
||||||
}
|
}
|
||||||
@@ -70,7 +70,7 @@ public:
|
|||||||
wxPalette *m_palette;
|
wxPalette *m_palette;
|
||||||
};
|
};
|
||||||
|
|
||||||
wxBitmapRefData::wxBitmapRefData(void)
|
wxBitmapRefData::wxBitmapRefData()
|
||||||
{
|
{
|
||||||
m_pixmap = (GdkPixmap *) NULL;
|
m_pixmap = (GdkPixmap *) NULL;
|
||||||
m_bitmap = (GdkBitmap *) NULL;
|
m_bitmap = (GdkBitmap *) NULL;
|
||||||
@@ -81,7 +81,7 @@ wxBitmapRefData::wxBitmapRefData(void)
|
|||||||
m_palette = (wxPalette *) NULL;
|
m_palette = (wxPalette *) NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxBitmapRefData::~wxBitmapRefData(void)
|
wxBitmapRefData::~wxBitmapRefData()
|
||||||
{
|
{
|
||||||
if (m_pixmap) gdk_pixmap_unref( m_pixmap );
|
if (m_pixmap) gdk_pixmap_unref( m_pixmap );
|
||||||
if (m_bitmap) gdk_bitmap_unref( m_bitmap );
|
if (m_bitmap) gdk_bitmap_unref( m_bitmap );
|
||||||
@@ -95,7 +95,7 @@ wxBitmapRefData::~wxBitmapRefData(void)
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxBitmap,wxGDIObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxBitmap,wxGDIObject)
|
||||||
|
|
||||||
wxBitmap::wxBitmap(void)
|
wxBitmap::wxBitmap()
|
||||||
{
|
{
|
||||||
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
||||||
}
|
}
|
||||||
@@ -173,13 +173,6 @@ wxBitmap::wxBitmap( const wxBitmap& bmp )
|
|||||||
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
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 )
|
wxBitmap::wxBitmap( const wxString &filename, int type )
|
||||||
{
|
{
|
||||||
LoadFile( filename, 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);
|
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxBitmap::~wxBitmap(void)
|
wxBitmap::~wxBitmap()
|
||||||
{
|
{
|
||||||
if (wxTheBitmapList) wxTheBitmapList->DeleteObject(this);
|
if (wxTheBitmapList) wxTheBitmapList->DeleteObject(this);
|
||||||
}
|
}
|
||||||
|
@@ -21,7 +21,7 @@ class wxBrushRefData: public wxObjectRefData
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxBrushRefData(void);
|
wxBrushRefData();
|
||||||
wxBrushRefData( const wxBrushRefData& data );
|
wxBrushRefData( const wxBrushRefData& data );
|
||||||
|
|
||||||
int m_style;
|
int m_style;
|
||||||
@@ -29,7 +29,7 @@ class wxBrushRefData: public wxObjectRefData
|
|||||||
wxColour m_colour;
|
wxColour m_colour;
|
||||||
};
|
};
|
||||||
|
|
||||||
wxBrushRefData::wxBrushRefData(void)
|
wxBrushRefData::wxBrushRefData()
|
||||||
{
|
{
|
||||||
m_style = 0;
|
m_style = 0;
|
||||||
}
|
}
|
||||||
@@ -47,7 +47,7 @@ wxBrushRefData::wxBrushRefData( const wxBrushRefData& data )
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxBrush,wxGDIObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxBrush,wxGDIObject)
|
||||||
|
|
||||||
wxBrush::wxBrush(void)
|
wxBrush::wxBrush()
|
||||||
{
|
{
|
||||||
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
|
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
|
||||||
}
|
}
|
||||||
@@ -78,14 +78,7 @@ wxBrush::wxBrush( const wxBrush &brush )
|
|||||||
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
|
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxBrush::wxBrush( const wxBrush *brush )
|
wxBrush::~wxBrush()
|
||||||
{
|
|
||||||
if (brush) Ref( *brush );
|
|
||||||
|
|
||||||
if (wxTheBrushList) wxTheBrushList->Append( this );
|
|
||||||
}
|
|
||||||
|
|
||||||
wxBrush::~wxBrush(void)
|
|
||||||
{
|
{
|
||||||
if (wxTheBrushList) wxTheBrushList->RemoveBrush( this );
|
if (wxTheBrushList) wxTheBrushList->RemoveBrush( this );
|
||||||
}
|
}
|
||||||
@@ -107,12 +100,12 @@ bool wxBrush::operator != ( const wxBrush& brush )
|
|||||||
return m_refData != brush.m_refData;
|
return m_refData != brush.m_refData;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxBrush::Ok(void) const
|
bool wxBrush::Ok() const
|
||||||
{
|
{
|
||||||
return ((m_refData) && M_BRUSHDATA->m_colour.Ok());
|
return ((m_refData) && M_BRUSHDATA->m_colour.Ok());
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxBrush::GetStyle(void) const
|
int wxBrush::GetStyle() const
|
||||||
{
|
{
|
||||||
if (m_refData == NULL)
|
if (m_refData == NULL)
|
||||||
{
|
{
|
||||||
@@ -123,7 +116,7 @@ int wxBrush::GetStyle(void) const
|
|||||||
return M_BRUSHDATA->m_style;
|
return M_BRUSHDATA->m_style;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxColour &wxBrush::GetColour(void) const
|
wxColour &wxBrush::GetColour() const
|
||||||
{
|
{
|
||||||
if (m_refData == NULL)
|
if (m_refData == NULL)
|
||||||
{
|
{
|
||||||
@@ -134,7 +127,7 @@ wxColour &wxBrush::GetColour(void) const
|
|||||||
return M_BRUSHDATA->m_colour;
|
return M_BRUSHDATA->m_colour;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxBitmap *wxBrush::GetStipple(void) const
|
wxBitmap *wxBrush::GetStipple() const
|
||||||
{
|
{
|
||||||
if (m_refData == NULL)
|
if (m_refData == NULL)
|
||||||
{
|
{
|
||||||
@@ -169,7 +162,7 @@ void wxBrush::SetStipple( const wxBitmap& stipple )
|
|||||||
M_BRUSHDATA->m_stipple = stipple;
|
M_BRUSHDATA->m_stipple = stipple;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxBrush::Unshare(void)
|
void wxBrush::Unshare()
|
||||||
{
|
{
|
||||||
if (!m_refData)
|
if (!m_refData)
|
||||||
{
|
{
|
||||||
|
@@ -102,11 +102,6 @@ wxColour::wxColour( const wxColour& col )
|
|||||||
Ref( col );
|
Ref( col );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxColour::wxColour( const wxColour* col )
|
|
||||||
{
|
|
||||||
if (col) Ref( *col );
|
|
||||||
}
|
|
||||||
|
|
||||||
wxColour::~wxColour()
|
wxColour::~wxColour()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@@ -22,18 +22,18 @@ class wxCursorRefData: public wxObjectRefData
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxCursorRefData(void);
|
wxCursorRefData();
|
||||||
~wxCursorRefData(void);
|
~wxCursorRefData();
|
||||||
|
|
||||||
GdkCursor *m_cursor;
|
GdkCursor *m_cursor;
|
||||||
};
|
};
|
||||||
|
|
||||||
wxCursorRefData::wxCursorRefData(void)
|
wxCursorRefData::wxCursorRefData()
|
||||||
{
|
{
|
||||||
m_cursor = (GdkCursor *) NULL;
|
m_cursor = (GdkCursor *) NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxCursorRefData::~wxCursorRefData(void)
|
wxCursorRefData::~wxCursorRefData()
|
||||||
{
|
{
|
||||||
if (m_cursor) gdk_cursor_destroy( m_cursor );
|
if (m_cursor) gdk_cursor_destroy( m_cursor );
|
||||||
}
|
}
|
||||||
@@ -44,7 +44,7 @@ wxCursorRefData::~wxCursorRefData(void)
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxCursor,wxObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxCursor,wxObject)
|
||||||
|
|
||||||
wxCursor::wxCursor(void)
|
wxCursor::wxCursor()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,13 +103,7 @@ wxCursor::wxCursor( const wxCursor &cursor )
|
|||||||
Ref( cursor );
|
Ref( cursor );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxCursor::wxCursor( const wxCursor *cursor )
|
wxCursor::~wxCursor()
|
||||||
{
|
|
||||||
UnRef();
|
|
||||||
if (cursor) Ref( *cursor );
|
|
||||||
}
|
|
||||||
|
|
||||||
wxCursor::~wxCursor(void)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,22 +114,22 @@ wxCursor& wxCursor::operator = ( const wxCursor& cursor )
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxCursor::operator == ( const wxCursor& cursor )
|
bool wxCursor::operator == ( const wxCursor& cursor ) const
|
||||||
{
|
{
|
||||||
return m_refData == cursor.m_refData;
|
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;
|
return m_refData != cursor.m_refData;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxCursor::Ok(void) const
|
bool wxCursor::Ok() const
|
||||||
{
|
{
|
||||||
return (m_refData != NULL);
|
return (m_refData != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
GdkCursor *wxCursor::GetCursor(void) const
|
GdkCursor *wxCursor::GetCursor() const
|
||||||
{
|
{
|
||||||
return M_CURSORDATA->m_cursor;
|
return M_CURSORDATA->m_cursor;
|
||||||
}
|
}
|
||||||
@@ -146,7 +140,7 @@ GdkCursor *wxCursor::GetCursor(void) const
|
|||||||
|
|
||||||
bool g_isBusy = FALSE;
|
bool g_isBusy = FALSE;
|
||||||
|
|
||||||
void wxEndBusyCursor(void)
|
void wxEndBusyCursor()
|
||||||
{
|
{
|
||||||
g_isBusy = FALSE;
|
g_isBusy = FALSE;
|
||||||
}
|
}
|
||||||
@@ -156,7 +150,7 @@ void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) )
|
|||||||
g_isBusy = TRUE;
|
g_isBusy = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxIsBusy(void)
|
bool wxIsBusy()
|
||||||
{
|
{
|
||||||
return g_isBusy;
|
return g_isBusy;
|
||||||
}
|
}
|
||||||
|
@@ -29,8 +29,8 @@ class wxFontRefData: public wxObjectRefData
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxFontRefData(void);
|
wxFontRefData();
|
||||||
~wxFontRefData(void);
|
~wxFontRefData();
|
||||||
|
|
||||||
wxList m_scaled_xfonts;
|
wxList m_scaled_xfonts;
|
||||||
int m_pointSize;
|
int m_pointSize;
|
||||||
@@ -45,7 +45,7 @@ class wxFontRefData: public wxObjectRefData
|
|||||||
friend wxFont;
|
friend wxFont;
|
||||||
};
|
};
|
||||||
|
|
||||||
wxFontRefData::wxFontRefData(void) : m_scaled_xfonts(wxKEY_INTEGER)
|
wxFontRefData::wxFontRefData() : m_scaled_xfonts(wxKEY_INTEGER)
|
||||||
{
|
{
|
||||||
m_byXFontName = FALSE;
|
m_byXFontName = FALSE;
|
||||||
m_pointSize = 12;
|
m_pointSize = 12;
|
||||||
@@ -58,7 +58,7 @@ wxFontRefData::wxFontRefData(void) : m_scaled_xfonts(wxKEY_INTEGER)
|
|||||||
m_font = (GdkFont *) NULL;
|
m_font = (GdkFont *) NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFontRefData::~wxFontRefData(void)
|
wxFontRefData::~wxFontRefData()
|
||||||
{
|
{
|
||||||
wxNode *node = m_scaled_xfonts.First();
|
wxNode *node = m_scaled_xfonts.First();
|
||||||
while (node)
|
while (node)
|
||||||
@@ -82,7 +82,7 @@ wxFontRefData::~wxFontRefData(void)
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
|
||||||
|
|
||||||
wxFont::wxFont(void)
|
wxFont::wxFont()
|
||||||
{
|
{
|
||||||
if (wxTheFontList) wxTheFontList->Append( this );
|
if (wxTheFontList) wxTheFontList->Append( this );
|
||||||
}
|
}
|
||||||
@@ -150,15 +150,7 @@ wxFont::wxFont( const wxFont& font )
|
|||||||
if (wxTheFontList) wxTheFontList->Append( this );
|
if (wxTheFontList) wxTheFontList->Append( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFont::wxFont( const wxFont* font )
|
wxFont::~wxFont()
|
||||||
{
|
|
||||||
UnRef();
|
|
||||||
if (font) Ref( *font );
|
|
||||||
|
|
||||||
if (wxTheFontList) wxTheFontList->Append( this );
|
|
||||||
}
|
|
||||||
|
|
||||||
wxFont::~wxFont(void)
|
|
||||||
{
|
{
|
||||||
if (wxTheFontList) wxTheFontList->DeleteObject( this );
|
if (wxTheFontList) wxTheFontList->DeleteObject( this );
|
||||||
}
|
}
|
||||||
@@ -185,7 +177,7 @@ bool wxFont::Ok() const
|
|||||||
return (m_refData != NULL);
|
return (m_refData != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxFont::GetPointSize(void) const
|
int wxFont::GetPointSize() const
|
||||||
{
|
{
|
||||||
if (!Ok())
|
if (!Ok())
|
||||||
{
|
{
|
||||||
@@ -196,7 +188,7 @@ int wxFont::GetPointSize(void) const
|
|||||||
return M_FONTDATA->m_pointSize;
|
return M_FONTDATA->m_pointSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxFont::GetFaceString(void) const
|
wxString wxFont::GetFaceString() const
|
||||||
{
|
{
|
||||||
if (!Ok())
|
if (!Ok())
|
||||||
{
|
{
|
||||||
@@ -208,7 +200,7 @@ wxString wxFont::GetFaceString(void) const
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxFont::GetFaceName(void) const
|
wxString wxFont::GetFaceName() const
|
||||||
{
|
{
|
||||||
if (!Ok())
|
if (!Ok())
|
||||||
{
|
{
|
||||||
@@ -220,7 +212,7 @@ wxString wxFont::GetFaceName(void) const
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxFont::GetFamily(void) const
|
int wxFont::GetFamily() const
|
||||||
{
|
{
|
||||||
if (!Ok())
|
if (!Ok())
|
||||||
{
|
{
|
||||||
@@ -231,7 +223,7 @@ int wxFont::GetFamily(void) const
|
|||||||
return M_FONTDATA->m_family;
|
return M_FONTDATA->m_family;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxFont::GetFamilyString(void) const
|
wxString wxFont::GetFamilyString() const
|
||||||
{
|
{
|
||||||
if (!Ok())
|
if (!Ok())
|
||||||
{
|
{
|
||||||
@@ -253,7 +245,7 @@ wxString wxFont::GetFamilyString(void) const
|
|||||||
return "wxDEFAULT";
|
return "wxDEFAULT";
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxFont::GetFontId(void) const
|
int wxFont::GetFontId() const
|
||||||
{
|
{
|
||||||
if (!Ok())
|
if (!Ok())
|
||||||
{
|
{
|
||||||
@@ -264,7 +256,7 @@ int wxFont::GetFontId(void) const
|
|||||||
return M_FONTDATA->m_fontId; // stub
|
return M_FONTDATA->m_fontId; // stub
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxFont::GetStyle(void) const
|
int wxFont::GetStyle() const
|
||||||
{
|
{
|
||||||
if (!Ok())
|
if (!Ok())
|
||||||
{
|
{
|
||||||
@@ -275,7 +267,7 @@ int wxFont::GetStyle(void) const
|
|||||||
return M_FONTDATA->m_style;
|
return M_FONTDATA->m_style;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxFont::GetStyleString(void) const
|
wxString wxFont::GetStyleString() const
|
||||||
{
|
{
|
||||||
if (!Ok())
|
if (!Ok())
|
||||||
{
|
{
|
||||||
@@ -294,7 +286,7 @@ wxString wxFont::GetStyleString(void) const
|
|||||||
return wxString("wxDEFAULT");
|
return wxString("wxDEFAULT");
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxFont::GetWeight(void) const
|
int wxFont::GetWeight() const
|
||||||
{
|
{
|
||||||
if (!Ok())
|
if (!Ok())
|
||||||
{
|
{
|
||||||
@@ -305,7 +297,7 @@ int wxFont::GetWeight(void) const
|
|||||||
return M_FONTDATA->m_weight;
|
return M_FONTDATA->m_weight;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxFont::GetWeightString(void) const
|
wxString wxFont::GetWeightString() const
|
||||||
{
|
{
|
||||||
if (!Ok())
|
if (!Ok())
|
||||||
{
|
{
|
||||||
@@ -324,7 +316,7 @@ wxString wxFont::GetWeightString(void) const
|
|||||||
return wxString("wxDEFAULT");
|
return wxString("wxDEFAULT");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFont::GetUnderlined(void) const
|
bool wxFont::GetUnderlined() const
|
||||||
{
|
{
|
||||||
if (!Ok())
|
if (!Ok())
|
||||||
{
|
{
|
||||||
@@ -580,7 +572,7 @@ static int SCoordinate(int s)
|
|||||||
|
|
||||||
class wxSuffixMap {
|
class wxSuffixMap {
|
||||||
public:
|
public:
|
||||||
~wxSuffixMap(void);
|
~wxSuffixMap();
|
||||||
|
|
||||||
inline char *GetName(int weight, int style)
|
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);
|
*v = copystring(internal);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxSuffixMap::~wxSuffixMap(void)
|
wxSuffixMap::~wxSuffixMap()
|
||||||
{
|
{
|
||||||
int k, j;
|
int k, j;
|
||||||
|
|
||||||
@@ -760,10 +752,10 @@ public:
|
|||||||
inline char* GetScreenName(int w, int s) {return screen.GetName(w, s);}
|
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* GetPostScriptName(int w, int s) {return printing.GetName(w, s);}
|
||||||
inline char* GetAFMName(int w, int s) {return afm.GetName(w, s);}
|
inline char* GetAFMName(int w, int s) {return afm.GetName(w, s);}
|
||||||
inline char* GetName(void) {return name;}
|
inline char* GetName() {return name;}
|
||||||
inline int GetFamily(void) {return family;}
|
inline int GetFamily() {return family;}
|
||||||
inline int GetId(void) {return id;}
|
inline int GetId() {return id;}
|
||||||
inline bool IsRoman(void) {return isroman;}
|
inline bool IsRoman() {return isroman;}
|
||||||
#if defined(__WXDEBUG__)
|
#if defined(__WXDEBUG__)
|
||||||
void Dump(ostream& str);
|
void Dump(ostream& str);
|
||||||
#endif
|
#endif
|
||||||
@@ -788,7 +780,7 @@ wxFontNameItem::wxFontNameItem(const char *Name, int Id, int Family)
|
|||||||
afm. Initialize(name, "Afm");
|
afm. Initialize(name, "Afm");
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFontNameItem::~wxFontNameItem(void)
|
wxFontNameItem::~wxFontNameItem()
|
||||||
{
|
{
|
||||||
if (name)
|
if (name)
|
||||||
delete[] name;
|
delete[] name;
|
||||||
@@ -808,7 +800,7 @@ void wxFontNameItem::Dump(ostream& str)
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxFontNameDirectory, wxObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxFontNameDirectory, wxObject)
|
||||||
|
|
||||||
wxFontNameDirectory::wxFontNameDirectory(void)
|
wxFontNameDirectory::wxFontNameDirectory()
|
||||||
{
|
{
|
||||||
table = new wxHashTable(wxKEY_INTEGER, 20);
|
table = new wxHashTable(wxKEY_INTEGER, 20);
|
||||||
nextFontId = -1;
|
nextFontId = -1;
|
||||||
@@ -827,7 +819,7 @@ wxFontNameDirectory::~wxFontNameDirectory()
|
|||||||
delete table;
|
delete table;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxFontNameDirectory::GetNewFontId(void)
|
int wxFontNameDirectory::GetNewFontId()
|
||||||
{
|
{
|
||||||
return (nextFontId--);
|
return (nextFontId--);
|
||||||
}
|
}
|
||||||
|
@@ -524,7 +524,7 @@ void wxFrame::SetMenuBar( wxMenuBar *menuBar )
|
|||||||
if (m_sizeSet) GtkOnSize( m_x, m_y, m_width, m_height );
|
if (m_sizeSet) GtkOnSize( m_x, m_y, m_width, m_height );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxMenuBar *wxFrame::GetMenuBar(void) const
|
wxMenuBar *wxFrame::GetMenuBar() const
|
||||||
{
|
{
|
||||||
return m_frameMenuBar;
|
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 );
|
return new wxToolBar( this, id, wxDefaultPosition, wxDefaultSize, style, name );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxToolBar *wxFrame::GetToolBar(void) const
|
wxToolBar *wxFrame::GetToolBar() const
|
||||||
{
|
{
|
||||||
return m_frameToolBar;
|
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
|
// Set the height according to the font and the border size
|
||||||
wxClientDC dc(statusBar);
|
wxClientDC dc(statusBar);
|
||||||
dc.SetFont( *statusBar->GetFont() );
|
dc.SetFont( statusBar->GetFont() );
|
||||||
|
|
||||||
long x, y;
|
long x, y;
|
||||||
dc.GetTextExtent( "X", &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);
|
m_frameStatusBar->SetStatusWidths(n, widths_field);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxStatusBar *wxFrame::GetStatusBar(void) const
|
wxStatusBar *wxFrame::GetStatusBar() const
|
||||||
{
|
{
|
||||||
return m_frameStatusBar;
|
return m_frameStatusBar;
|
||||||
}
|
}
|
||||||
|
@@ -38,11 +38,6 @@ wxIcon::wxIcon( const wxIcon& icon ) : wxBitmap()
|
|||||||
Ref(icon);
|
Ref(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxIcon::wxIcon( const wxIcon* icon ) : wxBitmap()
|
|
||||||
{
|
|
||||||
if (icon) Ref(*icon);
|
|
||||||
}
|
|
||||||
|
|
||||||
wxIcon& wxIcon::operator = ( const wxIcon& icon )
|
wxIcon& wxIcon::operator = ( const wxIcon& icon )
|
||||||
{
|
{
|
||||||
if (*this == icon) return (*this);
|
if (*this == icon) return (*this);
|
||||||
|
@@ -218,10 +218,9 @@ wxMenuItem::wxMenuItem()
|
|||||||
m_menuItem = (GtkWidget *) NULL;
|
m_menuItem = (GtkWidget *) NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// it's valid for this function to be called even if m_menuItem == NULL
|
||||||
void wxMenuItem::SetName(const wxString& str)
|
void wxMenuItem::SetName(const wxString& str)
|
||||||
{
|
{
|
||||||
wxCHECK_RET( m_menuItem, "invalid menu item" );
|
|
||||||
|
|
||||||
m_text = "";
|
m_text = "";
|
||||||
for ( const char *pc = str; *pc != '\0'; pc++ )
|
for ( const char *pc = str; *pc != '\0'; pc++ )
|
||||||
{
|
{
|
||||||
@@ -231,10 +230,13 @@ void wxMenuItem::SetName(const wxString& str)
|
|||||||
m_text << *pc;
|
m_text << *pc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( m_menuItem )
|
||||||
|
{
|
||||||
GtkLabel *label = GTK_LABEL( GTK_BIN(m_menuItem)->child );
|
GtkLabel *label = GTK_LABEL( GTK_BIN(m_menuItem)->child );
|
||||||
|
|
||||||
gtk_label_set( label, m_text.c_str());
|
gtk_label_set( label, m_text.c_str());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void wxMenuItem::Check( bool check )
|
void wxMenuItem::Check( bool check )
|
||||||
{
|
{
|
||||||
|
@@ -29,12 +29,12 @@ class wxPaletteRefData: public wxObjectRefData
|
|||||||
GdkColormap *m_colormap;
|
GdkColormap *m_colormap;
|
||||||
};
|
};
|
||||||
|
|
||||||
wxPaletteRefData::wxPaletteRefData(void)
|
wxPaletteRefData::wxPaletteRefData()
|
||||||
{
|
{
|
||||||
m_colormap = (GdkColormap *) NULL;
|
m_colormap = (GdkColormap *) NULL;
|
||||||
};
|
};
|
||||||
|
|
||||||
wxPaletteRefData::~wxPaletteRefData(void)
|
wxPaletteRefData::~wxPaletteRefData()
|
||||||
{
|
{
|
||||||
if (m_colormap) gdk_colormap_unref( m_colormap );
|
if (m_colormap) gdk_colormap_unref( m_colormap );
|
||||||
};
|
};
|
||||||
@@ -45,7 +45,7 @@ wxPaletteRefData::~wxPaletteRefData(void)
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxPalette,wxGDIObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxPalette,wxGDIObject)
|
||||||
|
|
||||||
wxPalette::wxPalette(void)
|
wxPalette::wxPalette()
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -60,13 +60,7 @@ wxPalette::wxPalette( const wxPalette& palette )
|
|||||||
Ref( palette );
|
Ref( palette );
|
||||||
};
|
};
|
||||||
|
|
||||||
wxPalette::wxPalette( const wxPalette* palette )
|
wxPalette::~wxPalette()
|
||||||
{
|
|
||||||
UnRef();
|
|
||||||
if (palette) Ref( *palette );
|
|
||||||
};
|
|
||||||
|
|
||||||
wxPalette::~wxPalette(void)
|
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -55,7 +55,7 @@ wxPenRefData::wxPenRefData( const wxPenRefData& data )
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxPen,wxGDIObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxPen,wxGDIObject)
|
||||||
|
|
||||||
wxPen::wxPen(void)
|
wxPen::wxPen()
|
||||||
{
|
{
|
||||||
if (wxThePenList) wxThePenList->AddPen( this );
|
if (wxThePenList) wxThePenList->AddPen( this );
|
||||||
}
|
}
|
||||||
@@ -76,14 +76,6 @@ wxPen::wxPen( const wxPen& pen )
|
|||||||
if (wxThePenList) wxThePenList->AddPen( this );
|
if (wxThePenList) wxThePenList->AddPen( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPen::wxPen( const wxPen* pen )
|
|
||||||
{
|
|
||||||
UnRef();
|
|
||||||
if (pen) Ref( *pen );
|
|
||||||
|
|
||||||
if (wxThePenList) wxThePenList->AddPen( this );
|
|
||||||
}
|
|
||||||
|
|
||||||
wxPen::~wxPen()
|
wxPen::~wxPen()
|
||||||
{
|
{
|
||||||
if (wxThePenList) wxThePenList->RemovePen( this );
|
if (wxThePenList) wxThePenList->RemovePen( this );
|
||||||
|
@@ -109,7 +109,7 @@ static char *GetIniFile(char *dest, const char *filename)
|
|||||||
return dest;
|
return dest;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void wxXMergeDatabases(void)
|
static void wxXMergeDatabases()
|
||||||
{
|
{
|
||||||
XrmDatabase homeDB, serverDB, applicationDB;
|
XrmDatabase homeDB, serverDB, applicationDB;
|
||||||
char filenamebuf[1024];
|
char filenamebuf[1024];
|
||||||
@@ -159,7 +159,7 @@ static void wxXMergeDatabases(void)
|
|||||||
// called on application exit
|
// called on application exit
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
void wxFlushResources(void)
|
void wxFlushResources()
|
||||||
{
|
{
|
||||||
char nameBuffer[512];
|
char nameBuffer[512];
|
||||||
|
|
||||||
|
@@ -1655,7 +1655,7 @@ void wxWindow::Fit()
|
|||||||
|
|
||||||
int maxX = 0;
|
int maxX = 0;
|
||||||
int maxY = 0;
|
int maxY = 0;
|
||||||
wxNode *node = m_childrenFirst();
|
wxNode *node = m_children.First();
|
||||||
while ( node )
|
while ( node )
|
||||||
{
|
{
|
||||||
wxWindow *win = (wxWindow *)node->Data();
|
wxWindow *win = (wxWindow *)node->Data();
|
||||||
@@ -1803,11 +1803,6 @@ void wxWindow::AddChild( wxWindow *child )
|
|||||||
m_children.Append( child );
|
m_children.Append( child );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxList& wxWindow::GetChildren() const
|
|
||||||
{
|
|
||||||
return m_children;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxWindow *wxWindow::ReParent( wxWindow *newParent )
|
wxWindow *wxWindow::ReParent( wxWindow *newParent )
|
||||||
{
|
{
|
||||||
wxWindow *oldParent = GetParent();
|
wxWindow *oldParent = GetParent();
|
||||||
@@ -1855,7 +1850,7 @@ void wxWindow::Lower()
|
|||||||
if (m_widget) gdk_window_lower( m_widget->window );
|
if (m_widget) gdk_window_lower( m_widget->window );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxEvtHandler *wxWindow::GetEventHandler()
|
wxEvtHandler *wxWindow::GetEventHandler() const
|
||||||
{
|
{
|
||||||
return m_eventHandler;
|
return m_eventHandler;
|
||||||
}
|
}
|
||||||
@@ -1934,7 +1929,7 @@ void wxWindow::SetId( wxWindowID id )
|
|||||||
m_windowId = id;
|
m_windowId = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxWindowID wxWindow::GetId()
|
wxWindowID wxWindow::GetId() const
|
||||||
{
|
{
|
||||||
return m_windowId;
|
return m_windowId;
|
||||||
}
|
}
|
||||||
@@ -1951,7 +1946,8 @@ void wxWindow::SetCursor( const wxCursor &cursor )
|
|||||||
|
|
||||||
if (cursor.Ok())
|
if (cursor.Ok())
|
||||||
{
|
{
|
||||||
if (*((wxCursor*)&cursor) == m_cursor) return;
|
if ( cursor == *m_cursor )
|
||||||
|
return;
|
||||||
*m_cursor = cursor;
|
*m_cursor = cursor;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -2278,11 +2274,6 @@ void wxWindow::SetFont( const wxFont &font )
|
|||||||
ApplyWidgetStyle();
|
ApplyWidgetStyle();
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFont *wxWindow::GetFont()
|
|
||||||
{
|
|
||||||
return &m_font;
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindow::SetWindowStyleFlag( long flag )
|
void wxWindow::SetWindowStyleFlag( long flag )
|
||||||
{
|
{
|
||||||
m_windowStyle = flag;
|
m_windowStyle = flag;
|
||||||
@@ -2795,7 +2786,7 @@ bool wxWindow::DoPhase(int phase)
|
|||||||
{
|
{
|
||||||
noChanges = 0;
|
noChanges = 0;
|
||||||
noFailures = 0;
|
noFailures = 0;
|
||||||
wxNode *node = m_children.first();
|
wxNode *node = m_children.First();
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
wxWindow *child = (wxWindow *)node->Data();
|
wxWindow *child = (wxWindow *)node->Data();
|
||||||
|
@@ -232,7 +232,7 @@ bool wxApp::SendIdleEvents( wxWindow* win )
|
|||||||
if (event.MoreRequested())
|
if (event.MoreRequested())
|
||||||
needMore = TRUE;
|
needMore = TRUE;
|
||||||
|
|
||||||
wxNode* node = win->GetChildren()->First();
|
wxNode* node = win->GetChildren().First();
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
wxWindow* win = (wxWindow*) node->Data();
|
wxWindow* win = (wxWindow*) node->Data();
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxMask,wxObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxMask,wxObject)
|
||||||
|
|
||||||
wxMask::wxMask(void)
|
wxMask::wxMask()
|
||||||
{
|
{
|
||||||
m_bitmap = (GdkBitmap *) NULL;
|
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 );
|
if (m_bitmap) gdk_bitmap_unref( m_bitmap );
|
||||||
}
|
}
|
||||||
@@ -70,7 +70,7 @@ public:
|
|||||||
wxPalette *m_palette;
|
wxPalette *m_palette;
|
||||||
};
|
};
|
||||||
|
|
||||||
wxBitmapRefData::wxBitmapRefData(void)
|
wxBitmapRefData::wxBitmapRefData()
|
||||||
{
|
{
|
||||||
m_pixmap = (GdkPixmap *) NULL;
|
m_pixmap = (GdkPixmap *) NULL;
|
||||||
m_bitmap = (GdkBitmap *) NULL;
|
m_bitmap = (GdkBitmap *) NULL;
|
||||||
@@ -81,7 +81,7 @@ wxBitmapRefData::wxBitmapRefData(void)
|
|||||||
m_palette = (wxPalette *) NULL;
|
m_palette = (wxPalette *) NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxBitmapRefData::~wxBitmapRefData(void)
|
wxBitmapRefData::~wxBitmapRefData()
|
||||||
{
|
{
|
||||||
if (m_pixmap) gdk_pixmap_unref( m_pixmap );
|
if (m_pixmap) gdk_pixmap_unref( m_pixmap );
|
||||||
if (m_bitmap) gdk_bitmap_unref( m_bitmap );
|
if (m_bitmap) gdk_bitmap_unref( m_bitmap );
|
||||||
@@ -95,7 +95,7 @@ wxBitmapRefData::~wxBitmapRefData(void)
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxBitmap,wxGDIObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxBitmap,wxGDIObject)
|
||||||
|
|
||||||
wxBitmap::wxBitmap(void)
|
wxBitmap::wxBitmap()
|
||||||
{
|
{
|
||||||
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
||||||
}
|
}
|
||||||
@@ -173,13 +173,6 @@ wxBitmap::wxBitmap( const wxBitmap& bmp )
|
|||||||
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
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 )
|
wxBitmap::wxBitmap( const wxString &filename, int type )
|
||||||
{
|
{
|
||||||
LoadFile( filename, 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);
|
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxBitmap::~wxBitmap(void)
|
wxBitmap::~wxBitmap()
|
||||||
{
|
{
|
||||||
if (wxTheBitmapList) wxTheBitmapList->DeleteObject(this);
|
if (wxTheBitmapList) wxTheBitmapList->DeleteObject(this);
|
||||||
}
|
}
|
||||||
|
@@ -21,7 +21,7 @@ class wxBrushRefData: public wxObjectRefData
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxBrushRefData(void);
|
wxBrushRefData();
|
||||||
wxBrushRefData( const wxBrushRefData& data );
|
wxBrushRefData( const wxBrushRefData& data );
|
||||||
|
|
||||||
int m_style;
|
int m_style;
|
||||||
@@ -29,7 +29,7 @@ class wxBrushRefData: public wxObjectRefData
|
|||||||
wxColour m_colour;
|
wxColour m_colour;
|
||||||
};
|
};
|
||||||
|
|
||||||
wxBrushRefData::wxBrushRefData(void)
|
wxBrushRefData::wxBrushRefData()
|
||||||
{
|
{
|
||||||
m_style = 0;
|
m_style = 0;
|
||||||
}
|
}
|
||||||
@@ -47,7 +47,7 @@ wxBrushRefData::wxBrushRefData( const wxBrushRefData& data )
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxBrush,wxGDIObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxBrush,wxGDIObject)
|
||||||
|
|
||||||
wxBrush::wxBrush(void)
|
wxBrush::wxBrush()
|
||||||
{
|
{
|
||||||
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
|
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
|
||||||
}
|
}
|
||||||
@@ -78,14 +78,7 @@ wxBrush::wxBrush( const wxBrush &brush )
|
|||||||
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
|
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxBrush::wxBrush( const wxBrush *brush )
|
wxBrush::~wxBrush()
|
||||||
{
|
|
||||||
if (brush) Ref( *brush );
|
|
||||||
|
|
||||||
if (wxTheBrushList) wxTheBrushList->Append( this );
|
|
||||||
}
|
|
||||||
|
|
||||||
wxBrush::~wxBrush(void)
|
|
||||||
{
|
{
|
||||||
if (wxTheBrushList) wxTheBrushList->RemoveBrush( this );
|
if (wxTheBrushList) wxTheBrushList->RemoveBrush( this );
|
||||||
}
|
}
|
||||||
@@ -107,12 +100,12 @@ bool wxBrush::operator != ( const wxBrush& brush )
|
|||||||
return m_refData != brush.m_refData;
|
return m_refData != brush.m_refData;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxBrush::Ok(void) const
|
bool wxBrush::Ok() const
|
||||||
{
|
{
|
||||||
return ((m_refData) && M_BRUSHDATA->m_colour.Ok());
|
return ((m_refData) && M_BRUSHDATA->m_colour.Ok());
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxBrush::GetStyle(void) const
|
int wxBrush::GetStyle() const
|
||||||
{
|
{
|
||||||
if (m_refData == NULL)
|
if (m_refData == NULL)
|
||||||
{
|
{
|
||||||
@@ -123,7 +116,7 @@ int wxBrush::GetStyle(void) const
|
|||||||
return M_BRUSHDATA->m_style;
|
return M_BRUSHDATA->m_style;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxColour &wxBrush::GetColour(void) const
|
wxColour &wxBrush::GetColour() const
|
||||||
{
|
{
|
||||||
if (m_refData == NULL)
|
if (m_refData == NULL)
|
||||||
{
|
{
|
||||||
@@ -134,7 +127,7 @@ wxColour &wxBrush::GetColour(void) const
|
|||||||
return M_BRUSHDATA->m_colour;
|
return M_BRUSHDATA->m_colour;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxBitmap *wxBrush::GetStipple(void) const
|
wxBitmap *wxBrush::GetStipple() const
|
||||||
{
|
{
|
||||||
if (m_refData == NULL)
|
if (m_refData == NULL)
|
||||||
{
|
{
|
||||||
@@ -169,7 +162,7 @@ void wxBrush::SetStipple( const wxBitmap& stipple )
|
|||||||
M_BRUSHDATA->m_stipple = stipple;
|
M_BRUSHDATA->m_stipple = stipple;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxBrush::Unshare(void)
|
void wxBrush::Unshare()
|
||||||
{
|
{
|
||||||
if (!m_refData)
|
if (!m_refData)
|
||||||
{
|
{
|
||||||
|
@@ -102,11 +102,6 @@ wxColour::wxColour( const wxColour& col )
|
|||||||
Ref( col );
|
Ref( col );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxColour::wxColour( const wxColour* col )
|
|
||||||
{
|
|
||||||
if (col) Ref( *col );
|
|
||||||
}
|
|
||||||
|
|
||||||
wxColour::~wxColour()
|
wxColour::~wxColour()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@@ -22,18 +22,18 @@ class wxCursorRefData: public wxObjectRefData
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxCursorRefData(void);
|
wxCursorRefData();
|
||||||
~wxCursorRefData(void);
|
~wxCursorRefData();
|
||||||
|
|
||||||
GdkCursor *m_cursor;
|
GdkCursor *m_cursor;
|
||||||
};
|
};
|
||||||
|
|
||||||
wxCursorRefData::wxCursorRefData(void)
|
wxCursorRefData::wxCursorRefData()
|
||||||
{
|
{
|
||||||
m_cursor = (GdkCursor *) NULL;
|
m_cursor = (GdkCursor *) NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxCursorRefData::~wxCursorRefData(void)
|
wxCursorRefData::~wxCursorRefData()
|
||||||
{
|
{
|
||||||
if (m_cursor) gdk_cursor_destroy( m_cursor );
|
if (m_cursor) gdk_cursor_destroy( m_cursor );
|
||||||
}
|
}
|
||||||
@@ -44,7 +44,7 @@ wxCursorRefData::~wxCursorRefData(void)
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxCursor,wxObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxCursor,wxObject)
|
||||||
|
|
||||||
wxCursor::wxCursor(void)
|
wxCursor::wxCursor()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,13 +103,7 @@ wxCursor::wxCursor( const wxCursor &cursor )
|
|||||||
Ref( cursor );
|
Ref( cursor );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxCursor::wxCursor( const wxCursor *cursor )
|
wxCursor::~wxCursor()
|
||||||
{
|
|
||||||
UnRef();
|
|
||||||
if (cursor) Ref( *cursor );
|
|
||||||
}
|
|
||||||
|
|
||||||
wxCursor::~wxCursor(void)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,22 +114,22 @@ wxCursor& wxCursor::operator = ( const wxCursor& cursor )
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxCursor::operator == ( const wxCursor& cursor )
|
bool wxCursor::operator == ( const wxCursor& cursor ) const
|
||||||
{
|
{
|
||||||
return m_refData == cursor.m_refData;
|
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;
|
return m_refData != cursor.m_refData;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxCursor::Ok(void) const
|
bool wxCursor::Ok() const
|
||||||
{
|
{
|
||||||
return (m_refData != NULL);
|
return (m_refData != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
GdkCursor *wxCursor::GetCursor(void) const
|
GdkCursor *wxCursor::GetCursor() const
|
||||||
{
|
{
|
||||||
return M_CURSORDATA->m_cursor;
|
return M_CURSORDATA->m_cursor;
|
||||||
}
|
}
|
||||||
@@ -146,7 +140,7 @@ GdkCursor *wxCursor::GetCursor(void) const
|
|||||||
|
|
||||||
bool g_isBusy = FALSE;
|
bool g_isBusy = FALSE;
|
||||||
|
|
||||||
void wxEndBusyCursor(void)
|
void wxEndBusyCursor()
|
||||||
{
|
{
|
||||||
g_isBusy = FALSE;
|
g_isBusy = FALSE;
|
||||||
}
|
}
|
||||||
@@ -156,7 +150,7 @@ void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) )
|
|||||||
g_isBusy = TRUE;
|
g_isBusy = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxIsBusy(void)
|
bool wxIsBusy()
|
||||||
{
|
{
|
||||||
return g_isBusy;
|
return g_isBusy;
|
||||||
}
|
}
|
||||||
|
@@ -29,8 +29,8 @@ class wxFontRefData: public wxObjectRefData
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxFontRefData(void);
|
wxFontRefData();
|
||||||
~wxFontRefData(void);
|
~wxFontRefData();
|
||||||
|
|
||||||
wxList m_scaled_xfonts;
|
wxList m_scaled_xfonts;
|
||||||
int m_pointSize;
|
int m_pointSize;
|
||||||
@@ -45,7 +45,7 @@ class wxFontRefData: public wxObjectRefData
|
|||||||
friend wxFont;
|
friend wxFont;
|
||||||
};
|
};
|
||||||
|
|
||||||
wxFontRefData::wxFontRefData(void) : m_scaled_xfonts(wxKEY_INTEGER)
|
wxFontRefData::wxFontRefData() : m_scaled_xfonts(wxKEY_INTEGER)
|
||||||
{
|
{
|
||||||
m_byXFontName = FALSE;
|
m_byXFontName = FALSE;
|
||||||
m_pointSize = 12;
|
m_pointSize = 12;
|
||||||
@@ -58,7 +58,7 @@ wxFontRefData::wxFontRefData(void) : m_scaled_xfonts(wxKEY_INTEGER)
|
|||||||
m_font = (GdkFont *) NULL;
|
m_font = (GdkFont *) NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFontRefData::~wxFontRefData(void)
|
wxFontRefData::~wxFontRefData()
|
||||||
{
|
{
|
||||||
wxNode *node = m_scaled_xfonts.First();
|
wxNode *node = m_scaled_xfonts.First();
|
||||||
while (node)
|
while (node)
|
||||||
@@ -82,7 +82,7 @@ wxFontRefData::~wxFontRefData(void)
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
|
||||||
|
|
||||||
wxFont::wxFont(void)
|
wxFont::wxFont()
|
||||||
{
|
{
|
||||||
if (wxTheFontList) wxTheFontList->Append( this );
|
if (wxTheFontList) wxTheFontList->Append( this );
|
||||||
}
|
}
|
||||||
@@ -150,15 +150,7 @@ wxFont::wxFont( const wxFont& font )
|
|||||||
if (wxTheFontList) wxTheFontList->Append( this );
|
if (wxTheFontList) wxTheFontList->Append( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFont::wxFont( const wxFont* font )
|
wxFont::~wxFont()
|
||||||
{
|
|
||||||
UnRef();
|
|
||||||
if (font) Ref( *font );
|
|
||||||
|
|
||||||
if (wxTheFontList) wxTheFontList->Append( this );
|
|
||||||
}
|
|
||||||
|
|
||||||
wxFont::~wxFont(void)
|
|
||||||
{
|
{
|
||||||
if (wxTheFontList) wxTheFontList->DeleteObject( this );
|
if (wxTheFontList) wxTheFontList->DeleteObject( this );
|
||||||
}
|
}
|
||||||
@@ -185,7 +177,7 @@ bool wxFont::Ok() const
|
|||||||
return (m_refData != NULL);
|
return (m_refData != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxFont::GetPointSize(void) const
|
int wxFont::GetPointSize() const
|
||||||
{
|
{
|
||||||
if (!Ok())
|
if (!Ok())
|
||||||
{
|
{
|
||||||
@@ -196,7 +188,7 @@ int wxFont::GetPointSize(void) const
|
|||||||
return M_FONTDATA->m_pointSize;
|
return M_FONTDATA->m_pointSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxFont::GetFaceString(void) const
|
wxString wxFont::GetFaceString() const
|
||||||
{
|
{
|
||||||
if (!Ok())
|
if (!Ok())
|
||||||
{
|
{
|
||||||
@@ -208,7 +200,7 @@ wxString wxFont::GetFaceString(void) const
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxFont::GetFaceName(void) const
|
wxString wxFont::GetFaceName() const
|
||||||
{
|
{
|
||||||
if (!Ok())
|
if (!Ok())
|
||||||
{
|
{
|
||||||
@@ -220,7 +212,7 @@ wxString wxFont::GetFaceName(void) const
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxFont::GetFamily(void) const
|
int wxFont::GetFamily() const
|
||||||
{
|
{
|
||||||
if (!Ok())
|
if (!Ok())
|
||||||
{
|
{
|
||||||
@@ -231,7 +223,7 @@ int wxFont::GetFamily(void) const
|
|||||||
return M_FONTDATA->m_family;
|
return M_FONTDATA->m_family;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxFont::GetFamilyString(void) const
|
wxString wxFont::GetFamilyString() const
|
||||||
{
|
{
|
||||||
if (!Ok())
|
if (!Ok())
|
||||||
{
|
{
|
||||||
@@ -253,7 +245,7 @@ wxString wxFont::GetFamilyString(void) const
|
|||||||
return "wxDEFAULT";
|
return "wxDEFAULT";
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxFont::GetFontId(void) const
|
int wxFont::GetFontId() const
|
||||||
{
|
{
|
||||||
if (!Ok())
|
if (!Ok())
|
||||||
{
|
{
|
||||||
@@ -264,7 +256,7 @@ int wxFont::GetFontId(void) const
|
|||||||
return M_FONTDATA->m_fontId; // stub
|
return M_FONTDATA->m_fontId; // stub
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxFont::GetStyle(void) const
|
int wxFont::GetStyle() const
|
||||||
{
|
{
|
||||||
if (!Ok())
|
if (!Ok())
|
||||||
{
|
{
|
||||||
@@ -275,7 +267,7 @@ int wxFont::GetStyle(void) const
|
|||||||
return M_FONTDATA->m_style;
|
return M_FONTDATA->m_style;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxFont::GetStyleString(void) const
|
wxString wxFont::GetStyleString() const
|
||||||
{
|
{
|
||||||
if (!Ok())
|
if (!Ok())
|
||||||
{
|
{
|
||||||
@@ -294,7 +286,7 @@ wxString wxFont::GetStyleString(void) const
|
|||||||
return wxString("wxDEFAULT");
|
return wxString("wxDEFAULT");
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxFont::GetWeight(void) const
|
int wxFont::GetWeight() const
|
||||||
{
|
{
|
||||||
if (!Ok())
|
if (!Ok())
|
||||||
{
|
{
|
||||||
@@ -305,7 +297,7 @@ int wxFont::GetWeight(void) const
|
|||||||
return M_FONTDATA->m_weight;
|
return M_FONTDATA->m_weight;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxFont::GetWeightString(void) const
|
wxString wxFont::GetWeightString() const
|
||||||
{
|
{
|
||||||
if (!Ok())
|
if (!Ok())
|
||||||
{
|
{
|
||||||
@@ -324,7 +316,7 @@ wxString wxFont::GetWeightString(void) const
|
|||||||
return wxString("wxDEFAULT");
|
return wxString("wxDEFAULT");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFont::GetUnderlined(void) const
|
bool wxFont::GetUnderlined() const
|
||||||
{
|
{
|
||||||
if (!Ok())
|
if (!Ok())
|
||||||
{
|
{
|
||||||
@@ -580,7 +572,7 @@ static int SCoordinate(int s)
|
|||||||
|
|
||||||
class wxSuffixMap {
|
class wxSuffixMap {
|
||||||
public:
|
public:
|
||||||
~wxSuffixMap(void);
|
~wxSuffixMap();
|
||||||
|
|
||||||
inline char *GetName(int weight, int style)
|
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);
|
*v = copystring(internal);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxSuffixMap::~wxSuffixMap(void)
|
wxSuffixMap::~wxSuffixMap()
|
||||||
{
|
{
|
||||||
int k, j;
|
int k, j;
|
||||||
|
|
||||||
@@ -760,10 +752,10 @@ public:
|
|||||||
inline char* GetScreenName(int w, int s) {return screen.GetName(w, s);}
|
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* GetPostScriptName(int w, int s) {return printing.GetName(w, s);}
|
||||||
inline char* GetAFMName(int w, int s) {return afm.GetName(w, s);}
|
inline char* GetAFMName(int w, int s) {return afm.GetName(w, s);}
|
||||||
inline char* GetName(void) {return name;}
|
inline char* GetName() {return name;}
|
||||||
inline int GetFamily(void) {return family;}
|
inline int GetFamily() {return family;}
|
||||||
inline int GetId(void) {return id;}
|
inline int GetId() {return id;}
|
||||||
inline bool IsRoman(void) {return isroman;}
|
inline bool IsRoman() {return isroman;}
|
||||||
#if defined(__WXDEBUG__)
|
#if defined(__WXDEBUG__)
|
||||||
void Dump(ostream& str);
|
void Dump(ostream& str);
|
||||||
#endif
|
#endif
|
||||||
@@ -788,7 +780,7 @@ wxFontNameItem::wxFontNameItem(const char *Name, int Id, int Family)
|
|||||||
afm. Initialize(name, "Afm");
|
afm. Initialize(name, "Afm");
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFontNameItem::~wxFontNameItem(void)
|
wxFontNameItem::~wxFontNameItem()
|
||||||
{
|
{
|
||||||
if (name)
|
if (name)
|
||||||
delete[] name;
|
delete[] name;
|
||||||
@@ -808,7 +800,7 @@ void wxFontNameItem::Dump(ostream& str)
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxFontNameDirectory, wxObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxFontNameDirectory, wxObject)
|
||||||
|
|
||||||
wxFontNameDirectory::wxFontNameDirectory(void)
|
wxFontNameDirectory::wxFontNameDirectory()
|
||||||
{
|
{
|
||||||
table = new wxHashTable(wxKEY_INTEGER, 20);
|
table = new wxHashTable(wxKEY_INTEGER, 20);
|
||||||
nextFontId = -1;
|
nextFontId = -1;
|
||||||
@@ -827,7 +819,7 @@ wxFontNameDirectory::~wxFontNameDirectory()
|
|||||||
delete table;
|
delete table;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxFontNameDirectory::GetNewFontId(void)
|
int wxFontNameDirectory::GetNewFontId()
|
||||||
{
|
{
|
||||||
return (nextFontId--);
|
return (nextFontId--);
|
||||||
}
|
}
|
||||||
|
@@ -524,7 +524,7 @@ void wxFrame::SetMenuBar( wxMenuBar *menuBar )
|
|||||||
if (m_sizeSet) GtkOnSize( m_x, m_y, m_width, m_height );
|
if (m_sizeSet) GtkOnSize( m_x, m_y, m_width, m_height );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxMenuBar *wxFrame::GetMenuBar(void) const
|
wxMenuBar *wxFrame::GetMenuBar() const
|
||||||
{
|
{
|
||||||
return m_frameMenuBar;
|
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 );
|
return new wxToolBar( this, id, wxDefaultPosition, wxDefaultSize, style, name );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxToolBar *wxFrame::GetToolBar(void) const
|
wxToolBar *wxFrame::GetToolBar() const
|
||||||
{
|
{
|
||||||
return m_frameToolBar;
|
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
|
// Set the height according to the font and the border size
|
||||||
wxClientDC dc(statusBar);
|
wxClientDC dc(statusBar);
|
||||||
dc.SetFont( *statusBar->GetFont() );
|
dc.SetFont( statusBar->GetFont() );
|
||||||
|
|
||||||
long x, y;
|
long x, y;
|
||||||
dc.GetTextExtent( "X", &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);
|
m_frameStatusBar->SetStatusWidths(n, widths_field);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxStatusBar *wxFrame::GetStatusBar(void) const
|
wxStatusBar *wxFrame::GetStatusBar() const
|
||||||
{
|
{
|
||||||
return m_frameStatusBar;
|
return m_frameStatusBar;
|
||||||
}
|
}
|
||||||
|
@@ -38,11 +38,6 @@ wxIcon::wxIcon( const wxIcon& icon ) : wxBitmap()
|
|||||||
Ref(icon);
|
Ref(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxIcon::wxIcon( const wxIcon* icon ) : wxBitmap()
|
|
||||||
{
|
|
||||||
if (icon) Ref(*icon);
|
|
||||||
}
|
|
||||||
|
|
||||||
wxIcon& wxIcon::operator = ( const wxIcon& icon )
|
wxIcon& wxIcon::operator = ( const wxIcon& icon )
|
||||||
{
|
{
|
||||||
if (*this == icon) return (*this);
|
if (*this == icon) return (*this);
|
||||||
|
@@ -218,10 +218,9 @@ wxMenuItem::wxMenuItem()
|
|||||||
m_menuItem = (GtkWidget *) NULL;
|
m_menuItem = (GtkWidget *) NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// it's valid for this function to be called even if m_menuItem == NULL
|
||||||
void wxMenuItem::SetName(const wxString& str)
|
void wxMenuItem::SetName(const wxString& str)
|
||||||
{
|
{
|
||||||
wxCHECK_RET( m_menuItem, "invalid menu item" );
|
|
||||||
|
|
||||||
m_text = "";
|
m_text = "";
|
||||||
for ( const char *pc = str; *pc != '\0'; pc++ )
|
for ( const char *pc = str; *pc != '\0'; pc++ )
|
||||||
{
|
{
|
||||||
@@ -231,10 +230,13 @@ void wxMenuItem::SetName(const wxString& str)
|
|||||||
m_text << *pc;
|
m_text << *pc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( m_menuItem )
|
||||||
|
{
|
||||||
GtkLabel *label = GTK_LABEL( GTK_BIN(m_menuItem)->child );
|
GtkLabel *label = GTK_LABEL( GTK_BIN(m_menuItem)->child );
|
||||||
|
|
||||||
gtk_label_set( label, m_text.c_str());
|
gtk_label_set( label, m_text.c_str());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void wxMenuItem::Check( bool check )
|
void wxMenuItem::Check( bool check )
|
||||||
{
|
{
|
||||||
|
@@ -29,12 +29,12 @@ class wxPaletteRefData: public wxObjectRefData
|
|||||||
GdkColormap *m_colormap;
|
GdkColormap *m_colormap;
|
||||||
};
|
};
|
||||||
|
|
||||||
wxPaletteRefData::wxPaletteRefData(void)
|
wxPaletteRefData::wxPaletteRefData()
|
||||||
{
|
{
|
||||||
m_colormap = (GdkColormap *) NULL;
|
m_colormap = (GdkColormap *) NULL;
|
||||||
};
|
};
|
||||||
|
|
||||||
wxPaletteRefData::~wxPaletteRefData(void)
|
wxPaletteRefData::~wxPaletteRefData()
|
||||||
{
|
{
|
||||||
if (m_colormap) gdk_colormap_unref( m_colormap );
|
if (m_colormap) gdk_colormap_unref( m_colormap );
|
||||||
};
|
};
|
||||||
@@ -45,7 +45,7 @@ wxPaletteRefData::~wxPaletteRefData(void)
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxPalette,wxGDIObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxPalette,wxGDIObject)
|
||||||
|
|
||||||
wxPalette::wxPalette(void)
|
wxPalette::wxPalette()
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -60,13 +60,7 @@ wxPalette::wxPalette( const wxPalette& palette )
|
|||||||
Ref( palette );
|
Ref( palette );
|
||||||
};
|
};
|
||||||
|
|
||||||
wxPalette::wxPalette( const wxPalette* palette )
|
wxPalette::~wxPalette()
|
||||||
{
|
|
||||||
UnRef();
|
|
||||||
if (palette) Ref( *palette );
|
|
||||||
};
|
|
||||||
|
|
||||||
wxPalette::~wxPalette(void)
|
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -55,7 +55,7 @@ wxPenRefData::wxPenRefData( const wxPenRefData& data )
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxPen,wxGDIObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxPen,wxGDIObject)
|
||||||
|
|
||||||
wxPen::wxPen(void)
|
wxPen::wxPen()
|
||||||
{
|
{
|
||||||
if (wxThePenList) wxThePenList->AddPen( this );
|
if (wxThePenList) wxThePenList->AddPen( this );
|
||||||
}
|
}
|
||||||
@@ -76,14 +76,6 @@ wxPen::wxPen( const wxPen& pen )
|
|||||||
if (wxThePenList) wxThePenList->AddPen( this );
|
if (wxThePenList) wxThePenList->AddPen( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPen::wxPen( const wxPen* pen )
|
|
||||||
{
|
|
||||||
UnRef();
|
|
||||||
if (pen) Ref( *pen );
|
|
||||||
|
|
||||||
if (wxThePenList) wxThePenList->AddPen( this );
|
|
||||||
}
|
|
||||||
|
|
||||||
wxPen::~wxPen()
|
wxPen::~wxPen()
|
||||||
{
|
{
|
||||||
if (wxThePenList) wxThePenList->RemovePen( this );
|
if (wxThePenList) wxThePenList->RemovePen( this );
|
||||||
|
@@ -109,7 +109,7 @@ static char *GetIniFile(char *dest, const char *filename)
|
|||||||
return dest;
|
return dest;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void wxXMergeDatabases(void)
|
static void wxXMergeDatabases()
|
||||||
{
|
{
|
||||||
XrmDatabase homeDB, serverDB, applicationDB;
|
XrmDatabase homeDB, serverDB, applicationDB;
|
||||||
char filenamebuf[1024];
|
char filenamebuf[1024];
|
||||||
@@ -159,7 +159,7 @@ static void wxXMergeDatabases(void)
|
|||||||
// called on application exit
|
// called on application exit
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
void wxFlushResources(void)
|
void wxFlushResources()
|
||||||
{
|
{
|
||||||
char nameBuffer[512];
|
char nameBuffer[512];
|
||||||
|
|
||||||
|
@@ -1655,7 +1655,7 @@ void wxWindow::Fit()
|
|||||||
|
|
||||||
int maxX = 0;
|
int maxX = 0;
|
||||||
int maxY = 0;
|
int maxY = 0;
|
||||||
wxNode *node = m_childrenFirst();
|
wxNode *node = m_children.First();
|
||||||
while ( node )
|
while ( node )
|
||||||
{
|
{
|
||||||
wxWindow *win = (wxWindow *)node->Data();
|
wxWindow *win = (wxWindow *)node->Data();
|
||||||
@@ -1803,11 +1803,6 @@ void wxWindow::AddChild( wxWindow *child )
|
|||||||
m_children.Append( child );
|
m_children.Append( child );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxList& wxWindow::GetChildren() const
|
|
||||||
{
|
|
||||||
return m_children;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxWindow *wxWindow::ReParent( wxWindow *newParent )
|
wxWindow *wxWindow::ReParent( wxWindow *newParent )
|
||||||
{
|
{
|
||||||
wxWindow *oldParent = GetParent();
|
wxWindow *oldParent = GetParent();
|
||||||
@@ -1855,7 +1850,7 @@ void wxWindow::Lower()
|
|||||||
if (m_widget) gdk_window_lower( m_widget->window );
|
if (m_widget) gdk_window_lower( m_widget->window );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxEvtHandler *wxWindow::GetEventHandler()
|
wxEvtHandler *wxWindow::GetEventHandler() const
|
||||||
{
|
{
|
||||||
return m_eventHandler;
|
return m_eventHandler;
|
||||||
}
|
}
|
||||||
@@ -1934,7 +1929,7 @@ void wxWindow::SetId( wxWindowID id )
|
|||||||
m_windowId = id;
|
m_windowId = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxWindowID wxWindow::GetId()
|
wxWindowID wxWindow::GetId() const
|
||||||
{
|
{
|
||||||
return m_windowId;
|
return m_windowId;
|
||||||
}
|
}
|
||||||
@@ -1951,7 +1946,8 @@ void wxWindow::SetCursor( const wxCursor &cursor )
|
|||||||
|
|
||||||
if (cursor.Ok())
|
if (cursor.Ok())
|
||||||
{
|
{
|
||||||
if (*((wxCursor*)&cursor) == m_cursor) return;
|
if ( cursor == *m_cursor )
|
||||||
|
return;
|
||||||
*m_cursor = cursor;
|
*m_cursor = cursor;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -2278,11 +2274,6 @@ void wxWindow::SetFont( const wxFont &font )
|
|||||||
ApplyWidgetStyle();
|
ApplyWidgetStyle();
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFont *wxWindow::GetFont()
|
|
||||||
{
|
|
||||||
return &m_font;
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindow::SetWindowStyleFlag( long flag )
|
void wxWindow::SetWindowStyleFlag( long flag )
|
||||||
{
|
{
|
||||||
m_windowStyle = flag;
|
m_windowStyle = flag;
|
||||||
@@ -2795,7 +2786,7 @@ bool wxWindow::DoPhase(int phase)
|
|||||||
{
|
{
|
||||||
noChanges = 0;
|
noChanges = 0;
|
||||||
noFailures = 0;
|
noFailures = 0;
|
||||||
wxNode *node = m_children.first();
|
wxNode *node = m_children.First();
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
wxWindow *child = (wxWindow *)node->Data();
|
wxWindow *child = (wxWindow *)node->Data();
|
||||||
|
@@ -8,8 +8,7 @@
|
|||||||
########################### Programs #################################
|
########################### Programs #################################
|
||||||
|
|
||||||
# Replace this with your own path if necessary
|
# Replace this with your own path if necessary
|
||||||
#WXDIR = /home/karl/wxWindows
|
WXDIR = $(wx)
|
||||||
WXDIR = /home/jacs/wx2
|
|
||||||
|
|
||||||
# C++ compiler
|
# C++ compiler
|
||||||
CC = g++
|
CC = g++
|
||||||
|
Reference in New Issue
Block a user