The public header for this class is wx/spinctrl.h, but it was documented in
wx/generic/spinctrg.h which didn't even correspond to an existing real header
file (which is called spinctlg.h). Move the documentation to wx/spinctrl.h and
remove the old file.
Closes#11548.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Stretchable spaces consume all extra toolbar space not allocated to the fixed
size items. They can in particular be used to right-align (some) toolbar tools.
Add and document the new API, change the sample to show it and implement it
for MSW, GTK and OS X/Cocoa.
Also refactor MSW background erasing/repainting code to avoid duplicated calls
to DrawThemeBackground(), call it from a new helper MSWEraseRect() function.
Note that we may want to add support for "invisible" separators, IOW
non-stretchable spaces. This could be easily done for MSW after the changes in
this commit and is supported natively by GTK+ and Cocoa so implementing this
would be trivial if there is any interest.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Added a helper DoInsertNewTool() function to avoid code duplication and ensure
that we never forget to delete a new tool if inserting it into the toolbar
failed.
Also explicitly document that the tool passed to the public InsertTool() is
not owned by the toolbar and so must be deleted by the caller if its insertion
failed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't mention the words "release mode" as there is no such thing now, instead
refer to wxDEBUG_LEVEL explicitly.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62839 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Calls to wxStrchr(char-string, wide-char) would previously fail if wide
character couldn't be converted to a single character in the current locale
encoding. Change it to simply return NULL in this case as it's a safe and
useful generalization: a narrow string will never contain a wide character not
representable in the current locale.
Add wxUniChar::GetAsChar() to help with implementing this.
Closes#11487.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62738 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxGridCellAttr didn't provide any way to query its alignment attributes
without falling back to the (always defined) default alignment so the code in
wxGridCellNumberRenderer and similar classes simply always used right
alignment,
Add a new wxGridCellAttr::GetNonDefaultAlignment() function which allows to
retrieve the alignment defined in the attribute and use it to use right
alignment by default but allow overriding it.
Add a test to the sample showing a non right-aligned numeric cell.
Incidentally fix a long-standing bug in wxGridCell{DateTime,Enum}Renderers
which used wxRIGHT instead of wxALIGN_RIGHT and so were not aligned properly
even by default.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxGridCellAttr was using literal -1 to indicate "no alignment" which wasn't
immediately obvious, use a new wxALIGN_INVALID (which has the same value)
instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxFont::GetNativeFontInfoDesc() and GetNativeFontInfoUserDesc() were
overridden just to ensure that the font is realized but it makes sense to do
it in wxFontRefData::GetNativeFontInfo() itself as detecting the face name
won't work if the font is not realized anyhow. And then we don't need these
functions at all as the only thing they do is checking that the font is valid
when they are called but this can be done in the base class itself as this
should happen in all ports (document that this is the case).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Currently exceptions thrown from this function are not passed to wxApp::
OnExceptionInMainLoop() (unlike exceptions thrown from timer event handlers).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62697 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Support wxSL_{LEFT,TOP,RIGHT,BOTTOM} in wxGTL version of wxSlider.
Make the display of the orientations in the slider page of the widgets sample
more clear.
Also document wxSL_<DIR> meaning better.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62655 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use parentheses around the macro expansion to ensure that code like "whatever
& ~wxSL_LABELS" still works as expected.
Be more explicit in wxSL_LABELS description and mark wxSL_MIN_MAX_LABELS and
wxSL_VALUE_LABEL as being new in 2.9.1.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62652 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We had wxBase64Decode(void*,size_t,const char*,size_t) as well as
wxBase64Decode(const char*,size_t) and wxBase64Decode(wxString) already but
not a version taking the buffer and wxString, complete the set of overloads
now.
This allows the unit test to compile in STL build (where there is no implicit
conversion from wxString to const char *).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62614 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Set up the DC passed to wxDataViewCustomRenderer::Render() to use the font and
colour defined by the item attribute by default so that any calls to
RenderText() from it will use them automatically.
Also added public wxDataViewCustomRenderer::GetAttr() to allow retrieving the
attribute explicitly in Render().
The column using custom renderer in the dataview sample now works as expected
in the generic version; the native ones will be corrected in the upcoming
commits.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
While this function is usually called by wx itself it may be useful to call it
explicitly in some particular situations, as documented in the function
description, so make it officially public.
Closes#11396.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62546 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This method is useful for getting the number of items in the control and
should be part of the public API instead of being marked as internal.
Closes#11380.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is an incompatible change but having to use a non-const model pointer to
call a clearly logically const version was simply too ugly so change it while
we still can.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775