Headers moved a bit.

Minor docs updates.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-11-22 19:44:25 +00:00
parent ae285bb56a
commit 20e05ffbd3
55 changed files with 249 additions and 253 deletions

View File

@@ -1,4 +1,4 @@
\section{Config classes overview}\label{wxconfigoverview} \section{wxConfig classes overview}\label{wxconfigoverview}
Classes: \helpref{wxConfig}{wxconfigbase} Classes: \helpref{wxConfig}{wxconfigbase}

View File

@@ -8,13 +8,7 @@ This chapter contains a selection of topic overviews, first things first:
\input tguide.tex \input tguide.tex
\input hworld.tex \input hworld.tex
\input tsamples.tex \input tsamples.tex
Every application need one wxApp class, so we start here:
\input tapp.tex \input tapp.tex
Not everything in wxWindows is about GUI programming:
\input truntime.tex \input truntime.tex
\input tstring.tex \input tstring.tex
\input tunicode.tex \input tunicode.tex
@@ -27,9 +21,6 @@ Not everything in wxWindows is about GUI programming:
\input tconfig.tex \input tconfig.tex
\input texpr.tex \input texpr.tex
\input fs.tex \input fs.tex
General overviews concerning windows and events:
\input tevent.tex \input tevent.tex
\input tstyles.tex \input tstyles.tex
\input tdelwin.tex \input tdelwin.tex
@@ -38,16 +29,10 @@ General overviews concerning windows and events:
\input tconstr.tex \input tconstr.tex
\input tresourc.tex \input tresourc.tex
\input tscroll.tex \input tscroll.tex
Drawing and device context specific overviews:
\input tbitmap.tex \input tbitmap.tex
\input tdc.tex \input tdc.tex
\input tfont.tex \input tfont.tex
\input tfontenc.tex \input tfontenc.tex
Special controls:
\input tsplittr.tex \input tsplittr.tex
\input ttreectl.tex \input ttreectl.tex
\input tlistctl.tex \input tlistctl.tex
@@ -58,9 +43,6 @@ Special controls:
\input ttoolbar.tex \input ttoolbar.tex
\input tgrid.tex \input tgrid.tex
\input ttips.tex \input ttips.tex
Advanced topic overviews:
\input tprint.tex \input tprint.tex
\input tthreads.tex \input tthreads.tex
\input tdnd.tex \input tdnd.tex

View File

@@ -1,4 +1,4 @@
\section{Streams in wxWindows overview}\label{wxstreamoverview} \section{wxStreams overview}\label{wxstreamoverview}
Classes: \helpref{wxStreamBase}{wxstreambase}, Classes: \helpref{wxStreamBase}{wxstreambase},
\helpref{wxStreamBuffer}{wxstreambuffer}, \helpref{wxInputStream}{wxinputstream}, \helpref{wxStreamBuffer}{wxstreambuffer}, \helpref{wxInputStream}{wxinputstream},
@@ -62,13 +62,13 @@ code:
// Ok, read some bytes ... nb_datas is expressed in bytes. // Ok, read some bytes ... nb_datas is expressed in bytes.
in_stream.Read(data, nb_datas); in_stream.Read(data, nb_datas);
if (in_stream.LastError() != wxStream_NOERROR) { if (in_stream.LastError() != wxSTREAM_NOERROR) {
// Oh oh, something bad happens. // Oh oh, something bad happens.
// For a complete list, look into the documentation at wxStreamBase. // For a complete list, look into the documentation at wxStreamBase.
} }
// You can also inline all like this. // You can also inline all like this.
if (in_stream.Read(data, nb_datas).LastError() != wxStream_NOERROR) { if (in_stream.Read(data, nb_datas).LastError() != wxSTREAM_NOERROR) {
// Do something. // Do something.
} }

View File

@@ -34,10 +34,10 @@ more robust and will undoubtedly save you countless problems (example: under
Win32 a thread can only access GDI objects such as pens, brushes, \&c created by Win32 a thread can only access GDI objects such as pens, brushes, \&c created by
itself and not by the other threads). itself and not by the other threads).
Final note: in the current release of wxWindows, there are no specific For communication between threads, use
facilities for communicating between the threads. However, the usual \helpref{wxEvtHandler::AddPendingEvent}{wxevthandleraddpendingprocessevent}
\helpref{ProcessEvent()}{wxevthandlerprocessevent} function may be used for or its short version \helpref{wxPostEvent}{wxpostevent}. These functions
thread communication too - but you should provide your own synchronisation have thread safe implementation so that they can be used as they are for
mechanism if you use it (e.g. just use a critical section before sending a sending event from one thread to another.
message) because there is no built-in synchronisation.

View File

@@ -96,8 +96,9 @@ public:
bool Ok() const; bool Ok() const;
// implementation // implementation
// --------------
int GetCommand( wxKeyEvent &event ); int GetCommand( wxKeyEvent &event );
private: private:

View File

