Merge remote-tracking branch 'remotes/upstream/master'

This commit is contained in:
2018-12-06 12:02:55 +01:00
307 changed files with 2817 additions and 1316 deletions

View File

@@ -712,9 +712,6 @@ public:
Sets the depth member (does not affect the bitmap data).
@todo since these functions do not affect the bitmap data,
why they exist??
@param depth
Bitmap depth.

View File

@@ -1446,8 +1446,14 @@ public:
int GetIndent() const;
/**
Returns item rectangle. Coordinates of the rectangle are specified in
wxDataViewCtrl client area coordinates.
Returns item rectangle.
If item is not currently visible, either because its parent is
collapsed or it is outside of the visible part of the control due to
the current vertical scrollbar position, return an empty rectangle.
Coordinates of the rectangle are specified in wxDataViewCtrl client
area coordinates.
@param item
A valid item.
@@ -1455,10 +1461,6 @@ public:
If non-@NULL, the rectangle returned corresponds to the
intersection of the item with the specified column. If @NULL, the
rectangle spans all the columns.
@note This method is currently not implemented at all in wxGTK and only
implemented for non-@NULL @a col argument in wxOSX. It is fully
implemented in the generic version of the control.
*/
virtual wxRect GetItemRect(const wxDataViewItem& item,
const wxDataViewColumn* col = NULL) const;
@@ -1556,6 +1558,9 @@ public:
/**
Return @true if the item is expanded.
@note When using the native macOS version this method has a bug which
may result in returning @true even for items without children.
*/
virtual bool IsExpanded(const wxDataViewItem& item) const;

View File

@@ -26,6 +26,23 @@ public:
*/
wxDisplay(unsigned int index = 0);
/**
Constructor creating the display object associated with the given
window.
This is the most convenient way of finding the display on which the
given window is shown while falling back to the default display if it
is not shown at all or positioned outside of any display.
@param window
A valid, i.e. non-null, window.
@see GetFromWindow()
@since 3.1.2
*/
explicit wxDisplay(const wxWindow* window);
/**
Destructor.
*/

View File

@@ -1741,10 +1741,24 @@ public:
/**
Returns the identifier of the button changing state.
This is a @c wxJOY_BUTTONn identifier, where @c n is one of 1, 2, 3, 4.
The return value is @code 1 << n @endcode where @c n is the index of the
button changing state, which can also be retrieved using GetButtonOrdinal().
Note that for @c n equal to 1, 2, 3 or 4 there are predefined @c wxJOY_BUTTONn
constants which can be used for more clarity, however these constants are not
defined for the buttons beyond the first four.
*/
int GetButtonChange() const;
/**
Returns the 0-indexed ordinal of the button changing state.
@see GetButtonChange()
@since 3.1.2.
*/
int GetButtonOrdinal() const;
/**
Returns the down state of the buttons.

View File

@@ -1095,6 +1095,19 @@ public:
*/
virtual void GetDPI( wxDouble* dpiX, wxDouble* dpiY);
/**
Returns the associated window if any.
If this context was created using Create() overload taking wxWindow or
wxWindowDC, this method returns the corresponding window. Otherwise
returns @NULL.
@return A possibly @NULL window pointer.
@since 3.1.2
*/
wxWindow* GetWindow() const;
/** @}
*/

View File

@@ -987,7 +987,7 @@ public:
*/
void SetTextColour(const wxColour& colText);
void MergeWith(wxGridCellAttr *mergefrom);
void SetSize(int num_rows, int num_cols);
@@ -2319,7 +2319,7 @@ public:
wxPen MidiGrid::GetRowGridLinePen(int row)
{
if ( row % 12 == 7 )
return wxPen(*wxBLACK, 1, wxSOLID);
return wxPen(*wxBLACK, 1, wxPENSTYLE_SOLID);
else
return GetDefaultGridLinePen();
}
@@ -4551,7 +4551,7 @@ public:
*/
void SetRowAttr(int row, wxGridCellAttr* attr);
wxArrayInt CalcRowLabelsExposed( const wxRegion& reg );
wxArrayInt CalcColLabelsExposed( const wxRegion& reg );
wxGridCellCoordsArray CalcCellsExposed( const wxRegion& reg );
@@ -4697,7 +4697,7 @@ public:
virtual void DrawCellHighlight( wxDC& dc, const wxGridCellAttr *attr );
virtual void DrawRowLabels( wxDC& dc, const wxArrayInt& rows );
virtual void DrawRowLabel( wxDC& dc, int row );
@@ -4722,9 +4722,9 @@ public:
void SetCellHighlightColour( const wxColour& );
void SetCellHighlightPenWidth(int width);
void SetCellHighlightROPenWidth(int width);
void SetCellHighlightROPenWidth(int width);
protected:
/**
Returns @true if this grid has support for cell attributes.

View File

@@ -75,6 +75,19 @@ double wxDegToRad(double deg);
*/
double wxRadToDeg(double rad);
/**
Count the number of trailing zeros.
This function returns the number of trailing zeros in the binary notation
of its argument @a x. E.g. for @a x equal to 4, or 0b100, the return value
is 2.
@param x Strictly positive, i.e. non-zero, 32 bit number.
@since 3.1.2
*/
unsigned int wxCTZ(wxUint32 x);
/**
Small wrapper around round().
*/

