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
The modal dialog case is not really different, the dialog may still need to be
dismissed if the associated object doesn't exist any longer.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
While this is not necessary to use wxPreferencesEditor in normal scenario, it
can be useful if the program needs to handle modal dialogs in some special way.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74009 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows derived classes to override it to do something before/after
showing the dialog, which can be useful on the platforms where modal dialogs
are used for wxPreferencesEditor implementation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74008 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Customize the title is useful for "Settings"-style windows which are used for
editing the properties of the given object, that should be identified in the
window title, as opposed to the global program preferences.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
In the common case, when Run() is called immediately after Create() and
default stack size is used, it's unnecessarily verbose. Just create the
thread in Run() if it wasn't done explicitly yet.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73999 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
This method tries to find the current view harder than GetCurrentView() and
always returns a non-NULL view if there are any open documents at all.
This is used by wxDocManager internally to find the view to apply the user
commands to and will also be needed in the upcoming changes outside of
wxDocManager, so just make this method public, as it seems that it could be
useful in user code too, especially if we could use some better fallback than
the first opened document (e.g. the last document the user interacted with
would be better).
This also clarifies the confusion between GetCurrentView() and GetActiveView(),
see #13296.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Explain the possible problems with wxString due to its dual Unicode/ASCII
nature.
Also document the various conversions in the overview itself.
Closes#14694.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73905 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
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