@@ -88,6 +88,7 @@ public:
{ return GetPalette(); }; { return GetPalette(); };
// implementation // implementation
// --------------
void SetHeight( int height ); void SetHeight( int height );
void SetWidth( int width ); void SetWidth( int width );
@@ -96,8 +97,6 @@ public:
GdkPixmap *GetPixmap() const; GdkPixmap *GetPixmap() const;
GdkBitmap *GetBitmap() const; GdkBitmap *GetBitmap() const;
// no data :-)
private: private:
DECLARE_DYNAMIC_CLASS(wxBitmap) DECLARE_DYNAMIC_CLASS(wxBitmap)

View File

@@ -76,8 +76,9 @@ public:
virtual bool Enable(bool enable); virtual bool Enable(bool enable);
// implementation // implementation
// --------------
void HasFocus(); void HasFocus();
void NotFocus(); void NotFocus();
void StartSelect(); void StartSelect();

View File

@@ -59,7 +59,8 @@ public:
static wxSize GetDefaultSize(); static wxSize GetDefaultSize();
// implementation // implementation
// --------------
void ApplyWidgetStyle(); void ApplyWidgetStyle();

View File

@@ -66,6 +66,8 @@ public:
bool Enable( bool enable ); bool Enable( bool enable );
// implementation // implementation
// --------------
void ApplyWidgetStyle(); void ApplyWidgetStyle();
bool IsOwnGtkWindow( GdkWindow *window ); bool IsOwnGtkWindow( GdkWindow *window );
void OnInternalIdle(); void OnInternalIdle();

View File

@@ -55,15 +55,10 @@ public:
wxString GetString( int n ) const; wxString GetString( int n ) const;
void SetString( int n, const wxString& string ); void SetString( int n, const wxString& string );
// implementation protected:
wxList m_clientList; // contains the client data for the items wxList m_clientList; // contains the client data for the items
void DisableEvents();
void EnableEvents();
void AppendCommon( const wxString &item );
void ApplyWidgetStyle(); void ApplyWidgetStyle();
protected:
virtual int DoAppend(const wxString& item); virtual int DoAppend(const wxString& item);
virtual void DoSetItemClientData( int n, void* clientData ); virtual void DoSetItemClientData( int n, void* clientData );
@@ -75,7 +70,7 @@ protected:
private: private:
// common part of Create() and DoAppend() // common part of Create() and DoAppend()
size_t AppendHelper(GtkWidget *menu, const wxString& item); size_t GtkAppendHelper(GtkWidget *menu, const wxString& item);
// this array is only used for controls with wxCB_SORT style, so only // this array is only used for controls with wxCB_SORT style, so only
// allocate it if it's needed (hence using pointer) // allocate it if it's needed (hence using pointer)

View File

@@ -25,9 +25,7 @@
class wxCursor: public wxObject class wxCursor: public wxObject
{ {
DECLARE_DYNAMIC_CLASS(wxCursor) public:
public:
wxCursor(); wxCursor();
wxCursor( int cursorId ); wxCursor( int cursorId );
@@ -38,9 +36,12 @@ class wxCursor: public wxObject
bool operator != ( const wxCursor& cursor ) const; bool operator != ( const wxCursor& cursor ) const;
bool Ok() const; bool Ok() const;
// implementation
GdkCursor *GetCursor() const; GdkCursor *GetCursor() const;
// no data :-) private:
DECLARE_DYNAMIC_CLASS(wxCursor)
}; };
#endif // __GTKCURSORH__ #endif // __GTKCURSORH__

View File

@@ -40,8 +40,6 @@ class wxDC;
class wxDC : public wxDCBase class wxDC : public wxDCBase
{ {
DECLARE_ABSTRACT_CLASS(wxDC)
public: public:
wxDC(); wxDC();
~wxDC() { } ~wxDC() { }
@@ -151,6 +149,9 @@ public:
m_needComputeScaleY; // not yet used m_needComputeScaleY; // not yet used
float m_scaleFactor; // wxPSDC wants to have this. Will disappear. float m_scaleFactor; // wxPSDC wants to have this. Will disappear.
private:
DECLARE_ABSTRACT_CLASS(wxDC)
}; };
#endif // __GTKDCH__ #endif // __GTKDCH__

View File

@@ -31,8 +31,6 @@ class wxClientDC;
class wxWindowDC : public wxDC class wxWindowDC : public wxDC
{ {
DECLARE_DYNAMIC_CLASS(wxWindowDC)
public: public:
wxWindowDC(); wxWindowDC();
wxWindowDC( wxWindow *win ); wxWindowDC( wxWindow *win );
@@ -121,6 +119,9 @@ public:
void ComputeScaleAndOrigin(); void ComputeScaleAndOrigin();
GdkWindow *GetWindow() { return m_window; } GdkWindow *GetWindow() { return m_window; }
private:
DECLARE_DYNAMIC_CLASS(wxWindowDC)
}; };
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -129,11 +130,12 @@ public:
class wxPaintDC : public wxWindowDC class wxPaintDC : public wxWindowDC
{ {
DECLARE_DYNAMIC_CLASS(wxPaintDC)
public: public:
wxPaintDC(); wxPaintDC();
wxPaintDC( wxWindow *win ); wxPaintDC( wxWindow *win );
private:
DECLARE_DYNAMIC_CLASS(wxPaintDC)
}; };
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -142,12 +144,12 @@ public:
class wxClientDC : public wxWindowDC class wxClientDC : public wxWindowDC
{ {
DECLARE_DYNAMIC_CLASS(wxClientDC)
public: public:
wxClientDC(); wxClientDC();
wxClientDC( wxWindow *win ); wxClientDC( wxWindow *win );
private:
DECLARE_DYNAMIC_CLASS(wxClientDC)
}; };
#endif // __GTKDCCLIENTH__ #endif // __GTKDCCLIENTH__

