This is just a refactoring of wxMSW code to make it possible to use deferred
window positioning from other places in subsequent commits.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Using wxAtomicDec() is not enough, its result also must be checked as it will
return 0 only in one of the threads if multiple threads call it in parallel,
while the old test for m_count==0 could pass for more than one thread,
resulting in deleting the same pointer more than once.
Closes#15227.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
If wxPrinterDC was created by the native "Print" dialog for a printer that
supports printing multiple copies, we must not manually print multiple copies
ourselves as this results in too many copies being printed. However we still
need to loop explicitly for wxPrinterDC objects created manually or for the
printers without support for multiple copies (supposing they still exist).
Closes#10323.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Extract wxModalDialogHook from wx/testing.h into its own wx/modalhook.h,
extend it to allow to be notified not only about showing modal dialogs but
also about dismissing them and document it and show its use in the dialogs
sample.
Also replace all the WX_TESTING_SHOW_MODAL_HOOK macros occurrences with
WX_HOOK_MODAL_DIALOG.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74037 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't reuse m_lastcount in wxCountingOutputStream to store the stream length,
this doesn't make any sense and results in LastWrite() returning completely
wrong results as it expects m_lastcount to be the number of bytes written by
the last operation.
Add m_lastPos member to store the stream length instead.
Also correct wxCountingOutputStream documentation.
Closes#15215.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow to optionally raed/write float/double values in IEEE 754 single/double
precision formats, respectively, instead of always using the extended
precision format for both of them.
This makes the code more flexible, allowing for better interoperability with
the other programs, and also allows to implement floating point functions in
these classes even when wxUSE_APPLE_IEEE is turned off (as can be the case
because of the licencing concerns for the code in extended.c).
Closes#10625.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We handled the menu events in the menu itself and the associated window, but
not in the menu bar that the menu belonged to. This was unexpected, so allow
handling the events in the menu bar itself too.
Closes#15095.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73922 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is sufficiently important to be mentioned here in addition to the main
documentation. Especially considering that this results in run-time crashes
instead of (just) compile-time errors with MSVC.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73906 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Previously the max number of characters that could be entered into the editor
was lost when it was cloned, making it impossible to really limit the user
entry.
Closes#15175.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
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
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
As all the other verbs were used in the infinitive and not past tense, do the
same thing for this one too, especially as we already had a mix of both forms.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73831 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
Native Windows functions used by wxDir check the filter against both the short
and the long name resulting in unexpected results, e.g. searching for
"foo.baz" would find "foo.bazaar".
Fix this by explicitly rechecking that we have a valid match ourselves.
Closes#3432.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73790 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
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
This allows to generate the menu open/close/highlight events correctly for the
popup menus used in the dialogs.
Extend the menu sample with a test using such menus.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73562 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows to avoid having another cursor resource and also makes this cursor
nicer as rightarr.cur looks rather out of place under modern Windows systems.
Closes#14991.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73491 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It turns out that the actual bitmap shown in this case varies between the
bitmaps at PBS_DEFAULTED and PBS_STYLUSHOT, so that it's invisible half of the
time if we don't specify the value for the latter. Do it now to fix unwanted
pulsing of the bitmap in the focused button.
Closes#15034.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73486 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The later versions of this compiler don't need it any more, so make it easier
to set up the projects for them at the expense of MSVC 6 and 7 users who will
now need to explicitly define wxUSE_RC_MANIFEST=1 and predefine the
architecture macro (or setup their resource compiler include path to get
wx/msw/rcdefs.h under the lib directory but predefining the architecture is
clearly simpler).
Do generate manifest when using gcc as it predefines the architecture macros
allowing us to avoid requiring using the generated rcdefs.h.
The other compilers will be dealt with as needed if anybody is still using
them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73483 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Owner-drawn checkbox (which is used when wxCheckBox colour is changed) didn't
center its label correctly and didn't right align it when using wxALIGN_RIGHT
style in focused state.
Closes#9628.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The code took into account the possibility that the days in the beginning of
the year might belong to the last week of the previous year but not that the
days at the end of the year could belong to the first week of the next year.
Closes#14973.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We need to call SetMenuItemInfo() from wxMenuItem::SetItemLabel() even for the
owner-drawn items, otherwise their width is not recomputed.
Closes#3897.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't blindly assume that the previous line is big enough if the current one
isn't in wxGrid::PosToEdgeOfLine() (this assumption is wrong even without
taking hiding into account...).
Closes#14947.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73399 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Set the range before setting the initial value when creating wxSpinCtrl, as
otherwise the value was wrongly limited to the default 0..100 range instead of
the one really specified.
Closes#14894.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Properly ignore HDN_BEGINDRAG events for the columns without wxCOL_REORDERABLE
flag. This fixes dragging non-draggable columns in wxDataViewCtrl under MSW.
Closes#14940.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73389 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
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
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 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
Use NSTextView setTypingAttributes to change the attributes used for the new
text by default as setting them for the selected region didn't do anything
useful under OS X (and did nothing at all when there was no selection).
Closes#12839.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This reverts r72805 (leaving only the changes to printdlg.cpp which seem
harmless and potentially useful) as it resulted in crashes when using
wxHtmlEasyPrinting because we called wxPrintout::OnPreparePrinting() before
setting the DC to be used, which was wrong.
In fact it's not clear how can we get the correct range of pages at all
because we need a DC to paginate properly (i.e. taking into account its size)
but we need to show a dialog, in which we already want to show the pages
range, before choosing the DC. Perhaps we could create a dummy DC for
pagination purposes but how could this work with printers using different page
sizes?
The best would probably be to avoid setting any limits on the page range as
showing 9999 looks ugly but anything else would be wrong.
See #8349, #11779.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This currently doesn't work correctly for left/right orientations but at least
it does work for the default top (and also bottom) one.
Closes#12754.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72807 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 support for specifying flexible direction, grow mode in non-flexible
direction and row/column proportions for the growable ones.
Closes#14767.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72710 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
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
This is especially useful when dragging files from Explorer as it provides
big, informative drag images for them that can be easily displayed using
Windows shell support for them.
See #14697.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Only apply Cairo transforms in StartPage(), doing it earlier interferes with
the code doing the coordinate system rotation inside GTK+ itself when a
non-portrait printing mode is used.
Closes#14732.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72646 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Start processing key events from the currently focused window, this ensures
that its key event handlers are tried before the top level window
accelerators.
This is consistent with wxMSW and allows a window to locally override the
global accelerators which really makes sense.
Closes#14553.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72640 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
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
This allows to construct a font based on the parent window font instead of
either fully specifying all font parameters or basing it on a standard font.
Closes#14632.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72572 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
Text origin was calculated incorrectly for the rotated text and the bounding
box was wrong even in non-rotated case.
Fix this by using correct definition of the text anchor according to the SVG
specification and add a test to the svg sample demonstrating this.
Closes#14489.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72494 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
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
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
Recognize this control as part of wxComboBox and so handle WM_CTLCOLOR for it.
To do this, override ContainsHWND() in wxComboBox and use it, on the parent
window, in wxControl::DoMSWControlColor(), if we fail to find the window
directly.
Closes#811.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72468 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
POST-ing sufficiently big amounts of data in wxHTTP didn't work because it
couldn't be sent all at once to the server. Use wxSOCKET_WAITALL to ensure
that we do send all of the data.
Closes#14598.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72409 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 other panes were not previously restored, resulting in bad appearance and
behaviour. Do restore them now before making the previous maximized pane
floating.
Closes#14460.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72346 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
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
wxTLW wasn't properly restored if Iconize(false) was called while the window
was hidden.
Fix this by adding yet another special case to wxTopLevelWindowMSW::Show().
This makes it even less comprehensible than before but there doesn't seem to
be any obvious way to simplify this code without totally changing it.
Closes#14539.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Default user-locale-dependent LCID may be inappropriate for some situations,
notably Microsoft Excel uses localized formula names for non-English LCIDs.
So add a way to change the LCID to use at wxAutomationObject level while
preserving the old behaviour by default.
Closes#14540.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These events were only generated for wxTextCtrl but should be sent for
non-readonly wxComboBox too, so refactor the code to allow its reuse from
wxComboBox.
Also add EVT_TEXT_PASTE handlers for both controls to the widgets sample for
testing.
Closes#14520.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use libnotify -- if detected by configure -- to provide native notifications
in wxGTK. Our API maps to libnotify one in rather straightforward way, we
might consider extending it to cover more of libnotify functionality
(categories, user-defined icons and, especially, actions) later.
Also update the dialogs sample to show another kind of notification and the
documentation to clarify the behaviour of various methods.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72218 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Added wxRibbonBar::ShowPage(), HidePage() and IsPageShown() methods and show
them in the sample.
Also add GetPageNumber() helper.
Closes#14471.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72070 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Map items to rows correctly, just using wxPtrToUInt()-1 is not the right thing
to do if any items were deleted or changed.
Closes#14479.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Still accept "amd64" as a valid TARGET_CPU value but also accept, and
encourage people to use, "x64".
Add a new section about the build system changes to the change log and added a
mini-TOC to it to make navigating it a bit easier and show what changes are
there at a glance.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Previously the combobox was immediately dismissed when the mouse was used.
Fix this by copying the code from wxGridCellChoiceEditor to this class. This
is obviously not ideal and both classes should be refactored to avoid this in
the future but for now this at least fixes the user-visible problem.
Closes#13943.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
If the media file fails to play, we really need to show to the user the
corresponding gstreamer error, otherwise there is no way to understand what
the problem is.
Collect the errors in gst_error_callback() and show them from the main thread
if we get a gstreamer error.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71928 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Refactor the pen/brushes classes to introduce a common base class for them
containing their colour and hatch pattern and stipple bitmap, if any.
And actually create the hatched pattern and use it.
Closes#11981.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71906 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
m_FontSize is in 1..7 range, not 0..6, so add 1 to it when setting it from the
index into m_FontsSizes array.
Also update the comment explaining the valid range of m_FontsSize.
Closes#14442.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71878 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The results were incorrect for italic or bold fonts as we hardcoded
FontStyleRegular instead of using the real font style.
Closes#14421.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Handle creating nested TreeItemUnlocker objects correctly. This fixes the
problem when a wxTreeCtrl method unlocking some item is called with another
item is already unlocked, e.g. from a selection changed event handler.
Closes#14400.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Creating a new wxString from c_str() of the old one resulted in dropping all
string data after the first embedded NUL. Fix this by using Clone() method
that exists specifically for this purpose. It also makes the code more clear.
Closes#14380.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71701 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Show the "extension button" in the ribbon panel if this style is specified.
Also generate a specific event if this button is clicked.
Closes#14283.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71642 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use t_str() instead of wx_str() to make the code work correctly in UTF-8 build
in which wx_str() returns a pointer to UTF-8 buffer while we need a wchar_t
pointer for Windows.
Closes#14371.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775