This helper class allows to create wxFonts using shorter and more readable
code, e.g.
wxFont font(12, wxFONTFLAG_DEFAULT,
wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, true,
"DejaVu Sans");
can now be written simply as
wxFont font(wxFontInfo(12).FaceName("DejaVu Sans").Underlined());
Remove the ctor from font flags added in r70445 as it's not needed any longer
now that we have this one and adding it resulted in compilation errors in the
existing code which compiled with 2.8 because of ambiguities between that ctor
and wxFont(int size, int family, int style, int weight. bool underlined, ...)
one, e.g.
wxFont(12, wxFONTFAMILY_SWISS, wxNORMAL, wxNORMAL)
didn't compile any more but it does compile again now.
See #9907.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix incorrect conflict resolution between the changes of r73823 and r73850:
the first renamed wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED to
wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK while the latter renamed it
to wxEVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED. The proper new name is
wxEVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, use it instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73851 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use the same short names as are used by the event table macros for the event
type constants themselves. This makes them much more comfortable to use, e.g.
Bind(wxEVT_BUTTON) compared to Bind(wxEVT_COMMAND_BUTTON_CLICKED).
The old long names are still kept for backwards compatibility and shouldn't be
removed as it doesn't really cost anything to continue providing them, but all
new event types should only use the short versions.
Closes#10661.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Amend the changes of r73839:
- Don't use covariant return type for wxHtmlWinTagHandler::GetParser() as
VC6, which we still support, doesn't like it. Besides, this seems
unnecessary.
- Don't make GetParser() virtual at all as this doesn't appear to be necessary
neither.
- Add "@since 2.9.5" to the documentation of the new method.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add the simplest and most fool proof of chaining the pages in static wizards:
just chain several calls to the new, non-static, wxWizardPageSimple::Chain()
overload.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
By default the columns are auto-sized to fit just their label, which is fast
but not very user-friendly. Allow customizing this behaviour by handling the
(new) wxEVT_GRID_COL_AUTO_SIZE event.
Closes#15077.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't include wxBORDER_NONE in neither wxToolBar ctor and Create() nor
wxFrame::CreateToolBar() flags parameter, override GetDefaultBorder() in
wxToolBar itself instead to use the border style appropriate for the current
platform by default. This has the same effect -- the default border style is
used unless another one is explicitly specified -- but is more clear and
consistent.
Also add wxTB_DEFAULT_STYLE for consistency with the other classes.
Closes#15037.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
GTK+ applications don't use sunken status bars since many years, do don't do
it in wxWidgets neither by default any more. Add wxSB_SUNKEN style that can be
explicitly used if the old appearance is desired.
Closes#15009.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73691 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't say "is supported" when meaning "if supported" and, in fact, remove this
part entirely as these styles are supported by all implementations.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This method couldn't be overridden by the classes deriving from wxLogWindow
because it was called (indirectly) from wxLogWindow ctor itself and so was
completely useless. Just remove it to avoid confusion.
Closes#12763.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Implements native UI for preferences editing. In particular, the API
handles the differences between modal (Windows) and non-modal (OS X) preferences windows and provides platform's native look.
Currently implemented natively for wxOSX/Cocoa, wxGTK and Windows (the latter is used as a fallback generic implementation as well).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
As MSW native control centers the image, it must be entirely redrawn when the
area in which the image is centered changes, but it doesn't happen by default,
so do it ourselves explicitly.
Also explain that this centering behaviour is platform-specific and shouldn't
be relied upon.
Closes#4564.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73485 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxBU_EXACTFIT in wxMSW only affected the width of the button but not its
height, which was still made as big as the standard button size as otherwise
the button text was rendered badly. However there is no reason to do this for
the buttons without any text, so let wxBU_EXACTFIT be really exact, in both
directions, in this case.
Also document this rather non obvious wxBU_EXACTFIT behaviour.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73461 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Now that the position of wxKeyEvent is initialized on demand, don't use m_x
and m_y fields directly but always use GetX() and GetY().
Also improve GetPosition() documentation slightly and mention only the new
version, taking wxCoord, in it as the old one, taking long, is provided for
compatiblity only.
Closes#14987.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73411 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add wxWebViewFactory as an abstract factory to provide backend creation. Remove old factory methods using wxWebViewBackend enum in favour of the new wxString based method.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73369 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't assert if an already hidden/shown row/column is being hidden/shown again
but simply don't do anything. This is more convenient because the code outside
wxGrid has no efficient way to only hide a row/column if it's currently shown.
Closes#14960.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73366 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Explain that the menu is enabled by default so the main use of this method is
to disable it.
Also add "@since" tags for the new methods.
And mention this in the changelog.
See #14789.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73327 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Due to an apparent Doxygen bug, methods inherited from wxItemContainer via
wxControlWithItems didn't appear in the documentation, so work around this by
using wxItemContainer as a direct base class.
Closes#14882.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Explain that, in spite of its name, this function doesn't disable scrolling
when called with false argument but just changes the mechanism used to
implement it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These methods were not documented and somehow inherited the description of the
first method of the group they were in, which didn't make any sense for them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73149 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't end the brief description at the first period if it's a period which is
part of "i.e." or "e.g.": escape the space following it to prevent Doxygen
from recognizing it as an end of sentence.
See #14866.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73084 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It was already disabled for VC6 but VC7 doesn't compile this code neither, so
disable it for this compiler as well.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add accessors returning more convenient wxVectors to supplement the existing
ones giving access to internally used wxLists.
Closes#14814.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This reverts r72978, 72984, 72989 and 72992. Do not use wxNOEXCEPT for
wxTextCtrl dtor as this breaks compilation of any user-defined classes
inheriting from it unless they use wxNOEXCEPT as well and the benefits
(fixing a harmless warning for the niche ICC compiler) are just not worth
the compatibility breakage.
See #14826.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This flag generates the corresponding event when the file system containing
the watched directory is unmounted. Currently it is only implemented for
Linux where unmounting now generates this event instead of an error.
Closes#14834.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This fixes warnings from Intel compiler about overriding function using a
different exception specification than the base one and also incidentally
provides a handy macro that can be useful in other situations.
Closes#14826.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This flag allows to monitor changes to the file attributes, such as file
modification time.
This patch adds the flag, support for it under Linux and the corresponding
modifications to the sample and the test suite.
Closes#14833.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This undoes the changes of r44773 because calling setlocale() resulted in C
locale being set differently from C++ locale which was confusing and led to
huge slowdowns in any code using std::stream with at least MinGW. And setting
the C++ locale to be the same, as r72719 tried to do, doesn't seem to be
practical as it results in immediate crashes under OS X and MinGW when used
under XP.
Do provide wxApp::SetCLocale() helper to explicitly do what was previously
done implicitly, even though currently it is a trivial wrapper for setlocale()
and we don't even need to call gtk_set_locale() as it has never done anything
else and is deprecated since GTK+ 2.24.
Closes#14780.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This doesn't make much sense and disallowing it makes check items consistent
with radio ones as previously you could set up a dropdown for the former but
not for the latter.
Also update the documentation of the relevant methods.
Closes#14795.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This function can be used to size a, say, wxTextCtrl to be exactly of the size
needed to enter the given amount of text in it.
This patch adds wxGTK implementation for wxTextCtrl, wxChoice and wxCombobox;
changes to the samples and the documentation.
Closes#14812.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Also rearrange them so that the derived classes always appear after the base
ones, otherwise SWIG can't compile this file.
Closes#14784.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72911 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows to define just one of them to run some tool, e.g. SWIG, on only
the classes defined in the base or in the core library (both are defined by
default for Doxygen itself).
Closes#14785.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Put the GUI classes in a new interface/wx/generic/logg.h to make it easier to
generate wrappers for only the base or only the core libraries.
Also change the order of the classes remaining in log.h to ensure that the
base classes are always defined before the derived ones.
Closes#14784.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72818 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Include the wxFILE_EXISTS_NO_FOLLOW bit in wxFILE_EXISTS_SYMLINK definition to
allow using just wxFileName::Exists(wxFILE_EXISTS_SYMLINK) which used to never
work because the link was followed.
Closes#14777.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There is no clear way to implement wxRemoveRef() for VC6 so just disable it,
and CallAfter() as it relies on it, for this compiler.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Using wxFILE_EXISTS_SYMLINK without wxFILE_EXISTS_NO_FOLLOW can only be
fruitless, so mention that they should normally be used together in the
documentation.
An alternative solution would be to always add wxFILE_EXISTS_NO_FOLLOW
automatically if wxFILE_EXISTS_SYMLINK is used, perhaps we should do this
instead.
See #14542.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This flag allows to avoid following the symbolic links during the directory
traversal. In particular, this means that links to the directories
(potentially outside the directory being traversed) are not considered as
directories at all when it is used, potentially avoiding surprises.
Closes#14542.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add wxAsyncMethodCallEvent that is handled simply by calling the method this
event was created for and add default handler for this event to wxEvtHandler.
Implement CallAfter() overloads for up to 2 parameters only for now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add "flags" parameter to wxFileName::Exists() to allow testing for the
existing of files of specific type: not only regular or directory but also
symlink, device, FIFO or socket.
And also to pass wxFILE_EXISTS_NO_FOLLOW flag inhibiting following the
symlinks without using DontFollowLink().
Closes#14542.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72707 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Provide a public and documented accessor for wxEvent::m_callbackUserData.
Also document better the user data semantics and how it can be used.
Closes#14748.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Many classes were documented as being in a wrong library, mostly a lot of
wxbase vs wxcore confusion but we even managed to document wxAuiManager as
being in wxbase. Correct all this.
Closes#14745, #14747.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72686 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow to work with the symlinks themselves and not the file they reference by
calling the new wxFileName::DontFollowLink().
Update Unix wxDir implementation to not treat symlinks to directories as
directories, this ensures that we don't recurse into the directories outside
of the original parent accidentally.
Closes#14542.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow making TAB/Shift-TAB wrap to the next/previous row or going to the
next/previous control when the cursor is at the end/beginning of the current
row easily.
Also add wxEVT_GRID_TABBING event to allow customizing TAB behaviour even
further.
Update the sample to show the different possible standard behaviours and a
stupid example of a custom one (it would be probably more useful to implement
something a tad more realistic, e.g. tabbing to the next non-empty cell).
Closes#14711.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
TABs appear simply as a space under MSW (because we don't use LBS_USETABSTOPS
style there) but are aligned to (multiple of 8?) tab stops under GTK. It's not
clear which behaviour is actually preferable so for now just document the
inconsistency and advise people to use spaces instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't say that it's limited -- because, strictly speaking, it isn't -- but
mention other controls that are better alternatives for large numbers of items.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
In addition to forgetting to specify the default value in wxGenericListCtrl,
it was also not documented, do it now to complete the fix of r72654.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72655 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Mostly copy wxGenericTreeCtrl incremental search implementation to
wxGenericListCtrl (unfortunately there is no simple way to reuse this code
currently), including the recently added EnableBellOnNoMatch() method.
Update the sample to test it, the key event handling in it had to be modified
to allow it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
For consistency with Windows, allow to optionally generate a beep when
incremental search in the tree control doesn't find anything.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Explain that by default both styles are assumed but that using just one of
them disables the scrolling in the other direction.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow creating a disabled version of the colour without having to manually
break it into RGB components and then recreating it from them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72618 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This method returns the difference between the dates as wxDateSpan, unlike the
existing Subtract() and overloaded operator-() that return wxTimeSpan.
Closes#14704.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72600 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Make it possible to use wxFFile and wxFile interchangeably for simply reading
the entire contents of the file as a string.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72596 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow to specify whether the socket should block until all the data is read or
written or, on the contrary, avoid blocking only when reading or writing
instead of always using the same behaviour in both directions.
Also add separate counters for the bytes read/written instead of using the
same one for both.
These changes make it possible to use the same socket for reading/writing in
different threads.
Closes#14506.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72591 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add a new wxSafeArray<> class wrapping SAFEARRAY.
Also add support for converting VARIANTs containing other, previously
unsupported, standard types.
Closes#14637.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72543 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add the possibility to retrieve the client data associated with a button and
not only set it (which wasn't very useful on its own).
Also allow having both typed (owned) and untyped (not owned) client data, as
in the other wxWidgets controls.
To avoid confusion between two different kinds of data, remove "client_data"
argument from the functions adding buttons and provide separate methods with
distinct names for setting and getting client data.
Closes#14630.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72529 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These functions also change the rectangle right/bottom position, unlike
Set{Right,Bottom}() that change its width/height respectively. This is not
very logical but impossible to change for compatibility reasons, so at least
document it clearly.
Closes#14678.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72521 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Added svn:eol-style (set to native) and svn:keywords (set to Id) for .cpp and .h files that were added since r72218.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Optionally show standard "Help" question mark button in the ribbon top right
corner and generate the appropriate event for it.
Closes#14576.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Previously, if a wxGrid row or column was hidden by setting its size to 0, its
original size was lost. Change this so that it's preserved now and can be
restored by setting the size to the special -1 value later.
Closes#14133.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72491 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These attributes were not handled by wxFont::GetNativeFontInfoDesc() as it
only serialized the Pango font description which doesn't support them.
Fix this by handling these attributes explicitly and prepending them to the
Pango font string if necessary.
Closes#14559.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Just as wxBITMAP() provides a portable way of loading bitmaps from either
Windows BMP resources or embedded XPM data depending on the platform,
wxBITMAP_PNG() hides the difference between loading bitmaps from PNG resources
under Windows and embedded PNG data elsewhere.
Also add wxBITMAP_PNG_FROM_DATA() macro which always loads PNG data from
memory: it's needed anyhow as part of wxBITMAP_PNG() implementation and some
people may prefer to always use it under all platforms.
Finally modify the image sample to demonstrate loading PNG images from both
resources and memory. This involved creation of a new Windows .rc file for it
and copying its data files to Resources bundle directory under OS X.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72477 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This simple function can be used to create a wxBitmap from the raw image data
in PNG format. It is just a thin wrapper around wxImage load functions under
almost all platforms but has two advantages:
1. It can be implemented natively for some platforms (currently only OS X).
2. It can be used in a single expression as it doesn't require creating a
temporary wxMemoryInputStream and this will be required by wxBITMAP_PNG()
macro that will be added soon.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72476 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Such buttons may be needed in other places and it's not obvious to create
them, so add a new public wxBitmapButton::NewCloseButton() method to allow
creating them easily.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Document the new and preferred overload avoiding copying the data. Also
document the new (since 2.9.1) parameters of the old one.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
GetKeyCode() will always return valid key codes for Latin-1 symbols but won't
do it for other non-ASCII Unicode characters even if they are representable in
the current locale.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is incorrect as wxIsprint() is locale-dependent and only really works as
expected in UTF-8 locales (which are never used under Windows). Instead, just
test for control characters directly.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72448 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These functions were present in the interface header but didn't have their own
documentation and somehow inherited the documentation of the first function in
the same section which didn't make any sense for them. Do document them now.
Closes#14607.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Implement preferred language selection on modern systems (OS X, Windows
Vista+). User settings for locale (aka "regional settings") and UI
language are independent there and the UI language shouldn't be
determined from the locale.
Moreover, the OS provides a list of preferred languages, not a single
value (as with locale), so we should use the best language given user's
preferences and available translations. A Czech user may prefer Slovak
UI over English, for example, and we should use Slovak translation in
absence of Czech one in that case instead of falling back to English.
On Unix, locale is language and so things remain as before.
Notice that calling wxLocale::Init(wxLANGUAGE_DEFAULT) does the right
thing now: it sets the locale to whatever the user has configured in
regional settings and loads translations corresponding to default
wxTranslations language, which is determined as described above.
Previously, UI would be translated using a language corresponding to the
regional settings.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72430 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add a generic SetBase() API even though right now only bases 10 and 16 are
supported as we might support other ones (e.g. 8?) in the future. Implement it
for MSW, GTK and generic versions.
Add controls allowing to test this feature to the widgets sample.
Add "base" property support to the XRC handler for wxSpinCtrl, document it and
test it in the xrc sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This new control allows the program to show one of the several pages without
allowing the user to change them (or even see that there are several of them)
himself.
This class is fully inline, so it doesn't add anything to the library and
hence doesn't need neither wxUSE_SIMPLEBOOK nor the corresponding configure
option.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The best size of the window should be at least as large as its min size and
less than its max size. This allows to override the windows own best size
determination with an explicit SetMinSize() or SetMaxSize() call.
See #11497.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is similar to DecTo() but can be used even if the wxSize argument has
some components set to -1.
Notice that we don't need IncToIfSpecified() because IncTo() already works
correctly anyhow in this case.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Other ports don't send wxEVT_COMMAND_SPINCTRL_UPDATED from SetRange() even if
the value changed because it was adjusted to fit into the new range and this
makes sense as this change is not due to a user action, so don't send this
event under wxMSW neither.
Also add a unit test checking for this behaviour.
Closes#14583.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Instead of returning a generic wxWindow*, return the type actually used.
It was part of the public header already, but not used in any publicly
visible way.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This reverts r70556, i.e. removes the scope operators added by it to all
WX_DECLARE_HASH_{MAP,SET} macros, and implements a workaround for the problem
due to the use of empty base class optimization in g++ 4.7 standard library
implementations inside the macros themselves by prepending the hasher and
comparator classes with explicit "struct".
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775