View File

@@ -30,18 +30,18 @@ class wxMemoryDC;
class wxMemoryDC : public wxWindowDC class wxMemoryDC : public wxWindowDC
{ {
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
public: public:
wxMemoryDC(); wxMemoryDC();
wxMemoryDC( wxDC *dc ); // Create compatible DC wxMemoryDC( wxDC *dc ); // Create compatible DC
~wxMemoryDC(); ~wxMemoryDC();
virtual void SelectObject( const wxBitmap& bitmap ); virtual void SelectObject( const wxBitmap& bitmap );
void DoGetSize( int *width, int *height ) const; void DoGetSize( int *width, int *height ) const;
// implementation // implementation
wxBitmap m_selected;
wxBitmap m_selected; private:
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
}; };
#endif #endif

View File

@@ -24,21 +24,22 @@ class wxScreenDC;
class wxScreenDC: public wxPaintDC class wxScreenDC: public wxPaintDC
{ {
DECLARE_DYNAMIC_CLASS(wxScreenDC)
public: public:
wxScreenDC(); wxScreenDC();
~wxScreenDC(); ~wxScreenDC();
static bool StartDrawingOnTop( wxWindow *window ); static bool StartDrawingOnTop( wxWindow *window );
static bool StartDrawingOnTop( wxRect *rect = (wxRect *) NULL ); static bool StartDrawingOnTop( wxRect *rect = (wxRect *) NULL );
static bool EndDrawingOnTop(); static bool EndDrawingOnTop();
// implementation // implementation
static GdkWindow *sm_overlayWindow; static GdkWindow *sm_overlayWindow;
static int sm_overlayWindowX; static int sm_overlayWindowX;
static int sm_overlayWindowY; static int sm_overlayWindowY;
private:
DECLARE_DYNAMIC_CLASS(wxScreenDC)
}; };
#endif #endif

View File

