This method allows to get the full width needed by wxPropertyGrid and is
useful for determining the space to allocate for it, e.g. when creating a
popup showing the property grid, as shown by the changes to the sample.
Closes#15368.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.
If nothing else, this will make an eventual transition to Git simpler.
Closes#14487.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add wxHTTP::SetMethod().
Also simplify the code by determining the method to use in Connect() instead
of doing it in BuildRequest() itself.
Get rid of the now unused wxHTTP_Req enum.
Closes#15354.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74597 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Radio boxes refused to take focus from keyboard as their
wxControlContainer::AcceptsFocusFromKeyboard() always returned false because
the base wxStaticBox class disabled setting the focus to the control itself
and wxRadioBox doesn't have any children at wx level in wxMSW.
Fix this by reenabling "self focus" in wxRadioBox to make it possible to
accept focus from keyboard. This is not ideal as it doesn't take into account
e.g. radio boxes without any items or with all items disabled or hidden, but
this should be rare and would require virtualizing all children access at
wxControlContainer level, i.e. would be quite non-trivial so don't do this for
now as this, at least, fixes the navigation in common/normal case.
Also remove the unnecessary AcceptsFocus() override from wxRadioBox as this is
now done at wxControlContainer level.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74583 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The cursor didn't change to a link one when the mouse was over link areas in
an image map.
Fix this by generalizing wxHtmlCell::GetMouseCursor() into GetMouseCursorAt().
Closes#15350.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74570 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
End the polite fiction that build/tools/create-archive.py is used to build the
release because it isn't and all the last releases were built using different
scripts. Document their use in more details.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Deal correctly with updating the indices when a radio item is inserted into an
existing radio group (which wasn't done previously and resulted in a unit test
failure in MenuTestCase::RadioItems()) and also with inserting the normal
items before an existing radio group as the stored indices were not updated
correctly.
The code is still ugly and it probably wouldn't be a bad idea to reuse
wxMenuRadioItemsData used in wxMSW for similar purposes, but at least the unit
tests pass now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
"MSW" is used as the name of toolkit using the standard Windows UI while
"Windows" is the name of the OS under which wxGTK can be now used too (in
addition to wxMSW).
This terminology is not perfect but at least let's keep it unambiguous.
Closes#15328.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74502 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add pngprefix.h file generated by libpng configure/make process (which we
don't run during wxWidgets build, so this is something that will need to be
redone manually whenever libpng is upgraded, the procedure for doing this is
documented in docs/tech/tn0025.txt) in order to use "wx_" prefix for all
libpng public symbols. This should avoid at least some problems due to the
conflicts between the built-in libpng and shared libpng loaded into the
process as GTK+ libraries dependency under Unix.
Also rename wx_png_{warning,error} to use upper case PNG for consistency with
wx_PNG_stream_{reader,writer} and to avoid conflict with png_{warning,error}()
which we now rename to have "wx_" prefix.
Closes#14157.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This happens to work under MSW and Unix where there is only one
wxStandardPaths class for both the console and the GUI applications but
doesn't return the correct result under OS X where the Core Foundation
version, returned by wxStandardPaths::Get(), has to be used for the GUI
programs. And historically this confused a lot of people, so just ensure that
they can't accidentally create an object of the wrong type any more.
Closes#13537.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The result was (consistently, so the tests still passed) off by an hour when
the program was ran while DST was in effect. Fix this by avoiding the use of
FileTimeToLocalFileTime() and LocalFileTimeToFileTime() and just directly
converting FILETIME values to wxDateTime. Not only this is more correct but
it's also simpler and more efficient as well.
Also add a unit test for wxFileName::SetTimes() too.
Closes#13098.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
While this code is used by us if the program couldn't be launched at all, it
doesn't mean that it didn't run as -1 could also be returned by the child
process to indicate an error after outputting something, so we should still
read its output in this case.
Closes#15205.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74352 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit changes wxExecute() to handle SIGCHLD to be notified about the
child process termination instead of detecting when the file descriptor
corresponding to the other end of a pipe opened in the parent process was
closed in the child as this was not reliable and could (and did) result in not
detecting the termination of the child processes that closed all their file
descriptors before exiting.
This commit also removes a lot of platform-specific code duplicating the
generic event loop sources support and reuses it for wxExecute() purposes too.
Final big change is that wxEndProcessData was merged into wxExecuteData and we
don't have two similar but quite different classes any more but just one,
which is used both to pass the information from wxExecute() to wxAppTraits
methods and to store this information until the child termination.
Closes#10258.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This method allows to request exiting from the given event loop even if it's
not the currently active one, unlike Exit() which would assert in this case.
With it, it becomes possible to ask the loop to terminate as soon as possible
even if a nested loop is currently running.
See #10258.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is a simple wrapper for wxTimer::Start(timeout, wxTIMER_ONE_SHOT) but is
often more readable and is definitely better than Start(timeout, true) which
many people still use in spite of wxTIMER_ONE_SHOT existence.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74330 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Precompute the values used by various resampling algorithms once instead of
doing it for each pixel. This dramatically speeds them up: more than 3 times
faster in wxImage benchmark with the small images and up to 5 times faster
with larger images.
Closes#15281.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74321 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Handle horizontal mouse wheel scrolling events in a similar (but simpler, as
they always scroll and never change the font size) way to the vertical ones in
wxStyledTextCtrl.
Closes#15266.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is similar to the existing GetLinesPerAction() but is for, surprise,
columns.
Also change the documentation to say that the value returned by both of these
methods is 3 under "most platforms" as some wxOSX currently uses 1 and not 3.
Closes#15239.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74156 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Also send wxEVT_UPDATE_UI events for the extra controls in wxFileDialog.
The combination of these changes allows extra controls to update their state
depending on the current selection in the dialog. Show a simple example of
doing it in the dialogs sample.
Closes#15235.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This relied on SetInsertionPoint(-1) working like in wxTextCtrl but it didn't.
Add an explicit check to it for consistency with the other classes and to make
SetInsertionPointEnd() work.
Closes#15234.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Scroll by entire "sections", i.e. panes of the ribbon, instead of scrolling by
a fixed number of pixels as it's much more useful and user-friendly to uncover
the next section entirely instead of asking the user to press on the arrow
several times before being able to use it.
Closes#15232.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
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