From: Robert Roebling Date: Mon, 22 Nov 1999 19:44:25 +0000 (+0000) Subject: Headers moved a bit. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/20e05ffbd3eff02a4c643e412d4f600cdea26952?ds=sidebyside Headers moved a bit. Minor docs updates. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/docs/latex/wx/tconfig.tex b/docs/latex/wx/tconfig.tex index 6baf8c59a5..0002c0c33d 100644 --- a/docs/latex/wx/tconfig.tex +++ b/docs/latex/wx/tconfig.tex @@ -1,4 +1,4 @@ -\section{Config classes overview}\label{wxconfigoverview} +\section{wxConfig classes overview}\label{wxconfigoverview} Classes: \helpref{wxConfig}{wxconfigbase} diff --git a/docs/latex/wx/topics.tex b/docs/latex/wx/topics.tex index 78ea66761f..cb3888132e 100644 --- a/docs/latex/wx/topics.tex +++ b/docs/latex/wx/topics.tex @@ -8,13 +8,7 @@ This chapter contains a selection of topic overviews, first things first: \input tguide.tex \input hworld.tex \input tsamples.tex - -Every application need one wxApp class, so we start here: - \input tapp.tex - -Not everything in wxWindows is about GUI programming: - \input truntime.tex \input tstring.tex \input tunicode.tex @@ -27,9 +21,6 @@ Not everything in wxWindows is about GUI programming: \input tconfig.tex \input texpr.tex \input fs.tex - -General overviews concerning windows and events: - \input tevent.tex \input tstyles.tex \input tdelwin.tex @@ -38,16 +29,10 @@ General overviews concerning windows and events: \input tconstr.tex \input tresourc.tex \input tscroll.tex - -Drawing and device context specific overviews: - \input tbitmap.tex \input tdc.tex \input tfont.tex \input tfontenc.tex - -Special controls: - \input tsplittr.tex \input ttreectl.tex \input tlistctl.tex @@ -58,9 +43,6 @@ Special controls: \input ttoolbar.tex \input tgrid.tex \input ttips.tex - -Advanced topic overviews: - \input tprint.tex \input tthreads.tex \input tdnd.tex diff --git a/docs/latex/wx/tstream.tex b/docs/latex/wx/tstream.tex index 9c407d2d04..9bb13376ab 100644 --- a/docs/latex/wx/tstream.tex +++ b/docs/latex/wx/tstream.tex @@ -1,4 +1,4 @@ -\section{Streams in wxWindows overview}\label{wxstreamoverview} +\section{wxStreams overview}\label{wxstreamoverview} Classes: \helpref{wxStreamBase}{wxstreambase}, \helpref{wxStreamBuffer}{wxstreambuffer}, \helpref{wxInputStream}{wxinputstream}, @@ -62,13 +62,13 @@ code: // Ok, read some bytes ... nb_datas is expressed in bytes. in_stream.Read(data, nb_datas); - if (in_stream.LastError() != wxStream_NOERROR) { + if (in_stream.LastError() != wxSTREAM_NOERROR) { // Oh oh, something bad happens. // For a complete list, look into the documentation at wxStreamBase. } // 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. } diff --git a/docs/latex/wx/tthreads.tex b/docs/latex/wx/tthreads.tex index 531a04375b..c1ef2fdfff 100644 --- a/docs/latex/wx/tthreads.tex +++ b/docs/latex/wx/tthreads.tex @@ -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 itself and not by the other threads). -Final note: in the current release of wxWindows, there are no specific -facilities for communicating between the threads. However, the usual -\helpref{ProcessEvent()}{wxevthandlerprocessevent} function may be used for -thread communication too - but you should provide your own synchronisation -mechanism if you use it (e.g. just use a critical section before sending a -message) because there is no built-in synchronisation. +For communication between threads, use +\helpref{wxEvtHandler::AddPendingEvent}{wxevthandleraddpendingprocessevent} +or its short version \helpref{wxPostEvent}{wxpostevent}. These functions +have thread safe implementation so that they can be used as they are for +sending event from one thread to another. + diff --git a/include/wx/gtk/accel.h b/include/wx/gtk/accel.h index a60eb15e98..51efa101f7 100644 --- a/include/wx/gtk/accel.h +++ b/include/wx/gtk/accel.h @@ -96,8 +96,9 @@ public: bool Ok() const; -// implementation - + // implementation + // -------------- + int GetCommand( wxKeyEvent &event ); private: diff --git a/include/wx/gtk/bitmap.h b/include/wx/gtk/bitmap.h index 37c42b14c5..2e8a50eb67 100644 --- a/include/wx/gtk/bitmap.h +++ b/include/wx/gtk/bitmap.h @@ -88,6 +88,7 @@ public: { return GetPalette(); }; // implementation + // -------------- void SetHeight( int height ); void SetWidth( int width ); @@ -96,8 +97,6 @@ public: GdkPixmap *GetPixmap() const; GdkBitmap *GetBitmap() const; - - // no data :-) private: DECLARE_DYNAMIC_CLASS(wxBitmap) diff --git a/include/wx/gtk/bmpbuttn.h b/include/wx/gtk/bmpbuttn.h index dfcf70ce73..3f1c684d63 100644 --- a/include/wx/gtk/bmpbuttn.h +++ b/include/wx/gtk/bmpbuttn.h @@ -76,8 +76,9 @@ public: virtual bool Enable(bool enable); -// implementation - + // implementation + // -------------- + void HasFocus(); void NotFocus(); void StartSelect(); diff --git a/include/wx/gtk/button.h b/include/wx/gtk/button.h index 051c16637c..538720c63c 100644 --- a/include/wx/gtk/button.h +++ b/include/wx/gtk/button.h @@ -59,7 +59,8 @@ public: static wxSize GetDefaultSize(); - // implementation + // implementation + // -------------- void ApplyWidgetStyle(); diff --git a/include/wx/gtk/checkbox.h b/include/wx/gtk/checkbox.h index 40afabfd83..562f783397 100644 --- a/include/wx/gtk/checkbox.h +++ b/include/wx/gtk/checkbox.h @@ -66,6 +66,8 @@ public: bool Enable( bool enable ); // implementation + // -------------- + void ApplyWidgetStyle(); bool IsOwnGtkWindow( GdkWindow *window ); void OnInternalIdle(); diff --git a/include/wx/gtk/choice.h b/include/wx/gtk/choice.h index 448c81b988..279e80d7fb 100644 --- a/include/wx/gtk/choice.h +++ b/include/wx/gtk/choice.h @@ -55,15 +55,10 @@ public: wxString GetString( int n ) const; void SetString( int n, const wxString& string ); - // implementation +protected: wxList m_clientList; // contains the client data for the items - void DisableEvents(); - void EnableEvents(); - void AppendCommon( const wxString &item ); void ApplyWidgetStyle(); - -protected: virtual int DoAppend(const wxString& item); virtual void DoSetItemClientData( int n, void* clientData ); @@ -75,7 +70,7 @@ protected: private: // 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 // allocate it if it's needed (hence using pointer) diff --git a/include/wx/gtk/cursor.h b/include/wx/gtk/cursor.h index d274b6be95..fc353d4683 100644 --- a/include/wx/gtk/cursor.h +++ b/include/wx/gtk/cursor.h @@ -25,9 +25,7 @@ class wxCursor: public wxObject { - DECLARE_DYNAMIC_CLASS(wxCursor) - - public: +public: wxCursor(); wxCursor( int cursorId ); @@ -38,9 +36,12 @@ class wxCursor: public wxObject bool operator != ( const wxCursor& cursor ) const; bool Ok() const; + // implementation + GdkCursor *GetCursor() const; - // no data :-) +private: + DECLARE_DYNAMIC_CLASS(wxCursor) }; #endif // __GTKCURSORH__ diff --git a/include/wx/gtk/dc.h b/include/wx/gtk/dc.h index c44beb9c53..2ce4f8de26 100644 --- a/include/wx/gtk/dc.h +++ b/include/wx/gtk/dc.h @@ -40,8 +40,6 @@ class wxDC; class wxDC : public wxDCBase { - DECLARE_ABSTRACT_CLASS(wxDC) - public: wxDC(); ~wxDC() { } @@ -151,6 +149,9 @@ public: m_needComputeScaleY; // not yet used float m_scaleFactor; // wxPSDC wants to have this. Will disappear. + +private: + DECLARE_ABSTRACT_CLASS(wxDC) }; #endif // __GTKDCH__ diff --git a/include/wx/gtk/dcclient.h b/include/wx/gtk/dcclient.h index 19c9e2e094..a28585ffbd 100644 --- a/include/wx/gtk/dcclient.h +++ b/include/wx/gtk/dcclient.h @@ -31,8 +31,6 @@ class wxClientDC; class wxWindowDC : public wxDC { - DECLARE_DYNAMIC_CLASS(wxWindowDC) - public: wxWindowDC(); wxWindowDC( wxWindow *win ); @@ -121,6 +119,9 @@ public: void ComputeScaleAndOrigin(); GdkWindow *GetWindow() { return m_window; } + +private: + DECLARE_DYNAMIC_CLASS(wxWindowDC) }; //----------------------------------------------------------------------------- @@ -129,11 +130,12 @@ public: class wxPaintDC : public wxWindowDC { - DECLARE_DYNAMIC_CLASS(wxPaintDC) - public: wxPaintDC(); wxPaintDC( wxWindow *win ); + +private: + DECLARE_DYNAMIC_CLASS(wxPaintDC) }; //----------------------------------------------------------------------------- @@ -142,12 +144,12 @@ public: class wxClientDC : public wxWindowDC { - DECLARE_DYNAMIC_CLASS(wxClientDC) - public: wxClientDC(); wxClientDC( wxWindow *win ); + +private: + DECLARE_DYNAMIC_CLASS(wxClientDC) }; - #endif // __GTKDCCLIENTH__ diff --git a/include/wx/gtk/dcmemory.h b/include/wx/gtk/dcmemory.h index 2100ee7f75..213b7e4eed 100644 --- a/include/wx/gtk/dcmemory.h +++ b/include/wx/gtk/dcmemory.h @@ -30,18 +30,18 @@ class wxMemoryDC; class wxMemoryDC : public wxWindowDC { - DECLARE_DYNAMIC_CLASS(wxMemoryDC) - public: - wxMemoryDC(); - wxMemoryDC( wxDC *dc ); // Create compatible DC - ~wxMemoryDC(); - virtual void SelectObject( const wxBitmap& bitmap ); - void DoGetSize( int *width, int *height ) const; + wxMemoryDC(); + wxMemoryDC( wxDC *dc ); // Create compatible DC + ~wxMemoryDC(); + virtual void SelectObject( const wxBitmap& bitmap ); + void DoGetSize( int *width, int *height ) const; - // implementation + // implementation + wxBitmap m_selected; - wxBitmap m_selected; +private: + DECLARE_DYNAMIC_CLASS(wxMemoryDC) }; #endif diff --git a/include/wx/gtk/dcscreen.h b/include/wx/gtk/dcscreen.h index b53d12c8a8..64f1dfc6ac 100644 --- a/include/wx/gtk/dcscreen.h +++ b/include/wx/gtk/dcscreen.h @@ -24,21 +24,22 @@ class wxScreenDC; class wxScreenDC: public wxPaintDC { - DECLARE_DYNAMIC_CLASS(wxScreenDC) - public: - wxScreenDC(); - ~wxScreenDC(); - - static bool StartDrawingOnTop( wxWindow *window ); - static bool StartDrawingOnTop( wxRect *rect = (wxRect *) NULL ); - static bool EndDrawingOnTop(); - - // implementation - - static GdkWindow *sm_overlayWindow; - static int sm_overlayWindowX; - static int sm_overlayWindowY; + wxScreenDC(); + ~wxScreenDC(); + + static bool StartDrawingOnTop( wxWindow *window ); + static bool StartDrawingOnTop( wxRect *rect = (wxRect *) NULL ); + static bool EndDrawingOnTop(); + + // implementation + + static GdkWindow *sm_overlayWindow; + static int sm_overlayWindowX; + static int sm_overlayWindowY; + +private: + DECLARE_DYNAMIC_CLASS(wxScreenDC) }; #endif diff --git a/include/wx/gtk/dialog.h b/include/wx/gtk/dialog.h index 5e66c12306..a90b7305f0 100644 --- a/include/wx/gtk/dialog.h +++ b/include/wx/gtk/dialog.h @@ -37,8 +37,6 @@ extern const wxChar *wxDialogNameStr; class wxDialog: public wxDialogBase { - DECLARE_DYNAMIC_CLASS(wxDialog) - public: wxDialog() { Init(); } wxDialog( wxWindow *parent, wxWindowID id, @@ -106,6 +104,7 @@ protected: private: DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxDialog) }; #endif // __GTKDIALOGH__ diff --git a/include/wx/gtk/filedlg.h b/include/wx/gtk/filedlg.h index 64485e5e4e..200d5c3dde 100644 --- a/include/wx/gtk/filedlg.h +++ b/include/wx/gtk/filedlg.h @@ -26,8 +26,6 @@ extern const wxChar *wxFileSelectorDefaultWildcardStr; class wxFileDialog: public wxDialog { -DECLARE_DYNAMIC_CLASS(wxFileDialog) - public: wxFileDialog() { } @@ -56,7 +54,6 @@ public: int GetFilterIndex() const { return m_filterIndex ; } protected: - wxString m_message; long m_dialogStyle; wxWindow * m_parent; @@ -65,6 +62,9 @@ protected: wxString m_fileName; wxString m_wildCard; int m_filterIndex; + +private: + DECLARE_DYNAMIC_CLASS(wxFileDialog) }; #define wxOPEN 1 diff --git a/include/wx/gtk/gauge.h b/include/wx/gtk/gauge.h index 479d1d510d..ee018c01a1 100644 --- a/include/wx/gtk/gauge.h +++ b/include/wx/gtk/gauge.h @@ -41,9 +41,7 @@ extern const char* wxGaugeNameStr; class wxGauge: public wxControl { - DECLARE_DYNAMIC_CLASS(wxGauge) - - public: +public: inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; m_useProgressBar = TRUE; } 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? inline bool GetProgressBar() const { return m_useProgressBar; } - // implementation + // implementation + // ------------- void ApplyWidgetStyle(); - - int m_rangeMax; - int m_gaugePos; - bool m_useProgressBar; + int m_rangeMax; + int m_gaugePos; + bool m_useProgressBar; + +private: + DECLARE_DYNAMIC_CLASS(wxGauge) }; #endif diff --git a/include/wx/gtk/gdiobj.h b/include/wx/gtk/gdiobj.h index ac8e8e9447..23e4077cc7 100644 --- a/include/wx/gtk/gdiobj.h +++ b/include/wx/gtk/gdiobj.h @@ -19,18 +19,18 @@ class wxGDIObject : public wxObject { -DECLARE_DYNAMIC_CLASS(wxGDIObject) - public: - inline wxGDIObject() { m_visible = FALSE; }; - inline ~wxGDIObject() {}; + inline wxGDIObject() { m_visible = FALSE; }; + inline ~wxGDIObject() {} - virtual bool GetVisible() { return m_visible; } - virtual void SetVisible( bool visible ) { m_visible = visible; } + virtual bool GetVisible() { return m_visible; } + virtual void SetVisible( bool visible ) { m_visible = visible; } protected: - bool m_visible; /* can a pointer to this object be safely taken? - * - only if created within FindOrCreate... */ + bool m_visible; /* can a pointer to this object be safely taken? + * - only if created within FindOrCreate... */ +private: + DECLARE_DYNAMIC_CLASS(wxGDIObject) }; #endif diff --git a/include/wx/gtk/icon.h b/include/wx/gtk/icon.h index e306018665..9455d6c8ab 100644 --- a/include/wx/gtk/icon.h +++ b/include/wx/gtk/icon.h @@ -31,25 +31,26 @@ class wxIcon; class wxIcon: public wxBitmap { - DECLARE_DYNAMIC_CLASS(wxIcon) - public: - - wxIcon(); - wxIcon( const wxIcon& icon); - wxIcon( const char **bits, int width=-1, int height=-1 ); - - // For compatibility with wxMSW where desired size is sometimes required to - // distinguish between multiple icons in a resource. - 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 ); - - 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; } + wxIcon(); + wxIcon( const wxIcon& icon); + wxIcon( const char **bits, int width=-1, int height=-1 ); + + // For compatibility with wxMSW where desired size is sometimes required to + // distinguish between multiple icons in a resource. + 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 ); + + 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; } + +private: + DECLARE_DYNAMIC_CLASS(wxIcon) }; diff --git a/include/wx/gtk/pen.h b/include/wx/gtk/pen.h index cbe0cd1ae2..508a4e5ea0 100644 --- a/include/wx/gtk/pen.h +++ b/include/wx/gtk/pen.h @@ -35,10 +35,7 @@ typedef char wxDash; class wxPen: public wxGDIObject { - DECLARE_DYNAMIC_CLASS(wxPen) - - public: - +public: wxPen(); wxPen( const wxColour &colour, int width, int style ); wxPen( const wxPen& pen ); @@ -68,7 +65,8 @@ class wxPen: public wxGDIObject void Unshare(); - // no data :-) +private: + DECLARE_DYNAMIC_CLASS(wxPen) }; #endif // __GTKPENH__ diff --git a/include/wx/gtk/scrolbar.h b/include/wx/gtk/scrolbar.h index 75344cb221..ddccb240da 100644 --- a/include/wx/gtk/scrolbar.h +++ b/include/wx/gtk/scrolbar.h @@ -40,10 +40,7 @@ extern const char *wxScrollBarNameStr; class wxScrollBar: public wxControl { - DECLARE_DYNAMIC_CLASS(wxScrollBar) - - public: - +public: wxScrollBar(void) { m_adjust = (GtkAdjustment *) NULL; m_oldPos = 0.0; }; inline wxScrollBar( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, @@ -69,7 +66,8 @@ class wxScrollBar: public wxControl virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize, bool refresh = TRUE ); - // Backward compatibility + // Backward compatibility + // ---------------------- int GetValue(void) const; void SetValue( int viewStart ); @@ -80,13 +78,17 @@ class wxScrollBar: public wxControl void SetObjectLength( int objectLength ); void SetViewLength( int viewLength ); - // implementation + // implementation + // -------------- bool IsOwnGtkWindow( GdkWindow *window ); void ApplyWidgetStyle(); GtkAdjustment *m_adjust; float m_oldPos; + +private: + DECLARE_DYNAMIC_CLASS(wxScrollBar) }; #endif diff --git a/include/wx/gtk1/accel.h b/include/wx/gtk1/accel.h index a60eb15e98..51efa101f7 100644 --- a/include/wx/gtk1/accel.h +++ b/include/wx/gtk1/accel.h @@ -96,8 +96,9 @@ public: bool Ok() const; -// implementation - + // implementation + // -------------- + int GetCommand( wxKeyEvent &event ); private: diff --git a/include/wx/gtk1/bitmap.h b/include/wx/gtk1/bitmap.h index 37c42b14c5..2e8a50eb67 100644 --- a/include/wx/gtk1/bitmap.h +++ b/include/wx/gtk1/bitmap.h @@ -88,6 +88,7 @@ public: { return GetPalette(); }; // implementation + // -------------- void SetHeight( int height ); void SetWidth( int width ); @@ -96,8 +97,6 @@ public: GdkPixmap *GetPixmap() const; GdkBitmap *GetBitmap() const; - - // no data :-) private: DECLARE_DYNAMIC_CLASS(wxBitmap) diff --git a/include/wx/gtk1/bmpbuttn.h b/include/wx/gtk1/bmpbuttn.h index dfcf70ce73..3f1c684d63 100644 --- a/include/wx/gtk1/bmpbuttn.h +++ b/include/wx/gtk1/bmpbuttn.h @@ -76,8 +76,9 @@ public: virtual bool Enable(bool enable); -// implementation - + // implementation + // -------------- + void HasFocus(); void NotFocus(); void StartSelect(); diff --git a/include/wx/gtk1/button.h b/include/wx/gtk1/button.h index 051c16637c..538720c63c 100644 --- a/include/wx/gtk1/button.h +++ b/include/wx/gtk1/button.h @@ -59,7 +59,8 @@ public: static wxSize GetDefaultSize(); - // implementation + // implementation + // -------------- void ApplyWidgetStyle(); diff --git a/include/wx/gtk1/checkbox.h b/include/wx/gtk1/checkbox.h index 40afabfd83..562f783397 100644 --- a/include/wx/gtk1/checkbox.h +++ b/include/wx/gtk1/checkbox.h @@ -66,6 +66,8 @@ public: bool Enable( bool enable ); // implementation + // -------------- + void ApplyWidgetStyle(); bool IsOwnGtkWindow( GdkWindow *window ); void OnInternalIdle(); diff --git a/include/wx/gtk1/choice.h b/include/wx/gtk1/choice.h index 448c81b988..279e80d7fb 100644 --- a/include/wx/gtk1/choice.h +++ b/include/wx/gtk1/choice.h @@ -55,15 +55,10 @@ public: wxString GetString( int n ) const; void SetString( int n, const wxString& string ); - // implementation +protected: wxList m_clientList; // contains the client data for the items - void DisableEvents(); - void EnableEvents(); - void AppendCommon( const wxString &item ); void ApplyWidgetStyle(); - -protected: virtual int DoAppend(const wxString& item); virtual void DoSetItemClientData( int n, void* clientData ); @@ -75,7 +70,7 @@ protected: private: // 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 // allocate it if it's needed (hence using pointer) diff --git a/include/wx/gtk1/cursor.h b/include/wx/gtk1/cursor.h index d274b6be95..fc353d4683 100644 --- a/include/wx/gtk1/cursor.h +++ b/include/wx/gtk1/cursor.h @@ -25,9 +25,7 @@ class wxCursor: public wxObject { - DECLARE_DYNAMIC_CLASS(wxCursor) - - public: +public: wxCursor(); wxCursor( int cursorId ); @@ -38,9 +36,12 @@ class wxCursor: public wxObject bool operator != ( const wxCursor& cursor ) const; bool Ok() const; + // implementation + GdkCursor *GetCursor() const; - // no data :-) +private: + DECLARE_DYNAMIC_CLASS(wxCursor) }; #endif // __GTKCURSORH__ diff --git a/include/wx/gtk1/dc.h b/include/wx/gtk1/dc.h index c44beb9c53..2ce4f8de26 100644 --- a/include/wx/gtk1/dc.h +++ b/include/wx/gtk1/dc.h @@ -40,8 +40,6 @@ class wxDC; class wxDC : public wxDCBase { - DECLARE_ABSTRACT_CLASS(wxDC) - public: wxDC(); ~wxDC() { } @@ -151,6 +149,9 @@ public: m_needComputeScaleY; // not yet used float m_scaleFactor; // wxPSDC wants to have this. Will disappear. + +private: + DECLARE_ABSTRACT_CLASS(wxDC) }; #endif // __GTKDCH__ diff --git a/include/wx/gtk1/dcclient.h b/include/wx/gtk1/dcclient.h index 19c9e2e094..a28585ffbd 100644 --- a/include/wx/gtk1/dcclient.h +++ b/include/wx/gtk1/dcclient.h @@ -31,8 +31,6 @@ class wxClientDC; class wxWindowDC : public wxDC { - DECLARE_DYNAMIC_CLASS(wxWindowDC) - public: wxWindowDC(); wxWindowDC( wxWindow *win ); @@ -121,6 +119,9 @@ public: void ComputeScaleAndOrigin(); GdkWindow *GetWindow() { return m_window; } + +private: + DECLARE_DYNAMIC_CLASS(wxWindowDC) }; //----------------------------------------------------------------------------- @@ -129,11 +130,12 @@ public: class wxPaintDC : public wxWindowDC { - DECLARE_DYNAMIC_CLASS(wxPaintDC) - public: wxPaintDC(); wxPaintDC( wxWindow *win ); + +private: + DECLARE_DYNAMIC_CLASS(wxPaintDC) }; //----------------------------------------------------------------------------- @@ -142,12 +144,12 @@ public: class wxClientDC : public wxWindowDC { - DECLARE_DYNAMIC_CLASS(wxClientDC) - public: wxClientDC(); wxClientDC( wxWindow *win ); + +private: + DECLARE_DYNAMIC_CLASS(wxClientDC) }; - #endif // __GTKDCCLIENTH__ diff --git a/include/wx/gtk1/dcmemory.h b/include/wx/gtk1/dcmemory.h index 2100ee7f75..213b7e4eed 100644 --- a/include/wx/gtk1/dcmemory.h +++ b/include/wx/gtk1/dcmemory.h @@ -30,18 +30,18 @@ class wxMemoryDC; class wxMemoryDC : public wxWindowDC { - DECLARE_DYNAMIC_CLASS(wxMemoryDC) - public: - wxMemoryDC(); - wxMemoryDC( wxDC *dc ); // Create compatible DC - ~wxMemoryDC(); - virtual void SelectObject( const wxBitmap& bitmap ); - void DoGetSize( int *width, int *height ) const; + wxMemoryDC(); + wxMemoryDC( wxDC *dc ); // Create compatible DC + ~wxMemoryDC(); + virtual void SelectObject( const wxBitmap& bitmap ); + void DoGetSize( int *width, int *height ) const; - // implementation + // implementation + wxBitmap m_selected; - wxBitmap m_selected; +private: + DECLARE_DYNAMIC_CLASS(wxMemoryDC) }; #endif diff --git a/include/wx/gtk1/dcscreen.h b/include/wx/gtk1/dcscreen.h index b53d12c8a8..64f1dfc6ac 100644 --- a/include/wx/gtk1/dcscreen.h +++ b/include/wx/gtk1/dcscreen.h @@ -24,21 +24,22 @@ class wxScreenDC; class wxScreenDC: public wxPaintDC { - DECLARE_DYNAMIC_CLASS(wxScreenDC) - public: - wxScreenDC(); - ~wxScreenDC(); - - static bool StartDrawingOnTop( wxWindow *window ); - static bool StartDrawingOnTop( wxRect *rect = (wxRect *) NULL ); - static bool EndDrawingOnTop(); - - // implementation - - static GdkWindow *sm_overlayWindow; - static int sm_overlayWindowX; - static int sm_overlayWindowY; + wxScreenDC(); + ~wxScreenDC(); + + static bool StartDrawingOnTop( wxWindow *window ); + static bool StartDrawingOnTop( wxRect *rect = (wxRect *) NULL ); + static bool EndDrawingOnTop(); + + // implementation + + static GdkWindow *sm_overlayWindow; + static int sm_overlayWindowX; + static int sm_overlayWindowY; + +private: + DECLARE_DYNAMIC_CLASS(wxScreenDC) }; #endif diff --git a/include/wx/gtk1/dialog.h b/include/wx/gtk1/dialog.h index 5e66c12306..a90b7305f0 100644 --- a/include/wx/gtk1/dialog.h +++ b/include/wx/gtk1/dialog.h @@ -37,8 +37,6 @@ extern const wxChar *wxDialogNameStr; class wxDialog: public wxDialogBase { - DECLARE_DYNAMIC_CLASS(wxDialog) - public: wxDialog() { Init(); } wxDialog( wxWindow *parent, wxWindowID id, @@ -106,6 +104,7 @@ protected: private: DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxDialog) }; #endif // __GTKDIALOGH__ diff --git a/include/wx/gtk1/filedlg.h b/include/wx/gtk1/filedlg.h index 64485e5e4e..200d5c3dde 100644 --- a/include/wx/gtk1/filedlg.h +++ b/include/wx/gtk1/filedlg.h @@ -26,8 +26,6 @@ extern const wxChar *wxFileSelectorDefaultWildcardStr; class wxFileDialog: public wxDialog { -DECLARE_DYNAMIC_CLASS(wxFileDialog) - public: wxFileDialog() { } @@ -56,7 +54,6 @@ public: int GetFilterIndex() const { return m_filterIndex ; } protected: - wxString m_message; long m_dialogStyle; wxWindow * m_parent; @@ -65,6 +62,9 @@ protected: wxString m_fileName; wxString m_wildCard; int m_filterIndex; + +private: + DECLARE_DYNAMIC_CLASS(wxFileDialog) }; #define wxOPEN 1 diff --git a/include/wx/gtk1/gauge.h b/include/wx/gtk1/gauge.h index 479d1d510d..ee018c01a1 100644 --- a/include/wx/gtk1/gauge.h +++ b/include/wx/gtk1/gauge.h @@ -41,9 +41,7 @@ extern const char* wxGaugeNameStr; class wxGauge: public wxControl { - DECLARE_DYNAMIC_CLASS(wxGauge) - - public: +public: inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; m_useProgressBar = TRUE; } 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? inline bool GetProgressBar() const { return m_useProgressBar; } - // implementation + // implementation + // ------------- void ApplyWidgetStyle(); - - int m_rangeMax; - int m_gaugePos; - bool m_useProgressBar; + int m_rangeMax; + int m_gaugePos; + bool m_useProgressBar; + +private: + DECLARE_DYNAMIC_CLASS(wxGauge) }; #endif diff --git a/include/wx/gtk1/gdiobj.h b/include/wx/gtk1/gdiobj.h index ac8e8e9447..23e4077cc7 100644 --- a/include/wx/gtk1/gdiobj.h +++ b/include/wx/gtk1/gdiobj.h @@ -19,18 +19,18 @@ class wxGDIObject : public wxObject { -DECLARE_DYNAMIC_CLASS(wxGDIObject) - public: - inline wxGDIObject() { m_visible = FALSE; }; - inline ~wxGDIObject() {}; + inline wxGDIObject() { m_visible = FALSE; }; + inline ~wxGDIObject() {} - virtual bool GetVisible() { return m_visible; } - virtual void SetVisible( bool visible ) { m_visible = visible; } + virtual bool GetVisible() { return m_visible; } + virtual void SetVisible( bool visible ) { m_visible = visible; } protected: - bool m_visible; /* can a pointer to this object be safely taken? - * - only if created within FindOrCreate... */ + bool m_visible; /* can a pointer to this object be safely taken? + * - only if created within FindOrCreate... */ +private: + DECLARE_DYNAMIC_CLASS(wxGDIObject) }; #endif diff --git a/include/wx/gtk1/icon.h b/include/wx/gtk1/icon.h index e306018665..9455d6c8ab 100644 --- a/include/wx/gtk1/icon.h +++ b/include/wx/gtk1/icon.h @@ -31,25 +31,26 @@ class wxIcon; class wxIcon: public wxBitmap { - DECLARE_DYNAMIC_CLASS(wxIcon) - public: - - wxIcon(); - wxIcon( const wxIcon& icon); - wxIcon( const char **bits, int width=-1, int height=-1 ); - - // For compatibility with wxMSW where desired size is sometimes required to - // distinguish between multiple icons in a resource. - 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 ); - - 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; } + wxIcon(); + wxIcon( const wxIcon& icon); + wxIcon( const char **bits, int width=-1, int height=-1 ); + + // For compatibility with wxMSW where desired size is sometimes required to + // distinguish between multiple icons in a resource. + 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 ); + + 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; } + +private: + DECLARE_DYNAMIC_CLASS(wxIcon) }; diff --git a/include/wx/gtk1/pen.h b/include/wx/gtk1/pen.h index cbe0cd1ae2..508a4e5ea0 100644 --- a/include/wx/gtk1/pen.h +++ b/include/wx/gtk1/pen.h @@ -35,10 +35,7 @@ typedef char wxDash; class wxPen: public wxGDIObject { - DECLARE_DYNAMIC_CLASS(wxPen) - - public: - +public: wxPen(); wxPen( const wxColour &colour, int width, int style ); wxPen( const wxPen& pen ); @@ -68,7 +65,8 @@ class wxPen: public wxGDIObject void Unshare(); - // no data :-) +private: + DECLARE_DYNAMIC_CLASS(wxPen) }; #endif // __GTKPENH__ diff --git a/include/wx/gtk1/scrolbar.h b/include/wx/gtk1/scrolbar.h index 75344cb221..ddccb240da 100644 --- a/include/wx/gtk1/scrolbar.h +++ b/include/wx/gtk1/scrolbar.h @@ -40,10 +40,7 @@ extern const char *wxScrollBarNameStr; class wxScrollBar: public wxControl { - DECLARE_DYNAMIC_CLASS(wxScrollBar) - - public: - +public: wxScrollBar(void) { m_adjust = (GtkAdjustment *) NULL; m_oldPos = 0.0; }; inline wxScrollBar( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, @@ -69,7 +66,8 @@ class wxScrollBar: public wxControl virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize, bool refresh = TRUE ); - // Backward compatibility + // Backward compatibility + // ---------------------- int GetValue(void) const; void SetValue( int viewStart ); @@ -80,13 +78,17 @@ class wxScrollBar: public wxControl void SetObjectLength( int objectLength ); void SetViewLength( int viewLength ); - // implementation + // implementation + // -------------- bool IsOwnGtkWindow( GdkWindow *window ); void ApplyWidgetStyle(); GtkAdjustment *m_adjust; float m_oldPos; + +private: + DECLARE_DYNAMIC_CLASS(wxScrollBar) }; #endif diff --git a/include/wx/menuitem.h b/include/wx/menuitem.h index 7860cd1097..22bfd7c36b 100644 --- a/include/wx/menuitem.h +++ b/include/wx/menuitem.h @@ -45,6 +45,10 @@ class WXDLLEXPORT wxMenu; class WXDLLEXPORT wxMenuItemBase : public wxObject { public: + // some compilers need a default constructor here, do not use + wxMenuItemBase() + { wxFAIL_MSG( wxT("illegal call") ); } + // creation static wxMenuItem *New(wxMenu *parentMenu = (wxMenu *)NULL, int id = wxID_SEPARATOR, diff --git a/samples/thread/test.cpp b/samples/thread/test.cpp index 08aa48a00a..1d8d3423be 100644 --- a/samples/thread/test.cpp +++ b/samples/thread/test.cpp @@ -131,7 +131,7 @@ void MyThread::WriteText(const wxString& text) wxMutexGuiEnter(); - msg << wxTime().FormatTime() << ": " << text; + msg << text; m_frame->WriteText(msg); diff --git a/src/common/image.cpp b/src/common/image.cpp index f4102cea5b..be1fcda4f5 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -1277,12 +1277,12 @@ wxImage::wxImage( const wxBitmap &bitmap ) #ifdef __WXGTK__ -#include "gtk/gtk.h" -#include "gdk/gdk.h" -#include "gdk/gdkx.h" +#include +#include +#include #if (GTK_MINOR_VERSION > 0) -#include "gdk/gdkrgb.h" +#include #endif wxBitmap wxImage::ConvertToBitmap() const diff --git a/src/gtk/app.cpp b/src/gtk/app.cpp index 5d08196d7b..26a9ea36e6 100644 --- a/src/gtk/app.cpp +++ b/src/gtk/app.cpp @@ -32,11 +32,11 @@ #include "wx/thread.h" #endif -#include "unistd.h" +#include -#include "glib.h" -#include "gdk/gdk.h" -#include "gtk/gtk.h" +#include +#include +#include #include "wx/gtk/win_gtk.h" diff --git a/src/gtk/bitmap.cpp b/src/gtk/bitmap.cpp index 33b1a1f286..975f4ab6ed 100644 --- a/src/gtk/bitmap.cpp +++ b/src/gtk/bitmap.cpp @@ -16,9 +16,9 @@ #include "wx/filefn.h" #include "wx/image.h" -#include "gdk/gdk.h" -#include "gdk/gdkprivate.h" -#include "gdk/gdkx.h" +#include +#include +#include //----------------------------------------------------------------------------- // wxMask diff --git a/src/gtk/bmpbuttn.cpp b/src/gtk/bmpbuttn.cpp index 81f655e070..dc359f07c7 100644 --- a/src/gtk/bmpbuttn.cpp +++ b/src/gtk/bmpbuttn.cpp @@ -15,8 +15,8 @@ #if wxUSE_BMPBUTTON -#include "gdk/gdk.h" -#include "gtk/gtk.h" +#include +#include //----------------------------------------------------------------------------- // classes diff --git a/src/gtk/brush.cpp b/src/gtk/brush.cpp index b86a7615bc..01f3665a7a 100644 --- a/src/gtk/brush.cpp +++ b/src/gtk/brush.cpp @@ -13,7 +13,7 @@ #include "wx/brush.h" -#include "gdk/gdk.h" +#include //----------------------------------------------------------------------------- // wxBrush diff --git a/src/gtk/button.cpp b/src/gtk/button.cpp index c12fd52778..eeb2e134d0 100644 --- a/src/gtk/button.cpp +++ b/src/gtk/button.cpp @@ -13,8 +13,8 @@ #include "wx/button.h" -#include "gdk/gdk.h" -#include "gtk/gtk.h" +#include +#include //----------------------------------------------------------------------------- // classes diff --git a/src/gtk/checkbox.cpp b/src/gtk/checkbox.cpp index c6cf5f5d7f..3e3b959f4f 100644 --- a/src/gtk/checkbox.cpp +++ b/src/gtk/checkbox.cpp @@ -16,8 +16,8 @@ #if wxUSE_CHECKBOX -#include "gdk/gdk.h" -#include "gtk/gtk.h" +#include +#include //----------------------------------------------------------------------------- // idle system diff --git a/src/gtk1/app.cpp b/src/gtk1/app.cpp index 5d08196d7b..26a9ea36e6 100644 --- a/src/gtk1/app.cpp +++ b/src/gtk1/app.cpp @@ -32,11 +32,11 @@ #include "wx/thread.h" #endif -#include "unistd.h" +#include -#include "glib.h" -#include "gdk/gdk.h" -#include "gtk/gtk.h" +#include +#include +#include #include "wx/gtk/win_gtk.h" diff --git a/src/gtk1/bitmap.cpp b/src/gtk1/bitmap.cpp index 33b1a1f286..975f4ab6ed 100644 --- a/src/gtk1/bitmap.cpp +++ b/src/gtk1/bitmap.cpp @@ -16,9 +16,9 @@ #include "wx/filefn.h" #include "wx/image.h" -#include "gdk/gdk.h" -#include "gdk/gdkprivate.h" -#include "gdk/gdkx.h" +#include +#include +#include //----------------------------------------------------------------------------- // wxMask diff --git a/src/gtk1/bmpbuttn.cpp b/src/gtk1/bmpbuttn.cpp index 81f655e070..dc359f07c7 100644 --- a/src/gtk1/bmpbuttn.cpp +++ b/src/gtk1/bmpbuttn.cpp @@ -15,8 +15,8 @@ #if wxUSE_BMPBUTTON -#include "gdk/gdk.h" -#include "gtk/gtk.h" +#include +#include //----------------------------------------------------------------------------- // classes diff --git a/src/gtk1/brush.cpp b/src/gtk1/brush.cpp index b86a7615bc..01f3665a7a 100644 --- a/src/gtk1/brush.cpp +++ b/src/gtk1/brush.cpp @@ -13,7 +13,7 @@ #include "wx/brush.h" -#include "gdk/gdk.h" +#include //----------------------------------------------------------------------------- // wxBrush diff --git a/src/gtk1/button.cpp b/src/gtk1/button.cpp index c12fd52778..eeb2e134d0 100644 --- a/src/gtk1/button.cpp +++ b/src/gtk1/button.cpp @@ -13,8 +13,8 @@ #include "wx/button.h" -#include "gdk/gdk.h" -#include "gtk/gtk.h" +#include +#include //----------------------------------------------------------------------------- // classes diff --git a/src/gtk1/checkbox.cpp b/src/gtk1/checkbox.cpp index c6cf5f5d7f..3e3b959f4f 100644 --- a/src/gtk1/checkbox.cpp +++ b/src/gtk1/checkbox.cpp @@ -16,8 +16,8 @@ #if wxUSE_CHECKBOX -#include "gdk/gdk.h" -#include "gtk/gtk.h" +#include +#include //----------------------------------------------------------------------------- // idle system