@@ -37,8 +37,6 @@ extern const wxChar *wxDialogNameStr;
class wxDialog: public wxDialogBase class wxDialog: public wxDialogBase
{ {
DECLARE_DYNAMIC_CLASS(wxDialog)
public: public:
wxDialog() { Init(); } wxDialog() { Init(); }
wxDialog( wxWindow *parent, wxWindowID id, wxDialog( wxWindow *parent, wxWindowID id,
@@ -106,6 +104,7 @@ protected:
private: private:
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxDialog)
}; };
#endif // __GTKDIALOGH__ #endif // __GTKDIALOGH__

View File

@@ -26,8 +26,6 @@ extern const wxChar *wxFileSelectorDefaultWildcardStr;
class wxFileDialog: public wxDialog class wxFileDialog: public wxDialog
{ {
DECLARE_DYNAMIC_CLASS(wxFileDialog)
public: public:
wxFileDialog() { } wxFileDialog() { }
@@ -56,7 +54,6 @@ public:
int GetFilterIndex() const { return m_filterIndex ; } int GetFilterIndex() const { return m_filterIndex ; }
protected: protected:
wxString m_message; wxString m_message;
long m_dialogStyle; long m_dialogStyle;
wxWindow * m_parent; wxWindow * m_parent;
@@ -65,6 +62,9 @@ protected:
wxString m_fileName; wxString m_fileName;
wxString m_wildCard; wxString m_wildCard;
int m_filterIndex; int m_filterIndex;
private:
DECLARE_DYNAMIC_CLASS(wxFileDialog)
}; };
#define wxOPEN 1 #define wxOPEN 1

View File

@@ -41,9 +41,7 @@ extern const char* wxGaugeNameStr;
class wxGauge: public wxControl class wxGauge: public wxControl
{ {
DECLARE_DYNAMIC_CLASS(wxGauge) public:
public:
inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; m_useProgressBar = TRUE; } inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; m_useProgressBar = TRUE; }
inline wxGauge( wxWindow *parent, wxWindowID id, int range, inline wxGauge( wxWindow *parent, wxWindowID id, int range,
@@ -73,13 +71,16 @@ class wxGauge: public wxControl
// Are we a Win95/GTK progress bar, or a normal gauge? // Are we a Win95/GTK progress bar, or a normal gauge?
inline bool GetProgressBar() const { return m_useProgressBar; } inline bool GetProgressBar() const { return m_useProgressBar; }
// implementation // implementation
// -------------
void ApplyWidgetStyle(); void ApplyWidgetStyle();
int m_rangeMax;
int m_rangeMax; int m_gaugePos;
int m_gaugePos; bool m_useProgressBar;
bool m_useProgressBar;
private:
DECLARE_DYNAMIC_CLASS(wxGauge)
}; };
#endif #endif

View File

@@ -19,18 +19,18 @@
class wxGDIObject : public wxObject class wxGDIObject : public wxObject
{ {
DECLARE_DYNAMIC_CLASS(wxGDIObject)
public: public:
inline wxGDIObject() { m_visible = FALSE; }; inline wxGDIObject() { m_visible = FALSE; };
inline ~wxGDIObject() {}; inline ~wxGDIObject() {}
virtual bool GetVisible() { return m_visible; } virtual bool GetVisible() { return m_visible; }
virtual void SetVisible( bool visible ) { m_visible = visible; } virtual void SetVisible( bool visible ) { m_visible = visible; }
protected: protected:
bool m_visible; /* can a pointer to this object be safely taken? bool m_visible; /* can a pointer to this object be safely taken?
* - only if created within FindOrCreate... */ * - only if created within FindOrCreate... */
private:
DECLARE_DYNAMIC_CLASS(wxGDIObject)
}; };
#endif #endif

View File

@@ -31,25 +31,26 @@ class wxIcon;
class wxIcon: public wxBitmap class wxIcon: public wxBitmap
{ {
DECLARE_DYNAMIC_CLASS(wxIcon)
public: public:
wxIcon();
wxIcon( const wxIcon& icon);
wxIcon( const char **bits, int width=-1, int height=-1 );
wxIcon(); // For compatibility with wxMSW where desired size is sometimes required to
wxIcon( const wxIcon& icon); // distinguish between multiple icons in a resource.
wxIcon( const char **bits, int width=-1, int height=-1 ); wxIcon( const wxString& filename, int type = wxBITMAP_TYPE_XPM,
int WXUNUSED(desiredWidth)=-1, int WXUNUSED(desiredHeight)=-1 ) :
wxBitmap(filename, type)
{
}
wxIcon( char **bits, int width=-1, int height=-1 );
// For compatibility with wxMSW where desired size is sometimes required to wxIcon& operator = (const wxIcon& icon);
// distinguish between multiple icons in a resource. inline bool operator == (const wxIcon& icon) { return m_refData == icon.m_refData; }
wxIcon( const wxString& filename, int type = wxBITMAP_TYPE_XPM, int WXUNUSED(desiredWidth)=-1, int WXUNUSED(desiredHeight)=-1 ): inline bool operator != (const wxIcon& icon) { return m_refData != icon.m_refData; }
wxBitmap(filename, type)
{ private:
} DECLARE_DYNAMIC_CLASS(wxIcon)
wxIcon( char **bits, int width=-1, int height=-1 );
wxIcon& operator = (const wxIcon& icon);
inline bool operator == (const wxIcon& icon) { return m_refData == icon.m_refData; }
inline bool operator != (const wxIcon& icon) { return m_refData != icon.m_refData; }
}; };

View File

@@ -35,10 +35,7 @@ typedef char wxDash;
class wxPen: public wxGDIObject class wxPen: public wxGDIObject
{ {
DECLARE_DYNAMIC_CLASS(wxPen) public:
public:
wxPen(); 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 );
@@ -68,7 +65,8 @@ class wxPen: public wxGDIObject
void Unshare(); void Unshare();
// no data :-) private:
DECLARE_DYNAMIC_CLASS(wxPen)
}; };
#endif // __GTKPENH__ #endif // __GTKPENH__

View File

@@ -40,10 +40,7 @@ extern const char *wxScrollBarNameStr;
class wxScrollBar: public wxControl class wxScrollBar: public wxControl
{ {
DECLARE_DYNAMIC_CLASS(wxScrollBar) public:
public:
wxScrollBar(void) { m_adjust = (GtkAdjustment *) NULL; m_oldPos = 0.0; }; wxScrollBar(void) { m_adjust = (GtkAdjustment *) NULL; m_oldPos = 0.0; };
inline wxScrollBar( wxWindow *parent, wxWindowID id, inline wxScrollBar( wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
@@ -69,7 +66,8 @@ class wxScrollBar: public wxControl
virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize, virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize,
bool refresh = TRUE ); bool refresh = TRUE );
// Backward compatibility // Backward compatibility
// ----------------------
int GetValue(void) const; int GetValue(void) const;
void SetValue( int viewStart ); void SetValue( int viewStart );
@@ -80,13 +78,17 @@ class wxScrollBar: public wxControl
void SetObjectLength( int objectLength ); void SetObjectLength( int objectLength );
void SetViewLength( int viewLength ); void SetViewLength( int viewLength );
// implementation // implementation
// --------------
bool IsOwnGtkWindow( GdkWindow *window ); bool IsOwnGtkWindow( GdkWindow *window );
void ApplyWidgetStyle(); void ApplyWidgetStyle();
GtkAdjustment *m_adjust; GtkAdjustment *m_adjust;
float m_oldPos; float m_oldPos;
private:
DECLARE_DYNAMIC_CLASS(wxScrollBar)
}; };
#endif #endif

View File

@@ -96,8 +96,9 @@ public:
bool Ok() const; bool Ok() const;
// implementation // implementation
// --------------
int GetCommand( wxKeyEvent &event ); int GetCommand( wxKeyEvent &event );
private: private:

View File

