diff --git a/docs/latex/wx/cmdevent.tex b/docs/latex/wx/cmdevent.tex index eeab34240e..2b2a9d6841 100644 --- a/docs/latex/wx/cmdevent.tex +++ b/docs/latex/wx/cmdevent.tex @@ -27,6 +27,8 @@ which is generated by a wxCheckBox control.} which is generated by a wxChoice control.} \twocolitem{{\bf EVT\_LISTBOX(id, func)}}{Process a wxEVT\_COMMAND\_LISTBOX\_SELECTED command, which is generated by a wxListBox control.} +\twocolitem{{\bf EVT\_LISTBOX_DCLICK(id, func)}}{Process a wxEVT\_COMMAND\_LISTBOX\_DOUBLECLICKED command, +which is generated by a wxListBox control.} \twocolitem{{\bf EVT\_TEXT(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_UPDATED command, which is generated by a wxTextCtrl control.} \twocolitem{{\bf EVT\_TEXT\_ENTER(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_ENTER command, diff --git a/docs/latex/wx/listbox.tex b/docs/latex/wx/listbox.tex index a80985b375..462273387c 100644 --- a/docs/latex/wx/listbox.tex +++ b/docs/latex/wx/listbox.tex @@ -10,8 +10,7 @@ selections). List box elements are numbered from zero. A listbox callback gets an event wxEVT\_COMMAND\_LISTBOX\_SELECT for single clicks, and -wxEVT\_COMMAND\_LISTBOX\_DOUBLE\_CLICKED for double clicks. Another way of intercepting -double clicks is to override \helpref{wxWindow::OnDefaultAction}{wxwindowondefaultaction}. +wxEVT\_COMMAND\_LISTBOX\_DOUBLE\_CLICKED for double clicks. \wxheading{Derived from} diff --git a/docs/latex/wx/window.tex b/docs/latex/wx/window.tex index 609309b05b..bb19e4544c 100644 --- a/docs/latex/wx/window.tex +++ b/docs/latex/wx/window.tex @@ -841,21 +841,6 @@ destroying the window if it returns TRUE or if the close is being forced. \helpref{wxWindow::Destroy}{wxwindowdestroy},\rtfsp \helpref{wxCloseEvent}{wxcloseevent} -\membersection{wxWindow::OnDefaultAction}\label{wxwindowondefaultaction} - -\func{virtual void}{OnDefaultAction}{\param{wxControl* }{control}} - -Called when the user initiates the default action for a panel or -dialog box, for example by double clicking on a listbox. - -\wxheading{Parameters} - -\docparam{control}{The control which caused the default action.} - -\wxheading{Remarks} - -TODO: eliminate this?? Or keep it for backward compatibility? - \membersection{wxWindow::OnDropFiles}\label{wxwindowondropfiles} \func{void}{OnDropFiles}{\param{wxDropFilesEvent\&}{ event}} diff --git a/include/wx/date.h b/include/wx/date.h index 2347dad445..d0a47dc705 100644 --- a/include/wx/date.h +++ b/include/wx/date.h @@ -47,8 +47,8 @@ class WXDLLEXPORT wxDate: public wxObject public: wxDate (); - wxDate (const long j); - wxDate (const int m, const int d, const int y); + wxDate (long j); + wxDate (int m, int d, int y); wxDate (const wxString& dat); wxDate (const wxDate &dt); @@ -56,16 +56,16 @@ class WXDLLEXPORT wxDate: public wxObject void operator = (const wxDate& date); void operator = (const wxString& date); - wxDate operator + (const long i); - wxDate operator + (const int i); + wxDate operator + (long i); + wxDate operator + (int i); - wxDate operator - (const long i); - wxDate operator - (const int i); + wxDate operator - (long i); + wxDate operator - (int i); long operator - (const wxDate &dt); - wxDate &operator += (const long i); - wxDate &operator -= (const long i); + wxDate &operator += (long i); + wxDate &operator -= (long i); wxDate &operator ++ (); // Prefix increment wxDate &operator ++ (int); // Postfix increment @@ -81,9 +81,9 @@ class WXDLLEXPORT wxDate: public wxObject friend ostream &operator << (ostream &os, const wxDate &dt); - wxString FormatDate (const int type=-1) const; - void SetFormat (const int format); - int SetOption (const int option, const bool enable=TRUE); + wxString FormatDate (int type=-1) const; + void SetFormat (int format); + int SetOption (int option, bool enable=TRUE); long GetJulianDate() const; // returns julian date int GetDayOfYear() const; // returns relative date since Jan. 1 @@ -123,7 +123,7 @@ class WXDLLEXPORT wxDate: public wxObject bool IsBetween(const wxDate& first, const wxDate& second) const; - wxDate Previous(const int dayOfWeek) const; + wxDate Previous(int dayOfWeek) const; }; #endif diff --git a/include/wx/docview.h b/include/wx/docview.h index 793049f770..087153946c 100644 --- a/include/wx/docview.h +++ b/include/wx/docview.h @@ -357,7 +357,7 @@ class WXDLLEXPORT wxDocChildFrame: public wxFrame public: wxDocChildFrame(wxDocument *doc, wxView *view, wxFrame *frame, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long type = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame"); + long type = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame"); ~wxDocChildFrame(void); bool OnClose(void); @@ -389,7 +389,7 @@ class WXDLLEXPORT wxDocParentFrame: public wxFrame public: wxDocParentFrame(wxDocManager *manager, wxFrame *frame, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long type = wxDEFAULT_FRAME, const wxString& name = "frame"); + long type = wxDEFAULT_FRAME, const wxString& name = "frame"); bool OnClose(void); // Extend event processing to search the document manager's event table diff --git a/include/wx/event.h b/include/wx/event.h index 788a0ca22d..20855f2a76 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -261,7 +261,7 @@ public: // Can instruct event processor that we wish to ignore this event // (treat as if the event table entry had not been found) - inline void Skip(const bool skip = TRUE) { m_skipped = skip; } + inline void Skip(bool skip = TRUE) { m_skipped = skip; } inline bool GetSkipped(void) const { return m_skipped; }; public: @@ -965,6 +965,8 @@ class WXDLLEXPORT wxEvtHandler: public wxObject // callback function // Default behaviour virtual long Default(void) { if (GetNextHandler()) return GetNextHandler()->Default(); else return 0; }; + +/* #if WXWIN_COMPATIBILITY virtual void OldOnMenuCommand(int WXUNUSED(cmd)); virtual void OldOnMenuSelect(int WXUNUSED(cmd)); @@ -982,12 +984,14 @@ class WXDLLEXPORT wxEvtHandler: public wxObject virtual void OldOnKillFocus(void); virtual bool OldOnSysColourChange(void); virtual void OldOnDropFiles(int n, char *files[], int x, int y); -#endif - virtual bool OnClose(void); virtual void OnDefaultAction(wxControl *WXUNUSED(initiatingItem)) {}; virtual void OnChangeFocus(wxControl *WXUNUSED(from), wxControl *WXUNUSED(to)) {}; virtual bool OnFunctionKey(wxKeyEvent &WXUNUSED(event)) { return FALSE; }; +#endif +*/ + + virtual bool OnClose(void); inline char *GetClientData(void) const { return m_clientData; } inline void SetClientData(char *clientData) { m_clientData = clientData; } @@ -995,8 +999,8 @@ class WXDLLEXPORT wxEvtHandler: public wxObject virtual bool ProcessEvent(wxEvent& event); virtual bool SearchEventTable(wxEventTable& table, wxEvent& event); - void Connect( const int id, const int lastId, - const int eventType, + void Connect( int id, int lastId, + int eventType, wxObjectEventFunction func, wxObject *userData = NULL ); @@ -1163,6 +1167,7 @@ const wxEventTableEntry theClass::sm_eventTableEntries[] = { \ #define EVT_CHECKBOX(id, fn) { wxEVT_COMMAND_CHECKBOX_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, #define EVT_CHOICE(id, fn) { wxEVT_COMMAND_CHOICE_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, #define EVT_LISTBOX(id, fn) { wxEVT_COMMAND_LISTBOX_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, +#define EVT_LISTBOX_DCLICK(id, fn) { wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, #define EVT_TEXT(id, fn) { wxEVT_COMMAND_TEXT_UPDATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, #define EVT_TEXT_ENTER(id, fn) { wxEVT_COMMAND_TEXT_ENTER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, #define EVT_MENU(id, fn) { wxEVT_COMMAND_MENU_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h index 36c371c91c..b196db82ff 100644 --- a/include/wx/gdicmn.h +++ b/include/wx/gdicmn.h @@ -112,19 +112,19 @@ class WXDLLEXPORT wxRect : public wxObject { DECLARE_DYNAMIC_CLASS(wxRect) public: wxRect(void) ; - wxRect(const long x, const long y, const long w, const long h); + wxRect(long x, long y, long w, long h); wxRect(const wxPoint& topLeft, const wxPoint& bottomRight); wxRect(const wxPoint& pos, const wxSize& size); wxRect(const wxRect& rect); inline long GetX(void) const { return x; } - inline void SetX(const long X) { x = X; } + inline void SetX(long X) { x = X; } inline long GetY(void) const { return y; } - inline void SetY(const long Y) { y = Y; } + inline void SetY(long Y) { y = Y; } inline long GetWidth() const { return width; } - inline void SetWidth(const long w) { width = w; } + inline void SetWidth(long w) { width = w; } inline long GetHeight() const { return height; } - inline void SetHeight(const long h) { height = h; } + inline void SetHeight(long h) { height = h; } inline wxPoint GetPosition(void) { return wxPoint(x, y); } inline wxSize GetSize(void) { return wxSize(width, height); } @@ -189,8 +189,8 @@ class WXDLLEXPORT wxPenList: public wxList ~wxPenList(void); void AddPen(wxPen *pen); void RemovePen(wxPen *pen); - wxPen *FindOrCreatePen(const wxColour& colour, const int width, const int style); - wxPen *FindOrCreatePen(const wxString& colour, const int width, const int style); + wxPen *FindOrCreatePen(const wxColour& colour, int width, int style); + wxPen *FindOrCreatePen(const wxString& colour, int width, int style); }; class WXDLLEXPORT wxBrushList: public wxList @@ -202,8 +202,8 @@ class WXDLLEXPORT wxBrushList: public wxList ~wxBrushList(void); void AddBrush(wxBrush *brush); void RemoveBrush(wxBrush *brush); - wxBrush *FindOrCreateBrush(const wxColour& colour, const int style); - wxBrush *FindOrCreateBrush(const wxString& colour, const int style); + wxBrush *FindOrCreateBrush(const wxColour& colour, int style); + wxBrush *FindOrCreateBrush(const wxString& colour, int style); }; WXDLLEXPORT_DATA(extern const char*) wxEmptyString; @@ -217,8 +217,8 @@ class WXDLLEXPORT wxFontList: public wxList ~wxFontList(void); void AddFont(wxFont *font); void RemoveFont(wxFont *font); - wxFont *FindOrCreateFont(const int pointSize, const int family, const int style, const int weight, - const bool underline = FALSE, const wxString& face = wxEmptyString); + wxFont *FindOrCreateFont(int pointSize, int family, int style, int weight, + bool underline = FALSE, const wxString& face = wxEmptyString); }; class WXDLLEXPORT wxColourDatabase: public wxList diff --git a/include/wx/generic/choicdgg.h b/include/wx/generic/choicdgg.h index cef0162261..d97d77ba79 100644 --- a/include/wx/generic/choicdgg.h +++ b/include/wx/generic/choicdgg.h @@ -29,13 +29,13 @@ class WXDLLEXPORT wxSingleChoiceDialog: public wxDialog DECLARE_DYNAMIC_CLASS(wxSingleChoiceDialog) public: wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption, - const int n, const wxString *choices, char **clientData = NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition); + int n, const wxString *choices, char **clientData = NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition); wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption, const wxStringList& choices, char **clientData = NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition); bool Create(wxWindow *parent, const wxString& message, const wxString& caption, - const int n, const wxString *choices, char **clientData = NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition); + int n, const wxString *choices, char **clientData = NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition); bool Create(wxWindow *parent, const wxString& message, const wxString& caption, const wxStringList& choices, char **clientData = NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition); @@ -45,6 +45,7 @@ public: inline char *GetSelectionClientData(void) const { return m_clientData; } void OnOK(wxCommandEvent& event); + void OnListBoxDClick(wxCommandEvent& event); DECLARE_EVENT_TABLE() @@ -56,46 +57,46 @@ protected: }; wxString WXDLLEXPORT wxGetSingleChoice(const wxString& message, const wxString& caption, - const int n, const wxString *choices, wxWindow *parent = NULL, - const int x = -1, const int y = -1, const bool centre = TRUE, - const int width = wxCHOICE_WIDTH, const int height = wxCHOICE_HEIGHT); + int n, const wxString *choices, wxWindow *parent = NULL, + int x = -1, int y = -1, bool centre = TRUE, + int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); wxString WXDLLEXPORT wxGetSingleChoice(const wxString& message, const wxString& caption, - const int n, char *choices[], wxWindow *parent = NULL, - const int x = -1, const int y = -1, const bool centre = TRUE, - const int width = wxCHOICE_WIDTH, const int height = wxCHOICE_HEIGHT); + int n, char *choices[], wxWindow *parent = NULL, + int x = -1, int y = -1, bool centre = TRUE, + int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); // Same as above but gets position in list of strings, instead of string, // or -1 if no selection int WXDLLEXPORT wxGetSingleChoiceIndex(const wxString& message, const wxString& caption, - const int n, const wxString *choices, wxWindow *parent = NULL, - const int x = -1, const int y = -1, const bool centre = TRUE, - const int width = wxCHOICE_WIDTH, const int height = wxCHOICE_HEIGHT); + int n, const wxString *choices, wxWindow *parent = NULL, + int x = -1, int y = -1, bool centre = TRUE, + int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); int WXDLLEXPORT wxGetSingleChoiceIndex(const wxString& message, const wxString& caption, - const int n, char *choices[], wxWindow *parent = NULL, - const int x = -1, const int y = -1, const bool centre = TRUE, - const int width = wxCHOICE_WIDTH, const int height = wxCHOICE_HEIGHT); + int n, char *choices[], wxWindow *parent = NULL, + int x = -1, int y = -1, bool centre = TRUE, + int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); // Return client data instead char* WXDLLEXPORT wxGetSingleChoiceData(const wxString& message, const wxString& caption, - const int n, const wxString *choices, char **client_data, - wxWindow *parent = NULL, const int x = -1, const int y = -1, - const bool centre = TRUE, - const int width = wxCHOICE_WIDTH, const int height = wxCHOICE_HEIGHT); + int n, const wxString *choices, char **client_data, + wxWindow *parent = NULL, int x = -1, int y = -1, + bool centre = TRUE, + int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); char* WXDLLEXPORT wxGetSingleChoiceData(const wxString& message, const wxString& caption, - const int n, char *choices[], char **client_data, - wxWindow *parent = NULL, const int x = -1, const int y = -1, - const bool centre = TRUE, - const int width = wxCHOICE_WIDTH, const int height = wxCHOICE_HEIGHT); - + int n, char *choices[], char **client_data, + wxWindow *parent = NULL, int x = -1, int y = -1, + bool centre = TRUE, + int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); + /* int WXDLLEXPORT wxGetMultipleChoice(const wxString& message, const wxString& caption, - const int n, const wxString *choices, - const int nsel, int * selection, - wxWindow *parent = NULL, const int x = -1 , const int y = -1, const bool centre = TRUE, - const int width = wxCHOICE_WIDTH, const int height = wxCHOICE_HEIGHT); + int n, const wxString *choices, + int nsel, int * selection, + wxWindow *parent = NULL, int x = -1 , int y = -1, bool centre = TRUE, + int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); */ #endif diff --git a/include/wx/generic/gridg.h b/include/wx/generic/gridg.h index 0cdcfd7242..e22951460b 100644 --- a/include/wx/generic/gridg.h +++ b/include/wx/generic/gridg.h @@ -49,7 +49,7 @@ class WXDLLEXPORT wxGenericGrid: public wxPanel public: wxGenericGrid(void); - inline wxGenericGrid(wxWindow *parent, int x, int y, int width, int height, const long style = 0, char *name = "grid") + inline wxGenericGrid(wxWindow *parent, int x, int y, int width, int height, long style = 0, char *name = "grid") { Create(parent, -1, wxPoint(x, y), wxSize(width, height), style, name); } diff --git a/include/wx/generic/imaglist.h b/include/wx/generic/imaglist.h index 3df017802e..6bf2ed7455 100644 --- a/include/wx/generic/imaglist.h +++ b/include/wx/generic/imaglist.h @@ -57,8 +57,8 @@ class wxImageList: public wxObject bool RemoveAll(); bool GetSize( int index, int &width, int &height ) const; bool Draw(int index, wxDC& dc, int x, int y, - int flags = wxIMAGELIST_DRAW_NORMAL, const bool solidBackground = FALSE ); - + int flags = wxIMAGELIST_DRAW_NORMAL, bool solidBackground = FALSE ); + private: wxList m_images; diff --git a/include/wx/generic/listctrl.h b/include/wx/generic/listctrl.h index c574a6508e..aefb650684 100644 --- a/include/wx/generic/listctrl.h +++ b/include/wx/generic/listctrl.h @@ -51,7 +51,7 @@ class wxListRenameTimer; //----------------------------------------------------------------------------- // type of compare function for wxListCtrl sort operation -typedef int (*wxListCtrlCompare)(const long item1, const long item2, long sortData); +typedef int (*wxListCtrlCompare)(long item1, long item2, long sortData); //----------------------------------------------------------------------------- // wxListCtrl flags @@ -252,14 +252,14 @@ class wxListItemData : public wxObject wxListItemData( const wxListItem &info ); void SetItem( const wxListItem &info ); void SetText( const wxString &s ); - void SetImage( const int image ); - void SetData( const long data ); - void SetPosition( const int x, const int y ); - void SetSize( const int width, const int height ); + void SetImage( int image ); + void SetData( long data ); + void SetPosition( int x, int y ); + void SetSize( int width, int height ); void SetColour( wxColour *col ); bool HasImage(void) const; bool HasText(void) const; - bool IsHit( const int x, const int y ) const; + bool IsHit( int x, int y ) const; void GetText( wxString &s ); int GetX( void ) const; int GetY( void ) const; @@ -291,13 +291,13 @@ class wxListHeaderData : public wxObject wxListHeaderData(void); wxListHeaderData( const wxListItem &info ); void SetItem( const wxListItem &item ); - void SetPosition( const int x, const int y ); - void SetWidth( const int w ); - void SetFormat( const int format ); - void SetHeight( const int h ); + void SetPosition( int x, int y ); + void SetWidth( int w ); + void SetFormat( int format ); + void SetHeight( int h ); bool HasImage(void) const; bool HasText(void) const; - bool IsHit( const int x, const int y ) const; + bool IsHit( int x, int y ) const; void GetItem( wxListItem &item ); void GetText( wxString &s ); int GetImage(void) const; @@ -325,32 +325,32 @@ class wxListLineData : public wxObject int m_spacing; wxListMainWindow *m_owner; - void DoDraw( wxPaintDC *dc, const bool hilight, const bool paintBG ); + void DoDraw( wxPaintDC *dc, bool hilight, bool paintBG ); public: wxListLineData( void ) {}; - wxListLineData( wxListMainWindow *owner, const int mode, wxBrush *hilightBrush ); - void CalculateSize( wxPaintDC *dc, const int spacing ); - void SetPosition( wxPaintDC *dc, const int x, const int y, const int window_width ); - void SetColumnPosition( const int index, const int x ); + wxListLineData( wxListMainWindow *owner, int mode, wxBrush *hilightBrush ); + void CalculateSize( wxPaintDC *dc, int spacing ); + void SetPosition( wxPaintDC *dc, int x, int y, int window_width ); + void SetColumnPosition( int index, int x ); void GetSize( int &width, int &height ); void GetExtent( int &x, int &y, int &width, int &height ); void GetLabelExtent( int &x, int &y, int &width, int &height ); - long IsHit( const int x, const int y ); - void InitItems( const int num ); - void SetItem( const int index, const wxListItem &info ); - void GetItem( const int index, wxListItem &info ); - void GetText( const int index, wxString &s ); - void SetText( const int index, const wxString s ); - int GetImage( const int index ); + long IsHit( int x, int y ); + void InitItems( int num ); + void SetItem( int index, const wxListItem &info ); + void GetItem( int index, wxListItem &info ); + void GetText( int index, wxString &s ); + void SetText( int index, const wxString s ); + int GetImage( int index ); void GetRect( wxRectangle &rect ); - void Hilight( const bool on ); + void Hilight( bool on ); void ReverseHilight( void ); - void DrawRubberBand( wxPaintDC *dc, const bool on ); + void DrawRubberBand( wxPaintDC *dc, bool on ); void Draw( wxPaintDC *dc ); - bool IsInRect( const int x, const int y, const wxRectangle &rect ); + bool IsInRect( int x, int y, const wxRectangle &rect ); bool IsHilighted( void ); - void AssignRect( wxRectangle &dest, const int x, const int y, const int width, const int height ); + void AssignRect( wxRectangle &dest, int x, int y, int width, int height ); void AssignRect( wxRectangle &dest, const wxRectangle &source ); }; @@ -369,9 +369,9 @@ class wxListHeaderWindow : public wxWindow public: wxListHeaderWindow( void ); - wxListHeaderWindow( wxWindow *win, const wxWindowID id, wxListMainWindow *owner, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = "columntitles" ); + wxListHeaderWindow( wxWindow *win, wxWindowID id, wxListMainWindow *owner, + const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, + long style = 0, const wxString &name = "columntitles" ); void DoDrawRect( wxPaintDC *dc, int x, int y, int w, int h ); void OnPaint( wxPaintEvent &event ); void OnMouse( wxMouseEvent &event ); @@ -487,13 +487,13 @@ class wxListMainWindow: public wxScrolledWindow public: wxListMainWindow(void); - wxListMainWindow( wxWindow *parent, const wxWindowID id, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = "listctrl" ); + wxListMainWindow( wxWindow *parent, wxWindowID id, + const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, + long style = 0, const wxString &name = "listctrl" ); ~wxListMainWindow(void); void RefreshLine( wxListLineData *line ); void OnPaint( wxPaintEvent &event ); - void HilightAll( const bool on ); + void HilightAll( bool on ); void ActivateLine( wxListLineData *line ); void SendNotify( wxListLineData *line, wxEventType command ); void FocusLine( wxListLineData *line ); @@ -517,37 +517,37 @@ class wxListMainWindow: public wxScrolledWindow int GetIndexOfLine( const wxListLineData *line ); int GetTextLength( wxString &s ); // should be const - void SetImageList( wxImageList *imageList, const int which ); - void SetItemSpacing( const int spacing, const bool isSmall = FALSE ); - int GetItemSpacing( const bool isSmall = FALSE ); - void SetColumn( const int col, wxListItem &item ); - void SetColumnWidth( const int col, const int width ); - void GetColumn( const int col, wxListItem &item ); - int GetColumnWidth( const int vol ); + void SetImageList( wxImageList *imageList, int which ); + void SetItemSpacing( int spacing, bool isSmall = FALSE ); + int GetItemSpacing( bool isSmall = FALSE ); + void SetColumn( int col, wxListItem &item ); + void SetColumnWidth( int col, int width ); + void GetColumn( int col, wxListItem &item ); + int GetColumnWidth( int vol ); int GetColumnCount( void ); int GetCountPerPage( void ); void SetItem( wxListItem &item ); void GetItem( wxListItem &item ); - void SetItemState( const long item, const long state, const long stateMask ); - int GetItemState( const long item, const long stateMask ); + void SetItemState( long item, long state, long stateMask ); + int GetItemState( long item, long stateMask ); int GetItemCount( void ); - void GetItemRect( const long index, wxRectangle &rect ); + void GetItemRect( long index, wxRectangle &rect ); int GetSelectedItemCount( void ); - void SetMode( const long mode ); + void SetMode( long mode ); long GetMode( void ) const; void CalculatePositions( void ); void RealizeChanges(void); - long GetNextItem( const long item, int geometry, int state ); - void DeleteItem( const long index ); + long GetNextItem( long item, int geometry, int state ); + void DeleteItem( long index ); void DeleteAllItems( void ); - void DeleteColumn( const int col ); + void DeleteColumn( int col ); void DeleteEverything( void ); - void EnsureVisible( const long index ); - long FindItem(const long start, const wxString& str, const bool partial = FALSE ); - long FindItem(const long start, const long data); - long HitTest( const int x, const int y, int &flags ); + void EnsureVisible( long index ); + long FindItem(long start, const wxString& str, bool partial = FALSE ); + long FindItem(long start, long data); + long HitTest( int x, int y, int &flags ); void InsertItem( wxListItem &item ); - void InsertColumn( const long col, wxListItem &item ); + void InsertColumn( long col, wxListItem &item ); void SortItems( wxListCtrlCompare fn, long data ); virtual bool OnListNotify( wxListEvent &event ); @@ -565,66 +565,66 @@ class wxListCtrl: public wxControl public: wxListCtrl(void); - wxListCtrl( wxWindow *parent, const wxWindowID id, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = "listctrl" ); + wxListCtrl( wxWindow *parent, wxWindowID id, + const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, + long style = 0, const wxString &name = "listctrl" ); ~wxListCtrl(void); - bool Create( wxWindow *parent, const wxWindowID id, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = "listctrl" ); + bool Create( wxWindow *parent, wxWindowID id, + const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, + long style = 0, const wxString &name = "listctrl" ); void OnSize( wxSizeEvent &event ); void SetBackgroundColour( const wxColour& col ); - bool GetColumn( const int col, wxListItem& item ); - bool SetColumn( const int col, wxListItem& item ); - int GetColumnWidth( const int col ); - bool SetColumnWidth( const int col, const int width); + bool GetColumn( int col, wxListItem& item ); + bool SetColumn( int col, wxListItem& item ); + int GetColumnWidth( int col ); + bool SetColumnWidth( int col, int width); int GetCountPerPage(void); // not the same in wxGLC as in Windows, I think // wxText& GetEditControl(void) const; // not supported in wxGLC bool GetItem( wxListItem& info ); bool SetItem( wxListItem& info ) ; - long SetItem( const long index, const int col, const wxString& label, const int imageId = -1 ); - int GetItemState( const long item, const long stateMask ); - bool SetItemState( const long item, const long state, const long stateMask); - bool SetItemImage( const long item, const int image, const int selImage); - wxString GetItemText( const long item ); - void SetItemText( const long item, const wxString& str ); - long GetItemData( const long item ); - bool SetItemData( const long item, long data ); - bool GetItemRect( const long item, wxRectangle& rect, const int code = wxLIST_RECT_BOUNDS ); // not supported in wxGLC - bool GetItemPosition( const long item, wxPoint& pos ) const; // not supported in wxGLC - bool SetItemPosition( const long item, const wxPoint& pos ); // not supported in wxGLC + long SetItem( long index, int col, const wxString& label, int imageId = -1 ); + int GetItemState( long item, long stateMask ); + bool SetItemState( long item, long state, long stateMask); + bool SetItemImage( long item, int image, int selImage); + wxString GetItemText( long item ); + void SetItemText( long item, const wxString& str ); + long GetItemData( long item ); + bool SetItemData( long item, long data ); + bool GetItemRect( long item, wxRectangle& rect, int code = wxLIST_RECT_BOUNDS ); // not supported in wxGLC + bool GetItemPosition( long item, wxPoint& pos ) const; // not supported in wxGLC + bool SetItemPosition( long item, const wxPoint& pos ); // not supported in wxGLC int GetItemCount(void); int GetItemSpacing( bool isSmall ); int GetSelectedItemCount(void); // wxColour GetTextColour(void) const; // wxGLC has colours for every Item (see wxListItem) // void SetTextColour(const wxColour& col); long GetTopItem(void); - void SetSingleStyle( const long style, const bool add = TRUE ) ; - void SetWindowStyleFlag(const long style); + void SetSingleStyle( long style, bool add = TRUE ) ; + void SetWindowStyleFlag(long style); void RecreateWindow(void) {}; - long GetNextItem(const long item, int geometry = wxLIST_NEXT_ALL, int state = wxLIST_STATE_DONTCARE); - wxImageList *GetImageList(const int which); - void SetImageList(wxImageList *imageList, const int which) ; - bool Arrange( const int flag = wxLIST_ALIGN_DEFAULT ); // always wxLIST_ALIGN_LEFT in wxGLC - bool DeleteItem( const long item ); + long GetNextItem(long item, int geometry = wxLIST_NEXT_ALL, int state = wxLIST_STATE_DONTCARE); + wxImageList *GetImageList(int which); + void SetImageList(wxImageList *imageList, int which) ; + bool Arrange( int flag = wxLIST_ALIGN_DEFAULT ); // always wxLIST_ALIGN_LEFT in wxGLC + bool DeleteItem( long item ); bool DeleteAllItems(void) ; - bool DeleteColumn( const int col ); -// wxText& Edit(const long item) ; // not supported in wxGLC - bool EnsureVisible( const long item ); - long FindItem(const long start, const wxString& str, const bool partial = FALSE ); - long FindItem(const long start, const long data); - long FindItem(const long start, const wxPoint& pt, const int direction); // not supported in wxGLC + bool DeleteColumn( int col ); +// wxText& Edit(long item) ; // not supported in wxGLC + bool EnsureVisible( long item ); + long FindItem(long start, const wxString& str, bool partial = FALSE ); + long FindItem(long start, long data); + long FindItem(long start, const wxPoint& pt, int direction); // not supported in wxGLC long HitTest(const wxPoint& point, int& flags); long InsertItem(wxListItem& info); - long InsertItem(const long index, const wxString& label); - long InsertItem(const long index, const int imageIndex); - long InsertItem(const long index, const wxString& label, const int imageIndex); - long InsertColumn(const long col, wxListItem& info); - long InsertColumn(const long col, const wxString& heading, const int format = wxLIST_FORMAT_LEFT, - const int width = -1); - bool ScrollList(const int dx, const int dy); + long InsertItem(long index, const wxString& label); + long InsertItem(long index, int imageIndex); + long InsertItem(long index, const wxString& label, int imageIndex); + long InsertColumn(long col, wxListItem& info); + long InsertColumn(long col, const wxString& heading, int format = wxLIST_FORMAT_LEFT, + int width = -1); + bool ScrollList(int dx, int dy); bool SortItems(wxListCtrlCompare fn, long data); - bool Update(const long item); + bool Update(long item); virtual bool OnListNotify(wxListEvent& WXUNUSED(event)) { return FALSE; } void SetDropTarget( wxDropTarget *dropTarget ) { m_mainWin->SetDropTarget( dropTarget ); }; diff --git a/include/wx/generic/msgdlgg.h b/include/wx/generic/msgdlgg.h index a2029036a5..fb8aa5cc65 100644 --- a/include/wx/generic/msgdlgg.h +++ b/include/wx/generic/msgdlgg.h @@ -44,7 +44,7 @@ DECLARE_EVENT_TABLE() #define wxMessageDialog wxGenericMessageDialog int wxMessageBox(const wxString& message, const wxString& caption = wxMessageBoxCaptionStr, - const long style = wxOK|wxCENTRE, wxWindow *parent = NULL, const int x = -1, const int y = -1); + long style = wxOK|wxCENTRE, wxWindow *parent = NULL, int x = -1, int y = -1); #endif diff --git a/include/wx/generic/panelg.h b/include/wx/generic/panelg.h index 89b117992c..94ac38d287 100644 --- a/include/wx/generic/panelg.h +++ b/include/wx/generic/panelg.h @@ -30,27 +30,27 @@ public: // Old-style constructor inline wxPanel(wxWindow *parent, - const int x = -1, const int y= -1, const int width = 500, const int height = 500, - const long style = wxTAB_TRAVERSAL | wxNO_BORDER, + int x = -1, int y= -1, int width = 500, int height = 500, + long style = wxTAB_TRAVERSAL | wxNO_BORDER, const wxString& name = wxPanelNameStr) { Create(parent, -1, wxPoint(x, y), wxSize(width, height), style, name); } // Constructor - inline wxPanel(wxWindow *parent, const wxWindowID id, + inline wxPanel(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxTAB_TRAVERSAL | wxNO_BORDER, + long style = wxTAB_TRAVERSAL | wxNO_BORDER, const wxString& name = wxPanelNameStr) { Create(parent, id, pos, size, style, name); } - bool Create(wxWindow *parent, const wxWindowID id, + bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxTAB_TRAVERSAL | wxNO_BORDER, + long style = wxTAB_TRAVERSAL | wxNO_BORDER, const wxString& name = wxPanelNameStr); void OnPaint(wxPaintEvent& event); diff --git a/include/wx/generic/scrolwin.h b/include/wx/generic/scrolwin.h index b80e443e14..435d3f38ff 100644 --- a/include/wx/generic/scrolwin.h +++ b/include/wx/generic/scrolwin.h @@ -26,10 +26,10 @@ class WXDLLEXPORT wxScrolledWindow: public wxWindow public: wxScrolledWindow(void); - inline wxScrolledWindow(wxWindow *parent, const wxWindowID id = -1, + inline wxScrolledWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxHSCROLL|wxVSCROLL, + long style = wxHSCROLL|wxVSCROLL, const wxString& name = wxPanelNameStr) { Create(parent, id, pos, size, style, name); @@ -37,15 +37,15 @@ public: inline ~wxScrolledWindow(void) {} - bool Create(wxWindow *parent, const wxWindowID id, + bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxHSCROLL|wxVSCROLL, + long style = wxHSCROLL|wxVSCROLL, const wxString& name = wxPanelNameStr); // Set client size // Should take account of scrollbars -// virtual void SetClientSize(const int width, const int size); +// virtual void SetClientSize(int width, int size); // Is the window retained? // inline bool IsRetained(void) const; @@ -53,13 +53,13 @@ public: // Number of pixels per user unit (0 or -1 for no scrollbar) // Length of virtual canvas in user units // Length of page in user units - virtual void SetScrollbars(const int pixelsPerUnitX, const int pixelsPerUnitY, - const int noUnitsX, const int noUnitsY, - const int xPos = 0, const int yPos = 0, - const bool noRefresh = FALSE ); + virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY, + int noUnitsX, int noUnitsY, + int xPos = 0, int yPos = 0, + bool noRefresh = FALSE ); // Physically scroll the window - virtual void Scroll(const int x_pos, const int y_pos); + virtual void Scroll(int x_pos, int y_pos); #if WXWIN_COMPATIBILITY virtual void GetScrollUnitsPerPage(int *x_page, int *y_page) const; @@ -75,7 +75,7 @@ public: // If FALSE, the whole canvas is invalidated and a Clear() is // necessary. Disable for when the scroll increment is used // to actually scroll a non-constant distance - virtual void EnableScrolling(const bool x_scrolling, const bool y_scrolling); + virtual void EnableScrolling(bool x_scrolling, bool y_scrolling); // Get the view start virtual void ViewStart(int *x, int *y) const; @@ -83,8 +83,8 @@ public: // Actual size in pixels when scrolling is taken into account virtual void GetVirtualSize(int *x, int *y) const; - virtual void CalcScrolledPosition(const int x, const int y, int *xx, int *yy) const ; - virtual void CalcUnscrolledPosition(const int x, const int y, float *xx, float *yy) const ; + virtual void CalcScrolledPosition(int x, int y, int *xx, int *yy) const ; + virtual void CalcUnscrolledPosition(int x, int y, float *xx, float *yy) const ; // Adjust the scrollbars virtual void AdjustScrollbars(void); diff --git a/include/wx/generic/splitter.h b/include/wx/generic/splitter.h index 2502c0222e..f8b957a57c 100644 --- a/include/wx/generic/splitter.h +++ b/include/wx/generic/splitter.h @@ -57,8 +57,8 @@ class WXDLLEXPORT wxSplitterWindow: public wxWindow wxSplitterWindow(void); // Normal constructor - wxSplitterWindow(wxWindow *parent, const wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, const long style = wxSP_3D|wxCLIP_CHILDREN, const wxString& name = "splitter"); + wxSplitterWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxSP_3D|wxCLIP_CHILDREN, const wxString& name = "splitter"); ~wxSplitterWindow(void); // Gets the only or left/top pane @@ -68,7 +68,7 @@ class WXDLLEXPORT wxSplitterWindow: public wxWindow inline wxWindow *GetWindow2(void) { return m_windowTwo; } // Sets the split mode - inline void SetSplitMode(const int mode) { m_splitMode = mode; } + inline void SetSplitMode(int mode) { m_splitMode = mode; } // Gets the split mode inline int GetSplitMode(void) const { return m_splitMode; }; @@ -80,8 +80,8 @@ class WXDLLEXPORT wxSplitterWindow: public wxWindow // and changing the split mode. // Does nothing and returns FALSE if the window is already split. // A sashPosition of -1 means choose a default sash position. - bool SplitVertically(wxWindow *window1, wxWindow *window2, const int sashPosition = -1); - bool SplitHorizontally(wxWindow *window1, wxWindow *window2, const int sashPosition = -1); + bool SplitVertically(wxWindow *window1, wxWindow *window2, int sashPosition = -1); + bool SplitHorizontally(wxWindow *window1, wxWindow *window2, int sashPosition = -1); // Removes the specified (or second) window from the view // Doesn't actually delete the window. @@ -91,10 +91,10 @@ class WXDLLEXPORT wxSplitterWindow: public wxWindow inline bool IsSplit(void) const { return (m_windowTwo != NULL); } // Sets the sash size - inline void SetSashSize(const int width) { m_sashSize = width; } + inline void SetSashSize(int width) { m_sashSize = width; } // Sets the border size - inline void SetBorderSize(const int width) { m_borderSize = width; } + inline void SetBorderSize(int width) { m_borderSize = width; } // Gets the sash size inline int GetSashSize(void) const { return m_sashSize; } @@ -103,13 +103,13 @@ class WXDLLEXPORT wxSplitterWindow: public wxWindow inline int GetBorderSize(void) const { return m_borderSize; } // Set the sash position - void SetSashPosition(const int position, const bool redaw = TRUE); + void SetSashPosition(int position, bool redaw = TRUE); // Gets the sash position inline int GetSashPosition(void) const { return m_sashPosition; } // If this is zero, we can remove panes by dragging the sash. - inline void SetMinimumPaneSize(const int min) { m_minimumPaneSize = min; } + inline void SetMinimumPaneSize(int min) { m_minimumPaneSize = min; } inline int GetMinimumPaneSize(void) const { return m_minimumPaneSize; } // If the sash is moved to an extreme position, a subwindow @@ -141,10 +141,10 @@ class WXDLLEXPORT wxSplitterWindow: public wxWindow void DrawSash(wxDC& dc); // Draws the sash tracker (for whilst moving the sash) - void DrawSashTracker(const int x, const int y); + void DrawSashTracker(int x, int y); // Tests for x, y over sash - bool SashHitTest(const int x, const int y, const int tolerance = 2); + bool SashHitTest(int x, int y, int tolerance = 2); // Resizes subwindows void SizeWindows(void); diff --git a/include/wx/generic/statusbr.h b/include/wx/generic/statusbr.h index 91c4abcac2..784a03a288 100644 --- a/include/wx/generic/statusbr.h +++ b/include/wx/generic/statusbr.h @@ -26,10 +26,10 @@ class WXDLLEXPORT wxStatusBar: public wxWindow public: wxStatusBar(void); - inline wxStatusBar(wxWindow *parent, const wxWindowID id, + inline wxStatusBar(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = 0, + long style = 0, const wxString& name = wxPanelNameStr) { Create(parent, id, pos, size, style, name); @@ -37,33 +37,33 @@ public: ~wxStatusBar(void); - bool Create(wxWindow *parent, const wxWindowID id, + bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = 0, + long style = 0, const wxString& name = wxPanelNameStr); // Create status line - virtual void SetFieldsCount(const int number=1, const int *widths = NULL); + virtual void SetFieldsCount(int number=1, int *widths = NULL); inline int GetFieldsCount(void) const { return m_nFields; } // Set status line text - virtual void SetStatusText(const wxString& text, const int number = 0); - virtual wxString GetStatusText(const int number = 0) const; + virtual void SetStatusText(const wxString& text, int number = 0); + virtual wxString GetStatusText(int number = 0) const; // Set status line widths - virtual void SetStatusWidths(const int n, const int *widths_field); + virtual void SetStatusWidths(int n, int *widths_field); - virtual void DrawFieldText(wxDC& dc, const int i); - virtual void DrawField(wxDC& dc, const int i); + virtual void DrawFieldText(wxDC& dc, int i); + virtual void DrawField(wxDC& dc, int i); // Get the position and size of the field's internal bounding rectangle - virtual bool GetFieldRect(const int i, wxRectangle& rect) const; + virtual bool GetFieldRect(int i, wxRectangle& rect) const; inline int GetBorderX(void) const { return m_borderX; } inline int GetBorderY(void) const { return m_borderY; } - inline void SetBorderX(const int x); - inline void SetBorderY(const int y); + inline void SetBorderX(int x); + inline void SetBorderY(int y); //////////////////////////////////////////////////////////////////////// // Implementation diff --git a/include/wx/generic/tabg.h b/include/wx/generic/tabg.h index 34cf2326f7..cbb18588fd 100644 --- a/include/wx/generic/tabg.h +++ b/include/wx/generic/tabg.h @@ -266,10 +266,10 @@ DECLARE_DYNAMIC_CLASS(wxTabbedDialog) public: - wxTabbedDialog(wxWindow *parent, const wxWindowID id, const wxString& title, + wxTabbedDialog(wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long windowStyle = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxDialogNameStr); + long windowStyle = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxDialogNameStr); ~wxTabbedDialog(void); inline wxTabView *GetTabView() const { return m_tabView; } @@ -295,10 +295,10 @@ DECLARE_DYNAMIC_CLASS(wxTabbedPanel) public: - wxTabbedPanel(wxWindow *parent, const wxWindowID id, + wxTabbedPanel(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long windowStyle = 0, const wxString& name = wxPanelNameStr); + long windowStyle = 0, const wxString& name = wxPanelNameStr); ~wxTabbedPanel(void); inline wxTabView *GetTabView() const { return m_tabView; } diff --git a/include/wx/generic/treectrl.h b/include/wx/generic/treectrl.h index 3dbbc06450..42789bb8ba 100644 --- a/include/wx/generic/treectrl.h +++ b/include/wx/generic/treectrl.h @@ -257,24 +257,24 @@ class wxTreeCtrl: public wxScrolledWindow public: wxTreeCtrl(void); - wxTreeCtrl(wxWindow *parent, const wxWindowID id = -1, + wxTreeCtrl(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTR_HAS_BUTTONS, const wxString& name = "wxTreeCtrl" ); ~wxTreeCtrl(void); - bool Create(wxWindow *parent, const wxWindowID id = -1, + bool Create(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTR_HAS_BUTTONS, const wxString& name = "wxTreeCtrl"); int GetCount(void) const; - long InsertItem( long parent, const wxString& label, const int image = -1, - const int selImage = -1, long insertAfter = wxTREE_INSERT_LAST ); + long InsertItem( long parent, const wxString& label, int image = -1, + int selImage = -1, long insertAfter = wxTREE_INSERT_LAST ); long InsertItem( long parent, wxTreeItem &info, long insertAfter = wxTREE_INSERT_LAST ); bool DeleteAllItems(void); - bool ExpandItem( long item, const int action ); + bool ExpandItem( long item, int action ); bool GetItem( wxTreeItem &info ) const; long GetItemData( long item ) const; wxString GetItemText( long item ) const; @@ -284,7 +284,7 @@ class wxTreeCtrl: public wxScrolledWindow long GetSelection(void) const; bool SelectItem( long item ) const; bool ItemHasChildren( long item ) const; - void SetIndent( const int indent ); + void SetIndent( int indent ); int GetIndent(void) const; bool SetItem( wxTreeItem &info ); bool SetItemData( long item, long data ); diff --git a/include/wx/gtk/bitmap.h b/include/wx/gtk/bitmap.h index 4d5acb76f7..876eba2249 100644 --- a/include/wx/gtk/bitmap.h +++ b/include/wx/gtk/bitmap.h @@ -47,7 +47,7 @@ class wxMask: public wxObject wxMask(void); wxMask( const wxBitmap& bitmap, const wxColour& colour ); - wxMask( const wxBitmap& bitmap, const int paletteIndex ); + wxMask( const wxBitmap& bitmap, int paletteIndex ); wxMask( const wxBitmap& bitmap ); ~wxMask(void); @@ -80,12 +80,12 @@ class wxBitmap: public wxObject public: wxBitmap(void); - wxBitmap( const int width, const int height, const int depth = -1 ); - wxBitmap( const char bits[], const int width, const int height, const int depth = 1 ); + wxBitmap( int width, int height, int depth = -1 ); + wxBitmap( const char bits[], int width, int height, int depth = 1 ); wxBitmap( char **bits ); wxBitmap( const wxBitmap& bmp ); wxBitmap( const wxBitmap* bmp ); - wxBitmap( const wxString &filename, const int type ); + wxBitmap( const wxString &filename, int type ); ~wxBitmap(void); wxBitmap& operator = ( const wxBitmap& bmp ); bool operator == ( const wxBitmap& bmp ); @@ -95,16 +95,16 @@ class wxBitmap: public wxObject int GetHeight(void) const; int GetWidth(void) const; int GetDepth(void) const; - void SetHeight( const int height ); - void SetWidth( const int width ); - void SetDepth( const int depth ); + void SetHeight( int height ); + void SetWidth( int width ); + void SetDepth( int depth ); wxMask *GetMask(void) const; void SetMask( wxMask *mask ); - bool SaveFile( const wxString &name, const int type, wxPalette *palette = NULL ); - bool LoadFile( const wxString &name, const int type ); - + bool SaveFile( const wxString &name, int type, wxPalette *palette = NULL ); + bool LoadFile( const wxString &name, int type ); + wxPalette *GetPalette(void) const; wxPalette *GetColourMap(void) const { return GetPalette(); }; diff --git a/include/wx/gtk/bmpbuttn.h b/include/wx/gtk/bmpbuttn.h index 57bc2c3873..659e9443dc 100644 --- a/include/wx/gtk/bmpbuttn.h +++ b/include/wx/gtk/bmpbuttn.h @@ -46,10 +46,10 @@ class wxBitmapButton: public wxControl wxBitmapButton(void); wxBitmapButton( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = wxButtonNameStr ); + long style = 0, const wxString &name = wxButtonNameStr ); bool Create( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = wxButtonNameStr ); + long style = 0, const wxString &name = wxButtonNameStr ); void SetDefault(void); void SetLabel( const wxString &label ); wxString GetLabel(void) const; diff --git a/include/wx/gtk/brush.h b/include/wx/gtk/brush.h index 3cac78adc7..32048f67b7 100644 --- a/include/wx/gtk/brush.h +++ b/include/wx/gtk/brush.h @@ -39,8 +39,8 @@ class wxBrush: public wxGDIObject public: wxBrush(void); - wxBrush( const wxColour &colour, const int style ); - wxBrush( const wxString &colourName, const int style ); + wxBrush( const wxColour &colour, int style ); + wxBrush( const wxString &colourName, int style ); wxBrush( const wxBitmap &stippleBitmap ); wxBrush( const wxBrush &brush ); wxBrush( const wxBrush *brush ); diff --git a/include/wx/gtk/button.h b/include/wx/gtk/button.h index b0e2220c0e..6932755578 100644 --- a/include/wx/gtk/button.h +++ b/include/wx/gtk/button.h @@ -46,10 +46,10 @@ class wxButton: public wxControl wxButton(void); wxButton( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = wxButtonNameStr ); + long style = 0, const wxString &name = wxButtonNameStr ); bool Create( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = wxButtonNameStr ); + long style = 0, const wxString &name = wxButtonNameStr ); void SetDefault(void); void SetLabel( const wxString &label ); wxString GetLabel(void) const; diff --git a/include/wx/gtk/checkbox.h b/include/wx/gtk/checkbox.h index 0f95924e1b..6ff10bcecc 100644 --- a/include/wx/gtk/checkbox.h +++ b/include/wx/gtk/checkbox.h @@ -46,11 +46,11 @@ class wxCheckBox: public wxControl wxCheckBox(void); wxCheckBox( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = wxCheckBoxNameStr ); + long style = 0, const wxString &name = wxCheckBoxNameStr ); bool Create( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = wxCheckBoxNameStr ); - void SetValue( const bool state ); + long style = 0, const wxString &name = wxCheckBoxNameStr ); + void SetValue( bool state ); bool GetValue(void) const; }; diff --git a/include/wx/gtk/choice.h b/include/wx/gtk/choice.h index b3feb2c065..99e7ec0878 100644 --- a/include/wx/gtk/choice.h +++ b/include/wx/gtk/choice.h @@ -44,24 +44,24 @@ class wxChoice: public wxControl public: wxChoice(void); - wxChoice( wxWindow *parent, const wxWindowID id, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const int n = 0, const wxString choices[] = NULL, - const long style = 0, const wxString &name = wxChoiceNameStr ); - bool Create( wxWindow *parent, const wxWindowID id, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const int n = 0, const wxString choices[] = NULL, - const long style = 0, const wxString &name = wxChoiceNameStr ); + wxChoice( wxWindow *parent, wxWindowID id, + const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, const wxString &name = wxChoiceNameStr ); + bool Create( wxWindow *parent, wxWindowID id, + const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, const wxString &name = wxChoiceNameStr ); void Append( const wxString &item ); void Clear(void); int FindString( const wxString &string ) const; int GetColumns(void) const; int GetSelection(void); - wxString GetString( const int n ) const; + wxString GetString( int n ) const; wxString GetStringSelection(void) const; int Number(void) const; - void SetColumns( const int n = 1 ); - void SetSelection( const int n ); + void SetColumns( int n = 1 ); + void SetSelection( int n ); void SetStringSelection( const wxString &string ); }; diff --git a/include/wx/gtk/combobox.h b/include/wx/gtk/combobox.h index 464771efcf..28a906f941 100644 --- a/include/wx/gtk/combobox.h +++ b/include/wx/gtk/combobox.h @@ -44,39 +44,39 @@ class wxComboBox: public wxControl public: inline wxComboBox(void) {} - inline wxComboBox(wxWindow *parent, const wxWindowID id, + inline wxComboBox(wxWindow *parent, wxWindowID id, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const int n = 0, const wxString choices[] = NULL, - const long style = 0, + int n = 0, const wxString choices[] = NULL, + long style = 0, const wxString& name = wxComboBoxNameStr) { Create(parent, id, value, pos, size, n, choices, style, name); } - bool Create(wxWindow *parent, const wxWindowID id, + bool Create(wxWindow *parent, wxWindowID id, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const int n = 0, const wxString choices[] = NULL, - const long style = 0, + int n = 0, const wxString choices[] = NULL, + long style = 0, const wxString& name = wxComboBoxNameStr); // List functions void Clear(void); void Append( const wxString &item ); void Append( const wxString &item, char* clientData ); - void Delete( const int n ); + void Delete( int n ); int FindString( const wxString &item ); - char* GetClientData( const int n ); - void SetClientData( const int n, char * clientData ); + char* GetClientData( int n ); + void SetClientData( int n, char * clientData ); int GetSelection(void) const; - wxString GetString( const int n ) const; + wxString GetString( int n ) const; wxString GetStringSelection(void) const; int Number(void) const; - void SetSelection( const int n ); - + void SetSelection( int n ); + // Text field functions wxString GetValue(void) const ; void SetValue(const wxString& value); @@ -85,15 +85,15 @@ class wxComboBox: public wxControl void Copy(void); void Cut(void); void Paste(void); - void SetInsertionPoint(const long pos); + void SetInsertionPoint(long pos); void SetInsertionPointEnd(void); long GetInsertionPoint(void) const ; long GetLastPosition(void) const ; - void Replace(const long from, const long to, const wxString& value); - void Remove(const long from, const long to); - void SetSelection(const long from, const long to); - void SetEditable(const bool editable); - + void Replace(long from, long to, const wxString& value); + void Remove(long from, long to); + void SetSelection(long from, long to); + void SetEditable(bool editable); + private: wxList m_clientData; diff --git a/include/wx/gtk/control.h b/include/wx/gtk/control.h index ad8ea7abea..a40bbf3aae 100644 --- a/include/wx/gtk/control.h +++ b/include/wx/gtk/control.h @@ -40,7 +40,7 @@ class wxControl: public wxWindow wxControl(void); wxControl( wxWindow *parent, wxWindowID id, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = wxPanelNameStr ); + long style = 0, const wxString &name = wxPanelNameStr ); virtual void Command( wxCommandEvent &event ); virtual void SetLabel( const wxString &label ); virtual wxString GetLabel(void) const; diff --git a/include/wx/gtk/cursor.h b/include/wx/gtk/cursor.h index a6fcb40b17..b760e0b512 100644 --- a/include/wx/gtk/cursor.h +++ b/include/wx/gtk/cursor.h @@ -39,7 +39,7 @@ class wxCursor: public wxObject public: wxCursor(void); - wxCursor( const int cursorId ); + wxCursor( int cursorId ); wxCursor( const wxCursor &cursor ); wxCursor( const wxCursor *cursor ); ~wxCursor(void); diff --git a/include/wx/gtk/dialog.h b/include/wx/gtk/dialog.h index 6c9c99e2a1..44f11d3fdf 100644 --- a/include/wx/gtk/dialog.h +++ b/include/wx/gtk/dialog.h @@ -53,10 +53,10 @@ class wxDialog: public wxWindow wxDialog(void); wxDialog( wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = wxDEFAULT_DIALOG_STYLE, const wxString &name = wxDialogNameStr ); + long style = wxDEFAULT_DIALOG_STYLE, const wxString &name = wxDialogNameStr ); bool Create( wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = wxDEFAULT_DIALOG_STYLE, const wxString &name = wxDialogNameStr ); + long style = wxDEFAULT_DIALOG_STYLE, const wxString &name = wxDialogNameStr ); ~wxDialog(void); void SetTitle(const wxString& title); wxString GetTitle(void) const; @@ -69,7 +69,7 @@ class wxDialog: public wxWindow /* void OnCharHook(wxKeyEvent& event); */ - virtual bool Show( const bool show ); + virtual bool Show( bool show ); virtual int ShowModal(void); virtual void EndModal(int retCode); virtual bool IsModal(void) const { return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); } diff --git a/include/wx/gtk/dnd.h b/include/wx/gtk/dnd.h index 45bf0cf2f6..4b27e36da1 100644 --- a/include/wx/gtk/dnd.h +++ b/include/wx/gtk/dnd.h @@ -76,7 +76,7 @@ class wxDragSource: public wxObject wxDragSource( wxWindow *win ); ~wxDragSource(void); - void SetData( char *data, const long size ); + void SetData( char *data, long size ); void Start( int x, int y ); public: diff --git a/include/wx/gtk/frame.h b/include/wx/gtk/frame.h index aacd0b4274..42b6adb9a9 100644 --- a/include/wx/gtk/frame.h +++ b/include/wx/gtk/frame.h @@ -47,23 +47,23 @@ class wxFrame: public wxWindow public: wxFrame(void); - wxFrame( wxWindow *parent, const wxWindowID id, const wxString &title, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr ); - bool Create( wxWindow *parent, const wxWindowID id, const wxString &title, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr ); + wxFrame( wxWindow *parent, wxWindowID id, const wxString &title, + const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr ); + bool Create( wxWindow *parent, wxWindowID id, const wxString &title, + const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr ); ~wxFrame(void); bool Destroy(void); void OnCloseWindow( wxCloseEvent& event ); - virtual bool Show( const bool show ); - virtual void Enable( const bool enable ); + virtual bool Show( bool show ); + virtual void Enable( bool enable ); virtual void GetClientSize( int *width, int *height ) const; void OnSize( wxSizeEvent &event ); void SetMenuBar( wxMenuBar *menuBar ); - virtual bool CreateStatusBar( const int number = 1 ); - virtual void SetStatusText( const wxString &text, const int number = 0 ); - virtual void SetStatusWidths( const int n, const int *width ); + virtual bool CreateStatusBar( int number = 1 ); + virtual void SetStatusText( const wxString &text, int number = 0 ); + virtual void SetStatusWidths( int n, int *width ); wxStatusBar *GetStatusBar(void); wxMenuBar *GetMenuBar(void); void SetTitle( const wxString &title ); diff --git a/include/wx/gtk/gauge.h b/include/wx/gtk/gauge.h index 802e60fff7..2aa81557e1 100644 --- a/include/wx/gtk/gauge.h +++ b/include/wx/gtk/gauge.h @@ -44,27 +44,27 @@ class wxGauge: public wxControl public: inline wxGauge(void) { m_rangeMax = 0; m_gaugePos = 0; m_useProgressBar = TRUE; } - inline wxGauge(wxWindow *parent, const wxWindowID id, - const int range, + inline wxGauge(wxWindow *parent, wxWindowID id, + int range, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxGA_HORIZONTAL, + long style = wxGA_HORIZONTAL, const wxString& name = wxGaugeNameStr) { Create(parent, id, range, pos, size, style, name); }; - bool Create(wxWindow *parent, const wxWindowID id, - const int range, + bool Create(wxWindow *parent, wxWindowID id, + int range, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxGA_HORIZONTAL, + long style = wxGA_HORIZONTAL, const wxString& name = wxGaugeNameStr ); - void SetShadowWidth( const int WXUNUSED(w) ) {}; - void SetBezelFace( const int WXUNUSED(w) ) {}; - void SetRange( const int r ); - void SetValue( const int pos ); + void SetShadowWidth( int WXUNUSED(w) ) {}; + void SetBezelFace( int WXUNUSED(w) ) {}; + void SetRange( int r ); + void SetValue( int pos ); int GetShadowWidth(void) const { return 0; }; int GetBezelFace(void) const { return 0; }; int GetRange(void) const; diff --git a/include/wx/gtk/icon.h b/include/wx/gtk/icon.h index 57951a4e38..1f5907bb2a 100644 --- a/include/wx/gtk/icon.h +++ b/include/wx/gtk/icon.h @@ -41,7 +41,7 @@ public: inline wxIcon(const wxIcon& icon) { Ref(icon); } inline wxIcon(const wxIcon* icon) { if (icon) Ref(*icon); } - wxIcon( char **bits, const int width = -1, const int height = -1 ) : + wxIcon( char **bits, int width = -1, int height = -1 ) : wxBitmap( bits ) {}; inline wxIcon& operator = (const wxIcon& icon) { if (*this == icon) return (*this); Ref(icon); return *this; } diff --git a/include/wx/gtk/listbox.h b/include/wx/gtk/listbox.h index 9bbbb0fa42..55ba995672 100644 --- a/include/wx/gtk/listbox.h +++ b/include/wx/gtk/listbox.h @@ -46,33 +46,33 @@ class wxListBox: public wxControl wxListBox(void); wxListBox( wxWindow *parent, wxWindowID id, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const int n = 0, const wxString choices[] = NULL, - const long style = 0, const wxString &name = wxListBoxNameStr ); - bool Create( wxWindow *parent, wxWindowID id, + int n = 0, const wxString choices[] = NULL, + long style = 0, const wxString &name = wxListBoxNameStr ); + bool Create( wxWindow *parent, wxWindowID id, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const int n = 0, const wxString choices[] = NULL, - const long style = 0, const wxString &name = wxListBoxNameStr ); + int n = 0, const wxString choices[] = NULL, + long style = 0, const wxString &name = wxListBoxNameStr ); void Append( const wxString &item ); void Append( const wxString &item, char *clientData ); void Clear(void); void Delete( int n ); void Deselect( int n ); int FindString( const wxString &item ) const; - char *GetClientData( const int n ) const; + char *GetClientData( int n ) const; int GetSelection(void) const; int GetSelections( class wxArrayInt &) const; wxString GetString( int n ) const; wxString GetStringSelection(void) const; int Number(void); - bool Selected( const int n ); - void Set( const int n, const wxString *choices ); - void SetClientData( const int n, char *clientData ); + bool Selected( int n ); + void Set( int n, const wxString *choices ); + void SetClientData( int n, char *clientData ); void SetFirstItem( int n ); void SetFirstItem( const wxString &item ); - void SetSelection( const int n, const bool select = TRUE ); - void SetString( const int n, const wxString &string ); - void SetStringSelection( const wxString &string, const bool select = TRUE ); - + void SetSelection( int n, bool select = TRUE ); + void SetString( int n, const wxString &string ); + void SetStringSelection( const wxString &string, bool select = TRUE ); + private: GtkList *m_list; diff --git a/include/wx/gtk/mdi.h b/include/wx/gtk/mdi.h index ff9181d771..22fe70b2c4 100644 --- a/include/wx/gtk/mdi.h +++ b/include/wx/gtk/mdi.h @@ -52,15 +52,15 @@ class wxMDIParentFrame: public wxFrame wxMDIParentFrame(void); wxMDIParentFrame( wxWindow *parent, - const wxWindowID id, const wxString& title, + wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, + long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, const wxString& name = wxFrameNameStr ); ~wxMDIParentFrame(void); bool Create( wxWindow *parent, - const wxWindowID id, const wxString& title, + wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, + long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, const wxString& name = wxFrameNameStr ); void OnSize( wxSizeEvent& event ); @@ -101,21 +101,21 @@ class wxMDIChildFrame: public wxPanel wxMDIChildFrame(void); wxMDIChildFrame( wxMDIParentFrame *parent, - const wxWindowID id, const wxString& title, + wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr ); + long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr ); ~wxMDIChildFrame(void); bool Create( wxMDIParentFrame *parent, - const wxWindowID id, const wxString& title, + wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr ); + long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr ); void SetMenuBar( wxMenuBar *menu_bar ); // no status bars in wxGTK - virtual bool CreateStatusBar( const int WXUNUSED(number) = 1 ) { return FALSE; }; - virtual void SetStatusText( const wxString &WXUNUSED(text), const int WXUNUSED(number) ) {}; - virtual void SetStatusWidths( const int WXUNUSED(n), const int *WXUNUSED(width) ) {}; - + virtual bool CreateStatusBar( int WXUNUSED(number) = 1 ) { return FALSE; }; + virtual void SetStatusText( const wxString &WXUNUSED(text), int WXUNUSED(number) ) {}; + virtual void SetStatusWidths( int WXUNUSED(n), int *WXUNUSED(width) ) {}; + virtual void Maximize(void) {}; virtual void Restore(void) {}; virtual void Activate(void); @@ -136,9 +136,9 @@ class wxMDIClientWindow: public wxWindow public: wxMDIClientWindow(void); - wxMDIClientWindow( wxMDIParentFrame *parent, const long style = 0 ); + wxMDIClientWindow( wxMDIParentFrame *parent, long style = 0 ); ~wxMDIClientWindow(void); - virtual bool CreateClient( wxMDIParentFrame *parent, const long style = wxVSCROLL | wxHSCROLL ); + virtual bool CreateClient( wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL ); void AddChild( wxWindow *child ); }; diff --git a/include/wx/gtk/menu.h b/include/wx/gtk/menu.h index 7e24c65f6d..83376e780b 100644 --- a/include/wx/gtk/menu.h +++ b/include/wx/gtk/menu.h @@ -80,16 +80,16 @@ class wxMenu: public wxEvtHandler wxMenu( const wxString &title = "" ); void AppendSeparator(void); - void Append( const int id, const wxString &item, - const wxString &helpStr = "", const bool checkable = FALSE ); - void Append( const int id, const wxString &item, + void Append( int id, const wxString &item, + const wxString &helpStr = "", bool checkable = FALSE ); + void Append( int id, const wxString &item, wxMenu *subMenu, const wxString &helpStr = "" ); int FindItem( const wxString itemString ) const; void Break(void) {}; - void Enable( const int id, const bool enable ); - bool Enabled( const int id ) const; - void SetLabel( const int id, const wxString &label ); - + void Enable( int id, bool enable ); + bool Enabled( int id ) const; + void SetLabel( int id, const wxString &label ); + public: int FindMenuIdByMenuItem( GtkWidget *menuItem ) const; diff --git a/include/wx/gtk/notebook.h b/include/wx/gtk/notebook.h index 391c893cf9..bea1b55ffa 100644 --- a/include/wx/gtk/notebook.h +++ b/include/wx/gtk/notebook.h @@ -62,17 +62,17 @@ public: wxNotebook(); // the same arguments as for wxControl (@@@ any special styles?) wxNotebook(wxWindow *parent, - const wxWindowID id, + wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = 0, + long style = 0, const wxString& name = "notebook"); // Create() function bool Create(wxWindow *parent, - const wxWindowID id, + wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = 0, + long style = 0, const wxString& name = "notebook"); // dtor ~wxNotebook(); diff --git a/include/wx/gtk/palette.h b/include/wx/gtk/palette.h index 2163e73309..d6b7bbb64b 100644 --- a/include/wx/gtk/palette.h +++ b/include/wx/gtk/palette.h @@ -38,7 +38,7 @@ class wxPalette: public wxGDIObject public: wxPalette(void); - wxPalette( const 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(void); @@ -47,10 +47,10 @@ class wxPalette: public wxGDIObject bool operator != ( const wxPalette& palette ); bool Ok(void) const; - bool Create( const 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; - bool GetRGB( const int pixel, unsigned char *red, unsigned char *green, unsigned char *blue ) const; - + bool GetRGB( int pixel, unsigned char *red, unsigned char *green, unsigned char *blue ) const; + // no data }; diff --git a/include/wx/gtk/pen.h b/include/wx/gtk/pen.h index e3529c6699..a0eaa2a59b 100644 --- a/include/wx/gtk/pen.h +++ b/include/wx/gtk/pen.h @@ -50,7 +50,7 @@ class wxPen: public wxGDIObject void SetColour( const wxColour &colour ); void SetColour( const wxString &colourName ); - void SetColour( const int red, const int green, const int blue ); + void SetColour( int red, int green, int blue ); void SetCap( int capStyle ); void SetJoin( int joinStyle ); void SetStyle( int style ); diff --git a/include/wx/gtk/radiobox.h b/include/wx/gtk/radiobox.h index 7282de301c..f648659e65 100644 --- a/include/wx/gtk/radiobox.h +++ b/include/wx/gtk/radiobox.h @@ -46,35 +46,35 @@ class wxRadioBox: public wxControl public: wxRadioBox(void); - wxRadioBox( wxWindow *parent, const wxWindowID id, const wxString& title, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const int n = 0, const wxString choices[] = NULL, - const int majorDim = 0, const long style = wxRA_HORIZONTAL, + wxRadioBox( wxWindow *parent, wxWindowID id, const wxString& title, + const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + int majorDim = 0, long style = wxRA_HORIZONTAL, const wxString &name = wxRadioBoxNameStr ); - bool Create( wxWindow *parent, const wxWindowID id, const wxString& title, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const int n = 0, const wxString choices[] = NULL, - const int majorDim = 0, const long style = wxRA_HORIZONTAL, + bool Create( wxWindow *parent, wxWindowID id, const wxString& title, + const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + int majorDim = 0, long style = wxRA_HORIZONTAL, const wxString &name = wxRadioBoxNameStr ); int FindString( const wxString& s) const; - void SetSelection( const int n ); + void SetSelection( int n ); int GetSelection(void) const; - wxString GetString( const int n ) const; + wxString GetString( int n ) const; wxString GetLabel(void) const; void SetLabel( const wxString& label ); - void SetLabel( const int item, const wxString& label ); - void SetLabel( const int item, wxBitmap *bitmap ); - wxString GetLabel( const int item ) const; - bool Show( const bool show ); - void Enable( const bool enable ); - void Enable( const int item, const bool enable ); - void Show( const int item, const bool show ); + void SetLabel( int item, const wxString& label ); + void SetLabel( int item, wxBitmap *bitmap ); + wxString GetLabel( int item ) const; + bool Show( bool show ); + void Enable( bool enable ); + void Enable( int item, bool enable ); + void Show( int item, bool show ); virtual wxString GetStringSelection(void) const; virtual bool SetStringSelection( const wxString& s ); virtual int Number(void) const; int GetNumberOfRowsOrCols(void) const; - void SetNumberOfRowsOrCols( const int n ); - + void SetNumberOfRowsOrCols( int n ); + private: GtkRadioButton *m_radio; diff --git a/include/wx/gtk/scrolbar.h b/include/wx/gtk/scrolbar.h index 758e3cb18a..5badbfcb28 100644 --- a/include/wx/gtk/scrolbar.h +++ b/include/wx/gtk/scrolbar.h @@ -43,35 +43,35 @@ class wxScrollBar: public wxControl public: wxScrollBar(void) { m_adjust = NULL; m_oldPos = 0.0; }; - wxScrollBar(wxWindow *parent, const wxWindowID id, + wxScrollBar(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxSB_HORIZONTAL, + long style = wxSB_HORIZONTAL, const wxString& name = wxScrollBarNameStr ); ~wxScrollBar(void); - bool Create(wxWindow *parent, const wxWindowID id, + bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxSB_HORIZONTAL, + long style = wxSB_HORIZONTAL, const wxString& name = wxScrollBarNameStr); int GetPosition(void) const; int GetThumbSize() const; int GetPageSize() const; int GetRange() const; - virtual void SetPosition( const int viewStart ); - virtual void SetScrollbar( const int position, const int thumbSize, const int range, const int pageSize, - const bool refresh = TRUE ); + virtual void SetPosition( int viewStart ); + virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize, + bool refresh = TRUE ); // Backward compatibility int GetValue(void) const; - void SetValue( const int viewStart ); + void SetValue( int viewStart ); void GetValues( int *viewStart, int *viewLength, int *objectLength, int *pageLength) const; int GetViewLength() const; int GetObjectLength() const; - void SetPageSize( const int pageLength ); - void SetObjectLength( const int objectLength ); - void SetViewLength( const int viewLength ); - + void SetPageSize( int pageLength ); + void SetObjectLength( int objectLength ); + void SetViewLength( int viewLength ); + public: GtkAdjustment *m_adjust; diff --git a/include/wx/gtk/slider.h b/include/wx/gtk/slider.h index a983248fed..dda48b2093 100644 --- a/include/wx/gtk/slider.h +++ b/include/wx/gtk/slider.h @@ -43,43 +43,43 @@ class wxSlider: public wxControl public: wxSlider(void); - wxSlider( wxWindow *parent, const wxWindowID id, - const int value, const int minValue, const int maxValue, + wxSlider( wxWindow *parent, wxWindowID id, + int value, int minValue, int maxValue, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxSL_HORIZONTAL, + long style = wxSL_HORIZONTAL, /* const wxValidator& validator = wxDefaultValidator, */ const wxString& name = wxSliderNameStr); ~wxSlider(void); - bool Create(wxWindow *parent, const wxWindowID id, - const int value, const int minValue, const int maxValue, + bool Create(wxWindow *parent, wxWindowID id, + int value, int minValue, int maxValue, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxSL_HORIZONTAL, + long style = wxSL_HORIZONTAL, /* const wxValidator& validator = wxDefaultValidator, */ const wxString& name = wxSliderNameStr); virtual int GetValue(void) const; - virtual void SetValue( const int ); + virtual void SetValue( int ); void GetSize( int *x, int *y ) const; - void SetSize( const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO ); + void SetSize( int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO ); void GetPosition( int *x, int *y ) const; - void SetRange( const int minValue, const int maxValue ); + void SetRange( int minValue, int maxValue ); int GetMin(void) const; int GetMax(void) const; - void SetTickFreq( const int n, const int pos ); + void SetTickFreq( int n, int pos ); int GetTickFreq(void) const; - void SetPageSize( const int pageSize ); + void SetPageSize( int pageSize ); int GetPageSize(void) const; void ClearSel(void); void ClearTicks(void); - void SetLineSize( const int lineSize ); + void SetLineSize( int lineSize ); int GetLineSize(void) const; int GetSelEnd(void) const; int GetSelStart(void) const; - void SetSelection( const int minPos, const int maxPos ); - void SetThumbLength( const int len ); + void SetSelection( int minPos, int maxPos ); + void SetThumbLength( int len ); int GetThumbLength(void) const; - void SetTick( const int tickPos ); + void SetTick( int tickPos ); public: diff --git a/include/wx/gtk/statbmp.h b/include/wx/gtk/statbmp.h index ec24d42dea..b534110b1d 100644 --- a/include/wx/gtk/statbmp.h +++ b/include/wx/gtk/statbmp.h @@ -43,12 +43,12 @@ class wxStaticBitmap: public wxControl public: wxStaticBitmap(void); - wxStaticBitmap( wxWindow *parent, const wxWindowID id, const wxBitmap& label, + wxStaticBitmap( wxWindow *parent, wxWindowID id, const wxBitmap& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = 0, const wxString& name = wxStaticBitmapNameStr ); - bool Create( wxWindow *parent, const wxWindowID id, const wxBitmap& label, + long style = 0, const wxString& name = wxStaticBitmapNameStr ); + bool Create( wxWindow *parent, wxWindowID id, const wxBitmap& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = 0, const wxString& name = wxStaticBitmapNameStr); + long style = 0, const wxString& name = wxStaticBitmapNameStr); virtual void SetBitmap( const wxBitmap& bitmap ); wxBitmap& GetBitmap(void) const { return (wxBitmap&)m_bitmap; } diff --git a/include/wx/gtk/statbox.h b/include/wx/gtk/statbox.h index a260d4f05e..a6248a6bc9 100644 --- a/include/wx/gtk/statbox.h +++ b/include/wx/gtk/statbox.h @@ -46,10 +46,10 @@ class wxStaticBox: public wxControl wxStaticBox(void); wxStaticBox( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = wxStaticBoxNameStr ); - bool Create( wxWindow *parent, wxWindowID id, const wxString &label, + long style = 0, const wxString &name = wxStaticBoxNameStr ); + bool Create( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = wxStaticBoxNameStr ); + long style = 0, const wxString &name = wxStaticBoxNameStr ); }; #endif // __GTKSTATICBOXH__ diff --git a/include/wx/gtk/stattext.h b/include/wx/gtk/stattext.h index 12d8d6995e..e60303c890 100644 --- a/include/wx/gtk/stattext.h +++ b/include/wx/gtk/stattext.h @@ -46,10 +46,10 @@ class wxStaticText: public wxControl wxStaticText(void); wxStaticText( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = wxStaticTextNameStr ); + long style = 0, const wxString &name = wxStaticTextNameStr ); bool Create( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = wxStaticTextNameStr ); + long style = 0, const wxString &name = wxStaticTextNameStr ); wxString GetLabel(void) const; void SetLabel( const wxString &label ); }; diff --git a/include/wx/gtk/tbargtk.h b/include/wx/gtk/tbargtk.h index adb04a56f0..667f84ff47 100644 --- a/include/wx/gtk/tbargtk.h +++ b/include/wx/gtk/tbargtk.h @@ -50,9 +50,9 @@ class wxToolBarTool: public wxObject public: wxToolBarTool(void) {}; - wxToolBarTool( wxToolBarGTK *owner, const int theIndex = 0, - const wxBitmap& bitmap1 = wxNullBitmap, const wxBitmap& bitmap2 = wxNullBitmap, - const bool toggle = FALSE, wxObject *clientData = NULL, + wxToolBarTool( wxToolBarGTK *owner, int theIndex = 0, + const wxBitmap& bitmap1 = wxNullBitmap, const wxBitmap& bitmap2 = wxNullBitmap, + bool toggle = FALSE, wxObject *clientData = NULL, const wxString& shortHelpString = "", const wxString& longHelpString = ""); ~wxToolBarTool(void); @@ -84,14 +84,14 @@ class wxToolBarGTK: public wxControl public: wxToolBarGTK(void); - wxToolBarGTK( wxWindow *parent, const wxWindowID id, + wxToolBarGTK( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = 0, const wxString& name = wxToolBarNameStr ); + long style = 0, const wxString& name = wxToolBarNameStr ); ~wxToolBarGTK(void); - bool Create( wxWindow *parent, const wxWindowID id, + bool Create( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = 0, const wxString& name = wxToolBarNameStr); + long style = 0, const wxString& name = wxToolBarNameStr); // Only allow toggle if returns TRUE. Call when left button up. virtual bool OnLeftClick(int toolIndex, bool toggleDown); @@ -106,26 +106,26 @@ class wxToolBarGTK: public wxControl // If pushedBitmap is NULL, a reversed version of bitmap is // created and used as the pushed/toggled image. // If toggle is TRUE, the button toggles between the two states. - virtual wxToolBarTool *AddTool( const int toolIndex, const wxBitmap& bitmap, - const wxBitmap& pushedBitmap = wxNullBitmap, const bool toggle = FALSE, - const float xPos = -1, const float yPos = -1, wxObject *clientData = NULL, + virtual wxToolBarTool *AddTool( int toolIndex, const wxBitmap& bitmap, + const wxBitmap& pushedBitmap = wxNullBitmap, bool toggle = FALSE, + float xPos = -1, float yPos = -1, wxObject *clientData = NULL, const wxString& helpString1 = "", const wxString& helpString2 = ""); virtual void AddSeparator(void); virtual void ClearTools(void); - virtual void EnableTool(const int toolIndex, const bool enable); - virtual void ToggleTool(const int toolIndex, const bool toggle); // toggle is TRUE if toggled on - virtual void SetToggle(const int toolIndex, const bool toggle); // Set this to be togglable (or not) - virtual wxObject *GetToolClientData(const int index) const; + virtual void EnableTool(int toolIndex, bool enable); + virtual void ToggleTool(int toolIndex, bool toggle); // toggle is TRUE if toggled on + virtual void SetToggle(int toolIndex, bool toggle); // Set this to be togglable (or not) + virtual wxObject *GetToolClientData(int index) const; - virtual bool GetToolState(const int toolIndex) const; - virtual bool GetToolEnabled(const int toolIndex) const; + virtual bool GetToolState(int toolIndex) const; + virtual bool GetToolEnabled(int toolIndex) const; - virtual void SetMargins(const int x, const int y); + virtual void SetMargins(int x, int y); void SetMargins(const wxSize& size) { SetMargins(size.x, size.y); }; - virtual void SetToolPacking(const int packing); - virtual void SetToolSeparation(const int separation); - + virtual void SetToolPacking(int packing); + virtual void SetToolSeparation(int separation); + public: GtkToolbar *m_toolbar; diff --git a/include/wx/gtk/textctrl.h b/include/wx/gtk/textctrl.h index 249ed18c17..feceacc12e 100644 --- a/include/wx/gtk/textctrl.h +++ b/include/wx/gtk/textctrl.h @@ -50,12 +50,12 @@ class wxTextCtrl: public wxControl, public streambuf public: wxTextCtrl(void); - wxTextCtrl( wxWindow *parent, const wxWindowID id, const wxString &value = "", - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const int style = 0, const wxString &name = wxTextCtrlNameStr ); - bool Create( wxWindow *parent, const wxWindowID id, const wxString &value = "", - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const int style = 0, const wxString &name = wxTextCtrlNameStr ); + wxTextCtrl( wxWindow *parent, wxWindowID id, const wxString &value = "", + const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, + int style = 0, const wxString &name = wxTextCtrlNameStr ); + bool Create( wxWindow *parent, wxWindowID id, const wxString &value = "", + const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, + int style = 0, const wxString &name = wxTextCtrlNameStr ); wxString GetValue(void) const; void SetValue( const wxString &value ); void WriteText( const wxString &text ); @@ -65,21 +65,21 @@ class wxTextCtrl: public wxControl, public streambuf bool IsModified(void); void DiscardEdits(void); /* - wxString GetLineText( const long lineNo ) const; + wxString GetLineText( long lineNo ) const; void OnDropFiles( wxDropFilesEvent &event ); - long PositionToXY( const long pos, long *x, long *y ) const; - long XYToPosition( const long x, const long y ); + long PositionToXY( long pos, long *x, long *y ) const; + long XYToPosition( long x, long y ); int GetNumberOfLines(void); */ - virtual void SetInsertionPoint( const long pos ); + virtual void SetInsertionPoint( long pos ); virtual void SetInsertionPointEnd(void); - virtual void SetEditable( const bool editable ); - virtual void SetSelection( const long from, const long to ); - void ShowPosition( const long pos ); + virtual void SetEditable( bool editable ); + virtual void SetSelection( long from, long to ); + void ShowPosition( long pos ); virtual long GetInsertionPoint(void) const; virtual long GetLastPosition(void) const; - virtual void Remove( const long from, const long to ); - virtual void Replace( const long from, const long to, const wxString &value ); + virtual void Remove( long from, long to ); + virtual void Replace( long from, long to, const wxString &value ); void Cut(void); void Copy(void); void Paste(void); @@ -92,10 +92,10 @@ class wxTextCtrl: public wxControl, public streambuf int underflow(void); wxTextCtrl& operator<<(const wxString& s); - wxTextCtrl& operator<<(const int i); - wxTextCtrl& operator<<(const long i); - wxTextCtrl& operator<<(const float f); - wxTextCtrl& operator<<(const double d); + wxTextCtrl& operator<<(int i); + wxTextCtrl& operator<<(long i); + wxTextCtrl& operator<<(float f); + wxTextCtrl& operator<<(double d); wxTextCtrl& operator<<(const char c); public: diff --git a/include/wx/gtk/window.h b/include/wx/gtk/window.h index 40fbc48706..0bba976592 100644 --- a/include/wx/gtk/window.h +++ b/include/wx/gtk/window.h @@ -63,35 +63,35 @@ class wxWindow: public wxEvtHandler public: wxWindow(void); - wxWindow( wxWindow *parent, const wxWindowID id, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = wxPanelNameStr ); - bool Create( wxWindow *parent, const wxWindowID id, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = wxPanelNameStr ); + wxWindow( wxWindow *parent, wxWindowID id, + const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, + long style = 0, const wxString &name = wxPanelNameStr ); + bool Create( wxWindow *parent, wxWindowID id, + const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, + long style = 0, const wxString &name = wxPanelNameStr ); virtual ~wxWindow(void); - bool Close( const bool force = FALSE ); + bool Close( bool force = FALSE ); virtual bool Destroy(void); virtual bool DestroyChildren(void); virtual void PrepareDC( wxDC &dc ); - virtual void SetSize( const int x, const int y, const int width, const int height, - const int sizeFlags = wxSIZE_AUTO ); - virtual void SetSize( const int width, const int height ); - virtual void Move( const int x, const int y ); + virtual void SetSize( int x, int y, int width, int height, + int sizeFlags = wxSIZE_AUTO ); + virtual void SetSize( int width, int height ); + virtual void Move( int x, int y ); virtual void GetSize( int *width, int *height ) const; virtual void SetClientSize( int const width, int const height ); virtual void GetClientSize( int *width, int *height ) const; virtual void GetPosition( int *x, int *y ) const; - virtual void Centre( const int direction = wxHORIZONTAL ); + virtual void Centre( int direction = wxHORIZONTAL ); virtual void Fit(void); void OnSize( wxSizeEvent &event ); - virtual bool Show( const bool show ); - virtual void Enable( const bool enable ); - virtual void MakeModal( const bool modal ); + virtual bool Show( bool show ); + virtual void Enable( bool enable ); + virtual void MakeModal( bool modal ); virtual bool IsEnabled(void) const { return m_isEnabled; }; virtual void SetFocus(void); virtual bool OnClose(void); @@ -116,11 +116,11 @@ class wxWindow: public wxEvtHandler void SetCursor( const wxCursor &cursor ); - virtual void Refresh( const bool eraseBackground = TRUE, const wxRect *rect = NULL ); + virtual void Refresh( bool eraseBackground = TRUE, const wxRect *rect = NULL ); virtual void Clear(void); - virtual bool IsExposed( const long x, const long y ); - virtual bool IsExposed( const long x, const long y, const long width, const long height ); - + virtual bool IsExposed( long x, long y ); + virtual bool IsExposed( long x, long y, long width, long height ); + virtual wxColour GetBackgroundColour(void) const; virtual void SetBackgroundColour( const wxColour &colour ); @@ -154,7 +154,7 @@ class wxWindow: public wxEvtHandler virtual bool IsShown(void); virtual bool IsRetained(void); - virtual wxWindow *FindWindow( const long id ); + virtual wxWindow *FindWindow( long id ); virtual wxWindow *FindWindow( const wxString& name ); void AllowDoubleClick( bool WXUNUSED(allow) ) {}; void SetDoubleClick( bool WXUNUSED(allow) ) {}; @@ -170,18 +170,18 @@ class wxWindow: public wxEvtHandler virtual void SetDropTarget( wxDropTarget *dropTarget ); virtual wxDropTarget *GetDropTarget() const; - virtual void SetScrollbar( const int orient, const int pos, const int thumbVisible, - const int range, const bool refresh = TRUE ); - virtual void SetScrollPos( const int orient, const int pos, const bool refresh = TRUE ); - virtual int GetScrollPos( const int orient ) const; - virtual int GetScrollThumb( const int orient ) const; - virtual int GetScrollRange( const int orient ) const; - virtual void ScrollWindow( const int dx, const int dy, const wxRect* rect = NULL ); - + virtual void SetScrollbar( int orient, int pos, int thumbVisible, + int range, bool refresh = TRUE ); + virtual void SetScrollPos( int orient, int pos, bool refresh = TRUE ); + virtual int GetScrollPos( int orient ) const; + virtual int GetScrollThumb( int orient ) const; + virtual int GetScrollRange( int orient ) const; + virtual void ScrollWindow( int dx, int dy, const wxRect* rect = NULL ); + public: // cannot get private going yet - void PreCreation( wxWindow *parent, const wxWindowID id, const wxPoint &pos, - const wxSize &size, const long style, const wxString &name ); + void PreCreation( wxWindow *parent, wxWindowID id, const wxPoint &pos, + const wxSize &size, long style, const wxString &name ); void PostCreation(void); bool HasVMT(void); virtual void ImplementSetSize(void); @@ -230,7 +230,7 @@ class wxWindow: public wxEvtHandler wxLayoutConstraints *GetConstraints(void) const; void SetConstraints( wxLayoutConstraints *constraints ); - void SetAutoLayout( const bool autoLayout ); + void SetAutoLayout( bool autoLayout ); bool GetAutoLayout(void) const; bool Layout(void); void SetSizer( wxSizer *sizer ); @@ -243,15 +243,15 @@ class wxWindow: public wxEvtHandler void RemoveConstraintReference(wxWindow *otherWin); void DeleteRelatedConstraints(void); virtual void ResetConstraints(void); - virtual void SetConstraintSizes(const bool recurse = TRUE); + virtual void SetConstraintSizes(bool recurse = TRUE); virtual bool LayoutPhase1(int *noChanges); virtual bool LayoutPhase2(int *noChanges); - virtual bool DoPhase(const int); + virtual bool DoPhase(int); virtual void TransformSizerToActual(int *x, int *y) const ; - virtual void SizerSetSize(const int x, const int y, const int w, const int h); - virtual void SizerMove(const int x, const int y); - virtual void SetSizeConstraint(const int x, const int y, const int w, const int h); - virtual void MoveConstraint(const int x, const int y); + virtual void SizerSetSize(int x, int y, int w, int h); + virtual void SizerMove(int x, int y); + virtual void SetSizeConstraint(int x, int y, int w, int h); + virtual void MoveConstraint(int x, int y); virtual void GetSizeConstraint(int *w, int *h) const ; virtual void GetClientSizeConstraint(int *w, int *h) const ; virtual void GetPositionConstraint(int *x, int *y) const ; diff --git a/include/wx/gtk1/bitmap.h b/include/wx/gtk1/bitmap.h index 4d5acb76f7..876eba2249 100644 --- a/include/wx/gtk1/bitmap.h +++ b/include/wx/gtk1/bitmap.h @@ -47,7 +47,7 @@ class wxMask: public wxObject wxMask(void); wxMask( const wxBitmap& bitmap, const wxColour& colour ); - wxMask( const wxBitmap& bitmap, const int paletteIndex ); + wxMask( const wxBitmap& bitmap, int paletteIndex ); wxMask( const wxBitmap& bitmap ); ~wxMask(void); @@ -80,12 +80,12 @@ class wxBitmap: public wxObject public: wxBitmap(void); - wxBitmap( const int width, const int height, const int depth = -1 ); - wxBitmap( const char bits[], const int width, const int height, const int depth = 1 ); + wxBitmap( int width, int height, int depth = -1 ); + wxBitmap( const char bits[], int width, int height, int depth = 1 ); wxBitmap( char **bits ); wxBitmap( const wxBitmap& bmp ); wxBitmap( const wxBitmap* bmp ); - wxBitmap( const wxString &filename, const int type ); + wxBitmap( const wxString &filename, int type ); ~wxBitmap(void); wxBitmap& operator = ( const wxBitmap& bmp ); bool operator == ( const wxBitmap& bmp ); @@ -95,16 +95,16 @@ class wxBitmap: public wxObject int GetHeight(void) const; int GetWidth(void) const; int GetDepth(void) const; - void SetHeight( const int height ); - void SetWidth( const int width ); - void SetDepth( const int depth ); + void SetHeight( int height ); + void SetWidth( int width ); + void SetDepth( int depth ); wxMask *GetMask(void) const; void SetMask( wxMask *mask ); - bool SaveFile( const wxString &name, const int type, wxPalette *palette = NULL ); - bool LoadFile( const wxString &name, const int type ); - + bool SaveFile( const wxString &name, int type, wxPalette *palette = NULL ); + bool LoadFile( const wxString &name, int type ); + wxPalette *GetPalette(void) const; wxPalette *GetColourMap(void) const { return GetPalette(); }; diff --git a/include/wx/gtk1/bmpbuttn.h b/include/wx/gtk1/bmpbuttn.h index 57bc2c3873..659e9443dc 100644 --- a/include/wx/gtk1/bmpbuttn.h +++ b/include/wx/gtk1/bmpbuttn.h @@ -46,10 +46,10 @@ class wxBitmapButton: public wxControl wxBitmapButton(void); wxBitmapButton( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = wxButtonNameStr ); + long style = 0, const wxString &name = wxButtonNameStr ); bool Create( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = wxButtonNameStr ); + long style = 0, const wxString &name = wxButtonNameStr ); void SetDefault(void); void SetLabel( const wxString &label ); wxString GetLabel(void) const; diff --git a/include/wx/gtk1/brush.h b/include/wx/gtk1/brush.h index 3cac78adc7..32048f67b7 100644 --- a/include/wx/gtk1/brush.h +++ b/include/wx/gtk1/brush.h @@ -39,8 +39,8 @@ class wxBrush: public wxGDIObject public: wxBrush(void); - wxBrush( const wxColour &colour, const int style ); - wxBrush( const wxString &colourName, const int style ); + wxBrush( const wxColour &colour, int style ); + wxBrush( const wxString &colourName, int style ); wxBrush( const wxBitmap &stippleBitmap ); wxBrush( const wxBrush &brush ); wxBrush( const wxBrush *brush ); diff --git a/include/wx/gtk1/button.h b/include/wx/gtk1/button.h index b0e2220c0e..6932755578 100644 --- a/include/wx/gtk1/button.h +++ b/include/wx/gtk1/button.h @@ -46,10 +46,10 @@ class wxButton: public wxControl wxButton(void); wxButton( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = wxButtonNameStr ); + long style = 0, const wxString &name = wxButtonNameStr ); bool Create( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = wxButtonNameStr ); + long style = 0, const wxString &name = wxButtonNameStr ); void SetDefault(void); void SetLabel( const wxString &label ); wxString GetLabel(void) const; diff --git a/include/wx/gtk1/checkbox.h b/include/wx/gtk1/checkbox.h index 0f95924e1b..6ff10bcecc 100644 --- a/include/wx/gtk1/checkbox.h +++ b/include/wx/gtk1/checkbox.h @@ -46,11 +46,11 @@ class wxCheckBox: public wxControl wxCheckBox(void); wxCheckBox( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = wxCheckBoxNameStr ); + long style = 0, const wxString &name = wxCheckBoxNameStr ); bool Create( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = wxCheckBoxNameStr ); - void SetValue( const bool state ); + long style = 0, const wxString &name = wxCheckBoxNameStr ); + void SetValue( bool state ); bool GetValue(void) const; }; diff --git a/include/wx/gtk1/choice.h b/include/wx/gtk1/choice.h index b3feb2c065..99e7ec0878 100644 --- a/include/wx/gtk1/choice.h +++ b/include/wx/gtk1/choice.h @@ -44,24 +44,24 @@ class wxChoice: public wxControl public: wxChoice(void); - wxChoice( wxWindow *parent, const wxWindowID id, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const int n = 0, const wxString choices[] = NULL, - const long style = 0, const wxString &name = wxChoiceNameStr ); - bool Create( wxWindow *parent, const wxWindowID id, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const int n = 0, const wxString choices[] = NULL, - const long style = 0, const wxString &name = wxChoiceNameStr ); + wxChoice( wxWindow *parent, wxWindowID id, + const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, const wxString &name = wxChoiceNameStr ); + bool Create( wxWindow *parent, wxWindowID id, + const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, const wxString &name = wxChoiceNameStr ); void Append( const wxString &item ); void Clear(void); int FindString( const wxString &string ) const; int GetColumns(void) const; int GetSelection(void); - wxString GetString( const int n ) const; + wxString GetString( int n ) const; wxString GetStringSelection(void) const; int Number(void) const; - void SetColumns( const int n = 1 ); - void SetSelection( const int n ); + void SetColumns( int n = 1 ); + void SetSelection( int n ); void SetStringSelection( const wxString &string ); }; diff --git a/include/wx/gtk1/combobox.h b/include/wx/gtk1/combobox.h index 464771efcf..28a906f941 100644 --- a/include/wx/gtk1/combobox.h +++ b/include/wx/gtk1/combobox.h @@ -44,39 +44,39 @@ class wxComboBox: public wxControl public: inline wxComboBox(void) {} - inline wxComboBox(wxWindow *parent, const wxWindowID id, + inline wxComboBox(wxWindow *parent, wxWindowID id, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const int n = 0, const wxString choices[] = NULL, - const long style = 0, + int n = 0, const wxString choices[] = NULL, + long style = 0, const wxString& name = wxComboBoxNameStr) { Create(parent, id, value, pos, size, n, choices, style, name); } - bool Create(wxWindow *parent, const wxWindowID id, + bool Create(wxWindow *parent, wxWindowID id, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const int n = 0, const wxString choices[] = NULL, - const long style = 0, + int n = 0, const wxString choices[] = NULL, + long style = 0, const wxString& name = wxComboBoxNameStr); // List functions void Clear(void); void Append( const wxString &item ); void Append( const wxString &item, char* clientData ); - void Delete( const int n ); + void Delete( int n ); int FindString( const wxString &item ); - char* GetClientData( const int n ); - void SetClientData( const int n, char * clientData ); + char* GetClientData( int n ); + void SetClientData( int n, char * clientData ); int GetSelection(void) const; - wxString GetString( const int n ) const; + wxString GetString( int n ) const; wxString GetStringSelection(void) const; int Number(void) const; - void SetSelection( const int n ); - + void SetSelection( int n ); + // Text field functions wxString GetValue(void) const ; void SetValue(const wxString& value); @@ -85,15 +85,15 @@ class wxComboBox: public wxControl void Copy(void); void Cut(void); void Paste(void); - void SetInsertionPoint(const long pos); + void SetInsertionPoint(long pos); void SetInsertionPointEnd(void); long GetInsertionPoint(void) const ; long GetLastPosition(void) const ; - void Replace(const long from, const long to, const wxString& value); - void Remove(const long from, const long to); - void SetSelection(const long from, const long to); - void SetEditable(const bool editable); - + void Replace(long from, long to, const wxString& value); + void Remove(long from, long to); + void SetSelection(long from, long to); + void SetEditable(bool editable); + private: wxList m_clientData; diff --git a/include/wx/gtk1/control.h b/include/wx/gtk1/control.h index ad8ea7abea..a40bbf3aae 100644 --- a/include/wx/gtk1/control.h +++ b/include/wx/gtk1/control.h @@ -40,7 +40,7 @@ class wxControl: public wxWindow wxControl(void); wxControl( wxWindow *parent, wxWindowID id, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = wxPanelNameStr ); + long style = 0, const wxString &name = wxPanelNameStr ); virtual void Command( wxCommandEvent &event ); virtual void SetLabel( const wxString &label ); virtual wxString GetLabel(void) const; diff --git a/include/wx/gtk1/cursor.h b/include/wx/gtk1/cursor.h index a6fcb40b17..b760e0b512 100644 --- a/include/wx/gtk1/cursor.h +++ b/include/wx/gtk1/cursor.h @@ -39,7 +39,7 @@ class wxCursor: public wxObject public: wxCursor(void); - wxCursor( const int cursorId ); + wxCursor( int cursorId ); wxCursor( const wxCursor &cursor ); wxCursor( const wxCursor *cursor ); ~wxCursor(void); diff --git a/include/wx/gtk1/dialog.h b/include/wx/gtk1/dialog.h index 6c9c99e2a1..44f11d3fdf 100644 --- a/include/wx/gtk1/dialog.h +++ b/include/wx/gtk1/dialog.h @@ -53,10 +53,10 @@ class wxDialog: public wxWindow wxDialog(void); wxDialog( wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = wxDEFAULT_DIALOG_STYLE, const wxString &name = wxDialogNameStr ); + long style = wxDEFAULT_DIALOG_STYLE, const wxString &name = wxDialogNameStr ); bool Create( wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = wxDEFAULT_DIALOG_STYLE, const wxString &name = wxDialogNameStr ); + long style = wxDEFAULT_DIALOG_STYLE, const wxString &name = wxDialogNameStr ); ~wxDialog(void); void SetTitle(const wxString& title); wxString GetTitle(void) const; @@ -69,7 +69,7 @@ class wxDialog: public wxWindow /* void OnCharHook(wxKeyEvent& event); */ - virtual bool Show( const bool show ); + virtual bool Show( bool show ); virtual int ShowModal(void); virtual void EndModal(int retCode); virtual bool IsModal(void) const { return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); } diff --git a/include/wx/gtk1/dnd.h b/include/wx/gtk1/dnd.h index 45bf0cf2f6..4b27e36da1 100644 --- a/include/wx/gtk1/dnd.h +++ b/include/wx/gtk1/dnd.h @@ -76,7 +76,7 @@ class wxDragSource: public wxObject wxDragSource( wxWindow *win ); ~wxDragSource(void); - void SetData( char *data, const long size ); + void SetData( char *data, long size ); void Start( int x, int y ); public: diff --git a/include/wx/gtk1/frame.h b/include/wx/gtk1/frame.h index aacd0b4274..42b6adb9a9 100644 --- a/include/wx/gtk1/frame.h +++ b/include/wx/gtk1/frame.h @@ -47,23 +47,23 @@ class wxFrame: public wxWindow public: wxFrame(void); - wxFrame( wxWindow *parent, const wxWindowID id, const wxString &title, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr ); - bool Create( wxWindow *parent, const wxWindowID id, const wxString &title, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr ); + wxFrame( wxWindow *parent, wxWindowID id, const wxString &title, + const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr ); + bool Create( wxWindow *parent, wxWindowID id, const wxString &title, + const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr ); ~wxFrame(void); bool Destroy(void); void OnCloseWindow( wxCloseEvent& event ); - virtual bool Show( const bool show ); - virtual void Enable( const bool enable ); + virtual bool Show( bool show ); + virtual void Enable( bool enable ); virtual void GetClientSize( int *width, int *height ) const; void OnSize( wxSizeEvent &event ); void SetMenuBar( wxMenuBar *menuBar ); - virtual bool CreateStatusBar( const int number = 1 ); - virtual void SetStatusText( const wxString &text, const int number = 0 ); - virtual void SetStatusWidths( const int n, const int *width ); + virtual bool CreateStatusBar( int number = 1 ); + virtual void SetStatusText( const wxString &text, int number = 0 ); + virtual void SetStatusWidths( int n, int *width ); wxStatusBar *GetStatusBar(void); wxMenuBar *GetMenuBar(void); void SetTitle( const wxString &title ); diff --git a/include/wx/gtk1/gauge.h b/include/wx/gtk1/gauge.h index 802e60fff7..2aa81557e1 100644 --- a/include/wx/gtk1/gauge.h +++ b/include/wx/gtk1/gauge.h @@ -44,27 +44,27 @@ class wxGauge: public wxControl public: inline wxGauge(void) { m_rangeMax = 0; m_gaugePos = 0; m_useProgressBar = TRUE; } - inline wxGauge(wxWindow *parent, const wxWindowID id, - const int range, + inline wxGauge(wxWindow *parent, wxWindowID id, + int range, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxGA_HORIZONTAL, + long style = wxGA_HORIZONTAL, const wxString& name = wxGaugeNameStr) { Create(parent, id, range, pos, size, style, name); }; - bool Create(wxWindow *parent, const wxWindowID id, - const int range, + bool Create(wxWindow *parent, wxWindowID id, + int range, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxGA_HORIZONTAL, + long style = wxGA_HORIZONTAL, const wxString& name = wxGaugeNameStr ); - void SetShadowWidth( const int WXUNUSED(w) ) {}; - void SetBezelFace( const int WXUNUSED(w) ) {}; - void SetRange( const int r ); - void SetValue( const int pos ); + void SetShadowWidth( int WXUNUSED(w) ) {}; + void SetBezelFace( int WXUNUSED(w) ) {}; + void SetRange( int r ); + void SetValue( int pos ); int GetShadowWidth(void) const { return 0; }; int GetBezelFace(void) const { return 0; }; int GetRange(void) const; diff --git a/include/wx/gtk1/icon.h b/include/wx/gtk1/icon.h index 57951a4e38..1f5907bb2a 100644 --- a/include/wx/gtk1/icon.h +++ b/include/wx/gtk1/icon.h @@ -41,7 +41,7 @@ public: inline wxIcon(const wxIcon& icon) { Ref(icon); } inline wxIcon(const wxIcon* icon) { if (icon) Ref(*icon); } - wxIcon( char **bits, const int width = -1, const int height = -1 ) : + wxIcon( char **bits, int width = -1, int height = -1 ) : wxBitmap( bits ) {}; inline wxIcon& operator = (const wxIcon& icon) { if (*this == icon) return (*this); Ref(icon); return *this; } diff --git a/include/wx/gtk1/listbox.h b/include/wx/gtk1/listbox.h index 9bbbb0fa42..55ba995672 100644 --- a/include/wx/gtk1/listbox.h +++ b/include/wx/gtk1/listbox.h @@ -46,33 +46,33 @@ class wxListBox: public wxControl wxListBox(void); wxListBox( wxWindow *parent, wxWindowID id, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const int n = 0, const wxString choices[] = NULL, - const long style = 0, const wxString &name = wxListBoxNameStr ); - bool Create( wxWindow *parent, wxWindowID id, + int n = 0, const wxString choices[] = NULL, + long style = 0, const wxString &name = wxListBoxNameStr ); + bool Create( wxWindow *parent, wxWindowID id, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const int n = 0, const wxString choices[] = NULL, - const long style = 0, const wxString &name = wxListBoxNameStr ); + int n = 0, const wxString choices[] = NULL, + long style = 0, const wxString &name = wxListBoxNameStr ); void Append( const wxString &item ); void Append( const wxString &item, char *clientData ); void Clear(void); void Delete( int n ); void Deselect( int n ); int FindString( const wxString &item ) const; - char *GetClientData( const int n ) const; + char *GetClientData( int n ) const; int GetSelection(void) const; int GetSelections( class wxArrayInt &) const; wxString GetString( int n ) const; wxString GetStringSelection(void) const; int Number(void); - bool Selected( const int n ); - void Set( const int n, const wxString *choices ); - void SetClientData( const int n, char *clientData ); + bool Selected( int n ); + void Set( int n, const wxString *choices ); + void SetClientData( int n, char *clientData ); void SetFirstItem( int n ); void SetFirstItem( const wxString &item ); - void SetSelection( const int n, const bool select = TRUE ); - void SetString( const int n, const wxString &string ); - void SetStringSelection( const wxString &string, const bool select = TRUE ); - + void SetSelection( int n, bool select = TRUE ); + void SetString( int n, const wxString &string ); + void SetStringSelection( const wxString &string, bool select = TRUE ); + private: GtkList *m_list; diff --git a/include/wx/gtk1/mdi.h b/include/wx/gtk1/mdi.h index ff9181d771..22fe70b2c4 100644 --- a/include/wx/gtk1/mdi.h +++ b/include/wx/gtk1/mdi.h @@ -52,15 +52,15 @@ class wxMDIParentFrame: public wxFrame wxMDIParentFrame(void); wxMDIParentFrame( wxWindow *parent, - const wxWindowID id, const wxString& title, + wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, + long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, const wxString& name = wxFrameNameStr ); ~wxMDIParentFrame(void); bool Create( wxWindow *parent, - const wxWindowID id, const wxString& title, + wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, + long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, const wxString& name = wxFrameNameStr ); void OnSize( wxSizeEvent& event ); @@ -101,21 +101,21 @@ class wxMDIChildFrame: public wxPanel wxMDIChildFrame(void); wxMDIChildFrame( wxMDIParentFrame *parent, - const wxWindowID id, const wxString& title, + wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr ); + long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr ); ~wxMDIChildFrame(void); bool Create( wxMDIParentFrame *parent, - const wxWindowID id, const wxString& title, + wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr ); + long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr ); void SetMenuBar( wxMenuBar *menu_bar ); // no status bars in wxGTK - virtual bool CreateStatusBar( const int WXUNUSED(number) = 1 ) { return FALSE; }; - virtual void SetStatusText( const wxString &WXUNUSED(text), const int WXUNUSED(number) ) {}; - virtual void SetStatusWidths( const int WXUNUSED(n), const int *WXUNUSED(width) ) {}; - + virtual bool CreateStatusBar( int WXUNUSED(number) = 1 ) { return FALSE; }; + virtual void SetStatusText( const wxString &WXUNUSED(text), int WXUNUSED(number) ) {}; + virtual void SetStatusWidths( int WXUNUSED(n), int *WXUNUSED(width) ) {}; + virtual void Maximize(void) {}; virtual void Restore(void) {}; virtual void Activate(void); @@ -136,9 +136,9 @@ class wxMDIClientWindow: public wxWindow public: wxMDIClientWindow(void); - wxMDIClientWindow( wxMDIParentFrame *parent, const long style = 0 ); + wxMDIClientWindow( wxMDIParentFrame *parent, long style = 0 ); ~wxMDIClientWindow(void); - virtual bool CreateClient( wxMDIParentFrame *parent, const long style = wxVSCROLL | wxHSCROLL ); + virtual bool CreateClient( wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL ); void AddChild( wxWindow *child ); }; diff --git a/include/wx/gtk1/menu.h b/include/wx/gtk1/menu.h index 7e24c65f6d..83376e780b 100644 --- a/include/wx/gtk1/menu.h +++ b/include/wx/gtk1/menu.h @@ -80,16 +80,16 @@ class wxMenu: public wxEvtHandler wxMenu( const wxString &title = "" ); void AppendSeparator(void); - void Append( const int id, const wxString &item, - const wxString &helpStr = "", const bool checkable = FALSE ); - void Append( const int id, const wxString &item, + void Append( int id, const wxString &item, + const wxString &helpStr = "", bool checkable = FALSE ); + void Append( int id, const wxString &item, wxMenu *subMenu, const wxString &helpStr = "" ); int FindItem( const wxString itemString ) const; void Break(void) {}; - void Enable( const int id, const bool enable ); - bool Enabled( const int id ) const; - void SetLabel( const int id, const wxString &label ); - + void Enable( int id, bool enable ); + bool Enabled( int id ) const; + void SetLabel( int id, const wxString &label ); + public: int FindMenuIdByMenuItem( GtkWidget *menuItem ) const; diff --git a/include/wx/gtk1/notebook.h b/include/wx/gtk1/notebook.h index 391c893cf9..bea1b55ffa 100644 --- a/include/wx/gtk1/notebook.h +++ b/include/wx/gtk1/notebook.h @@ -62,17 +62,17 @@ public: wxNotebook(); // the same arguments as for wxControl (@@@ any special styles?) wxNotebook(wxWindow *parent, - const wxWindowID id, + wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = 0, + long style = 0, const wxString& name = "notebook"); // Create() function bool Create(wxWindow *parent, - const wxWindowID id, + wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = 0, + long style = 0, const wxString& name = "notebook"); // dtor ~wxNotebook(); diff --git a/include/wx/gtk1/palette.h b/include/wx/gtk1/palette.h index 2163e73309..d6b7bbb64b 100644 --- a/include/wx/gtk1/palette.h +++ b/include/wx/gtk1/palette.h @@ -38,7 +38,7 @@ class wxPalette: public wxGDIObject public: wxPalette(void); - wxPalette( const 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(void); @@ -47,10 +47,10 @@ class wxPalette: public wxGDIObject bool operator != ( const wxPalette& palette ); bool Ok(void) const; - bool Create( const 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; - bool GetRGB( const int pixel, unsigned char *red, unsigned char *green, unsigned char *blue ) const; - + bool GetRGB( int pixel, unsigned char *red, unsigned char *green, unsigned char *blue ) const; + // no data }; diff --git a/include/wx/gtk1/pen.h b/include/wx/gtk1/pen.h index e3529c6699..a0eaa2a59b 100644 --- a/include/wx/gtk1/pen.h +++ b/include/wx/gtk1/pen.h @@ -50,7 +50,7 @@ class wxPen: public wxGDIObject void SetColour( const wxColour &colour ); void SetColour( const wxString &colourName ); - void SetColour( const int red, const int green, const int blue ); + void SetColour( int red, int green, int blue ); void SetCap( int capStyle ); void SetJoin( int joinStyle ); void SetStyle( int style ); diff --git a/include/wx/gtk1/radiobox.h b/include/wx/gtk1/radiobox.h index 7282de301c..f648659e65 100644 --- a/include/wx/gtk1/radiobox.h +++ b/include/wx/gtk1/radiobox.h @@ -46,35 +46,35 @@ class wxRadioBox: public wxControl public: wxRadioBox(void); - wxRadioBox( wxWindow *parent, const wxWindowID id, const wxString& title, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const int n = 0, const wxString choices[] = NULL, - const int majorDim = 0, const long style = wxRA_HORIZONTAL, + wxRadioBox( wxWindow *parent, wxWindowID id, const wxString& title, + const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + int majorDim = 0, long style = wxRA_HORIZONTAL, const wxString &name = wxRadioBoxNameStr ); - bool Create( wxWindow *parent, const wxWindowID id, const wxString& title, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const int n = 0, const wxString choices[] = NULL, - const int majorDim = 0, const long style = wxRA_HORIZONTAL, + bool Create( wxWindow *parent, wxWindowID id, const wxString& title, + const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + int majorDim = 0, long style = wxRA_HORIZONTAL, const wxString &name = wxRadioBoxNameStr ); int FindString( const wxString& s) const; - void SetSelection( const int n ); + void SetSelection( int n ); int GetSelection(void) const; - wxString GetString( const int n ) const; + wxString GetString( int n ) const; wxString GetLabel(void) const; void SetLabel( const wxString& label ); - void SetLabel( const int item, const wxString& label ); - void SetLabel( const int item, wxBitmap *bitmap ); - wxString GetLabel( const int item ) const; - bool Show( const bool show ); - void Enable( const bool enable ); - void Enable( const int item, const bool enable ); - void Show( const int item, const bool show ); + void SetLabel( int item, const wxString& label ); + void SetLabel( int item, wxBitmap *bitmap ); + wxString GetLabel( int item ) const; + bool Show( bool show ); + void Enable( bool enable ); + void Enable( int item, bool enable ); + void Show( int item, bool show ); virtual wxString GetStringSelection(void) const; virtual bool SetStringSelection( const wxString& s ); virtual int Number(void) const; int GetNumberOfRowsOrCols(void) const; - void SetNumberOfRowsOrCols( const int n ); - + void SetNumberOfRowsOrCols( int n ); + private: GtkRadioButton *m_radio; diff --git a/include/wx/gtk1/scrolbar.h b/include/wx/gtk1/scrolbar.h index 758e3cb18a..5badbfcb28 100644 --- a/include/wx/gtk1/scrolbar.h +++ b/include/wx/gtk1/scrolbar.h @@ -43,35 +43,35 @@ class wxScrollBar: public wxControl public: wxScrollBar(void) { m_adjust = NULL; m_oldPos = 0.0; }; - wxScrollBar(wxWindow *parent, const wxWindowID id, + wxScrollBar(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxSB_HORIZONTAL, + long style = wxSB_HORIZONTAL, const wxString& name = wxScrollBarNameStr ); ~wxScrollBar(void); - bool Create(wxWindow *parent, const wxWindowID id, + bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxSB_HORIZONTAL, + long style = wxSB_HORIZONTAL, const wxString& name = wxScrollBarNameStr); int GetPosition(void) const; int GetThumbSize() const; int GetPageSize() const; int GetRange() const; - virtual void SetPosition( const int viewStart ); - virtual void SetScrollbar( const int position, const int thumbSize, const int range, const int pageSize, - const bool refresh = TRUE ); + virtual void SetPosition( int viewStart ); + virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize, + bool refresh = TRUE ); // Backward compatibility int GetValue(void) const; - void SetValue( const int viewStart ); + void SetValue( int viewStart ); void GetValues( int *viewStart, int *viewLength, int *objectLength, int *pageLength) const; int GetViewLength() const; int GetObjectLength() const; - void SetPageSize( const int pageLength ); - void SetObjectLength( const int objectLength ); - void SetViewLength( const int viewLength ); - + void SetPageSize( int pageLength ); + void SetObjectLength( int objectLength ); + void SetViewLength( int viewLength ); + public: GtkAdjustment *m_adjust; diff --git a/include/wx/gtk1/slider.h b/include/wx/gtk1/slider.h index a983248fed..dda48b2093 100644 --- a/include/wx/gtk1/slider.h +++ b/include/wx/gtk1/slider.h @@ -43,43 +43,43 @@ class wxSlider: public wxControl public: wxSlider(void); - wxSlider( wxWindow *parent, const wxWindowID id, - const int value, const int minValue, const int maxValue, + wxSlider( wxWindow *parent, wxWindowID id, + int value, int minValue, int maxValue, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxSL_HORIZONTAL, + long style = wxSL_HORIZONTAL, /* const wxValidator& validator = wxDefaultValidator, */ const wxString& name = wxSliderNameStr); ~wxSlider(void); - bool Create(wxWindow *parent, const wxWindowID id, - const int value, const int minValue, const int maxValue, + bool Create(wxWindow *parent, wxWindowID id, + int value, int minValue, int maxValue, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxSL_HORIZONTAL, + long style = wxSL_HORIZONTAL, /* const wxValidator& validator = wxDefaultValidator, */ const wxString& name = wxSliderNameStr); virtual int GetValue(void) const; - virtual void SetValue( const int ); + virtual void SetValue( int ); void GetSize( int *x, int *y ) const; - void SetSize( const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO ); + void SetSize( int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO ); void GetPosition( int *x, int *y ) const; - void SetRange( const int minValue, const int maxValue ); + void SetRange( int minValue, int maxValue ); int GetMin(void) const; int GetMax(void) const; - void SetTickFreq( const int n, const int pos ); + void SetTickFreq( int n, int pos ); int GetTickFreq(void) const; - void SetPageSize( const int pageSize ); + void SetPageSize( int pageSize ); int GetPageSize(void) const; void ClearSel(void); void ClearTicks(void); - void SetLineSize( const int lineSize ); + void SetLineSize( int lineSize ); int GetLineSize(void) const; int GetSelEnd(void) const; int GetSelStart(void) const; - void SetSelection( const int minPos, const int maxPos ); - void SetThumbLength( const int len ); + void SetSelection( int minPos, int maxPos ); + void SetThumbLength( int len ); int GetThumbLength(void) const; - void SetTick( const int tickPos ); + void SetTick( int tickPos ); public: diff --git a/include/wx/gtk1/statbmp.h b/include/wx/gtk1/statbmp.h index ec24d42dea..b534110b1d 100644 --- a/include/wx/gtk1/statbmp.h +++ b/include/wx/gtk1/statbmp.h @@ -43,12 +43,12 @@ class wxStaticBitmap: public wxControl public: wxStaticBitmap(void); - wxStaticBitmap( wxWindow *parent, const wxWindowID id, const wxBitmap& label, + wxStaticBitmap( wxWindow *parent, wxWindowID id, const wxBitmap& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = 0, const wxString& name = wxStaticBitmapNameStr ); - bool Create( wxWindow *parent, const wxWindowID id, const wxBitmap& label, + long style = 0, const wxString& name = wxStaticBitmapNameStr ); + bool Create( wxWindow *parent, wxWindowID id, const wxBitmap& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = 0, const wxString& name = wxStaticBitmapNameStr); + long style = 0, const wxString& name = wxStaticBitmapNameStr); virtual void SetBitmap( const wxBitmap& bitmap ); wxBitmap& GetBitmap(void) const { return (wxBitmap&)m_bitmap; } diff --git a/include/wx/gtk1/statbox.h b/include/wx/gtk1/statbox.h index a260d4f05e..a6248a6bc9 100644 --- a/include/wx/gtk1/statbox.h +++ b/include/wx/gtk1/statbox.h @@ -46,10 +46,10 @@ class wxStaticBox: public wxControl wxStaticBox(void); wxStaticBox( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = wxStaticBoxNameStr ); - bool Create( wxWindow *parent, wxWindowID id, const wxString &label, + long style = 0, const wxString &name = wxStaticBoxNameStr ); + bool Create( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = wxStaticBoxNameStr ); + long style = 0, const wxString &name = wxStaticBoxNameStr ); }; #endif // __GTKSTATICBOXH__ diff --git a/include/wx/gtk1/stattext.h b/include/wx/gtk1/stattext.h index 12d8d6995e..e60303c890 100644 --- a/include/wx/gtk1/stattext.h +++ b/include/wx/gtk1/stattext.h @@ -46,10 +46,10 @@ class wxStaticText: public wxControl wxStaticText(void); wxStaticText( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = wxStaticTextNameStr ); + long style = 0, const wxString &name = wxStaticTextNameStr ); bool Create( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = wxStaticTextNameStr ); + long style = 0, const wxString &name = wxStaticTextNameStr ); wxString GetLabel(void) const; void SetLabel( const wxString &label ); }; diff --git a/include/wx/gtk1/tbargtk.h b/include/wx/gtk1/tbargtk.h index adb04a56f0..667f84ff47 100644 --- a/include/wx/gtk1/tbargtk.h +++ b/include/wx/gtk1/tbargtk.h @@ -50,9 +50,9 @@ class wxToolBarTool: public wxObject public: wxToolBarTool(void) {}; - wxToolBarTool( wxToolBarGTK *owner, const int theIndex = 0, - const wxBitmap& bitmap1 = wxNullBitmap, const wxBitmap& bitmap2 = wxNullBitmap, - const bool toggle = FALSE, wxObject *clientData = NULL, + wxToolBarTool( wxToolBarGTK *owner, int theIndex = 0, + const wxBitmap& bitmap1 = wxNullBitmap, const wxBitmap& bitmap2 = wxNullBitmap, + bool toggle = FALSE, wxObject *clientData = NULL, const wxString& shortHelpString = "", const wxString& longHelpString = ""); ~wxToolBarTool(void); @@ -84,14 +84,14 @@ class wxToolBarGTK: public wxControl public: wxToolBarGTK(void); - wxToolBarGTK( wxWindow *parent, const wxWindowID id, + wxToolBarGTK( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = 0, const wxString& name = wxToolBarNameStr ); + long style = 0, const wxString& name = wxToolBarNameStr ); ~wxToolBarGTK(void); - bool Create( wxWindow *parent, const wxWindowID id, + bool Create( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = 0, const wxString& name = wxToolBarNameStr); + long style = 0, const wxString& name = wxToolBarNameStr); // Only allow toggle if returns TRUE. Call when left button up. virtual bool OnLeftClick(int toolIndex, bool toggleDown); @@ -106,26 +106,26 @@ class wxToolBarGTK: public wxControl // If pushedBitmap is NULL, a reversed version of bitmap is // created and used as the pushed/toggled image. // If toggle is TRUE, the button toggles between the two states. - virtual wxToolBarTool *AddTool( const int toolIndex, const wxBitmap& bitmap, - const wxBitmap& pushedBitmap = wxNullBitmap, const bool toggle = FALSE, - const float xPos = -1, const float yPos = -1, wxObject *clientData = NULL, + virtual wxToolBarTool *AddTool( int toolIndex, const wxBitmap& bitmap, + const wxBitmap& pushedBitmap = wxNullBitmap, bool toggle = FALSE, + float xPos = -1, float yPos = -1, wxObject *clientData = NULL, const wxString& helpString1 = "", const wxString& helpString2 = ""); virtual void AddSeparator(void); virtual void ClearTools(void); - virtual void EnableTool(const int toolIndex, const bool enable); - virtual void ToggleTool(const int toolIndex, const bool toggle); // toggle is TRUE if toggled on - virtual void SetToggle(const int toolIndex, const bool toggle); // Set this to be togglable (or not) - virtual wxObject *GetToolClientData(const int index) const; + virtual void EnableTool(int toolIndex, bool enable); + virtual void ToggleTool(int toolIndex, bool toggle); // toggle is TRUE if toggled on + virtual void SetToggle(int toolIndex, bool toggle); // Set this to be togglable (or not) + virtual wxObject *GetToolClientData(int index) const; - virtual bool GetToolState(const int toolIndex) const; - virtual bool GetToolEnabled(const int toolIndex) const; + virtual bool GetToolState(int toolIndex) const; + virtual bool GetToolEnabled(int toolIndex) const; - virtual void SetMargins(const int x, const int y); + virtual void SetMargins(int x, int y); void SetMargins(const wxSize& size) { SetMargins(size.x, size.y); }; - virtual void SetToolPacking(const int packing); - virtual void SetToolSeparation(const int separation); - + virtual void SetToolPacking(int packing); + virtual void SetToolSeparation(int separation); + public: GtkToolbar *m_toolbar; diff --git a/include/wx/gtk1/textctrl.h b/include/wx/gtk1/textctrl.h index 249ed18c17..feceacc12e 100644 --- a/include/wx/gtk1/textctrl.h +++ b/include/wx/gtk1/textctrl.h @@ -50,12 +50,12 @@ class wxTextCtrl: public wxControl, public streambuf public: wxTextCtrl(void); - wxTextCtrl( wxWindow *parent, const wxWindowID id, const wxString &value = "", - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const int style = 0, const wxString &name = wxTextCtrlNameStr ); - bool Create( wxWindow *parent, const wxWindowID id, const wxString &value = "", - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const int style = 0, const wxString &name = wxTextCtrlNameStr ); + wxTextCtrl( wxWindow *parent, wxWindowID id, const wxString &value = "", + const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, + int style = 0, const wxString &name = wxTextCtrlNameStr ); + bool Create( wxWindow *parent, wxWindowID id, const wxString &value = "", + const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, + int style = 0, const wxString &name = wxTextCtrlNameStr ); wxString GetValue(void) const; void SetValue( const wxString &value ); void WriteText( const wxString &text ); @@ -65,21 +65,21 @@ class wxTextCtrl: public wxControl, public streambuf bool IsModified(void); void DiscardEdits(void); /* - wxString GetLineText( const long lineNo ) const; + wxString GetLineText( long lineNo ) const; void OnDropFiles( wxDropFilesEvent &event ); - long PositionToXY( const long pos, long *x, long *y ) const; - long XYToPosition( const long x, const long y ); + long PositionToXY( long pos, long *x, long *y ) const; + long XYToPosition( long x, long y ); int GetNumberOfLines(void); */ - virtual void SetInsertionPoint( const long pos ); + virtual void SetInsertionPoint( long pos ); virtual void SetInsertionPointEnd(void); - virtual void SetEditable( const bool editable ); - virtual void SetSelection( const long from, const long to ); - void ShowPosition( const long pos ); + virtual void SetEditable( bool editable ); + virtual void SetSelection( long from, long to ); + void ShowPosition( long pos ); virtual long GetInsertionPoint(void) const; virtual long GetLastPosition(void) const; - virtual void Remove( const long from, const long to ); - virtual void Replace( const long from, const long to, const wxString &value ); + virtual void Remove( long from, long to ); + virtual void Replace( long from, long to, const wxString &value ); void Cut(void); void Copy(void); void Paste(void); @@ -92,10 +92,10 @@ class wxTextCtrl: public wxControl, public streambuf int underflow(void); wxTextCtrl& operator<<(const wxString& s); - wxTextCtrl& operator<<(const int i); - wxTextCtrl& operator<<(const long i); - wxTextCtrl& operator<<(const float f); - wxTextCtrl& operator<<(const double d); + wxTextCtrl& operator<<(int i); + wxTextCtrl& operator<<(long i); + wxTextCtrl& operator<<(float f); + wxTextCtrl& operator<<(double d); wxTextCtrl& operator<<(const char c); public: diff --git a/include/wx/gtk1/window.h b/include/wx/gtk1/window.h index 40fbc48706..0bba976592 100644 --- a/include/wx/gtk1/window.h +++ b/include/wx/gtk1/window.h @@ -63,35 +63,35 @@ class wxWindow: public wxEvtHandler public: wxWindow(void); - wxWindow( wxWindow *parent, const wxWindowID id, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = wxPanelNameStr ); - bool Create( wxWindow *parent, const wxWindowID id, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = 0, const wxString &name = wxPanelNameStr ); + wxWindow( wxWindow *parent, wxWindowID id, + const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, + long style = 0, const wxString &name = wxPanelNameStr ); + bool Create( wxWindow *parent, wxWindowID id, + const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, + long style = 0, const wxString &name = wxPanelNameStr ); virtual ~wxWindow(void); - bool Close( const bool force = FALSE ); + bool Close( bool force = FALSE ); virtual bool Destroy(void); virtual bool DestroyChildren(void); virtual void PrepareDC( wxDC &dc ); - virtual void SetSize( const int x, const int y, const int width, const int height, - const int sizeFlags = wxSIZE_AUTO ); - virtual void SetSize( const int width, const int height ); - virtual void Move( const int x, const int y ); + virtual void SetSize( int x, int y, int width, int height, + int sizeFlags = wxSIZE_AUTO ); + virtual void SetSize( int width, int height ); + virtual void Move( int x, int y ); virtual void GetSize( int *width, int *height ) const; virtual void SetClientSize( int const width, int const height ); virtual void GetClientSize( int *width, int *height ) const; virtual void GetPosition( int *x, int *y ) const; - virtual void Centre( const int direction = wxHORIZONTAL ); + virtual void Centre( int direction = wxHORIZONTAL ); virtual void Fit(void); void OnSize( wxSizeEvent &event ); - virtual bool Show( const bool show ); - virtual void Enable( const bool enable ); - virtual void MakeModal( const bool modal ); + virtual bool Show( bool show ); + virtual void Enable( bool enable ); + virtual void MakeModal( bool modal ); virtual bool IsEnabled(void) const { return m_isEnabled; }; virtual void SetFocus(void); virtual bool OnClose(void); @@ -116,11 +116,11 @@ class wxWindow: public wxEvtHandler void SetCursor( const wxCursor &cursor ); - virtual void Refresh( const bool eraseBackground = TRUE, const wxRect *rect = NULL ); + virtual void Refresh( bool eraseBackground = TRUE, const wxRect *rect = NULL ); virtual void Clear(void); - virtual bool IsExposed( const long x, const long y ); - virtual bool IsExposed( const long x, const long y, const long width, const long height ); - + virtual bool IsExposed( long x, long y ); + virtual bool IsExposed( long x, long y, long width, long height ); + virtual wxColour GetBackgroundColour(void) const; virtual void SetBackgroundColour( const wxColour &colour ); @@ -154,7 +154,7 @@ class wxWindow: public wxEvtHandler virtual bool IsShown(void); virtual bool IsRetained(void); - virtual wxWindow *FindWindow( const long id ); + virtual wxWindow *FindWindow( long id ); virtual wxWindow *FindWindow( const wxString& name ); void AllowDoubleClick( bool WXUNUSED(allow) ) {}; void SetDoubleClick( bool WXUNUSED(allow) ) {}; @@ -170,18 +170,18 @@ class wxWindow: public wxEvtHandler virtual void SetDropTarget( wxDropTarget *dropTarget ); virtual wxDropTarget *GetDropTarget() const; - virtual void SetScrollbar( const int orient, const int pos, const int thumbVisible, - const int range, const bool refresh = TRUE ); - virtual void SetScrollPos( const int orient, const int pos, const bool refresh = TRUE ); - virtual int GetScrollPos( const int orient ) const; - virtual int GetScrollThumb( const int orient ) const; - virtual int GetScrollRange( const int orient ) const; - virtual void ScrollWindow( const int dx, const int dy, const wxRect* rect = NULL ); - + virtual void SetScrollbar( int orient, int pos, int thumbVisible, + int range, bool refresh = TRUE ); + virtual void SetScrollPos( int orient, int pos, bool refresh = TRUE ); + virtual int GetScrollPos( int orient ) const; + virtual int GetScrollThumb( int orient ) const; + virtual int GetScrollRange( int orient ) const; + virtual void ScrollWindow( int dx, int dy, const wxRect* rect = NULL ); + public: // cannot get private going yet - void PreCreation( wxWindow *parent, const wxWindowID id, const wxPoint &pos, - const wxSize &size, const long style, const wxString &name ); + void PreCreation( wxWindow *parent, wxWindowID id, const wxPoint &pos, + const wxSize &size, long style, const wxString &name ); void PostCreation(void); bool HasVMT(void); virtual void ImplementSetSize(void); @@ -230,7 +230,7 @@ class wxWindow: public wxEvtHandler wxLayoutConstraints *GetConstraints(void) const; void SetConstraints( wxLayoutConstraints *constraints ); - void SetAutoLayout( const bool autoLayout ); + void SetAutoLayout( bool autoLayout ); bool GetAutoLayout(void) const; bool Layout(void); void SetSizer( wxSizer *sizer ); @@ -243,15 +243,15 @@ class wxWindow: public wxEvtHandler void RemoveConstraintReference(wxWindow *otherWin); void DeleteRelatedConstraints(void); virtual void ResetConstraints(void); - virtual void SetConstraintSizes(const bool recurse = TRUE); + virtual void SetConstraintSizes(bool recurse = TRUE); virtual bool LayoutPhase1(int *noChanges); virtual bool LayoutPhase2(int *noChanges); - virtual bool DoPhase(const int); + virtual bool DoPhase(int); virtual void TransformSizerToActual(int *x, int *y) const ; - virtual void SizerSetSize(const int x, const int y, const int w, const int h); - virtual void SizerMove(const int x, const int y); - virtual void SetSizeConstraint(const int x, const int y, const int w, const int h); - virtual void MoveConstraint(const int x, const int y); + virtual void SizerSetSize(int x, int y, int w, int h); + virtual void SizerMove(int x, int y); + virtual void SetSizeConstraint(int x, int y, int w, int h); + virtual void MoveConstraint(int x, int y); virtual void GetSizeConstraint(int *w, int *h) const ; virtual void GetClientSizeConstraint(int *w, int *h) const ; virtual void GetPositionConstraint(int *x, int *y) const ; diff --git a/include/wx/hash.h b/include/wx/hash.h index 8000d7b8b3..a1ae912a67 100644 --- a/include/wx/hash.h +++ b/include/wx/hash.h @@ -38,10 +38,10 @@ class WXDLLEXPORT wxHashTable: public wxObject unsigned int key_type; wxList **hash_table; - wxHashTable(const int the_key_type = wxKEY_INTEGER, const int size = 1000); + wxHashTable(int the_key_type = wxKEY_INTEGER, int size = 1000); ~wxHashTable(void); - bool Create(const int the_key_type = wxKEY_INTEGER, const int size = 1000); + bool Create(int the_key_type = wxKEY_INTEGER, int size = 1000); // Note that there are 2 forms of Put, Get. // With a key and a value, the *value* will be checked @@ -56,27 +56,27 @@ class WXDLLEXPORT wxHashTable: public wxObject // e.g. 1 + 2 = 3, 2 + 1 = 3. // key and value are NOT necessarily the same - void Put(const long key, const long value, wxObject *object); - void Put(const long key, const char *value, wxObject *object); + void Put(long key, long value, wxObject *object); + void Put(long key, const char *value, wxObject *object); // key and value are the same - void Put(const long value, wxObject *object); + void Put(long value, wxObject *object); void Put(const char *value, wxObject *object); // key and value not the same - wxObject *Get(const long key, const long value) const; - wxObject *Get(const long key, const char *value) const; + wxObject *Get(long key, long value) const; + wxObject *Get(long key, const char *value) const; // key and value are the same - wxObject *Get(const long value) const; + wxObject *Get(long value) const; wxObject *Get(const char *value) const; // Deletes entry and returns data if found - wxObject *Delete(const long key); + wxObject *Delete(long key); wxObject *Delete(const char *key); - wxObject *Delete(const long key, const int value); - wxObject *Delete(const long key, const char *value); + wxObject *Delete(long key, int value); + wxObject *Delete(long key, const char *value); // Construct your own integer key from a string, e.g. in case // you need to combine it with something @@ -89,7 +89,7 @@ class WXDLLEXPORT wxHashTable: public wxObject void BeginFind(void); wxNode *Next(void); - void DeleteContents(const bool flag); + void DeleteContents(bool flag); void Clear(void); }; diff --git a/include/wx/layout.h b/include/wx/layout.h index 800bbdf5ea..13ae082ee2 100644 --- a/include/wx/layout.h +++ b/include/wx/layout.h @@ -222,17 +222,17 @@ class WXDLLEXPORT wxSizer: public wxWindow ~wxSizer(void); bool Create(wxWindow *parent, wxSizerBehaviour behav = wxSizerNone); - virtual void SetSize(const int x, const int y, const int w, const int h, const int flags = wxSIZE_AUTO); + virtual void SetSize(int x, int y, int w, int h, int flags = wxSIZE_AUTO); // Avoid compiler warning - void SetSize(const int w, const int h) { wxWindow::SetSize(w, h); } - virtual void Move(const int x, const int y); + void SetSize(int w, int h) { wxWindow::SetSize(w, h); } + virtual void Move(int x, int y); virtual void GetSize(int *w, int *h) const; inline virtual void GetClientSize(int *w, int *h) const { GetSize(w, h); } virtual void GetPosition(int *x, int *y) const; - inline void SizerSetSize(const int x, const int y, const int w, const int h) + inline void SizerSetSize(int x, int y, int w, int h) { SetSize(x, y, w, h); } - inline void SizerMove(const int x, const int y) + inline void SizerMove(int x, int y) { Move(x, y); } virtual void SetBorder(int w, int h); @@ -269,9 +269,9 @@ class WXDLLEXPORT wxRowColSizer: public wxSizer ~wxRowColSizer(void); bool Create(wxWindow *parent, bool rowOrCol = wxSIZER_ROWS, int rowsOrColSize = 20, wxSizerBehaviour = wxSizerShrink); - void SetSize(const int x, const int y, const int w, const int h, const int flags = wxSIZE_AUTO); + void SetSize(int x, int y, int w, int h, int flags = wxSIZE_AUTO); // Avoid compiler warning - void SetSize(const int w, const int h) { wxSizer::SetSize(w, h); } + void SetSize(int w, int h) { wxSizer::SetSize(w, h); } inline virtual void SetRowOrCol(bool rc) { rowOrCol = rc; } inline virtual bool GetRowOrCol(void) { return rowOrCol; } diff --git a/include/wx/list.h b/include/wx/list.h index a0c42e26bc..32444309a5 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -73,7 +73,7 @@ class WXDLLEXPORT wxList: public wxObject wxList(void); wxList(const unsigned int the_key_type); - wxList(const int N, wxObject *Objects[]); + wxList(int N, wxObject *Objects[]); wxList(wxObject *object, ...); #ifdef USE_STORABLE_CLASSES @@ -95,7 +95,7 @@ class WXDLLEXPORT wxList: public wxObject wxNode *Insert(wxNode *position, wxObject *object); // Keyed append - wxNode *Append(const long key, wxObject *object); + wxNode *Append(long key, wxObject *object); wxNode *Append(const char *key, wxObject *object); bool DeleteNode(wxNode *node); @@ -106,15 +106,15 @@ class WXDLLEXPORT wxList: public wxObject inline wxNode *First(void) const { return first_node; } inline wxNode *Last(void) const { return last_node; } - wxNode *Nth(const int i) const; // nth node counting from 0 + wxNode *Nth(int i) const; // nth node counting from 0 // Keyed search - wxNode *Find(const long key) const; + wxNode *Find(long key) const; wxNode *Find(const char *key) const; wxNode *Member(wxObject *object) const; - inline void DeleteContents(const int destroy) { destroy_data = destroy; } + inline void DeleteContents(int destroy) { destroy_data = destroy; } // Instruct it to destroy user data // when deleting nodes // this function allows the sorting of arbitrary lists by giving @@ -139,7 +139,7 @@ class WXDLLEXPORT wxStringList: public wxList virtual wxNode *Add(const char *s); virtual void Delete(const char *s); - virtual char **ListToArray(const bool new_copies = FALSE) const; + virtual char **ListToArray(bool new_copies = FALSE) const; virtual void Sort(void); virtual bool Member(const char *s) const; }; diff --git a/include/wx/msw/app.h b/include/wx/msw/app.h index 239e5888f3..08708f877f 100644 --- a/include/wx/msw/app.h +++ b/include/wx/msw/app.h @@ -63,11 +63,6 @@ class WXDLLEXPORT wxApp: public wxEvtHandler virtual void OnIdle(wxIdleEvent& event); - // Windows specific. Intercept keyboard input. -#if WXWIN_COMPATIBILITY == 2 - virtual bool OldOnCharHook(wxKeyEvent& event); -#endif - // Generic virtual bool OnInit(void) { return FALSE; }; @@ -111,7 +106,7 @@ class WXDLLEXPORT wxApp: public wxEvtHandler // Returns TRUE if more idle time is requested. bool SendIdleEvents(wxWindow* win); - inline void SetAuto3D(const bool flag) { m_auto3D = flag; } + inline void SetAuto3D(bool flag) { m_auto3D = flag; } inline bool GetAuto3D(void) const { return m_auto3D; } // Creates a log object diff --git a/include/wx/msw/bitmap.h b/include/wx/msw/bitmap.h index 650d75c4d4..4610024f79 100644 --- a/include/wx/msw/bitmap.h +++ b/include/wx/msw/bitmap.h @@ -43,7 +43,7 @@ public: // Construct a mask from a bitmap and a palette index indicating // the transparent area - wxMask(const wxBitmap& bitmap, const int paletteIndex); + wxMask(const wxBitmap& bitmap, int paletteIndex); // Construct a mask from a mono bitmap (copies the bitmap). wxMask(const wxBitmap& bitmap); @@ -51,7 +51,7 @@ public: ~wxMask(void); bool Create(const wxBitmap& bitmap, const wxColour& colour); - bool Create(const wxBitmap& bitmap, const int paletteIndex); + bool Create(const wxBitmap& bitmap, int paletteIndex); bool Create(const wxBitmap& bitmap); // Implementation @@ -95,14 +95,14 @@ class WXDLLEXPORT wxBitmapHandler: public wxObject public: wxBitmapHandler(void) { m_name = ""; m_extension = ""; m_type = 0; }; - virtual bool Create(wxBitmap *bitmap, void *data, const long flags, const int width, const int height, const int depth = 1); - virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, const long flags, + virtual bool Create(wxBitmap *bitmap, void *data, long flags, int width, int height, int depth = 1); + virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, int desiredWidth, int desiredHeight); - virtual bool SaveFile(wxBitmap *bitmap, const wxString& name, const int type, const wxPalette *palette = NULL); + virtual bool SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette = NULL); inline void SetName(const wxString& name) { m_name = name; } inline void SetExtension(const wxString& ext) { m_extension = ext; } - inline void SetType(const long type) { m_type = type; } + inline void SetType(long type) { m_type = type; } inline wxString GetName(void) const { return m_name; } inline wxString GetExtension(void) const { return m_extension; } inline long GetType(void) const { return m_type; } @@ -128,7 +128,7 @@ public: inline wxBitmap(const wxBitmap* bitmap) { if (bitmap) Ref(*bitmap); if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this); } // Initialize with raw data - wxBitmap(const char bits[], const int width, const int height, const int depth = 1); + wxBitmap(const char bits[], int width, int height, int depth = 1); #if USE_XPM_IN_MSW class wxItem; @@ -137,19 +137,19 @@ public: #endif // Load a file or resource - wxBitmap(const wxString& name, const long type = wxBITMAP_TYPE_BMP_RESOURCE); + wxBitmap(const wxString& name, long type = wxBITMAP_TYPE_BMP_RESOURCE); // New constructor for generalised creation from data - wxBitmap(void *data, const long type, const int width, const int height, const int depth = 1); + wxBitmap(void *data, long type, int width, int height, int depth = 1); // If depth is omitted, will create a bitmap compatible with the display - wxBitmap(const int width, const int height, const int depth = -1); + wxBitmap(int width, int height, int depth = -1); ~wxBitmap(void); - virtual bool Create(const int width, const int height, const int depth = -1); - virtual bool Create(void *data, const long type, const int width, const int height, const int depth = 1); - virtual bool LoadFile(const wxString& name, const long type = wxBITMAP_TYPE_BMP_RESOURCE); - virtual bool SaveFile(const wxString& name, const int type, const wxPalette *cmap = NULL); + virtual bool Create(int width, int height, int depth = -1); + virtual bool Create(void *data, long type, int width, int height, int depth = 1); + virtual bool LoadFile(const wxString& name, long type = wxBITMAP_TYPE_BMP_RESOURCE); + virtual bool SaveFile(const wxString& name, int type, const wxPalette *cmap = NULL); inline bool Ok(void) const { return (M_BITMAPDATA && M_BITMAPDATA->m_ok); } inline int GetWidth(void) const { return (M_BITMAPDATA ? M_BITMAPDATA->m_width : 0); } diff --git a/include/wx/msw/bmpbuttn.h b/include/wx/msw/bmpbuttn.h index 86161a9c84..118888a4e9 100644 --- a/include/wx/msw/bmpbuttn.h +++ b/include/wx/msw/bmpbuttn.h @@ -27,18 +27,18 @@ class WXDLLEXPORT wxBitmapButton: public wxButton DECLARE_DYNAMIC_CLASS(wxBitmapButton) public: inline wxBitmapButton(void) { m_marginX = wxDEFAULT_BUTTON_MARGIN; m_marginY = wxDEFAULT_BUTTON_MARGIN; } - inline wxBitmapButton(wxWindow *parent, const wxWindowID id, const wxBitmap& bitmap, + inline wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, const long style = wxBU_AUTODRAW, + const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxButtonNameStr) { Create(parent, id, bitmap, pos, size, style, validator, name); } - bool Create(wxWindow *parent, const wxWindowID id, const wxBitmap& bitmap, + bool Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, const long style = wxBU_AUTODRAW, + const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxButtonNameStr); diff --git a/include/wx/msw/brush.h b/include/wx/msw/brush.h index 5c568ec04f..59fce013ad 100644 --- a/include/wx/msw/brush.h +++ b/include/wx/msw/brush.h @@ -45,8 +45,8 @@ class WXDLLEXPORT wxBrush: public wxGDIObject public: wxBrush(void); - wxBrush(const wxColour& col, const int style); - wxBrush(const wxString& col, const int style); + wxBrush(const wxColour& col, int style); + wxBrush(const wxString& col, int style); wxBrush(const wxBitmap& stipple); inline wxBrush(const wxBrush& brush) { Ref(brush); } inline wxBrush(const wxBrush* brush) { /* UnRef(); */ if (brush) Ref(*brush); } @@ -55,7 +55,7 @@ public: virtual void SetColour(const wxColour& col) ; virtual void SetColour(const wxString& col) ; virtual void SetColour(const unsigned char r, const unsigned char g, const unsigned char b) ; - virtual void SetStyle(const int style) ; + virtual void SetStyle(int style) ; virtual void SetStipple(const wxBitmap& stipple) ; inline wxBrush& operator = (const wxBrush& brush) { if (*this == brush) return (*this); Ref(brush); return *this; } diff --git a/include/wx/msw/button.h b/include/wx/msw/button.h index eae77c0e49..d4755612fa 100644 --- a/include/wx/msw/button.h +++ b/include/wx/msw/button.h @@ -27,28 +27,28 @@ class WXDLLEXPORT wxButton: public wxControl DECLARE_DYNAMIC_CLASS(wxButton) public: inline wxButton(void) {} - inline wxButton(wxWindow *parent, const wxWindowID id, const wxString& label, + inline wxButton(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, const long style = 0, + const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxButtonNameStr) { Create(parent, id, label, pos, size, style, validator, name); } - bool Create(wxWindow *parent, const wxWindowID id, const wxString& label, + bool Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, const long style = 0, + const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxButtonNameStr); - virtual void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO); + virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); virtual void SetDefault(void); virtual void SetLabel(const wxString& label); virtual wxString GetLabel(void) const ; virtual void Command(wxCommandEvent& event); - virtual bool MSWCommand(const WXUINT param, const WXWORD id); - virtual WXHBRUSH OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, + virtual bool MSWCommand(WXUINT param, WXWORD id); + virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam); }; diff --git a/include/wx/msw/checkbox.h b/include/wx/msw/checkbox.h index 965da6d7d5..553224d02c 100644 --- a/include/wx/msw/checkbox.h +++ b/include/wx/msw/checkbox.h @@ -28,27 +28,27 @@ class WXDLLEXPORT wxCheckBox: public wxControl public: inline wxCheckBox(void) { } - inline wxCheckBox(wxWindow *parent, const wxWindowID id, const wxString& label, + inline wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, const long style = 0, + const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxCheckBoxNameStr) { Create(parent, id, label, pos, size, style, validator, name); } - bool Create(wxWindow *parent, const wxWindowID id, const wxString& label, + bool Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, const long style = 0, + const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxCheckBoxNameStr); - virtual void SetValue(const bool); + virtual void SetValue(bool); virtual bool GetValue(void) const ; - virtual void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO); - virtual bool MSWCommand(const WXUINT param, const WXWORD id); + virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); + virtual bool MSWCommand(WXUINT param, WXWORD id); virtual void SetLabel(const wxString& label); virtual void Command(wxCommandEvent& event); - virtual WXHBRUSH OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, + virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam); }; @@ -61,23 +61,23 @@ class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox int checkHeight ; inline wxBitmapCheckBox(void) { checkWidth = -1; checkHeight = -1; } - inline wxBitmapCheckBox(wxWindow *parent, const wxWindowID id, const wxBitmap *label, + inline wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, const long style = 0, + const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxCheckBoxNameStr) { Create(parent, id, label, pos, size, style, validator, name); } - bool Create(wxWindow *parent, const wxWindowID id, const wxBitmap *bitmap, + bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, const long style = 0, + const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxCheckBoxNameStr); - virtual void SetValue(const bool); + virtual void SetValue(bool); virtual bool GetValue(void) const ; - virtual void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO); + virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); virtual void SetLabel(const wxBitmap *bitmap); }; #endif diff --git a/include/wx/msw/checklst.h b/include/wx/msw/checklst.h index 71dc955261..51bd9f0a77 100644 --- a/include/wx/msw/checklst.h +++ b/include/wx/msw/checklst.h @@ -30,12 +30,12 @@ class wxCheckListBox : public wxListBox public: // ctors wxCheckListBox(); - wxCheckListBox(wxWindow *parent, const wxWindowID id, + wxCheckListBox(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const int nStrings = 0, + int nStrings = 0, const wxString choices[] = NULL, - const long style = 0, + long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxListBoxNameStr); // const wxFont& font = wxNullFont); diff --git a/include/wx/msw/choice.h b/include/wx/msw/choice.h index b25535e142..a70061a06f 100644 --- a/include/wx/msw/choice.h +++ b/include/wx/msw/choice.h @@ -30,45 +30,45 @@ class WXDLLEXPORT wxChoice: public wxControl inline wxChoice(void) { no_strings = 0; } - inline wxChoice(wxWindow *parent, const wxWindowID id, + inline wxChoice(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const int n = 0, const wxString choices[] = NULL, - const long style = 0, + int n = 0, const wxString choices[] = NULL, + long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxChoiceNameStr) { Create(parent, id, pos, size, n, choices, style, validator, name); } - bool Create(wxWindow *parent, const wxWindowID id, + bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const int n = 0, const wxString choices[] = NULL, - const long style = 0, + int n = 0, const wxString choices[] = NULL, + long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxChoiceNameStr); virtual void Append(const wxString& item); - virtual void Delete(const int n); + virtual void Delete(int n); virtual void Clear(void); virtual int GetSelection(void) const ; - virtual void SetSelection(const int n); + virtual void SetSelection(int n); virtual int FindString(const wxString& s) const; - virtual wxString GetString(const int n) const ; - virtual void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO); + virtual wxString GetString(int n) const ; + virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); virtual wxString GetStringSelection(void) const ; virtual bool SetStringSelection(const wxString& sel); virtual inline int Number(void) const { return no_strings; } virtual void Command(wxCommandEvent& event); - virtual bool MSWCommand(const WXUINT param, const WXWORD id); + virtual bool MSWCommand(WXUINT param, WXWORD id); - virtual inline void SetColumns(const int WXUNUSED(n) = 1 ) { /* No effect */ } ; + virtual inline void SetColumns(int WXUNUSED(n) = 1 ) { /* No effect */ } ; virtual inline int GetColumns(void) const { return 1 ; }; - virtual WXHBRUSH OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, + virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam); long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); diff --git a/include/wx/msw/combobox.h b/include/wx/msw/combobox.h index d659f8c372..e9dd3f758c 100644 --- a/include/wx/msw/combobox.h +++ b/include/wx/msw/combobox.h @@ -31,24 +31,24 @@ class WXDLLEXPORT wxComboBox: public wxChoice public: inline wxComboBox(void) {} - inline wxComboBox(wxWindow *parent, const wxWindowID id, + inline wxComboBox(wxWindow *parent, wxWindowID id, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const int n = 0, const wxString choices[] = NULL, - const long style = 0, + int n = 0, const wxString choices[] = NULL, + long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxComboBoxNameStr) { Create(parent, id, value, pos, size, n, choices, style, validator, name); } - bool Create(wxWindow *parent, const wxWindowID id, + bool Create(wxWindow *parent, wxWindowID id, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const int n = 0, const wxString choices[] = NULL, - const long style = 0, + int n = 0, const wxString choices[] = NULL, + long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxComboBoxNameStr); @@ -62,16 +62,16 @@ class WXDLLEXPORT wxComboBox: public wxChoice virtual void Copy(void); virtual void Cut(void); virtual void Paste(void); - virtual void SetInsertionPoint(const long pos); + virtual void SetInsertionPoint(long pos); virtual void SetInsertionPointEnd(void); virtual long GetInsertionPoint(void) const ; virtual long GetLastPosition(void) const ; - virtual void Replace(const long from, const long to, const wxString& value); - virtual void Remove(const long from, const long to); - virtual void SetSelection(const long from, const long to); - virtual void SetEditable(const bool editable); + virtual void Replace(long from, long to, const wxString& value); + virtual void Remove(long from, long to); + virtual void SetSelection(long from, long to); + virtual void SetEditable(bool editable); - virtual bool MSWCommand(const WXUINT param, const WXWORD id); + virtual bool MSWCommand(WXUINT param, WXWORD id); }; #endif // USE_COMBOBOX diff --git a/include/wx/msw/control.h b/include/wx/msw/control.h index 3ab4b84829..0d9f09d682 100644 --- a/include/wx/msw/control.h +++ b/include/wx/msw/control.h @@ -31,7 +31,7 @@ public: virtual void Command(wxCommandEvent& WXUNUSED(event)) = 0; // Simulates an event virtual void ProcessCommand(wxCommandEvent& event); // Calls the callback and // appropriate event handlers - virtual void SetClientSize(const int width, const int height); + virtual void SetClientSize(int width, int height); virtual void SetLabel(const wxString& label); virtual wxString GetLabel(void) const ; @@ -46,15 +46,15 @@ public: #endif // Places item in centre of panel - so can't be used BEFORE panel->Fit() - void Centre(const int direction = wxHORIZONTAL); + void Centre(int direction = wxHORIZONTAL); inline void Callback(const wxFunction function); // Adds callback // MSW-specific // Window procedure virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); - virtual void MSWOnMouseMove(const int x, const int y, const WXUINT flags); - virtual bool MSWNotify(const WXWPARAM wParam, const WXLPARAM lParam); + virtual void MSWOnMouseMove(int x, int y, WXUINT flags); + virtual bool MSWNotify(WXWPARAM wParam, WXLPARAM lParam); void OnEraseBackground(wxEraseEvent& event); diff --git a/include/wx/msw/cursor.h b/include/wx/msw/cursor.h index d3b4473c82..41d34c3ba7 100644 --- a/include/wx/msw/cursor.h +++ b/include/wx/msw/cursor.h @@ -46,11 +46,11 @@ public: inline wxCursor(const wxCursor& cursor) { Ref(cursor); } inline wxCursor(const wxCursor* cursor) { /* UnRef(); */ if (cursor) Ref(*cursor); } - wxCursor(const char bits[], const int width, const int height, const int hotSpotX = -1, const int hotSpotY = -1, + wxCursor(const char bits[], int width, int height, int hotSpotX = -1, int hotSpotY = -1, const char maskBits[] = NULL); - wxCursor(const wxString& name, const long flags = wxBITMAP_TYPE_CUR_RESOURCE, - const int hotSpotX = 0, const int hotSpotY = 0); - wxCursor(const int cursor_type); + wxCursor(const wxString& name, long flags = wxBITMAP_TYPE_CUR_RESOURCE, + int hotSpotX = 0, int hotSpotY = 0); + wxCursor(int cursor_type); ~wxCursor(void); virtual bool Ok(void) const { return (m_refData != NULL && M_CURSORDATA->m_hCursor) ; } diff --git a/include/wx/msw/dcprint.h b/include/wx/msw/dcprint.h index dc434d0f93..5a34cd0bb5 100644 --- a/include/wx/msw/dcprint.h +++ b/include/wx/msw/dcprint.h @@ -24,7 +24,7 @@ class WXDLLEXPORT wxPrinterDC: public wxDC DECLARE_CLASS(wxPrinterDC) // Create a printer DC - wxPrinterDC(const wxString& driver, const wxString& device, const wxString& output, const bool interactive = TRUE, const int orientation = wxPORTRAIT); + wxPrinterDC(const wxString& driver, const wxString& device, const wxString& output, bool interactive = TRUE, int orientation = wxPORTRAIT); wxPrinterDC(WXHDC theDC); ~wxPrinterDC(void); diff --git a/include/wx/msw/dialog.h b/include/wx/msw/dialog.h index f3e9616d92..d44d0081af 100644 --- a/include/wx/msw/dialog.h +++ b/include/wx/msw/dialog.h @@ -33,8 +33,8 @@ public: // Constructor with a modal flag, but no window id - the old convention inline wxDialog(wxWindow *parent, const wxString& title, bool modal, - const int x = -1, const int y= -1, const int width = 500, const int height = 500, - const long style = wxDEFAULT_DIALOG_STYLE, + int x = -1, int y= -1, int width = 500, int height = 500, + long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxDialogNameStr) { long modalStyle = modal ? wxDIALOG_MODAL : wxDIALOG_MODELESS ; @@ -42,32 +42,32 @@ public: } // Constructor with no modal flag - the new convention. - inline wxDialog(wxWindow *parent, const wxWindowID id, + inline wxDialog(wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxDEFAULT_DIALOG_STYLE, + long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxDialogNameStr) { Create(parent, id, title, pos, size, style, name); } - bool Create(wxWindow *parent, const wxWindowID id, + bool Create(wxWindow *parent, wxWindowID id, const wxString& title, // bool modal = FALSE, // TODO make this a window style? const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxDEFAULT_DIALOG_STYLE, + long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxDialogNameStr); ~wxDialog(void); virtual bool Destroy(void); - void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO); - void SetClientSize(const int width, const int height); + void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); + void SetClientSize(int width, int height); void GetPosition(int *x, int *y) const; - bool Show(const bool show); + bool Show(bool show); bool IsShown(void) const ; - void Iconize(const bool iconize); + void Iconize(bool iconize); #if WXWIN_COMPATIBILITY inline bool Iconized(void) const { return IsIconized(); }; @@ -84,9 +84,9 @@ public: void OnPaint(wxPaintEvent& event); void OnCloseWindow(wxCloseEvent& event); - void SetModal(const bool flag); + void SetModal(bool flag); - virtual void Centre(const int direction = wxBOTH); + virtual void Centre(int direction = wxBOTH); virtual bool IsModal(void) const { return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); } // For now, same as Show(TRUE) but returns return code @@ -108,7 +108,7 @@ public: // virtual bool MSWOnEraseBkgnd(WXHDC pDC); virtual bool MSWOnClose(void); inline bool IsModalShowing() const { return m_modalShowing ; } - virtual WXHBRUSH OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, + virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam); DECLARE_EVENT_TABLE() diff --git a/include/wx/msw/filedlg.h b/include/wx/msw/filedlg.h index f9c6ecafc2..f33db5ac67 100644 --- a/include/wx/msw/filedlg.h +++ b/include/wx/msw/filedlg.h @@ -75,8 +75,8 @@ char* WXDLLEXPORT wxFileSelector(const char *message = wxFileSelectorPromptStr, // An extended version of wxFileSelector char* WXDLLEXPORT wxFileSelectorEx(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL, const char *default_filename = NULL, int *indexDefaultExtension = NULL, - const char *wildcard = wxFileSelectorDefaultWildcardStr, const int flags = 0, - wxWindow *parent = NULL, const int x = -1, const int y = -1); + const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0, + wxWindow *parent = NULL, int x = -1, int y = -1); // Generic file load dialog char* WXDLLEXPORT wxLoadFileSelector(const char *what, const char *extension, const char *default_name = NULL, wxWindow *parent = NULL); diff --git a/include/wx/msw/font.h b/include/wx/msw/font.h index 2ed2b248f1..5c1f7dc6b0 100644 --- a/include/wx/msw/font.h +++ b/include/wx/msw/font.h @@ -82,12 +82,12 @@ public: wxString GetWeightString(void) const ; inline bool GetUnderlined(void) const { return M_FONTDATA->m_underlined; } - void SetPointSize(const int pointSize); - void SetFamily(const int family); - void SetStyle(const int style); - void SetWeight(const int weight); + void SetPointSize(int pointSize); + void SetFamily(int family); + void SetStyle(int style); + void SetWeight(int weight); void SetFaceName(const wxString& faceName); - void SetUnderlined(const bool underlined); + void SetUnderlined(bool underlined); inline wxFont& operator = (const wxFont& font) { if (*this == font) return (*this); Ref(font); return *this; } inline bool operator == (const wxFont& font) { return m_refData == font.m_refData; } diff --git a/include/wx/msw/frame.h b/include/wx/msw/frame.h index 652dd1b549..e23b96ee47 100644 --- a/include/wx/msw/frame.h +++ b/include/wx/msw/frame.h @@ -30,11 +30,11 @@ class WXDLLEXPORT wxFrame: public wxWindow { public: wxFrame(void); inline wxFrame(wxWindow *parent, - const wxWindowID id, + wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxDEFAULT_FRAME_STYLE, + long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr) { Create(parent, id, title, pos, size, style, name); @@ -43,14 +43,15 @@ public: ~wxFrame(void); bool Create(wxWindow *parent, - const wxWindowID id, + wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxDEFAULT_FRAME_STYLE, + long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr); #if WXWIN_COMPATIBILITY +/* // The default thing is to set the focus for the first child window. // Override for your own behaviour. virtual void OldOnActivate(bool flag); @@ -60,15 +61,16 @@ public: inline virtual void OldOnMenuCommand(int WXUNUSED(id)) {}; // Called on frame menu command void OldOnSize(int x, int y); +*/ #endif virtual bool Destroy(void); - void SetClientSize(const int width, const int height); + void SetClientSize(int width, int height); void GetClientSize(int *width, int *height) const; void GetSize(int *width, int *height) const ; void GetPosition(int *x, int *y) const ; - void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO); + void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); void OnSize(wxSizeEvent& event); void OnMenuHighlight(wxMenuEvent& event); @@ -76,7 +78,7 @@ public: void OnIdle(wxIdleEvent& event); void OnCloseWindow(wxCloseEvent& event); - bool Show(const bool show); + bool Show(bool show); // Set menu bar void SetMenuBar(wxMenuBar *menu_bar); @@ -86,7 +88,7 @@ public: void SetTitle(const wxString& title); wxString GetTitle(void) const ; - void Centre(const int direction = wxBOTH); + void Centre(int direction = wxBOTH); // Call this to simulate a menu command virtual void Command(int id); @@ -96,14 +98,14 @@ public: virtual void SetIcon(const wxIcon& icon); // Create status line - virtual bool CreateStatusBar(const int number=1); + virtual bool CreateStatusBar(int number=1); inline wxStatusBar *GetStatusBar() const { return m_frameStatusBar; } // Set status line text - virtual void SetStatusText(const wxString& text, const int number = 0); + virtual void SetStatusText(const wxString& text, int number = 0); // Set status line widths - virtual void SetStatusWidths(const int n, const int *widths_field); + virtual void SetStatusWidths(int n, int *widths_field); // Hint to tell framework which status bar to use // TODO: should this go into a wxFrameworkSettings class perhaps? @@ -114,18 +116,18 @@ public: virtual void Fit(void); // Iconize - virtual void Iconize(const bool iconize); + virtual void Iconize(bool iconize); virtual bool IsIconized(void) const ; // Compatibility inline bool Iconized(void) const { return IsIconized(); } - virtual void Maximize(const bool maximize); + virtual void Maximize(bool maximize); virtual bool LoadAccelerators(const wxString& table); virtual void PositionStatusBar(void); - virtual wxStatusBar *OnCreateStatusBar(const int number); + virtual wxStatusBar *OnCreateStatusBar(int number); // Query app for menu item updates (called from OnIdle) void DoMenuUpdates(void); @@ -139,13 +141,13 @@ public: // Handlers bool MSWOnPaint(void); WXHICON MSWOnQueryDragIcon(void); - void MSWOnSize(const int x, const int y, const WXUINT flag); - bool MSWOnCommand(const WXWORD id, const WXWORD cmd, const WXHWND control); + void MSWOnSize(int x, int y, WXUINT flag); + bool MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control); bool MSWOnClose(void); - void MSWOnMenuHighlight(const WXWORD item, const WXWORD flags, const WXHMENU sysmenu); + void MSWOnMenuHighlight(WXWORD item, WXWORD flags, WXHMENU sysmenu); bool MSWProcessMessage(WXMSG *msg); - void MSWCreate(const int id, wxWindow *parent, const char *WXUNUSED(wclass), wxWindow *wx_win, const char *title, - const int x, const int y, const int width, const int height, const long style); + void MSWCreate(int id, wxWindow *parent, const char *WXUNUSED(wclass), wxWindow *wx_win, const char *title, + int x, int y, int width, int height, long style); protected: wxMenuBar * m_frameMenuBar; diff --git a/include/wx/msw/gauge95.h b/include/wx/msw/gauge95.h index 6de6ab41ad..c6d79fa6d9 100644 --- a/include/wx/msw/gauge95.h +++ b/include/wx/msw/gauge95.h @@ -27,29 +27,29 @@ class WXDLLEXPORT wxGauge95: public wxControl public: inline wxGauge95(void) { m_rangeMax = 0; m_gaugePos = 0; } - inline wxGauge95(wxWindow *parent, const wxWindowID id, - const int range, + inline wxGauge95(wxWindow *parent, wxWindowID id, + int range, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxGA_HORIZONTAL, + long style = wxGA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxGaugeNameStr) { Create(parent, id, range, pos, size, style, validator, name); } - bool Create(wxWindow *parent, const wxWindowID id, - const int range, + bool Create(wxWindow *parent, wxWindowID id, + int range, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxGA_HORIZONTAL, + long style = wxGA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxGaugeNameStr); - void SetShadowWidth(const int w); - void SetBezelFace(const int w); - void SetRange(const int r); - void SetValue(const int pos); + void SetShadowWidth(int w); + void SetBezelFace(int w); + void SetRange(int r); + void SetValue(int pos); int GetShadowWidth(void) const ; int GetBezelFace(void) const ; @@ -64,7 +64,7 @@ class WXDLLEXPORT wxGauge95: public wxControl inline void SetButtonColour(const wxColour& col) { SetForegroundColour(col); } #endif - void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO); + void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ; diff --git a/include/wx/msw/gaugemsw.h b/include/wx/msw/gaugemsw.h index 5bb49625f9..e643f18f15 100644 --- a/include/wx/msw/gaugemsw.h +++ b/include/wx/msw/gaugemsw.h @@ -27,29 +27,29 @@ class WXDLLEXPORT wxGaugeMSW: public wxControl public: inline wxGaugeMSW(void) { m_rangeMax = 0; m_gaugePos = 0; } - inline wxGaugeMSW(wxWindow *parent, const wxWindowID id, - const int range, + inline wxGaugeMSW(wxWindow *parent, wxWindowID id, + int range, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxGA_HORIZONTAL, + long style = wxGA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxGaugeNameStr) { Create(parent, id, range, pos, size, style, validator, name); } - bool Create(wxWindow *parent, const wxWindowID id, - const int range, + bool Create(wxWindow *parent, wxWindowID id, + int range, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxGA_HORIZONTAL, + long style = wxGA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxGaugeNameStr); - void SetShadowWidth(const int w); - void SetBezelFace(const int w); - void SetRange(const int r); - void SetValue(const int pos); + void SetShadowWidth(int w); + void SetBezelFace(int w); + void SetRange(int r); + void SetValue(int pos); int GetShadowWidth(void) const ; int GetBezelFace(void) const ; @@ -64,7 +64,7 @@ class WXDLLEXPORT wxGaugeMSW: public wxControl inline void SetButtonColour(const wxColour& col) { SetForegroundColour(col); } #endif - void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO); + void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ; diff --git a/include/wx/msw/icon.h b/include/wx/msw/icon.h index f7119fa44a..0711d68d85 100644 --- a/include/wx/msw/icon.h +++ b/include/wx/msw/icon.h @@ -45,12 +45,12 @@ public: inline wxIcon(const wxIcon& icon) { Ref(icon); } inline wxIcon(const wxIcon* icon) { /* UnRef(); */ if (icon) Ref(*icon); } - wxIcon(const char bits[], const int width, const int height); - wxIcon(const wxString& name, const long flags = wxBITMAP_TYPE_ICO_RESOURCE, + wxIcon(const char bits[], int width, int height); + wxIcon(const wxString& name, long flags = wxBITMAP_TYPE_ICO_RESOURCE, int desiredWidth = -1, int desiredHeight = -1); ~wxIcon(void); - bool LoadFile(const wxString& name, const long flags = wxBITMAP_TYPE_ICO_RESOURCE, + bool LoadFile(const wxString& name, long flags = wxBITMAP_TYPE_ICO_RESOURCE, int desiredWidth = -1, int desiredHeight = -1); inline wxIcon& operator = (const wxIcon& icon) { if (*this == icon) return (*this); Ref(icon); return *this; } @@ -78,7 +78,7 @@ public: m_type = wxBITMAP_TYPE_ICO; }; - virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, const long flags, + virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, int desiredWidth = -1, int desiredHeight = -1); }; @@ -93,7 +93,7 @@ public: m_type = wxBITMAP_TYPE_ICO_RESOURCE; }; - virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, const long flags, + virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, int desiredWidth = -1, int desiredHeight = -1); }; diff --git a/include/wx/msw/imaglist.h b/include/wx/msw/imaglist.h index 0b464abbaa..51812b097f 100644 --- a/include/wx/msw/imaglist.h +++ b/include/wx/msw/imaglist.h @@ -63,7 +63,7 @@ class WXDLLEXPORT wxImageList: public wxObject // Specify the width and height of the images in the list, // whether there are masks associated with them (e.g. if creating images // from icons), and the initial size of the list. - inline wxImageList(const int width, const int height, const bool mask = TRUE, const int initialCount = 1) + inline wxImageList(int width, int height, bool mask = TRUE, int initialCount = 1) { Create(width, height, mask, initialCount); } @@ -83,7 +83,7 @@ class WXDLLEXPORT wxImageList: public wxObject // width, height specify the size of the images in the list (all the same). // mask specifies whether the images have masks or not. // initialNumber is the initial number of images to reserve. - bool Create(const int width, const int height, const bool mask = TRUE, const int initialNumber = 1); + bool Create(int width, int height, bool mask = TRUE, int initialNumber = 1); // Adds a bitmap, and optionally a mask bitmap. // Note that wxImageList creates *new* bitmaps, so you may delete @@ -101,21 +101,21 @@ class WXDLLEXPORT wxImageList: public wxObject // Replaces a bitmap, optionally passing a mask bitmap. // Note that wxImageList creates new bitmaps, so you may delete // 'bitmap' and 'mask' after calling Replace. - bool Replace(const int index, const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap); + bool Replace(int index, const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap); /* Not supported by Win95 // Replacing a bitmap, using the specified colour to create the mask bitmap // Note that wxImageList creates new bitmaps, so you may delete // 'bitmap'. - bool Replace(const int index, const wxBitmap& bitmap, const wxColour& maskColour); + bool Replace(int index, const wxBitmap& bitmap, const wxColour& maskColour); */ // Replaces a bitmap and mask from an icon. // You can delete 'icon' after calling Replace. - bool Replace(const int index, const wxIcon& icon); + bool Replace(int index, const wxIcon& icon); // Removes the image at the given index. - bool Remove(const int index); + bool Remove(int index); // Remove all images bool RemoveAll(void); @@ -124,13 +124,13 @@ class WXDLLEXPORT wxImageList: public wxObject // If 'solidBackground' is TRUE, Draw sets the image list background // colour to the background colour of the wxDC, to speed up // drawing by eliminating masked drawing where possible. - bool Draw(const int index, wxDC& dc, const int x, const int y, - const int flags = wxIMAGELIST_DRAW_NORMAL, const bool solidBackground = FALSE); + bool Draw(int index, wxDC& dc, int x, int y, + int flags = wxIMAGELIST_DRAW_NORMAL, bool solidBackground = FALSE); // TODO: miscellaneous functionality /* - wxIcon *MakeIcon(const int index); - bool SetOverlayImage(const int index, const int overlayMask); + wxIcon *MakeIcon(int index); + bool SetOverlayImage(int index, int overlayMask); */ @@ -139,7 +139,7 @@ class WXDLLEXPORT wxImageList: public wxObject #if 0 // Creates a new drag image by combining the given image (typically a mouse cursor image) // with the current drag image. - bool SetDragCursorImage(const int index, const wxPoint& hotSpot); + bool SetDragCursorImage(int index, const wxPoint& hotSpot); // If successful, returns a pointer to the temporary image list that is used for dragging; // otherwise, NULL. @@ -152,7 +152,7 @@ class WXDLLEXPORT wxImageList: public wxObject // current cursor. In response to subsequent mouse move messages, you can move the drag image // by using the DragMove member function. To end the drag operation, you can use the EndDrag // member function. - bool BeginDrag(const int index, const wxPoint& hotSpot); + bool BeginDrag(int index, const wxPoint& hotSpot); // Ends a drag operation. bool EndDrag(void); diff --git a/include/wx/msw/listbox.h b/include/wx/msw/listbox.h index 1b6f0001df..ff26cefab5 100644 --- a/include/wx/msw/listbox.h +++ b/include/wx/msw/listbox.h @@ -41,28 +41,28 @@ class WXDLLEXPORT wxListBox: public wxControl public: wxListBox(void); - inline wxListBox(wxWindow *parent, const wxWindowID id, + inline wxListBox(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const int n = 0, const wxString choices[] = NULL, - const long style = 0, + int n = 0, const wxString choices[] = NULL, + long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxListBoxNameStr) { Create(parent, id, pos, size, n, choices, style, validator, name); } - bool Create(wxWindow *parent, const wxWindowID id, + bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const int n = 0, const wxString choices[] = NULL, - const long style = 0, + int n = 0, const wxString choices[] = NULL, + long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxListBoxNameStr); ~wxListBox(); - bool MSWCommand(const WXUINT param, const WXWORD id); + bool MSWCommand(WXUINT param, WXWORD id); #if USE_OWNER_DRAWN bool MSWOnMeasure(WXMEASUREITEMSTRUCT *item); @@ -77,35 +77,35 @@ class WXDLLEXPORT wxListBox: public wxControl virtual void Append(const wxString& item); virtual void Append(const wxString& item, char *clientData); - virtual void Set(const int n, const wxString* choices, char **clientData = NULL); + virtual void Set(int n, const wxString* choices, char **clientData = NULL); virtual int FindString(const wxString& s) const ; virtual void Clear(void); - virtual void SetSelection(const int n, const bool select = TRUE); + virtual void SetSelection(int n, bool select = TRUE); - virtual void Deselect(const int n); + virtual void Deselect(int n); // For single choice list item only virtual int GetSelection() const ; - virtual void Delete(const int n); - virtual char *GetClientData(const int n) const ; - virtual void SetClientData(const int n, char *clientData); - virtual void SetString(const int n, const wxString& s); + virtual void Delete(int n); + virtual char *GetClientData(int n) const ; + virtual void SetClientData(int n, char *clientData); + virtual void SetString(int n, const wxString& s); // For single or multiple choice list item virtual int GetSelections(wxArrayInt& aSelections) const; - virtual bool Selected(const int n) const ; - virtual wxString GetString(const int n) const ; - virtual void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO); + virtual bool Selected(int n) const ; + virtual wxString GetString(int n) const ; + virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); // Set the specified item at the first visible item // or scroll to max range. - virtual void SetFirstItem(const int n) ; + virtual void SetFirstItem(int n) ; virtual void SetFirstItem(const wxString& s) ; - virtual void InsertItems(const int nItems, const wxString items[], const int pos); + virtual void InsertItems(int nItems, const wxString items[], int pos); virtual wxString GetStringSelection(void) const ; - virtual bool SetStringSelection(const wxString& s, const bool flag = TRUE); + virtual bool SetStringSelection(const wxString& s, bool flag = TRUE); virtual int Number(void) const ; void Command(wxCommandEvent& event); @@ -116,7 +116,7 @@ class WXDLLEXPORT wxListBox: public wxControl // Otherwise, all strings are used. virtual void SetHorizontalExtent(const wxString& s = wxEmptyString); - virtual WXHBRUSH OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, + virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam); virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); diff --git a/include/wx/msw/listctrl.h b/include/wx/msw/listctrl.h index eab3584c61..95f7a89956 100644 --- a/include/wx/msw/listctrl.h +++ b/include/wx/msw/listctrl.h @@ -175,7 +175,7 @@ public: }; // type of compare function for wxListCtrl sort operation -typedef int (*wxListCtrlCompare)(const long item1, const long item2, long sortData); +typedef int (*wxListCtrlCompare)(long item1, long item2, long sortData); class WXDLLEXPORT wxListCtrl: public wxControl { @@ -187,16 +187,16 @@ class WXDLLEXPORT wxListCtrl: public wxControl wxListCtrl(void); - inline wxListCtrl(wxWindow *parent, const wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, + inline wxListCtrl(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, + long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, const wxString& name = "listCtrl") { Create(parent, id, pos, size, style, validator, name); } ~wxListCtrl(void); - bool Create(wxWindow *parent, const wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxListCtrl"); + bool Create(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, + long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxListCtrl"); // Attributes @@ -207,16 +207,16 @@ class WXDLLEXPORT wxListCtrl: public wxControl void SetBackgroundColour(const wxColour& col); // Gets information about this column - bool GetColumn(const int col, wxListItem& item) const; + bool GetColumn(int col, wxListItem& item) const; // Sets information about this column - bool SetColumn(const int col, wxListItem& item) ; + bool SetColumn(int col, wxListItem& item) ; // Gets the column width - int GetColumnWidth(const int col) const; + int GetColumnWidth(int col) const; // Sets the column width - bool SetColumnWidth(const int col, const int width) ; + bool SetColumnWidth(int col, int width) ; // Gets the number of items that can fit vertically in the // visible area of the list control (list or report view) @@ -234,37 +234,37 @@ class WXDLLEXPORT wxListCtrl: public wxControl bool SetItem(wxListItem& info) ; // Sets a string field at a particular column - long SetItem(const long index, const int col, const wxString& label, const int imageId = -1); + long SetItem(long index, int col, const wxString& label, int imageId = -1); // Gets the item state - int GetItemState(const long item, const long stateMask) const ; + int GetItemState(long item, long stateMask) const ; // Sets the item state - bool SetItemState(const long item, const long state, const long stateMask) ; + bool SetItemState(long item, long state, long stateMask) ; // Sets the item image - bool SetItemImage(const long item, const int image, const int selImage) ; + bool SetItemImage(long item, int image, int selImage) ; // Gets the item text - wxString GetItemText(const long item) const ; + wxString GetItemText(long item) const ; // Sets the item text - void SetItemText(const long item, const wxString& str) ; + void SetItemText(long item, const wxString& str) ; // Gets the item data - long GetItemData(const long item) const ; + long GetItemData(long item) const ; // Sets the item data - bool SetItemData(const long item, long data) ; + bool SetItemData(long item, long data) ; // Gets the item rectangle - bool GetItemRect(const long item, wxRectangle& rect, const int code = wxLIST_RECT_BOUNDS) const ; + bool GetItemRect(long item, wxRectangle& rect, int code = wxLIST_RECT_BOUNDS) const ; // Gets the item position - bool GetItemPosition(const long item, wxPoint& pos) const ; + bool GetItemPosition(long item, wxPoint& pos) const ; // Sets the item position - bool SetItemPosition(const long item, const wxPoint& pos) ; + bool SetItemPosition(long item, const wxPoint& pos) ; // Gets the number of items in the list control int GetItemCount(void) const; @@ -291,25 +291,25 @@ class WXDLLEXPORT wxListCtrl: public wxControl long GetTopItem(void) const ; // Add or remove a single window style - void SetSingleStyle(const long style, const bool add = TRUE) ; + void SetSingleStyle(long style, bool add = TRUE) ; // Set the whole window style - void SetWindowStyleFlag(const long style) ; + void SetWindowStyleFlag(long style) ; // Searches for an item, starting from 'item'. // item can be -1 to find the first item that matches the // specified flags. // Returns the item or -1 if unsuccessful. - long GetNextItem(const long item, int geometry = wxLIST_NEXT_ALL, int state = wxLIST_STATE_DONTCARE) const ; + long GetNextItem(long item, int geometry = wxLIST_NEXT_ALL, int state = wxLIST_STATE_DONTCARE) const ; // Implementation: converts wxWindows style to MSW style. // Can be a single style flag or a bit list. // oldStyle is 'normalised' so that it doesn't contain // conflicting styles. - long ConvertToMSWStyle(long& oldStyle, const long style) const; + long ConvertToMSWStyle(long& oldStyle, long style) const; // Gets one of the three image lists - wxImageList *GetImageList(const int which) const ; + wxImageList *GetImageList(int which) const ; // Sets the image list // N.B. There's a quirk in the Win95 list view implementation. @@ -318,22 +318,22 @@ class WXDLLEXPORT wxListCtrl: public wxControl // haven't specified wxLIST_MASK_IMAGE when inserting. // So you have to set a NULL small-icon image list to be sure that // the wxLC_LIST mode works without icons. Of course, you may want icons... - void SetImageList(wxImageList *imageList, const int which) ; + void SetImageList(wxImageList *imageList, int which) ; // Operations //////////////////////////////////////////////////////////////////////////// // Arranges the items - bool Arrange(const int flag = wxLIST_ALIGN_DEFAULT); + bool Arrange(int flag = wxLIST_ALIGN_DEFAULT); // Deletes an item - bool DeleteItem(const long item); + bool DeleteItem(long item); // Deletes all items bool DeleteAllItems(void) ; // Deletes a column - bool DeleteColumn(const int col); + bool DeleteColumn(int col); // Deletes all columns bool DeleteAllColumns(void); @@ -342,22 +342,22 @@ class WXDLLEXPORT wxListCtrl: public wxControl void ClearAll(void); // Edits a label - wxTextCtrl& Edit(const long item) ; + wxTextCtrl& Edit(long item) ; // Ensures this item is visible - bool EnsureVisible(const long item) ; + bool EnsureVisible(long item) ; // Find an item whose label matches this string, starting from the item after 'start' // or the beginning if 'start' is -1. - long FindItem(const long start, const wxString& str, const bool partial = FALSE); + long FindItem(long start, const wxString& str, bool partial = FALSE); // Find an item whose data matches this data, starting from the item after 'start' // or the beginning if 'start' is -1. - long FindItem(const long start, const long data); + long FindItem(long start, long data); // Find an item nearest this position in the specified direction, starting from // the item after 'start' or the beginning if 'start' is -1. - long FindItem(const long start, const wxPoint& pt, const int direction); + long FindItem(long start, const wxPoint& pt, int direction); // Determines which item (if any) is at the specified point, // giving details in 'flags' (see wxLIST_HITTEST_... flags above) @@ -370,26 +370,26 @@ class WXDLLEXPORT wxListCtrl: public wxControl long InsertItem(wxListItem& info); // Insert a string item - long InsertItem(const long index, const wxString& label); + long InsertItem(long index, const wxString& label); // Insert an image item - long InsertItem(const long index, const int imageIndex); + long InsertItem(long index, int imageIndex); // Insert an image/string item - long InsertItem(const long index, const wxString& label, const int imageIndex); + long InsertItem(long index, const wxString& label, int imageIndex); // For list view mode (only), inserts a column. - long InsertColumn(const long col, wxListItem& info); + long InsertColumn(long col, wxListItem& info); - long InsertColumn(const long col, const wxString& heading, const int format = wxLIST_FORMAT_LEFT, - const int width = -1); + long InsertColumn(long col, const wxString& heading, int format = wxLIST_FORMAT_LEFT, + int width = -1); // Scrolls the list control. If in icon, small icon or report view mode, // x specifies the number of pixels to scroll. If in list view mode, x // specifies the number of columns to scroll. // If in icon, small icon or list view mode, y specifies the number of pixels // to scroll. If in report view mode, y specifies the number of lines to scroll. - bool ScrollList(const int dx, const int dy); + bool ScrollList(int dx, int dy); // Sort items. @@ -409,14 +409,14 @@ class WXDLLEXPORT wxListCtrl: public wxControl * but the display needs refreshing (in string callback mode) // Updates an item. If the list control has the wxLI_AUTO_ARRANGE style, // the items will be rearranged. - bool Update(const long item); + bool Update(long item); */ void Command(wxCommandEvent& event) { ProcessCommand(event); }; // IMPLEMENTATION - bool MSWCommand(const WXUINT param, const WXWORD id); - bool MSWNotify(const WXWPARAM wParam, const WXLPARAM lParam); + bool MSWCommand(WXUINT param, WXWORD id); + bool MSWNotify(WXWPARAM wParam, WXLPARAM lParam); // Recreate window - seems to be necessary when changing a style. void RecreateWindow(void); diff --git a/include/wx/msw/mdi.h b/include/wx/msw/mdi.h index 6664f219f4..d5039e704e 100644 --- a/include/wx/msw/mdi.h +++ b/include/wx/msw/mdi.h @@ -33,11 +33,11 @@ class WXDLLEXPORT wxMDIParentFrame: public wxFrame wxMDIParentFrame(void); inline wxMDIParentFrame(wxWindow *parent, - const wxWindowID id, + wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, + long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, const wxString& name = wxFrameNameStr) { Create(parent, id, title, pos, size, style, name); @@ -46,17 +46,19 @@ class WXDLLEXPORT wxMDIParentFrame: public wxFrame ~wxMDIParentFrame(void); bool Create(wxWindow *parent, - const wxWindowID id, + wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, + long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, const wxString& name = wxFrameNameStr); +/* #if WXWIN_COMPATIBILITY virtual void OldOnActivate(bool flag); virtual void OldOnSize(int x, int y); #endif +*/ void OnSize(wxSizeEvent& event); void OnActivate(wxActivateEvent& event); @@ -92,15 +94,15 @@ class WXDLLEXPORT wxMDIParentFrame: public wxFrame virtual void ActivatePrevious(void); // Handlers - void MSWOnSize(const int x, const int y, const WXUINT flag); - bool MSWOnCommand(const WXWORD id, const WXWORD cmd, const WXHWND control); - void MSWOnMenuHighlight(const WXWORD item, const WXWORD flags, const WXHMENU sysmenu); + void MSWOnSize(int x, int y, WXUINT flag); + bool MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control); + void MSWOnMenuHighlight(WXWORD item, WXWORD flags, WXHMENU sysmenu); bool MSWProcessMessage(WXMSG *msg); void MSWOnCreate(WXLPCREATESTRUCT cs); long MSWDefWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam); - bool MSWOnEraseBkgnd(const WXHDC pDC); + bool MSWOnEraseBkgnd(WXHDC pDC); bool MSWOnDestroy(void); - bool MSWOnActivate(const int state, const bool minimized, const WXHWND activate); + bool MSWOnActivate(int state, bool minimized, WXHWND activate); // Responds to colour changes void OnSysColourChanged(wxSysColourChangedEvent& event); @@ -126,11 +128,11 @@ class WXDLLEXPORT wxMDIChildFrame: public wxFrame wxMDIChildFrame(void); inline wxMDIChildFrame(wxMDIParentFrame *parent, - const wxWindowID id, + wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxDEFAULT_FRAME_STYLE, + long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr) { Create(parent, id, title, pos, size, style, name); @@ -139,16 +141,16 @@ class WXDLLEXPORT wxMDIChildFrame: public wxFrame ~wxMDIChildFrame(void); bool Create(wxMDIParentFrame *parent, - const wxWindowID id, + wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxDEFAULT_FRAME_STYLE, + long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr); // Set menu bar void SetMenuBar(wxMenuBar *menu_bar); - void SetClientSize(const int width, const int height); + void SetClientSize(int width, int height); void GetPosition(int *x, int *y) const ; // MDI operations @@ -158,10 +160,10 @@ class WXDLLEXPORT wxMDIChildFrame: public wxFrame // Handlers - long MSWOnMDIActivate(const long bActivate, const WXHWND, const WXHWND); - void MSWOnSize(const int x, const int y, const WXUINT); + long MSWOnMDIActivate(long bActivate, WXHWND, WXHWND); + void MSWOnSize(int x, int y, WXUINT); void MSWOnWindowPosChanging(void *lpPos); - bool MSWOnCommand(const WXWORD id, const WXWORD cmd, const WXHWND control); + bool MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control); long MSWDefWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam); bool MSWProcessMessage(WXMSG *msg); void MSWDestroyWindow(void); @@ -178,7 +180,7 @@ class WXDLLEXPORT wxMDIClientWindow: public wxWindow public: wxMDIClientWindow(void) ; - inline wxMDIClientWindow(wxMDIParentFrame *parent, const long style = 0) + inline wxMDIClientWindow(wxMDIParentFrame *parent, long style = 0) { CreateClient(parent, style); } @@ -186,7 +188,7 @@ class WXDLLEXPORT wxMDIClientWindow: public wxWindow ~wxMDIClientWindow(void); // Note: this is virtual, to allow overridden behaviour. - virtual bool CreateClient(wxMDIParentFrame *parent, const long style = wxVSCROLL | wxHSCROLL); + virtual bool CreateClient(wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL); // Explicitly call default scroll behaviour void OnScroll(wxScrollEvent& event); @@ -198,7 +200,7 @@ class WXDLLEXPORT wxMDIClientWindow: public wxWindow virtual long MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); // Should hand the message to the default proc - long MSWOnMDIActivate(const long bActivate, const WXHWND, const WXHWND); + long MSWOnMDIActivate(long bActivate, WXHWND, WXHWND); protected: int m_scrollX; diff --git a/include/wx/msw/menu.h b/include/wx/msw/menu.h index 0a9f3642c7..ff91771a08 100644 --- a/include/wx/msw/menu.h +++ b/include/wx/msw/menu.h @@ -70,14 +70,14 @@ public: void SetLabel(int id, const wxString& label); wxString GetLabel(int id) const; // help string - virtual void SetHelpString(const int id, const wxString& helpString); - virtual wxString GetHelpString(const int id) const ; + virtual void SetHelpString(int id, const wxString& helpString); + virtual wxString GetHelpString(int id) const ; // find item // Finds the item id matching the given string, NOT_FOUND if not found. virtual int FindItem(const wxString& itemString) const ; // Find wxMenuItem by ID, and item's menu too if itemMenu is !NULL. - wxMenuItem *FindItemForId(const int itemId, wxMenu **itemMenu = NULL) const; + wxMenuItem *FindItemForId(int itemId, wxMenu **itemMenu = NULL) const; void ProcessCommand(wxCommandEvent& event); inline void Callback(const wxFunction func) { m_callback = func; } @@ -87,7 +87,7 @@ public: inline wxEvtHandler *GetEventHandler(void) { return m_eventHandler; } // IMPLEMENTATION - bool MSWCommand(const WXUINT param, const WXWORD id); + bool MSWCommand(WXUINT param, WXWORD id); void SetInvokingWindow(wxWindow *pWin) { m_pInvokingWindow = pWin; } wxWindow *GetInvokingWindow() const { return m_pInvokingWindow; } @@ -129,35 +129,35 @@ class WXDLLEXPORT wxMenuBar: public wxEvtHandler DECLARE_DYNAMIC_CLASS(wxMenuBar) wxMenuBar(void); - wxMenuBar(const int n, wxMenu *menus[], const wxString titles[]); + wxMenuBar(int n, wxMenu *menus[], const wxString titles[]); ~wxMenuBar(void); void Append(wxMenu *menu, const wxString& title); // Must only be used AFTER menu has been attached to frame, // otherwise use individual menus to enable/disable items - void Enable(const int Id, const bool Flag); - bool Enabled(const int Id) const ; - inline bool IsEnabled(const int Id) const { return Enabled(Id); }; - void EnableTop(const int pos, const bool Flag); - void Check(const int id, const bool Flag); - bool Checked(const int id) const ; - inline bool IsChecked(const int Id) const { return Checked(Id); }; - void SetLabel(const int id, const wxString& label) ; - wxString GetLabel(const int id) const ; - void SetLabelTop(const int pos, const wxString& label) ; - wxString GetLabelTop(const int pos) const ; - virtual void Delete(wxMenu *menu, const int index = 0); /* Menu not destroyed */ + void Enable(int Id, bool Flag); + bool Enabled(int Id) const ; + inline bool IsEnabled(int Id) const { return Enabled(Id); }; + void EnableTop(int pos, bool Flag); + void Check(int id, bool Flag); + bool Checked(int id) const ; + inline bool IsChecked(int Id) const { return Checked(Id); }; + void SetLabel(int id, const wxString& label) ; + wxString GetLabel(int id) const ; + void SetLabelTop(int pos, const wxString& label) ; + wxString GetLabelTop(int pos) const ; + virtual void Delete(wxMenu *menu, int index = 0); /* Menu not destroyed */ virtual bool OnAppend(wxMenu *menu, const char *title); - virtual bool OnDelete(wxMenu *menu, const int index); + virtual bool OnDelete(wxMenu *menu, int index); - virtual void SetHelpString(const int Id, const wxString& helpString); - virtual wxString GetHelpString(const int Id) const ; + virtual void SetHelpString(int Id, const wxString& helpString); + virtual wxString GetHelpString(int Id) const ; virtual int FindMenuItem(const wxString& menuString, const wxString& itemString) const ; // Find wxMenuItem for item ID, and return item's // menu too if itemMenu is non-NULL. - wxMenuItem *FindItemForId(const int itemId, wxMenu **menuForItem = NULL) const ; + wxMenuItem *FindItemForId(int itemId, wxMenu **menuForItem = NULL) const ; inline void SetEventHandler(wxEvtHandler *handler) { m_eventHandler = handler; } inline wxEvtHandler *GetEventHandler(void) { return m_eventHandler; } diff --git a/include/wx/msw/minifram.h b/include/wx/msw/minifram.h index 54d025e255..4bd21f182d 100644 --- a/include/wx/msw/minifram.h +++ b/include/wx/msw/minifram.h @@ -25,11 +25,11 @@ class WXDLLEXPORT wxMiniFrame: public wxFrame { public: inline wxMiniFrame(void) {} inline wxMiniFrame(wxWindow *parent, - const wxWindowID id, + wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxDEFAULT_FRAME|wxTINY_CAPTION_HORIZ, + long style = wxDEFAULT_FRAME|wxTINY_CAPTION_HORIZ, const wxString& name = wxFrameNameStr) { Create(parent, id, title, pos, size, style, name); diff --git a/include/wx/msw/msgdlg.h b/include/wx/msw/msgdlg.h index 7188bb2f62..27c10ef6e1 100644 --- a/include/wx/msw/msgdlg.h +++ b/include/wx/msw/msgdlg.h @@ -42,8 +42,8 @@ public: int WXDLLEXPORT wxMessageBox(const wxString& message, const wxString& caption = wxMessageBoxCaptionStr, - const long style = wxOK|wxCENTRE, - wxWindow *parent = NULL, const int x = -1, const int y = -1); + long style = wxOK|wxCENTRE, + wxWindow *parent = NULL, int x = -1, int y = -1); #endif // __MSGBOXDLGH__ diff --git a/include/wx/msw/notebook.h b/include/wx/msw/notebook.h index 4f59ab01cf..2514158818 100644 --- a/include/wx/msw/notebook.h +++ b/include/wx/msw/notebook.h @@ -71,17 +71,17 @@ public: wxNotebook(); // the same arguments as for wxControl (@@@ any special styles?) wxNotebook(wxWindow *parent, - const wxWindowID id, + wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = 0, + long style = 0, const wxString& name = "notebook"); // Create() function bool Create(wxWindow *parent, - const wxWindowID id, + wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = 0, + long style = 0, const wxString& name = "notebook"); // dtor ~wxNotebook(); @@ -164,7 +164,7 @@ public: // base class virtuals // ------------------- virtual void Command(wxCommandEvent& event); - virtual bool MSWNotify(const WXWPARAM wParam, const WXLPARAM lParam); + virtual bool MSWNotify(WXWPARAM wParam, WXLPARAM lParam); protected: // common part of all ctors diff --git a/include/wx/msw/palette.h b/include/wx/msw/palette.h index bddc8a334c..f7dffc57b0 100644 --- a/include/wx/msw/palette.h +++ b/include/wx/msw/palette.h @@ -41,11 +41,11 @@ public: inline wxPalette(const wxPalette& palette) { Ref(palette); } inline wxPalette(const wxPalette* palette) { /* UnRef(); */ if (palette) Ref(*palette); } - wxPalette(const 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(void); - bool Create(const 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; - bool GetRGB(const int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const; + bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const; virtual bool Ok(void) const { return (m_refData != NULL) ; } diff --git a/include/wx/msw/pen.h b/include/wx/msw/pen.h index 9604745a00..7f2b8491ab 100644 --- a/include/wx/msw/pen.h +++ b/include/wx/msw/pen.h @@ -49,9 +49,9 @@ class WXDLLEXPORT wxPen: public wxGDIObject DECLARE_DYNAMIC_CLASS(wxPen) public: wxPen(void); - wxPen(const wxColour& col, const int width, const int style); - wxPen(const wxString& col, const int width, const int style); - wxPen(const wxBitmap& stipple, const int width); + wxPen(const wxColour& col, int width, int style); + wxPen(const wxString& col, int width, int style); + wxPen(const wxBitmap& stipple, int width); inline wxPen(const wxPen& pen) { Ref(pen); } inline wxPen(const wxPen* pen) { /* UnRef(); */ if (pen) Ref(*pen); } ~wxPen(void); @@ -67,12 +67,12 @@ public: void SetColour(const wxString& col) ; void SetColour(const unsigned char r, const unsigned char g, const unsigned char b) ; - void SetWidth(const int width) ; - void SetStyle(const int style) ; + void SetWidth(int width) ; + void SetStyle(int style) ; void SetStipple(const wxBitmap& stipple) ; - void SetDashes(const int nb_dashes, const wxDash *dash) ; - void SetJoin(const int join) ; - void SetCap(const int cap) ; + void SetDashes(int nb_dashes, const wxDash *dash) ; + void SetJoin(int join) ; + void SetCap(int cap) ; inline wxColour& GetColour(void) const { return (M_PENDATA ? M_PENDATA->m_colour : wxNullColour); }; inline int GetWidth(void) const { return (M_PENDATA ? M_PENDATA->m_width : 0); }; diff --git a/include/wx/msw/pnghand.h b/include/wx/msw/pnghand.h index bb24c83fc0..2b588b35ff 100644 --- a/include/wx/msw/pnghand.h +++ b/include/wx/msw/pnghand.h @@ -24,8 +24,8 @@ public: m_type = wxBITMAP_TYPE_PNG; }; - virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, const long flags, + virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, int desiredWidth, int desiredHeight); - virtual bool SaveFile(wxBitmap *bitmap, const wxString& name, const int type, const wxPalette *palette = NULL); + virtual bool SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette = NULL); }; diff --git a/include/wx/msw/radiobox.h b/include/wx/msw/radiobox.h index 36c1882277..5cb2077a64 100644 --- a/include/wx/msw/radiobox.h +++ b/include/wx/msw/radiobox.h @@ -49,20 +49,20 @@ public: #endif - inline wxRadioBox(wxWindow *parent, const wxWindowID id, const wxString& title, + inline wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const int n = 0, const wxString choices[] = NULL, - const int majorDim = 0, const long style = wxRA_HORIZONTAL, + int n = 0, const wxString choices[] = NULL, + int majorDim = 0, long style = wxRA_HORIZONTAL, const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr) { Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name); } /* - wxRadioBox(wxWindow *parent, const wxWindowID id, const wxString& title, + wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const int n = 0, const wxBitmap *choices[] = NULL, - const int majorDim = 0, const long style = wxRA_HORIZONTAL, + int n = 0, const wxBitmap *choices[] = NULL, + int majorDim = 0, long style = wxRA_HORIZONTAL, const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr) { Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name); @@ -71,41 +71,41 @@ public: ~wxRadioBox(void); - bool Create(wxWindow *parent, const wxWindowID id, const wxString& title, + bool Create(wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const int n = 0, const wxString choices[] = NULL, - const int majorDim = 0, const long style = wxRA_HORIZONTAL, + int n = 0, const wxString choices[] = NULL, + int majorDim = 0, long style = wxRA_HORIZONTAL, const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr); /* - bool Create(wxWindow *parent, const wxWindowID id, const wxString& title, + bool Create(wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const int n = 0, const wxBitmap *choices[] = NULL, - const int majorDim = 0, const long style = wxRA_HORIZONTAL, + int n = 0, const wxBitmap *choices[] = NULL, + int majorDim = 0, long style = wxRA_HORIZONTAL, const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr); */ - virtual bool MSWCommand(const WXUINT param, const WXWORD id); - virtual WXHBRUSH OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, + virtual bool MSWCommand(WXUINT param, WXWORD id); + virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam); int FindString(const wxString& s) const; - void SetSelection(const int N); + void SetSelection(int N); int GetSelection(void) const; - wxString GetString(const int N) const; - void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO); + wxString GetString(int N) const; + void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); void GetSize(int *x, int *y) const; void GetPosition(int *x, int *y) const; wxString GetLabel(void) const; void SetLabel(const wxString& label); - void SetLabel(const int item, const wxString& label) ; - void SetLabel(const int item, wxBitmap *bitmap) ; - wxString GetLabel(const int item) const; - bool Show(const bool show); + void SetLabel(int item, const wxString& label) ; + void SetLabel(int item, wxBitmap *bitmap) ; + wxString GetLabel(int item) const; + bool Show(bool show); void SetFocus(void); - void Enable(const bool enable); - void Enable(const int item, const bool enable); - void Show(const int item, const bool show) ; + void Enable(bool enable); + void Enable(int item, bool enable); + void Show(int item, bool show) ; inline void SetLabelFont(const wxFont& WXUNUSED(font)) {}; inline void SetButtonFont(const wxFont& font) { SetFont(font); } @@ -115,7 +115,7 @@ public: void Command(wxCommandEvent& event); inline int GetNumberOfRowsOrCols(void) const { return m_noRowsOrCols; } - inline void SetNumberOfRowsOrCols(const int n) { m_noRowsOrCols = n; } + inline void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; } // Implementation inline WXHWND *GetRadioButtons(void) const { return m_radioButtons; } diff --git a/include/wx/msw/radiobut.h b/include/wx/msw/radiobut.h index d78fdf1d5d..8307f8b1f2 100644 --- a/include/wx/msw/radiobut.h +++ b/include/wx/msw/radiobut.h @@ -26,29 +26,29 @@ class WXDLLEXPORT wxRadioButton: public wxControl protected: public: inline wxRadioButton(void) {} - inline wxRadioButton(wxWindow *parent, const wxWindowID id, + inline wxRadioButton(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, const long style = 0, + const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxRadioButtonNameStr) { Create(parent, id, label, pos, size, style, validator, name); } - bool Create(wxWindow *parent, const wxWindowID id, + bool Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, const long style = 0, + const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxRadioButtonNameStr); virtual void SetLabel(const wxString& label); - virtual void SetValue(const bool val); + virtual void SetValue(bool val); virtual bool GetValue(void) const ; void Command(wxCommandEvent& event); - virtual WXHBRUSH OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, + virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam); }; @@ -65,25 +65,25 @@ class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton wxBitmap *theButtonBitmap; public: inline wxBitmapRadioButton(void) { theButtonBitmap = NULL; } - inline wxBitmapRadioButton(wxWindow *parent, const wxWindowID id, + inline wxBitmapRadioButton(wxWindow *parent, wxWindowID id, const wxBitmap *label, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, const long style = 0, + const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxBitmapRadioButtonNameStr) { Create(parent, id, label, pos, size, style, validator, name); } - bool Create(wxWindow *parent, const wxWindowID id, + bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *label, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, const long style = 0, + const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxBitmapRadioButtonNameStr); virtual void SetLabel(const wxBitmap *label); - virtual void SetValue(const bool val) ; + virtual void SetValue(bool val) ; virtual bool GetValue(void) const ; }; #endif diff --git a/include/wx/msw/scrolbar.h b/include/wx/msw/scrolbar.h index 9edd72a589..2ef6b9a55c 100644 --- a/include/wx/msw/scrolbar.h +++ b/include/wx/msw/scrolbar.h @@ -29,19 +29,19 @@ public: inline wxScrollBar(void) { m_pageSize = 0; m_viewSize = 0; m_objectSize = 0; } ~wxScrollBar(void); - inline wxScrollBar(wxWindow *parent, const wxWindowID id, + inline wxScrollBar(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxSB_HORIZONTAL, + long style = wxSB_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxScrollBarNameStr) { Create(parent, id, pos, size, style, validator, name); } - bool Create(wxWindow *parent, const wxWindowID id, + bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxSB_HORIZONTAL, + long style = wxSB_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxScrollBarNameStr); @@ -50,29 +50,29 @@ public: inline int GetPageSize() const { return m_viewSize; } inline int GetRange() const { return m_objectSize; } - virtual void SetPosition(const int viewStart); - virtual void SetScrollbar(const int position, const int thumbSize, const int range, const int pageSize, - const bool refresh = TRUE); + virtual void SetPosition(int viewStart); + virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize, + bool refresh = TRUE); #if WXWIN_COMPATIBILITY // Backward compatibility inline int GetValue(void) const { return GetPosition(); } - inline void SetValue(const int viewStart) { SetPosition(viewStart); } + inline void SetValue(int viewStart) { SetPosition(viewStart); } void GetValues(int *viewStart, int *viewLength, int *objectLength, int *pageLength) const ; inline int GetViewLength() const { return m_viewSize; } inline int GetObjectLength() const { return m_objectSize; } - void SetPageSize(const int pageLength); - void SetObjectLength(const int objectLength); - void SetViewLength(const int viewLength); + void SetPageSize(int pageLength); + void SetObjectLength(int objectLength); + void SetViewLength(int viewLength); #endif void Command(wxCommandEvent& event); - virtual WXHBRUSH OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, + virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam); - void MSWOnVScroll(const WXWORD wParam, const WXWORD pos, const WXHWND control); - void MSWOnHScroll(const WXWORD wParam, const WXWORD pos, const WXHWND control); + void MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control); + void MSWOnHScroll(WXWORD wParam, WXWORD pos, WXHWND control); #if WXWIN_COMPATIBILITY // Backward compatibility: generate an old-style scroll command diff --git a/include/wx/msw/slider95.h b/include/wx/msw/slider95.h index b54042b1d2..445d8f3da5 100644 --- a/include/wx/msw/slider95.h +++ b/include/wx/msw/slider95.h @@ -28,11 +28,11 @@ class WXDLLEXPORT wxSlider95: public wxControl public: wxSlider95(void); - inline wxSlider95(wxWindow *parent, const wxWindowID id, - const int value, const int minValue, const int maxValue, + inline wxSlider95(wxWindow *parent, wxWindowID id, + int value, int minValue, int maxValue, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxSL_HORIZONTAL, + long style = wxSL_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxSliderNameStr) { @@ -41,41 +41,41 @@ public: ~wxSlider95(void); - bool Create(wxWindow *parent, const wxWindowID id, - const int value, const int minValue, const int maxValue, + bool Create(wxWindow *parent, wxWindowID id, + int value, int minValue, int maxValue, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxSL_HORIZONTAL, + long style = wxSL_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxSliderNameStr); virtual int GetValue(void) const ; - virtual void SetValue(const int); + virtual void SetValue(int); void GetSize(int *x, int *y) const ; - void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO); + void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); void GetPosition(int *x, int *y) const ; - bool Show(const bool show); + bool Show(bool show); - void SetRange(const int minValue, const int maxValue); + void SetRange(int minValue, int maxValue); inline int GetMin(void) const { return m_rangeMin; } inline int GetMax(void) const { return m_rangeMax; } // For trackbars only - void SetTickFreq(const int n, const int pos); + void SetTickFreq(int n, int pos); inline int GetTickFreq(void) const { return m_tickFreq; } - void SetPageSize(const int pageSize); + void SetPageSize(int pageSize); int GetPageSize(void) const ; void ClearSel(void) ; void ClearTicks(void) ; - void SetLineSize(const int lineSize); + void SetLineSize(int lineSize); int GetLineSize(void) const ; int GetSelEnd(void) const ; int GetSelStart(void) const ; - void SetSelection(const int minPos, const int maxPos); - void SetThumbLength(const int len) ; + void SetSelection(int minPos, int maxPos); + void SetThumbLength(int len) ; int GetThumbLength(void) const ; - void SetTick(const int tickPos) ; + void SetTick(int tickPos) ; // IMPLEMENTATION inline WXHWND GetStaticMin() const { return m_staticMin; } @@ -89,10 +89,10 @@ public: #endif void Command(wxCommandEvent& event); - virtual WXHBRUSH OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, + virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam); - void MSWOnVScroll(const WXWORD wParam, const WXWORD pos, const WXHWND control); - void MSWOnHScroll(const WXWORD wParam, const WXWORD pos, const WXHWND control); + void MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control); + void MSWOnHScroll(WXWORD wParam, WXWORD pos, WXHWND control); protected: WXHWND m_staticMin; diff --git a/include/wx/msw/slidrmsw.h b/include/wx/msw/slidrmsw.h index e581d809e4..afeebafcfb 100644 --- a/include/wx/msw/slidrmsw.h +++ b/include/wx/msw/slidrmsw.h @@ -28,11 +28,11 @@ class WXDLLEXPORT wxSliderMSW: public wxControl public: wxSliderMSW(void); - inline wxSliderMSW(wxWindow *parent, const wxWindowID id, - const int value, const int minValue, const int maxValue, + inline wxSliderMSW(wxWindow *parent, wxWindowID id, + int value, int minValue, int maxValue, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxSL_HORIZONTAL, + long style = wxSL_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxSliderNameStr) { @@ -41,41 +41,41 @@ public: ~wxSliderMSW(void); - bool Create(wxWindow *parent, const wxWindowID id, - const int value, const int minValue, const int maxValue, + bool Create(wxWindow *parent, wxWindowID id, + int value, int minValue, int maxValue, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxSL_HORIZONTAL, + long style = wxSL_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxSliderNameStr); virtual int GetValue(void) const ; - virtual void SetValue(const int); + virtual void SetValue(int); void GetSize(int *x, int *y) const ; - void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO); + void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); void GetPosition(int *x, int *y) const ; - bool Show(const bool show); + bool Show(bool show); - void SetRange(const int minValue, const int maxValue); + void SetRange(int minValue, int maxValue); inline int GetMin(void) const { return m_rangeMin; } inline int GetMax(void) const { return m_rangeMax; } // For trackbars only - void SetTickFreq(const int n, const int pos); + void SetTickFreq(int n, int pos); inline int GetTickFreq(void) const { return m_tickFreq; } - void SetPageSize(const int pageSize); + void SetPageSize(int pageSize); int GetPageSize(void) const ; void ClearSel(void) ; void ClearTicks(void) ; - void SetLineSize(const int lineSize); + void SetLineSize(int lineSize); int GetLineSize(void) const ; int GetSelEnd(void) const ; int GetSelStart(void) const ; - void SetSelection(const int minPos, const int maxPos); - void SetThumbLength(const int len) ; + void SetSelection(int minPos, int maxPos); + void SetThumbLength(int len) ; int GetThumbLength(void) const ; - void SetTick(const int tickPos) ; + void SetTick(int tickPos) ; // IMPLEMENTATION inline WXHWND GetStaticMin() const { return m_staticMin; } @@ -89,10 +89,10 @@ public: #endif void Command(wxCommandEvent& event); - virtual WXHBRUSH OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, + virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam); - void MSWOnVScroll(const WXWORD wParam, const WXWORD pos, const WXHWND control); - void MSWOnHScroll(const WXWORD wParam, const WXWORD pos, const WXHWND control); + void MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control); + void MSWOnHScroll(WXWORD wParam, WXWORD pos, WXHWND control); protected: WXHWND m_staticMin; diff --git a/include/wx/msw/spinbutt.h b/include/wx/msw/spinbutt.h index 07b18e2b1c..4c1aa7b1c9 100644 --- a/include/wx/msw/spinbutt.h +++ b/include/wx/msw/spinbutt.h @@ -41,23 +41,23 @@ class WXDLLEXPORT wxSpinButton: public wxControl wxSpinButton(void); - inline wxSpinButton(wxWindow *parent, const wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxSP_VERTICAL, const wxString& name = "wxSpinButton") + inline wxSpinButton(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, + long style = wxSP_VERTICAL, const wxString& name = "wxSpinButton") { Create(parent, id, pos, size, style, name); } ~wxSpinButton(void); - bool Create(wxWindow *parent, const wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxSP_VERTICAL, const wxString& name = "wxSpinButton"); + bool Create(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, + long style = wxSP_VERTICAL, const wxString& name = "wxSpinButton"); // Attributes //////////////////////////////////////////////////////////////////////////// int GetValue(void) const ; - void SetValue(const int val) ; - void SetRange(const int minVal, const int maxVal) ; + void SetValue(int val) ; + void SetRange(int minVal, int maxVal) ; inline int GetMin(void) const { return m_min; } inline int GetMax(void) const { return m_max; } @@ -67,10 +67,10 @@ class WXDLLEXPORT wxSpinButton: public wxControl void Command(wxCommandEvent& event) { ProcessCommand(event); }; // IMPLEMENTATION - bool MSWCommand(const WXUINT param, const WXWORD id); - bool MSWNotify(const WXWPARAM wParam, const WXLPARAM lParam); - void MSWOnVScroll(const WXWORD wParam, const WXWORD pos, const WXHWND control); - void MSWOnHScroll(const WXWORD wParam, const WXWORD pos, const WXHWND control); + bool MSWCommand(WXUINT param, WXWORD id); + bool MSWNotify(WXWPARAM wParam, WXLPARAM lParam); + void MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control); + void MSWOnHScroll(WXWORD wParam, WXWORD pos, WXHWND control); protected: int m_min; diff --git a/include/wx/msw/statbmp.h b/include/wx/msw/statbmp.h index d66db9614b..b9c9669a33 100644 --- a/include/wx/msw/statbmp.h +++ b/include/wx/msw/statbmp.h @@ -26,21 +26,21 @@ class WXDLLEXPORT wxStaticBitmap: public wxControl public: inline wxStaticBitmap(void) { } - inline wxStaticBitmap(wxWindow *parent, const wxWindowID id, + inline wxStaticBitmap(wxWindow *parent, wxWindowID id, const wxBitmap& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = 0, + long style = 0, const wxString& name = wxStaticBitmapNameStr) { Create(parent, id, label, pos, size, style, name); } - bool Create(wxWindow *parent, const wxWindowID id, + bool Create(wxWindow *parent, wxWindowID id, const wxBitmap& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = 0, + long style = 0, const wxString& name = wxStaticBitmapNameStr); virtual void SetBitmap(const wxBitmap& bitmap); @@ -48,7 +48,7 @@ class WXDLLEXPORT wxStaticBitmap: public wxControl virtual void Command(wxCommandEvent& WXUNUSED(event)) {}; virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {}; - void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO); + void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); inline wxBitmap& GetBitmap(void) const { return (wxBitmap&) m_messageBitmap; } diff --git a/include/wx/msw/statbox.h b/include/wx/msw/statbox.h index fbd5e150c3..e1970721ae 100644 --- a/include/wx/msw/statbox.h +++ b/include/wx/msw/statbox.h @@ -27,21 +27,21 @@ class WXDLLEXPORT wxStaticBox: public wxControl public: inline wxStaticBox(void) {} - inline wxStaticBox(wxWindow *parent, const wxWindowID id, + inline wxStaticBox(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = 0, + long style = 0, const wxString& name = wxStaticBoxNameStr) { Create(parent, id, label, pos, size, style, name); } - bool Create(wxWindow *parent, const wxWindowID id, + bool Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = 0, + long style = 0, const wxString& name = wxStaticBoxNameStr); virtual void Command(wxCommandEvent& WXUNUSED(event)) {}; @@ -51,9 +51,9 @@ class WXDLLEXPORT wxStaticBox: public wxControl virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); - void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO); + void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); void SetLabel(const wxString& label); - virtual WXHBRUSH OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, + virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam); DECLARE_EVENT_TABLE() diff --git a/include/wx/msw/statbr95.h b/include/wx/msw/statbr95.h index 7bc28a7fe1..5de48abeb0 100644 --- a/include/wx/msw/statbr95.h +++ b/include/wx/msw/statbr95.h @@ -31,14 +31,14 @@ public: bool Create(wxWindow *parent, wxWindowID id = -1, long style = wxST_SIZEGRIP); // a status line can have several (<256) fields numbered from 0 - virtual void SetFieldsCount(int number = 1, const int *widths = NULL); + virtual void SetFieldsCount(int number = 1, int *widths = NULL); // each field of status line has it's own text - virtual void SetStatusText(const wxString& text, const int number = 0); + virtual void SetStatusText(const wxString& text, int number = 0); virtual wxString GetStatusText(int number = 0) const; // set status line fields' widths - virtual void SetStatusWidths(int n, const int *widths_field); + virtual void SetStatusWidths(int n, int *widths_field); // we're going to process WM_SIZE (of the parent window) void OnSize(wxSizeEvent& event); @@ -46,7 +46,7 @@ public: DECLARE_EVENT_TABLE() protected: - void CopyFieldsWidth(const int *widths); + void CopyFieldsWidth(int *widths); void SetFieldsWidth(); }; diff --git a/include/wx/msw/stattext.h b/include/wx/msw/stattext.h index 4f6e66aa4e..8d4ad7ab6c 100644 --- a/include/wx/msw/stattext.h +++ b/include/wx/msw/stattext.h @@ -26,31 +26,31 @@ class WXDLLEXPORT wxStaticText: public wxControl public: inline wxStaticText(void) { } - inline wxStaticText(wxWindow *parent, const wxWindowID id, + inline wxStaticText(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = 0, + long style = 0, const wxString& name = wxStaticTextNameStr) { Create(parent, id, label, pos, size, style, name); } - bool Create(wxWindow *parent, const wxWindowID id, + bool Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = 0, + long style = 0, const wxString& name = wxStaticTextNameStr); virtual void Command(wxCommandEvent& WXUNUSED(event)) {}; virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {}; - void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO); + void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); void SetLabel(const wxString&); - virtual WXHBRUSH OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, + virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam); virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); diff --git a/include/wx/msw/tabctrl.h b/include/wx/msw/tabctrl.h index cd9e4590ed..b5c076eb7f 100644 --- a/include/wx/msw/tabctrl.h +++ b/include/wx/msw/tabctrl.h @@ -122,8 +122,8 @@ class WXDLLEXPORT wxTabCtrl: public wxControl void OnKillFocus(wxFocusEvent& event) { Default() ; } void Command(wxCommandEvent& event); - bool MSWCommand(const WXUINT param, const WXWORD id); - bool MSWNotify(const WXWPARAM wParam, const WXLPARAM lParam); + bool MSWCommand(WXUINT param, WXWORD id); + bool MSWNotify(WXWPARAM wParam, WXLPARAM lParam); // Responds to colour changes void OnSysColourChanged(wxSysColourChangedEvent& event); diff --git a/include/wx/msw/tbar95.h b/include/wx/msw/tbar95.h index 5a04b68243..9e6c77877e 100644 --- a/include/wx/msw/tbar95.h +++ b/include/wx/msw/tbar95.h @@ -45,17 +45,17 @@ class WXDLLEXPORT wxToolBar95: public wxToolBarBase Create(parent, -1, wxPoint(x, y), wxSize(w, h), style, orientation, RowsOrColumns, name); } #endif - inline wxToolBar95(wxWindow *parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxNO_BORDER, const int orientation = wxVERTICAL, - const int RowsOrColumns = 1, const wxString& name = wxToolBarNameStr) + inline wxToolBar95(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, + long style = wxNO_BORDER, int orientation = wxVERTICAL, + int RowsOrColumns = 1, const wxString& name = wxToolBarNameStr) { Create(parent, id, pos, size, style, orientation, RowsOrColumns, name); } ~wxToolBar95(void); - bool Create(wxWindow *parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxNO_BORDER, const int orientation = wxVERTICAL, - const int RowsOrColumns = 1, const wxString& name = wxToolBarNameStr); + bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, + long style = wxNO_BORDER, int orientation = wxVERTICAL, + int RowsOrColumns = 1, const wxString& name = wxToolBarNameStr); // Call default behaviour void OnPaint(wxPaintEvent& event) { Default() ; } @@ -68,15 +68,15 @@ class WXDLLEXPORT wxToolBar95: public wxToolBarBase // If pushedBitmap is NULL, a reversed version of bitmap is // created and used as the pushed/toggled image. // If toggle is TRUE, the button toggles between the two states. - wxToolBarTool *AddTool(const int toolIndex, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap, - const bool toggle = FALSE, const long xPos = -1, const long yPos = -1, wxObject *clientData = NULL, + wxToolBarTool *AddTool(int toolIndex, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap, + bool toggle = FALSE, long xPos = -1, long yPos = -1, wxObject *clientData = NULL, const wxString& helpString1 = "", const wxString& helpString2 = ""); // New members // Set default bitmap size void SetDefaultSize(const wxSize& size); - void EnableTool(const int toolIndex, const bool enable); // additional drawing on enabling - void ToggleTool(const int toolIndex, const bool toggle); // toggle is TRUE if toggled on + void EnableTool(int toolIndex, bool enable); // additional drawing on enabling + void ToggleTool(int toolIndex, bool toggle); // toggle is TRUE if toggled on void ClearTools(void); // The button size is bigger than the bitmap size @@ -87,12 +87,12 @@ class WXDLLEXPORT wxToolBar95: public wxToolBarBase // Add all the buttons: required for Win95. virtual bool CreateTools(void); - virtual void SetRows(const int nRows); + virtual void SetRows(int nRows); virtual void Layout(void) {} // IMPLEMENTATION - bool MSWCommand(const WXUINT param, const WXWORD id); - bool MSWNotify(const WXWPARAM wParam, const WXLPARAM lParam); + bool MSWCommand(WXUINT param, WXWORD id); + bool MSWNotify(WXWPARAM wParam, WXLPARAM lParam); // Responds to colour changes void OnSysColourChanged(wxSysColourChangedEvent& event); diff --git a/include/wx/msw/tbarmsw.h b/include/wx/msw/tbarmsw.h index 320a46a785..5d18fb450c 100644 --- a/include/wx/msw/tbarmsw.h +++ b/include/wx/msw/tbarmsw.h @@ -40,15 +40,15 @@ public: Create(parent, -1, wxPoint(x, y), wxSize(w, h), style, orientation, RowsOrColumns, name); } #endif - inline wxToolBarMSW(wxWindow *parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxNO_BORDER, const int orientation = wxVERTICAL, - const int RowsOrColumns = 2, const wxString& name = wxButtonBarNameStr) + inline wxToolBarMSW(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, + long style = wxNO_BORDER, int orientation = wxVERTICAL, + int RowsOrColumns = 2, const wxString& name = wxButtonBarNameStr) { Create(parent, id, pos, size, style, orientation, RowsOrColumns, name); } - bool Create(wxWindow *parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxNO_BORDER, const int orientation = wxVERTICAL, - const int RowsOrColumns = 2, const wxString& name = wxButtonBarNameStr); + bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, + long style = wxNO_BORDER, int orientation = wxVERTICAL, + int RowsOrColumns = 2, const wxString& name = wxButtonBarNameStr); ~wxToolBarMSW(void); @@ -60,8 +60,8 @@ public: // If pushedBitmap is NULL, a reversed version of bitmap is // created and used as the pushed/toggled image. // If toggle is TRUE, the button toggles between the two states. - wxToolBarTool *AddTool(const int toolIndex, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap, - const bool toggle = FALSE, const long xPos = -1, const long yPos = -1, wxObject *clientData = NULL, + wxToolBarTool *AddTool(int toolIndex, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap, + bool toggle = FALSE, long xPos = -1, long yPos = -1, wxObject *clientData = NULL, const wxString& helpString1 = "", const wxString& helpString2 = ""); void DrawTool(wxDC& dc, wxMemoryDC& memDc, wxToolBarTool *tool); @@ -69,7 +69,7 @@ public: // New members // Set default bitmap size virtual void SetDefaultSize(const wxSize& size); - void EnableTool(const int toolIndex, const bool enable); // additional drawing on enabling + void EnableTool(int toolIndex, bool enable); // additional drawing on enabling // The button size is bigger than the bitmap size wxSize GetDefaultButtonSize(void) const; diff --git a/include/wx/msw/textctrl.h b/include/wx/msw/textctrl.h index 43b5ea9ac3..d0976655ac 100644 --- a/include/wx/msw/textctrl.h +++ b/include/wx/msw/textctrl.h @@ -49,10 +49,10 @@ class WXDLLEXPORT wxTextCtrl: public wxControl wxString fileName; public: wxTextCtrl(void); - inline wxTextCtrl(wxWindow *parent, const wxWindowID id, + inline wxTextCtrl(wxWindow *parent, wxWindowID id, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, const long style = 0, + const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxTextCtrlNameStr) #ifndef NO_TEXT_WINDOW_STREAM @@ -62,33 +62,33 @@ class WXDLLEXPORT wxTextCtrl: public wxControl Create(parent, id, value, pos, size, style, validator, name); } - bool Create(wxWindow *parent, const wxWindowID id, + bool Create(wxWindow *parent, wxWindowID id, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, const long style = 0, + const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxTextCtrlNameStr); virtual wxString GetValue(void) const ; virtual void SetValue(const wxString& value); - virtual void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO); + virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); // Clipboard operations virtual void Copy(void); virtual void Cut(void); virtual void Paste(void); - virtual void SetInsertionPoint(const long pos); + virtual void SetInsertionPoint(long pos); virtual void SetInsertionPointEnd(void); virtual long GetInsertionPoint(void) const ; virtual long GetLastPosition(void) const ; - virtual void Replace(const long from, const long to, const wxString& value); - virtual void Remove(const long from, const long to); - virtual void SetSelection(const long from, const long to); + virtual void Replace(long from, long to, const wxString& value); + virtual void Remove(long from, long to); + virtual void SetSelection(long from, long to); virtual void Command(wxCommandEvent& event); - virtual void SetEditable(const bool editable); + virtual void SetEditable(bool editable); #ifndef NO_TEXT_WINDOW_STREAM int overflow(int i); @@ -99,10 +99,10 @@ class WXDLLEXPORT wxTextCtrl: public wxControl void OnDropFiles(wxDropFilesEvent& event); wxTextCtrl& operator<<(const wxString& s); - wxTextCtrl& operator<<(const int i); - wxTextCtrl& operator<<(const long i); - wxTextCtrl& operator<<(const float f); - wxTextCtrl& operator<<(const double d); + wxTextCtrl& operator<<(int i); + wxTextCtrl& operator<<(long i); + wxTextCtrl& operator<<(float f); + wxTextCtrl& operator<<(double d); wxTextCtrl& operator<<(const char c); virtual bool LoadFile(const wxString& file); @@ -115,11 +115,11 @@ class WXDLLEXPORT wxTextCtrl: public wxControl inline bool Modified(void) const { return IsModified(); } #endif - virtual long XYToPosition(const long x, const long y) const ; - virtual void PositionToXY(const long pos, long *x, long *y) const ; - virtual void ShowPosition(const long pos); - virtual int GetLineLength(const long lineNo) const ; - virtual wxString GetLineText(const long lineNo) const ; + virtual long XYToPosition(long x, long y) const ; + virtual void PositionToXY(long pos, long *x, long *y) const ; + virtual void ShowPosition(long pos); + virtual int GetLineLength(long lineNo) const ; + virtual wxString GetLineText(long lineNo) const ; virtual int GetNumberOfLines(void) const ; virtual void Clear(void); @@ -129,10 +129,10 @@ class WXDLLEXPORT wxTextCtrl: public wxControl void OnEraseBackground(wxEraseEvent& event); // Implementation - virtual bool MSWCommand(const WXUINT param, const WXWORD id); + virtual bool MSWCommand(WXUINT param, WXWORD id); inline bool IsRich(void) { return m_isRich; } - inline void SetRichEdit(const bool isRich) { m_isRich = isRich; } - virtual WXHBRUSH OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, + inline void SetRichEdit(bool isRich) { m_isRich = isRich; } + virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam); virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); diff --git a/include/wx/msw/treectrl.h b/include/wx/msw/treectrl.h index 1243428dc6..00a1bf6489 100644 --- a/include/wx/msw/treectrl.h +++ b/include/wx/msw/treectrl.h @@ -129,10 +129,10 @@ class WXDLLEXPORT wxTreeCtrl: public wxControl wxTreeCtrl(void); - inline wxTreeCtrl(wxWindow *parent, const wxWindowID id = -1, + inline wxTreeCtrl(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT, + long style = wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxTreeCtrl") { @@ -140,10 +140,10 @@ class WXDLLEXPORT wxTreeCtrl: public wxControl } ~wxTreeCtrl(void); - bool Create(wxWindow *parent, const wxWindowID id = -1, + bool Create(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT, + long style = wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxTreeCtrl"); @@ -151,50 +151,50 @@ class WXDLLEXPORT wxTreeCtrl: public wxControl int GetCount(void) const ; int GetIndent(void) const ; void SetIndent(int indent) ; - wxImageList *GetImageList(const int which = wxIMAGE_LIST_NORMAL) const ; - void SetImageList(wxImageList *imageList, const int which = wxIMAGE_LIST_NORMAL) ; - long GetNextItem(const long item, int code) const ; - bool ItemHasChildren(const long item) const ; - long GetChild(const long item) const ; - long GetParent(const long item) const ; + wxImageList *GetImageList(int which = wxIMAGE_LIST_NORMAL) const ; + void SetImageList(wxImageList *imageList, int which = wxIMAGE_LIST_NORMAL) ; + long GetNextItem(long item, int code) const ; + bool ItemHasChildren(long item) const ; + long GetChild(long item) const ; + long GetParent(long item) const ; long GetFirstVisibleItem(void) const ; - long GetNextVisibleItem(const long item) const ; + long GetNextVisibleItem(long item) const ; long GetSelection(void) const ; long GetRootItem(void) const ; bool GetItem(wxTreeItem& info) const ; bool SetItem(wxTreeItem& info) ; - int GetItemState(const long item, const long stateMask) const ; - bool SetItemState(const long item, const long state, const long stateMask) ; - bool SetItemImage(const long item, const int image, const int selImage) ; - wxString GetItemText(const long item) const ; - void SetItemText(const long item, const wxString& str) ; - long GetItemData(const long item) const ; - bool SetItemData(const long item, long data) ; - bool GetItemRect(const long item, wxRectangle& rect, bool textOnly = FALSE) const; + int GetItemState(long item, long stateMask) const ; + bool SetItemState(long item, long state, long stateMask) ; + bool SetItemImage(long item, int image, int selImage) ; + wxString GetItemText(long item) const ; + void SetItemText(long item, const wxString& str) ; + long GetItemData(long item) const ; + bool SetItemData(long item, long data) ; + bool GetItemRect(long item, wxRectangle& rect, bool textOnly = FALSE) const; wxTextCtrl& GetEditControl(void) const; // Operations - bool DeleteItem(const long item); - bool ExpandItem(const long item, const int action); - long InsertItem(const long parent, wxTreeItem& info, const long insertAfter = wxTREE_INSERT_LAST); + bool DeleteItem(long item); + bool ExpandItem(long item, int action); + long InsertItem(long parent, wxTreeItem& info, long insertAfter = wxTREE_INSERT_LAST); // If image > -1 and selImage == -1, the same image is used for // both selected and unselected items. - long InsertItem(const long parent, const wxString& label, const int image = -1, const int selImage = -1, const long insertAfter = wxTREE_INSERT_LAST); - bool SelectItem(const long item); - bool ScrollTo(const long item); + long InsertItem(long parent, const wxString& label, int image = -1, int selImage = -1, long insertAfter = wxTREE_INSERT_LAST); + bool SelectItem(long item); + bool ScrollTo(long item); bool DeleteAllItems(void) ; - wxTextCtrl& Edit(const long item) ; + wxTextCtrl& Edit(long item) ; long HitTest(const wxPoint& point, int& flags); -// wxImageList *CreateDragImage(const long item) ; - bool SortChildren(const long item) ; - bool EnsureVisible(const long item) ; +// wxImageList *CreateDragImage(long item) ; + bool SortChildren(long item) ; + bool EnsureVisible(long item) ; void Command(wxCommandEvent& event) { ProcessCommand(event); }; // IMPLEMENTATION - bool MSWCommand(const WXUINT param, const WXWORD id); - bool MSWNotify(const WXWPARAM wParam, const WXLPARAM lParam); + bool MSWCommand(WXUINT param, WXWORD id); + bool MSWNotify(WXWPARAM wParam, WXLPARAM lParam); protected: wxTextCtrl m_textCtrl; diff --git a/include/wx/msw/window.h b/include/wx/msw/window.h index 73d5971c39..47ef66082e 100644 --- a/include/wx/msw/window.h +++ b/include/wx/msw/window.h @@ -89,10 +89,10 @@ class WXDLLEXPORT wxWindow: public wxEvtHandler public: wxWindow(void); - inline wxWindow(wxWindow *parent, const wxWindowID id, + inline wxWindow(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = 0, + long style = 0, const wxString& name = wxPanelNameStr) { m_children = new wxList; @@ -101,17 +101,17 @@ public: virtual ~wxWindow(void); - bool Create(wxWindow *parent, const wxWindowID id, + bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = 0, + long style = 0, const wxString& name = wxPanelNameStr); // Fit the window around the items virtual void Fit(void); // Show or hide the window - virtual bool Show(const bool show); + virtual bool Show(bool show); // Is the window shown? virtual bool IsShown(void) const; @@ -169,12 +169,12 @@ public: virtual void GetClientSize(int *width, int *height) const; // Set overall size and position - virtual void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO); - inline virtual void SetSize(const int width, const int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); } - inline virtual void Move(const int x, const int y) { SetSize(x, y, -1, -1, wxSIZE_USE_EXISTING); } + virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); + inline virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); } + inline virtual void Move(int x, int y) { SetSize(x, y, -1, -1, wxSIZE_USE_EXISTING); } // Set client size - virtual void SetClientSize(const int width, const int size); + virtual void SetClientSize(int width, int size); // Convert client to screen coordinates virtual void ClientToScreen(int *x, int *y) const; @@ -190,7 +190,7 @@ public: virtual void ReleaseMouse(void); // Enable or disable the window - virtual void Enable(const bool enable); + virtual void Enable(bool enable); #if USE_DRAG_AND_DROP // Associate a drop target with this window (if the window already had a drop @@ -200,7 +200,7 @@ public: #endif // Accept files for dragging - virtual void DragAcceptFiles(const bool accept); + virtual void DragAcceptFiles(bool accept); // Set/get the window title virtual inline void SetTitle(const wxString& WXUNUSED(title)) {}; @@ -214,51 +214,51 @@ public: inline virtual void SetName(const wxString& name); // Centre the window - virtual void Centre(const int direction) ; - inline void Center(const int direction = wxHORIZONTAL) { Centre(direction); } + virtual void Centre(int direction) ; + inline void Center(int direction = wxHORIZONTAL) { Centre(direction); } // Popup a menu - virtual bool PopupMenu(wxMenu *menu, const int x, const int y); + virtual bool PopupMenu(wxMenu *menu, int x, int y); // Send the window a refresh event - virtual void Refresh(const bool eraseBack = TRUE, const wxRectangle *rect = NULL); + virtual void Refresh(bool eraseBack = TRUE, const wxRectangle *rect = NULL); #if WXWIN_COMPATIBILITY // Set/get scroll attributes - virtual void SetScrollRange(const int orient, const int range, const bool refresh = TRUE); - virtual void SetScrollPage(const int orient, const int page, const bool refresh = TRUE); - virtual int OldGetScrollRange(const int orient) const; - virtual int GetScrollPage(const int orient) const; + virtual void SetScrollRange(int orient, int range, bool refresh = TRUE); + virtual void SetScrollPage(int orient, int page, bool refresh = TRUE); + virtual int OldGetScrollRange(int orient) const; + virtual int GetScrollPage(int orient) const; #endif // New functions that will replace the above. - virtual void SetScrollbar(const int orient, const int pos, const int thumbVisible, - const int range, const bool refresh = TRUE); + virtual void SetScrollbar(int orient, int pos, int thumbVisible, + int range, bool refresh = TRUE); - virtual void SetScrollPos(const int orient, const int pos, const bool refresh = TRUE); - virtual int GetScrollPos(const int orient) const; - virtual int GetScrollRange(const int orient) const; - virtual int GetScrollThumb(const int orient) const; + virtual void SetScrollPos(int orient, int pos, bool refresh = TRUE); + virtual int GetScrollPos(int orient) const; + virtual int GetScrollRange(int orient) const; + virtual int GetScrollThumb(int orient) const; - virtual void ScrollWindow(const int dx, const int dy, const wxRectangle *rect = NULL); + virtual void ScrollWindow(int dx, int dy, const wxRectangle *rect = NULL); // Caret manipulation - virtual void CreateCaret(const int w, const int h); + virtual void CreateCaret(int w, int h); virtual void CreateCaret(const wxBitmap *bitmap); virtual void DestroyCaret(void); - virtual void ShowCaret(const bool show); - virtual void SetCaretPos(const int x, const int y); + virtual void ShowCaret(bool show); + virtual void SetCaretPos(int x, int y); virtual void GetCaretPos(int *x, int *y) const; // Tell window how much it can be sized - virtual void SetSizeHints(const int minW = -1, const int minH = -1, const int maxW = -1, const int maxH = -1, const int incW = -1, const int incH = -1); + virtual void SetSizeHints(int minW = -1, int minH = -1, int maxW = -1, int maxH = -1, int incW = -1, int incH = -1); // Set/get the window's identifier inline int GetId() const; - inline void SetId(const int id); + inline void SetId(int id); // Make the window modal (all other windows unresponsive) - virtual void MakeModal(const bool modal); + virtual void MakeModal(bool modal); // Get the private handle (platform-dependent) inline void *GetHandle(void) const; @@ -278,15 +278,15 @@ public: inline wxValidator *GetValidator(void) const; // Set/get the window's style - inline void SetWindowStyleFlag(const long flag); + inline void SetWindowStyleFlag(long flag); inline long GetWindowStyleFlag(void) const; // Set/get double-clickability // TODO: we probably wish to get rid of this, and // always allow double clicks. - inline void SetDoubleClick(const bool flag); + inline void SetDoubleClick(bool flag); inline bool GetDoubleClick(void) const; - inline void AllowDoubleClick(const bool value) { SetDoubleClick(value); } + inline void AllowDoubleClick(bool value) { SetDoubleClick(value); } // Old way to handle a control command virtual void OnCommand(wxWindow& win, wxCommandEvent& event); @@ -301,14 +301,14 @@ public: wxEvtHandler *PopEventHandler(bool deleteHandler = FALSE) ; // Close the window by calling OnClose, posting a deletion - virtual bool Close(const bool force = FALSE); + virtual bool Close(bool force = FALSE); // Destroy the window (delayed, if a managed window) virtual bool Destroy(void) ; // Mode for telling default OnSize members to // call Layout(), if not using Sizers, just top-down constraints - inline void SetAutoLayout(const bool a); + inline void SetAutoLayout(bool a); inline bool GetAutoLayout(void) const; // Set/get constraints @@ -353,42 +353,27 @@ public: #endif // Native resource loading - virtual bool LoadNativeDialog(wxWindow* parent, const wxWindowID& id); + virtual bool LoadNativeDialog(wxWindow* parent, wxWindowID& id); virtual bool LoadNativeDialog(wxWindow* parent, const wxString& name); - virtual wxWindow* GetWindowChild1(const wxWindowID& id); - virtual wxWindow* GetWindowChild(const wxWindowID& id); + virtual wxWindow* GetWindowChild1(wxWindowID& id); + virtual wxWindow* GetWindowChild(wxWindowID& id); virtual void GetTextExtent(const wxString& string, int *x, int *y, int *descent = NULL, int *externalLeading = NULL, - const wxFont *theFont = NULL, const bool use16 = FALSE) const; -#if WXWIN_COMPATIBILITY - void GetTextExtent(const wxString& string, float *x, float *y, - float *descent = NULL, - float *externalLeading = NULL, - const wxFont *theFont = NULL, const bool use16 = FALSE) const; -#endif - - // Gets 'context' member - // OBSOLETE - // TODO: how to make backward compatible? -// inline wxDC *GetDC(void) const; + const wxFont *theFont = NULL, bool use16 = FALSE) const; // Is the window retained? inline bool IsRetained(void) const; - // Set the window's colourmap/palette - // OBSOLETE -// virtual void SetPalette(wxPalette *palette); - // Warp the pointer the given position - virtual void WarpPointer(const int x_pos, const int y_pos) ; + virtual void WarpPointer(int x_pos, int y_pos) ; // Clear the window virtual void Clear(void); // Find a window by id or name - virtual wxWindow *FindWindow(const long id); + virtual wxWindow *FindWindow(long id); virtual wxWindow *FindWindow(const wxString& name); // Constraint operations @@ -410,6 +395,7 @@ public: // virtual void OnChangeFocus(wxControl *from, wxControl *to); // virtual bool OnFunctionKey(wxKeyEvent &event); +/* #if WXWIN_COMPATIBILITY virtual void OldOnMenuSelect(int WXUNUSED(cmd)); virtual void OldOnInitMenuPopup(int WXUNUSED(pos)); @@ -424,18 +410,6 @@ public: virtual void OldOnSetFocus(void); // Called on setting focus virtual void OldOnKillFocus(void); // Called on killing focus #endif - -/* THIS IS NOW OBSOLETE - all positions are in device units - // Calculates the position of a point on the window - // taking into account the position of scrollbars. - // Windows doesn't automatically reflect the position of the - // scrollbars - (0, 0) is always the top left of the visible window, - // whereas in XView, (0, 0) moves according to scrollbar positions. - virtual void CalcScrolledPosition(const int x, const int y, int *xx, int *yy) const ; - - // Calculate logical (scroll-bar/scaling aware) position from - // device (pixel) position - virtual void CalcUnscrolledPosition(const int x, const int y, float *xx, float *yy) const ; */ public: @@ -446,11 +420,11 @@ public: void SubclassWin(WXHWND hWnd); void UnsubclassWin(void); virtual long Default(void); - virtual bool MSWCommand(const WXUINT param, const WXWORD id); - virtual bool MSWNotify(const WXWPARAM wParam, const WXLPARAM lParam); - virtual wxWindow *FindItem(const int id) const; - virtual wxWindow *FindItemByHWND(const WXHWND hWnd, bool controlOnly = FALSE) const ; - virtual void PreDelete(const WXHDC dc); // Allows system cleanup + virtual bool MSWCommand(WXUINT param, WXWORD id); + virtual bool MSWNotify(WXWPARAM wParam, WXLPARAM lParam); + virtual wxWindow *FindItem(int id) const; + virtual wxWindow *FindItemByHWND(WXHWND hWnd, bool controlOnly = FALSE) const ; + virtual void PreDelete(WXHDC dc); // Allows system cleanup // TO DO: how many of these need to be virtual? virtual WXHWND GetHWND(void) const ; virtual void SetHWND(WXHWND hWnd); @@ -480,31 +454,31 @@ public: void DeleteRelatedConstraints(void); virtual void ResetConstraints(void); - virtual void SetConstraintSizes(const bool recurse = TRUE); + virtual void SetConstraintSizes(bool recurse = TRUE); virtual bool LayoutPhase1(int *noChanges); virtual bool LayoutPhase2(int *noChanges); - virtual bool DoPhase(const int); + virtual bool DoPhase(int); // Transforms from sizer coordinate space to actual // parent coordinate space virtual void TransformSizerToActual(int *x, int *y) const ; // Set size with transformation to actual coordinates if nec. - virtual void SizerSetSize(const int x, const int y, const int w, const int h); - virtual void SizerMove(const int x, const int y); + virtual void SizerSetSize(int x, int y, int w, int h); + virtual void SizerMove(int x, int y); // Only set/get the size/position of the constraint (if any) - virtual void SetSizeConstraint(const int x, const int y, const int w, const int h); - virtual void MoveConstraint(const int x, const int y); + virtual void SetSizeConstraint(int x, int y, int w, int h); + virtual void MoveConstraint(int x, int y); virtual void GetSizeConstraint(int *w, int *h) const ; virtual void GetClientSizeConstraint(int *w, int *h) const ; virtual void GetPositionConstraint(int *x, int *y) const ; - wxObject *GetChild(const int number) const ; + wxObject *GetChild(int number) const ; - void MSWCreate(const int id, wxWindow *parent, const char *wclass, wxWindow *wx_win, const char *title, - const int x, const int y, const int width, const int height, - const WXDWORD style, const char *dialog_template = NULL, - const WXDWORD exendedStyle = 0); + void MSWCreate(int id, wxWindow *parent, const char *wclass, wxWindow *wx_win, const char *title, + int x, int y, int width, int height, + WXDWORD style, const char *dialog_template = NULL, + WXDWORD exendedStyle = 0); // Actually defined in wx_canvs.cc since requires wxCanvas declaration virtual void MSWDeviceToLogical(float *x, float *y) const ; @@ -522,57 +496,57 @@ public: virtual void MSWOnCreate(WXLPCREATESTRUCT cs); virtual bool MSWOnPaint(void); virtual WXHICON MSWOnQueryDragIcon(void) { return 0; } - virtual void MSWOnSize(const int x, const int y, const WXUINT flag); + virtual void MSWOnSize(int x, int y, WXUINT flag); virtual void MSWOnWindowPosChanging(void *lpPos); - virtual void MSWOnHScroll(const WXWORD nSBCode, const WXWORD pos, const WXHWND control); - virtual void MSWOnVScroll(const WXWORD nSBCode, const WXWORD pos, const WXHWND control); - virtual bool MSWOnCommand(const WXWORD id, const WXWORD cmd, const WXHWND control); + virtual void MSWOnHScroll(WXWORD nSBCode, WXWORD pos, WXHWND control); + virtual void MSWOnVScroll(WXWORD nSBCode, WXWORD pos, WXHWND control); + virtual bool MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control); virtual long MSWOnSysCommand(WXWPARAM wParam, WXLPARAM lParam); - virtual bool MSWOnNotify(const WXWPARAM wParam, const WXLPARAM lParam); - virtual WXHBRUSH MSWOnCtlColor(const WXHDC dc, const WXHWND pWnd, const WXUINT nCtlColor, - const WXUINT message, const WXWPARAM wParam, const WXLPARAM lParam); - virtual bool MSWOnColorChange(const WXHWND hWnd, const WXUINT message, const WXWPARAM wParam, const WXLPARAM lParam); - virtual bool MSWOnEraseBkgnd(const WXHDC pDC); - virtual void MSWOnMenuHighlight(const WXWORD item, const WXWORD flags, const WXHMENU sysmenu); - virtual void MSWOnInitMenuPopup(const WXHMENU menu, const int pos, const bool isSystem); + virtual bool MSWOnNotify(WXWPARAM wParam, WXLPARAM lParam); + virtual WXHBRUSH MSWOnCtlColor(WXHDC dc, WXHWND pWnd, WXUINT nCtlColor, + WXUINT message, WXWPARAM wParam, WXLPARAM lParam); + virtual bool MSWOnColorChange(WXHWND hWnd, WXUINT message, WXWPARAM wParam, WXLPARAM lParam); + virtual bool MSWOnEraseBkgnd(WXHDC pDC); + virtual void MSWOnMenuHighlight(WXWORD item, WXWORD flags, WXHMENU sysmenu); + virtual void MSWOnInitMenuPopup(WXHMENU menu, int pos, bool isSystem); virtual bool MSWOnClose(void); virtual bool MSWOnDestroy(void); - virtual bool MSWOnSetFocus(const WXHWND wnd); - virtual bool MSWOnKillFocus(const WXHWND wnd); - virtual void MSWOnDropFiles(const WXWPARAM wParam); + virtual bool MSWOnSetFocus(WXHWND wnd); + virtual bool MSWOnKillFocus(WXHWND wnd); + virtual void MSWOnDropFiles(WXWPARAM wParam); virtual bool MSWOnInitDialog(WXHWND hWndFocus); virtual void MSWOnShow(bool show, int status); // TODO: rationalise these functions into 1 or 2 which take the // event type as argument. - virtual void MSWOnLButtonDown(const int x, const int y, const WXUINT flags); - virtual void MSWOnLButtonUp(const int x, const int y, const WXUINT flags); - virtual void MSWOnLButtonDClick(const int x, const int y, const WXUINT flags); + virtual void MSWOnLButtonDown(int x, int y, WXUINT flags); + virtual void MSWOnLButtonUp(int x, int y, WXUINT flags); + virtual void MSWOnLButtonDClick(int x, int y, WXUINT flags); - virtual void MSWOnMButtonDown(const int x, const int y, const WXUINT flags); - virtual void MSWOnMButtonUp(const int x, const int y, const WXUINT flags); - virtual void MSWOnMButtonDClick(const int x, const int y, const WXUINT flags); + virtual void MSWOnMButtonDown(int x, int y, WXUINT flags); + virtual void MSWOnMButtonUp(int x, int y, WXUINT flags); + virtual void MSWOnMButtonDClick(int x, int y, WXUINT flags); - virtual void MSWOnRButtonDown(const int x, const int y, const WXUINT flags); - virtual void MSWOnRButtonUp(const int x, const int y, const WXUINT flags); - virtual void MSWOnRButtonDClick(const int x, const int y, const WXUINT flags); + virtual void MSWOnRButtonDown(int x, int y, WXUINT flags); + virtual void MSWOnRButtonUp(int x, int y, WXUINT flags); + virtual void MSWOnRButtonDClick(int x, int y, WXUINT flags); - virtual void MSWOnMouseMove(const int x, const int y, const WXUINT flags); - virtual void MSWOnMouseEnter(const int x, const int y, const WXUINT flags); - virtual void MSWOnMouseLeave(const int x, const int y, const WXUINT flags); + virtual void MSWOnMouseMove(int x, int y, WXUINT flags); + virtual void MSWOnMouseEnter(int x, int y, WXUINT flags); + virtual void MSWOnMouseLeave(int x, int y, WXUINT flags); - virtual void MSWOnChar(const WXWORD wParam, const WXLPARAM lParam, const bool isASCII = FALSE); + virtual void MSWOnChar(WXWORD wParam, WXLPARAM lParam, bool isASCII = FALSE); - virtual bool MSWOnActivate(const int flag, const bool minimized, const WXHWND activate); - virtual long MSWOnMDIActivate(const long flag, const WXHWND activate, const WXHWND deactivate); + virtual bool MSWOnActivate(int flag, bool minimized, WXHWND activate); + virtual long MSWOnMDIActivate(long flag, WXHWND activate, WXHWND deactivate); - virtual bool MSWOnDrawItem(const int id, WXDRAWITEMSTRUCT *item); - virtual bool MSWOnMeasureItem(const int id, WXMEASUREITEMSTRUCT *item); + virtual bool MSWOnDrawItem(int id, WXDRAWITEMSTRUCT *item); + virtual bool MSWOnMeasureItem(int id, WXMEASUREITEMSTRUCT *item); - virtual void MSWOnJoyDown(const int joystick, const int x, const int y, const WXUINT flags); - virtual void MSWOnJoyUp(const int joystick, const int x, const int y, const WXUINT flags); - virtual void MSWOnJoyMove(const int joystick, const int x, const int y, const WXUINT flags); - virtual void MSWOnJoyZMove(const int joystick, const int z, const WXUINT flags); + virtual void MSWOnJoyDown(int joystick, int x, int y, WXUINT flags); + virtual void MSWOnJoyUp(int joystick, int x, int y, WXUINT flags); + virtual void MSWOnJoyMove(int joystick, int x, int y, WXUINT flags); + virtual void MSWOnJoyZMove(int joystick, int z, WXUINT flags); // Window procedure virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); @@ -586,13 +560,13 @@ public: void MSWDetachWindowMenu(void); inline WXFARPROC MSWGetOldWndProc() const; - inline void MSWSetOldWndProc(const WXFARPROC proc); + inline void MSWSetOldWndProc(WXFARPROC proc); // Define for each class of dialog and control - virtual WXHBRUSH OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, + virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam); - inline void SetShowing(const bool show); + inline void SetShowing(bool show); inline bool IsUserEnabled(void) const; inline bool GetUseCtl3D(void) const ; inline bool GetTransparentBackground(void) const ; @@ -707,7 +681,7 @@ DECLARE_EVENT_TABLE() inline void *wxWindow::GetHandle(void) const { return (void *)GetHWND(); } inline int wxWindow::GetId() const { return m_windowId; } -inline void wxWindow::SetId(const int id) { m_windowId = id; } +inline void wxWindow::SetId(int id) { m_windowId = id; } inline wxWindow *wxWindow::GetParent(void) const { return m_windowParent; } inline void wxWindow::SetParent(wxWindow *p) { m_windowParent = p; } inline wxWindow *wxWindow::GetGrandParent(void) const { return (m_windowParent ? m_windowParent->m_windowParent : NULL); } @@ -716,12 +690,12 @@ inline wxFont *wxWindow::GetFont(void) const { return (wxFont *) & m_windowFont; inline wxString wxWindow::GetName(void) const { return m_windowName; } inline void wxWindow::SetName(const wxString& name) { m_windowName = name; } inline long wxWindow::GetWindowStyleFlag(void) const { return m_windowStyle; } -inline void wxWindow::SetWindowStyleFlag(const long flag) { m_windowStyle = flag; } -inline void wxWindow::SetDoubleClick(const bool flag) { m_doubleClickAllowed = flag; } +inline void wxWindow::SetWindowStyleFlag(long flag) { m_windowStyle = flag; } +inline void wxWindow::SetDoubleClick(bool flag) { m_doubleClickAllowed = flag; } inline bool wxWindow::GetDoubleClick(void) const { return m_doubleClickAllowed; } inline void wxWindow::SetEventHandler(wxEvtHandler *handler) { m_windowEventHandler = handler; } inline wxEvtHandler *wxWindow::GetEventHandler(void) const { return m_windowEventHandler; } -inline void wxWindow::SetAutoLayout(const bool a) { m_autoLayout = a; } +inline void wxWindow::SetAutoLayout(bool a) { m_autoLayout = a; } inline bool wxWindow::GetAutoLayout(void) const { return m_autoLayout; } inline wxLayoutConstraints *wxWindow::GetConstraints(void) const { return m_constraints; } inline void wxWindow::SetBackgroundColour(const wxColour& col) { m_backgroundColour = col; }; @@ -737,6 +711,8 @@ inline wxButton *wxWindow::GetDefaultItem(void) const { return m_defaultItem; } inline void wxWindow::SetDefaultItem(wxButton *but) { m_defaultItem = but; } // inline wxDC *wxWindow::GetDC(void) const { return m_windowDC; } inline bool wxWindow::IsRetained(void) const { return ((m_windowStyle & wxRETAINED) == wxRETAINED); } + +/* #if WXWIN_COMPATIBILITY inline void wxWindow::OldOnMenuSelect(int WXUNUSED(cmd)) { Default(); }; inline void wxWindow::OldOnInitMenuPopup(int WXUNUSED(pos)) { Default(); }; @@ -745,13 +721,15 @@ inline void wxWindow::OldOnMenuCommand(int WXUNUSED(cmd)) { Default(); } // Deal inline void wxWindow::OldOnMove(int WXUNUSED(x), int WXUNUSED(y)) { Default(); }; // Called on move inline void wxWindow::OldOnActivate(bool WXUNUSED(active)) { Default(); }; // Called on window activation (MSW) #endif -inline void wxWindow::SetShowing(const bool show) { m_isShown = show; } +*/ + +inline void wxWindow::SetShowing(bool show) { m_isShown = show; } inline wxList *wxWindow::GetConstraintsInvolvedIn(void) const { return m_constraintsInvolvedIn; } inline wxSizer *wxWindow::GetSizer(void) const { return m_windowSizer; } inline wxWindow *wxWindow::GetSizerParent(void) const { return m_sizerParent; } inline void wxWindow::SetSizerParent(wxWindow *win) { m_sizerParent = win; } inline WXFARPROC wxWindow::MSWGetOldWndProc() const { return m_oldWndProc; } -inline void wxWindow::MSWSetOldWndProc(const WXFARPROC proc) { m_oldWndProc = proc; } +inline void wxWindow::MSWSetOldWndProc(WXFARPROC proc) { m_oldWndProc = proc; } inline wxValidator *wxWindow::GetValidator(void) const { return m_windowValidator; } inline bool wxWindow::IsUserEnabled(void) const { return m_winEnabled; } inline bool wxWindow::GetUseCtl3D(void) const { return m_useCtl3D; } diff --git a/include/wx/postscrp.h b/include/wx/postscrp.h index 352096a75d..16f231d2c8 100644 --- a/include/wx/postscrp.h +++ b/include/wx/postscrp.h @@ -151,7 +151,7 @@ DECLARE_CLASS(wxPostScriptPrintDialog) public: wxPostScriptPrintDialog (wxWindow *parent, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxDEFAULT_DIALOG_STYLE); + long style = wxDEFAULT_DIALOG_STYLE); virtual int ShowModal(void) ; }; diff --git a/include/wx/tbarbase.h b/include/wx/tbarbase.h index d12aec5677..b410ac6a82 100644 --- a/include/wx/tbarbase.h +++ b/include/wx/tbarbase.h @@ -35,11 +35,11 @@ class WXDLLEXPORT wxToolBarTool: public wxObject { DECLARE_DYNAMIC_CLASS(wxToolBarTool) public: - wxToolBarTool(const int theIndex = 0, const wxBitmap& bitmap1 = wxNullBitmap, const wxBitmap& bitmap2 = wxNullBitmap, - const bool toggle = FALSE, const long xPos = -1, const long yPos = -1, + wxToolBarTool(int theIndex = 0, const wxBitmap& bitmap1 = wxNullBitmap, const wxBitmap& bitmap2 = wxNullBitmap, + bool toggle = FALSE, long xPos = -1, long yPos = -1, const wxString& shortHelpString = "", const wxString& longHelpString = ""); ~wxToolBarTool (); - inline void SetSize( const long w, const long h ) { m_width = w; m_height = h; } + inline void SetSize( long w, long h ) { m_width = w; m_height = h; } inline long GetWidth () const { return m_width; } inline long GetHeight () const { return m_height; } @@ -85,16 +85,16 @@ class WXDLLEXPORT wxToolBarBase : public wxControl // If pushedBitmap is NULL, a reversed version of bitmap is // created and used as the pushed/toggled image. // If toggle is TRUE, the button toggles between the two states. - virtual wxToolBarTool *AddTool(const int toolIndex, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap, - const bool toggle = FALSE, const long xPos = -1, const long yPos = -1, wxObject *clientData = NULL, + virtual wxToolBarTool *AddTool(int toolIndex, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap, + bool toggle = FALSE, long xPos = -1, long yPos = -1, wxObject *clientData = NULL, const wxString& helpString1 = "", const wxString& helpString2 = ""); virtual void AddSeparator(void); virtual void ClearTools(void); - virtual void EnableTool(const int toolIndex, const bool enable); - virtual void ToggleTool(const int toolIndex, const bool toggle); // toggle is TRUE if toggled on - virtual void SetToggle(const int toolIndex, const bool toggle); // Set this to be togglable (or not) - virtual wxObject *GetToolClientData(const int index) const; + virtual void EnableTool(int toolIndex, bool enable); + virtual void ToggleTool(int toolIndex, bool toggle); // toggle is TRUE if toggled on + virtual void SetToggle(int toolIndex, bool toggle); // Set this to be togglable (or not) + virtual wxObject *GetToolClientData(int index) const; inline wxList& GetTools(void) const { return (wxList&) m_tools; } // After the toolbar has initialized, this is the size the tools take up @@ -104,19 +104,19 @@ class WXDLLEXPORT wxToolBarBase : public wxControl #endif virtual wxSize GetMaxSize ( void ) const; - virtual bool GetToolState(const int toolIndex) const; - virtual bool GetToolEnabled(const int toolIndex) const; - virtual wxToolBarTool *FindToolForPosition(const long x, const long y) const; + virtual bool GetToolState(int toolIndex) const; + virtual bool GetToolEnabled(int toolIndex) const; + virtual wxToolBarTool *FindToolForPosition(long x, long y) const; - virtual void SetToolShortHelp(const int toolIndex, const wxString& helpString); - virtual wxString GetToolShortHelp(const int toolIndex) const; - virtual void SetToolLongHelp(const int toolIndex, const wxString& helpString); - virtual wxString GetToolLongHelp(const int toolIndex) const; + virtual void SetToolShortHelp(int toolIndex, const wxString& helpString); + virtual wxString GetToolShortHelp(int toolIndex) const; + virtual void SetToolLongHelp(int toolIndex, const wxString& helpString); + virtual wxString GetToolLongHelp(int toolIndex) const; - virtual void SetMargins(const int x, const int y); + virtual void SetMargins(int x, int y); inline void SetMargins(const wxSize& size) { SetMargins(size.x, size.y); } - virtual void SetToolPacking(const int packing); - virtual void SetToolSeparation(const int separation); + virtual void SetToolPacking(int packing); + virtual void SetToolSeparation(int separation); inline virtual wxSize GetToolMargins(void) { return wxSize(m_xMargin, m_yMargin); } inline virtual int GetToolPacking(void) { return m_toolPacking; } @@ -131,7 +131,7 @@ class WXDLLEXPORT wxToolBarBase : public wxControl // Compatibility #if WXWIN_COMPATIBILITY - inline void SetDefaultSize(const int w, const int h) { SetDefaultSize(wxSize(w, h)); } + inline void SetDefaultSize(int w, int h) { SetDefaultSize(wxSize(w, h)); } inline long GetDefaultWidth(void) const { return m_defaultWidth; } inline long GetDefaultHeight(void) const { return m_defaultHeight; } inline int GetDefaultButtonWidth(void) const { return GetDefaultButtonSize().x; }; @@ -153,14 +153,14 @@ class WXDLLEXPORT wxToolBarBase : public wxControl // Number of pixels per user unit (0 or -1 for no scrollbar) // Length of virtual canvas in user units - virtual void SetScrollbars(const int horizontal, const int vertical, - const int x_length, const int y_length, - const int x_pos = 0, const int y_pos = 0); + virtual void SetScrollbars(int horizontal, int vertical, + int x_length, int y_length, + int x_pos = 0, int y_pos = 0); // Physically scroll the window - virtual void Scroll(const int x_pos, const int y_pos); + virtual void Scroll(int x_pos, int y_pos); virtual void GetScrollPixelsPerUnit(int *x_unit, int *y_unit) const; - virtual void EnableScrolling(const bool x_scrolling, const bool y_scrolling); + virtual void EnableScrolling(bool x_scrolling, bool y_scrolling); virtual void AdjustScrollbars(void); // Prepare the DC by translating it according to the current scroll position @@ -179,8 +179,8 @@ class WXDLLEXPORT wxToolBarBase : public wxControl virtual void DoToolbarUpdates(void); /* - virtual void CalcScrolledPosition(const int x, const int y, int *xx, int *yy) const ; - virtual void CalcUnscrolledPosition(const int x, const int y, long *xx, long *yy) const ; + virtual void CalcScrolledPosition(int x, int y, int *xx, int *yy) const ; + virtual void CalcUnscrolledPosition(int x, int y, long *xx, long *yy) const ; */ void OnScroll(wxScrollEvent& event); @@ -189,7 +189,7 @@ class WXDLLEXPORT wxToolBarBase : public wxControl // Required to force normal cursor-setting behaviour in Windows #ifdef __WINDOWS__ - virtual void MSWOnMouseMove(const int x, const int y, const WXUINT flags); + virtual void MSWOnMouseMove(int x, int y, const WXUINT flags); #endif protected: diff --git a/include/wx/tbarsmpl.h b/include/wx/tbarsmpl.h index d1ebf8aeca..6b8d8941f8 100644 --- a/include/wx/tbarsmpl.h +++ b/include/wx/tbarsmpl.h @@ -45,16 +45,16 @@ class WXDLLEXPORT wxToolBarSimple : public wxToolBarBase Create(parent, -1, wxPoint(x, y), wxSize(w, h), style, orientation, RowsOrColumns, name); } #endif - inline wxToolBarSimple(wxWindow *parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxNO_BORDER, const int orientation = wxVERTICAL, - const int RowsOrColumns = 1, const wxString& name = wxToolBarNameStr) + inline wxToolBarSimple(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, + long style = wxNO_BORDER, int orientation = wxVERTICAL, + int RowsOrColumns = 1, const wxString& name = wxToolBarNameStr) { Create(parent, id, pos, size, style, orientation, RowsOrColumns, name); } ~wxToolBarSimple(void); - bool Create(wxWindow *parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxNO_BORDER, const int orientation = wxVERTICAL, const int RowsOrColumns = 1, const wxString& name = wxToolBarNameStr); + bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, + long style = wxNO_BORDER, int orientation = wxVERTICAL, int RowsOrColumns = 1, const wxString& name = wxToolBarNameStr); void OnPaint(wxPaintEvent& event); void OnSize(wxSizeEvent& event); @@ -64,9 +64,9 @@ class WXDLLEXPORT wxToolBarSimple : public wxToolBarBase // Handle wxToolBar events virtual void DrawTool(wxDC& dc, wxMemoryDC& memDC, wxToolBarTool *tool); - virtual void ToggleTool(const int toolIndex, const bool toggle); // toggle is TRUE if toggled on + virtual void ToggleTool(int toolIndex, bool toggle); // toggle is TRUE if toggled on - virtual void SpringUpButton(const int index); + virtual void SpringUpButton(int index); DECLARE_EVENT_TABLE() }; diff --git a/include/wx/valtext.h b/include/wx/valtext.h index f7ee50eec4..26422a77d8 100644 --- a/include/wx/valtext.h +++ b/include/wx/valtext.h @@ -30,7 +30,7 @@ class WXDLLEXPORT wxTextValidator: public wxValidator { DECLARE_DYNAMIC_CLASS(wxTextValidator) public: - wxTextValidator(const long style = wxFILTER_NONE, wxString *val = NULL); + wxTextValidator(long style = wxFILTER_NONE, wxString *val = NULL); wxTextValidator(const wxTextValidator& val); ~wxTextValidator(); @@ -54,7 +54,7 @@ public: // ACCESSORS inline long GetStyle(void) const { return m_validatorStyle; } - inline void SetStyle(const long style) { m_validatorStyle = style; } + inline void SetStyle(long style) { m_validatorStyle = style; } void SetIncludeList(const wxStringList& list); inline wxStringList& GetIncludeList(void) { return m_includeList; } diff --git a/src/common/date.cpp b/src/common/date.cpp index c0a1495af2..7ac9ec8641 100644 --- a/src/common/date.cpp +++ b/src/common/date.cpp @@ -71,14 +71,14 @@ wxDate::wxDate() julian = 0; } -wxDate::wxDate (const long j) : julian(j) +wxDate::wxDate (long j) : julian(j) { DisplayFormat=wxMDY; DisplayOptions='\0'; julian_to_mdy (); } -wxDate::wxDate (const int m, const int d, const int y) : month(m), day(d), year(y) +wxDate::wxDate (int m, int d, int y) : month(m), day(d), year(y) { DisplayFormat=wxMDY; DisplayOptions='\0'; @@ -164,25 +164,25 @@ wxDate::operator wxString( void ) // Date Arithmetic ////////////////////////////////////////////////////////////// -wxDate wxDate::operator + (const long i) +wxDate wxDate::operator + (long i) { wxDate dp(julian + i); return dp; } -wxDate wxDate::operator + (const int i) +wxDate wxDate::operator + (int i) { wxDate dp(julian + (long)i); return dp; } -wxDate wxDate::operator - (const long i) +wxDate wxDate::operator - (long i) { wxDate dp(julian - i); return dp; } -wxDate wxDate::operator - (const int i) +wxDate wxDate::operator - (int i) { wxDate dp(julian - (long)i); return dp; @@ -193,14 +193,14 @@ long wxDate::operator - (const wxDate &dt) return ( julian - dt.julian ); } -wxDate &wxDate::operator += (const long i) +wxDate &wxDate::operator += (long i) { julian += i; julian_to_mdy(); return *this; } -wxDate &wxDate::operator -= (const long i) +wxDate &wxDate::operator -= (long i) { julian -= i; julian_to_mdy(); @@ -333,7 +333,7 @@ void wxDate::mdy_to_julian (void) // Format routine //////////////////////////////////////////////////////////////// -wxString wxDate::FormatDate (const int type) const +wxString wxDate::FormatDate (int type) const { int actualType = type; if (actualType == -1) @@ -407,12 +407,12 @@ wxString wxDate::FormatDate (const int type) const return wxString(""); } -void wxDate::SetFormat( const int format ) +void wxDate::SetFormat( int format ) { DisplayFormat = format; } -int wxDate::SetOption( const int option, const bool action ) +int wxDate::SetOption( int option, bool action ) { switch ( option ) { @@ -623,7 +623,7 @@ bool wxDate::IsBetween(const wxDate& first, const wxDate& second) const } // This function is from NIHCL -wxDate wxDate::Previous(const int dayOfWeek) const +wxDate wxDate::Previous(int dayOfWeek) const { int this_day_Of_Week, desired_day_Of_Week; long j; diff --git a/src/common/datstrm.cpp b/src/common/datstrm.cpp index c79eedb07a..be174c1b48 100644 --- a/src/common/datstrm.cpp +++ b/src/common/datstrm.cpp @@ -190,8 +190,8 @@ void wxDataStream::WriteString(const wxString& string) if (!m_ostream) return; - Write32(tmp_string.Length()); - m_ostream->write((const char *) tmp_string, tmp_string.Length()); + Write32(string.Length()); + m_ostream->write((const char *) string, string.Length()); } // Must be at global scope for VC++ 5 diff --git a/src/common/docview.cpp b/src/common/docview.cpp index e22c78dd14..81d86a85a2 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -1308,7 +1308,7 @@ BEGIN_EVENT_TABLE(wxDocChildFrame, wxFrame) END_EVENT_TABLE() wxDocChildFrame::wxDocChildFrame(wxDocument *doc, wxView *view, wxFrame *frame, const wxString& title, - const wxPoint& pos, const wxSize& size, const long style, const wxString& name): + const wxPoint& pos, const wxSize& size, long style, const wxString& name): wxFrame(frame, -1, title, pos, size, style, name) { m_childDocument = doc; @@ -1339,18 +1339,6 @@ bool wxDocChildFrame::ProcessEvent(wxEvent& event) return TRUE; } -/* -// Intercept menu commands -void wxDocChildFrame::OldOnMenuCommand(int id) -{ - if (m_childView) - m_childView->Activate(TRUE); - - if (GetParent()) - ((wxFrame *)GetParent())->OldOnMenuCommand(id); -} -*/ - void wxDocChildFrame::OnActivate(wxActivateEvent& event) { wxFrame::OnActivate(event); @@ -1389,7 +1377,7 @@ BEGIN_EVENT_TABLE(wxDocParentFrame, wxFrame) END_EVENT_TABLE() wxDocParentFrame::wxDocParentFrame(wxDocManager *manager, wxFrame *frame, const wxString& title, - const wxPoint& pos, const wxSize& size, const long style, const wxString& name): + const wxPoint& pos, const wxSize& size, long style, const wxString& name): wxFrame(frame, -1, title, pos, size, style, name) { m_docManager = manager; @@ -1417,40 +1405,6 @@ bool wxDocParentFrame::ProcessEvent(wxEvent& event) return TRUE; } -/* -// Intercept menu commands -void wxDocParentFrame::OldOnMenuCommand(int id) -{ - switch (id) - { - case wxID_EXIT: - { - Close(); - break; - } - case wxID_FILE1: - case wxID_FILE2: - case wxID_FILE3: - case wxID_FILE4: - case wxID_FILE5: - case wxID_FILE6: - case wxID_FILE7: - case wxID_FILE8: - case wxID_FILE9: - { - wxString f(m_docManager->GetHistoryFile(id-wxID_FILE1)); - if (f != "") - (void)m_docManager->CreateDocument(f, wxDOC_SILENT); - break; - } - default: - { - m_docManager->OldOnMenuCommand(id); - } - } -} -*/ - // Define the behaviour for the frame closing // - must delete all frames except for the main one. bool wxDocParentFrame::OnClose(void) diff --git a/src/common/event.cpp b/src/common/event.cpp index ca75848e40..35f3a6593a 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -378,8 +378,8 @@ bool wxEvtHandler::SearchEventTable(wxEventTable& table, wxEvent& event) return FALSE; } -void wxEvtHandler::Connect( const int id, const int lastId, - const int eventType, +void wxEvtHandler::Connect( int id, int lastId, + int eventType, wxObjectEventFunction func, wxObject *userData ) { @@ -432,6 +432,7 @@ bool wxEvtHandler::SearchDynamicEventTable( wxEvent& event ) return FALSE; }; +/* #if WXWIN_COMPATIBILITY void wxEvtHandler::OldOnMenuCommand(int cmd) { @@ -510,6 +511,7 @@ void wxEvtHandler::OldOnDropFiles(int n, char *files[], int x, int y) if (GetNextHandler()) GetNextHandler()->OldOnDropFiles(n, files, x, y); } #endif +*/ bool wxEvtHandler::OnClose(void) { diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp index edf16d508e..2624cdbcca 100644 --- a/src/common/gdicmn.cpp +++ b/src/common/gdicmn.cpp @@ -51,7 +51,7 @@ wxRect::wxRect(void) x = 0; y = 0; width = 0; height = 0; } -wxRect::wxRect(const long xx, const long yy, const long w, const long h) +wxRect::wxRect(long xx, long yy, long w, long h) { x = xx; y = yy; width = w; height = h; } @@ -454,7 +454,7 @@ void wxPenList::RemovePen (wxPen * pen) DeleteObject (pen); } -wxPen *wxPenList::FindOrCreatePen (const wxColour& colour, const int width, const int style) +wxPen *wxPenList::FindOrCreatePen (const wxColour& colour, int width, int style) { for (wxNode * node = First (); node; node = node->Next ()) { @@ -477,7 +477,7 @@ wxPen *wxPenList::FindOrCreatePen (const wxColour& colour, const int width, cons return pen; } -wxPen *wxPenList::FindOrCreatePen (const wxString& colour, const int width, const int style) +wxPen *wxPenList::FindOrCreatePen (const wxString& colour, int width, int style) { wxColour *the_colour = wxTheColourDatabase->FindColour (colour); if (the_colour) @@ -503,7 +503,7 @@ void wxBrushList::AddBrush (wxBrush * brush) Append (brush); } -wxBrush *wxBrushList::FindOrCreateBrush (const wxColour& colour, const int style) +wxBrush *wxBrushList::FindOrCreateBrush (const wxColour& colour, int style) { for (wxNode * node = First (); node; node = node->Next ()) { @@ -524,7 +524,7 @@ wxBrush *wxBrushList::FindOrCreateBrush (const wxColour& colour, const int style return brush; } -wxBrush *wxBrushList::FindOrCreateBrush (const wxString& colour, const int style) +wxBrush *wxBrushList::FindOrCreateBrush (const wxString& colour, int style) { wxColour *the_colour = wxTheColourDatabase->FindColour (colour); if (the_colour) @@ -573,7 +573,7 @@ void wxFontList::RemoveFont (wxFont * font) } wxFont *wxFontList:: - FindOrCreateFont (const int PointSize, const int FamilyOrFontId, const int Style, const int Weight, const bool underline, const wxString& Face) + FindOrCreateFont (int PointSize, int FamilyOrFontId, int Style, int Weight, bool underline, const wxString& Face) { for (wxNode * node = First (); node; node = node->Next ()) { diff --git a/src/common/hash.cpp b/src/common/hash.cpp index 1aba64563c..3ba92c80ca 100644 --- a/src/common/hash.cpp +++ b/src/common/hash.cpp @@ -33,7 +33,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxHashTable, wxObject) #endif -wxHashTable::wxHashTable (const int the_key_type, const int size) +wxHashTable::wxHashTable (int the_key_type, int size) { n = size; current_position = -1; @@ -55,7 +55,7 @@ wxHashTable::~wxHashTable (void) delete[] hash_table; } -bool wxHashTable::Create(const int the_key_type, const int size) +bool wxHashTable::Create(int the_key_type, int size) { n = size; current_position = -1; @@ -71,7 +71,7 @@ bool wxHashTable::Create(const int the_key_type, const int size) return TRUE; } -void wxHashTable::Put (const long key, const long value, wxObject * object) +void wxHashTable::Put (long key, long value, wxObject * object) { // Should NEVER be long k = (long) key; @@ -85,7 +85,7 @@ void wxHashTable::Put (const long key, const long value, wxObject * object) hash_table[position]->Append (value, object); } -void wxHashTable::Put (const long key, const char *value, wxObject * object) +void wxHashTable::Put (long key, const char *value, wxObject * object) { // Should NEVER be long k = (long) key; @@ -99,7 +99,7 @@ void wxHashTable::Put (const long key, const char *value, wxObject * object) hash_table[position]->Append (value, object); } -void wxHashTable::Put (const long key, wxObject * object) +void wxHashTable::Put (long key, wxObject * object) { // Should NEVER be long k = (long) key; @@ -123,7 +123,7 @@ void wxHashTable::Put (const char *key, wxObject * object) hash_table[position]->Append (key, object); } -wxObject *wxHashTable::Get (const long key, const long value) const +wxObject *wxHashTable::Get (long key, long value) const { // Should NEVER be long k = (long) key; @@ -143,7 +143,7 @@ wxObject *wxHashTable::Get (const long key, const long value) const } } -wxObject *wxHashTable::Get (const long key, const char *value) const +wxObject *wxHashTable::Get (long key, const char *value) const { // Should NEVER be long k = (long) key; @@ -163,7 +163,7 @@ wxObject *wxHashTable::Get (const long key, const char *value) const } } -wxObject *wxHashTable::Get (const long key) const +wxObject *wxHashTable::Get (long key) const { // Should NEVER be long k = (long) key; @@ -193,7 +193,7 @@ wxObject *wxHashTable::Get (const char *key) const } } -wxObject *wxHashTable::Delete (const long key) +wxObject *wxHashTable::Delete (long key) { // Should NEVER be long k = (long) key; @@ -236,7 +236,7 @@ wxObject *wxHashTable::Delete (const char *key) } } -wxObject *wxHashTable::Delete (const long key, const int value) +wxObject *wxHashTable::Delete (long key, int value) { // Should NEVER be long k = (long) key; @@ -260,7 +260,7 @@ wxObject *wxHashTable::Delete (const long key, const int value) } } -wxObject *wxHashTable::Delete (const long key, const char *value) +wxObject *wxHashTable::Delete (long key, const char *value) { int position = (int) (key % n); if (!hash_table[position]) @@ -328,7 +328,7 @@ wxNode *wxHashTable::Next (void) return found; } -void wxHashTable::DeleteContents (const bool flag) +void wxHashTable::DeleteContents (bool flag) { int i; for (i = 0; i < n; i++) diff --git a/src/common/layout.cpp b/src/common/layout.cpp index abb7f9bb7b..23917159ad 100644 --- a/src/common/layout.cpp +++ b/src/common/layout.cpp @@ -1273,7 +1273,7 @@ void wxSizer::RemoveSizerChild(wxWindow *child) GetChildren()->DeleteObject(child); } -void wxSizer::SetSize(const int x, const int y, const int w, const int h, const int WXUNUSED(flags)) +void wxSizer::SetSize(int x, int y, int w, int h, int WXUNUSED(flags)) { wxLayoutConstraints *constr = GetConstraints(); if (x != -1) @@ -1302,7 +1302,7 @@ void wxSizer::SetSize(const int x, const int y, const int w, const int h, const } } -void wxSizer::Move(const int x, const int y) +void wxSizer::Move(int x, int y) { wxLayoutConstraints *constr = GetConstraints(); if (x != -1) @@ -1517,7 +1517,7 @@ wxRowColSizer::~wxRowColSizer(void) { } -void wxRowColSizer::SetSize(const int x, const int y, const int w, const int h, const int flags) +void wxRowColSizer::SetSize(int x, int y, int w, int h, int flags) { wxSizer::SetSize(x, y, w, h, flags); } diff --git a/src/common/list.cpp b/src/common/list.cpp index ac936bb265..728c8c483d 100644 --- a/src/common/list.cpp +++ b/src/common/list.cpp @@ -132,7 +132,7 @@ wxList::wxList (void) key_type = wxKEY_NONE; } -wxList::wxList (const int N, wxObject * Objects[]) +wxList::wxList (int N, wxObject * Objects[]) { wxNode *last = NULL; @@ -254,7 +254,7 @@ wxNode *wxList::Append(wxObject *object) return node; } -wxNode *wxList::Nth (const int i) const +wxNode *wxList::Nth (int i) const { int j = 0; for (wxNode * current = First (); current; current = current->Next ()) @@ -266,7 +266,7 @@ wxNode *wxList::Nth (const int i) const } -wxNode *wxList::Find (const long key) const +wxNode *wxList::Find (long key) const { wxNode *current = First(); while (current) @@ -370,7 +370,7 @@ wxNode *wxList::Insert (wxNode * position, wxObject * object) } // Keyed append -wxNode *wxList::Append (const long key, wxObject * object) +wxNode *wxList::Append (long key, wxObject * object) { wxNode *node = new wxNode (this, last_node, NULL, object, key); if (!first_node) @@ -582,7 +582,7 @@ void wxStringList::Delete (const char *s) } // Only makes new strings if arg is TRUE -char **wxStringList::ListToArray (const bool new_copies) const +char **wxStringList::ListToArray (bool new_copies) const { char **string_array = new char *[Number ()]; wxNode *node = First (); diff --git a/src/common/postscrp.cpp b/src/common/postscrp.cpp index d36e6fa015..84f5daeaf5 100644 --- a/src/common/postscrp.cpp +++ b/src/common/postscrp.cpp @@ -2037,7 +2037,7 @@ void wxPostScriptDC::CalcBoundingBox(long x, long y) IMPLEMENT_CLASS(wxPostScriptPrintDialog, wxDialog) wxPostScriptPrintDialog::wxPostScriptPrintDialog (wxWindow *parent, const wxString& title, - const wxPoint& pos, const wxSize& size, const long style): + const wxPoint& pos, const wxSize& size, long style): wxDialog(parent, -1, title, pos, size, style) { wxBeginBusyCursor(); diff --git a/src/common/resource.cpp b/src/common/resource.cpp index 8d50e743ea..181854d597 100644 --- a/src/common/resource.cpp +++ b/src/common/resource.cpp @@ -561,7 +561,7 @@ wxControl *wxResourceTable::CreateItem(wxWindow *parent, wxItemResource *childRe node = node->Next(); } } - control = new wxRadioBox(parent, (const wxWindowID) id, wxString(childResource->GetTitle()), + control = new wxRadioBox(parent, (wxWindowID) id, wxString(childResource->GetTitle()), wxPoint(childResource->GetX(), childResource->GetY()), wxSize(childResource->GetWidth(), childResource->GetHeight()), noStrings, strings, (int)childResource->GetValue1(), childResource->GetStyle(), wxDefaultValidator, diff --git a/src/common/tbarbase.cpp b/src/common/tbarbase.cpp index 724fab1429..60de3c71a3 100644 --- a/src/common/tbarbase.cpp +++ b/src/common/tbarbase.cpp @@ -48,9 +48,9 @@ END_EVENT_TABLE() // is still valid: a tool may have quit the toolbar. static wxList gs_ToolBars; -wxToolBarTool::wxToolBarTool(const int theIndex, - const wxBitmap& theBitmap1, const wxBitmap& theBitmap2, const bool toggle, - const long xPos, const long yPos, const wxString& helpS1, const wxString& helpS2) +wxToolBarTool::wxToolBarTool(int theIndex, + const wxBitmap& theBitmap1, const wxBitmap& theBitmap2, bool toggle, + long xPos, long yPos, const wxString& helpS1, const wxString& helpS2) { m_toolStyle = wxTOOL_STYLE_BUTTON; m_clientData = NULL; @@ -158,8 +158,8 @@ void wxToolBarBase::OnMouseEnter ( int toolIndex ) // If pushedBitmap is NULL, a reversed version of bitmap is // created and used as the pushed/toggled image. // If toggle is TRUE, the button toggles between the two states. -wxToolBarTool *wxToolBarBase::AddTool(const int index, const wxBitmap& bitmap, const wxBitmap& pushedBitmap, - const bool toggle, const long xPos, const long yPos, wxObject *clientData, +wxToolBarTool *wxToolBarBase::AddTool(int index, const wxBitmap& bitmap, const wxBitmap& pushedBitmap, + bool toggle, long xPos, long yPos, wxObject *clientData, const wxString& helpString1, const wxString& helpString2) { wxToolBarTool *tool = new wxToolBarTool(index, bitmap, pushedBitmap, toggle, xPos, yPos, helpString1, helpString2); @@ -207,7 +207,7 @@ void wxToolBarBase::ClearTools(void) } } -void wxToolBarBase::EnableTool(const int index, const bool enable) +void wxToolBarBase::EnableTool(int index, bool enable) { wxNode *node = m_tools.Find((long)index); if (node) @@ -218,11 +218,11 @@ void wxToolBarBase::EnableTool(const int index, const bool enable) } } -void wxToolBarBase::ToggleTool(const int index, const bool toggle) +void wxToolBarBase::ToggleTool(int index, bool toggle) { } -void wxToolBarBase::SetToggle(const int index, const bool value) +void wxToolBarBase::SetToggle(int index, bool value) { wxNode *node=m_tools.Find((long)index); if (node){ @@ -231,7 +231,7 @@ void wxToolBarBase::SetToggle(const int index, const bool value) } } -bool wxToolBarBase::GetToolState(const int index) const +bool wxToolBarBase::GetToolState(int index) const { wxNode *node = m_tools.Find((long)index); if (node) @@ -246,7 +246,7 @@ bool wxToolBarBase::GetToolState(const int index) const else return FALSE; } -bool wxToolBarBase::GetToolEnabled(const int index) const +bool wxToolBarBase::GetToolEnabled(int index) const { wxNode *node = m_tools.Find((long)index); if (node) @@ -261,7 +261,7 @@ bool wxToolBarBase::GetToolEnabled(const int index) const else return FALSE; } -wxObject *wxToolBarBase::GetToolClientData(const int index) const +wxObject *wxToolBarBase::GetToolClientData(int index) const { wxNode *node = m_tools.Find((long)index); if (node) @@ -276,7 +276,7 @@ wxObject *wxToolBarBase::GetToolClientData(const int index) const else return NULL; } -void wxToolBarBase::SetToolShortHelp(const int index, const wxString& helpString) +void wxToolBarBase::SetToolShortHelp(int index, const wxString& helpString) { wxNode *node=m_tools.Find((long)index); if (node) @@ -286,7 +286,7 @@ void wxToolBarBase::SetToolShortHelp(const int index, const wxString& helpString } } -wxString wxToolBarBase::GetToolShortHelp(const int index) const +wxString wxToolBarBase::GetToolShortHelp(int index) const { wxNode *node=m_tools.Find((long)index); if (node) @@ -298,7 +298,7 @@ wxString wxToolBarBase::GetToolShortHelp(const int index) const return wxString(""); } -void wxToolBarBase::SetToolLongHelp(const int index, const wxString& helpString) +void wxToolBarBase::SetToolLongHelp(int index, const wxString& helpString) { wxNode *node=m_tools.Find((long)index); if (node) @@ -308,7 +308,7 @@ void wxToolBarBase::SetToolLongHelp(const int index, const wxString& helpString) } } -wxString wxToolBarBase::GetToolLongHelp(const int index) const +wxString wxToolBarBase::GetToolLongHelp(int index) const { wxNode *node=m_tools.Find((long)index); if (node) @@ -320,7 +320,7 @@ wxString wxToolBarBase::GetToolLongHelp(const int index) const return wxString(""); } -wxToolBarTool *wxToolBarBase::FindToolForPosition(const long x, const long y) const +wxToolBarTool *wxToolBarBase::FindToolForPosition(long x, long y) const { wxNode *node = m_tools.First(); while (node) @@ -345,18 +345,18 @@ wxSize wxToolBarBase::GetMaxSize ( void ) const // the tool we're leaving was a 'sprung push button' and if so, // spring it back to the up state. // -void wxToolBarBase::SetMargins(const int x, const int y) +void wxToolBarBase::SetMargins(int x, int y) { m_xMargin = x; m_yMargin = y; } -void wxToolBarBase::SetToolPacking(const int packing) +void wxToolBarBase::SetToolPacking(int packing) { m_toolPacking = packing; } -void wxToolBarBase::SetToolSeparation(const int separation) +void wxToolBarBase::SetToolSeparation(int separation) { m_toolSeparation = separation; } @@ -464,9 +464,9 @@ void wxToolBarBase::Layout(void) * pixelsPerUnitX/pixelsPerUnitY: number of pixels per unit (e.g. pixels per text line) * noUnitsX/noUnitsY: : no. units per scrollbar */ -void wxToolBarBase::SetScrollbars (const int pixelsPerUnitX, const int pixelsPerUnitY, - const int noUnitsX, const int noUnitsY, - const int xPos, const int yPos) +void wxToolBarBase::SetScrollbars (int pixelsPerUnitX, int pixelsPerUnitY, + int noUnitsX, int noUnitsY, + int xPos, int yPos) { m_xScrollPixelsPerLine = pixelsPerUnitX; m_yScrollPixelsPerLine = pixelsPerUnitY; @@ -737,7 +737,7 @@ void wxToolBarBase::SetScrollPageSize(int orient, int pageSize) /* * Scroll to given position (scroll position, not pixel position) */ -void wxToolBarBase::Scroll (const int x_pos, const int y_pos) +void wxToolBarBase::Scroll (int x_pos, int y_pos) { int old_x, old_y; ViewStart (&old_x, &old_y); @@ -760,7 +760,7 @@ void wxToolBarBase::Scroll (const int x_pos, const int y_pos) #endif } -void wxToolBarBase::EnableScrolling (const bool x_scroll, const bool y_scroll) +void wxToolBarBase::EnableScrolling (bool x_scroll, bool y_scroll) { m_xScrollingEnabled = x_scroll; m_yScrollingEnabled = y_scroll; @@ -780,13 +780,13 @@ void wxToolBarBase::ViewStart (int *x, int *y) const } /* -void wxToolBarBase::CalcScrolledPosition(const int x, const int y, int *xx, int *yy) const +void wxToolBarBase::CalcScrolledPosition(int x, int y, int *xx, int *yy) const { *xx = (m_calcScrolledOffset ? (x - m_xScrollPosition * m_xScrollPixelsPerLine) : x); *yy = (m_calcScrolledOffset ? (y - m_yScrollPosition * m_yScrollPixelsPerLine) : y); } -void wxToolBarBase::CalcUnscrolledPosition(const int x, const int y, float *xx, float *yy) const +void wxToolBarBase::CalcUnscrolledPosition(int x, int y, float *xx, float *yy) const { *xx = (float)(m_calcScrolledOffset ? (x + m_xScrollPosition * m_xScrollPixelsPerLine) : x); *yy = (float)(m_calcScrolledOffset ? (y + m_yScrollPosition * m_yScrollPixelsPerLine) : y); @@ -829,7 +829,7 @@ void wxToolBarBase::DoToolbarUpdates(void) #ifdef __WINDOWS__ // Circumvent wxControl::MSWOnMouseMove which doesn't set the cursor. -void wxToolBarBase::MSWOnMouseMove(const int x, const int y, const WXUINT flags) +void wxToolBarBase::MSWOnMouseMove(int x, int y, const WXUINT flags) { wxWindow::MSWOnMouseMove(x, y, flags); } diff --git a/src/common/tbarsmpl.cpp b/src/common/tbarsmpl.cpp index 52c9acf8b1..229cb6fe23 100644 --- a/src/common/tbarsmpl.cpp +++ b/src/common/tbarsmpl.cpp @@ -49,8 +49,8 @@ wxToolBarSimple::wxToolBarSimple(void) { } -bool wxToolBarSimple::Create(wxWindow *parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, const long style, - const int direction, const int RowsOrColumns, const wxString& name ) +bool wxToolBarSimple::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, + int direction, int RowsOrColumns, const wxString& name ) { if ( ! wxWindow::Create(parent, id, pos, size, style, name) ) return FALSE; @@ -311,7 +311,7 @@ void wxToolBarSimple::DrawTool(wxDC& dc, wxMemoryDC& memDC, wxToolBarTool *tool) } } -void wxToolBarSimple::ToggleTool(const int index, const bool toggle) +void wxToolBarSimple::ToggleTool(int index, bool toggle) { wxNode *node = m_tools.Find((long)index); if (node) @@ -336,7 +336,7 @@ void wxToolBarSimple::ToggleTool(const int index, const bool toggle) // the tool we're leaving was a 'sprung push button' and if so, // spring it back to the up state. // -void wxToolBarSimple::SpringUpButton(const int index) +void wxToolBarSimple::SpringUpButton(int index) { wxNode *node=m_tools.Find((long)index); if (node) { diff --git a/src/common/valtext.cpp b/src/common/valtext.cpp index 6346404d47..117efff315 100644 --- a/src/common/valtext.cpp +++ b/src/common/valtext.cpp @@ -41,7 +41,7 @@ BEGIN_EVENT_TABLE(wxTextValidator, wxValidator) END_EVENT_TABLE() #endif -wxTextValidator::wxTextValidator(const long style, wxString *val) +wxTextValidator::wxTextValidator(long style, wxString *val) { m_validatorStyle = style ; m_stringValue = val ; diff --git a/src/generic/choicdgg.cpp b/src/generic/choicdgg.cpp index 2f1c8a242f..ee1280ca39 100644 --- a/src/generic/choicdgg.cpp +++ b/src/generic/choicdgg.cpp @@ -35,10 +35,10 @@ extern void wxSplitMessage2(const char *message, wxList *messageList, wxWindow *parent, wxRowColSizer *sizer); -wxString wxGetSingleChoice( const wxString& message, const wxString& caption, const int n, - const wxString *choices, wxWindow *parent, - const int WXUNUSED(x), const int WXUNUSED(y), const bool WXUNUSED(centre), - const int WXUNUSED(width), const int WXUNUSED(height) ) +wxString wxGetSingleChoice( const wxString& message, const wxString& caption, int n, + const wxString *choices, wxWindow *parent, + int WXUNUSED(x), int WXUNUSED(y), bool WXUNUSED(centre), + int WXUNUSED(width), int WXUNUSED(height) ) { wxSingleChoiceDialog dialog(parent, message, caption, n, choices); if ( dialog.ShowModal() == wxID_OK ) @@ -50,10 +50,10 @@ wxString wxGetSingleChoice( const wxString& message, const wxString& caption, co } // Overloaded for backward compatibility -wxString wxGetSingleChoice( const wxString& message, const wxString& caption, const int n, - char *choices[], wxWindow *parent, - const int x, const int y, const bool centre, - const int width, const int height ) +wxString wxGetSingleChoice( const wxString& message, const wxString& caption, int n, + char *choices[], wxWindow *parent, + int x, int y, bool centre, + int width, int height ) { wxString *strings = new wxString[n]; int i; @@ -67,10 +67,10 @@ wxString wxGetSingleChoice( const wxString& message, const wxString& caption, co return ans; } -int wxGetSingleChoiceIndex( const wxString& message, const wxString& caption, const int n, - const wxString *choices, wxWindow *parent, - const int WXUNUSED(x), const int WXUNUSED(y), const bool WXUNUSED(centre), - const int WXUNUSED(width), const int WXUNUSED(height) ) +int wxGetSingleChoiceIndex( const wxString& message, const wxString& caption, int n, + const wxString *choices, wxWindow *parent, + int WXUNUSED(x), int WXUNUSED(y), bool WXUNUSED(centre), + int WXUNUSED(width), int WXUNUSED(height) ) { wxSingleChoiceDialog dialog(parent, message, caption, n, choices); if ( dialog.ShowModal() == wxID_OK ) @@ -82,10 +82,10 @@ int wxGetSingleChoiceIndex( const wxString& message, const wxString& caption, co } // Overloaded for backward compatibility -int wxGetSingleChoiceIndex( const wxString& message, const wxString& caption, const int n, - char *choices[], wxWindow *parent, - const int x, const int y, const bool centre, - const int width, const int height ) +int wxGetSingleChoiceIndex( const wxString& message, const wxString& caption, int n, + char *choices[], wxWindow *parent, + int x, int y, bool centre, + int width, int height ) { wxString *strings = new wxString[n]; int i; @@ -99,10 +99,10 @@ int wxGetSingleChoiceIndex( const wxString& message, const wxString& caption, co return ans; } -char *wxGetSingleChoiceData( const wxString& message, const wxString& caption, const int n, - const wxString *choices, char **client_data, wxWindow *parent, - const int WXUNUSED(x), const int WXUNUSED(y), const bool WXUNUSED(centre), - const int WXUNUSED(width), const int WXUNUSED(height) ) +char *wxGetSingleChoiceData( const wxString& message, const wxString& caption, int n, + const wxString *choices, char **client_data, wxWindow *parent, + int WXUNUSED(x), int WXUNUSED(y), bool WXUNUSED(centre), + int WXUNUSED(width), int WXUNUSED(height) ) { wxSingleChoiceDialog dialog(parent, message, caption, n, choices, client_data); if ( dialog.ShowModal() == wxID_OK ) @@ -114,10 +114,10 @@ char *wxGetSingleChoiceData( const wxString& message, const wxString& caption, c } // Overloaded for backward compatibility -char *wxGetSingleChoiceData( const wxString& message, const wxString& caption, const int n, - char *choices[], char **client_data, wxWindow *parent, - const int x, const int y, const bool centre, - const int width, const int height ) +char *wxGetSingleChoiceData( const wxString& message, const wxString& caption, int n, + char *choices[], char **client_data, wxWindow *parent, + int x, int y, bool centre, + int width, int height ) { wxString *strings = new wxString[n]; int i; @@ -150,10 +150,10 @@ selected. */ /* int wxGetMultipleChoice(const wxString& message, const wxString& caption, - const int n, const wxString *choices, - const int nsel, int * selection, - wxWindow *parent , const int x , const int y, const bool centre, - const int width, const int height) + int n, const wxString *choices, + int nsel, int * selection, + wxWindow *parent , int x , int y, bool centre, + int width, int height) { return -1; } @@ -164,13 +164,14 @@ int wxGetMultipleChoice(const wxString& message, const wxString& caption, #if !USE_SHARED_LIBRARY BEGIN_EVENT_TABLE(wxSingleChoiceDialog, wxDialog) EVT_BUTTON(wxID_OK, wxSingleChoiceDialog::OnOK) + EVT_LISTBOX_DCLICK(wxID_LISTBOX, wxSingleChoiceDialog::OnListBoxDClick) END_EVENT_TABLE() IMPLEMENT_CLASS(wxSingleChoiceDialog, wxDialog) #endif wxSingleChoiceDialog::wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption, - const int n, const wxString *choices, char **clientData, long style, const wxPoint& pos): + int n, const wxString *choices, char **clientData, long style, const wxPoint& pos): wxDialog(parent, -1, caption, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL) { Create(parent, message, caption, n, choices, clientData, style); @@ -198,8 +199,8 @@ bool wxSingleChoiceDialog::Create(wxWindow *parent, const wxString& message, con } bool wxSingleChoiceDialog::Create( wxWindow *WXUNUSED(parent), const wxString& message, - const wxString& WXUNUSED(caption), const int n, - const wxString *choices, char **clientData, long style, + const wxString& WXUNUSED(caption), int n, + const wxString *choices, char **clientData, long style, const wxPoint& WXUNUSED(pos) ) { m_dialogStyle = style; @@ -312,4 +313,17 @@ void wxSingleChoiceDialog::OnOK(wxCommandEvent& WXUNUSED(event)) EndModal(wxID_OK); } +void wxSingleChoiceDialog::OnListBoxDClick(wxCommandEvent& WXUNUSED(event)) +{ + wxListBox *listBox = (wxListBox *)FindWindow(wxID_LISTBOX); + if ( listBox ) + { + m_selection = listBox->GetSelection(); + m_stringSelection = listBox->GetStringSelection(); + m_clientData = listBox->GetClientData(m_selection); + } + + EndModal(wxID_OK); +} + diff --git a/src/generic/imaglist.cpp b/src/generic/imaglist.cpp index dffb5f530d..103d86d9e5 100644 --- a/src/generic/imaglist.cpp +++ b/src/generic/imaglist.cpp @@ -99,7 +99,7 @@ bool wxImageList::GetSize( int index, int &width, int &height ) const bool wxImageList::Draw( int index, wxDC &dc, int x, int y, - int WXUNUSED(flags), const bool WXUNUSED(solidBackground) ) + int WXUNUSED(flags), bool WXUNUSED(solidBackground) ) { wxNode *node = m_images.Nth( index ); if (!node) return FALSE; diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 123617a9f0..6a8bfd0d22 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -56,23 +56,23 @@ void wxListItemData::SetText( const wxString &s ) m_text = s; }; -void wxListItemData::SetImage( const int image ) +void wxListItemData::SetImage( int image ) { m_image = image; }; -void wxListItemData::SetData( const long data ) +void wxListItemData::SetData( long data ) { m_data = data; }; -void wxListItemData::SetPosition( const int x, const int y ) +void wxListItemData::SetPosition( int x, int y ) { m_xpos = x; m_ypos = y; }; -void wxListItemData::SetSize( int const width, const int height ) +void wxListItemData::SetSize( int const width, int height ) { m_width = width; m_height = height; @@ -93,7 +93,7 @@ bool wxListItemData::HasText(void) const return (!m_text.IsNull()); }; -bool wxListItemData::IsHit( const int x, const int y ) const +bool wxListItemData::IsHit( int x, int y ) const { return ((x >= m_xpos) && (x <= m_xpos+m_width) && (y >= m_ypos) && (y <= m_ypos+m_height)); }; @@ -176,25 +176,25 @@ void wxListHeaderData::SetItem( const wxListItem &item ) if (m_width < 6) m_width = 6; }; -void wxListHeaderData::SetPosition( const int x, const int y ) +void wxListHeaderData::SetPosition( int x, int y ) { m_xpos = x; m_ypos = y; }; -void wxListHeaderData::SetHeight( const int h ) +void wxListHeaderData::SetHeight( int h ) { m_height = h; }; -void wxListHeaderData::SetWidth( const int w ) +void wxListHeaderData::SetWidth( int w ) { m_width = w; if (m_width < 0) m_width = 80; if (m_width < 6) m_width = 6; }; -void wxListHeaderData::SetFormat( const int format ) +void wxListHeaderData::SetFormat( int format ) { m_format = format; }; @@ -249,7 +249,7 @@ int wxListHeaderData::GetFormat(void) const IMPLEMENT_DYNAMIC_CLASS(wxListLineData,wxObject); -wxListLineData::wxListLineData( wxListMainWindow *owner, const int mode, wxBrush *hilightBrush ) +wxListLineData::wxListLineData( wxListMainWindow *owner, int mode, wxBrush *hilightBrush ) { m_mode = mode; m_hilighted = FALSE; @@ -259,7 +259,7 @@ wxListLineData::wxListLineData( wxListMainWindow *owner, const int mode, wxBrush m_spacing = 0; }; -void wxListLineData::CalculateSize( wxPaintDC *dc, const int spacing ) +void wxListLineData::CalculateSize( wxPaintDC *dc, int spacing ) { m_spacing = spacing; switch (m_mode) @@ -318,7 +318,7 @@ void wxListLineData::CalculateSize( wxPaintDC *dc, const int spacing ) }; }; -void wxListLineData::SetPosition( wxPaintDC *dc, const int x, const int y, const int window_width ) +void wxListLineData::SetPosition( wxPaintDC *dc, int x, int y, int window_width ) { m_bound_all.x = x; m_bound_all.y = y; @@ -393,7 +393,7 @@ void wxListLineData::SetPosition( wxPaintDC *dc, const int x, const int y, const }; }; -void wxListLineData::SetColumnPosition( const int index, const int x ) +void wxListLineData::SetColumnPosition( int index, int x ) { int i = index; wxNode *node = m_items.Nth( i ); @@ -431,7 +431,7 @@ void wxListLineData::GetRect( wxRectangle &rect ) AssignRect( rect, m_bound_all ); }; -long wxListLineData::IsHit( const int x, const int y ) +long wxListLineData::IsHit( int x, int y ) { wxNode *node = m_items.First(); if (node) @@ -446,12 +446,12 @@ long wxListLineData::IsHit( const int x, const int y ) return 0; }; -void wxListLineData::InitItems( const int num ) +void wxListLineData::InitItems( int num ) { for (int i = 0; i < num; i++) m_items.Append( new wxListItemData() ); }; -void wxListLineData::SetItem( const int index, const wxListItem &info ) +void wxListLineData::SetItem( int index, const wxListItem &info ) { wxNode *node = m_items.Nth( index ); if (node) @@ -472,7 +472,7 @@ void wxListLineData::GetItem( int const index, wxListItem &info ) }; }; -void wxListLineData::GetText( const int index, wxString &s ) +void wxListLineData::GetText( int index, wxString &s ) { int i = index; wxNode *node = m_items.Nth( i ); @@ -484,7 +484,7 @@ void wxListLineData::GetText( const int index, wxString &s ) }; }; -void wxListLineData::SetText( const int index, const wxString s ) +void wxListLineData::SetText( int index, const wxString s ) { int i = index; wxNode *node = m_items.Nth( i ); @@ -495,7 +495,7 @@ void wxListLineData::SetText( const int index, const wxString s ) }; }; -int wxListLineData::GetImage( const int index ) +int wxListLineData::GetImage( int index ) { int i = index; wxNode *node = m_items.Nth( i ); @@ -507,7 +507,7 @@ int wxListLineData::GetImage( const int index ) return -1; }; -void wxListLineData::DoDraw( wxPaintDC *dc, const bool hilight, const bool paintBG ) +void wxListLineData::DoDraw( wxPaintDC *dc, bool hilight, bool paintBG ) { long dev_x = dc->LogicalToDeviceX( m_bound_all.x-2 ); long dev_y = dc->LogicalToDeviceY( m_bound_all.y-2 ); @@ -572,7 +572,7 @@ void wxListLineData::DoDraw( wxPaintDC *dc, const bool hilight, const bool paint }; }; -void wxListLineData::Hilight( const bool on ) +void wxListLineData::Hilight( bool on ) { if (on == m_hilighted) return; if (on) @@ -591,7 +591,7 @@ void wxListLineData::ReverseHilight( void ) m_owner->DeselectLine( this ); }; -void wxListLineData::DrawRubberBand( wxPaintDC *dc, const bool on ) +void wxListLineData::DrawRubberBand( wxPaintDC *dc, bool on ) { if (on) { @@ -607,7 +607,7 @@ void wxListLineData::Draw( wxPaintDC *dc ) DoDraw( dc, m_hilighted, m_hilighted ); }; -bool wxListLineData::IsInRect( const int x, const int y, const wxRectangle &rect ) +bool wxListLineData::IsInRect( int x, int y, const wxRectangle &rect ) { return ((x >= rect.x) && (x <= rect.x+rect.width) && (y >= rect.y) && (y <= rect.y+rect.height)); }; @@ -617,7 +617,7 @@ bool wxListLineData::IsHilighted( void ) return m_hilighted; }; -void wxListLineData::AssignRect( wxRectangle &dest, const int x, const int y, const int width, const int height ) +void wxListLineData::AssignRect( wxRectangle &dest, int x, int y, int width, int height ) { dest.x = x; dest.y = y; @@ -652,9 +652,9 @@ wxListHeaderWindow::wxListHeaderWindow( void ) m_resizeCursor = NULL; }; -wxListHeaderWindow::wxListHeaderWindow( wxWindow *win, const wxWindowID id, wxListMainWindow *owner, - const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) : +wxListHeaderWindow::wxListHeaderWindow( wxWindow *win, wxWindowID id, wxListMainWindow *owner, + const wxPoint &pos, const wxSize &size, + long style, const wxString &name ) : wxWindow( win, id, pos, size, style, name ) { m_owner = owner; @@ -809,10 +809,10 @@ wxListMainWindow::wxListMainWindow( void ) m_isDragging = FALSE; }; -wxListMainWindow::wxListMainWindow( wxWindow *parent, const wxWindowID id, +wxListMainWindow::wxListMainWindow( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) : - wxScrolledWindow( parent, id, pos, size, style, name ) + long style, const wxString &name ) : + wxScrolledWindow( parent, id, pos, size, style, name ) { m_mode = style; m_lines.DeleteContents( TRUE ); @@ -913,7 +913,7 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) dc.EndDrawing(); }; -void wxListMainWindow::HilightAll( const bool on ) +void wxListMainWindow::HilightAll( bool on ) { wxNode *node = m_lines.First(); while (node) @@ -1361,14 +1361,14 @@ int wxListMainWindow::GetIndexOfLine( const wxListLineData *line ) return -1; }; -void wxListMainWindow::SetImageList( wxImageList *imageList, const int which ) +void wxListMainWindow::SetImageList( wxImageList *imageList, int which ) { m_dirty = TRUE; if (which == wxIMAGE_LIST_NORMAL) m_normal_image_list = imageList; if (which == wxIMAGE_LIST_SMALL) m_small_image_list = imageList; }; -void wxListMainWindow::SetItemSpacing( const int spacing, const bool isSmall ) +void wxListMainWindow::SetItemSpacing( int spacing, bool isSmall ) { m_dirty = TRUE; if (isSmall) @@ -1381,12 +1381,12 @@ void wxListMainWindow::SetItemSpacing( const int spacing, const bool isSmall ) }; }; -int wxListMainWindow::GetItemSpacing( const bool isSmall ) +int wxListMainWindow::GetItemSpacing( bool isSmall ) { if (isSmall) return m_small_spacing; else return m_normal_spacing; }; -void wxListMainWindow::SetColumn( const int col, wxListItem &item ) +void wxListMainWindow::SetColumn( int col, wxListItem &item ) { m_dirty = TRUE; wxNode *node = m_columns.Nth( col ); @@ -1398,7 +1398,7 @@ void wxListMainWindow::SetColumn( const int col, wxListItem &item ) }; }; -void wxListMainWindow::SetColumnWidth( const int col, const int width ) +void wxListMainWindow::SetColumnWidth( int col, int width ) { m_dirty = TRUE; wxNode *node = m_columns.Nth( col ); @@ -1409,7 +1409,7 @@ void wxListMainWindow::SetColumnWidth( const int col, const int width ) }; }; -void wxListMainWindow::GetColumn( const int col, wxListItem &item ) +void wxListMainWindow::GetColumn( int col, wxListItem &item ) { wxNode *node = m_columns.Nth( col ); if (node) @@ -1427,7 +1427,7 @@ void wxListMainWindow::GetColumn( const int col, wxListItem &item ) }; }; -int wxListMainWindow::GetColumnWidth( const int col ) +int wxListMainWindow::GetColumnWidth( int col ) { wxNode *node = m_columns.Nth( col ); if (node) @@ -1461,7 +1461,7 @@ void wxListMainWindow::SetItem( wxListItem &item ) }; }; -void wxListMainWindow::SetItemState( const long item, const long state, const long stateMask ) +void wxListMainWindow::SetItemState( long item, long state, long stateMask ) { // m_dirty = TRUE; no recalcs needed wxListLineData *oldCurrent = m_current; @@ -1492,7 +1492,7 @@ void wxListMainWindow::SetItemState( const long item, const long state, const lo }; }; -int wxListMainWindow::GetItemState( const long item, const long stateMask ) +int wxListMainWindow::GetItemState( long item, long stateMask ) { int ret = wxLIST_STATE_DONTCARE; if (stateMask & wxLIST_STATE_FOCUSED) @@ -1538,7 +1538,7 @@ int wxListMainWindow::GetItemCount( void ) return m_lines.Number(); }; -void wxListMainWindow::GetItemRect( const long index, wxRectangle &rect ) +void wxListMainWindow::GetItemRect( long index, wxRectangle &rect ) { wxNode *node = m_lines.Nth( index ); if (node) @@ -1568,7 +1568,7 @@ int wxListMainWindow::GetSelectedItemCount( void ) return 0; }; -void wxListMainWindow::SetMode( const long mode ) +void wxListMainWindow::SetMode( long mode ) { m_dirty = TRUE; m_mode = mode; @@ -1708,7 +1708,7 @@ void wxListMainWindow::RealizeChanges( void ) }; }; -long wxListMainWindow::GetNextItem( const long item, int WXUNUSED(geometry), int state ) +long wxListMainWindow::GetNextItem( long item, int WXUNUSED(geometry), int state ) { long ret = 0; if (item > 0) ret = item; @@ -1725,7 +1725,7 @@ long wxListMainWindow::GetNextItem( const long item, int WXUNUSED(geometry), int return -1; }; -void wxListMainWindow::DeleteItem( const long index ) +void wxListMainWindow::DeleteItem( long index ) { m_dirty = TRUE; wxNode *node = m_lines.Nth( index ); @@ -1737,7 +1737,7 @@ void wxListMainWindow::DeleteItem( const long index ) }; }; -void wxListMainWindow::DeleteColumn( const int col ) +void wxListMainWindow::DeleteColumn( int col ) { m_dirty = TRUE; wxNode *node = m_columns.Nth( col ); @@ -1773,7 +1773,7 @@ void wxListMainWindow::DeleteEverything( void ) m_columns.Clear(); }; -void wxListMainWindow::EnsureVisible( const long index ) +void wxListMainWindow::EnsureVisible( long index ) { wxListLineData *oldCurrent = m_current; m_current = NULL; @@ -1784,7 +1784,7 @@ void wxListMainWindow::EnsureVisible( const long index ) m_current = oldCurrent; }; -long wxListMainWindow::FindItem(const long start, const wxString& str, const bool WXUNUSED(partial) ) +long wxListMainWindow::FindItem(long start, const wxString& str, bool WXUNUSED(partial) ) { long pos = start; wxString tmp = str; @@ -1802,7 +1802,7 @@ long wxListMainWindow::FindItem(const long start, const wxString& str, const boo return -1; }; -long wxListMainWindow::FindItem(const long start, const long data) +long wxListMainWindow::FindItem(long start, long data) { long pos = start; if (pos < 0) pos = 0; @@ -1819,7 +1819,7 @@ long wxListMainWindow::FindItem(const long start, const long data) return -1; }; -long wxListMainWindow::HitTest( const int x, const int y, int &flags ) +long wxListMainWindow::HitTest( int x, int y, int &flags ) { wxNode *node = m_lines.First(); int count = 0; @@ -1862,7 +1862,7 @@ void wxListMainWindow::InsertItem( wxListItem &item ) m_lines.Append( line ); }; -void wxListMainWindow::InsertColumn( const long col, wxListItem &item ) +void wxListMainWindow::InsertColumn( long col, wxListItem &item ) { m_dirty = TRUE; if (m_mode & wxLC_REPORT) @@ -1958,9 +1958,9 @@ wxListCtrl::wxListCtrl(void) m_imageListState = NULL; } -wxListCtrl::wxListCtrl( wxWindow *parent, const wxWindowID id, - const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) +wxListCtrl::wxListCtrl( wxWindow *parent, wxWindowID id, + const wxPoint &pos, const wxSize &size, + long style, const wxString &name ) { Create( parent, id, pos, size, style, name ); @@ -1970,9 +1970,9 @@ wxListCtrl::~wxListCtrl(void) { } -bool wxListCtrl::Create( wxWindow *parent, const wxWindowID id, - const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) +bool wxListCtrl::Create( wxWindow *parent, wxWindowID id, + const wxPoint &pos, const wxSize &size, + long style, const wxString &name ) { m_imageListNormal = NULL; m_imageListSmall = NULL; @@ -2004,7 +2004,7 @@ void wxListCtrl::OnSize( wxSizeEvent &WXUNUSED(event) ) if (m_mainWin) m_mainWin->m_dirty = TRUE; }; -void wxListCtrl::SetSingleStyle( const long style, const bool add ) +void wxListCtrl::SetSingleStyle( long style, bool add ) { long flag = GetWindowStyleFlag(); @@ -2027,7 +2027,7 @@ void wxListCtrl::SetSingleStyle( const long style, const bool add ) SetWindowStyleFlag( flag ); }; -void wxListCtrl::SetWindowStyleFlag( const long flag ) +void wxListCtrl::SetWindowStyleFlag( long flag ) { m_mainWin->DeleteEverything(); @@ -2072,24 +2072,24 @@ void wxListCtrl::SetBackgroundColour(const wxColour& col) wxWindow::SetBackgroundColour( (wxColour&)col ); }; -bool wxListCtrl::GetColumn(const int col, wxListItem &item) +bool wxListCtrl::GetColumn(int col, wxListItem &item) { m_mainWin->GetColumn( col, item ); return TRUE; }; -bool wxListCtrl::SetColumn( const int col, wxListItem& item ) +bool wxListCtrl::SetColumn( int col, wxListItem& item ) { m_mainWin->SetColumn( col, item ); return TRUE; }; -int wxListCtrl::GetColumnWidth( const int col ) +int wxListCtrl::GetColumnWidth( int col ) { return m_mainWin->GetColumnWidth( col ); }; -bool wxListCtrl::SetColumnWidth( const int col, const int width ) +bool wxListCtrl::SetColumnWidth( int col, int width ) { m_mainWin->SetColumnWidth( col, width ); return TRUE; @@ -2118,7 +2118,7 @@ bool wxListCtrl::SetItem( wxListItem &info ) return TRUE; }; -long wxListCtrl::SetItem( const long index, const int col, const wxString& label, const int imageId ) +long wxListCtrl::SetItem( long index, int col, const wxString& label, int imageId ) { wxListItem info; info.m_text = label; @@ -2135,18 +2135,18 @@ long wxListCtrl::SetItem( const long index, const int col, const wxString& label return TRUE; }; -int wxListCtrl::GetItemState( const long item, const long stateMask ) +int wxListCtrl::GetItemState( long item, long stateMask ) { return m_mainWin->GetItemState( item, stateMask ); }; -bool wxListCtrl::SetItemState( const long item, const long state, const long stateMask ) +bool wxListCtrl::SetItemState( long item, long state, long stateMask ) { m_mainWin->SetItemState( item, state, stateMask ); return TRUE; }; -bool wxListCtrl::SetItemImage( const long item, const int image, const int WXUNUSED(selImage) ) +bool wxListCtrl::SetItemImage( long item, int image, int WXUNUSED(selImage) ) { wxListItem info; info.m_image = image; @@ -2156,7 +2156,7 @@ bool wxListCtrl::SetItemImage( const long item, const int image, const int WXUNU return TRUE; }; -wxString wxListCtrl::GetItemText( const long item ) +wxString wxListCtrl::GetItemText( long item ) { wxListItem info; info.m_itemId = item; @@ -2164,7 +2164,7 @@ wxString wxListCtrl::GetItemText( const long item ) return info.m_text; }; -void wxListCtrl::SetItemText( const long item, const wxString &str ) +void wxListCtrl::SetItemText( long item, const wxString &str ) { wxListItem info; info.m_mask = wxLIST_MASK_TEXT; @@ -2173,7 +2173,7 @@ void wxListCtrl::SetItemText( const long item, const wxString &str ) m_mainWin->SetItem( info ); }; -long wxListCtrl::GetItemData( const long item ) +long wxListCtrl::GetItemData( long item ) { wxListItem info; info.m_itemId = item; @@ -2181,7 +2181,7 @@ long wxListCtrl::GetItemData( const long item ) return info.m_data; }; -bool wxListCtrl::SetItemData( const long item, long data ) +bool wxListCtrl::SetItemData( long item, long data ) { wxListItem info; info.m_mask = wxLIST_MASK_DATA; @@ -2191,18 +2191,18 @@ bool wxListCtrl::SetItemData( const long item, long data ) return TRUE; }; -bool wxListCtrl::GetItemRect( const long item, wxRectangle &rect, const int WXUNUSED(code) ) +bool wxListCtrl::GetItemRect( long item, wxRectangle &rect, int WXUNUSED(code) ) { m_mainWin->GetItemRect( item, rect ); return TRUE; }; -bool wxListCtrl::GetItemPosition( const long WXUNUSED(item), wxPoint& WXUNUSED(pos) ) const +bool wxListCtrl::GetItemPosition( long WXUNUSED(item), wxPoint& WXUNUSED(pos) ) const { return 0; }; -bool wxListCtrl::SetItemPosition( const long WXUNUSED(item), const wxPoint& WXUNUSED(pos) ) +bool wxListCtrl::SetItemPosition( long WXUNUSED(item), const wxPoint& WXUNUSED(pos) ) { return 0; }; @@ -2237,12 +2237,12 @@ long wxListCtrl::GetTopItem(void) return 0; }; -long wxListCtrl::GetNextItem( const long item, int geom, int state ) +long wxListCtrl::GetNextItem( long item, int geom, int state ) { return m_mainWin->GetNextItem( item, geom, state ); }; -wxImageList *wxListCtrl::GetImageList(const int which) +wxImageList *wxListCtrl::GetImageList(int which) { if (which == wxIMAGE_LIST_NORMAL) { @@ -2259,17 +2259,17 @@ wxImageList *wxListCtrl::GetImageList(const int which) return NULL; }; -void wxListCtrl::SetImageList( wxImageList *imageList, const int which ) +void wxListCtrl::SetImageList( wxImageList *imageList, int which ) { m_mainWin->SetImageList( imageList, which ); }; -bool wxListCtrl::Arrange( const int WXUNUSED(flag) ) +bool wxListCtrl::Arrange( int WXUNUSED(flag) ) { return 0; }; -bool wxListCtrl::DeleteItem( const long item ) +bool wxListCtrl::DeleteItem( long item ) { m_mainWin->DeleteItem( item ); return TRUE; @@ -2281,36 +2281,36 @@ bool wxListCtrl::DeleteAllItems(void) return TRUE; }; -bool wxListCtrl::DeleteColumn( const int col ) +bool wxListCtrl::DeleteColumn( int col ) { m_mainWin->DeleteColumn( col ); return TRUE; }; /* -wxText& wxListCtrl::Edit( const long WXUNUSED(item ) ) +wxText& wxListCtrl::Edit( long WXUNUSED(item ) ) { }; */ -bool wxListCtrl::EnsureVisible( const long item ) +bool wxListCtrl::EnsureVisible( long item ) { m_mainWin->EnsureVisible( item ); return TRUE; }; -long wxListCtrl::FindItem( const long start, const wxString& str, const bool partial ) +long wxListCtrl::FindItem( long start, const wxString& str, bool partial ) { return m_mainWin->FindItem( start, str, partial ); }; -long wxListCtrl::FindItem( const long start, const long data ) +long wxListCtrl::FindItem( long start, long data ) { return m_mainWin->FindItem( start, data ); }; -long wxListCtrl::FindItem( const long WXUNUSED(start), const wxPoint& WXUNUSED(pt), - const int WXUNUSED(direction)) +long wxListCtrl::FindItem( long WXUNUSED(start), const wxPoint& WXUNUSED(pt), + int WXUNUSED(direction)) { return 0; }; @@ -2326,7 +2326,7 @@ long wxListCtrl::InsertItem( wxListItem& info ) return 0; }; -long wxListCtrl::InsertItem( const long index, const wxString &label ) +long wxListCtrl::InsertItem( long index, const wxString &label ) { wxListItem info; info.m_text = label; @@ -2335,7 +2335,7 @@ long wxListCtrl::InsertItem( const long index, const wxString &label ) return InsertItem( info ); }; -long wxListCtrl::InsertItem( const long index, const int imageIndex ) +long wxListCtrl::InsertItem( long index, int imageIndex ) { wxListItem info; info.m_mask = wxLIST_MASK_IMAGE; @@ -2344,7 +2344,7 @@ long wxListCtrl::InsertItem( const long index, const int imageIndex ) return InsertItem( info ); }; -long wxListCtrl::InsertItem( const long index, const wxString &label, const int imageIndex ) +long wxListCtrl::InsertItem( long index, const wxString &label, int imageIndex ) { wxListItem info; info.m_text = label; @@ -2354,14 +2354,14 @@ long wxListCtrl::InsertItem( const long index, const wxString &label, const int return InsertItem( info ); }; -long wxListCtrl::InsertColumn( const long col, wxListItem &item ) +long wxListCtrl::InsertColumn( long col, wxListItem &item ) { m_mainWin->InsertColumn( col, item ); return 0; }; -long wxListCtrl::InsertColumn( const long col, const wxString &heading, - const int format, const int width ) +long wxListCtrl::InsertColumn( long col, const wxString &heading, + int format, int width ) { wxListItem item; item.m_mask = wxLIST_MASK_TEXT | wxLIST_MASK_FORMAT; @@ -2377,7 +2377,7 @@ long wxListCtrl::InsertColumn( const long col, const wxString &heading, return InsertColumn( col, item ); }; -bool wxListCtrl::ScrollList( const int WXUNUSED(dx), const int WXUNUSED(dy) ) +bool wxListCtrl::ScrollList( int WXUNUSED(dx), int WXUNUSED(dy) ) { return 0; }; diff --git a/src/generic/msgdlgg.cpp b/src/generic/msgdlgg.cpp index c277d899e6..ee466c689b 100644 --- a/src/generic/msgdlgg.cpp +++ b/src/generic/msgdlgg.cpp @@ -173,8 +173,8 @@ void wxGenericMessageDialog::OnCancel(wxCommandEvent& WXUNUSED(event)) } -int wxMessageBox(const wxString& message, const wxString& caption, const long style, - wxWindow *parent, const int WXUNUSED(x), const int WXUNUSED(y) ) +int wxMessageBox(const wxString& message, const wxString& caption, long style, + wxWindow *parent, int WXUNUSED(x), int WXUNUSED(y) ) { wxMessageDialog dialog(parent, message, caption, style); diff --git a/src/generic/panelg.cpp b/src/generic/panelg.cpp index f10285fe46..e43bb932f1 100644 --- a/src/generic/panelg.cpp +++ b/src/generic/panelg.cpp @@ -41,10 +41,10 @@ wxPanel::wxPanel(void) SetDefaultBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); } -bool wxPanel::Create(wxWindow *parent, const wxWindowID id, +bool wxPanel::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - const long style, + long style, const wxString& name) { bool ret = wxWindow::Create(parent, id, pos, size, style, name); diff --git a/src/generic/scrolwin.cpp b/src/generic/scrolwin.cpp index f82d3fa0d4..8cabb75feb 100644 --- a/src/generic/scrolwin.cpp +++ b/src/generic/scrolwin.cpp @@ -54,10 +54,10 @@ wxScrolledWindow::wxScrolledWindow(void) m_yScrollLinesPerPage = 0; } -bool wxScrolledWindow::Create(wxWindow *parent, const wxWindowID id, +bool wxScrolledWindow::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - const long style, + long style, const wxString& name) { m_xScrollPixelsPerLine = 0; @@ -78,9 +78,9 @@ bool wxScrolledWindow::Create(wxWindow *parent, const wxWindowID id, * pixelsPerUnitX/pixelsPerUnitY: number of pixels per unit (e.g. pixels per text line) * noUnitsX/noUnitsY: : no. units per scrollbar */ -void wxScrolledWindow::SetScrollbars (const int pixelsPerUnitX, const int pixelsPerUnitY, - const int noUnitsX, const int noUnitsY, - const int xPos, const int yPos, const bool noRefresh ) +void wxScrolledWindow::SetScrollbars (int pixelsPerUnitX, int pixelsPerUnitY, + int noUnitsX, int noUnitsY, + int xPos, int yPos, bool noRefresh ) { bool do_refresh = ( @@ -385,7 +385,7 @@ void wxScrolledWindow::SetScrollPageSize(int orient, int pageSize) /* * Scroll to given position (scroll position, not pixel position) */ -void wxScrolledWindow::Scroll (const int x_pos, const int y_pos) +void wxScrolledWindow::Scroll (int x_pos, int y_pos) { int old_x, old_y; ViewStart (&old_x, &old_y); @@ -408,7 +408,7 @@ void wxScrolledWindow::Scroll (const int x_pos, const int y_pos) #endif } -void wxScrolledWindow::EnableScrolling (const bool x_scroll, const bool y_scroll) +void wxScrolledWindow::EnableScrolling (bool x_scroll, bool y_scroll) { m_xScrollingEnabled = x_scroll; m_yScrollingEnabled = y_scroll; @@ -427,13 +427,13 @@ void wxScrolledWindow::ViewStart (int *x, int *y) const *y = m_yScrollPosition; } -void wxScrolledWindow::CalcScrolledPosition(const int x, const int y, int *xx, int *yy) const +void wxScrolledWindow::CalcScrolledPosition(int x, int y, int *xx, int *yy) const { *xx = x - m_xScrollPosition * m_xScrollPixelsPerLine; *yy = y - m_yScrollPosition * m_yScrollPixelsPerLine; } -void wxScrolledWindow::CalcUnscrolledPosition(const int x, const int y, float *xx, float *yy) const +void wxScrolledWindow::CalcUnscrolledPosition(int x, int y, float *xx, float *yy) const { *xx = (float)(x + m_xScrollPosition * m_xScrollPixelsPerLine); *yy = (float)(y + m_yScrollPosition * m_yScrollPixelsPerLine); diff --git a/src/generic/splitter.cpp b/src/generic/splitter.cpp index 84ec2282aa..c5daa74ee8 100644 --- a/src/generic/splitter.cpp +++ b/src/generic/splitter.cpp @@ -67,8 +67,8 @@ wxSplitterWindow::wxSplitterWindow(void) m_minimumPaneSize = 0; } -wxSplitterWindow::wxSplitterWindow(wxWindow *parent, const wxWindowID id, const wxPoint& pos, - const wxSize& size, const long style, const wxString& name) +wxSplitterWindow::wxSplitterWindow(wxWindow *parent, wxWindowID id, const wxPoint& pos, + const wxSize& size, long style, const wxString& name) :wxWindow(parent, id, pos, size, style, name) { m_splitMode = wxSPLIT_VERTICAL; @@ -341,7 +341,7 @@ void wxSplitterWindow::OnSize(wxSizeEvent& WXUNUSED(event)) SizeWindows(); } -bool wxSplitterWindow::SashHitTest(const int x, const int y, const int tolerance) +bool wxSplitterWindow::SashHitTest(int x, int y, int tolerance) { if ( m_windowTwo == NULL || m_sashPosition == 0) return FALSE; // No sash @@ -481,7 +481,7 @@ void wxSplitterWindow::DrawSash(wxDC& dc) } // Draw the sash tracker (for whilst moving the sash) -void wxSplitterWindow::DrawSashTracker(const int x, const int y) +void wxSplitterWindow::DrawSashTracker(int x, int y) { int w, h; GetClientSize(&w, &h); @@ -591,7 +591,7 @@ void wxSplitterWindow::Initialize(wxWindow *window) // Associates the given window with window 2, drawing the appropriate sash // and changing the split mode. // Does nothing and returns FALSE if the window is already split. -bool wxSplitterWindow::SplitVertically(wxWindow *window1, wxWindow *window2, const int sashPosition) +bool wxSplitterWindow::SplitVertically(wxWindow *window1, wxWindow *window2, int sashPosition) { if ( IsSplit() ) return FALSE; @@ -609,7 +609,7 @@ bool wxSplitterWindow::SplitVertically(wxWindow *window1, wxWindow *window2, con return TRUE; } -bool wxSplitterWindow::SplitHorizontally(wxWindow *window1, wxWindow *window2, const int sashPosition) +bool wxSplitterWindow::SplitHorizontally(wxWindow *window1, wxWindow *window2, int sashPosition) { if ( IsSplit() ) return FALSE; @@ -658,7 +658,7 @@ bool wxSplitterWindow::Unsplit(wxWindow *toRemove) return TRUE; } -void wxSplitterWindow::SetSashPosition(const int position, const bool redraw) +void wxSplitterWindow::SetSashPosition(int position, bool redraw) { m_sashPosition = position; diff --git a/src/generic/statusbr.cpp b/src/generic/statusbr.cpp index d2f31f0096..d78787b1e9 100644 --- a/src/generic/statusbr.cpp +++ b/src/generic/statusbr.cpp @@ -70,10 +70,10 @@ wxStatusBar::~wxStatusBar(void) delete[] m_statusStrings; } -bool wxStatusBar::Create(wxWindow *parent, const wxWindowID id, +bool wxStatusBar::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - const long style, + long style, const wxString& name) { m_statusWidths = NULL; @@ -94,7 +94,7 @@ bool wxStatusBar::Create(wxWindow *parent, const wxWindowID id, return success; } -void wxStatusBar::SetFieldsCount(const int number, const int *widths) +void wxStatusBar::SetFieldsCount(int number, int *widths) { m_nFields = number; @@ -114,7 +114,7 @@ void wxStatusBar::SetFieldsCount(const int number, const int *widths) SetStatusWidths(number, widths); } -void wxStatusBar::SetStatusText(const wxString& text, const int number) +void wxStatusBar::SetStatusText(const wxString& text, int number) { if ((number < 0) || (number >= m_nFields)) return; @@ -130,7 +130,7 @@ void wxStatusBar::SetStatusText(const wxString& text, const int number) #endif } -wxString wxStatusBar::GetStatusText(const int n) const +wxString wxStatusBar::GetStatusText(int n) const { if ((n < 0) || (n >= m_nFields)) return wxString(""); @@ -138,7 +138,7 @@ wxString wxStatusBar::GetStatusText(const int n) const return m_statusStrings[n]; } -void wxStatusBar::SetStatusWidths(const int n, const int *widths_field) +void wxStatusBar::SetStatusWidths(int n, int *widths_field) { // only set status widths, when n == number of statuswindows if (n == m_nFields) @@ -178,7 +178,7 @@ void wxStatusBar::OnPaint(wxPaintEvent& WXUNUSED(event) ) DrawField(dc, i); } -void wxStatusBar::DrawFieldText(wxDC& dc, const int i) +void wxStatusBar::DrawFieldText(wxDC& dc, int i) { int leftMargin = 2; @@ -201,7 +201,7 @@ void wxStatusBar::DrawFieldText(wxDC& dc, const int i) dc.DestroyClippingRegion(); } -void wxStatusBar::DrawField(wxDC& dc, const int i) +void wxStatusBar::DrawField(wxDC& dc, int i) { wxRectangle rect; GetFieldRect(i, rect); @@ -232,7 +232,7 @@ void wxStatusBar::DrawField(wxDC& dc, const int i) } // Get the position and size of the field's internal bounding rectangle -bool wxStatusBar::GetFieldRect(const int n, wxRectangle& rect) const +bool wxStatusBar::GetFieldRect(int n, wxRectangle& rect) const { if ((n < 0) || (n >= m_nFields)) return FALSE; diff --git a/src/generic/tabg.cpp b/src/generic/tabg.cpp index 216b721a0b..b244f5c5c3 100644 --- a/src/generic/tabg.cpp +++ b/src/generic/tabg.cpp @@ -1018,10 +1018,10 @@ BEGIN_EVENT_TABLE(wxTabbedDialog, wxDialog) EVT_PAINT(wxTabbedDialog::OnPaint) END_EVENT_TABLE() -wxTabbedDialog::wxTabbedDialog(wxWindow *parent, const wxWindowID id, +wxTabbedDialog::wxTabbedDialog(wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, - const long windowStyle, const wxString& name): + long windowStyle, const wxString& name): wxDialog(parent, id, title, pos, size, windowStyle, name) { m_tabView = NULL; @@ -1062,8 +1062,8 @@ BEGIN_EVENT_TABLE(wxTabbedPanel, wxPanel) EVT_PAINT(wxTabbedPanel::OnPaint) END_EVENT_TABLE() -wxTabbedPanel::wxTabbedPanel(wxWindow *parent, const wxWindowID id, const wxPoint& pos, - const wxSize& size, const long windowStyle, const wxString& name): +wxTabbedPanel::wxTabbedPanel(wxWindow *parent, wxWindowID id, const wxPoint& pos, + const wxSize& size, long windowStyle, const wxString& name): wxPanel(parent, id, pos, size, windowStyle, name) { m_tabView = NULL; diff --git a/src/generic/treectrl.cpp b/src/generic/treectrl.cpp index 0a375375e7..ab83d2f873 100644 --- a/src/generic/treectrl.cpp +++ b/src/generic/treectrl.cpp @@ -357,7 +357,7 @@ wxTreeCtrl::wxTreeCtrl() m_hilightBrush = new wxBrush( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_HIGHLIGHT), wxSOLID ); }; -wxTreeCtrl::wxTreeCtrl(wxWindow *parent, const wxWindowID id, +wxTreeCtrl::wxTreeCtrl(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) @@ -381,7 +381,7 @@ wxTreeCtrl::~wxTreeCtrl() if (m_dc) delete m_dc; }; -bool wxTreeCtrl::Create(wxWindow *parent, const wxWindowID id, +bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style diff --git a/src/gtk/bitmap.cpp b/src/gtk/bitmap.cpp index 845a1fcf00..eb09743ab8 100644 --- a/src/gtk/bitmap.cpp +++ b/src/gtk/bitmap.cpp @@ -34,7 +34,7 @@ wxMask::wxMask( const wxBitmap& WXUNUSED(bitmap), const wxColour& WXUNUSED(colou { }; -wxMask::wxMask( const wxBitmap& WXUNUSED(bitmap), const int WXUNUSED(paletteIndex) ) +wxMask::wxMask( const wxBitmap& WXUNUSED(bitmap), int WXUNUSED(paletteIndex) ) { }; @@ -111,7 +111,7 @@ wxBitmap::wxBitmap(void) if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); }; -wxBitmap::wxBitmap( const int width, const int height, const int depth ) +wxBitmap::wxBitmap( int width, int height, int depth ) { m_refData = new wxBitmapRefData(); M_BMPDATA->m_mask = NULL; @@ -163,13 +163,13 @@ wxBitmap::wxBitmap( const wxBitmap* bmp ) if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); }; -wxBitmap::wxBitmap( const wxString &filename, const int type ) +wxBitmap::wxBitmap( const wxString &filename, int type ) { LoadFile( filename, type ); }; // CMB 15/5/98: add constructor for xbm bitmaps -wxBitmap::wxBitmap( const char bits[], const int width, const int height, const int WXUNUSED(depth)) +wxBitmap::wxBitmap( const char bits[], int width, int height, int WXUNUSED(depth)) { m_refData = new wxBitmapRefData(); @@ -227,19 +227,19 @@ int wxBitmap::GetDepth(void) const return M_BMPDATA->m_bpp; }; -void wxBitmap::SetHeight( const int height ) +void wxBitmap::SetHeight( int height ) { if (!Ok()) return; M_BMPDATA->m_height = height; }; -void wxBitmap::SetWidth( const int width ) +void wxBitmap::SetWidth( int width ) { if (!Ok()) return; M_BMPDATA->m_width = width; }; -void wxBitmap::SetDepth( const int depth ) +void wxBitmap::SetDepth( int depth ) { if (!Ok()) return; M_BMPDATA->m_bpp = depth; @@ -258,13 +258,13 @@ void wxBitmap::SetMask( wxMask *mask ) M_BMPDATA->m_mask = mask; }; -bool wxBitmap::SaveFile( const wxString &WXUNUSED(name), const int WXUNUSED(type), +bool wxBitmap::SaveFile( const wxString &WXUNUSED(name), int WXUNUSED(type), wxPalette *WXUNUSED(palette) ) { return FALSE; }; -bool wxBitmap::LoadFile( const wxString &name, const int WXUNUSED(type) ) +bool wxBitmap::LoadFile( const wxString &name, int WXUNUSED(type) ) { #ifdef USE_GDK_IMLIB diff --git a/src/gtk/bmpbuttn.cpp b/src/gtk/bmpbuttn.cpp index 09722663f3..fe0b6ebe1e 100644 --- a/src/gtk/bmpbuttn.cpp +++ b/src/gtk/bmpbuttn.cpp @@ -42,14 +42,14 @@ wxBitmapButton::wxBitmapButton(void) wxBitmapButton::wxBitmapButton( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { Create( parent, id, bitmap, pos, size, style, name ); }; bool wxBitmapButton::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { m_needParent = TRUE; diff --git a/src/gtk/brush.cpp b/src/gtk/brush.cpp index e8bfb06968..155b0c400b 100644 --- a/src/gtk/brush.cpp +++ b/src/gtk/brush.cpp @@ -45,7 +45,7 @@ wxBrush::wxBrush(void) if (wxTheBrushList) wxTheBrushList->AddBrush( this ); }; -wxBrush::wxBrush( const wxColour &colour, const int style ) +wxBrush::wxBrush( const wxColour &colour, int style ) { m_refData = new wxBrushRefData(); M_BRUSHDATA->m_style = style; @@ -54,7 +54,7 @@ wxBrush::wxBrush( const wxColour &colour, const int style ) if (wxTheBrushList) wxTheBrushList->AddBrush( this ); }; -wxBrush::wxBrush( const wxString &colourName, const int style ) +wxBrush::wxBrush( const wxString &colourName, int style ) { m_refData = new wxBrushRefData(); M_BRUSHDATA->m_style = style; diff --git a/src/gtk/button.cpp b/src/gtk/button.cpp index d4361f37b8..9c167dc0fb 100644 --- a/src/gtk/button.cpp +++ b/src/gtk/button.cpp @@ -42,14 +42,14 @@ wxButton::wxButton(void) wxButton::wxButton( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { Create( parent, id, label, pos, size, style, name ); }; bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { m_needParent = TRUE; diff --git a/src/gtk/checkbox.cpp b/src/gtk/checkbox.cpp index 57c712db39..ee3830f361 100644 --- a/src/gtk/checkbox.cpp +++ b/src/gtk/checkbox.cpp @@ -38,14 +38,14 @@ wxCheckBox::wxCheckBox(void) wxCheckBox::wxCheckBox( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { Create( parent, id, label, pos, size, style, name ); }; bool wxCheckBox::Create( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { m_needParent = TRUE; @@ -68,7 +68,7 @@ bool wxCheckBox::Create( wxWindow *parent, wxWindowID id, const wxString &label return TRUE; }; -void wxCheckBox::SetValue( const bool state ) +void wxCheckBox::SetValue( bool state ) { if (state) gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(m_widget), GTK_STATE_ACTIVE ); diff --git a/src/gtk/choice.cpp b/src/gtk/choice.cpp index 17535c188a..57922091b9 100644 --- a/src/gtk/choice.cpp +++ b/src/gtk/choice.cpp @@ -38,18 +38,18 @@ wxChoice::wxChoice(void) { }; -wxChoice::wxChoice( wxWindow *parent, const wxWindowID id, - const wxPoint &pos, const wxSize &size, - const int n, const wxString choices[], - const long style, const wxString &name ) +wxChoice::wxChoice( wxWindow *parent, wxWindowID id, + const wxPoint &pos, const wxSize &size, + int n, const wxString choices[], + long style, const wxString &name ) { Create( parent, id, pos, size, n, choices, style, name ); }; -bool wxChoice::Create( wxWindow *parent, const wxWindowID id, - const wxPoint &pos, const wxSize &size, - const int n, const wxString choices[], - const long style, const wxString &name ) +bool wxChoice::Create( wxWindow *parent, wxWindowID id, + const wxPoint &pos, const wxSize &size, + int n, const wxString choices[], + long style, const wxString &name ) { m_needParent = TRUE; @@ -141,7 +141,7 @@ int wxChoice::GetSelection(void) return -1; }; -wxString wxChoice::GetString( const int n ) const +wxString wxChoice::GetString( int n ) const { GtkMenuShell *menu_shell = GTK_MENU_SHELL( gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ) ); int count = 0; @@ -180,11 +180,11 @@ int wxChoice::Number(void) const return count; }; -void wxChoice::SetColumns( const int WXUNUSED(n) ) +void wxChoice::SetColumns( int WXUNUSED(n) ) { }; -void wxChoice::SetSelection( const int n ) +void wxChoice::SetSelection( int n ) { int tmp = n; gtk_option_menu_set_history( GTK_OPTION_MENU(m_widget), (gint)tmp ); diff --git a/src/gtk/combobox.cpp b/src/gtk/combobox.cpp index b3630535a5..5d080a400a 100644 --- a/src/gtk/combobox.cpp +++ b/src/gtk/combobox.cpp @@ -32,10 +32,10 @@ void gtk_combo_clicked_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo IMPLEMENT_DYNAMIC_CLASS(wxComboBox,wxControl) -bool wxComboBox::Create(wxWindow *parent, const wxWindowID id, const wxString& value, +bool wxComboBox::Create(wxWindow *parent, wxWindowID id, const wxString& value, const wxPoint& pos, const wxSize& size, - const int n, const wxString choices[], - const long style, const wxString& name ) + int n, const wxString choices[], + long style, const wxString& name ) { m_needParent = TRUE; @@ -97,7 +97,7 @@ void wxComboBox::Append( const wxString &WXUNUSED(item), char* WXUNUSED(clientDa { }; -void wxComboBox::Delete( const int n ) +void wxComboBox::Delete( int n ) { GtkWidget *list = GTK_COMBO(m_widget)->list; gtk_list_clear_items( GTK_LIST(list), n, n ); @@ -120,14 +120,14 @@ int wxComboBox::FindString( const wxString &item ) return -1; }; -char* wxComboBox::GetClientData( const int n ) +char* wxComboBox::GetClientData( int n ) { wxNode *node = m_clientData.Nth( n ); if (node) return (char*)node->Data(); return NULL; }; -void wxComboBox::SetClientData( const int n, char * clientData ) +void wxComboBox::SetClientData( int n, char * clientData ) { wxNode *node = m_clientData.Nth( n ); if (node) node->SetData( (wxObject*) clientData ); @@ -152,7 +152,7 @@ int wxComboBox::GetSelection(void) const return -1; }; -wxString wxComboBox::GetString( const int n ) const +wxString wxComboBox::GetString( int n ) const { GtkWidget *list = GTK_COMBO(m_widget)->list; @@ -190,7 +190,7 @@ int wxComboBox::Number(void) const return count; }; -void wxComboBox::SetSelection( const int n ) +void wxComboBox::SetSelection( int n ) { GtkWidget *list = GTK_COMBO(m_widget)->list; gtk_list_select_item( GTK_LIST(list), n ); @@ -229,7 +229,7 @@ void wxComboBox::Paste(void) gtk_editable_paste_clipboard( GTK_EDITABLE(entry), 0 ); }; -void wxComboBox::SetInsertionPoint( const long pos ) +void wxComboBox::SetInsertionPoint( long pos ) { GtkWidget *entry = GTK_COMBO(m_widget)->entry; int tmp = (int) pos; @@ -256,7 +256,7 @@ long wxComboBox::GetLastPosition(void) const return (long) pos-1; }; -void wxComboBox::Replace( const long from, const long to, const wxString& value ) +void wxComboBox::Replace( long from, long to, const wxString& value ) { GtkWidget *entry = GTK_COMBO(m_widget)->entry; gtk_editable_delete_text( GTK_EDITABLE(entry), (gint)from, (gint)to ); @@ -265,17 +265,17 @@ void wxComboBox::Replace( const long from, const long to, const wxString& value gtk_editable_insert_text( GTK_EDITABLE(entry), value, value.Length(), &pos ); }; -void wxComboBox::Remove(const long from, const long to) +void wxComboBox::Remove(long from, long to) { GtkWidget *entry = GTK_COMBO(m_widget)->entry; gtk_editable_delete_text( GTK_EDITABLE(entry), (gint)from, (gint)to ); }; -void wxComboBox::SetSelection( const long WXUNUSED(from), const long WXUNUSED(to) ) +void wxComboBox::SetSelection( long WXUNUSED(from), long WXUNUSED(to) ) { }; -void wxComboBox::SetEditable( const bool WXUNUSED(editable) ) +void wxComboBox::SetEditable( bool WXUNUSED(editable) ) { }; diff --git a/src/gtk/control.cpp b/src/gtk/control.cpp index 510d88d0e9..237f37d89f 100644 --- a/src/gtk/control.cpp +++ b/src/gtk/control.cpp @@ -28,7 +28,7 @@ wxControl::wxControl(void) wxControl::wxControl( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) : + long style, const wxString &name ) : wxWindow( parent, id, pos, size, style, name ) { }; diff --git a/src/gtk/cursor.cpp b/src/gtk/cursor.cpp index bb0888bdcb..1f84b80f69 100644 --- a/src/gtk/cursor.cpp +++ b/src/gtk/cursor.cpp @@ -49,7 +49,7 @@ wxCursor::wxCursor(void) { }; -wxCursor::wxCursor( const int cursorId ) +wxCursor::wxCursor( int cursorId ) { m_refData = new wxCursorRefData(); diff --git a/src/gtk/dialog.cpp b/src/gtk/dialog.cpp index 0c63e39f11..1756334f0c 100644 --- a/src/gtk/dialog.cpp +++ b/src/gtk/dialog.cpp @@ -57,7 +57,7 @@ wxDialog::wxDialog(void) wxDialog::wxDialog( wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { wxTopLevelWindows.Insert( this ); Create( parent, id, title, pos, size, style, name ); @@ -66,7 +66,7 @@ wxDialog::wxDialog( wxWindow *parent, bool wxDialog::Create( wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { m_needParent = FALSE; @@ -172,7 +172,7 @@ void wxDialog::OnCloseWindow(wxCloseEvent& event) }; }; -bool wxDialog::Show( const bool show ) +bool wxDialog::Show( bool show ) { if (!show && m_modalShowing) { diff --git a/src/gtk/dnd.cpp b/src/gtk/dnd.cpp index cca46f3b87..9ba46a6c2c 100644 --- a/src/gtk/dnd.cpp +++ b/src/gtk/dnd.cpp @@ -106,7 +106,7 @@ wxDragSource::~wxDragSource(void) g_blockEventsOnDrag = FALSE; }; -void wxDragSource::SetData( char *data, const long size ) +void wxDragSource::SetData( char *data, long size ) { m_size = size; m_data = data; diff --git a/src/gtk/frame.cpp b/src/gtk/frame.cpp index f70d0b9f31..ca0e1f012e 100644 --- a/src/gtk/frame.cpp +++ b/src/gtk/frame.cpp @@ -80,18 +80,18 @@ wxFrame::wxFrame(void) wxTopLevelWindows.Insert( this ); }; -wxFrame::wxFrame( wxWindow *parent, const wxWindowID id, const wxString &title, - const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) +wxFrame::wxFrame( wxWindow *parent, wxWindowID id, const wxString &title, + const wxPoint &pos, const wxSize &size, + long style, const wxString &name ) { m_sizeSet = FALSE; Create( parent, id, title, pos, size, style, name ); wxTopLevelWindows.Insert( this ); }; -bool wxFrame::Create( wxWindow *parent, const wxWindowID id, const wxString &title, +bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { m_needParent = FALSE; m_mainWindow = NULL; @@ -154,7 +154,7 @@ wxFrame::~wxFrame(void) if (wxTopLevelWindows.Number() == 0) wxTheApp->ExitMainLoop(); }; -bool wxFrame::Show( const bool show ) +bool wxFrame::Show( bool show ) { if (show) { @@ -165,7 +165,7 @@ bool wxFrame::Show( const bool show ) return wxWindow::Show( show ); }; -void wxFrame::Enable( const bool enable ) +void wxFrame::Enable( bool enable ) { wxWindow::Enable( enable ); gtk_widget_set_sensitive( m_mainWindow, enable ); @@ -309,7 +309,7 @@ void wxFrame::SetMenuBar( wxMenuBar *menuBar ) m_frameMenuBar->m_widget, m_frameMenuBar->m_x, m_frameMenuBar->m_y ); }; -bool wxFrame::CreateStatusBar( const int number ) +bool wxFrame::CreateStatusBar( int number ) { if (m_frameStatusBar) delete m_frameStatusBar; @@ -320,12 +320,12 @@ bool wxFrame::CreateStatusBar( const int number ) return TRUE; }; -void wxFrame::SetStatusText( const wxString &text, const int number ) +void wxFrame::SetStatusText( const wxString &text, int number ) { if (m_frameStatusBar) m_frameStatusBar->SetStatusText( text, number ); }; -void wxFrame::SetStatusWidths( const int n, const int *width ) +void wxFrame::SetStatusWidths( int n, int *width ) { if (m_frameStatusBar) m_frameStatusBar->SetStatusWidths( n, width ); }; diff --git a/src/gtk/gauge.cpp b/src/gtk/gauge.cpp index bd679ff044..786bdac7b0 100644 --- a/src/gtk/gauge.cpp +++ b/src/gtk/gauge.cpp @@ -20,9 +20,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxGauge,wxControl) -bool wxGauge::Create( wxWindow *parent, const wxWindowID id, const int range, +bool wxGauge::Create( wxWindow *parent, wxWindowID id, int range, const wxPoint& pos, const wxSize& size, - const long style, const wxString& name ) + long style, const wxString& name ) { m_needParent = TRUE; @@ -43,7 +43,7 @@ bool wxGauge::Create( wxWindow *parent, const wxWindowID id, const int range, return TRUE; }; -void wxGauge::SetRange( const int r ) +void wxGauge::SetRange( int r ) { m_rangeMax = r; if (m_gaugePos > m_rangeMax) m_gaugePos = m_rangeMax; @@ -51,7 +51,7 @@ void wxGauge::SetRange( const int r ) gtk_progress_bar_update( GTK_PROGRESS_BAR(m_widget), (float)(m_rangeMax/m_gaugePos) ); }; -void wxGauge::SetValue( const int pos ) +void wxGauge::SetValue( int pos ) { m_gaugePos = pos; if (m_gaugePos > m_rangeMax) m_gaugePos = m_rangeMax; diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index 8c927d8210..58842aa9c5 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -49,16 +49,16 @@ wxListBox::wxListBox(void) wxListBox::wxListBox( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, - const int n, const wxString choices[], - const long style, const wxString &name ) + int n, const wxString choices[], + long style, const wxString &name ) { Create( parent, id, pos, size, n, choices, style, name ); }; bool wxListBox::Create( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, - const int n, const wxString choices[], - const long style, const wxString &name ) + int n, const wxString choices[], + long style, const wxString &name ) { m_needParent = TRUE; @@ -150,7 +150,7 @@ int wxListBox::FindString( const wxString &item ) const return -1; }; -char *wxListBox::GetClientData( const int WXUNUSED(n) ) const +char *wxListBox::GetClientData( int WXUNUSED(n) ) const { wxFAIL_MSG("wxListBox::GetClientData not implemented"); @@ -231,7 +231,7 @@ int wxListBox::Number(void) return count; }; -bool wxListBox::Selected( const int n ) +bool wxListBox::Selected( int n ) { GList *target = g_list_nth( m_list->children, n ); if (target) @@ -246,11 +246,11 @@ bool wxListBox::Selected( const int n ) return FALSE; }; -void wxListBox::Set( const int WXUNUSED(n), const wxString *WXUNUSED(choices) ) +void wxListBox::Set( int WXUNUSED(n), const wxString *WXUNUSED(choices) ) { }; -void wxListBox::SetClientData( const int WXUNUSED(n), char *WXUNUSED(clientData) ) +void wxListBox::SetClientData( int WXUNUSED(n), char *WXUNUSED(clientData) ) { }; @@ -262,7 +262,7 @@ void wxListBox::SetFirstItem( const wxString &WXUNUSED(item) ) { }; -void wxListBox::SetSelection( const int n, const bool select ) +void wxListBox::SetSelection( int n, bool select ) { if (select) gtk_list_select_item( m_list, n ); @@ -270,11 +270,11 @@ void wxListBox::SetSelection( const int n, const bool select ) gtk_list_unselect_item( m_list, n ); }; -void wxListBox::SetString( const int WXUNUSED(n), const wxString &WXUNUSED(string) ) +void wxListBox::SetString( int WXUNUSED(n), const wxString &WXUNUSED(string) ) { }; -void wxListBox::SetStringSelection( const wxString &string, const bool select ) +void wxListBox::SetStringSelection( const wxString &string, bool select ) { SetSelection( FindString(string), select ); }; diff --git a/src/gtk/mdi.cpp b/src/gtk/mdi.cpp index 3ec3c31969..f82bf73350 100644 --- a/src/gtk/mdi.cpp +++ b/src/gtk/mdi.cpp @@ -28,9 +28,9 @@ wxMDIParentFrame::wxMDIParentFrame(void) }; wxMDIParentFrame::wxMDIParentFrame( wxWindow *parent, - const wxWindowID id, const wxString& title, + wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, - const long style, const wxString& name ) + long style, const wxString& name ) { m_clientWindow = NULL; m_currentChild = NULL; @@ -43,9 +43,9 @@ wxMDIParentFrame::~wxMDIParentFrame(void) }; bool wxMDIParentFrame::Create( wxWindow *parent, - const wxWindowID id, const wxString& title, + wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, - const long style, const wxString& name ) + long style, const wxString& name ) { wxFrame::Create( parent, id, title, pos, size, style, name ); @@ -112,9 +112,9 @@ wxMDIChildFrame::wxMDIChildFrame(void) }; wxMDIChildFrame::wxMDIChildFrame( wxMDIParentFrame *parent, - const wxWindowID id, const wxString& title, + wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, - const long style, const wxString& name ) + long style, const wxString& name ) { Create( parent, id, title, pos, size, style, name ); }; @@ -124,9 +124,9 @@ wxMDIChildFrame::~wxMDIChildFrame(void) }; bool wxMDIChildFrame::Create( wxMDIParentFrame *parent, - const wxWindowID id, const wxString& title, + wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, - const long style, const wxString& name ) + long style, const wxString& name ) { m_title = title; return wxPanel::Create( parent->GetClientWindow(), id, pos, size, style, name ); @@ -150,7 +150,7 @@ wxMDIClientWindow::wxMDIClientWindow(void) { }; -wxMDIClientWindow::wxMDIClientWindow( wxMDIParentFrame *parent, const long style ) +wxMDIClientWindow::wxMDIClientWindow( wxMDIParentFrame *parent, long style ) { CreateClient( parent, style ); }; @@ -159,7 +159,7 @@ wxMDIClientWindow::~wxMDIClientWindow(void) { }; -bool wxMDIClientWindow::CreateClient( wxMDIParentFrame *parent, const long style ) +bool wxMDIClientWindow::CreateClient( wxMDIParentFrame *parent, long style ) { m_needParent = TRUE; diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp index 5db3904638..6df21c5987 100644 --- a/src/gtk/menu.cpp +++ b/src/gtk/menu.cpp @@ -148,7 +148,7 @@ void wxMenu::AppendSeparator(void) m_items.Append( mitem ); }; -void wxMenu::Append( const int id, const wxString &item, const wxString &helpStr, const bool checkable ) +void wxMenu::Append( int id, const wxString &item, const wxString &helpStr, bool checkable ) { wxMenuItem *mitem = new wxMenuItem(); mitem->m_id = id; @@ -176,7 +176,7 @@ void wxMenu::Append( const int id, const wxString &item, const wxString &helpStr m_items.Append( mitem ); }; -void wxMenu::Append( const int id, const wxString &item, wxMenu *subMenu, const wxString &helpStr ) +void wxMenu::Append( int id, const wxString &item, wxMenu *subMenu, const wxString &helpStr ) { wxMenuItem *mitem = new wxMenuItem(); mitem->m_id = id; @@ -219,7 +219,7 @@ int wxMenu::FindItem( const wxString itemString ) const return -1; }; -void wxMenu::Enable( const int id, const bool enable ) +void wxMenu::Enable( int id, bool enable ) { wxNode *node = m_items.First(); while (node) @@ -234,7 +234,7 @@ void wxMenu::Enable( const int id, const bool enable ) }; }; -bool wxMenu::Enabled( const int id ) const +bool wxMenu::Enabled( int id ) const { wxNode *node = m_items.First(); while (node) @@ -246,7 +246,7 @@ bool wxMenu::Enabled( const int id ) const return FALSE; }; -void wxMenu::SetLabel( const int id, const wxString &label ) +void wxMenu::SetLabel( int id, const wxString &label ) { wxString s( label ); size_t pos; diff --git a/src/gtk/notebook.cpp b/src/gtk/notebook.cpp index 0c0f939051..eb1ac6d1b5 100644 --- a/src/gtk/notebook.cpp +++ b/src/gtk/notebook.cpp @@ -89,9 +89,9 @@ wxNotebook::wxNotebook() Init(); }; -wxNotebook::wxNotebook( wxWindow *parent, const wxWindowID id, +wxNotebook::wxNotebook( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - const long style, const wxString& name ) + long style, const wxString& name ) { Init(); Create( parent, id, pos, size, style, name ); @@ -108,9 +108,9 @@ wxNotebook::~wxNotebook() DeleteAllPages(); }; -bool wxNotebook::Create(wxWindow *parent, const wxWindowID id, +bool wxNotebook::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - const long style, const wxString& name ) + long style, const wxString& name ) { m_needParent = TRUE; @@ -253,7 +253,7 @@ bool wxNotebook::SetPageText( int page, const wxString &text ) return TRUE; }; -bool wxNotebook::SetPageImage( int page, const int image ) +bool wxNotebook::SetPageImage( int page, int image ) { wxNotebookPage* nb_page = GetNotebookPage(page); if (!nb_page) diff --git a/src/gtk/palette.cpp b/src/gtk/palette.cpp index 162fb0effe..78cdfe5aed 100644 --- a/src/gtk/palette.cpp +++ b/src/gtk/palette.cpp @@ -49,7 +49,7 @@ wxPalette::wxPalette(void) { }; -wxPalette::wxPalette( const int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue ) +wxPalette::wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue ) { m_refData = new wxPaletteRefData(); Create( n, red, green, blue ); @@ -92,7 +92,7 @@ bool wxPalette::Ok(void) const return (m_refData); }; -bool wxPalette::Create( const int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue) +bool wxPalette::Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue) { }; @@ -100,7 +100,7 @@ int wxPalette::GetPixel( const unsigned char red, const unsigned char green, con { }; -bool wxPalette::GetRGB( const int pixel, unsigned char *red, unsigned char *green, unsigned char *blue ) const +bool wxPalette::GetRGB( int pixel, unsigned char *red, unsigned char *green, unsigned char *blue ) const { }; diff --git a/src/gtk/pen.cpp b/src/gtk/pen.cpp index 663f7ad3db..7ed7be02a7 100644 --- a/src/gtk/pen.cpp +++ b/src/gtk/pen.cpp @@ -120,7 +120,7 @@ void wxPen::SetColour( const wxString &colourName ) M_PENDATA->m_colour = colourName; }; -void wxPen::SetColour( const int red, const int green, const int blue ) +void wxPen::SetColour( int red, int green, int blue ) { if (!m_refData) m_refData = new wxPenRefData(); diff --git a/src/gtk/radiobox.cpp b/src/gtk/radiobox.cpp index 5e83994194..c449676506 100644 --- a/src/gtk/radiobox.cpp +++ b/src/gtk/radiobox.cpp @@ -41,19 +41,19 @@ wxRadioBox::wxRadioBox(void) { }; -wxRadioBox::wxRadioBox( wxWindow *parent, const wxWindowID id, const wxString& title, - const wxPoint &pos, const wxSize &size, - const int n, const wxString choices[], - const int majorDim, const long style, +wxRadioBox::wxRadioBox( wxWindow *parent, wxWindowID id, const wxString& title, + const wxPoint &pos, const wxSize &size, + int n, const wxString choices[], + int majorDim, long style, const wxString &name ) { Create( parent, id, title, pos, size, n, choices, majorDim, style, name ); }; -bool wxRadioBox::Create( wxWindow *parent, const wxWindowID id, const wxString& title, - const wxPoint &pos, const wxSize &size, - const int n, const wxString choices[], - const int WXUNUSED(majorDim), const long style, +bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title, + const wxPoint &pos, const wxSize &size, + int n, const wxString choices[], + int WXUNUSED(majorDim), long style, const wxString &name ) { m_needParent = TRUE; @@ -108,7 +108,7 @@ bool wxRadioBox::Create( wxWindow *parent, const wxWindowID id, const wxString& return TRUE; }; -bool wxRadioBox::Show( const bool show ) +bool wxRadioBox::Show( bool show ) { wxWindow::Show( show ); @@ -128,7 +128,7 @@ int wxRadioBox::FindString( const wxString& WXUNUSED(s) ) const return 0; }; -void wxRadioBox::SetSelection( const int WXUNUSED(n) ) +void wxRadioBox::SetSelection( int WXUNUSED(n) ) { }; @@ -146,7 +146,7 @@ int wxRadioBox::GetSelection(void) const return -1; }; -wxString wxRadioBox::GetString( const int WXUNUSED(n) ) const +wxString wxRadioBox::GetString( int WXUNUSED(n) ) const { return ""; }; @@ -160,28 +160,28 @@ void wxRadioBox::SetLabel( const wxString& WXUNUSED(label) ) { }; -void wxRadioBox::SetLabel( const int WXUNUSED(item), const wxString& WXUNUSED(label) ) +void wxRadioBox::SetLabel( int WXUNUSED(item), const wxString& WXUNUSED(label) ) { }; -void wxRadioBox::SetLabel( const int WXUNUSED(item), wxBitmap *WXUNUSED(bitmap) ) +void wxRadioBox::SetLabel( int WXUNUSED(item), wxBitmap *WXUNUSED(bitmap) ) { }; -wxString wxRadioBox::GetLabel( const int WXUNUSED(item) ) const +wxString wxRadioBox::GetLabel( int WXUNUSED(item) ) const { return ""; }; -void wxRadioBox::Enable( const bool WXUNUSED(enable) ) +void wxRadioBox::Enable( bool WXUNUSED(enable) ) { }; -void wxRadioBox::Enable( const int WXUNUSED(item), const bool WXUNUSED(enable) ) +void wxRadioBox::Enable( int WXUNUSED(item), bool WXUNUSED(enable) ) { }; -void wxRadioBox::Show( const int WXUNUSED(item), const bool WXUNUSED(show) ) +void wxRadioBox::Show( int WXUNUSED(item), bool WXUNUSED(show) ) { }; @@ -223,7 +223,7 @@ int wxRadioBox::GetNumberOfRowsOrCols(void) const return 1; }; -void wxRadioBox::SetNumberOfRowsOrCols( const int WXUNUSED(n) ) +void wxRadioBox::SetNumberOfRowsOrCols( int WXUNUSED(n) ) { }; diff --git a/src/gtk/scrolbar.cpp b/src/gtk/scrolbar.cpp index 9a0098b3bd..bcfece5c27 100644 --- a/src/gtk/scrolbar.cpp +++ b/src/gtk/scrolbar.cpp @@ -63,9 +63,9 @@ void gtk_scrollbar_callback( GtkWidget *WXUNUSED(widget), wxScrollBar *win ) IMPLEMENT_DYNAMIC_CLASS(wxScrollBar,wxControl) -wxScrollBar::wxScrollBar(wxWindow *parent, const wxWindowID id, +wxScrollBar::wxScrollBar(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - const long style, const wxString& name ) + long style, const wxString& name ) { Create( parent, id, pos, size, style, name ); }; @@ -74,9 +74,9 @@ wxScrollBar::~wxScrollBar(void) { }; -bool wxScrollBar::Create(wxWindow *parent, const wxWindowID id, +bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - const long style, const wxString& name ) + long style, const wxString& name ) { m_needParent = TRUE; @@ -121,7 +121,7 @@ int wxScrollBar::GetRange() const return (int)(m_adjust->upper+0.5); }; -void wxScrollBar::SetPosition( const int viewStart ) +void wxScrollBar::SetPosition( int viewStart ) { float fpos = (float)viewStart; m_oldPos = fpos; @@ -131,8 +131,8 @@ void wxScrollBar::SetPosition( const int viewStart ) gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "value_changed" ); }; -void wxScrollBar::SetScrollbar( const int position, const int thumbSize, const int range, const int pageSize, - const bool WXUNUSED(refresh) ) +void wxScrollBar::SetScrollbar( int position, int thumbSize, int range, int pageSize, + bool WXUNUSED(refresh) ) { float fpos = (float)position; m_oldPos = fpos; @@ -162,7 +162,7 @@ int wxScrollBar::GetValue(void) const return GetPosition(); }; -void wxScrollBar::SetValue( const int viewStart ) +void wxScrollBar::SetValue( int viewStart ) { SetPosition( viewStart ); }; @@ -190,7 +190,7 @@ int wxScrollBar::GetObjectLength() const return (int)(m_adjust->page_size+0.5); }; -void wxScrollBar::SetPageSize( const int pageLength ) +void wxScrollBar::SetPageSize( int pageLength ) { int pos = (int)(m_adjust->value+0.5); int thumb = (int)(m_adjust->page_size+0.5); @@ -198,7 +198,7 @@ void wxScrollBar::SetPageSize( const int pageLength ) SetScrollbar( pos, thumb, range, pageLength ); }; -void wxScrollBar::SetObjectLength( const int objectLength ) +void wxScrollBar::SetObjectLength( int objectLength ) { int pos = (int)(m_adjust->value+0.5); int page = (int)(m_adjust->page_increment+0.5); @@ -206,7 +206,7 @@ void wxScrollBar::SetObjectLength( const int objectLength ) SetScrollbar( pos, objectLength, range, page ); }; -void wxScrollBar::SetViewLength( const int viewLength ) +void wxScrollBar::SetViewLength( int viewLength ) { int pos = (int)(m_adjust->value+0.5); int thumb = (int)(m_adjust->page_size+0.5); diff --git a/src/gtk/slider.cpp b/src/gtk/slider.cpp index 4b2385afd1..d83eb9d7e3 100644 --- a/src/gtk/slider.cpp +++ b/src/gtk/slider.cpp @@ -65,10 +65,10 @@ wxSlider::wxSlider(void) { }; -wxSlider::wxSlider( wxWindow *parent, const wxWindowID id, - const int value, const int minValue, const int maxValue, +wxSlider::wxSlider( wxWindow *parent, wxWindowID id, + int value, int minValue, int maxValue, const wxPoint& pos, const wxSize& size, - const long style, + long style, /* const wxValidator& validator = wxDefaultValidator, */ const wxString& name ) { @@ -80,10 +80,10 @@ wxSlider::~wxSlider(void) { }; -bool wxSlider::Create(wxWindow *parent, const wxWindowID id, - const int value, const int minValue, const int maxValue, +bool wxSlider::Create(wxWindow *parent, wxWindowID id, + int value, int minValue, int maxValue, const wxPoint& pos, const wxSize& size, - const long style, + long style, /* const wxValidator& validator = wxDefaultValidator, */ const wxString& name ) { @@ -117,7 +117,7 @@ int wxSlider::GetValue(void) const return (int)(m_adjust->value+0.5); }; -void wxSlider::SetValue( const int value ) +void wxSlider::SetValue( int value ) { float fpos = (float)value; m_oldPos = fpos; @@ -127,7 +127,7 @@ void wxSlider::SetValue( const int value ) gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "value_changed" ); }; -void wxSlider::SetRange( const int minValue, const int maxValue ) +void wxSlider::SetRange( int minValue, int maxValue ) { float fmin = (float)minValue; float fmax = (float)maxValue; @@ -152,7 +152,7 @@ int wxSlider::GetMax(void) const return (int)(m_adjust->upper+0.5); }; -void wxSlider::SetPageSize( const int pageSize ) +void wxSlider::SetPageSize( int pageSize ) { float fpage = (float)pageSize; @@ -168,7 +168,7 @@ int wxSlider::GetPageSize(void) const return (int)(m_adjust->page_increment+0.5); }; -void wxSlider::SetThumbLength( const int len ) +void wxSlider::SetThumbLength( int len ) { float flen = (float)len; @@ -184,7 +184,7 @@ int wxSlider::GetThumbLength(void) const return (int)(m_adjust->page_size+0.5); }; -void wxSlider::SetLineSize( const int WXUNUSED(lineSize) ) +void wxSlider::SetLineSize( int WXUNUSED(lineSize) ) { }; @@ -200,7 +200,7 @@ void wxSlider::GetSize( int *x, int *y ) const wxWindow::GetSize( x, y ); }; -void wxSlider::SetSize( const int x, const int y, const int width, const int height, const int sizeFlags ) +void wxSlider::SetSize( int x, int y, int width, int height, int sizeFlags ) { wxWindow::SetSize( x, y, width, height, sizeFlags ); }; @@ -210,11 +210,11 @@ void wxSlider::GetPosition( int *x, int *y ) const wxWindow::GetPosition( x, y ); }; -void wxSlider::SetTick( const int WXUNUSED(tickPos) ) +void wxSlider::SetTick( int WXUNUSED(tickPos) ) { }; -void wxSlider::SetTickFreq( const int WXUNUSED(n), const int WXUNUSED(pos) ) +void wxSlider::SetTickFreq( int WXUNUSED(n), int WXUNUSED(pos) ) { }; @@ -227,7 +227,7 @@ void wxSlider::ClearTicks(void) { }; -void wxSlider::SetSelection( const int WXUNUSED(minPos), const int WXUNUSED(maxPos) ) +void wxSlider::SetSelection( int WXUNUSED(minPos), int WXUNUSED(maxPos) ) { }; diff --git a/src/gtk/statbmp.cpp b/src/gtk/statbmp.cpp index 9b8d050d61..5a35eb6156 100644 --- a/src/gtk/statbmp.cpp +++ b/src/gtk/statbmp.cpp @@ -26,14 +26,14 @@ wxStaticBitmap::wxStaticBitmap(void) wxStaticBitmap::wxStaticBitmap( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { Create( parent, id, bitmap, pos, size, style, name ); }; bool wxStaticBitmap::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { m_needParent = TRUE; diff --git a/src/gtk/statbox.cpp b/src/gtk/statbox.cpp index f07862fa34..319fe3ac93 100644 --- a/src/gtk/statbox.cpp +++ b/src/gtk/statbox.cpp @@ -26,14 +26,14 @@ wxStaticBox::wxStaticBox(void) wxStaticBox::wxStaticBox( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { Create( parent, id, label, pos, size, style, name ); }; bool wxStaticBox::Create( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { m_needParent = TRUE; diff --git a/src/gtk/stattext.cpp b/src/gtk/stattext.cpp index 6f931be64a..752196f455 100644 --- a/src/gtk/stattext.cpp +++ b/src/gtk/stattext.cpp @@ -27,14 +27,14 @@ wxStaticText::wxStaticText(void) wxStaticText::wxStaticText( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { Create( parent, id, label, pos, size, style, name ); }; bool wxStaticText::Create( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { m_needParent = TRUE; diff --git a/src/gtk/tbargtk.cpp b/src/gtk/tbargtk.cpp index 628b35c69d..611995d467 100644 --- a/src/gtk/tbargtk.cpp +++ b/src/gtk/tbargtk.cpp @@ -21,9 +21,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxToolBarTool,wxObject) -wxToolBarTool::wxToolBarTool( wxToolBarGTK *owner, const int theIndex, - const wxBitmap& bitmap1, const wxBitmap& bitmap2, - const bool toggle, wxObject *clientData, +wxToolBarTool::wxToolBarTool( wxToolBarGTK *owner, int theIndex, + const wxBitmap& bitmap1, const wxBitmap& bitmap2, + bool toggle, wxObject *clientData, const wxString& shortHelpString, const wxString& longHelpString ) { m_owner = owner; @@ -68,9 +68,9 @@ wxToolBarGTK::wxToolBarGTK(void) { }; -wxToolBarGTK::wxToolBarGTK( wxWindow *parent, const wxWindowID id, +wxToolBarGTK::wxToolBarGTK( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - const long style, const wxString& name ) + long style, const wxString& name ) { Create( parent, id, pos, size, style, name ); }; @@ -79,9 +79,9 @@ wxToolBarGTK::~wxToolBarGTK(void) { }; -bool wxToolBarGTK::Create( wxWindow *parent, const wxWindowID id, +bool wxToolBarGTK::Create( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - const long style, const wxString& name ) + long style, const wxString& name ) { m_needParent = TRUE; @@ -131,9 +131,9 @@ void wxToolBarGTK::OnMouseEnter( int toolIndex ) GetEventHandler()->ProcessEvent(event); }; -wxToolBarTool *wxToolBarGTK::AddTool( const int toolIndex, const wxBitmap& bitmap, - const wxBitmap& pushedBitmap, const bool toggle, - const float WXUNUSED(xPos), const float WXUNUSED(yPos), wxObject *clientData, +wxToolBarTool *wxToolBarGTK::AddTool( int toolIndex, const wxBitmap& bitmap, + const wxBitmap& pushedBitmap, bool toggle, + float WXUNUSED(xPos), float WXUNUSED(yPos), wxObject *clientData, const wxString& helpString1, const wxString& helpString2 ) { if (!bitmap.Ok()) return NULL; @@ -169,39 +169,39 @@ void wxToolBarGTK::ClearTools(void) { }; -void wxToolBarGTK::EnableTool(const int toolIndex, const bool enable) +void wxToolBarGTK::EnableTool(int toolIndex, bool enable) { }; -void wxToolBarGTK::ToggleTool(const int toolIndex, const bool toggle) +void wxToolBarGTK::ToggleTool(int toolIndex, bool toggle) { }; -void wxToolBarGTK::SetToggle(const int toolIndex, const bool toggle) +void wxToolBarGTK::SetToggle(int toolIndex, bool toggle) { }; -wxObject *wxToolBarGTK::GetToolClientData(const int index) const +wxObject *wxToolBarGTK::GetToolClientData(int index) const { }; -bool wxToolBarGTK::GetToolState(const int toolIndex) const +bool wxToolBarGTK::GetToolState(int toolIndex) const { }; -bool wxToolBarGTK::GetToolEnabled(const int toolIndex) const +bool wxToolBarGTK::GetToolEnabled(int toolIndex) const { }; -void wxToolBarGTK::SetMargins(const int x, const int y) +void wxToolBarGTK::SetMargins(int x, int y) { }; -void wxToolBarGTK::SetToolPacking(const int packing) +void wxToolBarGTK::SetToolPacking(int packing) { }; -void wxToolBarGTK::SetToolSeparation(const int separation) +void wxToolBarGTK::SetToolSeparation(int separation) { }; diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index 86f84cd40d..86eef711a7 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -36,17 +36,17 @@ wxTextCtrl::wxTextCtrl(void) : streambuf() m_modified = FALSE; }; -wxTextCtrl::wxTextCtrl( wxWindow *parent, const wxWindowID id, const wxString &value, +wxTextCtrl::wxTextCtrl( wxWindow *parent, wxWindowID id, const wxString &value, const wxPoint &pos, const wxSize &size, - const int style, const wxString &name ) : streambuf() + int style, const wxString &name ) : streambuf() { m_modified = FALSE; Create( parent, id, value, pos, size, style, name ); }; -bool wxTextCtrl::Create( wxWindow *parent, const wxWindowID id, const wxString &value, +bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value, const wxPoint &pos, const wxSize &size, - const int style, const wxString &name ) + int style, const wxString &name ) { m_needParent = TRUE; @@ -160,7 +160,7 @@ void wxTextCtrl::DiscardEdits(void) }; /* -wxString wxTextCtrl::GetLineText( const long lineNo ) const +wxString wxTextCtrl::GetLineText( long lineNo ) const { }; @@ -169,11 +169,11 @@ void wxTextCtrl::OnDropFiles( wxDropFilesEvent &event ) { }; -long wxTextCtrl::PositionToXY( const long pos, long *x, long *y ) const +long wxTextCtrl::PositionToXY( long pos, long *x, long *y ) const { }; -long wxTextCtrl::XYToPosition( const long x, const long y ) +long wxTextCtrl::XYToPosition( long x, long y ) { }; @@ -182,7 +182,7 @@ int wxTextCtrl::GetNumberOfLines(void) }; */ -void wxTextCtrl::SetInsertionPoint( const long pos ) +void wxTextCtrl::SetInsertionPoint( long pos ) { int tmp = (int) pos; if (m_windowStyle & wxTE_MULTILINE) @@ -201,7 +201,7 @@ void wxTextCtrl::SetInsertionPointEnd(void) SetInsertionPoint( pos-1 ); }; -void wxTextCtrl::SetEditable( const bool editable ) +void wxTextCtrl::SetEditable( bool editable ) { if (m_windowStyle & wxTE_MULTILINE) gtk_text_set_editable( GTK_TEXT(m_widget), editable ); @@ -209,12 +209,12 @@ void wxTextCtrl::SetEditable( const bool editable ) gtk_entry_set_editable( GTK_ENTRY(m_widget), editable ); }; -void wxTextCtrl::SetSelection( const long from, const long to ) +void wxTextCtrl::SetSelection( long from, long to ) { gtk_editable_select_region( GTK_EDITABLE(m_widget), (gint)from, (gint)to ); }; -void wxTextCtrl::ShowPosition( const long WXUNUSED(pos) ) +void wxTextCtrl::ShowPosition( long WXUNUSED(pos) ) { wxFAIL_MSG("wxTextCtrl::ShowPosition not implemented"); }; @@ -234,12 +234,12 @@ long wxTextCtrl::GetLastPosition(void) const return (long)pos-1; }; -void wxTextCtrl::Remove( const long from, const long to ) +void wxTextCtrl::Remove( long from, long to ) { gtk_editable_delete_text( GTK_EDITABLE(m_widget), (gint)from, (gint)to ); }; -void wxTextCtrl::Replace( const long from, const long to, const wxString &value ) +void wxTextCtrl::Replace( long from, long to, const wxString &value ) { gtk_editable_delete_text( GTK_EDITABLE(m_widget), (gint)from, (gint)to ); if (value.IsNull()) return; @@ -378,7 +378,7 @@ wxTextCtrl& wxTextCtrl::operator<<(const wxString& s) return *this; } -wxTextCtrl& wxTextCtrl::operator<<(const float f) +wxTextCtrl& wxTextCtrl::operator<<(float f) { static char buf[100]; sprintf(buf, "%.2f", f); @@ -386,7 +386,7 @@ wxTextCtrl& wxTextCtrl::operator<<(const float f) return *this; } -wxTextCtrl& wxTextCtrl::operator<<(const double d) +wxTextCtrl& wxTextCtrl::operator<<(double d) { static char buf[100]; sprintf(buf, "%.2f", d); @@ -394,7 +394,7 @@ wxTextCtrl& wxTextCtrl::operator<<(const double d) return *this; } -wxTextCtrl& wxTextCtrl::operator<<(const int i) +wxTextCtrl& wxTextCtrl::operator<<(int i) { static char buf[100]; sprintf(buf, "%i", i); @@ -402,7 +402,7 @@ wxTextCtrl& wxTextCtrl::operator<<(const int i) return *this; } -wxTextCtrl& wxTextCtrl::operator<<(const long i) +wxTextCtrl& wxTextCtrl::operator<<(long i) { static char buf[100]; sprintf(buf, "%ld", i); diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 4c9708ee27..26f5f1b989 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -724,16 +724,16 @@ wxWindow::wxWindow() m_pDropTarget = NULL; }; -wxWindow::wxWindow( wxWindow *parent, const wxWindowID id, - const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) +wxWindow::wxWindow( wxWindow *parent, wxWindowID id, + const wxPoint &pos, const wxSize &size, + long style, const wxString &name ) { Create( parent, id, pos, size, style, name ); }; -bool wxWindow::Create( wxWindow *parent, const wxWindowID id, - const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) +bool wxWindow::Create( wxWindow *parent, wxWindowID id, + const wxPoint &pos, const wxSize &size, + long style, const wxString &name ) { m_isShown = FALSE; m_isEnabled = TRUE; @@ -869,9 +869,9 @@ wxWindow::~wxWindow(void) }; -void wxWindow::PreCreation( wxWindow *parent, const wxWindowID id, - const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) +void wxWindow::PreCreation( wxWindow *parent, wxWindowID id, + const wxPoint &pos, const wxSize &size, + long style, const wxString &name ) { if (m_needParent && (parent == NULL)) wxFatalError( "Need complete parent.", name ); @@ -997,7 +997,7 @@ bool wxWindow::HasVMT(void) return m_hasVMT; }; -bool wxWindow::Close( const bool force ) +bool wxWindow::Close( bool force ) { wxCloseEvent event(wxEVT_CLOSE_WINDOW, m_windowId); event.SetEventObject(this); @@ -1049,7 +1049,7 @@ void wxWindow::ImplementSetPosition(void) gtk_widget_set_uposition( m_widget, m_x, m_y ); }; -void wxWindow::SetSize( const int x, const int y, const int width, const int height, const int sizeFlags ) +void wxWindow::SetSize( int x, int y, int width, int height, int sizeFlags ) { int newX = x; int newY = y; @@ -1093,12 +1093,12 @@ void wxWindow::SetSize( const int x, const int y, const int width, const int hei ProcessEvent( event ); }; -void wxWindow::SetSize( const int width, const int height ) +void wxWindow::SetSize( int width, int height ) { SetSize( -1, -1, width, height, wxSIZE_USE_EXISTING ); }; -void wxWindow::Move( const int x, const int y ) +void wxWindow::Move( int x, int y ) { SetSize( x, y, -1, -1, wxSIZE_USE_EXISTING ); }; @@ -1109,7 +1109,7 @@ void wxWindow::GetSize( int *width, int *height ) const (*height) = m_height; }; -void wxWindow::SetClientSize( const int width, const int height ) +void wxWindow::SetClientSize( int width, int height ) { if (!m_wxwindow) { @@ -1287,7 +1287,7 @@ void wxWindow::ScreenToClient( int *x, int *y ) if (y) *y -= org_y; }; -void wxWindow::Centre( const int direction ) +void wxWindow::Centre( int direction ) { int x = 0; int y = 0; @@ -1338,7 +1338,7 @@ void wxWindow::OnSize( wxSizeEvent &WXUNUSED(event) ) if (GetAutoLayout()) Layout(); }; -bool wxWindow::Show( const bool show ) +bool wxWindow::Show( bool show ) { if (show) gtk_widget_show( m_widget ); @@ -1348,14 +1348,14 @@ bool wxWindow::Show( const bool show ) return TRUE; }; -void wxWindow::Enable( const bool enable ) +void wxWindow::Enable( bool enable ) { m_isEnabled = enable; gtk_widget_set_sensitive( m_widget, enable ); if (m_wxwindow) gtk_widget_set_sensitive( m_wxwindow, enable ); }; -void wxWindow::MakeModal( const bool modal ) +void wxWindow::MakeModal( bool modal ) { return; // Disable all other windows @@ -1508,7 +1508,7 @@ void wxWindow::SetCursor( const wxCursor &cursor ) gdk_window_set_cursor( m_wxwindow->window, m_cursor->GetCursor() ); }; -void wxWindow::Refresh( const bool eraseBackground, const wxRect *rect ) +void wxWindow::Refresh( bool eraseBackground, const wxRect *rect ) { if (eraseBackground && m_wxwindow && m_wxwindow->window) { @@ -1557,12 +1557,12 @@ void wxWindow::Refresh( const bool eraseBackground, const wxRect *rect ) }; }; -bool wxWindow::IsExposed( const long x, const long y ) +bool wxWindow::IsExposed( long x, long y ) { return (m_updateRegion.Contains( x, y ) != wxOutRegion ); }; -bool wxWindow::IsExposed( const long x, const long y, const long width, const long height ) +bool wxWindow::IsExposed( long x, long y, long width, long height ) { return (m_updateRegion.Contains( x, y, width, height ) != wxOutRegion ); }; @@ -1749,7 +1749,7 @@ bool wxWindow::IsRetained(void) return FALSE; }; -wxWindow *wxWindow::FindWindow( const long id ) +wxWindow *wxWindow::FindWindow( long id ) { if (id == m_windowId) return this; wxNode *node = m_children.First(); @@ -1777,8 +1777,8 @@ wxWindow *wxWindow::FindWindow( const wxString& name ) return NULL; }; -void wxWindow::SetScrollbar( const int orient, const int pos, const int thumbVisible, - const int range, const bool WXUNUSED(refresh) ) +void wxWindow::SetScrollbar( int orient, int pos, int thumbVisible, + int range, bool WXUNUSED(refresh) ) { if (!m_wxwindow) return; @@ -1832,7 +1832,7 @@ void wxWindow::SetScrollbar( const int orient, const int pos, const int thumbVis }; }; -void wxWindow::SetScrollPos( const int orient, const int pos, const bool WXUNUSED(refresh) ) +void wxWindow::SetScrollPos( int orient, int pos, bool WXUNUSED(refresh) ) { if (!m_wxwindow) return; @@ -1861,7 +1861,7 @@ void wxWindow::SetScrollPos( const int orient, const int pos, const bool WXUNUSE }; }; -int wxWindow::GetScrollThumb( const int orient ) const +int wxWindow::GetScrollThumb( int orient ) const { if (!m_wxwindow) return 0; @@ -1871,7 +1871,7 @@ int wxWindow::GetScrollThumb( const int orient ) const return (int)(m_vAdjust->page_size+0.5); }; -int wxWindow::GetScrollPos( const int orient ) const +int wxWindow::GetScrollPos( int orient ) const { if (!m_wxwindow) return 0; @@ -1881,7 +1881,7 @@ int wxWindow::GetScrollPos( const int orient ) const return (int)(m_vAdjust->value+0.5); }; -int wxWindow::GetScrollRange( const int orient ) const +int wxWindow::GetScrollRange( int orient ) const { if (!m_wxwindow) return 0; @@ -1891,7 +1891,7 @@ int wxWindow::GetScrollRange( const int orient ) const return (int)(m_vAdjust->upper+0.5); }; -void wxWindow::ScrollWindow( const int dx, const int dy, const wxRect* WXUNUSED(rect) ) +void wxWindow::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) ) { if (!m_wxwindow) return; @@ -1985,7 +1985,7 @@ void wxWindow::SetConstraints( wxLayoutConstraints *constraints ) } ; -void wxWindow::SetAutoLayout( const bool autoLayout ) +void wxWindow::SetAutoLayout( bool autoLayout ) { m_autoLayout = autoLayout; }; @@ -2153,7 +2153,7 @@ bool wxWindow::LayoutPhase2(int *noChanges) } // Do a phase of evaluating child constraints -bool wxWindow::DoPhase(const int phase) +bool wxWindow::DoPhase(int phase) { int noIterations = 0; int maxIterations = 500; @@ -2221,7 +2221,7 @@ void wxWindow::ResetConstraints(void) // Need to distinguish between setting the 'fake' size for // windows and sizers, and setting the real values. -void wxWindow::SetConstraintSizes(const bool recurse) +void wxWindow::SetConstraintSizes(bool recurse) { wxLayoutConstraints *constr = GetConstraints(); if (constr && constr->left.GetDone() && constr->right.GetDone() && @@ -2294,7 +2294,7 @@ void wxWindow::TransformSizerToActual(int *x, int *y) const *y += yp; } -void wxWindow::SizerSetSize(const int x, const int y, const int w, const int h) +void wxWindow::SizerSetSize(int x, int y, int w, int h) { int xx = x; int yy = y; @@ -2302,7 +2302,7 @@ void wxWindow::SizerSetSize(const int x, const int y, const int w, const int h) SetSize(xx, yy, w, h); } -void wxWindow::SizerMove(const int x, const int y) +void wxWindow::SizerMove(int x, int y) { int xx = x; int yy = y; @@ -2311,7 +2311,7 @@ void wxWindow::SizerMove(const int x, const int y) } // Only set the size/position of the constraint (if any) -void wxWindow::SetSizeConstraint(const int x, const int y, const int w, const int h) +void wxWindow::SetSizeConstraint(int x, int y, int w, int h) { wxLayoutConstraints *constr = GetConstraints(); if (constr) @@ -2339,7 +2339,7 @@ void wxWindow::SetSizeConstraint(const int x, const int y, const int w, const in } } -void wxWindow::MoveConstraint(const int x, const int y) +void wxWindow::MoveConstraint(int x, int y) { wxLayoutConstraints *constr = GetConstraints(); if (constr) diff --git a/src/gtk1/bitmap.cpp b/src/gtk1/bitmap.cpp index 845a1fcf00..eb09743ab8 100644 --- a/src/gtk1/bitmap.cpp +++ b/src/gtk1/bitmap.cpp @@ -34,7 +34,7 @@ wxMask::wxMask( const wxBitmap& WXUNUSED(bitmap), const wxColour& WXUNUSED(colou { }; -wxMask::wxMask( const wxBitmap& WXUNUSED(bitmap), const int WXUNUSED(paletteIndex) ) +wxMask::wxMask( const wxBitmap& WXUNUSED(bitmap), int WXUNUSED(paletteIndex) ) { }; @@ -111,7 +111,7 @@ wxBitmap::wxBitmap(void) if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); }; -wxBitmap::wxBitmap( const int width, const int height, const int depth ) +wxBitmap::wxBitmap( int width, int height, int depth ) { m_refData = new wxBitmapRefData(); M_BMPDATA->m_mask = NULL; @@ -163,13 +163,13 @@ wxBitmap::wxBitmap( const wxBitmap* bmp ) if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); }; -wxBitmap::wxBitmap( const wxString &filename, const int type ) +wxBitmap::wxBitmap( const wxString &filename, int type ) { LoadFile( filename, type ); }; // CMB 15/5/98: add constructor for xbm bitmaps -wxBitmap::wxBitmap( const char bits[], const int width, const int height, const int WXUNUSED(depth)) +wxBitmap::wxBitmap( const char bits[], int width, int height, int WXUNUSED(depth)) { m_refData = new wxBitmapRefData(); @@ -227,19 +227,19 @@ int wxBitmap::GetDepth(void) const return M_BMPDATA->m_bpp; }; -void wxBitmap::SetHeight( const int height ) +void wxBitmap::SetHeight( int height ) { if (!Ok()) return; M_BMPDATA->m_height = height; }; -void wxBitmap::SetWidth( const int width ) +void wxBitmap::SetWidth( int width ) { if (!Ok()) return; M_BMPDATA->m_width = width; }; -void wxBitmap::SetDepth( const int depth ) +void wxBitmap::SetDepth( int depth ) { if (!Ok()) return; M_BMPDATA->m_bpp = depth; @@ -258,13 +258,13 @@ void wxBitmap::SetMask( wxMask *mask ) M_BMPDATA->m_mask = mask; }; -bool wxBitmap::SaveFile( const wxString &WXUNUSED(name), const int WXUNUSED(type), +bool wxBitmap::SaveFile( const wxString &WXUNUSED(name), int WXUNUSED(type), wxPalette *WXUNUSED(palette) ) { return FALSE; }; -bool wxBitmap::LoadFile( const wxString &name, const int WXUNUSED(type) ) +bool wxBitmap::LoadFile( const wxString &name, int WXUNUSED(type) ) { #ifdef USE_GDK_IMLIB diff --git a/src/gtk1/bmpbuttn.cpp b/src/gtk1/bmpbuttn.cpp index 09722663f3..fe0b6ebe1e 100644 --- a/src/gtk1/bmpbuttn.cpp +++ b/src/gtk1/bmpbuttn.cpp @@ -42,14 +42,14 @@ wxBitmapButton::wxBitmapButton(void) wxBitmapButton::wxBitmapButton( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { Create( parent, id, bitmap, pos, size, style, name ); }; bool wxBitmapButton::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { m_needParent = TRUE; diff --git a/src/gtk1/brush.cpp b/src/gtk1/brush.cpp index e8bfb06968..155b0c400b 100644 --- a/src/gtk1/brush.cpp +++ b/src/gtk1/brush.cpp @@ -45,7 +45,7 @@ wxBrush::wxBrush(void) if (wxTheBrushList) wxTheBrushList->AddBrush( this ); }; -wxBrush::wxBrush( const wxColour &colour, const int style ) +wxBrush::wxBrush( const wxColour &colour, int style ) { m_refData = new wxBrushRefData(); M_BRUSHDATA->m_style = style; @@ -54,7 +54,7 @@ wxBrush::wxBrush( const wxColour &colour, const int style ) if (wxTheBrushList) wxTheBrushList->AddBrush( this ); }; -wxBrush::wxBrush( const wxString &colourName, const int style ) +wxBrush::wxBrush( const wxString &colourName, int style ) { m_refData = new wxBrushRefData(); M_BRUSHDATA->m_style = style; diff --git a/src/gtk1/button.cpp b/src/gtk1/button.cpp index d4361f37b8..9c167dc0fb 100644 --- a/src/gtk1/button.cpp +++ b/src/gtk1/button.cpp @@ -42,14 +42,14 @@ wxButton::wxButton(void) wxButton::wxButton( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { Create( parent, id, label, pos, size, style, name ); }; bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { m_needParent = TRUE; diff --git a/src/gtk1/checkbox.cpp b/src/gtk1/checkbox.cpp index 57c712db39..ee3830f361 100644 --- a/src/gtk1/checkbox.cpp +++ b/src/gtk1/checkbox.cpp @@ -38,14 +38,14 @@ wxCheckBox::wxCheckBox(void) wxCheckBox::wxCheckBox( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { Create( parent, id, label, pos, size, style, name ); }; bool wxCheckBox::Create( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { m_needParent = TRUE; @@ -68,7 +68,7 @@ bool wxCheckBox::Create( wxWindow *parent, wxWindowID id, const wxString &label return TRUE; }; -void wxCheckBox::SetValue( const bool state ) +void wxCheckBox::SetValue( bool state ) { if (state) gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(m_widget), GTK_STATE_ACTIVE ); diff --git a/src/gtk1/choice.cpp b/src/gtk1/choice.cpp index 17535c188a..57922091b9 100644 --- a/src/gtk1/choice.cpp +++ b/src/gtk1/choice.cpp @@ -38,18 +38,18 @@ wxChoice::wxChoice(void) { }; -wxChoice::wxChoice( wxWindow *parent, const wxWindowID id, - const wxPoint &pos, const wxSize &size, - const int n, const wxString choices[], - const long style, const wxString &name ) +wxChoice::wxChoice( wxWindow *parent, wxWindowID id, + const wxPoint &pos, const wxSize &size, + int n, const wxString choices[], + long style, const wxString &name ) { Create( parent, id, pos, size, n, choices, style, name ); }; -bool wxChoice::Create( wxWindow *parent, const wxWindowID id, - const wxPoint &pos, const wxSize &size, - const int n, const wxString choices[], - const long style, const wxString &name ) +bool wxChoice::Create( wxWindow *parent, wxWindowID id, + const wxPoint &pos, const wxSize &size, + int n, const wxString choices[], + long style, const wxString &name ) { m_needParent = TRUE; @@ -141,7 +141,7 @@ int wxChoice::GetSelection(void) return -1; }; -wxString wxChoice::GetString( const int n ) const +wxString wxChoice::GetString( int n ) const { GtkMenuShell *menu_shell = GTK_MENU_SHELL( gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ) ); int count = 0; @@ -180,11 +180,11 @@ int wxChoice::Number(void) const return count; }; -void wxChoice::SetColumns( const int WXUNUSED(n) ) +void wxChoice::SetColumns( int WXUNUSED(n) ) { }; -void wxChoice::SetSelection( const int n ) +void wxChoice::SetSelection( int n ) { int tmp = n; gtk_option_menu_set_history( GTK_OPTION_MENU(m_widget), (gint)tmp ); diff --git a/src/gtk1/combobox.cpp b/src/gtk1/combobox.cpp index b3630535a5..5d080a400a 100644 --- a/src/gtk1/combobox.cpp +++ b/src/gtk1/combobox.cpp @@ -32,10 +32,10 @@ void gtk_combo_clicked_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo IMPLEMENT_DYNAMIC_CLASS(wxComboBox,wxControl) -bool wxComboBox::Create(wxWindow *parent, const wxWindowID id, const wxString& value, +bool wxComboBox::Create(wxWindow *parent, wxWindowID id, const wxString& value, const wxPoint& pos, const wxSize& size, - const int n, const wxString choices[], - const long style, const wxString& name ) + int n, const wxString choices[], + long style, const wxString& name ) { m_needParent = TRUE; @@ -97,7 +97,7 @@ void wxComboBox::Append( const wxString &WXUNUSED(item), char* WXUNUSED(clientDa { }; -void wxComboBox::Delete( const int n ) +void wxComboBox::Delete( int n ) { GtkWidget *list = GTK_COMBO(m_widget)->list; gtk_list_clear_items( GTK_LIST(list), n, n ); @@ -120,14 +120,14 @@ int wxComboBox::FindString( const wxString &item ) return -1; }; -char* wxComboBox::GetClientData( const int n ) +char* wxComboBox::GetClientData( int n ) { wxNode *node = m_clientData.Nth( n ); if (node) return (char*)node->Data(); return NULL; }; -void wxComboBox::SetClientData( const int n, char * clientData ) +void wxComboBox::SetClientData( int n, char * clientData ) { wxNode *node = m_clientData.Nth( n ); if (node) node->SetData( (wxObject*) clientData ); @@ -152,7 +152,7 @@ int wxComboBox::GetSelection(void) const return -1; }; -wxString wxComboBox::GetString( const int n ) const +wxString wxComboBox::GetString( int n ) const { GtkWidget *list = GTK_COMBO(m_widget)->list; @@ -190,7 +190,7 @@ int wxComboBox::Number(void) const return count; }; -void wxComboBox::SetSelection( const int n ) +void wxComboBox::SetSelection( int n ) { GtkWidget *list = GTK_COMBO(m_widget)->list; gtk_list_select_item( GTK_LIST(list), n ); @@ -229,7 +229,7 @@ void wxComboBox::Paste(void) gtk_editable_paste_clipboard( GTK_EDITABLE(entry), 0 ); }; -void wxComboBox::SetInsertionPoint( const long pos ) +void wxComboBox::SetInsertionPoint( long pos ) { GtkWidget *entry = GTK_COMBO(m_widget)->entry; int tmp = (int) pos; @@ -256,7 +256,7 @@ long wxComboBox::GetLastPosition(void) const return (long) pos-1; }; -void wxComboBox::Replace( const long from, const long to, const wxString& value ) +void wxComboBox::Replace( long from, long to, const wxString& value ) { GtkWidget *entry = GTK_COMBO(m_widget)->entry; gtk_editable_delete_text( GTK_EDITABLE(entry), (gint)from, (gint)to ); @@ -265,17 +265,17 @@ void wxComboBox::Replace( const long from, const long to, const wxString& value gtk_editable_insert_text( GTK_EDITABLE(entry), value, value.Length(), &pos ); }; -void wxComboBox::Remove(const long from, const long to) +void wxComboBox::Remove(long from, long to) { GtkWidget *entry = GTK_COMBO(m_widget)->entry; gtk_editable_delete_text( GTK_EDITABLE(entry), (gint)from, (gint)to ); }; -void wxComboBox::SetSelection( const long WXUNUSED(from), const long WXUNUSED(to) ) +void wxComboBox::SetSelection( long WXUNUSED(from), long WXUNUSED(to) ) { }; -void wxComboBox::SetEditable( const bool WXUNUSED(editable) ) +void wxComboBox::SetEditable( bool WXUNUSED(editable) ) { }; diff --git a/src/gtk1/control.cpp b/src/gtk1/control.cpp index 510d88d0e9..237f37d89f 100644 --- a/src/gtk1/control.cpp +++ b/src/gtk1/control.cpp @@ -28,7 +28,7 @@ wxControl::wxControl(void) wxControl::wxControl( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) : + long style, const wxString &name ) : wxWindow( parent, id, pos, size, style, name ) { }; diff --git a/src/gtk1/cursor.cpp b/src/gtk1/cursor.cpp index bb0888bdcb..1f84b80f69 100644 --- a/src/gtk1/cursor.cpp +++ b/src/gtk1/cursor.cpp @@ -49,7 +49,7 @@ wxCursor::wxCursor(void) { }; -wxCursor::wxCursor( const int cursorId ) +wxCursor::wxCursor( int cursorId ) { m_refData = new wxCursorRefData(); diff --git a/src/gtk1/dialog.cpp b/src/gtk1/dialog.cpp index 0c63e39f11..1756334f0c 100644 --- a/src/gtk1/dialog.cpp +++ b/src/gtk1/dialog.cpp @@ -57,7 +57,7 @@ wxDialog::wxDialog(void) wxDialog::wxDialog( wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { wxTopLevelWindows.Insert( this ); Create( parent, id, title, pos, size, style, name ); @@ -66,7 +66,7 @@ wxDialog::wxDialog( wxWindow *parent, bool wxDialog::Create( wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { m_needParent = FALSE; @@ -172,7 +172,7 @@ void wxDialog::OnCloseWindow(wxCloseEvent& event) }; }; -bool wxDialog::Show( const bool show ) +bool wxDialog::Show( bool show ) { if (!show && m_modalShowing) { diff --git a/src/gtk1/dnd.cpp b/src/gtk1/dnd.cpp index cca46f3b87..9ba46a6c2c 100644 --- a/src/gtk1/dnd.cpp +++ b/src/gtk1/dnd.cpp @@ -106,7 +106,7 @@ wxDragSource::~wxDragSource(void) g_blockEventsOnDrag = FALSE; }; -void wxDragSource::SetData( char *data, const long size ) +void wxDragSource::SetData( char *data, long size ) { m_size = size; m_data = data; diff --git a/src/gtk1/frame.cpp b/src/gtk1/frame.cpp index f70d0b9f31..ca0e1f012e 100644 --- a/src/gtk1/frame.cpp +++ b/src/gtk1/frame.cpp @@ -80,18 +80,18 @@ wxFrame::wxFrame(void) wxTopLevelWindows.Insert( this ); }; -wxFrame::wxFrame( wxWindow *parent, const wxWindowID id, const wxString &title, - const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) +wxFrame::wxFrame( wxWindow *parent, wxWindowID id, const wxString &title, + const wxPoint &pos, const wxSize &size, + long style, const wxString &name ) { m_sizeSet = FALSE; Create( parent, id, title, pos, size, style, name ); wxTopLevelWindows.Insert( this ); }; -bool wxFrame::Create( wxWindow *parent, const wxWindowID id, const wxString &title, +bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { m_needParent = FALSE; m_mainWindow = NULL; @@ -154,7 +154,7 @@ wxFrame::~wxFrame(void) if (wxTopLevelWindows.Number() == 0) wxTheApp->ExitMainLoop(); }; -bool wxFrame::Show( const bool show ) +bool wxFrame::Show( bool show ) { if (show) { @@ -165,7 +165,7 @@ bool wxFrame::Show( const bool show ) return wxWindow::Show( show ); }; -void wxFrame::Enable( const bool enable ) +void wxFrame::Enable( bool enable ) { wxWindow::Enable( enable ); gtk_widget_set_sensitive( m_mainWindow, enable ); @@ -309,7 +309,7 @@ void wxFrame::SetMenuBar( wxMenuBar *menuBar ) m_frameMenuBar->m_widget, m_frameMenuBar->m_x, m_frameMenuBar->m_y ); }; -bool wxFrame::CreateStatusBar( const int number ) +bool wxFrame::CreateStatusBar( int number ) { if (m_frameStatusBar) delete m_frameStatusBar; @@ -320,12 +320,12 @@ bool wxFrame::CreateStatusBar( const int number ) return TRUE; }; -void wxFrame::SetStatusText( const wxString &text, const int number ) +void wxFrame::SetStatusText( const wxString &text, int number ) { if (m_frameStatusBar) m_frameStatusBar->SetStatusText( text, number ); }; -void wxFrame::SetStatusWidths( const int n, const int *width ) +void wxFrame::SetStatusWidths( int n, int *width ) { if (m_frameStatusBar) m_frameStatusBar->SetStatusWidths( n, width ); }; diff --git a/src/gtk1/gauge.cpp b/src/gtk1/gauge.cpp index bd679ff044..786bdac7b0 100644 --- a/src/gtk1/gauge.cpp +++ b/src/gtk1/gauge.cpp @@ -20,9 +20,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxGauge,wxControl) -bool wxGauge::Create( wxWindow *parent, const wxWindowID id, const int range, +bool wxGauge::Create( wxWindow *parent, wxWindowID id, int range, const wxPoint& pos, const wxSize& size, - const long style, const wxString& name ) + long style, const wxString& name ) { m_needParent = TRUE; @@ -43,7 +43,7 @@ bool wxGauge::Create( wxWindow *parent, const wxWindowID id, const int range, return TRUE; }; -void wxGauge::SetRange( const int r ) +void wxGauge::SetRange( int r ) { m_rangeMax = r; if (m_gaugePos > m_rangeMax) m_gaugePos = m_rangeMax; @@ -51,7 +51,7 @@ void wxGauge::SetRange( const int r ) gtk_progress_bar_update( GTK_PROGRESS_BAR(m_widget), (float)(m_rangeMax/m_gaugePos) ); }; -void wxGauge::SetValue( const int pos ) +void wxGauge::SetValue( int pos ) { m_gaugePos = pos; if (m_gaugePos > m_rangeMax) m_gaugePos = m_rangeMax; diff --git a/src/gtk1/listbox.cpp b/src/gtk1/listbox.cpp index 8c927d8210..58842aa9c5 100644 --- a/src/gtk1/listbox.cpp +++ b/src/gtk1/listbox.cpp @@ -49,16 +49,16 @@ wxListBox::wxListBox(void) wxListBox::wxListBox( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, - const int n, const wxString choices[], - const long style, const wxString &name ) + int n, const wxString choices[], + long style, const wxString &name ) { Create( parent, id, pos, size, n, choices, style, name ); }; bool wxListBox::Create( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, - const int n, const wxString choices[], - const long style, const wxString &name ) + int n, const wxString choices[], + long style, const wxString &name ) { m_needParent = TRUE; @@ -150,7 +150,7 @@ int wxListBox::FindString( const wxString &item ) const return -1; }; -char *wxListBox::GetClientData( const int WXUNUSED(n) ) const +char *wxListBox::GetClientData( int WXUNUSED(n) ) const { wxFAIL_MSG("wxListBox::GetClientData not implemented"); @@ -231,7 +231,7 @@ int wxListBox::Number(void) return count; }; -bool wxListBox::Selected( const int n ) +bool wxListBox::Selected( int n ) { GList *target = g_list_nth( m_list->children, n ); if (target) @@ -246,11 +246,11 @@ bool wxListBox::Selected( const int n ) return FALSE; }; -void wxListBox::Set( const int WXUNUSED(n), const wxString *WXUNUSED(choices) ) +void wxListBox::Set( int WXUNUSED(n), const wxString *WXUNUSED(choices) ) { }; -void wxListBox::SetClientData( const int WXUNUSED(n), char *WXUNUSED(clientData) ) +void wxListBox::SetClientData( int WXUNUSED(n), char *WXUNUSED(clientData) ) { }; @@ -262,7 +262,7 @@ void wxListBox::SetFirstItem( const wxString &WXUNUSED(item) ) { }; -void wxListBox::SetSelection( const int n, const bool select ) +void wxListBox::SetSelection( int n, bool select ) { if (select) gtk_list_select_item( m_list, n ); @@ -270,11 +270,11 @@ void wxListBox::SetSelection( const int n, const bool select ) gtk_list_unselect_item( m_list, n ); }; -void wxListBox::SetString( const int WXUNUSED(n), const wxString &WXUNUSED(string) ) +void wxListBox::SetString( int WXUNUSED(n), const wxString &WXUNUSED(string) ) { }; -void wxListBox::SetStringSelection( const wxString &string, const bool select ) +void wxListBox::SetStringSelection( const wxString &string, bool select ) { SetSelection( FindString(string), select ); }; diff --git a/src/gtk1/mdi.cpp b/src/gtk1/mdi.cpp index 3ec3c31969..f82bf73350 100644 --- a/src/gtk1/mdi.cpp +++ b/src/gtk1/mdi.cpp @@ -28,9 +28,9 @@ wxMDIParentFrame::wxMDIParentFrame(void) }; wxMDIParentFrame::wxMDIParentFrame( wxWindow *parent, - const wxWindowID id, const wxString& title, + wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, - const long style, const wxString& name ) + long style, const wxString& name ) { m_clientWindow = NULL; m_currentChild = NULL; @@ -43,9 +43,9 @@ wxMDIParentFrame::~wxMDIParentFrame(void) }; bool wxMDIParentFrame::Create( wxWindow *parent, - const wxWindowID id, const wxString& title, + wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, - const long style, const wxString& name ) + long style, const wxString& name ) { wxFrame::Create( parent, id, title, pos, size, style, name ); @@ -112,9 +112,9 @@ wxMDIChildFrame::wxMDIChildFrame(void) }; wxMDIChildFrame::wxMDIChildFrame( wxMDIParentFrame *parent, - const wxWindowID id, const wxString& title, + wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, - const long style, const wxString& name ) + long style, const wxString& name ) { Create( parent, id, title, pos, size, style, name ); }; @@ -124,9 +124,9 @@ wxMDIChildFrame::~wxMDIChildFrame(void) }; bool wxMDIChildFrame::Create( wxMDIParentFrame *parent, - const wxWindowID id, const wxString& title, + wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, - const long style, const wxString& name ) + long style, const wxString& name ) { m_title = title; return wxPanel::Create( parent->GetClientWindow(), id, pos, size, style, name ); @@ -150,7 +150,7 @@ wxMDIClientWindow::wxMDIClientWindow(void) { }; -wxMDIClientWindow::wxMDIClientWindow( wxMDIParentFrame *parent, const long style ) +wxMDIClientWindow::wxMDIClientWindow( wxMDIParentFrame *parent, long style ) { CreateClient( parent, style ); }; @@ -159,7 +159,7 @@ wxMDIClientWindow::~wxMDIClientWindow(void) { }; -bool wxMDIClientWindow::CreateClient( wxMDIParentFrame *parent, const long style ) +bool wxMDIClientWindow::CreateClient( wxMDIParentFrame *parent, long style ) { m_needParent = TRUE; diff --git a/src/gtk1/menu.cpp b/src/gtk1/menu.cpp index 5db3904638..6df21c5987 100644 --- a/src/gtk1/menu.cpp +++ b/src/gtk1/menu.cpp @@ -148,7 +148,7 @@ void wxMenu::AppendSeparator(void) m_items.Append( mitem ); }; -void wxMenu::Append( const int id, const wxString &item, const wxString &helpStr, const bool checkable ) +void wxMenu::Append( int id, const wxString &item, const wxString &helpStr, bool checkable ) { wxMenuItem *mitem = new wxMenuItem(); mitem->m_id = id; @@ -176,7 +176,7 @@ void wxMenu::Append( const int id, const wxString &item, const wxString &helpStr m_items.Append( mitem ); }; -void wxMenu::Append( const int id, const wxString &item, wxMenu *subMenu, const wxString &helpStr ) +void wxMenu::Append( int id, const wxString &item, wxMenu *subMenu, const wxString &helpStr ) { wxMenuItem *mitem = new wxMenuItem(); mitem->m_id = id; @@ -219,7 +219,7 @@ int wxMenu::FindItem( const wxString itemString ) const return -1; }; -void wxMenu::Enable( const int id, const bool enable ) +void wxMenu::Enable( int id, bool enable ) { wxNode *node = m_items.First(); while (node) @@ -234,7 +234,7 @@ void wxMenu::Enable( const int id, const bool enable ) }; }; -bool wxMenu::Enabled( const int id ) const +bool wxMenu::Enabled( int id ) const { wxNode *node = m_items.First(); while (node) @@ -246,7 +246,7 @@ bool wxMenu::Enabled( const int id ) const return FALSE; }; -void wxMenu::SetLabel( const int id, const wxString &label ) +void wxMenu::SetLabel( int id, const wxString &label ) { wxString s( label ); size_t pos; diff --git a/src/gtk1/notebook.cpp b/src/gtk1/notebook.cpp index 0c0f939051..eb1ac6d1b5 100644 --- a/src/gtk1/notebook.cpp +++ b/src/gtk1/notebook.cpp @@ -89,9 +89,9 @@ wxNotebook::wxNotebook() Init(); }; -wxNotebook::wxNotebook( wxWindow *parent, const wxWindowID id, +wxNotebook::wxNotebook( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - const long style, const wxString& name ) + long style, const wxString& name ) { Init(); Create( parent, id, pos, size, style, name ); @@ -108,9 +108,9 @@ wxNotebook::~wxNotebook() DeleteAllPages(); }; -bool wxNotebook::Create(wxWindow *parent, const wxWindowID id, +bool wxNotebook::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - const long style, const wxString& name ) + long style, const wxString& name ) { m_needParent = TRUE; @@ -253,7 +253,7 @@ bool wxNotebook::SetPageText( int page, const wxString &text ) return TRUE; }; -bool wxNotebook::SetPageImage( int page, const int image ) +bool wxNotebook::SetPageImage( int page, int image ) { wxNotebookPage* nb_page = GetNotebookPage(page); if (!nb_page) diff --git a/src/gtk1/palette.cpp b/src/gtk1/palette.cpp index 162fb0effe..78cdfe5aed 100644 --- a/src/gtk1/palette.cpp +++ b/src/gtk1/palette.cpp @@ -49,7 +49,7 @@ wxPalette::wxPalette(void) { }; -wxPalette::wxPalette( const int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue ) +wxPalette::wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue ) { m_refData = new wxPaletteRefData(); Create( n, red, green, blue ); @@ -92,7 +92,7 @@ bool wxPalette::Ok(void) const return (m_refData); }; -bool wxPalette::Create( const int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue) +bool wxPalette::Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue) { }; @@ -100,7 +100,7 @@ int wxPalette::GetPixel( const unsigned char red, const unsigned char green, con { }; -bool wxPalette::GetRGB( const int pixel, unsigned char *red, unsigned char *green, unsigned char *blue ) const +bool wxPalette::GetRGB( int pixel, unsigned char *red, unsigned char *green, unsigned char *blue ) const { }; diff --git a/src/gtk1/pen.cpp b/src/gtk1/pen.cpp index 663f7ad3db..7ed7be02a7 100644 --- a/src/gtk1/pen.cpp +++ b/src/gtk1/pen.cpp @@ -120,7 +120,7 @@ void wxPen::SetColour( const wxString &colourName ) M_PENDATA->m_colour = colourName; }; -void wxPen::SetColour( const int red, const int green, const int blue ) +void wxPen::SetColour( int red, int green, int blue ) { if (!m_refData) m_refData = new wxPenRefData(); diff --git a/src/gtk1/radiobox.cpp b/src/gtk1/radiobox.cpp index 5e83994194..c449676506 100644 --- a/src/gtk1/radiobox.cpp +++ b/src/gtk1/radiobox.cpp @@ -41,19 +41,19 @@ wxRadioBox::wxRadioBox(void) { }; -wxRadioBox::wxRadioBox( wxWindow *parent, const wxWindowID id, const wxString& title, - const wxPoint &pos, const wxSize &size, - const int n, const wxString choices[], - const int majorDim, const long style, +wxRadioBox::wxRadioBox( wxWindow *parent, wxWindowID id, const wxString& title, + const wxPoint &pos, const wxSize &size, + int n, const wxString choices[], + int majorDim, long style, const wxString &name ) { Create( parent, id, title, pos, size, n, choices, majorDim, style, name ); }; -bool wxRadioBox::Create( wxWindow *parent, const wxWindowID id, const wxString& title, - const wxPoint &pos, const wxSize &size, - const int n, const wxString choices[], - const int WXUNUSED(majorDim), const long style, +bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title, + const wxPoint &pos, const wxSize &size, + int n, const wxString choices[], + int WXUNUSED(majorDim), long style, const wxString &name ) { m_needParent = TRUE; @@ -108,7 +108,7 @@ bool wxRadioBox::Create( wxWindow *parent, const wxWindowID id, const wxString& return TRUE; }; -bool wxRadioBox::Show( const bool show ) +bool wxRadioBox::Show( bool show ) { wxWindow::Show( show ); @@ -128,7 +128,7 @@ int wxRadioBox::FindString( const wxString& WXUNUSED(s) ) const return 0; }; -void wxRadioBox::SetSelection( const int WXUNUSED(n) ) +void wxRadioBox::SetSelection( int WXUNUSED(n) ) { }; @@ -146,7 +146,7 @@ int wxRadioBox::GetSelection(void) const return -1; }; -wxString wxRadioBox::GetString( const int WXUNUSED(n) ) const +wxString wxRadioBox::GetString( int WXUNUSED(n) ) const { return ""; }; @@ -160,28 +160,28 @@ void wxRadioBox::SetLabel( const wxString& WXUNUSED(label) ) { }; -void wxRadioBox::SetLabel( const int WXUNUSED(item), const wxString& WXUNUSED(label) ) +void wxRadioBox::SetLabel( int WXUNUSED(item), const wxString& WXUNUSED(label) ) { }; -void wxRadioBox::SetLabel( const int WXUNUSED(item), wxBitmap *WXUNUSED(bitmap) ) +void wxRadioBox::SetLabel( int WXUNUSED(item), wxBitmap *WXUNUSED(bitmap) ) { }; -wxString wxRadioBox::GetLabel( const int WXUNUSED(item) ) const +wxString wxRadioBox::GetLabel( int WXUNUSED(item) ) const { return ""; }; -void wxRadioBox::Enable( const bool WXUNUSED(enable) ) +void wxRadioBox::Enable( bool WXUNUSED(enable) ) { }; -void wxRadioBox::Enable( const int WXUNUSED(item), const bool WXUNUSED(enable) ) +void wxRadioBox::Enable( int WXUNUSED(item), bool WXUNUSED(enable) ) { }; -void wxRadioBox::Show( const int WXUNUSED(item), const bool WXUNUSED(show) ) +void wxRadioBox::Show( int WXUNUSED(item), bool WXUNUSED(show) ) { }; @@ -223,7 +223,7 @@ int wxRadioBox::GetNumberOfRowsOrCols(void) const return 1; }; -void wxRadioBox::SetNumberOfRowsOrCols( const int WXUNUSED(n) ) +void wxRadioBox::SetNumberOfRowsOrCols( int WXUNUSED(n) ) { }; diff --git a/src/gtk1/scrolbar.cpp b/src/gtk1/scrolbar.cpp index 9a0098b3bd..bcfece5c27 100644 --- a/src/gtk1/scrolbar.cpp +++ b/src/gtk1/scrolbar.cpp @@ -63,9 +63,9 @@ void gtk_scrollbar_callback( GtkWidget *WXUNUSED(widget), wxScrollBar *win ) IMPLEMENT_DYNAMIC_CLASS(wxScrollBar,wxControl) -wxScrollBar::wxScrollBar(wxWindow *parent, const wxWindowID id, +wxScrollBar::wxScrollBar(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - const long style, const wxString& name ) + long style, const wxString& name ) { Create( parent, id, pos, size, style, name ); }; @@ -74,9 +74,9 @@ wxScrollBar::~wxScrollBar(void) { }; -bool wxScrollBar::Create(wxWindow *parent, const wxWindowID id, +bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - const long style, const wxString& name ) + long style, const wxString& name ) { m_needParent = TRUE; @@ -121,7 +121,7 @@ int wxScrollBar::GetRange() const return (int)(m_adjust->upper+0.5); }; -void wxScrollBar::SetPosition( const int viewStart ) +void wxScrollBar::SetPosition( int viewStart ) { float fpos = (float)viewStart; m_oldPos = fpos; @@ -131,8 +131,8 @@ void wxScrollBar::SetPosition( const int viewStart ) gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "value_changed" ); }; -void wxScrollBar::SetScrollbar( const int position, const int thumbSize, const int range, const int pageSize, - const bool WXUNUSED(refresh) ) +void wxScrollBar::SetScrollbar( int position, int thumbSize, int range, int pageSize, + bool WXUNUSED(refresh) ) { float fpos = (float)position; m_oldPos = fpos; @@ -162,7 +162,7 @@ int wxScrollBar::GetValue(void) const return GetPosition(); }; -void wxScrollBar::SetValue( const int viewStart ) +void wxScrollBar::SetValue( int viewStart ) { SetPosition( viewStart ); }; @@ -190,7 +190,7 @@ int wxScrollBar::GetObjectLength() const return (int)(m_adjust->page_size+0.5); }; -void wxScrollBar::SetPageSize( const int pageLength ) +void wxScrollBar::SetPageSize( int pageLength ) { int pos = (int)(m_adjust->value+0.5); int thumb = (int)(m_adjust->page_size+0.5); @@ -198,7 +198,7 @@ void wxScrollBar::SetPageSize( const int pageLength ) SetScrollbar( pos, thumb, range, pageLength ); }; -void wxScrollBar::SetObjectLength( const int objectLength ) +void wxScrollBar::SetObjectLength( int objectLength ) { int pos = (int)(m_adjust->value+0.5); int page = (int)(m_adjust->page_increment+0.5); @@ -206,7 +206,7 @@ void wxScrollBar::SetObjectLength( const int objectLength ) SetScrollbar( pos, objectLength, range, page ); }; -void wxScrollBar::SetViewLength( const int viewLength ) +void wxScrollBar::SetViewLength( int viewLength ) { int pos = (int)(m_adjust->value+0.5); int thumb = (int)(m_adjust->page_size+0.5); diff --git a/src/gtk1/slider.cpp b/src/gtk1/slider.cpp index 4b2385afd1..d83eb9d7e3 100644 --- a/src/gtk1/slider.cpp +++ b/src/gtk1/slider.cpp @@ -65,10 +65,10 @@ wxSlider::wxSlider(void) { }; -wxSlider::wxSlider( wxWindow *parent, const wxWindowID id, - const int value, const int minValue, const int maxValue, +wxSlider::wxSlider( wxWindow *parent, wxWindowID id, + int value, int minValue, int maxValue, const wxPoint& pos, const wxSize& size, - const long style, + long style, /* const wxValidator& validator = wxDefaultValidator, */ const wxString& name ) { @@ -80,10 +80,10 @@ wxSlider::~wxSlider(void) { }; -bool wxSlider::Create(wxWindow *parent, const wxWindowID id, - const int value, const int minValue, const int maxValue, +bool wxSlider::Create(wxWindow *parent, wxWindowID id, + int value, int minValue, int maxValue, const wxPoint& pos, const wxSize& size, - const long style, + long style, /* const wxValidator& validator = wxDefaultValidator, */ const wxString& name ) { @@ -117,7 +117,7 @@ int wxSlider::GetValue(void) const return (int)(m_adjust->value+0.5); }; -void wxSlider::SetValue( const int value ) +void wxSlider::SetValue( int value ) { float fpos = (float)value; m_oldPos = fpos; @@ -127,7 +127,7 @@ void wxSlider::SetValue( const int value ) gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "value_changed" ); }; -void wxSlider::SetRange( const int minValue, const int maxValue ) +void wxSlider::SetRange( int minValue, int maxValue ) { float fmin = (float)minValue; float fmax = (float)maxValue; @@ -152,7 +152,7 @@ int wxSlider::GetMax(void) const return (int)(m_adjust->upper+0.5); }; -void wxSlider::SetPageSize( const int pageSize ) +void wxSlider::SetPageSize( int pageSize ) { float fpage = (float)pageSize; @@ -168,7 +168,7 @@ int wxSlider::GetPageSize(void) const return (int)(m_adjust->page_increment+0.5); }; -void wxSlider::SetThumbLength( const int len ) +void wxSlider::SetThumbLength( int len ) { float flen = (float)len; @@ -184,7 +184,7 @@ int wxSlider::GetThumbLength(void) const return (int)(m_adjust->page_size+0.5); }; -void wxSlider::SetLineSize( const int WXUNUSED(lineSize) ) +void wxSlider::SetLineSize( int WXUNUSED(lineSize) ) { }; @@ -200,7 +200,7 @@ void wxSlider::GetSize( int *x, int *y ) const wxWindow::GetSize( x, y ); }; -void wxSlider::SetSize( const int x, const int y, const int width, const int height, const int sizeFlags ) +void wxSlider::SetSize( int x, int y, int width, int height, int sizeFlags ) { wxWindow::SetSize( x, y, width, height, sizeFlags ); }; @@ -210,11 +210,11 @@ void wxSlider::GetPosition( int *x, int *y ) const wxWindow::GetPosition( x, y ); }; -void wxSlider::SetTick( const int WXUNUSED(tickPos) ) +void wxSlider::SetTick( int WXUNUSED(tickPos) ) { }; -void wxSlider::SetTickFreq( const int WXUNUSED(n), const int WXUNUSED(pos) ) +void wxSlider::SetTickFreq( int WXUNUSED(n), int WXUNUSED(pos) ) { }; @@ -227,7 +227,7 @@ void wxSlider::ClearTicks(void) { }; -void wxSlider::SetSelection( const int WXUNUSED(minPos), const int WXUNUSED(maxPos) ) +void wxSlider::SetSelection( int WXUNUSED(minPos), int WXUNUSED(maxPos) ) { }; diff --git a/src/gtk1/statbmp.cpp b/src/gtk1/statbmp.cpp index 9b8d050d61..5a35eb6156 100644 --- a/src/gtk1/statbmp.cpp +++ b/src/gtk1/statbmp.cpp @@ -26,14 +26,14 @@ wxStaticBitmap::wxStaticBitmap(void) wxStaticBitmap::wxStaticBitmap( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { Create( parent, id, bitmap, pos, size, style, name ); }; bool wxStaticBitmap::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { m_needParent = TRUE; diff --git a/src/gtk1/statbox.cpp b/src/gtk1/statbox.cpp index f07862fa34..319fe3ac93 100644 --- a/src/gtk1/statbox.cpp +++ b/src/gtk1/statbox.cpp @@ -26,14 +26,14 @@ wxStaticBox::wxStaticBox(void) wxStaticBox::wxStaticBox( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { Create( parent, id, label, pos, size, style, name ); }; bool wxStaticBox::Create( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { m_needParent = TRUE; diff --git a/src/gtk1/stattext.cpp b/src/gtk1/stattext.cpp index 6f931be64a..752196f455 100644 --- a/src/gtk1/stattext.cpp +++ b/src/gtk1/stattext.cpp @@ -27,14 +27,14 @@ wxStaticText::wxStaticText(void) wxStaticText::wxStaticText( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { Create( parent, id, label, pos, size, style, name ); }; bool wxStaticText::Create( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { m_needParent = TRUE; diff --git a/src/gtk1/tbargtk.cpp b/src/gtk1/tbargtk.cpp index 628b35c69d..611995d467 100644 --- a/src/gtk1/tbargtk.cpp +++ b/src/gtk1/tbargtk.cpp @@ -21,9 +21,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxToolBarTool,wxObject) -wxToolBarTool::wxToolBarTool( wxToolBarGTK *owner, const int theIndex, - const wxBitmap& bitmap1, const wxBitmap& bitmap2, - const bool toggle, wxObject *clientData, +wxToolBarTool::wxToolBarTool( wxToolBarGTK *owner, int theIndex, + const wxBitmap& bitmap1, const wxBitmap& bitmap2, + bool toggle, wxObject *clientData, const wxString& shortHelpString, const wxString& longHelpString ) { m_owner = owner; @@ -68,9 +68,9 @@ wxToolBarGTK::wxToolBarGTK(void) { }; -wxToolBarGTK::wxToolBarGTK( wxWindow *parent, const wxWindowID id, +wxToolBarGTK::wxToolBarGTK( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - const long style, const wxString& name ) + long style, const wxString& name ) { Create( parent, id, pos, size, style, name ); }; @@ -79,9 +79,9 @@ wxToolBarGTK::~wxToolBarGTK(void) { }; -bool wxToolBarGTK::Create( wxWindow *parent, const wxWindowID id, +bool wxToolBarGTK::Create( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - const long style, const wxString& name ) + long style, const wxString& name ) { m_needParent = TRUE; @@ -131,9 +131,9 @@ void wxToolBarGTK::OnMouseEnter( int toolIndex ) GetEventHandler()->ProcessEvent(event); }; -wxToolBarTool *wxToolBarGTK::AddTool( const int toolIndex, const wxBitmap& bitmap, - const wxBitmap& pushedBitmap, const bool toggle, - const float WXUNUSED(xPos), const float WXUNUSED(yPos), wxObject *clientData, +wxToolBarTool *wxToolBarGTK::AddTool( int toolIndex, const wxBitmap& bitmap, + const wxBitmap& pushedBitmap, bool toggle, + float WXUNUSED(xPos), float WXUNUSED(yPos), wxObject *clientData, const wxString& helpString1, const wxString& helpString2 ) { if (!bitmap.Ok()) return NULL; @@ -169,39 +169,39 @@ void wxToolBarGTK::ClearTools(void) { }; -void wxToolBarGTK::EnableTool(const int toolIndex, const bool enable) +void wxToolBarGTK::EnableTool(int toolIndex, bool enable) { }; -void wxToolBarGTK::ToggleTool(const int toolIndex, const bool toggle) +void wxToolBarGTK::ToggleTool(int toolIndex, bool toggle) { }; -void wxToolBarGTK::SetToggle(const int toolIndex, const bool toggle) +void wxToolBarGTK::SetToggle(int toolIndex, bool toggle) { }; -wxObject *wxToolBarGTK::GetToolClientData(const int index) const +wxObject *wxToolBarGTK::GetToolClientData(int index) const { }; -bool wxToolBarGTK::GetToolState(const int toolIndex) const +bool wxToolBarGTK::GetToolState(int toolIndex) const { }; -bool wxToolBarGTK::GetToolEnabled(const int toolIndex) const +bool wxToolBarGTK::GetToolEnabled(int toolIndex) const { }; -void wxToolBarGTK::SetMargins(const int x, const int y) +void wxToolBarGTK::SetMargins(int x, int y) { }; -void wxToolBarGTK::SetToolPacking(const int packing) +void wxToolBarGTK::SetToolPacking(int packing) { }; -void wxToolBarGTK::SetToolSeparation(const int separation) +void wxToolBarGTK::SetToolSeparation(int separation) { }; diff --git a/src/gtk1/textctrl.cpp b/src/gtk1/textctrl.cpp index 86f84cd40d..86eef711a7 100644 --- a/src/gtk1/textctrl.cpp +++ b/src/gtk1/textctrl.cpp @@ -36,17 +36,17 @@ wxTextCtrl::wxTextCtrl(void) : streambuf() m_modified = FALSE; }; -wxTextCtrl::wxTextCtrl( wxWindow *parent, const wxWindowID id, const wxString &value, +wxTextCtrl::wxTextCtrl( wxWindow *parent, wxWindowID id, const wxString &value, const wxPoint &pos, const wxSize &size, - const int style, const wxString &name ) : streambuf() + int style, const wxString &name ) : streambuf() { m_modified = FALSE; Create( parent, id, value, pos, size, style, name ); }; -bool wxTextCtrl::Create( wxWindow *parent, const wxWindowID id, const wxString &value, +bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value, const wxPoint &pos, const wxSize &size, - const int style, const wxString &name ) + int style, const wxString &name ) { m_needParent = TRUE; @@ -160,7 +160,7 @@ void wxTextCtrl::DiscardEdits(void) }; /* -wxString wxTextCtrl::GetLineText( const long lineNo ) const +wxString wxTextCtrl::GetLineText( long lineNo ) const { }; @@ -169,11 +169,11 @@ void wxTextCtrl::OnDropFiles( wxDropFilesEvent &event ) { }; -long wxTextCtrl::PositionToXY( const long pos, long *x, long *y ) const +long wxTextCtrl::PositionToXY( long pos, long *x, long *y ) const { }; -long wxTextCtrl::XYToPosition( const long x, const long y ) +long wxTextCtrl::XYToPosition( long x, long y ) { }; @@ -182,7 +182,7 @@ int wxTextCtrl::GetNumberOfLines(void) }; */ -void wxTextCtrl::SetInsertionPoint( const long pos ) +void wxTextCtrl::SetInsertionPoint( long pos ) { int tmp = (int) pos; if (m_windowStyle & wxTE_MULTILINE) @@ -201,7 +201,7 @@ void wxTextCtrl::SetInsertionPointEnd(void) SetInsertionPoint( pos-1 ); }; -void wxTextCtrl::SetEditable( const bool editable ) +void wxTextCtrl::SetEditable( bool editable ) { if (m_windowStyle & wxTE_MULTILINE) gtk_text_set_editable( GTK_TEXT(m_widget), editable ); @@ -209,12 +209,12 @@ void wxTextCtrl::SetEditable( const bool editable ) gtk_entry_set_editable( GTK_ENTRY(m_widget), editable ); }; -void wxTextCtrl::SetSelection( const long from, const long to ) +void wxTextCtrl::SetSelection( long from, long to ) { gtk_editable_select_region( GTK_EDITABLE(m_widget), (gint)from, (gint)to ); }; -void wxTextCtrl::ShowPosition( const long WXUNUSED(pos) ) +void wxTextCtrl::ShowPosition( long WXUNUSED(pos) ) { wxFAIL_MSG("wxTextCtrl::ShowPosition not implemented"); }; @@ -234,12 +234,12 @@ long wxTextCtrl::GetLastPosition(void) const return (long)pos-1; }; -void wxTextCtrl::Remove( const long from, const long to ) +void wxTextCtrl::Remove( long from, long to ) { gtk_editable_delete_text( GTK_EDITABLE(m_widget), (gint)from, (gint)to ); }; -void wxTextCtrl::Replace( const long from, const long to, const wxString &value ) +void wxTextCtrl::Replace( long from, long to, const wxString &value ) { gtk_editable_delete_text( GTK_EDITABLE(m_widget), (gint)from, (gint)to ); if (value.IsNull()) return; @@ -378,7 +378,7 @@ wxTextCtrl& wxTextCtrl::operator<<(const wxString& s) return *this; } -wxTextCtrl& wxTextCtrl::operator<<(const float f) +wxTextCtrl& wxTextCtrl::operator<<(float f) { static char buf[100]; sprintf(buf, "%.2f", f); @@ -386,7 +386,7 @@ wxTextCtrl& wxTextCtrl::operator<<(const float f) return *this; } -wxTextCtrl& wxTextCtrl::operator<<(const double d) +wxTextCtrl& wxTextCtrl::operator<<(double d) { static char buf[100]; sprintf(buf, "%.2f", d); @@ -394,7 +394,7 @@ wxTextCtrl& wxTextCtrl::operator<<(const double d) return *this; } -wxTextCtrl& wxTextCtrl::operator<<(const int i) +wxTextCtrl& wxTextCtrl::operator<<(int i) { static char buf[100]; sprintf(buf, "%i", i); @@ -402,7 +402,7 @@ wxTextCtrl& wxTextCtrl::operator<<(const int i) return *this; } -wxTextCtrl& wxTextCtrl::operator<<(const long i) +wxTextCtrl& wxTextCtrl::operator<<(long i) { static char buf[100]; sprintf(buf, "%ld", i); diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 4c9708ee27..26f5f1b989 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -724,16 +724,16 @@ wxWindow::wxWindow() m_pDropTarget = NULL; }; -wxWindow::wxWindow( wxWindow *parent, const wxWindowID id, - const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) +wxWindow::wxWindow( wxWindow *parent, wxWindowID id, + const wxPoint &pos, const wxSize &size, + long style, const wxString &name ) { Create( parent, id, pos, size, style, name ); }; -bool wxWindow::Create( wxWindow *parent, const wxWindowID id, - const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) +bool wxWindow::Create( wxWindow *parent, wxWindowID id, + const wxPoint &pos, const wxSize &size, + long style, const wxString &name ) { m_isShown = FALSE; m_isEnabled = TRUE; @@ -869,9 +869,9 @@ wxWindow::~wxWindow(void) }; -void wxWindow::PreCreation( wxWindow *parent, const wxWindowID id, - const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) +void wxWindow::PreCreation( wxWindow *parent, wxWindowID id, + const wxPoint &pos, const wxSize &size, + long style, const wxString &name ) { if (m_needParent && (parent == NULL)) wxFatalError( "Need complete parent.", name ); @@ -997,7 +997,7 @@ bool wxWindow::HasVMT(void) return m_hasVMT; }; -bool wxWindow::Close( const bool force ) +bool wxWindow::Close( bool force ) { wxCloseEvent event(wxEVT_CLOSE_WINDOW, m_windowId); event.SetEventObject(this); @@ -1049,7 +1049,7 @@ void wxWindow::ImplementSetPosition(void) gtk_widget_set_uposition( m_widget, m_x, m_y ); }; -void wxWindow::SetSize( const int x, const int y, const int width, const int height, const int sizeFlags ) +void wxWindow::SetSize( int x, int y, int width, int height, int sizeFlags ) { int newX = x; int newY = y; @@ -1093,12 +1093,12 @@ void wxWindow::SetSize( const int x, const int y, const int width, const int hei ProcessEvent( event ); }; -void wxWindow::SetSize( const int width, const int height ) +void wxWindow::SetSize( int width, int height ) { SetSize( -1, -1, width, height, wxSIZE_USE_EXISTING ); }; -void wxWindow::Move( const int x, const int y ) +void wxWindow::Move( int x, int y ) { SetSize( x, y, -1, -1, wxSIZE_USE_EXISTING ); }; @@ -1109,7 +1109,7 @@ void wxWindow::GetSize( int *width, int *height ) const (*height) = m_height; }; -void wxWindow::SetClientSize( const int width, const int height ) +void wxWindow::SetClientSize( int width, int height ) { if (!m_wxwindow) { @@ -1287,7 +1287,7 @@ void wxWindow::ScreenToClient( int *x, int *y ) if (y) *y -= org_y; }; -void wxWindow::Centre( const int direction ) +void wxWindow::Centre( int direction ) { int x = 0; int y = 0; @@ -1338,7 +1338,7 @@ void wxWindow::OnSize( wxSizeEvent &WXUNUSED(event) ) if (GetAutoLayout()) Layout(); }; -bool wxWindow::Show( const bool show ) +bool wxWindow::Show( bool show ) { if (show) gtk_widget_show( m_widget ); @@ -1348,14 +1348,14 @@ bool wxWindow::Show( const bool show ) return TRUE; }; -void wxWindow::Enable( const bool enable ) +void wxWindow::Enable( bool enable ) { m_isEnabled = enable; gtk_widget_set_sensitive( m_widget, enable ); if (m_wxwindow) gtk_widget_set_sensitive( m_wxwindow, enable ); }; -void wxWindow::MakeModal( const bool modal ) +void wxWindow::MakeModal( bool modal ) { return; // Disable all other windows @@ -1508,7 +1508,7 @@ void wxWindow::SetCursor( const wxCursor &cursor ) gdk_window_set_cursor( m_wxwindow->window, m_cursor->GetCursor() ); }; -void wxWindow::Refresh( const bool eraseBackground, const wxRect *rect ) +void wxWindow::Refresh( bool eraseBackground, const wxRect *rect ) { if (eraseBackground && m_wxwindow && m_wxwindow->window) { @@ -1557,12 +1557,12 @@ void wxWindow::Refresh( const bool eraseBackground, const wxRect *rect ) }; }; -bool wxWindow::IsExposed( const long x, const long y ) +bool wxWindow::IsExposed( long x, long y ) { return (m_updateRegion.Contains( x, y ) != wxOutRegion ); }; -bool wxWindow::IsExposed( const long x, const long y, const long width, const long height ) +bool wxWindow::IsExposed( long x, long y, long width, long height ) { return (m_updateRegion.Contains( x, y, width, height ) != wxOutRegion ); }; @@ -1749,7 +1749,7 @@ bool wxWindow::IsRetained(void) return FALSE; }; -wxWindow *wxWindow::FindWindow( const long id ) +wxWindow *wxWindow::FindWindow( long id ) { if (id == m_windowId) return this; wxNode *node = m_children.First(); @@ -1777,8 +1777,8 @@ wxWindow *wxWindow::FindWindow( const wxString& name ) return NULL; }; -void wxWindow::SetScrollbar( const int orient, const int pos, const int thumbVisible, - const int range, const bool WXUNUSED(refresh) ) +void wxWindow::SetScrollbar( int orient, int pos, int thumbVisible, + int range, bool WXUNUSED(refresh) ) { if (!m_wxwindow) return; @@ -1832,7 +1832,7 @@ void wxWindow::SetScrollbar( const int orient, const int pos, const int thumbVis }; }; -void wxWindow::SetScrollPos( const int orient, const int pos, const bool WXUNUSED(refresh) ) +void wxWindow::SetScrollPos( int orient, int pos, bool WXUNUSED(refresh) ) { if (!m_wxwindow) return; @@ -1861,7 +1861,7 @@ void wxWindow::SetScrollPos( const int orient, const int pos, const bool WXUNUSE }; }; -int wxWindow::GetScrollThumb( const int orient ) const +int wxWindow::GetScrollThumb( int orient ) const { if (!m_wxwindow) return 0; @@ -1871,7 +1871,7 @@ int wxWindow::GetScrollThumb( const int orient ) const return (int)(m_vAdjust->page_size+0.5); }; -int wxWindow::GetScrollPos( const int orient ) const +int wxWindow::GetScrollPos( int orient ) const { if (!m_wxwindow) return 0; @@ -1881,7 +1881,7 @@ int wxWindow::GetScrollPos( const int orient ) const return (int)(m_vAdjust->value+0.5); }; -int wxWindow::GetScrollRange( const int orient ) const +int wxWindow::GetScrollRange( int orient ) const { if (!m_wxwindow) return 0; @@ -1891,7 +1891,7 @@ int wxWindow::GetScrollRange( const int orient ) const return (int)(m_vAdjust->upper+0.5); }; -void wxWindow::ScrollWindow( const int dx, const int dy, const wxRect* WXUNUSED(rect) ) +void wxWindow::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) ) { if (!m_wxwindow) return; @@ -1985,7 +1985,7 @@ void wxWindow::SetConstraints( wxLayoutConstraints *constraints ) } ; -void wxWindow::SetAutoLayout( const bool autoLayout ) +void wxWindow::SetAutoLayout( bool autoLayout ) { m_autoLayout = autoLayout; }; @@ -2153,7 +2153,7 @@ bool wxWindow::LayoutPhase2(int *noChanges) } // Do a phase of evaluating child constraints -bool wxWindow::DoPhase(const int phase) +bool wxWindow::DoPhase(int phase) { int noIterations = 0; int maxIterations = 500; @@ -2221,7 +2221,7 @@ void wxWindow::ResetConstraints(void) // Need to distinguish between setting the 'fake' size for // windows and sizers, and setting the real values. -void wxWindow::SetConstraintSizes(const bool recurse) +void wxWindow::SetConstraintSizes(bool recurse) { wxLayoutConstraints *constr = GetConstraints(); if (constr && constr->left.GetDone() && constr->right.GetDone() && @@ -2294,7 +2294,7 @@ void wxWindow::TransformSizerToActual(int *x, int *y) const *y += yp; } -void wxWindow::SizerSetSize(const int x, const int y, const int w, const int h) +void wxWindow::SizerSetSize(int x, int y, int w, int h) { int xx = x; int yy = y; @@ -2302,7 +2302,7 @@ void wxWindow::SizerSetSize(const int x, const int y, const int w, const int h) SetSize(xx, yy, w, h); } -void wxWindow::SizerMove(const int x, const int y) +void wxWindow::SizerMove(int x, int y) { int xx = x; int yy = y; @@ -2311,7 +2311,7 @@ void wxWindow::SizerMove(const int x, const int y) } // Only set the size/position of the constraint (if any) -void wxWindow::SetSizeConstraint(const int x, const int y, const int w, const int h) +void wxWindow::SetSizeConstraint(int x, int y, int w, int h) { wxLayoutConstraints *constr = GetConstraints(); if (constr) @@ -2339,7 +2339,7 @@ void wxWindow::SetSizeConstraint(const int x, const int y, const int w, const in } } -void wxWindow::MoveConstraint(const int x, const int y) +void wxWindow::MoveConstraint(int x, int y) { wxLayoutConstraints *constr = GetConstraints(); if (constr) diff --git a/src/msw/app.cpp b/src/msw/app.cpp index 4c9218cb88..b3dae1191e 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -873,19 +873,6 @@ bool wxApp::SendIdleEvents(wxWindow* win) return needMore ; } -// Windows specific. Intercept keyboard input: by default, -// route it to the active frame or dialog box. -#if WXWIN_COMPATIBILITY == 2 -bool wxApp::OldOnCharHook(wxKeyEvent& event) -{ - wxWindow *win = wxGetActiveWindow(); - if (win) - return win->GetEventHandler()->OldOnCharHook(event); - else - return FALSE; -} -#endif - void wxApp::DeletePendingObjects(void) { wxNode *node = wxPendingDelete.First(); diff --git a/src/msw/bitmap.cpp b/src/msw/bitmap.cpp index f0688b5454..aa0f6ed699 100644 --- a/src/msw/bitmap.cpp +++ b/src/msw/bitmap.cpp @@ -124,7 +124,7 @@ bool wxBitmap::FreeResource(bool force) } -wxBitmap::wxBitmap(const char bits[], const int the_width, const int the_height, const int no_bits) +wxBitmap::wxBitmap(const char bits[], int the_width, int the_height, int no_bits) { m_refData = new wxBitmapRefData; @@ -146,7 +146,7 @@ wxBitmap::wxBitmap(const char bits[], const int the_width, const int the_height, wxTheBitmapList->AddBitmap(this); } -wxBitmap::wxBitmap(const int w, const int h, const int d) +wxBitmap::wxBitmap(int w, int h, int d) { (void)Create(w, h, d); @@ -154,7 +154,7 @@ wxBitmap::wxBitmap(const int w, const int h, const int d) wxTheBitmapList->AddBitmap(this); } -wxBitmap::wxBitmap(void *data, const long type, const int width, const int height, const int depth) +wxBitmap::wxBitmap(void *data, long type, int width, int height, int depth) { (void) Create(data, type, width, height, depth); @@ -162,7 +162,7 @@ wxBitmap::wxBitmap(void *data, const long type, const int width, const int heigh wxTheBitmapList->AddBitmap(this); } -wxBitmap::wxBitmap(const wxString& filename, const long type) +wxBitmap::wxBitmap(const wxString& filename, long type) { LoadFile(filename, (int)type); @@ -178,7 +178,7 @@ wxBitmap::wxBitmap(const char **data, wxItem *WXUNUSED(anItem)) } #endif -bool wxBitmap::Create(const int w, const int h, const int d) +bool wxBitmap::Create(int w, int h, int d) { UnRef(); @@ -206,7 +206,7 @@ bool wxBitmap::Create(const int w, const int h, const int d) return M_BITMAPDATA->m_ok; } -bool wxBitmap::LoadFile(const wxString& filename, const long type) +bool wxBitmap::LoadFile(const wxString& filename, long type) { UnRef(); @@ -223,7 +223,7 @@ bool wxBitmap::LoadFile(const wxString& filename, const long type) return handler->LoadFile(this, filename, type, -1, -1); } -bool wxBitmap::Create(void *data, const long type, const int width, const int height, const int depth) +bool wxBitmap::Create(void *data, long type, int width, int height, int depth) { UnRef(); @@ -240,7 +240,7 @@ bool wxBitmap::Create(void *data, const long type, const int width, const int he return handler->Create(this, data, type, width, height, depth); } -bool wxBitmap::SaveFile(const wxString& filename, const int type, const wxPalette *palette) +bool wxBitmap::SaveFile(const wxString& filename, int type, const wxPalette *palette) { wxBitmapHandler *handler = FindHandler(type); @@ -398,7 +398,7 @@ wxMask::wxMask(const wxBitmap& bitmap, const wxColour& colour) // Construct a mask from a bitmap and a palette index indicating // the transparent area -wxMask::wxMask(const wxBitmap& bitmap, const int paletteIndex) +wxMask::wxMask(const wxBitmap& bitmap, int paletteIndex) { m_maskBitmap = 0; Create(bitmap, paletteIndex); @@ -448,7 +448,7 @@ bool wxMask::Create(const wxBitmap& bitmap) // Create a mask from a bitmap and a palette index indicating // the transparent area -bool wxMask::Create(const wxBitmap& bitmap, const int paletteIndex) +bool wxMask::Create(const wxBitmap& bitmap, int paletteIndex) { if ( m_maskBitmap ) { @@ -525,18 +525,18 @@ bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour) IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler, wxObject) -bool wxBitmapHandler::Create(wxBitmap *bitmap, void *data, const long type, const int width, const int height, const int depth) +bool wxBitmapHandler::Create(wxBitmap *bitmap, void *data, long type, int width, int height, int depth) { return FALSE; } -bool wxBitmapHandler::LoadFile(wxBitmap *bitmap, const wxString& name, const long type, +bool wxBitmapHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long type, int desiredWidth, int desiredHeight) { return FALSE; } -bool wxBitmapHandler::SaveFile(wxBitmap *bitmap, const wxString& name, const int type, const wxPalette *palette) +bool wxBitmapHandler::SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette) { return FALSE; } @@ -556,12 +556,12 @@ public: m_type = wxBITMAP_TYPE_BMP_RESOURCE; }; - virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, const long flags, + virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, int desiredWidth, int desiredHeight); }; IMPLEMENT_DYNAMIC_CLASS(wxBMPResourceHandler, wxBitmapHandler) -bool wxBMPResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, const long flags, +bool wxBMPResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags, int desiredWidth, int desiredHeight) { // TODO: load colourmap. @@ -594,13 +594,13 @@ public: m_type = wxBITMAP_TYPE_BMP; }; - virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, const long flags, + virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, int desiredWidth, int desiredHeight); - virtual bool SaveFile(wxBitmap *bitmap, const wxString& name, const int type, const wxPalette *palette = NULL); + virtual bool SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette = NULL); }; IMPLEMENT_DYNAMIC_CLASS(wxBMPFileHandler, wxBitmapHandler) -bool wxBMPFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, const long flags, +bool wxBMPFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags, int desiredWidth, int desiredHeight) { #if USE_IMAGE_LOADING_IN_MSW @@ -625,7 +625,7 @@ bool wxBMPFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, const lo #endif } -bool wxBMPFileHandler::SaveFile(wxBitmap *bitmap, const wxString& name, const int type, const wxPalette *pal) +bool wxBMPFileHandler::SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *pal) { #if USE_IMAGE_LOADING_IN_MSW wxPalette *actualPalette = (wxPalette *)pal; @@ -648,13 +648,13 @@ public: m_type = wxBITMAP_TYPE_XPM; }; - virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, const long flags, + virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, int desiredWidth = -1, int desiredHeight = -1); - virtual bool SaveFile(wxBitmap *bitmap, const wxString& name, const int type, const wxPalette *palette = NULL); + virtual bool SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette = NULL); }; IMPLEMENT_DYNAMIC_CLASS(wxXPMFileHandler, wxBitmapHandler) -bool wxXPMFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, const long flags, +bool wxXPMFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags, int desiredWidth, int desiredHeight) { #if USE_XPM_IN_MSW @@ -697,7 +697,7 @@ bool wxXPMFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, const lo return FALSE; } -bool wxXPMFileHandler::SaveFile(wxBitmap *bitmap, const wxString& name, const int type, const wxPalette *palette) +bool wxXPMFileHandler::SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette) { #if USE_XPM_IN_MSW HDC dc = NULL; @@ -743,11 +743,11 @@ public: m_type = wxBITMAP_TYPE_XPM_DATA; }; - virtual bool Create(wxBitmap *bitmap, void *data, const long flags, const int width, const int height, const int depth = 1); + virtual bool Create(wxBitmap *bitmap, void *data, long flags, int width, int height, int depth = 1); }; IMPLEMENT_DYNAMIC_CLASS(wxXPMDataHandler, wxBitmapHandler) -bool wxXPMDataHandler::Create(wxBitmap *bitmap, void *data, const long flags, const int width, const int height, const int depth) +bool wxXPMDataHandler::Create(wxBitmap *bitmap, void *data, long flags, int width, int height, int depth) { #if USE_XPM_IN_MSW XImage *ximage; diff --git a/src/msw/bmpbuttn.cpp b/src/msw/bmpbuttn.cpp index 7d9c245c29..ec5733df7b 100644 --- a/src/msw/bmpbuttn.cpp +++ b/src/msw/bmpbuttn.cpp @@ -32,9 +32,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton, wxButton) #define BUTTON_HEIGHT_FACTOR (EDIT_CONTROL_FACTOR * 1.1) -bool wxBitmapButton::Create(wxWindow *parent, const wxWindowID id, const wxBitmap& bitmap, +bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, const wxPoint& pos, - const wxSize& size, const long style, + const wxSize& size, long style, const wxValidator& validator, const wxString& name) { diff --git a/src/msw/brush.cpp b/src/msw/brush.cpp index 2b34ed2f23..43dbfae933 100644 --- a/src/msw/brush.cpp +++ b/src/msw/brush.cpp @@ -63,7 +63,7 @@ wxBrush::~wxBrush() wxTheBrushList->RemoveBrush(this); } -wxBrush::wxBrush(const wxColour& col, const int Style) +wxBrush::wxBrush(const wxColour& col, int Style) { m_refData = new wxBrushRefData; @@ -77,7 +77,7 @@ wxBrush::wxBrush(const wxColour& col, const int Style) wxTheBrushList->AddBrush(this); } -wxBrush::wxBrush(const wxString& col, const int Style) +wxBrush::wxBrush(const wxString& col, int Style) { m_refData = new wxBrushRefData; @@ -238,7 +238,7 @@ void wxBrush::SetColour(const unsigned char r, const unsigned char g, const unsi RealizeResource(); } -void wxBrush::SetStyle(const int Style) +void wxBrush::SetStyle(int Style) { if ( !M_BRUSHDATA ) m_refData = new wxBrushRefData; diff --git a/src/msw/button.cpp b/src/msw/button.cpp index fbfef488f8..13f671d53b 100644 --- a/src/msw/button.cpp +++ b/src/msw/button.cpp @@ -34,7 +34,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl) // Buttons -bool wxButton::MSWCommand(const WXUINT param, const WXWORD id) +bool wxButton::MSWCommand(WXUINT param, WXWORD id) { if (param == BN_CLICKED) { @@ -46,9 +46,9 @@ bool wxButton::MSWCommand(const WXUINT param, const WXWORD id) else return FALSE; } -bool wxButton::Create(wxWindow *parent, const wxWindowID id, const wxString& label, +bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos, - const wxSize& size, const long style, + const wxSize& size, long style, const wxValidator& validator, const wxString& name) { @@ -95,7 +95,7 @@ bool wxButton::Create(wxWindow *parent, const wxWindowID id, const wxString& lab return TRUE; } -void wxButton::SetSize(const int x, const int y, const int width, const int height, const int sizeFlags) +void wxButton::SetSize(int x, int y, int width, int height, int sizeFlags) { int currentX, currentY; GetPosition(¤tX, ¤tY); @@ -111,8 +111,8 @@ void wxButton::SetSize(const int x, const int y, const int width, const int heig int ww, hh; GetSize(&ww, &hh); - float current_width; - float cyf; + int current_width; + int cyf; char buf[300]; GetWindowText((HWND) GetHWND(), buf, 300); GetTextExtent(buf, ¤t_width, &cyf,NULL,NULL,GetFont()); @@ -137,19 +137,6 @@ void wxButton::SetSize(const int x, const int y, const int width, const int heig } MoveWindow((HWND) GetHWND(), x1, y1, actualWidth, actualHeight, TRUE); - -/* - if (!((width == -1) && (height == -1))) - { -#if WXWIN_COMPATIBILITY - GetEventHandler()->OldOnSize(width, height); -#else - wxSizeEvent event(wxSize(width, height), m_windowId); - event.eventObject = this; - GetEventHandler()->ProcessEvent(event); -#endif - } -*/ } void wxButton::SetDefault(void) @@ -175,7 +162,7 @@ void wxButton::SetLabel(const wxString& label) SetWindowText((HWND) GetHWND(), (const char *) label); } -WXHBRUSH wxButton::OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, +WXHBRUSH wxButton::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam) { /* diff --git a/src/msw/checkbox.cpp b/src/msw/checkbox.cpp index eca9672ea3..76cf03fe34 100644 --- a/src/msw/checkbox.cpp +++ b/src/msw/checkbox.cpp @@ -31,7 +31,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxCheckBox, wxControl) IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox, wxCheckBox) #endif -bool wxCheckBox::MSWCommand(const WXUINT WXUNUSED(param), const WXWORD WXUNUSED(id)) +bool wxCheckBox::MSWCommand(WXUINT WXUNUSED(param), WXWORD WXUNUSED(id)) { wxCommandEvent event(wxEVENT_TYPE_CHECKBOX_COMMAND, m_windowId); event.SetInt(GetValue()); @@ -41,9 +41,9 @@ bool wxCheckBox::MSWCommand(const WXUINT WXUNUSED(param), const WXWORD WXUNUSED( } // Single check box item -bool wxCheckBox::Create(wxWindow *parent, const wxWindowID id, const wxString& label, +bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos, - const wxSize& size, const long style, + const wxSize& size, long style, const wxValidator& validator, const wxString& name) { @@ -116,7 +116,7 @@ void wxCheckBox::SetLabel(const wxString& label) SetWindowText((HWND) GetHWND(), (const char *)label); } -void wxCheckBox::SetSize(const int x, const int y, const int width, const int height, const int sizeFlags) +void wxCheckBox::SetSize(int x, int y, int width, int height, int sizeFlags) { int currentX, currentY; GetPosition(¤tX, ¤tY); @@ -132,10 +132,7 @@ void wxCheckBox::SetSize(const int x, const int y, const int width, const int he char buf[300]; - float current_width; - - float cyf; - + int current_width, cyf; HWND button = (HWND) GetHWND(); GetWindowText(button, buf, 300); @@ -160,20 +157,9 @@ void wxCheckBox::SetSize(const int x, const int y, const int width, const int he } MoveWindow(button, x1, y1, w1, h1, TRUE); - -/* -#if WXWIN_COMPATIBILITY - GetEventHandler()->OldOnSize(width, height); -#else - wxSizeEvent event(wxSize(width, height), m_windowId); - event.eventObject = this; - GetEventHandler()->ProcessEvent(event); -#endif -*/ - } -void wxCheckBox::SetValue(const bool val) +void wxCheckBox::SetValue(bool val) { SendMessage((HWND) GetHWND(), BM_SETCHECK, val, 0); } @@ -187,7 +173,7 @@ bool wxCheckBox::GetValue(void) const #endif } -WXHBRUSH wxCheckBox::OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, +WXHBRUSH wxCheckBox::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam) { #if CTL3D @@ -221,9 +207,9 @@ void wxCheckBox::Command (wxCommandEvent & event) ProcessCommand (event); } -bool wxBitmapCheckBox::Create(wxWindow *parent, const wxWindowID id, const wxBitmap *label, +bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id, const wxBitmap *label, const wxPoint& pos, - const wxSize& size, const long style, + const wxSize& size, long style, const wxValidator& validator, const wxString& name) { @@ -279,7 +265,7 @@ void wxBitmapCheckBox::SetLabel(const wxBitmap *bitmap) { } -void wxBitmapCheckBox::SetSize(const int x, const int y, const int width, const int height, const int sizeFlags) +void wxBitmapCheckBox::SetSize(int x, int y, int width, int height, int sizeFlags) { int currentX, currentY; GetPosition(¤tX, ¤tY); @@ -302,17 +288,9 @@ void wxBitmapCheckBox::SetSize(const int x, const int y, const int width, const h1 = checkHeight + FB_MARGIN ; */ MoveWindow(button, x1, y1, w1, h1, TRUE); - -#if WXWIN_COMPATIBILITY - GetEventHandler()->OldOnSize(width, height); -#else - wxSizeEvent event(wxSize(width, height), m_windowId); - event.eventObject = this; - GetEventHandler()->ProcessEvent(event); -#endif } -void wxBitmapCheckBox::SetValue(const bool val) +void wxBitmapCheckBox::SetValue(bool val) { SendMessage((HWND) GetHWND(), BM_SETCHECK, val, 0); } diff --git a/src/msw/checklst.cpp b/src/msw/checklst.cpp index 51fd72182e..e388e1fb2d 100644 --- a/src/msw/checklst.cpp +++ b/src/msw/checklst.cpp @@ -219,10 +219,10 @@ wxCheckListBox::wxCheckListBox() : wxListBox() } // ctor which creates the associated control -wxCheckListBox::wxCheckListBox(wxWindow *parent, const wxWindowID id, +wxCheckListBox::wxCheckListBox(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - const int nStrings, const wxString choices[], - const long style, const wxValidator& val, + int nStrings, const wxString choices[], + long style, const wxValidator& val, const wxString& name) // , const wxFont& font) // don't use ctor with arguments! we must call Create() // ourselves from here. diff --git a/src/msw/choice.cpp b/src/msw/choice.cpp index 850211d0dd..bc0ab64e18 100644 --- a/src/msw/choice.cpp +++ b/src/msw/choice.cpp @@ -30,7 +30,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl) #endif -bool wxChoice::MSWCommand(const WXUINT param, const WXWORD WXUNUSED(id)) +bool wxChoice::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) { if (param == CBN_SELCHANGE) { @@ -45,11 +45,11 @@ bool wxChoice::MSWCommand(const WXUINT param, const WXWORD WXUNUSED(id)) else return FALSE; } -bool wxChoice::Create(wxWindow *parent, const wxWindowID id, +bool wxChoice::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - const int n, const wxString choices[], - const long style, + int n, const wxString choices[], + long style, const wxValidator& validator, const wxString& name) { @@ -124,7 +124,7 @@ void wxChoice::Append(const wxString& item) no_strings ++; } -void wxChoice::Delete(const int n) +void wxChoice::Delete(int n) { no_strings = (int)SendMessage((HWND) GetHWND(), CB_DELETESTRING, n, 0); } @@ -142,7 +142,7 @@ int wxChoice::GetSelection(void) const return (int)SendMessage((HWND) GetHWND(), CB_GETCURSEL, 0, 0); } -void wxChoice::SetSelection(const int n) +void wxChoice::SetSelection(int n) { SendMessage((HWND) GetHWND(), CB_SETCURSEL, n, 0); } @@ -170,14 +170,14 @@ int wxChoice::FindString(const wxString& s) const #endif } -wxString wxChoice::GetString(const int n) const +wxString wxChoice::GetString(int n) const { int len = (int)SendMessage((HWND) GetHWND(), CB_GETLBTEXT, n, (long)wxBuffer); wxBuffer[len] = 0; return wxString(wxBuffer); } -void wxChoice::SetSize(const int x, const int y, const int width, const int height, const int sizeFlags) +void wxChoice::SetSize(int x, int y, int width, int height, int sizeFlags) { int currentX, currentY; GetPosition(¤tX, ¤tY); @@ -220,7 +220,7 @@ void wxChoice::SetSize(const int x, const int y, const int width, const int heig control_width = (float)100.0; else { - float len, ht; + int len, ht; float longest = (float)0.0; int i; for (i = 0; i < no_strings; i++) @@ -257,19 +257,9 @@ void wxChoice::SetSize(const int x, const int y, const int width, const int heig MoveWindow((HWND) GetHWND(), x1, y1, (int)control_width, (int)control_height, TRUE); - -/* -#if WXWIN_COMPATIBILITY - GetEventHandler()->OldOnSize(width, height); -#else - wxSizeEvent event(wxSize(width, height), m_windowId); - event.eventObject = this; - GetEventHandler()->ProcessEvent(event); -#endif -*/ } -WXHBRUSH wxChoice::OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, +WXHBRUSH wxChoice::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam) { return 0; diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index 5c7888dab5..2a5e353db1 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -34,7 +34,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl) #endif -bool wxComboBox::MSWCommand(const WXUINT param, const WXWORD WXUNUSED(id)) +bool wxComboBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) { if (param == CBN_SELCHANGE) { @@ -49,12 +49,12 @@ bool wxComboBox::MSWCommand(const WXUINT param, const WXWORD WXUNUSED(id)) else return FALSE; } -bool wxComboBox::Create(wxWindow *parent, const wxWindowID id, +bool wxComboBox::Create(wxWindow *parent, wxWindowID id, const wxString& value, const wxPoint& pos, const wxSize& size, - const int n, const wxString choices[], - const long style, + int n, const wxString choices[], + long style, const wxValidator& validator, const wxString& name) { @@ -188,14 +188,14 @@ void wxComboBox::Paste(void) SendMessage(hWnd, WM_PASTE, 0, 0L); } -void wxComboBox::SetEditable(const bool editable) +void wxComboBox::SetEditable(bool editable) { // Can't implement in MSW? // HWND hWnd = (HWND) GetHWND(); // SendMessage(hWnd, EM_SETREADONLY, (WPARAM)!editable, (LPARAM)0L); } -void wxComboBox::SetInsertionPoint(const long pos) +void wxComboBox::SetInsertionPoint(long pos) { /* HWND hWnd = (HWND) GetHWND(); @@ -247,7 +247,7 @@ long wxComboBox::GetLastPosition(void) const return 0; } -void wxComboBox::Replace(const long from, const long to, const wxString& value) +void wxComboBox::Replace(long from, long to, const wxString& value) { #if USE_CLIPBOARD HWND hWnd = (HWND) GetHWND(); @@ -270,7 +270,7 @@ void wxComboBox::Replace(const long from, const long to, const wxString& value) #endif } -void wxComboBox::Remove(const long from, const long to) +void wxComboBox::Remove(long from, long to) { HWND hWnd = (HWND) GetHWND(); long fromChar = from; @@ -285,7 +285,7 @@ void wxComboBox::Remove(const long from, const long to) SendMessage(hWnd, WM_CUT, (WPARAM)0, (LPARAM)0); } -void wxComboBox::SetSelection(const long from, const long to) +void wxComboBox::SetSelection(long from, long to) { HWND hWnd = (HWND) GetHWND(); long fromChar = from; diff --git a/src/msw/control.cpp b/src/msw/control.cpp index 640aca75c7..22090f64c0 100644 --- a/src/msw/control.cpp +++ b/src/msw/control.cpp @@ -132,7 +132,7 @@ void wxConvertDialogToPixels(wxWindow *control, int *x, int *y) } */ -void wxControl::MSWOnMouseMove(const int x, const int y, const WXUINT flags) +void wxControl::MSWOnMouseMove(int x, int y, WXUINT flags) { /* // Trouble with this is that it sets the cursor for controls too :-( @@ -172,7 +172,9 @@ void wxControl::MSWOnMouseMove(const int x, const int y, const WXUINT flags) m_lastEvent = wxEVT_MOTION; m_lastXPos = event.GetX(); m_lastYPos = event.GetY(); - GetEventHandler()->OldOnMouseEvent(event); + + if (!GetEventHandler()->ProcessEvent(event)) + Default(); } long wxControl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) @@ -180,7 +182,7 @@ long wxControl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) return wxWindow::MSWWindowProc(nMsg, wParam, lParam); } -bool wxControl::MSWNotify(const WXWPARAM wParam, const WXLPARAM lParam) +bool wxControl::MSWNotify(WXWPARAM wParam, WXLPARAM lParam) { #if defined(__WIN95__) wxCommandEvent event(wxEVT_NULL, m_windowId); @@ -291,12 +293,12 @@ void wxControl::OnEraseBackground(wxEraseEvent& event) ::SetMapMode((HDC) event.GetDC()->GetHDC(), mode); } -void wxControl::SetClientSize (const int width, const int height) +void wxControl::SetClientSize (int width, int height) { SetSize (-1, -1, width, height); } -void wxControl::Centre (const int direction) +void wxControl::Centre (int direction) { int x, y, width, height, panel_width, panel_height, new_x, new_y; diff --git a/src/msw/cursor.cpp b/src/msw/cursor.cpp index 6ca9e1bc07..f4e2a399e2 100644 --- a/src/msw/cursor.cpp +++ b/src/msw/cursor.cpp @@ -66,12 +66,12 @@ wxCursor::wxCursor(void) { } -wxCursor::wxCursor(const char WXUNUSED(bits)[], const int WXUNUSED(width), const int WXUNUSED(height), - const int WXUNUSED(hotSpotX), const int WXUNUSED(hotSpotY), const char WXUNUSED(maskBits)[]) +wxCursor::wxCursor(const char WXUNUSED(bits)[], int WXUNUSED(width), int WXUNUSED(height), + int WXUNUSED(hotSpotX), int WXUNUSED(hotSpotY), const char WXUNUSED(maskBits)[]) { } -wxCursor::wxCursor(const wxString& cursor_file, const long flags, const int hotSpotX, const int hotSpotY) +wxCursor::wxCursor(const wxString& cursor_file, long flags, int hotSpotX, int hotSpotY) { m_refData = new wxIconRefData; @@ -123,7 +123,7 @@ wxCursor::wxCursor(const wxString& cursor_file, const long flags, const int hotS } // Cursors by stock number -wxCursor::wxCursor(const int cursor_type) +wxCursor::wxCursor(int cursor_type) { m_refData = new wxIconRefData; diff --git a/src/msw/dcprint.cpp b/src/msw/dcprint.cpp index 6802ea9782..35c568f7a5 100644 --- a/src/msw/dcprint.cpp +++ b/src/msw/dcprint.cpp @@ -54,7 +54,7 @@ IMPLEMENT_CLASS(wxPrinterDC, wxDC) #endif -wxPrinterDC::wxPrinterDC(const wxString& driver_name, const wxString& device_name, const wxString& file, const bool interactive, const int orientation) +wxPrinterDC::wxPrinterDC(const wxString& driver_name, const wxString& device_name, const wxString& file, bool interactive, int orientation) { m_isInteractive = interactive; diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp index 6e5e380c55..8cb74e9300 100644 --- a/src/msw/dialog.cpp +++ b/src/msw/dialog.cpp @@ -81,11 +81,11 @@ wxDialog::wxDialog(void) SetDefaultBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); } -bool wxDialog::Create(wxWindow *parent, const wxWindowID id, +bool wxDialog::Create(wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, - const long style, + long style, const wxString& name) { SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); @@ -144,7 +144,7 @@ bool wxDialog::Create(wxWindow *parent, const wxWindowID id, return TRUE; } -void wxDialog::SetModal(const bool flag) +void wxDialog::SetModal(bool flag) { if ( flag ) m_windowStyle |= wxDIALOG_MODAL ; @@ -229,7 +229,7 @@ void wxDialog::Fit(void) wxWindow::Fit(); } -void wxDialog::Iconize(const bool WXUNUSED(iconize)) +void wxDialog::Iconize(bool WXUNUSED(iconize)) { // Windows dialog boxes can't be iconized } @@ -239,12 +239,12 @@ bool wxDialog::IsIconized(void) const return FALSE; } -void wxDialog::SetSize(const int x, const int y, const int width, const int height, const int WXUNUSED(sizeFlags)) +void wxDialog::SetSize(int x, int y, int width, int height, int WXUNUSED(sizeFlags)) { wxWindow::SetSize(x, y, width, height); } -void wxDialog::SetClientSize(const int width, const int height) +void wxDialog::SetClientSize(int width, int height) { HWND hWnd = (HWND) GetHWND(); RECT rect; @@ -260,13 +260,10 @@ void wxDialog::SetClientSize(const int width, const int height) int actual_height = rect2.bottom - rect2.top - rect.bottom + height; MoveWindow(hWnd, rect2.left, rect2.top, actual_width, actual_height, TRUE); -#if WXWIN_COMPATIBILITY - GetEventHandler()->OldOnSize(actual_width, actual_height); -#else + wxSizeEvent event(wxSize(actual_width, actual_height), m_windowId); - event.eventObject = this; + event.SetEventObject( this ); GetEventHandler()->ProcessEvent(event); -#endif } void wxDialog::GetPosition(int *x, int *y) const @@ -284,7 +281,7 @@ bool wxDialog::IsShown(void) const return m_isShown; } -bool wxDialog::Show(const bool show) +bool wxDialog::Show(bool show) { m_isShown = show; @@ -453,7 +450,7 @@ wxString wxDialog::GetTitle(void) const return wxString(wxBuffer); } -void wxDialog::Centre(const int direction) +void wxDialog::Centre(int direction) { int x_offset,y_offset ; int display_width, display_height; @@ -504,7 +501,7 @@ void wxDialog::EndModal(int retCode) } // Define for each class of dialog and control -WXHBRUSH wxDialog::OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, +WXHBRUSH wxDialog::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam) { #if CTL3D diff --git a/src/msw/filedlg.cpp b/src/msw/filedlg.cpp index 43cf9e9137..14c193972f 100644 --- a/src/msw/filedlg.cpp +++ b/src/msw/filedlg.cpp @@ -118,10 +118,10 @@ char *wxFileSelectorEx( const char *title, const char *defaultFileName, int* defaultFilterIndex, const char *filter, - const int flags, + int flags, wxWindow* parent, - const int x, - const int y) + int x, + int y) { wxFileDialog fileDialog(parent, title ? title : "", defaultDir ? defaultDir : "", diff --git a/src/msw/font.cpp b/src/msw/font.cpp index 727048a9b8..48a127d8f9 100644 --- a/src/msw/font.cpp +++ b/src/msw/font.cpp @@ -243,28 +243,28 @@ bool wxFont::IsFree(void) return (M_FONTDATA && (M_FONTDATA->m_hFont == 0)); } -void wxFont::SetPointSize(const int pointSize) +void wxFont::SetPointSize(int pointSize) { if ( !m_refData ) m_refData = new wxFontRefData; M_FONTDATA->m_pointSize = pointSize; } -void wxFont::SetFamily(const int family) +void wxFont::SetFamily(int family) { if ( !m_refData ) m_refData = new wxFontRefData; M_FONTDATA->m_family = family; } -void wxFont::SetStyle(const int style) +void wxFont::SetStyle(int style) { if ( !m_refData ) m_refData = new wxFontRefData; M_FONTDATA->m_style = style; } -void wxFont::SetWeight(const int weight) +void wxFont::SetWeight(int weight) { if ( !m_refData ) m_refData = new wxFontRefData; @@ -278,7 +278,7 @@ void wxFont::SetFaceName(const wxString& faceName) M_FONTDATA->m_faceName = faceName; } -void wxFont::SetUnderlined(const bool underlined) +void wxFont::SetUnderlined(bool underlined) { if ( !m_refData ) m_refData = new wxFontRefData; diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index 2e00ecfccb..4c6e280e2d 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -76,11 +76,11 @@ wxFrame::wxFrame(void) } bool wxFrame::Create(wxWindow *parent, - const wxWindowID id, + wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, - const long style, + long style, const wxString& name) { if (!parent) @@ -171,7 +171,7 @@ void wxFrame::GetClientSize(int *x, int *y) const // Set the client size (i.e. leave the calculation of borders etc. // to wxWindows) -void wxFrame::SetClientSize(const int width, const int height) +void wxFrame::SetClientSize(int width, int height) { HWND hWnd = (HWND) GetHWND(); @@ -199,13 +199,10 @@ void wxFrame::SetClientSize(const int width, const int height) point.y = rect2.top; MoveWindow(hWnd, point.x, point.y, actual_width, actual_height, (BOOL)TRUE); -#if WXWIN_COMPATIBILITY - GetEventHandler()->OldOnSize(width, height); -#else + wxSizeEvent event(wxSize(width, height), m_windowId); event.SetEventObject( this ); GetEventHandler()->ProcessEvent(event); -#endif } void wxFrame::GetSize(int *width, int *height) const @@ -228,7 +225,7 @@ void wxFrame::GetPosition(int *x, int *y) const *y = point.y; } -void wxFrame::SetSize(const int x, const int y, const int width, const int height, const int sizeFlags) +void wxFrame::SetSize(int x, int y, int width, int height, int sizeFlags) { int currentX, currentY; int x1 = x; @@ -249,16 +246,12 @@ void wxFrame::SetSize(const int x, const int y, const int width, const int heigh MoveWindow((HWND) GetHWND(), x1, y1, w1, h1, (BOOL)TRUE); -#if WXWIN_COMPATIBILITY - GetEventHandler()->OldOnSize(width, height); -#else wxSizeEvent event(wxSize(width, height), m_windowId); event.SetEventObject( this ); GetEventHandler()->ProcessEvent(event); -#endif } -bool wxFrame::Show(const bool show) +bool wxFrame::Show(bool show) { int cshow; if (show) @@ -283,18 +276,14 @@ bool wxFrame::Show(const bool show) { BringWindowToTop((HWND) GetHWND()); -#if WXWIN_COMPATIBILITY - OldOnActivate(TRUE); -#else wxActivateEvent event(wxEVT_ACTIVATE, TRUE, m_windowId); event.SetEventObject( this ); GetEventHandler()->ProcessEvent(event); -#endif } return TRUE; } -void wxFrame::Iconize(const bool iconize) +void wxFrame::Iconize(bool iconize) { if (!iconize) Show(TRUE); @@ -309,7 +298,7 @@ void wxFrame::Iconize(const bool iconize) } // Equivalent to maximize/restore in Windows -void wxFrame::Maximize(const bool maximize) +void wxFrame::Maximize(bool maximize) { Show(TRUE); int cshow; @@ -348,7 +337,7 @@ void wxFrame::SetIcon(const wxIcon& icon) #endif } -wxStatusBar *wxFrame::OnCreateStatusBar(const int number) +wxStatusBar *wxFrame::OnCreateStatusBar(int number) { wxStatusBar *statusBar = NULL; @@ -378,7 +367,7 @@ wxStatusBar *wxFrame::OnCreateStatusBar(const int number) return statusBar; } -bool wxFrame::CreateStatusBar(const int number) +bool wxFrame::CreateStatusBar(int number) { // VZ: calling CreateStatusBar twice is an error - why anyone would do it? wxCHECK_MSG( m_frameStatusBar == NULL, FALSE, @@ -394,14 +383,14 @@ bool wxFrame::CreateStatusBar(const int number) return FALSE; } -void wxFrame::SetStatusText(const wxString& text, const int number) +void wxFrame::SetStatusText(const wxString& text, int number) { wxCHECK_RET( m_frameStatusBar != NULL, "no statusbar to set text for" ); m_frameStatusBar->SetStatusText(text, number); } -void wxFrame::SetStatusWidths(const int n, const int *widths_field) +void wxFrame::SetStatusWidths(int n, int *widths_field) { wxCHECK_RET( m_frameStatusBar != NULL, "no statusbar to set widths for" ); @@ -543,8 +532,8 @@ void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event) * */ -void wxFrame::MSWCreate(const int id, wxWindow *parent, const char *wclass, wxWindow *wx_win, const char *title, - const int x, const int y, const int width, const int height, const long style) +void wxFrame::MSWCreate(int id, wxWindow *parent, const char *wclass, wxWindow *wx_win, const char *title, + int x, int y, int width, int height, long style) { m_defaultIcon = (WXHICON) (wxSTD_FRAME_ICON ? wxSTD_FRAME_ICON : wxDEFAULT_FRAME_ICON); @@ -644,7 +633,10 @@ bool wxFrame::MSWOnPaint(void) } else { - GetEventHandler()->OldOnPaint(); + wxPaintEvent event(m_windowId); + event.m_eventObject = this; + if (!GetEventHandler()->ProcessEvent(event)) + Default(); } return 0; } @@ -659,7 +651,7 @@ WXHICON wxFrame::MSWOnQueryDragIcon(void) return m_defaultIcon; } -void wxFrame::MSWOnSize(const int x, const int y, const WXUINT id) +void wxFrame::MSWOnSize(int x, int y, WXUINT id) { #if DEBUG > 1 wxDebugMsg("wxFrameWnd::OnSize %d\n", m_hWnd); @@ -689,13 +681,10 @@ void wxFrame::MSWOnSize(const int x, const int y, const WXUINT id) #endif PositionStatusBar(); -#if WXWIN_COMPATIBILITY - GetEventHandler()->OldOnSize(x, y); -#else wxSizeEvent event(wxSize(x, y), m_windowId); event.SetEventObject( this ); - GetEventHandler()->ProcessEvent(event); -#endif + if (!GetEventHandler()->ProcessEvent(event)) + Default(); } } @@ -707,7 +696,7 @@ bool wxFrame::MSWOnClose(void) return Close(); } -bool wxFrame::MSWOnCommand(const WXWORD id, const WXWORD cmd, const WXHWND control) +bool wxFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control) { #if DEBUG > 1 wxDebugMsg("wxFrameWnd::OnCommand %d\n", handle); @@ -731,14 +720,8 @@ bool wxFrame::MSWOnCommand(const WXWORD id, const WXWORD cmd, const WXHWND contr return FALSE; } -void wxFrame::MSWOnMenuHighlight(const WXWORD nItem, const WXWORD nFlags, const WXHMENU hSysMenu) +void wxFrame::MSWOnMenuHighlight(WXWORD nItem, WXWORD nFlags, WXHMENU hSysMenu) { -#if WXWIN_COMPATIBILITY - if (nFlags == 0xFFFF && hSysMenu == 0) - GetEventHandler()->OldOnMenuSelect(-1); - else if (nFlags != MF_SEPARATOR) - GetEventHandler()->OldOnMenuSelect(nItem); -#else if (nFlags == 0xFFFF && hSysMenu == 0) { wxMenuEvent event(wxEVT_MENU_HIGHLIGHT, -1); @@ -751,7 +734,6 @@ void wxFrame::MSWOnMenuHighlight(const WXWORD nItem, const WXWORD nFlags, const event.SetEventObject( this ); GetEventHandler()->ProcessEvent(event); } -#endif } bool wxFrame::MSWProcessMessage(WXMSG* pMsg) @@ -870,6 +852,7 @@ void wxFrame::OnMenuHighlight(wxMenuEvent& event) } } +#if 0 #if WXWIN_COMPATIBILITY void wxFrame::OldOnSize(int x, int y) { @@ -973,12 +956,15 @@ void wxFrame::OldOnMenuSelect(int id) } #endif +#endif + // 0 + wxMenuBar *wxFrame::GetMenuBar(void) const { return m_frameMenuBar; } -void wxFrame::Centre(const int direction) +void wxFrame::Centre(int direction) { int display_width, display_height, width, height, x, y; wxDisplaySize(&display_width, &display_height); @@ -1010,17 +996,12 @@ void wxFrame::ProcessCommand(int id) if (!bar) return; - // Motif does the job by itself!! -#ifndef __MOTIF__ wxMenuItem *item = bar->FindItemForId(id) ; if (item && item->IsCheckable()) { -//wxDebugMsg("Toggling id %d\n",id) ; bar->Check(id,!bar->Checked(id)) ; } -#endif - if (!ProcessEvent(commandEvent)) - OldOnMenuCommand(id); + GetEventHandler()->ProcessEvent(commandEvent); } void wxFrame::OnIdle(wxIdleEvent& event) diff --git a/src/msw/gauge95.cpp b/src/msw/gauge95.cpp index 6a2f7c668f..7fbe861c1d 100644 --- a/src/msw/gauge95.cpp +++ b/src/msw/gauge95.cpp @@ -37,11 +37,11 @@ IMPLEMENT_DYNAMIC_CLASS(wxGauge95, wxControl) #endif -bool wxGauge95::Create(wxWindow *parent, const wxWindowID id, - const int range, +bool wxGauge95::Create(wxWindow *parent, wxWindowID id, + int range, const wxPoint& pos, const wxSize& size, - const long style, + long style, const wxValidator& validator, const wxString& name) { @@ -93,7 +93,7 @@ bool wxGauge95::Create(wxWindow *parent, const wxWindowID id, return TRUE; } -void wxGauge95::SetSize(const int x, const int y, const int width, const int height, const int sizeFlags) +void wxGauge95::SetSize(int x, int y, int width, int height, int sizeFlags) { int currentX, currentY; GetPosition(¤tX, ¤tY); @@ -121,32 +121,24 @@ void wxGauge95::SetSize(const int x, const int y, const int width, const int hei h1 = DEFAULT_ITEM_HEIGHT; MoveWindow((HWND) GetHWND(), x1, y1, w1, h1, TRUE); - -#if WXWIN_COMPATIBILITY - GetEventHandler()->OldOnSize(width, height); -#else - wxSizeEvent event(wxSize(width, height), m_windowId); - event.eventObject = this; - GetEventHandler()->ProcessEvent(event); -#endif } -void wxGauge95::SetShadowWidth(const int w) +void wxGauge95::SetShadowWidth(int w) { } -void wxGauge95::SetBezelFace(const int w) +void wxGauge95::SetBezelFace(int w) { } -void wxGauge95::SetRange(const int r) +void wxGauge95::SetRange(int r) { m_rangeMax = r; SendMessage((HWND) GetHWND(), PBM_SETRANGE, 0, MAKELPARAM(0, r)); } -void wxGauge95::SetValue(const int pos) +void wxGauge95::SetValue(int pos) { m_gaugePos = pos; diff --git a/src/msw/gaugemsw.cpp b/src/msw/gaugemsw.cpp index 2edc0586e2..be590a4556 100644 --- a/src/msw/gaugemsw.cpp +++ b/src/msw/gaugemsw.cpp @@ -63,11 +63,11 @@ BOOL FAR PASCAL gaugeInit(HINSTANCE hInstance); IMPLEMENT_DYNAMIC_CLASS(wxGaugeMSW, wxControl) #endif -bool wxGaugeMSW::Create(wxWindow *parent, const wxWindowID id, - const int range, +bool wxGaugeMSW::Create(wxWindow *parent, wxWindowID id, + int range, const wxPoint& pos, const wxSize& size, - const long style, + long style, const wxValidator& validator, const wxString& name) { @@ -140,7 +140,7 @@ bool wxGaugeMSW::Create(wxWindow *parent, const wxWindowID id, return TRUE; } -void wxGaugeMSW::SetSize(const int x, const int y, const int width, const int height, const int sizeFlags) +void wxGaugeMSW::SetSize(int x, int y, int width, int height, int sizeFlags) { int currentX, currentY; GetPosition(¤tX, ¤tY); @@ -168,34 +168,26 @@ void wxGaugeMSW::SetSize(const int x, const int y, const int width, const int he h1 = DEFAULT_ITEM_HEIGHT; MoveWindow((HWND) GetHWND(), x1, y1, w1, h1, TRUE); - -#if WXWIN_COMPATIBILITY - GetEventHandler()->OldOnSize(width, height); -#else - wxSizeEvent event(wxSize(width, height), m_windowId); - event.eventObject = this; - GetEventHandler()->ProcessEvent(event); -#endif } -void wxGaugeMSW::SetShadowWidth(const int w) +void wxGaugeMSW::SetShadowWidth(int w) { SendMessage((HWND) GetHWND(), ZYZG_SETWIDTH3D, w, 0); } -void wxGaugeMSW::SetBezelFace(const int w) +void wxGaugeMSW::SetBezelFace(int w) { SendMessage((HWND) GetHWND(), ZYZG_SETBEZELFACE, w, 0); } -void wxGaugeMSW::SetRange(const int r) +void wxGaugeMSW::SetRange(int r) { m_rangeMax = r; SendMessage((HWND) GetHWND(), ZYZG_SETRANGE, r, 0); } -void wxGaugeMSW::SetValue(const int pos) +void wxGaugeMSW::SetValue(int pos) { m_gaugePos = pos; diff --git a/src/msw/icon.cpp b/src/msw/icon.cpp index 93293f2814..740be06b7d 100644 --- a/src/msw/icon.cpp +++ b/src/msw/icon.cpp @@ -68,11 +68,11 @@ wxIcon::wxIcon(void) { } -wxIcon::wxIcon(const char WXUNUSED(bits)[], const int WXUNUSED(width), const int WXUNUSED(height)) +wxIcon::wxIcon(const char WXUNUSED(bits)[], int WXUNUSED(width), int WXUNUSED(height)) { } -wxIcon::wxIcon(const wxString& icon_file, const long flags, +wxIcon::wxIcon(const wxString& icon_file, long flags, int desiredWidth, int desiredHeight) { @@ -93,7 +93,7 @@ bool wxIcon::FreeResource(bool force) return TRUE; } -bool wxIcon::LoadFile(const wxString& filename, const long type, +bool wxIcon::LoadFile(const wxString& filename, long type, int desiredWidth, int desiredHeight) { UnRef(); @@ -116,7 +116,7 @@ void wxIcon::SetHICON(WXHICON ico) M_ICONDATA->m_hIcon = ico; } -bool wxICOFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, const long flags, +bool wxICOFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags, int desiredWidth, int desiredHeight) { #if USE_RESOURCE_LOADING_IN_MSW @@ -137,7 +137,7 @@ bool wxICOFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, const lo #endif } -bool wxICOResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, const long flags, +bool wxICOResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags, int desiredWidth, int desiredHeight) { if ( bitmap->IsKindOf(CLASSINFO(wxIcon)) ) diff --git a/src/msw/imaglist.cpp b/src/msw/imaglist.cpp index 49ce321f41..e6ca103540 100644 --- a/src/msw/imaglist.cpp +++ b/src/msw/imaglist.cpp @@ -66,7 +66,7 @@ int wxImageList::GetImageCount(void) const //////////////////////////////////////////////////////////////////////////// // Creates an image list -bool wxImageList::Create(const int width, const int height, const bool mask, const int initial) +bool wxImageList::Create(int width, int height, bool mask, int initial) { UINT flags = 0; if ( mask ) @@ -109,7 +109,7 @@ int wxImageList::Add(const wxIcon& icon) // Replaces a bitmap, optionally passing a mask bitmap. // Note that wxImageList creates new bitmaps, so you may delete // 'bitmap' and 'mask'. -bool wxImageList::Replace(const int index, const wxBitmap& bitmap, const wxBitmap& mask) +bool wxImageList::Replace(int index, const wxBitmap& bitmap, const wxBitmap& mask) { HBITMAP hBitmap1 = (HBITMAP) bitmap.GetHBITMAP(); HBITMAP hBitmap2 = 0; @@ -122,7 +122,7 @@ bool wxImageList::Replace(const int index, const wxBitmap& bitmap, const wxBitma // Replacing a bitmap, using the specified colour to create the mask bitmap // Note that wxImageList creates new bitmaps, so you may delete // 'bitmap'. -bool wxImageList::Replace(const int index, const wxBitmap& bitmap, const wxColour& maskColour) +bool wxImageList::Replace(int index, const wxBitmap& bitmap, const wxColour& maskColour) { HBITMAP hBitmap1 = (HBITMAP) bitmap.GetHBITMAP(); COLORREF colorRef = PALETTERGB(maskColour.Red(), maskColour.Green(), maskColour.Blue()); @@ -131,14 +131,14 @@ bool wxImageList::Replace(const int index, const wxBitmap& bitmap, const wxColou */ // Replaces a bitmap and mask from an icon. -bool wxImageList::Replace(const int index, const wxIcon& icon) +bool wxImageList::Replace(int index, const wxIcon& icon) { HICON hIcon = (HICON) icon.GetHICON(); return (ImageList_ReplaceIcon((HIMAGELIST) GetHIMAGELIST(), index, hIcon) != 0); } // Removes the image at the given index. -bool wxImageList::Remove(const int index) +bool wxImageList::Remove(int index) { return (ImageList_Remove((HIMAGELIST) GetHIMAGELIST(), index) != 0); } @@ -158,8 +158,8 @@ bool wxImageList::RemoveAll(void) // If 'solidBackground' is TRUE, Draw sets the image list background // colour to the background colour of the wxDC, to speed up // drawing by eliminating masked drawing where possible. -bool wxImageList::Draw(const int index, wxDC& dc, const int x, const int y, - const int flags, const bool solidBackground) +bool wxImageList::Draw(int index, wxDC& dc, int x, int y, + int flags, bool solidBackground) { HDC hDC = (HDC) dc.GetHDC(); if ( !hDC ) diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp index d1db5e48b3..0ffc6ec3c8 100644 --- a/src/msw/listbox.cpp +++ b/src/msw/listbox.cpp @@ -81,7 +81,7 @@ wxOwnerDrawn *wxListBox::CreateItem(uint n) // this macro is dangerous but still better than tons of (HWND)GetHWND() #define hwnd (HWND)GetHWND() -bool wxListBox::MSWCommand(const WXUINT param, const WXWORD WXUNUSED(id)) +bool wxListBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) { /* if (param == LBN_SELCANCEL) @@ -118,7 +118,9 @@ bool wxListBox::MSWCommand(const WXUINT param, const WXWORD WXUNUSED(id)) { wxCommandEvent event(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, m_windowId); event.SetEventObject( this ); - if ( !GetEventHandler()->ProcessEvent(event) ) + GetEventHandler()->ProcessEvent(event) ; + return TRUE; +/* { #if WXWIN_COMPATIBILITY wxWindow *parent = (wxWindow *)GetParent(); @@ -127,6 +129,7 @@ bool wxListBox::MSWCommand(const WXUINT param, const WXWORD WXUNUSED(id)) #endif return TRUE; } + */ } return FALSE; } @@ -138,11 +141,11 @@ wxListBox::wxListBox(void) m_selected = 0; } -bool wxListBox::Create(wxWindow *parent, const wxWindowID id, +bool wxListBox::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - const int n, const wxString choices[], - const long style, + int n, const wxString choices[], + long style, const wxValidator& validator, const wxString& name) { @@ -266,7 +269,7 @@ void wxListBox::SetupColours(void) SetForegroundColour(GetParent()->GetDefaultForegroundColour()); } -void wxListBox::SetFirstItem(const int N) +void wxListBox::SetFirstItem(int N) { SendMessage(hwnd,LB_SETTOPINDEX,(WPARAM)N,(LPARAM)0) ; } @@ -279,7 +282,7 @@ void wxListBox::SetFirstItem(const wxString& s) SetFirstItem(N) ; } -void wxListBox::Delete(const int N) +void wxListBox::Delete(int N) { SendMessage(hwnd, LB_DELETESTRING, N, 0); m_noItems --; @@ -321,7 +324,7 @@ void wxListBox::Append(const wxString& item, char *Client_data) SetHorizontalExtent(item); } -void wxListBox::Set(const int n, const wxString *choices, char** clientData) +void wxListBox::Set(int n, const wxString *choices, char** clientData) { ShowWindow(hwnd, SW_HIDE); ListBox_ResetContent(hwnd); @@ -377,7 +380,7 @@ void wxListBox::Clear(void) ListBox_GetHorizontalExtent(hwnd); } -void wxListBox::SetSelection(const int N, const bool select) +void wxListBox::SetSelection(int N, bool select) { if ((m_windowStyle & wxLB_MULTIPLE) || (m_windowStyle & wxLB_EXTENDED)) SendMessage(hwnd, LB_SETSEL, select, N); @@ -390,23 +393,23 @@ void wxListBox::SetSelection(const int N, const bool select) } } -bool wxListBox::Selected(const int N) const +bool wxListBox::Selected(int N) const { return SendMessage(hwnd, LB_GETSEL, N, 0) == 0 ? FALSE : TRUE; } -void wxListBox::Deselect(const int N) +void wxListBox::Deselect(int N) { if ((m_windowStyle & wxLB_MULTIPLE) || (m_windowStyle & wxLB_EXTENDED)) SendMessage(hwnd, LB_SETSEL, FALSE, N); } -char *wxListBox::GetClientData(const int N) const +char *wxListBox::GetClientData(int N) const { return (char *)SendMessage(hwnd, LB_GETITEMDATA, N, 0); } -void wxListBox::SetClientData(const int N, char *Client_data) +void wxListBox::SetClientData(int N, char *Client_data) { if ( ListBox_SetItemData(hwnd, N, Client_data) == LB_ERR ) wxLogDebug("LB_SETITEMDATA failed"); @@ -456,7 +459,7 @@ int wxListBox::GetSelection() const } // Find string for position -wxString wxListBox::GetString(const int N) const +wxString wxListBox::GetString(int N) const { if (N < 0 || N > m_noItems) return wxString(""); @@ -466,7 +469,7 @@ wxString wxListBox::GetString(const int N) const return wxString(wxBuffer); } -void wxListBox::SetSize(const int x, const int y, const int width, const int height, const int sizeFlags) +void wxListBox::SetSize(int x, int y, int width, int height, int sizeFlags) { int currentX, currentY; GetPosition(¤tX, ¤tY); @@ -517,16 +520,6 @@ void wxListBox::SetSize(const int x, const int y, const int width, const int hei MoveWindow(hwnd, (int)control_x, (int)control_y, (int)control_width, (int)control_height, TRUE); -/* -#if WXWIN_COMPATIBILITY - GetEventHandler()->OldOnSize(width, height); -#else - wxSizeEvent event(wxSize(width, height), m_windowId); - event.eventObject = this; - GetEventHandler()->ProcessEvent(event); -#endif -*/ - } // Windows-specific code to set the horizontal extent of @@ -590,7 +583,7 @@ void wxListBox::SetHorizontalExtent(const wxString& s) } void -wxListBox::InsertItems(const int nItems, const wxString items[], const int pos) +wxListBox::InsertItems(int nItems, const wxString items[], int pos) { int i; for (i = 0; i < nItems; i++) @@ -611,7 +604,7 @@ wxListBox::InsertItems(const int nItems, const wxString items[], const int pos) SetHorizontalExtent(""); } -void wxListBox::SetString(const int N, const wxString& s) +void wxListBox::SetString(int N, const wxString& s) { int sel = GetSelection(); @@ -653,7 +646,7 @@ wxString wxListBox::GetStringSelection (void) const return wxString(""); } -bool wxListBox::SetStringSelection (const wxString& s, const bool flag) +bool wxListBox::SetStringSelection (const wxString& s, bool flag) { int sel = FindString (s); if (sel > -1) @@ -683,7 +676,7 @@ void wxListBox::Command (wxCommandEvent & event) ProcessCommand (event); } -WXHBRUSH wxListBox::OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, +WXHBRUSH wxListBox::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam) { #if CTL3D @@ -733,9 +726,9 @@ long wxListBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) case WM_LBUTTONUP: case WM_LBUTTONDBLCLK: case WM_MOUSEMOVE: - case WM_DESTROY: case WM_COMMAND: case WM_NOTIFY: + case WM_DESTROY: case WM_MENUSELECT: case WM_INITMENUPOPUP: case WM_DRAWITEM: @@ -763,6 +756,7 @@ long wxListBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) return MSWDefWindowProc(nMsg, wParam, lParam ); } #endif + return wxControl::MSWWindowProc(nMsg, wParam, lParam); } diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 5a7242ced4..e595d65996 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -56,8 +56,8 @@ wxListCtrl::wxListCtrl(void) m_colCount = 0; } -bool wxListCtrl::Create(wxWindow *parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, - const long style, const wxValidator& validator, const wxString& name) +bool wxListCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, + long style, const wxValidator& validator, const wxString& name) { m_imageListNormal = NULL; m_imageListSmall = NULL; @@ -133,7 +133,7 @@ wxListCtrl::~wxListCtrl(void) } // Add or remove a single window style -void wxListCtrl::SetSingleStyle(const long style, const bool add) +void wxListCtrl::SetSingleStyle(long style, bool add) { long flag = GetWindowStyleFlag(); @@ -167,7 +167,7 @@ void wxListCtrl::SetSingleStyle(const long style, const bool add) } // Set the whole window style -void wxListCtrl::SetWindowStyleFlag(const long flag) +void wxListCtrl::SetWindowStyleFlag(long flag) { m_windowStyle = flag; @@ -221,7 +221,7 @@ void wxListCtrl::RecreateWindow(void) } // Can be just a single style, or a bitlist -long wxListCtrl::ConvertToMSWStyle(long& oldStyle, const long style) const +long wxListCtrl::ConvertToMSWStyle(long& oldStyle, long style) const { long wstyle = 0; if ( style & wxLC_ICON ) @@ -330,7 +330,7 @@ void wxListCtrl::SetBackgroundColour(const wxColour& col) } // Gets information about this column -bool wxListCtrl::GetColumn(const int col, wxListItem& item) const +bool wxListCtrl::GetColumn(int col, wxListItem& item) const { LV_COLUMN lvCol; lvCol.mask = 0; @@ -369,7 +369,7 @@ bool wxListCtrl::GetColumn(const int col, wxListItem& item) const } // Sets information about this column -bool wxListCtrl::SetColumn(const int col, wxListItem& item) +bool wxListCtrl::SetColumn(int col, wxListItem& item) { LV_COLUMN lvCol; lvCol.mask = 0; @@ -410,13 +410,13 @@ bool wxListCtrl::SetColumn(const int col, wxListItem& item) } // Gets the column width -int wxListCtrl::GetColumnWidth(const int col) const +int wxListCtrl::GetColumnWidth(int col) const { return ListView_GetColumnWidth((HWND) GetHWND(), col); } // Sets the column width -bool wxListCtrl::SetColumnWidth(const int col, const int width) +bool wxListCtrl::SetColumnWidth(int col, int width) { int col2 = col; if ( m_windowStyle & wxLC_LIST ) @@ -485,7 +485,7 @@ bool wxListCtrl::SetItem(wxListItem& info) return (ListView_SetItem((HWND) GetHWND(), &item) != 0); } -long wxListCtrl::SetItem(const long index, const int col, const wxString& label, const int imageId) +long wxListCtrl::SetItem(long index, int col, const wxString& label, int imageId) { wxListItem info; info.m_text = label; @@ -502,7 +502,7 @@ long wxListCtrl::SetItem(const long index, const int col, const wxString& label, // Gets the item state -int wxListCtrl::GetItemState(const long item, const long stateMask) const +int wxListCtrl::GetItemState(long item, long stateMask) const { wxListItem info; @@ -517,7 +517,7 @@ int wxListCtrl::GetItemState(const long item, const long stateMask) const } // Sets the item state -bool wxListCtrl::SetItemState(const long item, const long state, const long stateMask) +bool wxListCtrl::SetItemState(long item, long state, long stateMask) { wxListItem info; @@ -530,7 +530,7 @@ bool wxListCtrl::SetItemState(const long item, const long state, const long stat } // Sets the item image -bool wxListCtrl::SetItemImage(const long item, const int image, const int selImage) +bool wxListCtrl::SetItemImage(long item, int image, int selImage) { wxListItem info; @@ -542,7 +542,7 @@ bool wxListCtrl::SetItemImage(const long item, const int image, const int selIma } // Gets the item text -wxString wxListCtrl::GetItemText(const long item) const +wxString wxListCtrl::GetItemText(long item) const { wxListItem info; @@ -555,7 +555,7 @@ wxString wxListCtrl::GetItemText(const long item) const } // Sets the item text -void wxListCtrl::SetItemText(const long item, const wxString& str) +void wxListCtrl::SetItemText(long item, const wxString& str) { wxListItem info; @@ -567,7 +567,7 @@ void wxListCtrl::SetItemText(const long item, const wxString& str) } // Gets the item data -long wxListCtrl::GetItemData(const long item) const +long wxListCtrl::GetItemData(long item) const { wxListItem info; @@ -580,7 +580,7 @@ long wxListCtrl::GetItemData(const long item) const } // Sets the item data -bool wxListCtrl::SetItemData(const long item, long data) +bool wxListCtrl::SetItemData(long item, long data) { wxListItem info; @@ -592,7 +592,7 @@ bool wxListCtrl::SetItemData(const long item, long data) } // Gets the item rectangle -bool wxListCtrl::GetItemRect(const long item, wxRectangle& rect, const int code) const +bool wxListCtrl::GetItemRect(long item, wxRectangle& rect, int code) const { RECT rect2; @@ -614,7 +614,7 @@ bool wxListCtrl::GetItemRect(const long item, wxRectangle& rect, const int code) } // Gets the item position -bool wxListCtrl::GetItemPosition(const long item, wxPoint& pos) const +bool wxListCtrl::GetItemPosition(long item, wxPoint& pos) const { POINT pt; @@ -625,7 +625,7 @@ bool wxListCtrl::GetItemPosition(const long item, wxPoint& pos) const } // Sets the item position. -bool wxListCtrl::SetItemPosition(const long item, const wxPoint& pos) +bool wxListCtrl::SetItemPosition(long item, const wxPoint& pos) { return (ListView_SetItemPosition((HWND) GetHWND(), (int) item, pos.x, pos.y) != 0); } @@ -679,7 +679,7 @@ long wxListCtrl::GetTopItem(void) const // item can be -1 to find the first item that matches the // specified flags. // Returns the item or -1 if unsuccessful. -long wxListCtrl::GetNextItem(const long item, int geom, int state) const +long wxListCtrl::GetNextItem(long item, int geom, int state) const { long flags = 0; @@ -707,7 +707,7 @@ long wxListCtrl::GetNextItem(const long item, int geom, int state) const } -wxImageList *wxListCtrl::GetImageList(const int which) const +wxImageList *wxListCtrl::GetImageList(int which) const { if ( which == wxIMAGE_LIST_NORMAL ) { @@ -724,7 +724,7 @@ wxImageList *wxListCtrl::GetImageList(const int which) const return NULL; } -void wxListCtrl::SetImageList(wxImageList *imageList, const int which) +void wxListCtrl::SetImageList(wxImageList *imageList, int which) { int flags = 0; if ( which == wxIMAGE_LIST_NORMAL ) @@ -749,7 +749,7 @@ void wxListCtrl::SetImageList(wxImageList *imageList, const int which) //////////////////////////////////////////////////////////////////////////// // Arranges the items -bool wxListCtrl::Arrange(const int flag) +bool wxListCtrl::Arrange(int flag) { UINT code = 0; if ( flag == wxLIST_ALIGN_LEFT ) @@ -765,7 +765,7 @@ bool wxListCtrl::Arrange(const int flag) } // Deletes an item -bool wxListCtrl::DeleteItem(const long item) +bool wxListCtrl::DeleteItem(long item) { return (ListView_DeleteItem((HWND) GetHWND(), (int) item) != 0); } @@ -789,7 +789,7 @@ bool wxListCtrl::DeleteAllColumns(void) } // Deletes a column -bool wxListCtrl::DeleteColumn(const int col) +bool wxListCtrl::DeleteColumn(int col) { bool success = (ListView_DeleteColumn((HWND) GetHWND(), col) != 0); @@ -807,7 +807,7 @@ void wxListCtrl::ClearAll(void) } // Edits a label -wxTextCtrl& wxListCtrl::Edit(const long item) +wxTextCtrl& wxListCtrl::Edit(long item) { HWND hWnd = (HWND) ListView_EditLabel((HWND) GetHWND(), (int) item); m_textCtrl.SetHWND((WXHWND) hWnd); @@ -815,14 +815,14 @@ wxTextCtrl& wxListCtrl::Edit(const long item) } // Ensures this item is visible -bool wxListCtrl::EnsureVisible(const long item) +bool wxListCtrl::EnsureVisible(long item) { return (ListView_EnsureVisible((HWND) GetHWND(), (int) item, FALSE) != 0); } // Find an item whose label matches this string, starting from the item after 'start' // or the beginning if 'start' is -1. -long wxListCtrl::FindItem(const long start, const wxString& str, const bool partial) +long wxListCtrl::FindItem(long start, const wxString& str, bool partial) { LV_FINDINFO findInfo; @@ -836,7 +836,7 @@ long wxListCtrl::FindItem(const long start, const wxString& str, const bool part // Find an item whose data matches this data, starting from the item after 'start' // or the beginning if 'start' is -1. -long wxListCtrl::FindItem(const long start, const long data) +long wxListCtrl::FindItem(long start, long data) { LV_FINDINFO findInfo; @@ -848,7 +848,7 @@ long wxListCtrl::FindItem(const long start, const long data) // Find an item nearest this position in the specified direction, starting from // the item after 'start' or the beginning if 'start' is -1. -long wxListCtrl::FindItem(const long start, const wxPoint& pt, const int direction) +long wxListCtrl::FindItem(long start, const wxPoint& pt, int direction) { LV_FINDINFO findInfo; @@ -910,7 +910,7 @@ long wxListCtrl::InsertItem(wxListItem& info) return (long) ListView_InsertItem((HWND) GetHWND(), & item); } -long wxListCtrl::InsertItem(const long index, const wxString& label) +long wxListCtrl::InsertItem(long index, const wxString& label) { wxListItem info; info.m_text = label; @@ -920,7 +920,7 @@ long wxListCtrl::InsertItem(const long index, const wxString& label) } // Inserts an image item -long wxListCtrl::InsertItem(const long index, const int imageIndex) +long wxListCtrl::InsertItem(long index, int imageIndex) { wxListItem info; info.m_image = imageIndex; @@ -930,7 +930,7 @@ long wxListCtrl::InsertItem(const long index, const int imageIndex) } // Inserts an image/string item -long wxListCtrl::InsertItem(const long index, const wxString& label, const int imageIndex) +long wxListCtrl::InsertItem(long index, const wxString& label, int imageIndex) { wxListItem info; info.m_image = imageIndex; @@ -941,7 +941,7 @@ long wxListCtrl::InsertItem(const long index, const wxString& label, const int i } // For list view mode (only), inserts a column. -long wxListCtrl::InsertColumn(const long col, wxListItem& item) +long wxListCtrl::InsertColumn(long col, wxListItem& item) { LV_COLUMN lvCol; lvCol.mask = 0; @@ -985,8 +985,8 @@ long wxListCtrl::InsertColumn(const long col, wxListItem& item) return success; } -long wxListCtrl::InsertColumn(const long col, const wxString& heading, const int format, - const int width) +long wxListCtrl::InsertColumn(long col, const wxString& heading, int format, + int width) { wxListItem item; item.m_mask = wxLIST_MASK_TEXT | wxLIST_MASK_FORMAT; @@ -1006,7 +1006,7 @@ long wxListCtrl::InsertColumn(const long col, const wxString& heading, const int // specifies the number of columns to scroll. // If in icon, small icon or list view mode, y specifies the number of pixels // to scroll. If in report view mode, y specifies the number of lines to scroll. -bool wxListCtrl::ScrollList(const int dx, const int dy) +bool wxListCtrl::ScrollList(int dx, int dy) { return (ListView_Scroll((HWND) GetHWND(), dx, dy) != 0); } @@ -1027,7 +1027,7 @@ bool wxListCtrl::SortItems(wxListCtrlCompare fn, long data) return (ListView_SortItems((HWND) GetHWND(), (PFNLVCOMPARE) fn, data) != 0); } -bool wxListCtrl::MSWCommand(const WXUINT cmd, const WXWORD id) +bool wxListCtrl::MSWCommand(WXUINT cmd, WXWORD id) { if (cmd == EN_UPDATE) { @@ -1046,7 +1046,7 @@ bool wxListCtrl::MSWCommand(const WXUINT cmd, const WXWORD id) else return FALSE; } -bool wxListCtrl::MSWNotify(const WXWPARAM wParam, const WXLPARAM lParam) +bool wxListCtrl::MSWNotify(WXWPARAM wParam, WXLPARAM lParam) { wxListEvent event(wxEVT_NULL, m_windowId); wxEventType eventType = wxEVT_NULL; diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index 7b808ede83..437f46b068 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -86,11 +86,11 @@ wxMDIParentFrame::wxMDIParentFrame(void) } bool wxMDIParentFrame::Create(wxWindow *parent, - const wxWindowID id, + wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, - const long style, + long style, const wxString& name) { m_defaultIcon = (WXHICON) (wxSTD_MDIPARENTFRAME_ICON ? wxSTD_MDIPARENTFRAME_ICON : wxDEFAULT_MDIPARENTFRAME_ICON); @@ -303,6 +303,7 @@ void wxMDIParentFrame::OnActivate(wxActivateEvent& event) } #if WXWIN_COMPATIBILITY +/* void wxMDIParentFrame::OldOnSize(int x, int y) { #if WXWIN_COMPATIBILITY == 1 @@ -344,6 +345,7 @@ void wxMDIParentFrame::OldOnActivate(bool flag) #else #endif } +*/ #endif @@ -434,7 +436,7 @@ void wxMDIParentFrame::MSWOnCreate(WXLPCREATESTRUCT WXUNUSED(cs)) m_clientWindow->CreateClient(this, GetWindowStyleFlag()); } -void wxMDIParentFrame::MSWOnSize(const int x, const int y, const WXUINT id) +void wxMDIParentFrame::MSWOnSize(int x, int y, WXUINT id) { switch (id) { @@ -462,11 +464,14 @@ void wxMDIParentFrame::MSWOnSize(const int x, const int y, const WXUINT id) PositionStatusBar(); - GetEventHandler()->OldOnSize(x, y); + wxSizeEvent event(wxSize(x, y), m_windowId); + event.SetEventObject( this ); + if (!GetEventHandler()->ProcessEvent(event)) + Default(); } } -bool wxMDIParentFrame::MSWOnActivate(const int state, const bool minimized, const WXHWND activate) +bool wxMDIParentFrame::MSWOnActivate(int state, bool minimized, WXHWND activate) { wxWindow::MSWOnActivate(state, minimized, activate); @@ -474,19 +479,14 @@ bool wxMDIParentFrame::MSWOnActivate(const int state, const bool minimized, cons // to the current child. if ((m_currentChild != NULL) && ((state == WA_ACTIVE) || (state == WA_CLICKACTIVE))) { -#if WXWIN_COMPATIBILITY - m_currentChild->GetEventHandler()->OldOnActivate(TRUE); -#else - wxActivateEvent event(wxEVT_ACTIVATE, TRUE, - m_currentChild.m_windowId); - event.eventObject = m_currentChild; - m_currentChild->GetEventHandler()->ProcessEvent(event); -#endif + wxActivateEvent event(wxEVT_ACTIVATE, TRUE, m_currentChild->GetId()); + event.SetEventObject( m_currentChild ); + m_currentChild->GetEventHandler()->ProcessEvent(event); } return 0; } -bool wxMDIParentFrame::MSWOnCommand(const WXWORD id, const WXWORD cmd, const WXHWND control) +bool wxMDIParentFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control) { if (cmd == 0) { @@ -567,15 +567,22 @@ bool wxMDIParentFrame::MSWOnCommand(const WXWORD id, const WXWORD cmd, const WXH return FALSE; } -void wxMDIParentFrame::MSWOnMenuHighlight(const WXWORD nItem, const WXWORD nFlags, const WXHMENU hSysMenu) +void wxMDIParentFrame::MSWOnMenuHighlight(WXWORD nItem, WXWORD nFlags, WXHMENU hSysMenu) { if (m_parentFrameActive) { - // TODO if (nFlags == 0xFFFF && hSysMenu == (WXHMENU) NULL) - GetEventHandler()->OldOnMenuSelect(-1); + { + wxMenuEvent event(wxEVT_MENU_HIGHLIGHT, -1); + event.SetEventObject( this ); + GetEventHandler()->ProcessEvent(event); + } else if (nFlags != MF_SEPARATOR) - GetEventHandler()->OldOnMenuSelect(nItem); + { + wxMenuEvent event(wxEVT_MENU_HIGHLIGHT, nItem); + event.SetEventObject( this ); + GetEventHandler()->ProcessEvent(event); + } } else if (m_currentChild) { @@ -614,7 +621,7 @@ bool wxMDIParentFrame::MSWProcessMessage(WXMSG* msg) return FALSE; } -bool wxMDIParentFrame::MSWOnEraseBkgnd(const WXHDC WXUNUSED(pDC)) +bool wxMDIParentFrame::MSWOnEraseBkgnd(WXHDC WXUNUSED(pDC)) { return TRUE; } @@ -628,11 +635,11 @@ wxMDIChildFrame::wxMDIChildFrame(void) } bool wxMDIChildFrame::Create(wxMDIParentFrame *parent, - const wxWindowID id, + wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, - const long style, + long style, const wxString& name) { m_defaultIcon = (WXHICON) (wxSTD_MDICHILDFRAME_ICON ? wxSTD_MDICHILDFRAME_ICON : wxDEFAULT_MDICHILDFRAME_ICON); @@ -718,7 +725,7 @@ wxMDIChildFrame::~wxMDIChildFrame(void) // Set the client size (i.e. leave the calculation of borders etc. // to wxWindows) -void wxMDIChildFrame::SetClientSize(const int width, const int height) +void wxMDIChildFrame::SetClientSize(int width, int height) { HWND hWnd = (HWND) GetHWND(); @@ -751,13 +758,10 @@ void wxMDIChildFrame::SetClientSize(const int width, const int height) ::ScreenToClient((HWND) mdiParent->GetClientWindow()->GetHWND(), &point); MoveWindow(hWnd, point.x, point.y, actual_width, actual_height, (BOOL)TRUE); -#if WXWIN_COMPATIBILITY - GetEventHandler()->OldOnSize(width, height); -#else + wxSizeEvent event(wxSize(width, height), m_windowId); - event.eventObject = this; + event.SetEventObject( this ); GetEventHandler()->ProcessEvent(event); -#endif } void wxMDIChildFrame::GetPosition(int *x, int *y) const @@ -873,7 +877,7 @@ void wxMDIChildFrame::Activate(void) } static HWND invalidHandle = 0; -void wxMDIChildFrame::MSWOnSize(const int x, const int y, const WXUINT id) +void wxMDIChildFrame::MSWOnSize(int x, int y, WXUINT id) { if (!GetHWND()) return; @@ -917,7 +921,7 @@ void wxMDIChildFrame::MSWOnSize(const int x, const int y, const WXUINT id) } } -bool wxMDIChildFrame::MSWOnCommand(const WXWORD id, const WXWORD cmd, const WXHWND control) +bool wxMDIChildFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control) { #if DEBUG > 1 wxDebugMsg("wxMDIChildFrame::MSWOnCommand %d\n", GetHWND()); @@ -961,7 +965,7 @@ bool wxMDIChildFrame::MSWProcessMessage(WXMSG *msg) return FALSE; } -long wxMDIChildFrame::MSWOnMDIActivate(const long activate, const WXHWND WXUNUSED(one), const WXHWND WXUNUSED(two)) +long wxMDIChildFrame::MSWOnMDIActivate(long activate, WXHWND WXUNUSED(one), WXHWND WXUNUSED(two)) { wxMDIParentFrame *parent = (wxMDIParentFrame *)GetParent(); HMENU parent_menu = (HMENU) parent->GetWinMenu(); @@ -996,13 +1000,18 @@ long wxMDIChildFrame::MSWOnMDIActivate(const long activate, const WXHWND WXUNUSE ::DrawMenuBar((HWND) parent->GetHWND()); } - GetEventHandler()->OldOnActivate(TRUE); + wxActivateEvent event(wxEVT_ACTIVATE, TRUE, m_windowId); + event.SetEventObject( this ); + GetEventHandler()->ProcessEvent(event); } else { if (parent->m_currentChild == this) parent->m_currentChild = NULL; - GetEventHandler()->OldOnActivate(FALSE); + + wxActivateEvent event(wxEVT_ACTIVATE, FALSE, m_windowId); + event.SetEventObject( this ); + GetEventHandler()->ProcessEvent(event); // m_active = FALSE; if (parent_menu) @@ -1025,9 +1034,11 @@ long wxMDIChildFrame::MSWOnMDIActivate(const long activate, const WXHWND WXUNUSE ::DrawMenuBar((HWND) parent->GetHWND()); } } - // TODO bool flag = (activate != 0); - GetEventHandler()->OldOnActivate(flag); + wxActivateEvent event(wxEVT_ACTIVATE, flag, m_windowId); + event.SetEventObject( this ); + GetEventHandler()->ProcessEvent(event); + #if DEBUG > 1 wxDebugMsg("Finished (de)activating\n"); #endif @@ -1142,7 +1153,7 @@ wxMDIClientWindow::~wxMDIClientWindow(void) { } -bool wxMDIClientWindow::CreateClient(wxMDIParentFrame *parent, const long style) +bool wxMDIClientWindow::CreateClient(wxMDIParentFrame *parent, long style) { m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE); @@ -1208,7 +1219,7 @@ void wxMDIClientWindow::OnScroll(wxScrollEvent& event) } // Should hand the message to the default proc -long wxMDIClientWindow::MSWOnMDIActivate(const long bActivate, const WXHWND, const WXHWND) +long wxMDIClientWindow::MSWOnMDIActivate(long bActivate, WXHWND, WXHWND) { return Default(); } diff --git a/src/msw/menu.cpp b/src/msw/menu.cpp index c64edd9f33..8a5350df2a 100644 --- a/src/msw/menu.cpp +++ b/src/msw/menu.cpp @@ -371,7 +371,7 @@ wxString wxMenu::GetLabel(int Id) const return wxString(tmp) ; } -bool wxMenu::MSWCommand(const WXUINT WXUNUSED(param), const WXWORD id) +bool wxMenu::MSWCommand(WXUINT WXUNUSED(param), WXWORD id) { wxCommandEvent event(wxEVENT_TYPE_MENU_COMMAND); event.SetEventObject( this ); @@ -408,7 +408,7 @@ int wxMenu::FindItem (const wxString& itemString) const return -1; } -wxMenuItem *wxMenu::FindItemForId(const int itemId, wxMenu ** itemMenu) const +wxMenuItem *wxMenu::FindItemForId(int itemId, wxMenu ** itemMenu) const { if (itemMenu) *itemMenu = NULL; @@ -436,14 +436,14 @@ wxMenuItem *wxMenu::FindItemForId(const int itemId, wxMenu ** itemMenu) const return NULL; } -void wxMenu::SetHelpString(const int itemId, const wxString& helpString) +void wxMenu::SetHelpString(int itemId, const wxString& helpString) { wxMenuItem *item = FindItemForId (itemId); if (item) item->SetHelp(helpString); } -wxString wxMenu::GetHelpString (const int itemId) const +wxString wxMenu::GetHelpString (int itemId) const { wxMenuItem *item = FindItemForId (itemId); wxString str(""); @@ -474,7 +474,7 @@ void wxMenu::ProcessCommand(wxCommandEvent & event) } extern wxMenu *wxCurrentPopupMenu; -bool wxWindow::PopupMenu(wxMenu *menu, const int x, const int y) +bool wxWindow::PopupMenu(wxMenu *menu, int x, int y) { menu->SetInvokingWindow(this); @@ -506,7 +506,7 @@ wxMenuBar::wxMenuBar(void) m_hMenu = 0; } -wxMenuBar::wxMenuBar(const int N, wxMenu *Menus[], const wxString Titles[]) +wxMenuBar::wxMenuBar(int N, wxMenu *Menus[], const wxString Titles[]) { m_eventHandler = this; m_menuCount = N; @@ -563,7 +563,7 @@ wxMenuBar::~wxMenuBar(void) // Must only be used AFTER menu has been attached to frame, // otherwise use individual menus to enable/disable items -void wxMenuBar::Enable(const int Id, const bool Flag) +void wxMenuBar::Enable(int Id, bool Flag) { int ms_flag; if (Flag) @@ -583,7 +583,7 @@ void wxMenuBar::Enable(const int Id, const bool Flag) } -void wxMenuBar::EnableTop(const int pos, const bool flag) +void wxMenuBar::EnableTop(int pos, bool flag) { int ms_flag; if (flag) @@ -597,7 +597,7 @@ void wxMenuBar::EnableTop(const int pos, const bool flag) // Must only be used AFTER menu has been attached to frame, // otherwise use individual menus -void wxMenuBar::Check(const int Id, const bool Flag) +void wxMenuBar::Check(int Id, bool Flag) { wxMenu *itemMenu = NULL; wxMenuItem *item = FindItemForId(Id, &itemMenu) ; @@ -620,7 +620,7 @@ void wxMenuBar::Check(const int Id, const bool Flag) // CheckMenuItem((HMENU)m_hMenu, Id, MF_BYCOMMAND | ms_flag); } -bool wxMenuBar::Checked(const int Id) const +bool wxMenuBar::Checked(int Id) const { wxMenu *itemMenu = NULL; wxMenuItem *item = FindItemForId(Id, &itemMenu) ; @@ -642,7 +642,7 @@ bool wxMenuBar::Checked(const int Id) const return FALSE ; } -bool wxMenuBar::Enabled(const int Id) const +bool wxMenuBar::Enabled(int Id) const { wxMenu *itemMenu = NULL; wxMenuItem *item = FindItemForId(Id, &itemMenu) ; @@ -663,7 +663,7 @@ bool wxMenuBar::Enabled(const int Id) const } -void wxMenuBar::SetLabel(const int Id, const wxString& label) +void wxMenuBar::SetLabel(int Id, const wxString& label) { wxMenu *itemMenu = NULL; wxMenuItem *item = FindItemForId(Id, &itemMenu) ; @@ -683,7 +683,7 @@ void wxMenuBar::SetLabel(const int Id, const wxString& label) } } -wxString wxMenuBar::GetLabel(const int Id) const +wxString wxMenuBar::GetLabel(int Id) const { wxMenu *itemMenu = NULL; wxMenuItem *item = FindItemForId(Id, &itemMenu) ; @@ -707,7 +707,7 @@ wxString wxMenuBar::GetLabel(const int Id) const return wxString(tmp) ; } -void wxMenuBar::SetLabelTop(const int pos, const wxString& label) +void wxMenuBar::SetLabelTop(int pos, const wxString& label) { UINT was_flag = GetMenuState((HMENU)m_hMenu,pos,MF_BYPOSITION) ; if (was_flag&MF_POPUP) @@ -720,7 +720,7 @@ void wxMenuBar::SetLabelTop(const int pos, const wxString& label) ModifyMenu((HMENU)m_hMenu,pos,MF_BYPOSITION|MF_STRING|was_flag,pos,(const char *)label) ; } -wxString wxMenuBar::GetLabelTop(const int pos) const +wxString wxMenuBar::GetLabelTop(int pos) const { static char tmp[128] ; int len = GetMenuString((HMENU)m_hMenu,pos,tmp,127,MF_BYPOSITION) ; @@ -728,7 +728,7 @@ wxString wxMenuBar::GetLabelTop(const int pos) const return wxString(tmp); } -bool wxMenuBar::OnDelete(wxMenu *a_menu, const int pos) +bool wxMenuBar::OnDelete(wxMenu *a_menu, int pos) { if (!m_menuBarFrame) return TRUE; @@ -797,7 +797,7 @@ void wxMenuBar::Append (wxMenu * menu, const wxString& title) ((wxMenu *)menu)->SetParent(this); } -void wxMenuBar::Delete(wxMenu * menu, const int i) +void wxMenuBar::Delete(wxMenu * menu, int i) { int j; int ii = (int) i; @@ -844,7 +844,7 @@ int wxMenuBar::FindMenuItem (const wxString& menuString, const wxString& itemStr return -1; } -wxMenuItem *wxMenuBar::FindItemForId (const int Id, wxMenu ** itemMenu) const +wxMenuItem *wxMenuBar::FindItemForId (int Id, wxMenu ** itemMenu) const { if (itemMenu) *itemMenu = NULL; @@ -857,7 +857,7 @@ wxMenuItem *wxMenuBar::FindItemForId (const int Id, wxMenu ** itemMenu) const return NULL; } -void wxMenuBar::SetHelpString (const int Id, const wxString& helpString) +void wxMenuBar::SetHelpString (int Id, const wxString& helpString) { int i; for (i = 0; i < m_menuCount; i++) @@ -870,7 +870,7 @@ void wxMenuBar::SetHelpString (const int Id, const wxString& helpString) } } -wxString wxMenuBar::GetHelpString (const int Id) const +wxString wxMenuBar::GetHelpString (int Id) const { int i; for (i = 0; i < m_menuCount; i++) diff --git a/src/msw/nativdlg.cpp b/src/msw/nativdlg.cpp index 886418996f..9c3088c8bd 100644 --- a/src/msw/nativdlg.cpp +++ b/src/msw/nativdlg.cpp @@ -31,7 +31,7 @@ extern wxWindow *wxWndHook; extern LONG APIENTRY _EXPORT wxDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); -bool wxWindow::LoadNativeDialog(wxWindow* parent, const wxWindowID& id) +bool wxWindow::LoadNativeDialog(wxWindow* parent, wxWindowID& id) { m_windowId = id; wxWndHook = this; @@ -91,7 +91,7 @@ bool wxWindow::LoadNativeDialog(wxWindow* parent, const wxString& name) return TRUE; } -wxWindow* wxWindow::GetWindowChild1(const wxWindowID& id) +wxWindow* wxWindow::GetWindowChild1(wxWindowID& id) { if ( m_windowId == id ) return this; @@ -109,7 +109,7 @@ wxWindow* wxWindow::GetWindowChild1(const wxWindowID& id) return NULL; } -wxWindow* wxWindow::GetWindowChild(const wxWindowID& id) +wxWindow* wxWindow::GetWindowChild(wxWindowID& id) { wxWindow* win = GetWindowChild1(id); if ( !win ) diff --git a/src/msw/palette.cpp b/src/msw/palette.cpp index 1eaaa5e074..5da71182f1 100644 --- a/src/msw/palette.cpp +++ b/src/msw/palette.cpp @@ -54,7 +54,7 @@ wxPalette::wxPalette(void) { } -wxPalette::wxPalette(const int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue) +wxPalette::wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue) { Create(n, red, green, blue); } @@ -73,7 +73,7 @@ bool wxPalette::FreeResource(bool force) return TRUE; } -bool wxPalette::Create(const int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue) +bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue) { UnRef(); @@ -108,7 +108,7 @@ int wxPalette::GetPixel(const unsigned char red, const unsigned char green, cons return ::GetNearestPaletteIndex((HPALETTE) M_PALETTEDATA->m_hPalette, PALETTERGB(red, green, blue)); } -bool wxPalette::GetRGB(const int index, unsigned char *red, unsigned char *green, unsigned char *blue) const +bool wxPalette::GetRGB(int index, unsigned char *red, unsigned char *green, unsigned char *blue) const { if ( !m_refData ) return FALSE; diff --git a/src/msw/pen.cpp b/src/msw/pen.cpp index 831cf96b01..12197dd801 100644 --- a/src/msw/pen.cpp +++ b/src/msw/pen.cpp @@ -69,7 +69,7 @@ wxPen::~wxPen() } // Should implement Create -wxPen::wxPen(const wxColour& col, const int Width, const int Style) +wxPen::wxPen(const wxColour& col, int Width, int Style) { m_refData = new wxPenRefData; @@ -112,7 +112,7 @@ wxPen::wxPen(const wxColour& col, const int Width, const int Style) wxThePenList->AddPen(this); } -wxPen::wxPen(const wxBitmap& stipple, const int Width) +wxPen::wxPen(const wxBitmap& stipple, int Width) { m_refData = new wxPenRefData; @@ -132,7 +132,7 @@ wxPen::wxPen(const wxBitmap& stipple, const int Width) wxThePenList->AddPen(this); } -wxPen::wxPen(const wxString& col, const int Width, const int Style) +wxPen::wxPen(const wxString& col, int Width, int Style) { m_refData = new wxPenRefData; @@ -340,7 +340,7 @@ void wxPen::SetColour(const unsigned char r, const unsigned char g, const unsign RealizeResource(); } -void wxPen::SetWidth(const int Width) +void wxPen::SetWidth(int Width) { if ( !M_PENDATA ) m_refData = new wxPenRefData; @@ -351,7 +351,7 @@ void wxPen::SetWidth(const int Width) RealizeResource(); } -void wxPen::SetStyle(const int Style) +void wxPen::SetStyle(int Style) { if ( !M_PENDATA ) m_refData = new wxPenRefData; @@ -374,7 +374,7 @@ void wxPen::SetStipple(const wxBitmap& Stipple) RealizeResource(); } -void wxPen::SetDashes(const int nb_dashes, const wxDash *Dash) +void wxPen::SetDashes(int nb_dashes, const wxDash *Dash) { if ( !M_PENDATA ) m_refData = new wxPenRefData; @@ -386,7 +386,7 @@ void wxPen::SetDashes(const int nb_dashes, const wxDash *Dash) RealizeResource(); } -void wxPen::SetJoin(const int Join) +void wxPen::SetJoin(int Join) { if ( !M_PENDATA ) m_refData = new wxPenRefData; @@ -397,7 +397,7 @@ void wxPen::SetJoin(const int Join) RealizeResource(); } -void wxPen::SetCap(const int Cap) +void wxPen::SetCap(int Cap) { if ( !M_PENDATA ) m_refData = new wxPenRefData; diff --git a/src/msw/pnghand.cpp b/src/msw/pnghand.cpp index 554e1cca16..c6fad8a66b 100644 --- a/src/msw/pnghand.cpp +++ b/src/msw/pnghand.cpp @@ -749,7 +749,7 @@ bool wxPNGReader::SaveXPM(char *filename, char *name) IMPLEMENT_DYNAMIC_CLASS(wxPNGFileHandler, wxBitmapHandler) -bool wxPNGFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, const long flags, +bool wxPNGFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags, int desiredWidth, int desiredHeight) { wxPNGReader reader; @@ -761,7 +761,7 @@ bool wxPNGFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, const lo return FALSE; } -bool wxPNGFileHandler::SaveFile(wxBitmap *bitmap, const wxString& name, const int type, const wxPalette *pal) +bool wxPNGFileHandler::SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *pal) { return FALSE; } diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp index c4fe0dc4b8..81467bcfb3 100644 --- a/src/msw/radiobox.cpp +++ b/src/msw/radiobox.cpp @@ -32,7 +32,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl) #endif -bool wxRadioBox::MSWCommand(const WXUINT param, const WXWORD id) +bool wxRadioBox::MSWCommand(WXUINT param, WXWORD id) { if (param == BN_CLICKED) { @@ -85,10 +85,10 @@ wxRadioBox::wxRadioBox(void) m_radioHeight = NULL ; } -bool wxRadioBox::Create(wxWindow *parent, const wxWindowID id, const wxString& title, +bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, - const int n, const wxString choices[], - const int majorDim, const long style, + int n, const wxString choices[], + int majorDim, long style, const wxValidator& val, const wxString& name) { m_selectedButton = -1; @@ -203,10 +203,10 @@ bool wxRadioBox::Create(wxWindow *parent, const wxWindowID id, const wxString& t } #if 0 -bool wxRadioBox::Create(wxWindow *parent, const wxWindowID id, const wxString& title, +bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, - const int n, const wxBitmap *choices[], - const int majorDim, const long style, + int n, const wxBitmap *choices[], + int majorDim, long style, const wxValidator& val, const wxString& name) { m_selectedButton = -1; @@ -339,19 +339,19 @@ wxRadioBox::~wxRadioBox(void) } -wxString wxRadioBox::GetLabel(const int item) const +wxString wxRadioBox::GetLabel(int item) const { GetWindowText((HWND)m_radioButtons[item], wxBuffer, 300); return wxString(wxBuffer); } -void wxRadioBox::SetLabel(const int item, const wxString& label) +void wxRadioBox::SetLabel(int item, const wxString& label) { m_radioWidth[item] = m_radioHeight[item] = -1 ; SetWindowText((HWND)m_radioButtons[item], (const char *)label); } -void wxRadioBox::SetLabel(const int item, wxBitmap *bitmap) +void wxRadioBox::SetLabel(int item, wxBitmap *bitmap) { /* m_radioWidth[item] = bitmap->GetWidth() + FB_MARGIN ; @@ -371,7 +371,7 @@ int wxRadioBox::FindString(const wxString& s) const return -1; } -void wxRadioBox::SetSelection(const int N) +void wxRadioBox::SetSelection(int N) { if ((N < 0) || (N >= m_noItems)) return; @@ -391,13 +391,13 @@ int wxRadioBox::GetSelection(void) const } // Find string for position -wxString wxRadioBox::GetString(const int N) const +wxString wxRadioBox::GetString(int N) const { GetWindowText((HWND) m_radioButtons[N], wxBuffer, 1000); return wxString(wxBuffer); } -void wxRadioBox::SetSize(const int x, const int y, const int width, const int height, const int sizeFlags) +void wxRadioBox::SetSize(int x, int y, int width, int height, int sizeFlags) { int currentX, currentY; GetPosition(¤tX, ¤tY); @@ -413,9 +413,7 @@ void wxRadioBox::SetSize(const int x, const int y, const int width, const int he int y_offset = yy; int x_offset = xx; - float current_width; - - float cyf; + int current_width, cyf; int cx1,cy1 ; wxGetCharSize(m_hWnd, &cx1, &cy1, GetFont()); @@ -616,7 +614,7 @@ void wxRadioBox::SetFocus(void) } -bool wxRadioBox::Show(const bool show) +bool wxRadioBox::Show(bool show) { int cshow; if (show) @@ -632,7 +630,7 @@ bool wxRadioBox::Show(const bool show) } // Enable a specific button -void wxRadioBox::Enable(const int item, const bool enable) +void wxRadioBox::Enable(int item, bool enable) { if (item<0) wxWindow::Enable(enable) ; @@ -641,7 +639,7 @@ void wxRadioBox::Enable(const int item, const bool enable) } // Enable all controls -void wxRadioBox::Enable(const bool enable) +void wxRadioBox::Enable(bool enable) { wxControl::Enable(enable); @@ -651,7 +649,7 @@ void wxRadioBox::Enable(const bool enable) } // Show a specific button -void wxRadioBox::Show(const int item, const bool show) +void wxRadioBox::Show(int item, bool show) { if (item<0) wxRadioBox::Show(show) ; @@ -666,7 +664,7 @@ void wxRadioBox::Show(const int item, const bool show) } } -WXHBRUSH wxRadioBox::OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, +WXHBRUSH wxRadioBox::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam) { #if CTL3D diff --git a/src/msw/radiobut.cpp b/src/msw/radiobut.cpp index f3a4b655d8..47783bcd87 100644 --- a/src/msw/radiobut.cpp +++ b/src/msw/radiobut.cpp @@ -33,10 +33,10 @@ IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl) // IMPLEMENT_DYNAMIC_CLASS(wxBitmapRadioButton, wxRadioButton) #endif -bool wxRadioButton::Create(wxWindow *parent, const wxWindowID id, +bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos, - const wxSize& size, const long style, + const wxSize& size, long style, const wxValidator& validator, const wxString& name) { @@ -97,7 +97,7 @@ bool wxRadioButton::Create(wxWindow *parent, const wxWindowID id, // start GRW fix if (label != "") { - float label_width, label_height; + int label_width, label_height; GetTextExtent(label, &label_width, &label_height, NULL, NULL, GetFont()); if (width < 0) width = (int)(label_width + RADIO_SIZE); @@ -128,7 +128,7 @@ void wxRadioButton::SetLabel(const wxString& label) SetWindowText((HWND) GetHWND(), (const char *)label); } -void wxRadioButton::SetValue(const bool value) +void wxRadioButton::SetValue(bool value) { // Following necessary for Win32s, because Win32s translate BM_SETCHECK SendMessage((HWND) GetHWND(), BM_SETCHECK, (WPARAM)value, 0L); @@ -140,7 +140,7 @@ bool wxRadioButton::GetValue(void) const return (SendMessage((HWND) GetHWND(), BM_SETCHECK, 0, 0L) != 0); } -WXHBRUSH wxRadioButton::OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, +WXHBRUSH wxRadioButton::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam) { #if CTL3D @@ -176,10 +176,10 @@ void wxRadioButton::Command (wxCommandEvent & event) // Not implemented #if 0 -bool wxBitmapRadioButton::Create(wxWindow *parent, const wxWindowID id, +bool wxBitmapRadioButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap, const wxPoint& pos, - const wxSize& size, const long style, + const wxSize& size, long style, const wxValidator& validator, const wxString& name) { @@ -231,7 +231,7 @@ void wxBitmapRadioButton::SetLabel(const wxBitmap *bitmap) { } -void wxBitmapRadioButton::SetValue(const bool value) +void wxBitmapRadioButton::SetValue(bool value) { // Following necessary for Win32s, because Win32s translate BM_SETCHECK SendMessage((HWND) GetHWND(), BM_SETCHECK, (WPARAM)value, 0L); diff --git a/src/msw/scrolbar.cpp b/src/msw/scrolbar.cpp index d934d96d8a..87c52ca273 100644 --- a/src/msw/scrolbar.cpp +++ b/src/msw/scrolbar.cpp @@ -43,9 +43,9 @@ END_EVENT_TABLE() #endif // Scrollbar -bool wxScrollBar::Create(wxWindow *parent, const wxWindowID id, +bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, - const wxSize& size, const long style, + const wxSize& size, long style, const wxValidator& validator, const wxString& name) { @@ -116,7 +116,7 @@ wxScrollBar::~wxScrollBar(void) { } -void wxScrollBar::MSWOnVScroll(const WXWORD wParam, const WXWORD pos, const WXHWND control) +void wxScrollBar::MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control) { int position = ::GetScrollPos((HWND) control, SB_CTL); int minPos, maxPos; @@ -191,12 +191,12 @@ void wxScrollBar::MSWOnVScroll(const WXWORD wParam, const WXWORD pos, const WXHW } } -void wxScrollBar::MSWOnHScroll(const WXWORD wParam, const WXWORD pos, const WXHWND control) +void wxScrollBar::MSWOnHScroll(WXWORD wParam, WXWORD pos, WXHWND control) { MSWOnVScroll(wParam, pos, control); } -void wxScrollBar::SetPosition(const int viewStart) +void wxScrollBar::SetPosition(int viewStart) { #if defined(__WIN95__) SCROLLINFO info; @@ -217,8 +217,8 @@ int wxScrollBar::GetPosition(void) const return ::GetScrollPos((HWND)m_hWnd, SB_CTL); } -void wxScrollBar::SetScrollbar(const int position, const int thumbSize, const int range, const int pageSize, - const bool refresh) +void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageSize, + bool refresh) { m_viewSize = pageSize; m_pageSize = thumbSize; @@ -264,7 +264,7 @@ MaxScrollPos = MaxRangeValue - (PageSize - 1) */ #if WXWIN_COMPATIBILITY -void wxScrollBar::SetPageSize(const int pageLength) +void wxScrollBar::SetPageSize(int pageLength) { m_pageSize = pageLength; @@ -278,7 +278,7 @@ void wxScrollBar::SetPageSize(const int pageLength) #endif } -void wxScrollBar::SetObjectLength(const int objectLength) +void wxScrollBar::SetObjectLength(int objectLength) { m_objectSize = objectLength; @@ -308,7 +308,7 @@ void wxScrollBar::SetObjectLength(const int objectLength) #endif } -void wxScrollBar::SetViewLength(const int viewLength) +void wxScrollBar::SetViewLength(int viewLength) { m_viewSize = viewLength; } @@ -323,7 +323,7 @@ void wxScrollBar::GetValues(int *viewStart, int *viewLength, int *objectLength, } #endif -WXHBRUSH wxScrollBar::OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, +WXHBRUSH wxScrollBar::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam) { return 0; diff --git a/src/msw/slider95.cpp b/src/msw/slider95.cpp index 4eb5ad1075..f3f1e696b9 100644 --- a/src/msw/slider95.cpp +++ b/src/msw/slider95.cpp @@ -57,10 +57,10 @@ wxSlider95::wxSlider95(void) m_tickFreq = 0; } -bool wxSlider95::Create(wxWindow *parent, const wxWindowID id, - const int value, const int minValue, const int maxValue, +bool wxSlider95::Create(wxWindow *parent, wxWindowID id, + int value, int minValue, int maxValue, const wxPoint& pos, - const wxSize& size, const long style, + const wxSize& size, long style, const wxValidator& validator, const wxString& name) { @@ -189,7 +189,7 @@ bool wxSlider95::Create(wxWindow *parent, const wxWindowID id, return TRUE; } -void wxSlider95::MSWOnVScroll(const WXWORD wParam, const WXWORD pos, const WXHWND control) +void wxSlider95::MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control) { int position = 0; // Dummy - not used in this mode @@ -257,7 +257,7 @@ void wxSlider95::MSWOnVScroll(const WXWORD wParam, const WXWORD pos, const WXHWN } } -void wxSlider95::MSWOnHScroll(const WXWORD wParam, const WXWORD pos, const WXHWND control) +void wxSlider95::MSWOnHScroll(WXWORD wParam, WXWORD pos, WXHWND control) { MSWOnVScroll(wParam, pos, control); } @@ -277,7 +277,7 @@ int wxSlider95::GetValue(void) const return ::SendMessage((HWND) GetHWND(), TBM_GETPOS, 0, 0); } -void wxSlider95::SetValue(const int value) +void wxSlider95::SetValue(int value) { ::SendMessage((HWND) GetHWND(), TBM_SETPOS, (WPARAM)TRUE, (LPARAM)value); if (m_staticValue) @@ -332,7 +332,7 @@ void wxSlider95::GetPosition(int *x, int *y) const *y = point.y; } -void wxSlider95::SetSize(const int x, const int y, const int width, const int height, const int sizeFlags) +void wxSlider95::SetSize(int x, int y, int width, int height, int sizeFlags) { int x1 = x; int y1 = y; @@ -353,7 +353,7 @@ void wxSlider95::SetSize(const int x, const int y, const int width, const int he int cx; // slider,min,max sizes int cy; - float cyf; + int cyf; wxGetCharSize(GetHWND(), &cx, &cy,GetFont()); @@ -361,12 +361,12 @@ void wxSlider95::SetSize(const int x, const int y, const int width, const int he { if ( m_windowStyle & wxSL_LABELS ) { - float min_len = 0.0; + int min_len = 0; GetWindowText((HWND) m_staticMin, buf, 300); GetTextExtent(buf, &min_len, &cyf,NULL,NULL, GetFont()); - float max_len = 0.0; + int max_len = 0; GetWindowText((HWND) m_staticMax, buf, 300); GetTextExtent(buf, &max_len, &cyf,NULL,NULL, GetFont()); @@ -418,11 +418,11 @@ void wxSlider95::SetSize(const int x, const int y, const int width, const int he { if ( m_windowStyle & wxSL_LABELS ) { - float min_len; + int min_len; GetWindowText((HWND) m_staticMin, buf, 300); GetTextExtent(buf, &min_len, &cyf,NULL,NULL,GetFont()); - float max_len; + int max_len; GetWindowText((HWND) m_staticMax, buf, 300); GetTextExtent(buf, &max_len, &cyf,NULL,NULL, GetFont()); @@ -477,7 +477,7 @@ void wxSlider95::SetSize(const int x, const int y, const int width, const int he } } -void wxSlider95::SetRange(const int minValue, const int maxValue) +void wxSlider95::SetRange(int minValue, int maxValue) { m_rangeMin = minValue; m_rangeMax = maxValue; @@ -498,7 +498,7 @@ void wxSlider95::SetRange(const int minValue, const int maxValue) } } -WXHBRUSH wxSlider95::OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, +WXHBRUSH wxSlider95::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam) { if ( nCtlColor == CTLCOLOR_SCROLLBAR ) @@ -518,13 +518,13 @@ WXHBRUSH wxSlider95::OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT } // For trackbars only -void wxSlider95::SetTickFreq(const int n, const int pos) +void wxSlider95::SetTickFreq(int n, int pos) { m_tickFreq = n; ::SendMessage( (HWND) GetHWND(), TBM_SETTICFREQ, (WPARAM) n, (LPARAM) pos ); } -void wxSlider95::SetPageSize(const int pageSize) +void wxSlider95::SetPageSize(int pageSize) { ::SendMessage( (HWND) GetHWND(), TBM_SETPAGESIZE, (WPARAM) 0, (LPARAM) pageSize ); m_pageSize = pageSize; @@ -545,7 +545,7 @@ void wxSlider95::ClearTicks(void) ::SendMessage( (HWND) GetHWND(), TBM_CLEARTICS, (WPARAM) TRUE, (LPARAM) 0 ); } -void wxSlider95::SetLineSize(const int lineSize) +void wxSlider95::SetLineSize(int lineSize) { m_lineSize = lineSize; ::SendMessage( (HWND) GetHWND(), TBM_SETLINESIZE, (WPARAM) 0, (LPARAM) lineSize ); @@ -566,12 +566,12 @@ int wxSlider95::GetSelStart(void) const return (int) ::SendMessage( (HWND) GetHWND(), TBM_GETSELSTART, (WPARAM) 0, (LPARAM) 0 ); } -void wxSlider95::SetSelection(const int minPos, const int maxPos) +void wxSlider95::SetSelection(int minPos, int maxPos) { ::SendMessage( (HWND) GetHWND(), TBM_SETSEL, (WPARAM) TRUE, (LPARAM) MAKELONG( minPos, maxPos) ); } -void wxSlider95::SetThumbLength(const int len) +void wxSlider95::SetThumbLength(int len) { ::SendMessage( (HWND) GetHWND(), TBM_SETTHUMBLENGTH, (WPARAM) len, (LPARAM) 0 ); } @@ -581,7 +581,7 @@ int wxSlider95::GetThumbLength(void) const return (int) ::SendMessage( (HWND) GetHWND(), TBM_GETTHUMBLENGTH, (WPARAM) 0, (LPARAM) 0 ); } -void wxSlider95::SetTick(const int tickPos) +void wxSlider95::SetTick(int tickPos) { ::SendMessage( (HWND) GetHWND(), TBM_SETTIC, (WPARAM) 0, (LPARAM) tickPos ); } @@ -612,7 +612,7 @@ void wxSlider95::Command (wxCommandEvent & event) ProcessCommand (event); } -bool wxSlider95::Show(const bool show) +bool wxSlider95::Show(bool show) { wxWindow::Show(show); diff --git a/src/msw/slidrmsw.cpp b/src/msw/slidrmsw.cpp index aa01a17495..63d743e66c 100644 --- a/src/msw/slidrmsw.cpp +++ b/src/msw/slidrmsw.cpp @@ -51,10 +51,10 @@ wxSliderMSW::wxSliderMSW(void) m_tickFreq = 0; } -bool wxSliderMSW::Create(wxWindow *parent, const wxWindowID id, - const int value, const int minValue, const int maxValue, +bool wxSliderMSW::Create(wxWindow *parent, wxWindowID id, + int value, int minValue, int maxValue, const wxPoint& pos, - const wxSize& size, const long style, + const wxSize& size, long style, const wxValidator& validator, const wxString& name) { @@ -161,7 +161,7 @@ bool wxSliderMSW::Create(wxWindow *parent, const wxWindowID id, return TRUE; } -void wxSliderMSW::MSWOnVScroll(const WXWORD wParam, const WXWORD pos, const WXHWND control) +void wxSliderMSW::MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control) { int position = ::GetScrollPos((HWND)control, SB_CTL); @@ -231,7 +231,7 @@ void wxSliderMSW::MSWOnVScroll(const WXWORD wParam, const WXWORD pos, const WXHW } } -void wxSliderMSW::MSWOnHScroll(const WXWORD wParam, const WXWORD pos, const WXHWND control) +void wxSliderMSW::MSWOnHScroll(WXWORD wParam, WXWORD pos, WXHWND control) { MSWOnVScroll(wParam, pos, control); } @@ -251,7 +251,7 @@ int wxSliderMSW::GetValue(void) const return ::GetScrollPos((HWND) GetHWND(), SB_CTL); } -void wxSliderMSW::SetValue(const int value) +void wxSliderMSW::SetValue(int value) { ::SetScrollPos((HWND) GetHWND(), SB_CTL, value, TRUE); if (m_staticValue) @@ -306,7 +306,7 @@ void wxSliderMSW::GetPosition(int *x, int *y) const *y = point.y; } -void wxSliderMSW::SetSize(const int x, const int y, const int width, const int height, const int sizeFlags) +void wxSliderMSW::SetSize(int x, int y, int width, int height, int sizeFlags) { int x1 = x; int y1 = y; @@ -327,7 +327,7 @@ void wxSliderMSW::SetSize(const int x, const int y, const int width, const int h int cx; // slider,min,max sizes int cy; - float cyf; + int cyf; wxGetCharSize(GetHWND(), &cx, &cy,GetFont()); @@ -335,12 +335,12 @@ void wxSliderMSW::SetSize(const int x, const int y, const int width, const int h { if ( m_windowStyle & wxSL_LABELS ) { - float min_len = 0.0; + int min_len = 0; GetWindowText((HWND) m_staticMin, buf, 300); GetTextExtent(buf, &min_len, &cyf,NULL,NULL, GetFont()); - float max_len = 0.0; + int max_len = 0; GetWindowText((HWND) m_staticMax, buf, 300); GetTextExtent(buf, &max_len, &cyf,NULL,NULL, GetFont()); @@ -387,11 +387,11 @@ void wxSliderMSW::SetSize(const int x, const int y, const int width, const int h { if ( m_windowStyle & wxSL_LABELS ) { - float min_len; + int min_len; GetWindowText((HWND) m_staticMin, buf, 300); GetTextExtent(buf, &min_len, &cyf,NULL,NULL,GetFont()); - float max_len; + int max_len; GetWindowText((HWND) m_staticMax, buf, 300); GetTextExtent(buf, &max_len, &cyf,NULL,NULL, GetFont()); @@ -441,7 +441,7 @@ void wxSliderMSW::SetSize(const int x, const int y, const int width, const int h } } -void wxSliderMSW::SetRange(const int minValue, const int maxValue) +void wxSliderMSW::SetRange(int minValue, int maxValue) { m_rangeMin = minValue; m_rangeMax = maxValue; @@ -461,7 +461,7 @@ void wxSliderMSW::SetRange(const int minValue, const int maxValue) } } -WXHBRUSH wxSliderMSW::OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, +WXHBRUSH wxSliderMSW::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam) { if ( nCtlColor == CTLCOLOR_SCROLLBAR ) @@ -482,11 +482,11 @@ WXHBRUSH wxSliderMSW::OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUIN } // For trackbars only -void wxSliderMSW::SetTickFreq(const int n, const int pos) +void wxSliderMSW::SetTickFreq(int n, int pos) { } -void wxSliderMSW::SetPageSize(const int pageSize) +void wxSliderMSW::SetPageSize(int pageSize) { m_pageSize = pageSize; } @@ -504,7 +504,7 @@ void wxSliderMSW::ClearTicks(void) { } -void wxSliderMSW::SetLineSize(const int lineSize) +void wxSliderMSW::SetLineSize(int lineSize) { m_lineSize = lineSize; } @@ -524,11 +524,11 @@ int wxSliderMSW::GetSelStart(void) const return 0; } -void wxSliderMSW::SetSelection(const int minPos, const int maxPos) +void wxSliderMSW::SetSelection(int minPos, int maxPos) { } -void wxSliderMSW::SetThumbLength(const int len) +void wxSliderMSW::SetThumbLength(int len) { } @@ -537,7 +537,7 @@ int wxSliderMSW::GetThumbLength(void) const return 0; } -void wxSliderMSW::SetTick(const int tickPos) +void wxSliderMSW::SetTick(int tickPos) { } @@ -567,7 +567,7 @@ void wxSliderMSW::Command (wxCommandEvent & event) ProcessCommand (event); } -bool wxSliderMSW::Show(const bool show) +bool wxSliderMSW::Show(bool show) { wxWindow::Show(show); diff --git a/src/msw/spinbutt.cpp b/src/msw/spinbutt.cpp index db8c8dc34b..a34bd654c4 100644 --- a/src/msw/spinbutt.cpp +++ b/src/msw/spinbutt.cpp @@ -43,8 +43,8 @@ wxSpinButton::wxSpinButton(void) m_max = 100; } -bool wxSpinButton::Create(wxWindow *parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, - const long style, const wxString& name) +bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, + long style, const wxString& name) { wxSystemSettings settings; m_backgroundColour = parent->GetDefaultBackgroundColour() ; @@ -117,19 +117,19 @@ int wxSpinButton::GetValue(void) const return (int) ::SendMessage((HWND) GetHWND(), UDM_GETPOS, 0, 0); } -void wxSpinButton::SetValue(const int val) +void wxSpinButton::SetValue(int val) { ::SendMessage((HWND) GetHWND(), UDM_SETPOS, 0, (LPARAM) MAKELONG((short) val, 0)); } -void wxSpinButton::SetRange(const int minVal, const int maxVal) +void wxSpinButton::SetRange(int minVal, int maxVal) { m_min = minVal; m_max = maxVal; ::SendMessage((HWND) GetHWND(), UDM_SETRANGE, 0, (LPARAM) MAKELONG((short) minVal, (short) maxVal)); } -void wxSpinButton::MSWOnVScroll(const WXWORD wParam, const WXWORD pos, const WXHWND control) +void wxSpinButton::MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control) { if (control) { @@ -178,7 +178,7 @@ void wxSpinButton::MSWOnVScroll(const WXWORD wParam, const WXWORD pos, const WXH } } -void wxSpinButton::MSWOnHScroll( const WXWORD wParam, const WXWORD pos, const WXHWND control) +void wxSpinButton::MSWOnHScroll( WXWORD wParam, WXWORD pos, WXHWND control) { if (control) { @@ -227,13 +227,13 @@ void wxSpinButton::MSWOnHScroll( const WXWORD wParam, const WXWORD pos, const WX } } -bool wxSpinButton::MSWCommand(const WXUINT cmd, const WXWORD id) +bool wxSpinButton::MSWCommand(WXUINT cmd, WXWORD id) { // No command messages return FALSE; } -bool wxSpinButton::MSWNotify(const WXWPARAM wParam, const WXLPARAM lParam) +bool wxSpinButton::MSWNotify(WXWPARAM wParam, WXLPARAM lParam) { NMHDR* hdr1 = (NMHDR*) lParam; switch ( hdr1->code ) diff --git a/src/msw/statbmp.cpp b/src/msw/statbmp.cpp index dfdaec3496..5c0483014d 100644 --- a/src/msw/statbmp.cpp +++ b/src/msw/statbmp.cpp @@ -35,11 +35,11 @@ IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl) * wxStaticBitmap */ -bool wxStaticBitmap::Create(wxWindow *parent, const wxWindowID id, +bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, const wxPoint& pos, const wxSize& size, - const long style, + long style, const wxString& name) { m_messageBitmap = bitmap; @@ -81,7 +81,7 @@ bool wxStaticBitmap::Create(wxWindow *parent, const wxWindowID id, return TRUE; } -void wxStaticBitmap::SetSize(const int x, const int y, const int width, const int height, const int sizeFlags) +void wxStaticBitmap::SetSize(int x, int y, int width, int height, int sizeFlags) { int currentX, currentY; GetPosition(¤tX, ¤tY); @@ -110,17 +110,6 @@ void wxStaticBitmap::SetSize(const int x, const int y, const int width, const in else actualHeight = height; MoveWindow((HWND) GetHWND(), x1, y1, actualWidth, actualHeight, TRUE); - - if (!((width == -1) && (height == -1))) - { -#if WXWIN_COMPATIBILITY - GetEventHandler()->OldOnSize(actualWidth, actualHeight); -#else - wxSizeEvent event(wxSize(actualWidth, actualHeight), m_windowId); - event.eventObject = this; - GetEventHandler()->ProcessEvent(event); -#endif - } } void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap) diff --git a/src/msw/statbox.cpp b/src/msw/statbox.cpp index 25f303c58a..ae58e8f769 100644 --- a/src/msw/statbox.cpp +++ b/src/msw/statbox.cpp @@ -41,11 +41,11 @@ END_EVENT_TABLE() * Group box */ -bool wxStaticBox::Create(wxWindow *parent, const wxWindowID id, +bool wxStaticBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos, const wxSize& size, - const long style, + long style, const wxString& name) { SetName(name); @@ -102,7 +102,7 @@ void wxStaticBox::SetLabel(const wxString& label) SetWindowText((HWND)m_hWnd, (const char *)label); } -void wxStaticBox::SetSize(const int x, const int y, const int width, const int height, const int sizeFlags) +void wxStaticBox::SetSize(int x, int y, int width, int height, int sizeFlags) { int currentX, currentY; GetPosition(¤tX, ¤tY); @@ -125,11 +125,11 @@ void wxStaticBox::SetSize(const int x, const int y, const int width, const int h char buf[300]; - float current_width; + int current_width; int cx; int cy; - float cyf; + int cyf; HWND button = (HWND)m_hWnd; wxGetCharSize(GetHWND(), &cx, &cy,GetFont()); @@ -141,17 +141,9 @@ void wxStaticBox::SetSize(const int x, const int y, const int width, const int h if (h1<0) h1 = (int)(cyf*EDIT_CONTROL_FACTOR) ; MoveWindow(button, x1, y1, w1, h1, TRUE); - -#if WXWIN_COMPATIBILITY - GetEventHandler()->OldOnSize(width, height); -#else - wxSizeEvent event(wxSize(width, height), m_windowId); - event.eventObject = this; - GetEventHandler()->ProcessEvent(event); -#endif } -WXHBRUSH wxStaticBox::OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, +WXHBRUSH wxStaticBox::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam) { #if CTL3D diff --git a/src/msw/statbr95.cpp b/src/msw/statbr95.cpp index e740741b31..1e724c08a7 100644 --- a/src/msw/statbr95.cpp +++ b/src/msw/statbr95.cpp @@ -116,7 +116,7 @@ bool wxStatusBar95::Create(wxWindow *parent, wxWindowID id, long style) return TRUE; } -void wxStatusBar95::CopyFieldsWidth(const int *widths) +void wxStatusBar95::CopyFieldsWidth(int *widths) { if (widths && !m_statusWidths) m_statusWidths = new int[m_nFields]; @@ -131,7 +131,7 @@ void wxStatusBar95::CopyFieldsWidth(const int *widths) } } -void wxStatusBar95::SetFieldsCount(int nFields, const int *widths) +void wxStatusBar95::SetFieldsCount(int nFields, int *widths) { wxASSERT( (nFields > 0) && (nFields < 255) ); @@ -141,7 +141,7 @@ void wxStatusBar95::SetFieldsCount(int nFields, const int *widths) SetFieldsWidth(); } -void wxStatusBar95::SetStatusWidths(int n, const int *widths) +void wxStatusBar95::SetStatusWidths(int n, int *widths) { // @@ I don't understand what this function is for... wxASSERT( n == m_nFields ); @@ -202,7 +202,7 @@ void wxStatusBar95::SetFieldsWidth() delete [] pWidths; } -void wxStatusBar95::SetStatusText(const wxString& strText, const int nField) +void wxStatusBar95::SetStatusText(const wxString& strText, int nField) { if ( !StatusBar_SetText(hwnd, nField, strText) ) { wxLogDebug("StatusBar_SetText failed"); diff --git a/src/msw/stattext.cpp b/src/msw/stattext.cpp index 10a2141417..e7b5004deb 100644 --- a/src/msw/stattext.cpp +++ b/src/msw/stattext.cpp @@ -32,11 +32,11 @@ IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxControl) #endif -bool wxStaticText::Create(wxWindow *parent, const wxWindowID id, +bool wxStaticText::Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos, const wxSize& size, - const long style, + long style, const wxString& name) { SetName(name); @@ -92,7 +92,7 @@ bool wxStaticText::Create(wxWindow *parent, const wxWindowID id, return TRUE; } -void wxStaticText::SetSize(const int x, const int y, const int width, const int height, const int sizeFlags) +void wxStaticText::SetSize(int x, int y, int width, int height, int sizeFlags) { int currentX, currentY; GetPosition(¤tX, ¤tY); @@ -137,22 +137,11 @@ void wxStaticText::SetSize(const int x, const int y, const int width, const int } MoveWindow((HWND) GetHWND(), x1, y1, actualWidth, actualHeight, TRUE); - - if (!((width == -1) && (height == -1))) - { -#if WXWIN_COMPATIBILITY - GetEventHandler()->OldOnSize(actualWidth, actualHeight); -#else - wxSizeEvent event(wxSize(actualWidth, actualHeight), m_windowId); - event.eventObject = this; - GetEventHandler()->ProcessEvent(event); -#endif - } } void wxStaticText::SetLabel(const wxString& label) { - float w, h; + int w, h; RECT rect; wxWindow *parent = GetParent(); @@ -174,7 +163,7 @@ void wxStaticText::SetLabel(const wxString& label) SetWindowText((HWND) GetHWND(), (const char *)label); } -WXHBRUSH wxStaticText::OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, +WXHBRUSH wxStaticText::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam) { /* diff --git a/src/msw/tabctrl.cpp b/src/msw/tabctrl.cpp index 0bda814675..cec9af4086 100644 --- a/src/msw/tabctrl.cpp +++ b/src/msw/tabctrl.cpp @@ -145,12 +145,12 @@ void wxTabCtrl::Command(wxCommandEvent& event) { } -bool wxTabCtrl::MSWCommand(const WXUINT cmd, const WXWORD id) +bool wxTabCtrl::MSWCommand(WXUINT cmd, WXWORD id) { return FALSE; } -bool wxTabCtrl::MSWNotify(const WXWPARAM wParam, const WXLPARAM lParam) +bool wxTabCtrl::MSWNotify(WXWPARAM wParam, WXLPARAM lParam) { wxTabEvent event(wxEVT_NULL, m_windowId); wxEventType eventType = wxEVT_NULL; diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp index 36ebad03d8..8f37ba6ce0 100644 --- a/src/msw/tbar95.cpp +++ b/src/msw/tbar95.cpp @@ -71,9 +71,9 @@ wxToolBar95::wxToolBar95(void) m_defaultHeight = DEFAULTBITMAPY; } -bool wxToolBar95::Create(wxWindow *parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, - const long style, const int orientation, - const int RowsOrColumns, const wxString& name) +bool wxToolBar95::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, + long style, int orientation, + int RowsOrColumns, const wxString& name) { m_backgroundColour = wxColour(GetRValue(GetSysColor(COLOR_BTNFACE)), GetGValue(GetSysColor(COLOR_BTNFACE)), GetBValue(GetSysColor(COLOR_BTNFACE))); @@ -286,7 +286,7 @@ bool wxToolBar95::CreateTools(void) return TRUE; } -bool wxToolBar95::MSWCommand(const WXUINT cmd, const WXWORD id) +bool wxToolBar95::MSWCommand(WXUINT cmd, WXWORD id) { wxNode *node = m_tools.Find((long)id); if (!node) @@ -304,7 +304,7 @@ bool wxToolBar95::MSWCommand(const WXUINT cmd, const WXWORD id) return TRUE; } -bool wxToolBar95::MSWNotify(const WXWPARAM WXUNUSED(wParam), const WXLPARAM lParam) +bool wxToolBar95::MSWNotify(WXWPARAM WXUNUSED(wParam), WXLPARAM lParam) { // First check if this applies to us NMHDR *hdr = (NMHDR *)lParam; @@ -348,7 +348,7 @@ void wxToolBar95::SetDefaultSize(const wxSize& size) ::SendMessage((HWND) GetHWND(), TB_SETBITMAPSIZE, 0, (LPARAM) MAKELONG ((int)size.x, (int)size.y)); } -void wxToolBar95::SetRows(const int nRows) +void wxToolBar95::SetRows(int nRows) { RECT rect; ::SendMessage((HWND) GetHWND(), TB_SETROWS, MAKEWPARAM(nRows, TRUE), (LPARAM) & rect); @@ -382,7 +382,7 @@ wxSize wxToolBar95::GetDefaultButtonSize(void) const return wxSize(m_defaultWidth + 8, m_defaultHeight + 7); } -void wxToolBar95::EnableTool(const int toolIndex, const bool enable) +void wxToolBar95::EnableTool(int toolIndex, bool enable) { wxNode *node = m_tools.Find((long)toolIndex); if (node) @@ -393,7 +393,7 @@ void wxToolBar95::EnableTool(const int toolIndex, const bool enable) } } -void wxToolBar95::ToggleTool(const int toolIndex, const bool toggle) +void wxToolBar95::ToggleTool(int toolIndex, bool toggle) { wxNode *node = m_tools.Find((long)toolIndex); if (node) @@ -418,8 +418,8 @@ void wxToolBar95::ClearTools(void) // If pushedBitmap is NULL, a reversed version of bitmap is // created and used as the pushed/toggled image. // If toggle is TRUE, the button toggles between the two states. -wxToolBarTool *wxToolBar95::AddTool(const int index, const wxBitmap& bitmap, const wxBitmap& pushedBitmap, - const bool toggle, const long xPos, const long yPos, wxObject *clientData, const wxString& helpString1, const wxString& helpString2) +wxToolBarTool *wxToolBar95::AddTool(int index, const wxBitmap& bitmap, const wxBitmap& pushedBitmap, + bool toggle, long xPos, long yPos, wxObject *clientData, const wxString& helpString1, const wxString& helpString2) { wxToolBarTool *tool = new wxToolBarTool(index, bitmap, (wxBitmap *)NULL, toggle, xPos, yPos, helpString1, helpString2); tool->m_clientData = clientData; diff --git a/src/msw/tbarmsw.cpp b/src/msw/tbarmsw.cpp index 86b2d33e9f..7e7402fa1a 100644 --- a/src/msw/tbarmsw.cpp +++ b/src/msw/tbarmsw.cpp @@ -68,9 +68,9 @@ wxToolBarMSW::wxToolBarMSW(void) m_defaultHeight = DEFAULTBITMAPY; } -bool wxToolBarMSW::Create(wxWindow *parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, - const long style, const int orientation, - const int RowsOrColumns, const wxString& name) +bool wxToolBarMSW::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, + long style, int orientation, + int RowsOrColumns, const wxString& name) { if ( ! wxWindow::Create(parent, id, pos, size, style, name) ) return FALSE; @@ -292,7 +292,7 @@ void wxToolBarMSW::OnMouseEvent(wxMouseEvent& event) // This function enables/disables a toolbar tool and redraws it. // If that would not be done, the enabling/disabling wouldn't be // visible on the screen. -void wxToolBarMSW::EnableTool(const int toolIndex, const bool enable) +void wxToolBarMSW::EnableTool(int toolIndex, bool enable) { wxNode *node = m_tools.Find((long)toolIndex); if (node) @@ -329,8 +329,8 @@ void wxToolBarMSW::DrawTool(wxDC& dc, wxMemoryDC& , wxToolBarTool *tool) // If pushedBitmap is NULL, a reversed version of bitmap is // created and used as the pushed/toggled image. // If toggle is TRUE, the button toggles between the two states. -wxToolBarTool *wxToolBarMSW::AddTool(const int index, const wxBitmap& bitmap, const wxBitmap& pushedBitmap, - const bool toggle, const long xPos, const long yPos, wxObject *clientData, const wxString& helpString1, const wxString& helpString2) +wxToolBarTool *wxToolBarMSW::AddTool(int index, const wxBitmap& bitmap, const wxBitmap& pushedBitmap, + bool toggle, long xPos, long yPos, wxObject *clientData, const wxString& helpString1, const wxString& helpString2) { // Using bitmap2 can cause problems (don't know why!) diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 578081a281..a18f26bf01 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -76,10 +76,10 @@ wxTextCtrl::wxTextCtrl(void) m_isRich = FALSE; } -bool wxTextCtrl::Create(wxWindow *parent, const wxWindowID id, +bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id, const wxString& value, const wxPoint& pos, - const wxSize& size, const long style, + const wxSize& size, long style, const wxValidator& validator, const wxString& name) { @@ -300,7 +300,7 @@ void wxTextCtrl::SetValue(const wxString& value) SetWindowText((HWND) GetHWND(), (const char *)value); } -void wxTextCtrl::SetSize(const int x, const int y, const int width, const int height, const int sizeFlags) +void wxTextCtrl::SetSize(int x, int y, int width, int height, int sizeFlags) { int currentX, currentY; GetPosition(¤tX, ¤tY); @@ -345,15 +345,6 @@ void wxTextCtrl::SetSize(const int x, const int y, const int width, const int he MoveWindow((HWND) GetHWND(), (int)control_x, (int)control_y, (int)control_width, (int)control_height, TRUE); -/* -#if WXWIN_COMPATIBILITY - GetEventHandler()->OldOnSize(width, height); -#else - wxSizeEvent event(wxSize(width, height), m_windowId); - event.eventObject = this; - GetEventHandler()->ProcessEvent(event); -#endif -*/ } // Clipboard operations @@ -375,13 +366,13 @@ void wxTextCtrl::Paste(void) SendMessage(hWnd, WM_PASTE, 0, 0L); } -void wxTextCtrl::SetEditable(const bool editable) +void wxTextCtrl::SetEditable(bool editable) { HWND hWnd = (HWND) GetHWND(); SendMessage(hWnd, EM_SETREADONLY, (WPARAM)!editable, (LPARAM)0L); } -void wxTextCtrl::SetInsertionPoint(const long pos) +void wxTextCtrl::SetInsertionPoint(long pos) { HWND hWnd = (HWND) GetHWND(); #ifdef __WIN32__ @@ -447,7 +438,7 @@ long wxTextCtrl::GetLastPosition(void) const return (long)(charIndex + lineLength); } -void wxTextCtrl::Replace(const long from, const long to, const wxString& value) +void wxTextCtrl::Replace(long from, long to, const wxString& value) { HWND hWnd = (HWND) GetHWND(); long fromChar = from; @@ -468,7 +459,7 @@ void wxTextCtrl::Replace(const long from, const long to, const wxString& value) SendMessage(hWnd, WM_PASTE, (WPARAM)0, (LPARAM)0L); } -void wxTextCtrl::Remove(const long from, const long to) +void wxTextCtrl::Remove(long from, long to) { HWND hWnd = (HWND) GetHWND(); long fromChar = from; @@ -483,7 +474,7 @@ void wxTextCtrl::Remove(const long from, const long to) SendMessage(hWnd, WM_CUT, (WPARAM)0, (LPARAM)0); } -void wxTextCtrl::SetSelection(const long from, const long to) +void wxTextCtrl::SetSelection(long from, long to) { HWND hWnd = (HWND) GetHWND(); long fromChar = from; @@ -641,7 +632,7 @@ int wxTextCtrl::GetNumberOfLines(void) const return (int)SendMessage((HWND) GetHWND(), EM_GETLINECOUNT, (WPARAM)0, (LPARAM)0); } -long wxTextCtrl::XYToPosition(const long x, const long y) const +long wxTextCtrl::XYToPosition(long x, long y) const { HWND hWnd = (HWND) GetHWND(); @@ -650,7 +641,7 @@ long wxTextCtrl::XYToPosition(const long x, const long y) const return (long)(x + charIndex); } -void wxTextCtrl::PositionToXY(const long pos, long *x, long *y) const +void wxTextCtrl::PositionToXY(long pos, long *x, long *y) const { HWND hWnd = (HWND) GetHWND(); @@ -663,7 +654,7 @@ void wxTextCtrl::PositionToXY(const long pos, long *x, long *y) const *y = (long)lineNo; } -void wxTextCtrl::ShowPosition(const long pos) +void wxTextCtrl::ShowPosition(long pos) { HWND hWnd = (HWND) GetHWND(); @@ -693,7 +684,7 @@ void wxTextCtrl::ShowPosition(const long pos) (void)SendMessage(hWnd, EM_LINESCROLL, (WPARAM)0, (LPARAM)MAKELPARAM(linesToScroll, 0)); } -int wxTextCtrl::GetLineLength(const long lineNo) const +int wxTextCtrl::GetLineLength(long lineNo) const { long charIndex = XYToPosition(0, lineNo); HWND hWnd = (HWND) GetHWND(); @@ -701,7 +692,7 @@ int wxTextCtrl::GetLineLength(const long lineNo) const return len; } -wxString wxTextCtrl::GetLineText(const long lineNo) const +wxString wxTextCtrl::GetLineText(long lineNo) const { HWND hWnd = (HWND) GetHWND(); *(WORD *)wxBuffer = 512; @@ -853,7 +844,7 @@ wxTextCtrl& wxTextCtrl::operator<<(const wxString& s) return *this; } -wxTextCtrl& wxTextCtrl::operator<<(const float f) +wxTextCtrl& wxTextCtrl::operator<<(float f) { static char buf[100]; sprintf(buf, "%.2f", f); @@ -861,7 +852,7 @@ wxTextCtrl& wxTextCtrl::operator<<(const float f) return *this; } -wxTextCtrl& wxTextCtrl::operator<<(const double d) +wxTextCtrl& wxTextCtrl::operator<<(double d) { static char buf[100]; sprintf(buf, "%.2f", d); @@ -869,7 +860,7 @@ wxTextCtrl& wxTextCtrl::operator<<(const double d) return *this; } -wxTextCtrl& wxTextCtrl::operator<<(const int i) +wxTextCtrl& wxTextCtrl::operator<<(int i) { static char buf[100]; sprintf(buf, "%i", i); @@ -877,7 +868,7 @@ wxTextCtrl& wxTextCtrl::operator<<(const int i) return *this; } -wxTextCtrl& wxTextCtrl::operator<<(const long i) +wxTextCtrl& wxTextCtrl::operator<<(long i) { static char buf[100]; sprintf(buf, "%ld", i); @@ -896,7 +887,7 @@ wxTextCtrl& wxTextCtrl::operator<<(const char c) } -WXHBRUSH wxTextCtrl::OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, +WXHBRUSH wxTextCtrl::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam) { #if CTL3D @@ -989,7 +980,7 @@ void wxTextCtrl::OnEraseBackground(wxEraseEvent& event) // wxWindow::OnEraseBackground(event); } -bool wxTextCtrl::MSWCommand(const WXUINT param, const WXWORD WXUNUSED(id)) +bool wxTextCtrl::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) { /* // Debugging @@ -1069,7 +1060,7 @@ bool wxTextCtrl::MSWCommand(const WXUINT param, const WXWORD WXUNUSED(id)) // For Rich Edit controls. Do we need it? #if 0 #if defined(__WIN95__) -bool wxTextCtrl::MSWNotify(const WXWPARAM wParam, const WXLPARAM lParam) +bool wxTextCtrl::MSWNotify(WXWPARAM wParam, WXLPARAM lParam) { wxCommandEvent event(0, m_windowId); int eventType = 0; diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index 6ad24a23dd..0cf7bb7585 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -55,8 +55,8 @@ wxTreeCtrl::wxTreeCtrl(void) m_imageListState = NULL; } -bool wxTreeCtrl::Create(wxWindow *parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, - const long style, const wxValidator& validator, const wxString& name) +bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, + long style, const wxValidator& validator, const wxString& name) { wxSystemSettings settings; SetBackgroundColour(settings.GetSystemColour(wxSYS_COLOUR_WINDOW)); @@ -150,7 +150,7 @@ void wxTreeCtrl::SetIndent(int indent) TreeView_SetIndent((HWND) GetHWND(), indent); } -wxImageList *wxTreeCtrl::GetImageList(const int which) const +wxImageList *wxTreeCtrl::GetImageList(int which) const { if ( which == wxIMAGE_LIST_NORMAL ) { @@ -163,7 +163,7 @@ wxImageList *wxTreeCtrl::GetImageList(const int which) const return NULL; } -void wxTreeCtrl::SetImageList(wxImageList *imageList, const int which) +void wxTreeCtrl::SetImageList(wxImageList *imageList, int which) { int flags = 0; if ( which == wxIMAGE_LIST_NORMAL ) @@ -179,7 +179,7 @@ void wxTreeCtrl::SetImageList(wxImageList *imageList, const int which) TreeView_SetImageList((HWND) GetHWND(), (HIMAGELIST) imageList ? imageList->GetHIMAGELIST() : 0, flags); } -long wxTreeCtrl::GetNextItem(const long item, int code) const +long wxTreeCtrl::GetNextItem(long item, int code) const { UINT flag = 0; switch ( code ) @@ -221,7 +221,7 @@ long wxTreeCtrl::GetNextItem(const long item, int code) const return (long) TreeView_GetNextItem( (HWND) GetHWND(), (HTREEITEM) item, flag); } -bool wxTreeCtrl::ItemHasChildren(const long item) const +bool wxTreeCtrl::ItemHasChildren(long item) const { TV_ITEM item2; item2.hItem = (HTREEITEM) item; @@ -230,12 +230,12 @@ bool wxTreeCtrl::ItemHasChildren(const long item) const return (item2.cChildren != 0); } -long wxTreeCtrl::GetChild(const long item) const +long wxTreeCtrl::GetChild(long item) const { return (long) ::SendMessage((HWND) GetHWND(), TVM_GETNEXTITEM, TVGN_CHILD, (LPARAM)item); } -long wxTreeCtrl::GetParent(const long item) const +long wxTreeCtrl::GetParent(long item) const { return (long) ::SendMessage((HWND) GetHWND(), TVM_GETNEXTITEM, TVGN_PARENT, (LPARAM)item); } @@ -245,7 +245,7 @@ long wxTreeCtrl::GetFirstVisibleItem(void) const return (long) ::SendMessage((HWND) GetHWND(), TVM_GETNEXTITEM, TVGN_FIRSTVISIBLE, 0); } -long wxTreeCtrl::GetNextVisibleItem(const long item) const +long wxTreeCtrl::GetNextVisibleItem(long item) const { return (long) ::SendMessage((HWND) GetHWND(), TVM_GETNEXTITEM, TVGN_NEXTVISIBLE, (LPARAM)item); } @@ -303,7 +303,7 @@ bool wxTreeCtrl::SetItem(wxTreeItem& info) return (::SendMessage((HWND) GetHWND(), TVM_SETITEM, 0, (LPARAM)&item) != 0); } -int wxTreeCtrl::GetItemState(const long item, const long stateMask) const +int wxTreeCtrl::GetItemState(long item, long stateMask) const { wxTreeItem info; @@ -317,7 +317,7 @@ int wxTreeCtrl::GetItemState(const long item, const long stateMask) const return info.m_state; } -bool wxTreeCtrl::SetItemState(const long item, const long state, const long stateMask) +bool wxTreeCtrl::SetItemState(long item, long state, long stateMask) { wxTreeItem info; @@ -329,7 +329,7 @@ bool wxTreeCtrl::SetItemState(const long item, const long state, const long stat return SetItem(info); } -bool wxTreeCtrl::SetItemImage(const long item, const int image, const int selImage) +bool wxTreeCtrl::SetItemImage(long item, int image, int selImage) { wxTreeItem info; @@ -345,7 +345,7 @@ bool wxTreeCtrl::SetItemImage(const long item, const int image, const int selIma return SetItem(info); } -wxString wxTreeCtrl::GetItemText(const long item) const +wxString wxTreeCtrl::GetItemText(long item) const { wxTreeItem info; @@ -357,7 +357,7 @@ wxString wxTreeCtrl::GetItemText(const long item) const return info.m_text; } -void wxTreeCtrl::SetItemText(const long item, const wxString& str) +void wxTreeCtrl::SetItemText(long item, const wxString& str) { wxTreeItem info; @@ -368,7 +368,7 @@ void wxTreeCtrl::SetItemText(const long item, const wxString& str) SetItem(info); } -long wxTreeCtrl::GetItemData(const long item) const +long wxTreeCtrl::GetItemData(long item) const { wxTreeItem info; @@ -380,7 +380,7 @@ long wxTreeCtrl::GetItemData(const long item) const return info.m_data; } -bool wxTreeCtrl::SetItemData(const long item, long data) +bool wxTreeCtrl::SetItemData(long item, long data) { wxTreeItem info; @@ -391,7 +391,7 @@ bool wxTreeCtrl::SetItemData(const long item, long data) return SetItem(info); } -bool wxTreeCtrl::GetItemRect(const long item, wxRectangle& rect, bool textOnly) const +bool wxTreeCtrl::GetItemRect(long item, wxRectangle& rect, bool textOnly) const { RECT rect2; @@ -414,12 +414,12 @@ wxTextCtrl& wxTreeCtrl::GetEditControl(void) const } // Operations -bool wxTreeCtrl::DeleteItem(const long item) +bool wxTreeCtrl::DeleteItem(long item) { return (TreeView_DeleteItem((HWND) GetHWND(), (HTREEITEM) item) != 0); } -bool wxTreeCtrl::ExpandItem(const long item, const int action) +bool wxTreeCtrl::ExpandItem(long item, int action) { UINT mswAction = TVE_EXPAND; switch ( action ) @@ -440,7 +440,7 @@ bool wxTreeCtrl::ExpandItem(const long item, const int action) return (TreeView_Expand((HWND) GetHWND(), (HTREEITEM) item, mswAction) != 0); } -long wxTreeCtrl::InsertItem(const long parent, wxTreeItem& info, const long insertAfter) +long wxTreeCtrl::InsertItem(long parent, wxTreeItem& info, long insertAfter) { TV_INSERTSTRUCT tvInsertStruct; tvInsertStruct.hParent = (HTREEITEM) parent ; @@ -451,8 +451,8 @@ long wxTreeCtrl::InsertItem(const long parent, wxTreeItem& info, const long inse return (long) TreeView_InsertItem((HWND) GetHWND(), & tvInsertStruct); } -long wxTreeCtrl::InsertItem(const long parent, const wxString& label, const int image, const int selImage, - const long insertAfter) +long wxTreeCtrl::InsertItem(long parent, const wxString& label, int image, int selImage, + long insertAfter) { wxTreeItem info; info.m_text = label; @@ -470,12 +470,12 @@ long wxTreeCtrl::InsertItem(const long parent, const wxString& label, const int return InsertItem(parent, info, insertAfter); } -bool wxTreeCtrl::SelectItem(const long item) +bool wxTreeCtrl::SelectItem(long item) { return (TreeView_SelectItem((HWND) GetHWND(), (HTREEITEM) item) != 0); } -bool wxTreeCtrl::ScrollTo(const long item) +bool wxTreeCtrl::ScrollTo(long item) { return (TreeView_SelectSetFirstVisible((HWND) GetHWND(), (HTREEITEM) item) != 0); } @@ -485,7 +485,7 @@ bool wxTreeCtrl::DeleteAllItems(void) return (TreeView_DeleteAllItems((HWND) GetHWND()) != 0); } -wxTextCtrl& wxTreeCtrl::Edit(const long item) +wxTextCtrl& wxTreeCtrl::Edit(long item) { HWND hWnd = (HWND) TreeView_EditLabel((HWND) GetHWND(), item); m_textCtrl.SetHWND((WXHWND) hWnd); @@ -528,22 +528,22 @@ long wxTreeCtrl::HitTest(const wxPoint& point, int& flags) } /* -wxImageList *wxTreeCtrl::CreateDragImage(const long item) +wxImageList *wxTreeCtrl::CreateDragImage(long item) { } */ -bool wxTreeCtrl::SortChildren(const long item) +bool wxTreeCtrl::SortChildren(long item) { return (TreeView_SortChildren((HWND) GetHWND(), (HTREEITEM) item, 0) != 0); } -bool wxTreeCtrl::EnsureVisible(const long item) +bool wxTreeCtrl::EnsureVisible(long item) { return (TreeView_EnsureVisible((HWND) GetHWND(), (HTREEITEM) item) != 0); } -bool wxTreeCtrl::MSWCommand(const WXUINT cmd, const WXWORD id) +bool wxTreeCtrl::MSWCommand(WXUINT cmd, WXWORD id) { if (cmd == EN_UPDATE) { @@ -562,7 +562,7 @@ bool wxTreeCtrl::MSWCommand(const WXUINT cmd, const WXWORD id) else return FALSE; } -bool wxTreeCtrl::MSWNotify(const WXWPARAM wParam, const WXLPARAM lParam) +bool wxTreeCtrl::MSWNotify(WXWPARAM wParam, WXLPARAM lParam) { wxTreeEvent event(wxEVT_NULL, m_windowId); wxEventType eventType = wxEVT_NULL; diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 1b69d45927..8fdc4d7cb9 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -103,7 +103,7 @@ END_EVENT_TABLE() #endif // Find an item given the MS Windows id -wxWindow *wxWindow::FindItem(const int id) const +wxWindow *wxWindow::FindItem(int id) const { if (!GetChildren()) return NULL; @@ -134,7 +134,7 @@ wxWindow *wxWindow::FindItem(const int id) const } // Find an item given the MS Windows handle -wxWindow *wxWindow::FindItemByHWND(const WXHWND hWnd, bool controlOnly) const +wxWindow *wxWindow::FindItemByHWND(WXHWND hWnd, bool controlOnly) const { if (!GetChildren()) return NULL; @@ -165,17 +165,17 @@ wxWindow *wxWindow::FindItemByHWND(const WXHWND hWnd, bool controlOnly) const } // Default command handler -bool wxWindow::MSWCommand(const WXUINT WXUNUSED(param), const WXWORD WXUNUSED(id)) +bool wxWindow::MSWCommand(WXUINT WXUNUSED(param), WXWORD WXUNUSED(id)) { return FALSE; } -bool wxWindow::MSWNotify(const WXWPARAM WXUNUSED(wParam), const WXLPARAM WXUNUSED(lParam)) +bool wxWindow::MSWNotify(WXWPARAM WXUNUSED(wParam), WXLPARAM WXUNUSED(lParam)) { return FALSE; } -void wxWindow::PreDelete(const WXHDC WXUNUSED(dc)) +void wxWindow::PreDelete(WXHDC WXUNUSED(dc)) { } @@ -368,10 +368,10 @@ bool wxWindow::Destroy(void) extern char wxCanvasClassName[]; // Constructor -bool wxWindow::Create(wxWindow *parent, const wxWindowID id, +bool wxWindow::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - const long style, + long style, const wxString& name) { // Generic @@ -506,7 +506,7 @@ void wxWindow::SetFocus(void) ::SetFocus(hWnd); } -void wxWindow::Enable(const bool enable) +void wxWindow::Enable(bool enable) { m_winEnabled = enable; HWND hWnd = (HWND) GetHWND(); @@ -581,7 +581,7 @@ void wxWindow::SetDropTarget(wxDropTarget *pDropTarget) // I think we should retain the old-style // DragAcceptFiles in parallel with SetDropTarget. // JACS -void wxWindow::DragAcceptFiles(const bool accept) +void wxWindow::DragAcceptFiles(bool accept) { HWND hWnd = (HWND) GetHWND(); if (hWnd) @@ -680,7 +680,7 @@ void wxWindow::GetClientSize(int *x, int *y) const *y = rect.bottom; } -void wxWindow::SetSize(const int x, const int y, const int width, const int height, const int sizeFlags) +void wxWindow::SetSize(int x, int y, int width, int height, int sizeFlags) { int currentX, currentY; GetPosition(¤tX, ¤tY); @@ -703,22 +703,9 @@ void wxWindow::SetSize(const int x, const int y, const int width, const int heig HWND hWnd = (HWND) GetHWND(); if (hWnd) MoveWindow(hWnd, actualX, actualY, actualWidth, actualHeight, (BOOL)TRUE); - -/* Not needed? should be called anyway via MoveWindow - if (!(width == -1) && (height == -1)) - { -#if WXWIN_COMPATIBILITY - GetEventHandler()->OldOnSize(width, height); -#else - wxSizeEvent event(wxSize(width, height), m_windowId); - event.eventObject = this; - GetEventHandler()->ProcessEvent(event); -#endif - } -*/ } -void wxWindow::SetClientSize(const int width, const int height) +void wxWindow::SetClientSize(int width, int height) { wxWindow *parent = GetParent(); HWND hWnd = (HWND) GetHWND(); @@ -748,16 +735,13 @@ void wxWindow::SetClientSize(const int width, const int height) } MoveWindow(hWnd, point.x, point.y, actual_width, actual_height, (BOOL)TRUE); -#if WXWIN_COMPATIBILITY - GetEventHandler()->OldOnSize(width, height); -#else + wxSizeEvent event(wxSize(width, height), m_windowId); - event.m_eventObject = this; + event.SetEventObject(this); GetEventHandler()->ProcessEvent(event); -#endif } -bool wxWindow::Show(const bool show) +bool wxWindow::Show(bool show) { HWND hWnd = (HWND) GetHWND(); int cshow; @@ -805,7 +789,7 @@ int wxWindow::GetCharWidth(void) const } void wxWindow::GetTextExtent(const wxString& string, int *x, int *y, - int *descent, int *externalLeading, const wxFont *theFont, const bool) const + int *descent, int *externalLeading, const wxFont *theFont, bool) const { wxFont *fontToUse = (wxFont *)theFont; if (!fontToUse) @@ -841,23 +825,7 @@ void wxWindow::GetTextExtent(const wxString& string, int *x, int *y, // fontToUse->ReleaseResource(); } -#if WXWIN_COMPATIBILITY -void wxWindow::GetTextExtent(const wxString& string, float *x, float *y, - float *descent, - float *externalLeading, - const wxFont *theFont, const bool use16) const - { - int x1, y1, descent1, externalLeading1; - GetTextExtent(string, &x1, &y1, &descent1, &externalLeading1, theFont, use16); - *x = x1; *y = y1; - if ( descent ) - *descent = descent1; - if ( externalLeading ) - *externalLeading = externalLeading1; - } -#endif - -void wxWindow::Refresh(const bool eraseBack, const wxRectangle *rect) +void wxWindow::Refresh(bool eraseBack, const wxRectangle *rect) { HWND hWnd = (HWND) GetHWND(); if (hWnd) @@ -1531,9 +1499,9 @@ void wxWindow::MSWDestroyWindow(void) #endif } -void wxWindow::MSWCreate(const int id, wxWindow *parent, const char *wclass, wxWindow *wx_win, const char *title, - const int x, const int y, const int width, const int height, - const WXDWORD style, const char *dialog_template, const WXDWORD extendedStyle) +void wxWindow::MSWCreate(int id, wxWindow *parent, const char *wclass, wxWindow *wx_win, const char *title, + int x, int y, int width, int height, + WXDWORD style, const char *dialog_template, WXDWORD extendedStyle) { bool is_dialog = (dialog_template != NULL); int x1 = CW_USEDEFAULT; @@ -1650,7 +1618,7 @@ bool wxWindow::MSWOnDestroy(void) // Deal with child commands from buttons etc. -bool wxWindow::MSWOnNotify(const WXWPARAM wParam, const WXLPARAM lParam) +bool wxWindow::MSWOnNotify(WXWPARAM wParam, WXLPARAM lParam) { #if defined(__WIN95__) // Find a child window to send the notification to, e.g. a toolbar. @@ -1691,37 +1659,35 @@ bool wxWindow::MSWOnNotify(const WXWPARAM wParam, const WXLPARAM lParam) return FALSE; } -void wxWindow::MSWOnMenuHighlight(const WXWORD WXUNUSED(item), const WXWORD WXUNUSED(flags), const WXHMENU WXUNUSED(sysmenu)) +void wxWindow::MSWOnMenuHighlight(WXWORD WXUNUSED(item), WXWORD WXUNUSED(flags), WXHMENU WXUNUSED(sysmenu)) { #if DEBUG > 1 wxDebugMsg("wxWindow::MSWOnMenuHighlight %d\n", handle); #endif } -void wxWindow::MSWOnInitMenuPopup(const WXHMENU menu, const int pos, const bool isSystem) +void wxWindow::MSWOnInitMenuPopup(WXHMENU menu, int pos, bool isSystem) { +/* if (!isSystem) OldOnInitMenuPopup(pos); +*/ } -bool wxWindow::MSWOnActivate(const int state, const bool WXUNUSED(minimized), const WXHWND WXUNUSED(activate)) +bool wxWindow::MSWOnActivate(int state, bool WXUNUSED(minimized), WXHWND WXUNUSED(activate)) { #if DEBUG > 1 wxDebugMsg("wxWindow::MSWOnActivate %d\n", handle); #endif -#if WXWIN_COMPATIBILITY - GetEventHandler()->OldOnActivate(((state == WA_ACTIVE) || (state == WA_CLICKACTIVE))); -#else wxActivateEvent event(wxEVT_ACTIVATE, ((state == WA_ACTIVE) || (state == WA_CLICKACTIVE)), m_windowId); - event.m_eventObject = this; + event.SetEventObject(this); GetEventHandler()->ProcessEvent(event); -#endif return 0; } -bool wxWindow::MSWOnSetFocus(const WXHWND WXUNUSED(hwnd)) +bool wxWindow::MSWOnSetFocus(WXHWND WXUNUSED(hwnd)) { #if DEBUG > 1 wxDebugMsg("wxWindow::MSWOnSetFocus %d\n", m_hWnd); @@ -1734,17 +1700,14 @@ bool wxWindow::MSWOnSetFocus(const WXHWND WXUNUSED(hwnd)) ::ShowCaret((HWND) GetHWND()); } -#if WXWIN_COMPATIBILITY - GetEventHandler()->OldOnSetFocus(); -#else wxFocusEvent event(wxEVT_SET_FOCUS, m_windowId); - event.m_eventObject = this; - GetEventHandler()->ProcessEvent(event); -#endif - return TRUE; + event.SetEventObject(this); + if (!GetEventHandler()->ProcessEvent(event)) + Default(); + return TRUE; } -bool wxWindow::MSWOnKillFocus(const WXHWND WXUNUSED(hwnd)) +bool wxWindow::MSWOnKillFocus(WXHWND WXUNUSED(hwnd)) { #if DEBUG > 1 wxDebugMsg("wxWindow::MSWOnKillFocus %d\n", m_hWnd); @@ -1755,17 +1718,14 @@ bool wxWindow::MSWOnKillFocus(const WXHWND WXUNUSED(hwnd)) ::DestroyCaret(); } -#if WXWIN_COMPATIBILITY - GetEventHandler()->OldOnKillFocus(); -#else wxFocusEvent event(wxEVT_KILL_FOCUS, m_windowId); - event.m_eventObject = this; - GetEventHandler()->ProcessEvent(event); -#endif + event.SetEventObject(this); + if (!GetEventHandler()->ProcessEvent(event)) + Default(); return TRUE; } -void wxWindow::MSWOnDropFiles(const WXWPARAM wParam) +void wxWindow::MSWOnDropFiles(WXWPARAM wParam) { #if DEBUG > 1 wxDebugMsg("wxWindow::MSWOnDropFiles %d\n", m_hWnd); @@ -1794,12 +1754,13 @@ void wxWindow::MSWOnDropFiles(const WXWPARAM wParam) event.m_eventObject = this; event.m_pos.x = dropPoint.x; event.m_pos.x = dropPoint.y; - GetEventHandler()->ProcessEvent(event); + if (!GetEventHandler()->ProcessEvent(event)) + Default(); delete[] files; } -bool wxWindow::MSWOnDrawItem(const int id, WXDRAWITEMSTRUCT *itemStruct) +bool wxWindow::MSWOnDrawItem(int id, WXDRAWITEMSTRUCT *itemStruct) { #if USE_OWNER_DRAWN if ( id == 0 ) { // is it a menu item? @@ -1832,7 +1793,7 @@ bool wxWindow::MSWOnDrawItem(const int id, WXDRAWITEMSTRUCT *itemStruct) return FALSE; } -bool wxWindow::MSWOnMeasureItem(const int id, WXMEASUREITEMSTRUCT *itemStruct) +bool wxWindow::MSWOnMeasureItem(int id, WXMEASUREITEMSTRUCT *itemStruct) { #if USE_OWNER_DRAWN if ( id == 0 ) { // is it a menu item? @@ -1856,8 +1817,8 @@ bool wxWindow::MSWOnMeasureItem(const int id, WXMEASUREITEMSTRUCT *itemStruct) return FALSE; } -WXHBRUSH wxWindow::MSWOnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, - const WXUINT message, const WXWPARAM wParam, const WXLPARAM lParam) +WXHBRUSH wxWindow::MSWOnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, + WXUINT message, WXWPARAM wParam, WXLPARAM lParam) { #if DEBUG > 1 wxDebugMsg("wxWindow::MSWOnCtlColour %d\n", m_hWnd); @@ -1883,13 +1844,13 @@ WXHBRUSH wxWindow::MSWOnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUIN } // Define for each class of dialog and control -WXHBRUSH wxWindow::OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, +WXHBRUSH wxWindow::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam) { return (WXHBRUSH) MSWDefWindowProc(message, wParam, lParam); } -bool wxWindow::MSWOnColorChange(const WXHWND hWnd, const WXUINT message, const WXWPARAM wParam, const WXLPARAM lParam) +bool wxWindow::MSWOnColorChange(WXHWND hWnd, WXUINT message, WXWPARAM wParam, WXLPARAM lParam) { wxSysColourChangedEvent event; event.m_eventObject = this; @@ -1898,11 +1859,6 @@ bool wxWindow::MSWOnColorChange(const WXHWND hWnd, const WXUINT message, const W if (GetEventHandler()->ProcessEvent(event)) return 0; -#if WXWIN_COMPATIBILITY - if (GetEventHandler()->OldOnSysColourChange()) - return 0; -#endif - // We didn't process it return 1; } @@ -1964,7 +1920,7 @@ bool wxWindow::MSWProcessMessage(WXMSG* pMsg) } } -long wxWindow::MSWOnMDIActivate(const long WXUNUSED(flag), const WXHWND WXUNUSED(activate), const WXHWND WXUNUSED(deactivate)) +long wxWindow::MSWOnMDIActivate(long WXUNUSED(flag), WXHWND WXUNUSED(activate), WXHWND WXUNUSED(deactivate)) { #if DEBUG > 1 wxDebugMsg("wxWindow::MSWOnMDIActivate %d\n", m_hWnd); @@ -1993,17 +1949,14 @@ void wxWindow::MSWDetachWindowMenu(void) bool wxWindow::MSWOnPaint(void) { -#if WXWIN_COMPATIBILITY - GetEventHandler()->OldOnPaint(); -#else wxPaintEvent event(m_windowId); - event.m_eventObject = this; - GetEventHandler()->ProcessEvent(event); -#endif + event.SetEventObject(this); + if (!GetEventHandler()->ProcessEvent(event)) + Default(); return TRUE; } -void wxWindow::MSWOnSize(const int w, const int h, const WXUINT WXUNUSED(flag)) +void wxWindow::MSWOnSize(int w, int h, WXUINT WXUNUSED(flag)) { if (m_inOnSize) return; @@ -2016,13 +1969,10 @@ void wxWindow::MSWOnSize(const int w, const int h, const WXUINT WXUNUSED(flag)) m_inOnSize = TRUE; -#if WXWIN_COMPATIBILITY - GetEventHandler()->OldOnSize(w, h); -#else wxSizeEvent event(wxSize(w, h), m_windowId); - event.m_eventObject = this; - GetEventHandler()->ProcessEvent(event); -#endif + event.SetEventObject(this); + if (!GetEventHandler()->ProcessEvent(event)) + Default(); m_inOnSize = FALSE; } @@ -2033,7 +1983,7 @@ void wxWindow::MSWOnWindowPosChanging(void *WXUNUSED(lpPos)) } // Deal with child commands from buttons etc. -bool wxWindow::MSWOnCommand(const WXWORD id, const WXWORD cmd, const WXHWND WXUNUSED(control)) +bool wxWindow::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND WXUNUSED(control)) { #if DEBUG > 1 wxDebugMsg("wxWindow::MSWOnCommand\n"); @@ -2118,29 +2068,8 @@ long wxWindow::MSWOnSysCommand(WXWPARAM wParam, WXLPARAM lParam) return 0; } -void wxWindow::MSWOnLButtonDown(const int x, const int y, const WXUINT flags) +void wxWindow::MSWOnLButtonDown(int x, int y, WXUINT flags) { -#if 0 // defined(__WIN32__) && !defined(WIN95) - // DClick not clean supported on Win3.1, except if someone know - // how to emulate Sleep()... - // This means that your app will receive Down-Up-Dclick sequences - // rather than Dclick - if (m_doubleClickAllowed) - { - UINT time = GetDoubleClickTime() ; - Sleep(time) ; - MSG dummy ; - if (PeekMessage(&dummy,m_hWnd, - WM_LBUTTONDBLCLK,WM_LBUTTONDBLCLK, - PM_NOREMOVE) - ) - { - PeekMessage(&dummy,m_hWnd,WM_LBUTTONUP,WM_LBUTTONUP,PM_REMOVE); - return; - } - } -#endif - wxMouseEvent event(wxEVT_LEFT_DOWN); event.m_x = x; event.m_y = y; @@ -2153,10 +2082,12 @@ void wxWindow::MSWOnLButtonDown(const int x, const int y, const WXUINT flags) event.m_eventObject = this; m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVENT_TYPE_LEFT_DOWN; - GetEventHandler()->OldOnMouseEvent(event); + + if (!GetEventHandler()->ProcessEvent(event)) + Default(); } -void wxWindow::MSWOnLButtonUp(const int x, const int y, const WXUINT flags) +void wxWindow::MSWOnLButtonUp(int x, int y, WXUINT flags) { wxMouseEvent event(wxEVT_LEFT_UP); @@ -2171,10 +2102,11 @@ void wxWindow::MSWOnLButtonUp(const int x, const int y, const WXUINT flags) m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_LEFT_UP; - GetEventHandler()->OldOnMouseEvent(event); + if (!GetEventHandler()->ProcessEvent(event)) + Default(); } -void wxWindow::MSWOnLButtonDClick(const int x, const int y, const WXUINT flags) +void wxWindow::MSWOnLButtonDClick(int x, int y, WXUINT flags) { wxMouseEvent event(wxEVT_LEFT_DCLICK); @@ -2189,33 +2121,12 @@ void wxWindow::MSWOnLButtonDClick(const int x, const int y, const WXUINT flags) m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_LEFT_DCLICK; -// if (m_doubleClickAllowed) - GetEventHandler()->OldOnMouseEvent(event); + if (!GetEventHandler()->ProcessEvent(event)) + Default(); } -void wxWindow::MSWOnMButtonDown(const int x, const int y, const WXUINT flags) +void wxWindow::MSWOnMButtonDown(int x, int y, WXUINT flags) { -#if 0 // defined(__WIN32__) && !defined(__WIN95__) - // DClick not clean supported on Win3.1, except if someone know - // how to emulate Sleep()... - // This means that your app will receive Down-Up-Dclick sequences - // rather than Dclick - if (m_doubleClickAllowed) - { - UINT time = GetDoubleClickTime() ; - Sleep(time) ; - MSG dummy ; - if (PeekMessage(&dummy,m_hWnd, - WM_MBUTTONDBLCLK,WM_MBUTTONDBLCLK, - PM_NOREMOVE) - ) - { - PeekMessage(&dummy,m_hWnd,WM_MBUTTONUP,WM_MBUTTONUP,PM_REMOVE); - return; - } - } -#endif - wxMouseEvent event(wxEVT_MIDDLE_DOWN); event.m_x = x; event.m_y = y; @@ -2228,10 +2139,12 @@ void wxWindow::MSWOnMButtonDown(const int x, const int y, const WXUINT flags) event.m_eventObject = this; m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_MIDDLE_DOWN; - GetEventHandler()->OldOnMouseEvent(event); + + if (!GetEventHandler()->ProcessEvent(event)) + Default(); } -void wxWindow::MSWOnMButtonUp(const int x, const int y, const WXUINT flags) +void wxWindow::MSWOnMButtonUp(int x, int y, WXUINT flags) { //wxDebugMsg("MButtonUp\n") ; wxMouseEvent event(wxEVT_MIDDLE_UP); @@ -2246,10 +2159,12 @@ void wxWindow::MSWOnMButtonUp(const int x, const int y, const WXUINT flags) event.m_eventObject = this; m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_MIDDLE_UP; - GetEventHandler()->OldOnMouseEvent(event); + + if (!GetEventHandler()->ProcessEvent(event)) + Default(); } -void wxWindow::MSWOnMButtonDClick(const int x, const int y, const WXUINT flags) +void wxWindow::MSWOnMButtonDClick(int x, int y, WXUINT flags) { wxMouseEvent event(wxEVT_MIDDLE_DCLICK); @@ -2263,33 +2178,13 @@ void wxWindow::MSWOnMButtonDClick(const int x, const int y, const WXUINT flags) event.m_eventObject = this; m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_MIDDLE_DCLICK; -// if (m_doubleClickAllowed) - GetEventHandler()->OldOnMouseEvent(event); + + if (!GetEventHandler()->ProcessEvent(event)) + Default(); } -void wxWindow::MSWOnRButtonDown(const int x, const int y, const WXUINT flags) +void wxWindow::MSWOnRButtonDown(int x, int y, WXUINT flags) { -#if 0 // defined(__WIN32__) && !defined(__WIN95__) - // DClick not clean supported on Win3.1, except if someone know - // how to emulate Sleep()... - // This means that your app will receive Down-Up-Dclick sequences - // rather than Dclick - if (m_doubleClickAllowed) - { - UINT time = GetDoubleClickTime() ; - Sleep(time) ; - MSG dummy ; - if (PeekMessage(&dummy,m_hWnd, - WM_RBUTTONDBLCLK,WM_RBUTTONDBLCLK, - PM_NOREMOVE) - ) - { - PeekMessage(&dummy,m_hWnd,WM_RBUTTONUP,WM_RBUTTONUP,PM_REMOVE); - return; - } - } -#endif - wxMouseEvent event(wxEVT_RIGHT_DOWN); event.m_x = x; event.m_y = y; @@ -2302,10 +2197,12 @@ void wxWindow::MSWOnRButtonDown(const int x, const int y, const WXUINT flags) event.m_eventObject = this; m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_RIGHT_DOWN; - GetEventHandler()->OldOnMouseEvent(event); + + if (!GetEventHandler()->ProcessEvent(event)) + Default(); } -void wxWindow::MSWOnRButtonUp(const int x, const int y, const WXUINT flags) +void wxWindow::MSWOnRButtonUp(int x, int y, WXUINT flags) { wxMouseEvent event(wxEVT_RIGHT_UP); @@ -2319,10 +2216,12 @@ void wxWindow::MSWOnRButtonUp(const int x, const int y, const WXUINT flags) event.SetTimestamp(wxApp::sm_lastMessageTime); /* MATTHEW: timeStamp */ m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_RIGHT_UP; - GetEventHandler()->OldOnMouseEvent(event); + + if (!GetEventHandler()->ProcessEvent(event)) + Default(); } -void wxWindow::MSWOnRButtonDClick(const int x, const int y, const WXUINT flags) +void wxWindow::MSWOnRButtonDClick(int x, int y, WXUINT flags) { wxMouseEvent event(wxEVT_RIGHT_DCLICK); @@ -2336,11 +2235,12 @@ void wxWindow::MSWOnRButtonDClick(const int x, const int y, const WXUINT flags) event.m_eventObject = this; m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_RIGHT_DCLICK; -// if (m_doubleClickAllowed) - GetEventHandler()->OldOnMouseEvent(event); + + if (!GetEventHandler()->ProcessEvent(event)) + Default(); } -void wxWindow::MSWOnMouseMove(const int x, const int y, const WXUINT flags) +void wxWindow::MSWOnMouseMove(int x, int y, WXUINT flags) { // 'normal' move event... // Set cursor, but only if we're not in 'busy' mode @@ -2381,10 +2281,12 @@ void wxWindow::MSWOnMouseMove(const int x, const int y, const WXUINT flags) m_lastEvent = wxEVT_MOTION; m_lastXPos = event.m_x; m_lastYPos = event.m_y; - GetEventHandler()->OldOnMouseEvent(event); + + if (!GetEventHandler()->ProcessEvent(event)) + Default(); } -void wxWindow::MSWOnMouseEnter(const int x, const int y, const WXUINT flags) +void wxWindow::MSWOnMouseEnter(int x, int y, WXUINT flags) { wxMouseEvent event(wxEVT_ENTER_WINDOW); @@ -2404,7 +2306,7 @@ void wxWindow::MSWOnMouseEnter(const int x, const int y, const WXUINT flags) GetEventHandler()->ProcessEvent(event); } -void wxWindow::MSWOnMouseLeave(const int x, const int y, const WXUINT flags) +void wxWindow::MSWOnMouseLeave(int x, int y, WXUINT flags) { wxMouseEvent event(wxEVT_LEAVE_WINDOW); @@ -2424,7 +2326,7 @@ void wxWindow::MSWOnMouseLeave(const int x, const int y, const WXUINT flags) GetEventHandler()->ProcessEvent(event); } -void wxWindow::MSWOnChar(const WXWORD wParam, const WXLPARAM lParam, const bool isASCII) +void wxWindow::MSWOnChar(WXWORD wParam, WXLPARAM lParam, bool isASCII) { int id; bool tempControlDown = FALSE; @@ -2486,16 +2388,12 @@ void wxWindow::MSWOnChar(const WXWORD wParam, const WXLPARAM lParam, const bool event.m_x = pt.x; event.m_y = pt.y; -#if WXWIN_COMPATIBILITY - GetEventHandler()->OldOnChar(event); -#else if (!GetEventHandler()->ProcessEvent(event)) Default(); -#endif } } -void wxWindow::MSWOnJoyDown(const int joystick, const int x, const int y, const WXUINT flags) +void wxWindow::MSWOnJoyDown(int joystick, int x, int y, WXUINT flags) { int buttons = 0; int change = 0; @@ -2524,7 +2422,7 @@ void wxWindow::MSWOnJoyDown(const int joystick, const int x, const int y, const GetEventHandler()->ProcessEvent(event); } -void wxWindow::MSWOnJoyUp(const int joystick, const int x, const int y, const WXUINT flags) +void wxWindow::MSWOnJoyUp(int joystick, int x, int y, WXUINT flags) { int buttons = 0; int change = 0; @@ -2553,7 +2451,7 @@ void wxWindow::MSWOnJoyUp(const int joystick, const int x, const int y, const WX GetEventHandler()->ProcessEvent(event); } -void wxWindow::MSWOnJoyMove(const int joystick, const int x, const int y, const WXUINT flags) +void wxWindow::MSWOnJoyMove(int joystick, int x, int y, WXUINT flags) { int buttons = 0; if (flags & JOY_BUTTON1) @@ -2572,7 +2470,7 @@ void wxWindow::MSWOnJoyMove(const int joystick, const int x, const int y, const GetEventHandler()->ProcessEvent(event); } -void wxWindow::MSWOnJoyZMove(const int joystick, const int z, const WXUINT flags) +void wxWindow::MSWOnJoyZMove(int joystick, int z, WXUINT flags) { int buttons = 0; if (flags & JOY_BUTTON1) @@ -2591,7 +2489,7 @@ void wxWindow::MSWOnJoyZMove(const int joystick, const int z, const WXUINT flags GetEventHandler()->ProcessEvent(event); } -void wxWindow::MSWOnVScroll(const WXWORD wParam, const WXWORD pos, const WXHWND control) +void wxWindow::MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control) { if (control) { @@ -2643,14 +2541,10 @@ void wxWindow::MSWOnVScroll(const WXWORD wParam, const WXWORD pos, const WXHWND } if (!GetEventHandler()->ProcessEvent(event)) -#if WXWIN_COMPATIBILITY - GetEventHandler()->OldOnScroll(event); -#else Default(); -#endif } -void wxWindow::MSWOnHScroll( const WXWORD wParam, const WXWORD pos, const WXHWND control) +void wxWindow::MSWOnHScroll( WXWORD wParam, WXWORD pos, WXHWND control) { if (control) { @@ -2701,11 +2595,7 @@ void wxWindow::MSWOnHScroll( const WXWORD wParam, const WXWORD pos, const WXHWND break; } if (!GetEventHandler()->ProcessEvent(event)) -#if WXWIN_COMPATIBILITY - GetEventHandler()->OldOnScroll(event); -#else Default(); -#endif } void wxWindow::MSWOnShow(bool show, int status) @@ -2927,7 +2817,7 @@ int wxCharCodeWXToMSW(int id, bool *isVirtual) } // Caret manipulation -void wxWindow::CreateCaret(const int w, const int h) +void wxWindow::CreateCaret(int w, int h) { m_caretWidth = w; m_caretHeight = h; @@ -2939,7 +2829,7 @@ void wxWindow::CreateCaret(const wxBitmap *WXUNUSED(bitmap)) // Not implemented } -void wxWindow::ShowCaret(const bool show) +void wxWindow::ShowCaret(bool show) { if (m_caretEnabled) { @@ -2956,7 +2846,7 @@ void wxWindow::DestroyCaret(void) m_caretEnabled = FALSE; } -void wxWindow::SetCaretPos(const int x, const int y) +void wxWindow::SetCaretPos(int x, int y) { ::SetCaretPos(x, y); } @@ -3114,10 +3004,6 @@ int APIENTRY _EXPORT /* end Albert's fix for control and shift key 26.5 */ event.SetTimestamp(wxApp::sm_lastMessageTime); /* MATTHEW: timeStamp */ -#if WXWIN_COMPATIBILITY - if ( wxTheApp && wxTheApp->OldOnCharHook(event) ) - return 1; -#endif wxWindow *win = wxGetActiveWindow(); if (win) { @@ -3134,7 +3020,7 @@ int APIENTRY _EXPORT return (int)CallNextHookEx(wxTheKeyboardHook, nCode, wParam, lParam); } -void wxWindow::SetSizeHints(const int minW, const int minH, const int maxW, const int maxH, const int WXUNUSED(incW), const int WXUNUSED(incH)) +void wxWindow::SetSizeHints(int minW, int minH, int maxW, int maxH, int WXUNUSED(incW), int WXUNUSED(incH)) { m_minSizeX = minW; m_minSizeY = minH; @@ -3142,7 +3028,7 @@ void wxWindow::SetSizeHints(const int minW, const int minH, const int maxW, cons m_maxSizeY = maxH; } -void wxWindow::Centre(const int direction) +void wxWindow::Centre(int direction) { int x, y, width, height, panel_width, panel_height, new_x, new_y; @@ -3174,7 +3060,7 @@ void wxWindow::OnPaint(void) } */ -void wxWindow::WarpPointer (const int x_pos, const int y_pos) +void wxWindow::WarpPointer (int x_pos, int y_pos) { // Move the pointer to (x_pos,y_pos) coordinates. They are expressed in // pixel coordinates, relatives to the canvas -- So, we first need to @@ -3208,7 +3094,7 @@ void wxWindow::MSWDeviceToLogical (float *x, float *y) const */ } -bool wxWindow::MSWOnEraseBkgnd (const WXHDC pDC) +bool wxWindow::MSWOnEraseBkgnd (WXHDC pDC) { wxDC dc ; @@ -3259,7 +3145,7 @@ void wxWindow::OnEraseBackground(wxEraseEvent& event) } #if WXWIN_COMPATIBILITY -void wxWindow::SetScrollRange(const int orient, const int range, const bool refresh) +void wxWindow::SetScrollRange(int orient, int range, bool refresh) { #if defined(__WIN95__) @@ -3305,7 +3191,7 @@ void wxWindow::SetScrollRange(const int orient, const int range, const bool refr #endif } -void wxWindow::SetScrollPage(const int orient, const int page, const bool refresh) +void wxWindow::SetScrollPage(int orient, int page, bool refresh) { #if defined(__WIN95__) SCROLLINFO info; @@ -3335,7 +3221,7 @@ void wxWindow::SetScrollPage(const int orient, const int page, const bool refres #endif } -int wxWindow::OldGetScrollRange(const int orient) const +int wxWindow::OldGetScrollRange(int orient) const { int wOrient ; if (orient == wxHORIZONTAL) @@ -3367,7 +3253,7 @@ int wxWindow::OldGetScrollRange(const int orient) const return 0; } -int wxWindow::GetScrollPage(const int orient) const +int wxWindow::GetScrollPage(int orient) const { if (orient == wxHORIZONTAL) return m_xThumbSize; @@ -3376,7 +3262,7 @@ int wxWindow::GetScrollPage(const int orient) const } #endif -int wxWindow::GetScrollPos(const int orient) const +int wxWindow::GetScrollPos(int orient) const { int wOrient ; if (orient == wxHORIZONTAL) @@ -3394,7 +3280,7 @@ int wxWindow::GetScrollPos(const int orient) const // This now returns the whole range, not just the number // of positions that we can scroll. -int wxWindow::GetScrollRange(const int orient) const +int wxWindow::GetScrollRange(int orient) const { int wOrient ; if (orient == wxHORIZONTAL) @@ -3429,7 +3315,7 @@ int wxWindow::GetScrollRange(const int orient) const return 0; } -int wxWindow::GetScrollThumb(const int orient) const +int wxWindow::GetScrollThumb(int orient) const { if (orient == wxHORIZONTAL) return m_xThumbSize; @@ -3437,7 +3323,7 @@ int wxWindow::GetScrollThumb(const int orient) const return m_yThumbSize; } -void wxWindow::SetScrollPos(const int orient, const int pos, const bool refresh) +void wxWindow::SetScrollPos(int orient, int pos, bool refresh) { #if defined(__WIN95__) SCROLLINFO info; @@ -3472,8 +3358,8 @@ void wxWindow::SetScrollPos(const int orient, const int pos, const bool refresh) } // New function that will replace some of the above. -void wxWindow::SetScrollbar(const int orient, const int pos, const int thumbVisible, - const int range, const bool refresh) +void wxWindow::SetScrollbar(int orient, int pos, int thumbVisible, + int range, bool refresh) { /* SetScrollPage(orient, thumbVisible, FALSE); @@ -3536,7 +3422,7 @@ void wxWindow::SetScrollbar(const int orient, const int pos, const int thumbVisi } } -void wxWindow::ScrollWindow(const int dx, const int dy, const wxRectangle *rect) +void wxWindow::ScrollWindow(int dx, int dy, const wxRectangle *rect) { RECT rect2; if ( rect ) @@ -3563,13 +3449,13 @@ void wxWindow::OnSize(wxSizeEvent& event) } /* -void wxWindow::CalcScrolledPosition(const int x, const int y, int *xx, int *yy) const +void wxWindow::CalcScrolledPosition(int x, int y, int *xx, int *yy) const { *xx = x; *yy = y; } -void wxWindow::CalcUnscrolledPosition(const int x, const int y, float *xx, float *yy) const +void wxWindow::CalcUnscrolledPosition(int x, int y, float *xx, float *yy) const { *xx = x; *yy = y; @@ -3706,6 +3592,7 @@ WXDWORD wxWindow::Determine3DEffects(WXDWORD defaultBorderStyle, bool *want3D) return exStyle; } +/* #if WXWIN_COMPATIBILITY void wxWindow::OldOnPaint(void) { @@ -3751,6 +3638,7 @@ void wxWindow::OldOnKillFocus(void) Default(); }; #endif +*/ void wxWindow::OnChar(wxKeyEvent& event) { @@ -3874,7 +3762,7 @@ void wxWindow::DestroyChildren(void) } } -void wxWindow::MakeModal(const bool modal) +void wxWindow::MakeModal(bool modal) { // Disable all other windows if (this->IsKindOf(CLASSINFO(wxDialog)) || this->IsKindOf(CLASSINFO(wxFrame))) @@ -4075,7 +3963,7 @@ bool wxWindow::LayoutPhase2(int *noChanges) } // Do a phase of evaluating child constraints -bool wxWindow::DoPhase(const int phase) +bool wxWindow::DoPhase(int phase) { int noIterations = 0; int maxIterations = 500; @@ -4143,7 +4031,7 @@ void wxWindow::ResetConstraints(void) // Need to distinguish between setting the 'fake' size for // windows and sizers, and setting the real values. -void wxWindow::SetConstraintSizes(const bool recurse) +void wxWindow::SetConstraintSizes(bool recurse) { wxLayoutConstraints *constr = GetConstraints(); if (constr && constr->left.GetDone() && constr->right.GetDone() && @@ -4216,7 +4104,7 @@ void wxWindow::TransformSizerToActual(int *x, int *y) const *y += yp; } -void wxWindow::SizerSetSize(const int x, const int y, const int w, const int h) +void wxWindow::SizerSetSize(int x, int y, int w, int h) { int xx = x; int yy = y; @@ -4224,7 +4112,7 @@ void wxWindow::SizerSetSize(const int x, const int y, const int w, const int h) SetSize(xx, yy, w, h); } -void wxWindow::SizerMove(const int x, const int y) +void wxWindow::SizerMove(int x, int y) { int xx = x; int yy = y; @@ -4233,7 +4121,7 @@ void wxWindow::SizerMove(const int x, const int y) } // Only set the size/position of the constraint (if any) -void wxWindow::SetSizeConstraint(const int x, const int y, const int w, const int h) +void wxWindow::SetSizeConstraint(int x, int y, int w, int h) { wxLayoutConstraints *constr = GetConstraints(); if (constr) @@ -4261,7 +4149,7 @@ void wxWindow::SetSizeConstraint(const int x, const int y, const int w, const in } } -void wxWindow::MoveConstraint(const int x, const int y) +void wxWindow::MoveConstraint(int x, int y) { wxLayoutConstraints *constr = GetConstraints(); if (constr) @@ -4315,7 +4203,7 @@ void wxWindow::GetPositionConstraint(int *x, int *y) const GetPosition(x, y); } -bool wxWindow::Close(const bool force) +bool wxWindow::Close(bool force) { // Let's generalise it to work the same for any window. /* @@ -4345,7 +4233,7 @@ bool wxWindow::Close(const bool force) */ } -wxObject* wxWindow::GetChild(const int number) const +wxObject* wxWindow::GetChild(int number) const { // Return a pointer to the Nth object in the Panel if (!GetChildren()) @@ -4365,7 +4253,11 @@ wxObject* wxWindow::GetChild(const int number) const void wxWindow::OnDefaultAction(wxControl *initiatingItem) { - if (initiatingItem->IsKindOf(CLASSINFO(wxListBox)) && initiatingItem->GetCallback()) +/* This is obsolete now; if we wish to intercept listbox double-clicks, + * we explicitly intercept the wxEVT_COMMAND_LISTBOX_DOUBLECLICKED + * event. + + if (initiatingItem->IsKindOf(CLASSINFO(wxListBox))) { wxListBox *lbox = (wxListBox *)initiatingItem; wxCommandEvent event(wxEVT_COMMAND_LEFT_DCLICK); @@ -4389,8 +4281,10 @@ void wxWindow::OnDefaultAction(wxControl *initiatingItem) if (but) { wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED); + event.SetEventObject(but); but->Command(event); } +*/ } void wxWindow::Clear(void) @@ -4434,7 +4328,7 @@ void wxWindow::SetValidator(const wxValidator& validator) } // Find a window by id or name -wxWindow *wxWindow::FindWindow(const long id) +wxWindow *wxWindow::FindWindow(long id) { if ( GetId() == id) return this;