From 1d497b996f5503c0d463cd683a489323fc4c99e8 Mon Sep 17 00:00:00 2001 From: Francesco Montorsi Date: Tue, 25 Mar 2008 16:01:21 +0000 Subject: [PATCH] final prototype fixes to a*h headers; s/WXTYPE/wxEventType git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- interface/archive.h | 10 +++---- interface/aui/auibook.h | 40 +++++++------------------ interface/aui/dockart.h | 34 ++++++++------------- interface/aui/framemanager.h | 18 ++++++----- interface/checkbox.h | 4 +-- interface/datetime.h | 58 ++++++++++++++++++------------------ interface/event.h | 24 +++++++-------- interface/listctrl.h | 2 +- 8 files changed, 83 insertions(+), 107 deletions(-) diff --git a/interface/archive.h b/interface/archive.h index 3838ecfd90..522f114edf 100644 --- a/interface/archive.h +++ b/interface/archive.h @@ -127,7 +127,7 @@ public: thing read from @a stream. */ virtual bool CopyEntry(wxArchiveEntry* entry, - wxArchiveInputStream& stream); + wxArchiveInputStream& stream) = 0; /** Create a new directory entry (see wxArchiveEntry::IsDir) with the given @@ -137,13 +137,13 @@ public: a name with a trailing path separator. */ virtual bool PutNextDirEntry(const wxString& name, - const wxDateTime& dt = wxDateTime::Now()); + const wxDateTime& dt = wxDateTime::Now()) = 0; /** Takes ownership of entry and uses it to create a new entry in the archive. The entry's data can then be written by writing to this wxArchiveOutputStream. */ - virtual bool PutNextEntry(wxArchiveEntry* entry); + virtual bool PutNextEntry(wxArchiveEntry* entry) = 0; /** Create a new entry with the given name, timestamp and size. The entry's @@ -151,7 +151,7 @@ public: */ virtual bool PutNextEntry(const wxString& name, const wxDateTime& dt = wxDateTime::Now(), - wxFileOffset size = wxInvalidOffset); + wxFileOffset size = wxInvalidOffset) = 0; }; @@ -219,7 +219,7 @@ public: @see GetName() */ virtual void SetName(const wxString& name, - wxPathFormat format = wxPATH_NATIVE); + wxPathFormat format = wxPATH_NATIVE) = 0; /** Returns the size of the entry's data in bytes. diff --git a/interface/aui/auibook.h b/interface/aui/auibook.h index b98fdb7903..bd8bd46e5c 100644 --- a/interface/aui/auibook.h +++ b/interface/aui/auibook.h @@ -125,7 +125,7 @@ public: size_t GetPageCount() const; /** - Returns the page index for the specified window. + Returns the page index for the specified window. If the window is not found in the notebook, wxNOT_FOUND is returned. */ int GetPageIndex(wxWindow* page_wnd) const; @@ -269,30 +269,21 @@ public: /** Draws a button. */ - void DrawButton(wxDC& dc, wxWindow* wnd, const wxRect& in_rect, - int bitmap_id, - int button_state, - int orientation, - const wxBitmap& bitmap_override, - wxRect* out_rect); + virtual void DrawButton(wxDC& dc, wxWindow* wnd, const wxRect& in_rect, + int bitmap_id, int button_state, int orientation, + wxRect* out_rect) = 0; /** Draws a tab. */ - void DrawTab(wxDC& dc, wxWindow* wnd, const wxRect& in_rect, - const wxString& caption, - const wxBitmap& bitmap, - bool active, - int close_button_state, - wxRect* out_tab_rect, - wxRect* out_button_rect, - int* x_extent); + virtual void DrawTab(wxDC& dc, wxWindow* wnd, const wxAuiNotebookPage& page, + const wxRect& rect, int close_button_state, + wxRect* out_tab_rect, wxRect* out_button_rect, int* x_extent) = 0; /** Returns the tab control size. */ - int GetBestTabCtrlSize(wxWindow* wnd, - wxAuiNotebookPageArray& pages); + virtual int GetBestTabCtrlSize(wxWindow*, const wxAuiNotebookPageArray&, const wxSize&) = 0; /** Returns the indent size. @@ -302,12 +293,9 @@ public: /** Returns the tab size for the given caption, bitmap and state. */ - wxSize GetTabSize(wxDC& dc, wxWindow* wnd, - const wxString& caption, - const wxBitmap& bitmap, - bool active, - int close_button_state, - int* x_extent); + virtual wxSize GetTabSize(wxDC& dc, wxWindow* wnd, const wxString& caption, + const wxBitmap& bitmap, bool active, + int close_button_state, int* x_extent) = 0; /** Sets flags. @@ -333,11 +321,5 @@ public: Sets sizing information. */ virtual void SetSizingInfo(const wxSize& tab_ctrl_size, size_t tab_count) = 0; - - /** - Pops up a menu to show the list of windows managed by wxAui. - */ - int ShowWindowList(wxWindow* wnd, const wxArrayString& items, - int active_idx); }; diff --git a/interface/aui/dockart.h b/interface/aui/dockart.h index 65a90438be..34ae018422 100644 --- a/interface/aui/dockart.h +++ b/interface/aui/dockart.h @@ -108,49 +108,41 @@ public: /** Draws a background. */ - virtual void DrawBackground(wxDC& dc, wxWindow* window, - int orientation, - const wxRect& rect); + virtual void DrawBackground(wxDC& dc, wxWindow* window, int orientation, + const wxRect& rect) = 0; /** Draws a border. */ - virtual void DrawBorder(wxDC& dc, wxWindow* window, - const wxRect& rect, - wxAuiPaneInfo& pane); + virtual void DrawBorder(wxDC& dc, wxWindow* window, const wxRect& rect, + wxAuiPaneInfo& pane) = 0; /** Draws a caption. */ - virtual void DrawCaption(wxDC& dc, wxWindow* window, - const wxString& text, - const wxRect& rect, - wxAuiPaneInfo& pane); + virtual void DrawCaption(wxDC& dc, wxWindow* window, const wxString& text, + const wxRect& rect, wxAuiPaneInfo& pane) = 0; /** Draws a gripper. */ - virtual void DrawGripper(wxDC& dc, wxWindow* window, - const wxRect& rect, - wxAuiPaneInfo& pane); + virtual void DrawGripper(wxDC& dc, wxWindow* window, const wxRect& rect, + wxAuiPaneInfo& pane) = 0; /** Draws a button in the pane's title bar. @a button can be one of the values of @b wxAuiButtonId. @a button_state can be one of the values of @b wxAuiPaneButtonState. */ - virtual void DrawPaneButton(wxDC& dc, wxWindow* window, - int button, - int button_state, - const wxRect& rect, - wxAuiPaneInfo& pane); + virtual void DrawPaneButton(wxDC& dc, wxWindow* window, int button, + int button_state, const wxRect& rect, + wxAuiPaneInfo& pane) = 0; /** Draws a sash between two windows. */ - virtual void DrawSash(wxDC& dc, wxWindow* window, - int orientation, - const wxRect& rect); + virtual void DrawSash(wxDC& dc, wxWindow* window, int orientation, + const wxRect& rect) = 0; /** Get the colour of a certain setting. @a id can be one of the colour values of @b wxAuiPaneDockArtSetting. diff --git a/interface/aui/framemanager.h b/interface/aui/framemanager.h index 7cb8f630bc..b95708e143 100644 --- a/interface/aui/framemanager.h +++ b/interface/aui/framemanager.h @@ -241,13 +241,6 @@ public: bool LoadPerspective(const wxString& perspective, bool update = true); - /** - ProcessDockResult() is a protected member of the wxAUI layout manager. - It can be overridden by derived classes to provide custom docking calculations. - */ - bool ProcessDockResult(wxAuiPaneInfo& target, - const wxAuiPaneInfo& new_pos); - /** SavePaneInfo() is similar to SavePerspective, with the exception that it only saves information about a single pane. It is used in combination with @@ -328,6 +321,15 @@ public: pane flicker to be avoided by updating the whole layout at one time. */ void Update(); + +protected: + + /** + ProcessDockResult() is a protected member of the wxAUI layout manager. + It can be overridden by derived classes to provide custom docking calculations. + */ + virtual bool ProcessDockResult(wxAuiPaneInfo& target, + const wxAuiPaneInfo& new_pos); }; @@ -764,6 +766,6 @@ public: /** Makes a copy of the wxAuiPaneInfo object. */ - wxAuiPaneInfo& operator operator=(const wxAuiPaneInfo& c); + wxAuiPaneInfo& operator=(const wxAuiPaneInfo& c); }; diff --git a/interface/checkbox.h b/interface/checkbox.h index 26bf103fd1..2b99bc2467 100644 --- a/interface/checkbox.h +++ b/interface/checkbox.h @@ -75,7 +75,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& val, + const wxValidator& val = wxDefaultValidator, const wxString& name = "checkBox"); //@} @@ -93,7 +93,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& val, + const wxValidator& val = wxDefaultValidator, const wxString& name = "checkBox"); /** diff --git a/interface/datetime.h b/interface/datetime.h index fbbf30cb84..a7a7af8749 100644 --- a/interface/datetime.h +++ b/interface/datetime.h @@ -25,7 +25,7 @@ public: Same as @ref setdate() Set */ wxDateTime(wxDateTime_t day, Month month = Inv_Month, - int Inv_Year, wxDateTime_t hour = 0, + int year = Inv_Year, wxDateTime_t hour = 0, wxDateTime_t minute = 0, wxDateTime_t second = 0, wxDateTime_t millisec = 0); @@ -322,7 +322,7 @@ public: DOS format. */ - unsigned long GetAsDOS() const; + long unsigned int GetAsDOS() const; /** Get the beginning of DST for the given country in the given year (current one @@ -370,13 +370,13 @@ public: /** Returns the day in the given timezone (local one by default). */ - wxDateTime_t GetDay(const TimeZone& tz = Local) const; + short unsigned int GetDay(const TimeZone& tz = Local) const; /** Returns the day of the year (in 1...366 range) in the given timezone (local one by default). */ - wxDateTime_t GetDayOfYear(const TimeZone& tz = Local) const; + short unsigned int GetDayOfYear(const TimeZone& tz = Local) const; /** Returns the end of DST for the given country in the given year (current one by @@ -390,7 +390,7 @@ public: /** Returns the hour in the given timezone (local one by default). */ - wxDateTime_t GetHour(const TimeZone& tz = Local) const; + short unsigned int GetHour(const TimeZone& tz = Local) const; /** Synonym for GetJulianDayNumber(). @@ -428,12 +428,12 @@ public: /** Returns the milliseconds in the given timezone (local one by default). */ - wxDateTime_t GetMillisecond(const TimeZone& tz = Local) const; + short unsigned int GetMillisecond(const TimeZone& tz = Local) const; /** Returns the minute in the given timezone (local one by default). */ - wxDateTime_t GetMinute(const TimeZone& tz = Local) const; + short unsigned int GetMinute(const TimeZone& tz = Local) const; /** Returns the @e Modified Julian Day Number (MJD) which is, by definition, @@ -493,7 +493,7 @@ public: /** Returns the seconds in the given timezone (local one by default). */ - wxDateTime_t GetSecond(const TimeZone& tz = Local) const; + short unsigned int GetSecond(const TimeZone& tz = Local) const; /** Returns the number of seconds since Jan 1, 1970. An assert failure will occur @@ -579,7 +579,7 @@ public: Returns the copy of this object to which SetToYearDay() was applied. */ - wxDateTime GetYearDay(wxDateTime_t yday) const; + wxDateTime GetYearDay(short unsigned int) const; /** Returns @true if IsStrictlyBetween() @@ -690,7 +690,7 @@ public: This is the same as calling MakeTimezone() with the argument @c GMT0. */ - wxDateTime MakeUTC(bool noDST = false); + wxDateTime& MakeUTC(bool noDST = false); /** Returns the object corresponding to the current time. @@ -893,7 +893,7 @@ public: /** Reset time to midnight (00:00:00) without changing the date. */ - wxDateTime ResetTime(); + wxDateTime& ResetTime(); /** Sets the date and time from the parameters. @@ -918,7 +918,7 @@ public: /** Sets the day without changing other date components. */ - wxDateTime SetDay(wxDateTime_t day); + wxDateTime& SetDay(short unsigned int); /** Sets the date from the date and time in @@ -930,33 +930,33 @@ public: /** Sets the hour without changing other date components. */ - wxDateTime SetHour(wxDateTime_t hour); + wxDateTime& SetHour(short unsigned int); /** Sets the millisecond without changing other date components. */ - wxDateTime SetMillisecond(wxDateTime_t millisecond); + wxDateTime& SetMillisecond(short unsigned int); /** Sets the minute without changing other date components. */ - wxDateTime SetMinute(wxDateTime_t minute); + wxDateTime& SetMinute(short unsigned int); /** Sets the month without changing other date components. */ - wxDateTime SetMonth(Month month); + wxDateTime& SetMonth(Month month); /** Sets the second without changing other date components. */ - wxDateTime SetSecond(wxDateTime_t second); + wxDateTime& SetSecond(short unsigned int); /** Sets the date and time of to the current values. Same as assigning the result of Now() to this object. */ - wxDateTime SetToCurrent(); + wxDateTime& SetToCurrent(); /** Sets the date to the last day in the specified month (the current one by @@ -980,14 +980,14 @@ public: date. Returns the reference to the modified object itself. */ - wxDateTime SetToNextWeekDay(WeekDay weekday); + wxDateTime& SetToNextWeekDay(WeekDay weekday); /** Sets the date so that it will be the last @a weekday before the current date. Returns the reference to the modified object itself. */ - wxDateTime SetToPrevWeekDay(WeekDay weekday); + wxDateTime& SetToPrevWeekDay(WeekDay weekday); /** Sets the date to the @e n-th @a weekday in the given month of the given @@ -1031,12 +1031,12 @@ public: the other ones. Returns the reference to the modified object itself. */ - wxDateTime SetToYearDay(wxDateTime_t yday); + wxDateTime& SetToYearDay(short unsigned int); /** Sets the year without changing other date components. */ - wxDateTime SetYear(int year); + wxDateTime& SetYear(int year); /** For convenience, all static functions are collected here. These functions @@ -1328,25 +1328,25 @@ public: Sets the number of days (without modifying any other components) in this date span. */ - wxDateSpan SetDays(int n); + wxDateSpan& SetDays(int n); /** Sets the number of months (without modifying any other components) in this date span. */ - wxDateSpan SetMonths(int n); + wxDateSpan& SetMonths(int n); /** Sets the number of weeks (without modifying any other components) in this date span. */ - wxDateSpan SetWeeks(int n); + wxDateSpan& SetWeeks(int n); /** Sets the number of years (without modifying any other components) in this date span. */ - wxDateSpan SetYears(int n); + wxDateSpan& SetYears(int n); //@{ /** @@ -1389,14 +1389,14 @@ public: /** Returns @true if this date span is different from the other one. */ - bool operator!=(wxDateSpan& other) const; + bool operator!=(const wxDateSpan&) const; /** Returns @true if this date span is equal to the other one. Two date spans are considered equal if and only if they have the same number of years and months and the same total number of days (counting both days and weeks). */ - bool operator==(wxDateSpan& other) const; + bool operator==(const wxDateSpan&) const; }; @@ -1513,7 +1513,7 @@ public: The same applies to all other format specifiers: if they follow a specifier of larger unit, only the rest part is taken, otherwise the full value is used. */ - wxString Format(const wxChar* format = wxDefaultTimeSpanFormat); + wxString Format(const wxString& = wxDefaultTimeSpanFormat) const; /** Format() diff --git a/interface/event.h b/interface/event.h index 5e92102e33..4ea10eb245 100644 --- a/interface/event.h +++ b/interface/event.h @@ -74,7 +74,7 @@ public: Constructor. Currently, the only valid event types are wxEVT_CHAR and wxEVT_CHAR_HOOK. */ - wxKeyEvent(WXTYPE keyEventType); + wxKeyEvent(wxEventType keyEventType); /** Returns @true if the Alt key was down at the time of the key event. @@ -270,7 +270,7 @@ public: /** Constructor. */ - wxJoystickEvent(WXTYPE eventType = 0, int state = 0, + wxJoystickEvent(wxEventType eventType = 0, int state = 0, int joystick = wxJOYSTICK1, int change = 0); @@ -369,7 +369,7 @@ public: /** Constructor. */ - wxScrollWinEvent(WXTYPE commandType = 0, int pos = 0, + wxScrollWinEvent(wxEventType commandType = 0, int pos = 0, int orientation = 0); /** @@ -769,7 +769,7 @@ public: @b wxEVT_MOTION @b wxEVT_MOUSEWHEEL */ - wxMouseEvent(WXTYPE mouseEventType = 0); + wxMouseEvent(wxEventType mouseEventType = 0); /** Returns @true if the Alt key was down at the time of the event. @@ -1179,7 +1179,7 @@ public: /** Constructor. */ - wxDropFilesEvent(WXTYPE id = 0, int noFiles = 0, + wxDropFilesEvent(wxEventType id = 0, int noFiles = 0, wxString* files = NULL); /** @@ -1236,7 +1236,7 @@ public: /** Constructor. */ - wxCommandEvent(WXTYPE commandEventType = 0, int id = 0); + wxCommandEvent(wxEventType commandEventType = 0, int id = 0); /** Deprecated, use IsChecked() instead. @@ -1351,7 +1351,7 @@ public: /** Constructor. */ - wxActivateEvent(WXTYPE eventType = 0, bool active = true, + wxActivateEvent(wxEventType eventType = wxEVT_NULL, bool active = true, int id = 0); /** @@ -1393,7 +1393,7 @@ public: /** Constructor. */ - wxContextMenuEvent(WXTYPE id = 0, int id = 0, + wxContextMenuEvent(wxEventType id = 0, int id = 0, const wxPoint& pos = wxDefaultPosition); /** @@ -1478,7 +1478,7 @@ public: /** Constructor. */ - wxFocusEvent(WXTYPE eventType = 0, int id = 0); + wxFocusEvent(wxEventType eventType = 0, int id = 0); /** Returns the window associated with this event, that is the window which had the @@ -1728,7 +1728,7 @@ public: /** Constructor. */ - wxScrollEvent(WXTYPE commandType = 0, int id = 0, int pos = 0, + wxScrollEvent(wxEventType commandType = 0, int id = 0, int pos = 0, int orientation = 0); /** @@ -2047,7 +2047,7 @@ public: /** Constructor. */ - wxCloseEvent(WXTYPE commandEventType = 0, int id = 0); + wxCloseEvent(wxEventType commandEventType = 0, int id = 0); /** Returns @true if you can veto a system shutdown or a window close event. @@ -2113,7 +2113,7 @@ public: /** Constructor. */ - wxMenuEvent(WXTYPE id = 0, int id = 0, wxMenu* menu = NULL); + wxMenuEvent(wxEventType id = 0, int id = 0, wxMenu* menu = NULL); /** Returns the menu which is being opened or closed. This method should only be diff --git a/interface/listctrl.h b/interface/listctrl.h index 733608fb12..af512023c0 100644 --- a/interface/listctrl.h +++ b/interface/listctrl.h @@ -951,7 +951,7 @@ public: /** Constructor. */ - wxListEvent(WXTYPE commandType = 0, int id = 0); + wxListEvent(wxEventType commandType = 0, int id = 0); /** For @c EVT_LIST_CACHE_HINT event only: return the first item which the -- 2.45.2