@@ -88,6 +88,7 @@ public:
{ return GetPalette(); }; { return GetPalette(); };
// implementation // implementation
// --------------
void SetHeight( int height ); void SetHeight( int height );
void SetWidth( int width ); void SetWidth( int width );
@@ -96,8 +97,6 @@ public:
GdkPixmap *GetPixmap() const; GdkPixmap *GetPixmap() const;
GdkBitmap *GetBitmap() const; GdkBitmap *GetBitmap() const;
// no data :-)
private: private:
DECLARE_DYNAMIC_CLASS(wxBitmap) DECLARE_DYNAMIC_CLASS(wxBitmap)

View File

@@ -76,8 +76,9 @@ public:
virtual bool Enable(bool enable); virtual bool Enable(bool enable);
// implementation // implementation
// --------------
void HasFocus(); void HasFocus();
void NotFocus(); void NotFocus();
void StartSelect(); void StartSelect();

View File

@@ -59,7 +59,8 @@ public:
static wxSize GetDefaultSize(); static wxSize GetDefaultSize();
// implementation // implementation
// --------------
void ApplyWidgetStyle(); void ApplyWidgetStyle();

View File

@@ -66,6 +66,8 @@ public:
bool Enable( bool enable ); bool Enable( bool enable );
// implementation // implementation
// --------------
void ApplyWidgetStyle(); void ApplyWidgetStyle();
bool IsOwnGtkWindow( GdkWindow *window ); bool IsOwnGtkWindow( GdkWindow *window );
void OnInternalIdle(); void OnInternalIdle();

View File

@@ -55,15 +55,10 @@ public:
wxString GetString( int n ) const; wxString GetString( int n ) const;
void SetString( int n, const wxString& string ); void SetString( int n, const wxString& string );
// implementation protected:
wxList m_clientList; // contains the client data for the items wxList m_clientList; // contains the client data for the items
void DisableEvents();
void EnableEvents();
void AppendCommon( const wxString &item );
void ApplyWidgetStyle(); void ApplyWidgetStyle();
protected:
virtual int DoAppend(const wxString& item); virtual int DoAppend(const wxString& item);
virtual void DoSetItemClientData( int n, void* clientData ); virtual void DoSetItemClientData( int n, void* clientData );
@@ -75,7 +70,7 @@ protected:
private: private:
// common part of Create() and DoAppend() // common part of Create() and DoAppend()
size_t AppendHelper(GtkWidget *menu, const wxString& item); size_t GtkAppendHelper(GtkWidget *menu, const wxString& item);
// this array is only used for controls with wxCB_SORT style, so only // this array is only used for controls with wxCB_SORT style, so only
// allocate it if it's needed (hence using pointer) // allocate it if it's needed (hence using pointer)

View File

@@ -25,9 +25,7 @@
class wxCursor: public wxObject class wxCursor: public wxObject
{ {
DECLARE_DYNAMIC_CLASS(wxCursor) public:
public:
wxCursor(); wxCursor();
wxCursor( int cursorId ); wxCursor( int cursorId );
@@ -38,9 +36,12 @@ class wxCursor: public wxObject
bool operator != ( const wxCursor& cursor ) const; bool operator != ( const wxCursor& cursor ) const;
bool Ok() const; bool Ok() const;
// implementation
GdkCursor *GetCursor() const; GdkCursor *GetCursor() const;
// no data :-) private:
DECLARE_DYNAMIC_CLASS(wxCursor)
}; };
#endif // __GTKCURSORH__ #endif // __GTKCURSORH__

View File

@@ -40,8 +40,6 @@ class wxDC;
class wxDC : public wxDCBase class wxDC : public wxDCBase
{ {
DECLARE_ABSTRACT_CLASS(wxDC)
public: public:
wxDC(); wxDC();
~wxDC() { } ~wxDC() { }
@@ -151,6 +149,9 @@ public:
m_needComputeScaleY; // not yet used m_needComputeScaleY; // not yet used
float m_scaleFactor; // wxPSDC wants to have this. Will disappear. float m_scaleFactor; // wxPSDC wants to have this. Will disappear.
private:
DECLARE_ABSTRACT_CLASS(wxDC)
}; };
#endif // __GTKDCH__ #endif // __GTKDCH__

View File

@@ -31,8 +31,6 @@ class wxClientDC;
class wxWindowDC : public wxDC class wxWindowDC : public wxDC
{ {
DECLARE_DYNAMIC_CLASS(wxWindowDC)
public: public:
wxWindowDC(); wxWindowDC();
wxWindowDC( wxWindow *win ); wxWindowDC( wxWindow *win );
@@ -121,6 +119,9 @@ public:
void ComputeScaleAndOrigin(); void ComputeScaleAndOrigin();
GdkWindow *GetWindow() { return m_window; } GdkWindow *GetWindow() { return m_window; }
private:
DECLARE_DYNAMIC_CLASS(wxWindowDC)
}; };
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -129,11 +130,12 @@ public:
class wxPaintDC : public wxWindowDC class wxPaintDC : public wxWindowDC
{ {
DECLARE_DYNAMIC_CLASS(wxPaintDC)
public: public:
wxPaintDC(); wxPaintDC();
wxPaintDC( wxWindow *win ); wxPaintDC( wxWindow *win );
private:
DECLARE_DYNAMIC_CLASS(wxPaintDC)
}; };
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -142,12 +144,12 @@ public:
class wxClientDC : public wxWindowDC class wxClientDC : public wxWindowDC
{ {
DECLARE_DYNAMIC_CLASS(wxClientDC)
public: public:
wxClientDC(); wxClientDC();
wxClientDC( wxWindow *win ); wxClientDC( wxWindow *win );
private:
DECLARE_DYNAMIC_CLASS(wxClientDC)
}; };
#endif // __GTKDCCLIENTH__ #endif // __GTKDCCLIENTH__