View File

@@ -23,6 +23,9 @@ wxEventType wxEVT_TOOLBOOK_PAGE_CHANGING;
refer to that class documentation for now. You can also use the
@ref page_samples_notebook to see wxToolbook in action.
One feature of this class not supported by wxBookCtrlBase is the support
for disabling some of the pages, see EnablePage().
@beginStyleTable
@style{wxTBK_BUTTONBAR}
Use wxButtonToolBar-based implementation under OS X (ignored under
@@ -82,5 +85,44 @@ public:
Returns the wxToolBarBase associated with the control.
*/
wxToolBarBase* GetToolBar() const;
/**
Enables or disables the specified page.
Using this function, a page can be disabled when it can't be used, while
still remaining present to let the users know that more functionality is
available, even if currently inaccessible.
Icons for disabled pages are created by wxBitmap::ConvertToDisabled().
@param page
The index of the page.
@param enable
@true to enable the page and @false to disable it.
@return @true if successful, @false otherwise (currently only if the
index is invalid).
@since 3.1.2
*/
bool EnablePage(size_t page, bool enable);
/**
Enables or disables the specified page.
This is similar to the overload above, but finds the index of the
specified page.
@param page
Pointer of a page windows inside the book control.
@param enable
@true to enable the page and @false to disable it.
@return @true if successful, @false otherwise, e.g. if @a page is not
one of the pages of this control.
@since 3.1.2
*/
bool EnablePage(wxWindow *page, bool enable);
};

View File

@@ -137,6 +137,34 @@ public:
const wxString& msgIdLanguage = "en");
/**
Returns the languages of all translations that can be used for the @a
domain.
This is a more general version of GetBestTranslation(), which returns
the whole list of preferred UI languages for which a translation for
the @a domain was found instead of just the first, i.e. the most
preferred, element of this list.
@param domain
The catalog domain to look for.
@param msgIdLanguage
Specifies the language of "msgid" strings in source code (i.e.
arguments to GetString(), wxGetTranslation() and the _() macro).
@return An array of language codes if any suitable matches were found,
empty array otherwise.
@since 3.1.2
*/
wxArrayString GetAcceptableTranslations(const wxString& domain,
wxLanguage msgIdLanguage);
/// @overload
wxArrayString GetAcceptableTranslations(const wxString& domain,
const wxString& msgIdLanguage = "en");
/**
Add standard wxWidgets catalogs ("wxstd" and possible port-specific
catalogs).
@@ -147,9 +175,10 @@ public:
bool AddStdCatalog();
/**
Add a catalog for use with the current locale.
Add a catalog for the preferred UI language. In case of multiple
preferences, add catalog for each language, if available.
By default, it is searched for in standard places (see
By default, the catalog is searched for in standard places (see
wxFileTranslationsLoader), but you may also prepend additional
directories to the search path with
wxFileTranslationsLoader::AddCatalogLookupPathPrefix().
@@ -173,8 +202,9 @@ public:
code are used instead.
@return
@true if catalog was successfully loaded, @false otherwise (which might
mean that the catalog is not found or that it isn't in the correct format).
@true if catalog in the most preferred language was successfully loaded,
@false otherwise (which might mean that the catalog is not found or that
it isn't in the correct format).
*/
bool AddCatalog(const wxString& domain,
wxLanguage msgIdLanguage = wxLANGUAGE_ENGLISH_US);
@@ -200,8 +230,9 @@ public:
in case they use 8-bit characters (e.g. German or French strings).
@return
@true if catalog was successfully loaded, @false otherwise (which might
mean that the catalog is not found or that it isn't in the correct format).
@true if catalog in the most preferred language was successfully loaded,
@false otherwise (which might mean that the catalog is not found or that
it isn't in the correct format).
*/
bool AddCatalog(const wxString& domain,
wxLanguage msgIdLanguage,