This fixes the DLL build of aui library as it can now be linked without
leaving any unresolved dependencies to the code in xml library (where
wxXmlNode is implemented).
Closes#15686.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Make MyThread a friend to allow it accessing the private fields of MyFrame.
Notice that this example still remains badly written and should be ideally
entirely redone using conditions and mutexes.
See #15881.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75637 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Document that this function adjusts the window font size under non-OS X
systems and explain why it should still be used instead of changing the font
size directly.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75635 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Typical wxScopedArray initialization uses "new T[n]" expression, allow to omit
most of it and specify just n, the number of elements to allocate.
Use the new shorter form in the places where wxScopedArray(new ...) was used
(which is in almost all of them)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It doesn't return the parent of a TLW but TLW itself. Whether this is a good
idea or bad one, this is how it works since a very long time and we don't want
to change it any more.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75357 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Static event tables are search top to bottom while dynamic event tables are
searched in the most-recently-bound to the most-early-bound order.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Native OS X apps sometimes have certain app-wide comments in the
Apple/app menu ("Check for Updates" is a typical example). Make it
possible to write well-behaved OS X apps by exposing this menu to user
code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75231 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Added identifier to wxRichTextObject so objects can be addressed by name.
Generalised wxRICHTEXT_CHANGE_OBJECT command so it can now apply to a paragraph as well as an object within a paragraph.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75124 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The existing documentation was flat out wrong as it is simply impossible to
pass a circle through any two arbitrary points while also fixing its centre,
explain what this function really does and also use this as an opportunity to
point people to DrawEllipticArc() which is much less confusing.
Also clarify the segments drawing logic of DrawArc() as it is quite
counterintuitive too as it depends on the brush being used and is also
different from DrawEllipticArc() which uses a simpler logic.
See #15609.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
While we can't change the type of wxVariant to which SAFEARRAYs are converted
by default, it's much more convenient to work with the variant objects of the
correct type, i.e. using wxVariantDataSafeArray, when dealing with SAFEARRAYs,
so add a flag which can be set to tell a wxAutomationObject to behave in this
way.
Closes#14700.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
While the relevant methods are in wxTextEntry, they are only really
implemented for wxTextCtrl in wxOSX, not wxComboBox, which also derives from
wxTextEntry.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows the program to distinguish between some other, unspecified,
warnings and this one which can and does happen whenever too many changes
occur too quickly but which has a clearly defined work around: the state kept
inside the program just needs to be refreshed by rescanning the directory anew.
See #12847.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This method is implemented for wxMSW-only currently and allows to check
whether the window is being activated by a mouse click or in some other way
there.
Closes#15516.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxListView appears identically to wxListCtrl in report mode and the existing
wxListCtrl screenshots show it exactly in this mode, so it doesn't make much
sense to duplicate them.
This also avoids Doxygen warnings about missing wxListView screenshots for
MSW and OSX.
See #15346.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is more convenient to use than HasParam() + GetParam() and also slightly
more efficient as we search for the tag name only once.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74879 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This was the only place where "@since 3.0.0" was used, replace it with just
"3.0" for consistency with all the others.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74878 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Replace GetString(), which always returns something (possibly the
original string) with GetTranslatedString() that returns either a
pointer to translated string or NULL.
This simplifies the code a bit, all handling of missing translations is
now done in wxGetTranslation().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74836 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The GetUntranslatedString() hack keeps a global copy of all strings, so
that it can return a const reference as wxGetTranslation() return value.
A global wxHashSet instance shared by all threads won't do, even guarded
with a critical section, because it may internally copy values on any
insert and thus invalidate pointers that may still be used on another
thread.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74833 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The existence of "delete_windows" argument could mislead people into thinking
that sizers were not deleted neither when it had false value, see #15475.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74809 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
'dir' is not very descriptive (of course it's a direction!), it's better
to include 'default' in the name to indicate this is the default value
to use in absence of a specific one.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74788 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Always move the dates invalid due to DST (i.e. falling into the "missing" hour
on the DST start date) forward, as GNU libc does, even when using a different
CRT implementation, such as MSVC one which moves the invalid dates backwards.
This seems more expected and also fixes an especially bad problem which
happened due to moving the date backwards in Brazilian time zone where DST
starts at midnight as doing this changed the day and totally broke ParseDate()
assumption that setting wxDateTime to 00:00:00 at the given date really did
set it to this date.
Closes#15419.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add a convenience ShowWindowModalThenDo() variant of ShowWindowModal()
that takes a functor argument and calls it when the dialog is closed.
This is, of course, particularly useful when the argument is a C++11
lambda, especially when having more than one window-modal dialog invoked
from the same window, which can get messy quickly with all the
wxEVT_WINDOW_MODAL_DIALOG_CLOSED handlers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74775 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add Wait() overload that takes a functor argument and doesn't return
until the condition is signaled _and_ the predicate returns true. This
is useful for dealing with spurious wakeups and is modeled after C++11
std::condition_variable's corresponding method.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This macro should be used instead of wxDEPRECATED() for the new deprecations
as it allows to give a helpful explanatory message (if supported by the
compiler) and also is simpler to use as it doesn't require wrapping the entire
declaration in it but can be simply used before it.
Also add wxDEPRECATED() support for clang as a side effect.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This method was declared and even documented but never actually implemented,
and GregorianAdoption enum used by it had many incorrectly defined elements.
Just remove both the method and the enum instead of fixing/implementing them
as they are not that important (as witnessed by the fact that nobody has
complained about the method being missing since almost 15 years).
Closes#15400.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
For historical/compatibility reasons we handle this colour as transparent in
wxMSW when loading the bitmaps from resources, but this is rather not obvious
for the new users, so document it and provide a way of compensating for this
in the documentation as well.
Closes#15371.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74641 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
After the changes of r53758 wxMSW didn't generate any wxEVT_TEXT events but
this was still the case for the generic version (and hence for
wxSpinCtrlDouble under MSW too) and wasn't documented.
Fix all versions to avoid sending events for programmatic actions, add unit
tests checking this behaviour and document it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74631 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
wxKill(wxSIGTERM) doesn't work if the child process has no open windows as it
doesn't have anything to post the WM_QUIT message to.
Document this and point out that wxKill(wxSIGKILL) still works in this case.
Closes#15356.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74587 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
The latter will be convenient to use in the upcoming changes to wxOSX radio
items management code and add the former for the symmetry.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74542 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The functions are available in wxBase builds too, but wx/windowid.h
isn't. Rather than always including that header, just use int, for which
wxWindowID is a typedef. This keeps the functions available in wxBase
for compatibility and is consistent with how IDs are handled in other
parts of wxBase, particularly wxEvent.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74486 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxNewId(), wxRegisterId() and wxGetCurrentId() functions all work with
window IDs, so they should use the dedicated type. Previously, they
worked with long, which is not even the same type (wxWindowID is int),
causing implicit type conversion warnings.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74485 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Previously, the prefix directory itself for searched for catalogs, in
addition to prefix/lang/LC_MESSAGES and prefix/lang. This never made
much sense, because only one catalog could be in such place, instead of
multiple catalogs for more languages. It also prevented successful
identification of catalog's language and didn't work with
GetAvailableLanguages().
Remove this misfeature and update the documentation accordingly. Update
OS X-specific code so that it continues to work (it previously depended
on this behavior). As a side effect, *.lproj directories are now
recognized in all search prefixes, not just in Resources.
See #12498, #15253.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74441 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The documentation incorrectly stated that the current working directory
is searched for translations. This isn't the case (and wouldn't be a
good thing to do).
See #12498.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74439 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
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
The documentation for wxGetClientDisplayRect(), wxGetDisplayPPI(),
wxGetDisplaySize() and wxGetDisplaySizeMM() didn't appear in the output
because they were documented as "overloads" of the corresponding functions
without "Get" prefix inside an @addtogroup Doxygen macro and apparently this
is not supported.
Simply document them separately to fix this.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxOSX uses wxGCDC for its wxDC functionality and wxGCDC doesn't implement this
operation, even not using the horribly inefficient wxGTK fallback.
See #15151.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74244 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
As the event being defined is a wxThreadEvent, EVT_THREAD must be used.
Also rename wxEVT_COMMAND_MYTHREAD_UPDATE to myEVT_THREAD_UPDATE to avoid
using "wxEVT_" prefix reserved by wx itself.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74159 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
A radio box always has selection and it can't be unset (at least not under all
platforms), so document that the item passed to its SetSelection() must be
valid, unlike with SetSelection() methods in some other classes.
Closes#15233.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74073 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
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
Escape "-" characters in the beginning of the paragraph as they are not
handled properly by Doxygen otherwise.
Escape the space after "i.e." to prevent the brief doc string from being
terminated by it.
Escape "--" which is translated to a dash by Doxygen otherwise.
Closes#15228.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74064 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 conversions to/from long long and unsigned long long values in wxUniChar
for consistency with the other integral types.
Also make the code shorter by using helper wxDO_FOR_INT_TYPES() and
wxDO_FOR_CHAR_INT_TYPES() macros to avoid duplicating the same code for all of
the integral types and having to handle wchar_t (and wxLongLong_t now)
specially because sometimes we may need to overload on it and sometimes not.
Finally, add more tests to check that all the wxUniChar methods compile and
work with all the different types.
Closes#15206.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74029 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775