View File

@@ -30,18 +30,18 @@ class wxMemoryDC;
class wxMemoryDC : public wxWindowDC class wxMemoryDC : public wxWindowDC
{ {
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
public: public:
wxMemoryDC(); wxMemoryDC();
wxMemoryDC( wxDC *dc ); // Create compatible DC wxMemoryDC( wxDC *dc ); // Create compatible DC
~wxMemoryDC(); ~wxMemoryDC();
virtual void SelectObject( const wxBitmap& bitmap ); virtual void SelectObject( const wxBitmap& bitmap );
void DoGetSize( int *width, int *height ) const; void DoGetSize( int *width, int *height ) const;
// implementation // implementation
wxBitmap m_selected;
wxBitmap m_selected; private:
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
}; };
#endif #endif

View File

@@ -24,21 +24,22 @@ class wxScreenDC;
class wxScreenDC: public wxPaintDC class wxScreenDC: public wxPaintDC
{ {
DECLARE_DYNAMIC_CLASS(wxScreenDC)
public: public:
wxScreenDC(); wxScreenDC();
~wxScreenDC(); ~wxScreenDC();
static bool StartDrawingOnTop( wxWindow *window ); static bool StartDrawingOnTop( wxWindow *window );
static bool StartDrawingOnTop( wxRect *rect = (wxRect *) NULL ); static bool StartDrawingOnTop( wxRect *rect = (wxRect *) NULL );
static bool EndDrawingOnTop(); static bool EndDrawingOnTop();
// implementation // implementation
static GdkWindow *sm_overlayWindow; static GdkWindow *sm_overlayWindow;
static int sm_overlayWindowX; static int sm_overlayWindowX;
static int sm_overlayWindowY; static int sm_overlayWindowY;
private:
DECLARE_DYNAMIC_CLASS(wxScreenDC)
}; };
#endif #endif

View File

@@ -37,8 +37,6 @@ extern const wxChar *wxDialogNameStr;
class wxDialog: public wxDialogBase class wxDialog: public wxDialogBase
{ {
DECLARE_DYNAMIC_CLASS(wxDialog)
public: public:
wxDialog() { Init(); } wxDialog() { Init(); }
wxDialog( wxWindow *parent, wxWindowID id, wxDialog( wxWindow *parent, wxWindowID id,
@@ -106,6 +104,7 @@ protected:
private: private:
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxDialog)
}; };
#endif // __GTKDIALOGH__ #endif // __GTKDIALOGH__

View File

@@ -26,8 +26,6 @@ extern const wxChar *wxFileSelectorDefaultWildcardStr;
class wxFileDialog: public wxDialog class wxFileDialog: public wxDialog
{ {
DECLARE_DYNAMIC_CLASS(wxFileDialog)
public: public:
wxFileDialog() { } wxFileDialog() { }
@@ -56,7 +54,6 @@ public:
int GetFilterIndex() const { return m_filterIndex ; } int GetFilterIndex() const { return m_filterIndex ; }
protected: protected:
wxString m_message; wxString m_message;
long m_dialogStyle; long m_dialogStyle;
wxWindow * m_parent; wxWindow * m_parent;
@@ -65,6 +62,9 @@ protected:
wxString m_fileName; wxString m_fileName;
wxString m_wildCard; wxString m_wildCard;
int m_filterIndex; int m_filterIndex;
private:
DECLARE_DYNAMIC_CLASS(wxFileDialog)
}; };
#define wxOPEN 1 #define wxOPEN 1

View File

@@ -41,9 +41,7 @@ extern const char* wxGaugeNameStr;
class wxGauge: public wxControl class wxGauge: public wxControl
{ {
DECLARE_DYNAMIC_CLASS(wxGauge) public:
public:
inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; m_useProgressBar = TRUE; } inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; m_useProgressBar = TRUE; }
inline wxGauge( wxWindow *parent, wxWindowID id, int range, inline wxGauge( wxWindow *parent, wxWindowID id, int range,
@@ -73,13 +71,16 @@ class wxGauge: public wxControl
// Are we a Win95/GTK progress bar, or a normal gauge? // Are we a Win95/GTK progress bar, or a normal gauge?
inline bool GetProgressBar() const { return m_useProgressBar; } inline bool GetProgressBar() const { return m_useProgressBar; }
// implementation // implementation
// -------------
void ApplyWidgetStyle(); void ApplyWidgetStyle();
int m_rangeMax;
int m_rangeMax; int m_gaugePos;
int m_gaugePos; bool m_useProgressBar;
bool m_useProgressBar;
private:
DECLARE_DYNAMIC_CLASS(wxGauge)
}; };
#endif #endif

View File

@@ -19,18 +19,18 @@
class wxGDIObject : public wxObject class wxGDIObject : public wxObject
{ {
DECLARE_DYNAMIC_CLASS(wxGDIObject)
public: public:
inline wxGDIObject() { m_visible = FALSE; }; inline wxGDIObject() { m_visible = FALSE; };
inline ~wxGDIObject() {}; inline ~wxGDIObject() {}
virtual bool GetVisible() { return m_visible; } virtual bool GetVisible() { return m_visible; }
virtual void SetVisible( bool visible ) { m_visible = visible; } virtual void SetVisible( bool visible ) { m_visible = visible; }
protected: protected:
bool m_visible; /* can a pointer to this object be safely taken? bool m_visible; /* can a pointer to this object be safely taken?
* - only if created within FindOrCreate... */ * - only if created within FindOrCreate... */
private:
DECLARE_DYNAMIC_CLASS(wxGDIObject)
}; };
#endif #endif

View File

@@ -31,25 +31,26 @@ class wxIcon;
class wxIcon: public wxBitmap class wxIcon: public wxBitmap
{ {
DECLARE_DYNAMIC_CLASS(wxIcon)
public: public:
wxIcon();
wxIcon( const wxIcon& icon);
wxIcon( const char **bits, int width=-1, int height=-1 );
wxIcon(); // For compatibility with wxMSW where desired size is sometimes required to
wxIcon( const wxIcon& icon); // distinguish between multiple icons in a resource.
wxIcon( const char **bits, int width=-1, int height=-1 ); wxIcon( const wxString& filename, int type = wxBITMAP_TYPE_XPM,
int WXUNUSED(desiredWidth)=-1, int WXUNUSED(desiredHeight)=-1 ) :
wxBitmap(filename, type)
{
}
wxIcon( char **bits, int width=-1, int height=-1 );
// For compatibility with wxMSW where desired size is sometimes required to wxIcon& operator = (const wxIcon& icon);
// distinguish between multiple icons in a resource. inline bool operator == (const wxIcon& icon) { return m_refData == icon.m_refData; }
wxIcon( const wxString& filename, int type = wxBITMAP_TYPE_XPM, int WXUNUSED(desiredWidth)=-1, int WXUNUSED(desiredHeight)=-1 ): inline bool operator != (const wxIcon& icon) { return m_refData != icon.m_refData; }
wxBitmap(filename, type)
{ private:
} DECLARE_DYNAMIC_CLASS(wxIcon)
wxIcon( char **bits, int width=-1, int height=-1 );
wxIcon& operator = (const wxIcon& icon);
inline bool operator == (const wxIcon& icon) { return m_refData == icon.m_refData; }
inline bool operator != (const wxIcon& icon) { return m_refData != icon.m_refData; }
}; };

View File

@@ -35,10 +35,7 @@ typedef char wxDash;
class wxPen: public wxGDIObject class wxPen: public wxGDIObject
{ {
DECLARE_DYNAMIC_CLASS(wxPen) public:
public:
wxPen(); 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 );
@@ -68,7 +65,8 @@ class wxPen: public wxGDIObject
void Unshare(); void Unshare();
// no data :-) private:
DECLARE_DYNAMIC_CLASS(wxPen)
}; };
#endif // __GTKPENH__ #endif // __GTKPENH__

View File

@@ -40,10 +40,7 @@ extern const char *wxScrollBarNameStr;
class wxScrollBar: public wxControl class wxScrollBar: public wxControl
{ {
DECLARE_DYNAMIC_CLASS(wxScrollBar) public:
public:
wxScrollBar(void) { m_adjust = (GtkAdjustment *) NULL; m_oldPos = 0.0; }; wxScrollBar(void) { m_adjust = (GtkAdjustment *) NULL; m_oldPos = 0.0; };
inline wxScrollBar( wxWindow *parent, wxWindowID id, inline wxScrollBar( wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
@@ -69,7 +66,8 @@ class wxScrollBar: public wxControl
virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize, virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize,
bool refresh = TRUE ); bool refresh = TRUE );
// Backward compatibility // Backward compatibility
// ----------------------
int GetValue(void) const; int GetValue(void) const;
void SetValue( int viewStart ); void SetValue( int viewStart );
@@ -80,13 +78,17 @@ class wxScrollBar: public wxControl
void SetObjectLength( int objectLength ); void SetObjectLength( int objectLength );
void SetViewLength( int viewLength ); void SetViewLength( int viewLength );
// implementation // implementation
// --------------
bool IsOwnGtkWindow( GdkWindow *window ); bool IsOwnGtkWindow( GdkWindow *window );
void ApplyWidgetStyle(); void ApplyWidgetStyle();
GtkAdjustment *m_adjust; GtkAdjustment *m_adjust;
float m_oldPos; float m_oldPos;
private:
DECLARE_DYNAMIC_CLASS(wxScrollBar)
}; };
#endif #endif

View File

@@ -45,6 +45,10 @@ class WXDLLEXPORT wxMenu;
class WXDLLEXPORT wxMenuItemBase : public wxObject class WXDLLEXPORT wxMenuItemBase : public wxObject
{ {
public: public:
// some compilers need a default constructor here, do not use
wxMenuItemBase()
{ wxFAIL_MSG( wxT("illegal call") ); }
// creation // creation
static wxMenuItem *New(wxMenu *parentMenu = (wxMenu *)NULL, static wxMenuItem *New(wxMenu *parentMenu = (wxMenu *)NULL,
int id = wxID_SEPARATOR, int id = wxID_SEPARATOR,

View File

@@ -131,7 +131,7 @@ void MyThread::WriteText(const wxString& text)
wxMutexGuiEnter(); wxMutexGuiEnter();
msg << wxTime().FormatTime() << ": " << text; msg << text;
m_frame->WriteText(msg); m_frame->WriteText(msg);

View File

@@ -1277,12 +1277,12 @@ wxImage::wxImage( const wxBitmap &bitmap )
#ifdef __WXGTK__ #ifdef __WXGTK__
#include "gtk/gtk.h" #include <gtk/gtk.h>
#include "gdk/gdk.h" #include <gdk/gdk.h>
#include "gdk/gdkx.h" #include <gdk/gdkx.h>
#if (GTK_MINOR_VERSION > 0) #if (GTK_MINOR_VERSION > 0)
#include "gdk/gdkrgb.h" #include <gdk/gdkrgb.h>
#endif #endif
wxBitmap wxImage::ConvertToBitmap() const wxBitmap wxImage::ConvertToBitmap() const

View File

@@ -32,11 +32,11 @@
#include "wx/thread.h" #include "wx/thread.h"
#endif #endif
#include "unistd.h" #include <unistd.h>
#include "glib.h" #include <glib.h>
#include "gdk/gdk.h" #include <gdk/gdk.h>
#include "gtk/gtk.h" #include <gtk/gtk.h>
#include "wx/gtk/win_gtk.h" #include "wx/gtk/win_gtk.h"

View File

@@ -16,9 +16,9 @@
#include "wx/filefn.h" #include "wx/filefn.h"
#include "wx/image.h" #include "wx/image.h"
#include "gdk/gdk.h" #include <gdk/gdk.h>
#include "gdk/gdkprivate.h" #include <gdk/gdkprivate.h>
#include "gdk/gdkx.h" #include <gdk/gdkx.h>
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxMask // wxMask

View File

@@ -15,8 +15,8 @@
#if wxUSE_BMPBUTTON #if wxUSE_BMPBUTTON
#include "gdk/gdk.h" #include <gdk/gdk.h>
#include "gtk/gtk.h" #include <gtk/gtk.h>
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// classes // classes

View File

@@ -13,7 +13,7 @@
#include "wx/brush.h" #include "wx/brush.h"
#include "gdk/gdk.h" #include <gdk/gdk.h>
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxBrush // wxBrush

View File

@@ -13,8 +13,8 @@
#include "wx/button.h" #include "wx/button.h"
#include "gdk/gdk.h" #include <gdk/gdk.h>
#include "gtk/gtk.h" #include <gtk/gtk.h>
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// classes // classes

View File

@@ -16,8 +16,8 @@
#if wxUSE_CHECKBOX #if wxUSE_CHECKBOX
#include "gdk/gdk.h" #include <gdk/gdk.h>
#include "gtk/gtk.h" #include <gtk/gtk.h>
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// idle system // idle system

View File

@@ -32,11 +32,11 @@
#include "wx/thread.h" #include "wx/thread.h"
#endif #endif
#include "unistd.h" #include <unistd.h>
#include "glib.h" #include <glib.h>
#include "gdk/gdk.h" #include <gdk/gdk.h>
#include "gtk/gtk.h" #include <gtk/gtk.h>
#include "wx/gtk/win_gtk.h" #include "wx/gtk/win_gtk.h"

View File

@@ -16,9 +16,9 @@
#include "wx/filefn.h" #include "wx/filefn.h"
#include "wx/image.h" #include "wx/image.h"
#include "gdk/gdk.h" #include <gdk/gdk.h>
#include "gdk/gdkprivate.h" #include <gdk/gdkprivate.h>
#include "gdk/gdkx.h" #include <gdk/gdkx.h>
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxMask // wxMask

View File

@@ -15,8 +15,8 @@
#if wxUSE_BMPBUTTON #if wxUSE_BMPBUTTON
#include "gdk/gdk.h" #include <gdk/gdk.h>
#include "gtk/gtk.h" #include <gtk/gtk.h>
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// classes // classes

View File

@@ -13,7 +13,7 @@
#include "wx/brush.h" #include "wx/brush.h"
#include "gdk/gdk.h" #include <gdk/gdk.h>
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxBrush // wxBrush

View File

@@ -13,8 +13,8 @@
#include "wx/button.h" #include "wx/button.h"
#include "gdk/gdk.h" #include <gdk/gdk.h>
#include "gtk/gtk.h" #include <gtk/gtk.h>
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// classes // classes

View File

@@ -16,8 +16,8 @@
#if wxUSE_CHECKBOX #if wxUSE_CHECKBOX
#include "gdk/gdk.h" #include <gdk/gdk.h>
#include "gtk/gtk.h" #include <gtk/gtk.h>
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// idle system // idle system