These options were already mentioned in wxCursor documentation but not
prominently enough, so mention them explicitly in the documentation of
wxCursor ctor from wxImage.
Closes#13820.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Set the wxMenu correctly for wxEVT_MENU_CLOSE events in wxMSW.
Set the menu id correctly to allow wxMenuEvent::IsPopup() to work for both
wxEVT_MENU_OPEN and wxEVT_MENU_CLOSE in wxOSX.
Closes#11313.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Delegate the log string creation to wxLogFormatter. This allows defining a
custom object of a class derived from it to customize the log output instead
of having to override DoLogRecord() in wxLog itself.
Closes#13792.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70086 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These functions are more convenient than directly testing for styles and are
already used outside wxWidgets do make them officially part of the public API.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70075 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use NSDatePicker to implement both of these controls. Almost all of
wxDatePickerCtrl styles are not supported in the native version but the basic
functionality does work and looks much better than the generic version (which
is still available as wxDatePickerCtrlGeneric if needed) under Mac.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This method allows to configure the initial directory to be shown when
browsing for files in an initially empty wxFileDirPickerCtrl.
It is also available for wxDirPickerCtrl but is less useful there.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit fixes the following bug: when an in-place editor control containing
an embedded button was used in wxDataViewCtrl, pressing Enter on the button
would close the editor, accepting changes, instead as (generic) wxDataViewCtrl
intercepts WXK_RETURN in its EVT_CHAR_HOOK handler. To prevent this from
happening, wxButton now handles EVT_CHAR_HOOK itself and never lets the parent
window intercept it if it's for WXK_RETURN. To ensure that normal
wxEVT_KEY_DOWN and wxEVT_CHAR are still generated in this case, wxButton
handler calls the new wxKeyEvent::DoAllowNextEvent() method that was added to
allow suppressing EVT_CHAR_HOOK only, without affecting the subsequent events.
DoAllowNextEvent() is currently only used in wxMSW but support for it was also
added to wxGTK and (both) wxOSX ports.
See #9102.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This ctor was not documented at all because the comment preceding it was a
plain C++ comment and not a Doxygen one.
Do it now, especially as the logic of this ctor is not quite obvious.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69976 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Also renamed wxEXEC_NOHIDE to wxEXEC_SHOW_CONSOLE for symmetry (keeping the
old name for compatibility, of course).
Extend exec sample to allow easily testing the different flags and adding more
of them later.
See #13676.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These flags were described in wxExecute() documentation but not clearly
documented individually, do it now.
Also reduce duplication of documentation in different wxExecute() overloads.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69963 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Unlike in the other ports, these methods currently don't generate any events
under OS X because these events are never generated at all there.
Closes#12642.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Since r69835 the stop watch remained paused even when Start() was called. Do
resume it when restarting it both for backwards compatibility and because it
makes more sense and also document this behaviour.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Send wxEVT_CHAR_HOOK events to the focused window itself but make them
propagatable to ensure that the parent windows (including the top level
parent) still get it. This still allows the TLW parent to intercept keyboard
handling in its child but allows the child (or an intermediate parent window)
to have some say in the matter.
See #9102.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Send wxEVT_CHAR_HOOK before wxEVT_KEY_DOWN and avoid generating both
wxEVT_KEY_DOWN and wxEVT_CHAR if the hook event was handled.
This makes wxGTK behave consistently with wxMSW and wxOSX/Cocoa as can be seen
in the keyboard sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Send wxEVT_CHAR_HOOK event from wxOSX/Cocoa code.
Also test for wxEVT_CHAR_HOOK in the keyboard sample and show the effect of
not skipping it.
Closes#12431.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Ensure that the entire banner window uses the same background colour as the
bitmap, even when the bitmap is too small for the window size. This allows to
avoid using huge bitmaps if extending the bitmap with solid colour looks good
enough.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow %e and %g formats (as well as their upper-letter equivalents) in
addition to the default %f format for number display in wxGrid.
Closes#13583.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69856 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Using wxSTAY_ON_TOP with wxMessageDialog resulted in "Help" button appearing
since r68537 because these two constants had the same numeric value.
Avoid this by changing wxHELP value to be the same as wxCLOSE_BOX instead: the
latter can't be used with wxMessageDialog so this should solve the problem,
even if there are still conflicts. Also adjust the other button constants
values to account for wxHELP change.
Closes#13433.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Preserve compatibility by including wx/time.h from wx/stopwatch.h but put all
the time-related functions in a more logical place.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69838 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fixed wxGetLocalTimeMillis() to really return the local time and provide
wxGetUTCTimeMillis() doing what this function used to do before. Closes#13610.
Also add wxGetUTCTimeUSec() for even higher resolution time stamps as it is
basically the same as wxGetUTCTimeMillis() anyhow, at least for MSW and
non-ancient Unix systems providing gettimeofday().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Also simplify/streamline wxStopWatch implementation and replace confusingly
named m_pause with more clear m_elapsedBeforePause.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69835 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
QueryPerformanceCounter() provides higher resolution and precision for
measuring time under MSW, even though it suffers from some problems in older
Windows versions.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The new functions simply call Add{Option,Switch}() with an empty first
argument but using them makes the code more readable.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69797 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow defining event filters to globally pre-process all application events
without having to override wxApp::FilterEvent().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69794 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The optimal way of creating a literal strings consisting of only ASCII
characters is to use wxS() as this avoids the need for run-time conversion in
all builds while wxT() requires a conversion from wchar_t to UTF-8 in UTF-8
builds. So replace wxT() with wxS() in wxImage options definitions.
Also remove wxT() from the options documentation, it's just useless there.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Make it possible to set a non-default wxPersistenceManager to use and allow
overriding of GetConfig() and GetKey() methods by making them virtual and
documenting them.
This can be notably used to allow porting of the existing code to use
wxPersistenceManager while keeping compatibility with the old settings.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69583 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It doesn't make sense to require passing C functions to wxQsort() that we
define in a C++ library. We also don't need any special calling convention
here.
Notice that the only existing uses of wxQsort() inside wxWidgets itself were
not actually extern "C" and one of them didn't even use the correct calling
convention.
Also avoid using non-wx-prefixed CMPFUNCDATA identifier in a public header,
rename it to wxSortCallback instead.
Finally make wxQsort() documentation slightly more useful.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It doesn't make sense to return anything other than true here, as
failure from one of several notifiers cannot be handled sanely, so just
document that.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix confusion of what cell activation is and inconsistence with native
handling in GTK+. Document the distinction between activating (~
editing) a cell and activating (double-clicking) the whole item.
Deprecate wxDataViewCustomRenderer::LeftClick() and Activate() methods,
replace them with single ActivateCell() that is called for both kinds of
activation.
Fix implementations so that ActivateCell() is not called on
double-click, when it shouldn't, and vice versa: don't send
wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED for cell activation.
Partially reverts r67099 -- restores old 2.9 signatures of compatibility
LeftClick() and Activate() methods.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It can be used to show more customizable tooltips than the native wxToolTip
but at the price of using generic implementation in some cases (actually
almost always now, with the exceptions of text control tooltips under MSW).
Extra features include:
- The balloon-like tooltip form.
- Possibility to show an icon.
- Title display in a different form.
More customization could be added later. It should be also possible to fully
implement this class natively under MSW.
Update the dialogs sample to show the rich tooltips in action.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69463 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Document which wxRegion methods can and can't be used when the region itself
is invalid.
Apply the minor changes to wxGTK (Xor() didn't do the right thing, Offset()
didn't assert) and wxOSX (Offset() crashed) to make their behaviour consistent
with wxMSW.
Add a (trivial, so far, but to be extended later) wxRegion unit test checking
that the methods do indeed behave as documented.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69461 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxCustomBackgroundWindow is a new class allowing to set a custom bitmap for
the background of any window. The relevant code was mostly moved from wxPanel
to which it was added only recently (before 2.9.2) making it unnecessary to
preserve compatibility.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69378 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Also add wxNonOwnedWindow for wxMSW (which previously simply typedef'd it to
wxWindow) and document this class now that it provides some user-visible
functionality.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is mostly important to allow using wxImage-based wxGraphicsContext
without requiring X server connection under Unix: as wxFont can't be used
without X server, we needed another way to create wxGraphicsFont in this case.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Provide a way to use wxGraphicsContext to draw on wxImage.
This is implemented internally by drawing on wxGraphicsBitmap which can be now
also created from wxImage.
Add a test of the new functionality to the image sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69358 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Document wxGraphics{Context,Renderer}::CreateBitmap() and CreateSubBitmap()
and wxGraphicsContext::DrawBitmap() as well as the (trivial) class itself.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69351 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Implement wxTimePickerCtrl natively for MSW and add a generic implementation
(very loosely based on the original class by Paul Breen) for the other
platforms.
Also update the calendar sample to show the new control.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69224 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The documentation for this method seems to have been copy-and-pasted from
somewhere else and didn't make any sense.
Also don't say that this control doesn't have any control-specific styles when
it does.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69223 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Under GTK the columns of wxDataViewCtrl (and hence wxTreeListCtrl) are always
resized to cover the entire control width. For consistency, also do it under
the other platforms and give the remaining space to the first column and not
to the last one as GTK does by default, as the first column is more important.
Do this even if this results in reducing the size of the column: presumably,
if the entire control itself can be resized, the user wouldn't bother resizing
the columns and, on the contrary, if the user did resize the columns, the
entire control size is unlikely to change, so in practice we don't risk
overriding the user preferences and reducing as well as increasing the first
column width works much better by default as it doesn't leave the other
columns invisible after making the control wider and than reverting it back to
its initial, more narrow, state again.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69182 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This constructor previously used int and, especially annoyingly, wxByte* for
the data. Use standard void* for untyped binary data instead.
Also document this ctor as it seems to be implemented in all ports.
Closes#13451.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69178 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Always send this event, even if the user right clicked outside of the client
area. This is useful for showing item-independent commands in the context
menu.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69177 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow the user to sort the control contents by clicking on the columns with
wxCOL_SORTABLE flag and also provide SetSortColumn() method to sort the
control programmatically.
Also add wxTreeListItemComparator class and SetItemComparator() method to
allow customizing the way the items are compared.
Update the sample to show how to define a custom comparator.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69176 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The two member functions, SetAsSortKey() and SetSortOrder(), were doing almost
the same thing but differently and the former was only used in the generic
wxDataViewCtrl implementation and not implemented in the native GTK/OS X one.
Remove SetAsSortKey() entirely and only keep UnsetAsSortKey() which is still
needed by generic/MSW wxDataViewCtrl. But only SetSortOrder() should now be
called to indicate that the column is used for sorting.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69174 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It can be useful to have access to the window used to actually show the items
by wxTreeListCtrl, provide two accessors for m_view: a wxDataViewCtrl-specific
one and a generic one returning just a wxWindow that can be used to keep the
code isolated from wxDataViewCtrl.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Set the int field of wxCommandEvent generated by clicking on the menu items
correctly for not checkable items: it is supposed to be -1 and not 0 (which is
the value for checkable but currently unchecked items). This was already the
case for wxGTK and wxOSX and implied by the comments in the code.
Make wxMSW behave like this too and clearly document this behaviour.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69101 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
TGA was not mentioned in the list of formats supporting loading of alpha, but alpha loading support has been available since r42644.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These styles allow to use a smaller browse button as the standard one takes
too much space, often leaving too little of it for the more important text
control part.
Notice that both styles are, in fact, equal to wxPB_SMALL but only file and
directory pickers currently use it as it doesn't make sense for the colour and
font pickers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
As we already had MSW-specific AutoCompleteFileNames(), we can just as well
also add the also useful AutoCompleteDirectories() to be used with the text
controls used for path entry.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68918 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is a facade for wxDataViewCtrl allowing to easily work with multi-column
trees, possibly with an optional checkbox in the first column. Its API is very
similar to wxTreeListCtrl and it provides a simple migration path from the
latter.
Add the class itself, documentation for it and minimal unit tests.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68916 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Using setlocale() can thoroughly confuse wxNumValidator because it results in
a mismatch between the decimal and/or thousands separators it uses, returned
by wxLocale, and the actual separators in the strings, formatted by the CRT.
So mention in the documentation that using setlocale() is a bad idea.
Closes#12970.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68863 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Having wxBITMAP_TYPE_TIFF and wxBITMAP_TYPE_TIFF_RESOURCE is more consistent with already using the complete short name of an image format elsewhere (e.g. wxBITMAP_TYPE_JPEG, not wxBTMAP_TYPE_JPG, and wxTIFFHandler as opposed to wxTIFHandler). Renamed all existing occurrences and kept the old enum values for backwards compatibility.
Also renamed occurrences of wxBITMAP_TYPE_RESOURCE to the already existing wxBITMAP_TYPE_BMP_RESOURCE.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxDataViewCtrl::GetSelection() now always returns invalid item if more than
a single item is selected in a multi-selection control.
Also add HasSelection() and GetSelectedItemsCount() to allow checking if any
items are selected.
Updated the documentation, all ports and added a test for all these functions.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Move it from wxButtonXmlHandler into a reusable wxXmlResourceHandler::
GetDirection() that can used by the other handlers too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68839 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Existing declarations used -1 in several places to indicate the absence of the
image which wasn't especially clear and was also inconsistent with other
places that used wxNOT_FOUND which didn't make much sense in this context.
Add a new symbolic constant NO_IMAGE in wxWithImages and use it in the classes
deriving from it. This still doesn't help with wx{Tree,List}Ctrl but improves
clarity for the other classes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68810 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
IsEmpty() didn't exist in all ports (notably not wxMSW) and its meaning was
unclear anyhow, so remove it even from the ports where it did exist and add
clear Is{List,Text}Empty() replacements instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68808 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
moved description of wxIMAGE_OPTION_GIF_COMMENT from wxImage::GetOptionInt documentation to wxImage::GetOption because the value of the GIF option is a string, not int.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68779 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Not having this as an implicit one made it possible to create
wxDataViewItem from any pointer without realizing it, leading to hard to
debug crashes later.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
openFiles (available since OS X 10.3) replaces using the openFile method. It allows for more convenient handling of multiple drops and knowing in advance how much files/folders are dropped instead of openFile with which you only get to respond to a single file/folder drop at a time. By default openFiles calls the newly added MacOpenFiles which calls MacOpenFile multiple times, so ordinarily the behaviour is backwards compatible (both on wxOSX Cocoa and Carbon).
The openFile instance method has been removed because it doesn't seem to be called anymore: neither when dropping a single file on the application in the dock or Finder nor when passed as a command-line argument.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68617 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Also generate events corresponding to WM_SYSCOMMAND messages for the custom
items of the system menu.
Add a small snippet to test the new functionality to the dialogs sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68596 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Implement support for wxHELP for wxMSW, wxGTK and wxOSX/Cocoa (at least when
showing the message box from the main thread, there doesn't seem to be any way
to show more than three buttons with CFUserNotificationDisplayAlert() so
"Help" button is not supported when using it).
This is useful not only on its own, i.e. to allow the user to ask for help,
but also because it brings the total number of buttons supported by the
message dialog to 4, meaning that more choices can be offered to the user
(which is rarely, but not quite never, useful).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Using "i.e." in the brief Doxygen comment makes it end it after the second
period and results in truncated brief description and an unwanted line break
in the full description.
Just avoid using periods for now inside the brief description. Maybe a better
solution could be found in the future.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
First, enable execution of the Lines() wxTextCtrl unit test case under wxOSX
as it passes since the fix in the previous commit.
Do add a test for GetNumberOfLines() that currently doesn't work in the same
way under all platforms -- but with this test we at least can be sure how does
it work exactly where.
Also mention the current discrepancy in this function behaviour in the
documentation.
See #12366.
Fix Lines() wxTextCtrl unit test to pass under wxGTK too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Simply inherit classes which need to provide TAB navigation among their
children from wxNavigationEnabled<> and remove the now unnecessary
WX_DECLARE_CONTROL_CONTAINER() macros.
Also remove WX_INIT_CONTROL_CONTAINER(), WX_DELEGATE_TO_CONTROL_CONTAINER()
and WX_EVENT_TABLE_CONTROL_CONTAINER() which are not needed neither any more.
And remove the event tables which became empty after removing the last macro.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68366 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Provide a clean, public and documented way to implement proper TAB navigation
for subwindows of a composite control: instead of using various ugly and never
documented WX_XXX_CONTROL_CONTAINER macros it is now enough to simply inherit
from wxNavigationEnabled<BaseClass> to do it.
No real changes in the code as the new class is not used anywhere yet.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This method can be overridden to customize the previously hard-coded handling
of the case when a file selected from the MRU menu doesn't exist any more: we
used to always remove it from the file history completely. This may, however,
be inappropriate and, in fact, probably never, or very rarely, is the right
thing to do when the file that we failed to open still exists.
So never remove the file from the MRU if we failed to open an existing file
(also don't give an error about it as it should have been already given by
CreateDocument()) and, while we still do it for the non-existent files, allow
to override this behaviour by overriding the new OnMRUFileNotExist() method.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Remove non-existent wxDocManager::m_flags.
Added correct m_lastDirectory declaration to go with its documentation instead
of the duplicated m_fileHistory documentation.
Better document the default m_maxDocsOpen value.
Put all the documented fields in protected section as they're really protected
and not public.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68333 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It can be useful to induce an error on the stream explicitly, e.g. because an
incorrect value was read from it and we want to indicate it to the caller by
setting stream error to wxSTREAM_READ_ERROR.
Allow to do this by passing an optional error value to wxStreamBase::Reset().
Add an example of using the new functionality to the docview sample which
needs it to be able to signal errors while reading the files.
Also document this method that previously wasn't documented at all.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68331 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Currently this is only implemented in the generic wxDataViewCtrl, the native
GTK/OSX ports should be modified to support this later.
Closes#13323.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Currently these values can only be read from/written to wxTextCtrl but support
for other controls (e.g. wxSpinCtrlDouble for float/double) could be added in
the future.
Closes#13304.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68217 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
At least in wxGTK it is necessary to remove the page from the notebook first
as reparenting it doesn't work otherwise currently.
This should ideally be fixed but in the meanwhile at least document it.
See #13305.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There is no reason for this accessor to not be const and it prevents other
methods using it from being const too, so change this.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68179 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxCompositionMode enum had a trailing comma not allowed by C++ 98 (and which
would result in warnings or errors with g++ pedantic switch).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68128 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Having an invalid element in wxCompositionMode enum allows to directly return
it from TranslateRasterOp() function instead of needing a separate bool
parameter to indicate that a ROP couldn't be translated.
This also incidentally fixes warnings about possibly uninitialized variables
in optimized g++ builds.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68127 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
For this, it cannot derive from wxCommandEvent. Extracted the bits
from wxCommandEvent useful for passing data between threads into
wxEventBasicPayloadMixin helper class shared by both.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68076 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Child documents are virtual documents corresponding to parts of their parent
document which can't be saved nor loaded independently of their parent and are
closed when the parent is closed.
This finally makes some use of wxDocument::m_documentParent field which was
always present in the docview code but never used before.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The changes of r67619 changed the signature of the virtual Initialize() method
and in doing so broke the existing code overriding it. Avoid this problem by
restoring the old method signature and adding a function with a different name
providing the new functionality.
Also notice in the documentation that there is no real need to override
Initialize() in any case (but this doesn't change the fact that there is
existing code that does do it).
See #13108.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxMSW native control always has a built-in lower limit as MSW doesn't support
the dates before the year 1601 so wxDatePickerCtrl::GetRange() always returns
a valid range start, even if SetRange() hadn't been called to set it.
As this can be unexpected, document this behaviour clearly.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
While GTK+ doesn't support imposing ranges for dates selection natively, we
can do it ourselves by preventing the user from selecting any date outside of
the currently valid range.
This allows to use ranges under all platforms and not only in wxCalendarCtrl
itself but in wxDatePickerCtrl as well.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow changing the (fixed) row height without using wxDV_VARIABLE_LINE_HEIGHT
which may slow down the control display too much.
The new method is not implemented for the native GTK and OS X implementations
yet but should be simple to implement there.
See #12749.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Previously wxDECLARE_CLASS was a synonym for wxDECLARE_DYNAMIC_CLASS which was
inconsistent with its documentation and wxIMPLEMENT_CLASS that was the same as
wxIMPLEMENT_ABSTRACT_CLASS.
Resolve this in the most backwards compatible and also arguably logical way.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67879 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
As the arguments to the sort function contain the client data associated with
the items, they may be pointers and hence of greater size than long in Win64
builds. Use wxIntPtr instead of long everywhere to fix this.
Notice that this doesn't break compatibility for 32 bit code where long can
still be used as it is the same as wxIntPtr there after the previous commit.
Closes#4309.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't mention the virtual OnXXX() functions which were removed from the final
API.
Also mention AddTree() limitations on non-MSW platforms.
See #12847.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67694 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Still show the print preview app modally by default, i.e. disabling all the
other windows, but also allow disabling only the preview parent or nothing at
all.
Closes#13108.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67619 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add support for world transformations to wxDC too. Currently this is
implemented in wxMSW only but could be easily provided in the ports that use
wxGraphicsContext for wxDC implementation later.
Closes#13092.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There's no reason to limit custom editor controls to wxControl, which
would rule out e.g. composite controls or any custom widgets.
Make appropriate changes to related functions and code too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Both completing a set of fixed strings and dynamic completion using a custom
completer are supported, although completing the file names remains MSW-only
for now.
Note that, unlike under MSW, auto-completion under Mac is not automatic and
has to be triggered manually by calling complete: method. This is done by
pressing F5 key by default. In the future we should call it automatically on a
timer event to make it more obviously discoverable.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow overriding either the iterator-like methods of the base class or the
single and possibly more convenient, albeit slightly less efficient, method of
the derived wxTextCompleterSimple class.
This makes it possible to completely delegate to wxTextCompleter from wxMSW
IEnumString implementation and actually makes the code there easier, even if
it it still not quite trivial because of multi-threading concerns.
It also would make it possible to show the completions progressively, as they
are retrieved, in a future generic implementation of auto-completion (MSW
native implementation doesn't do this unfortunately and waits until all of the
completions become available before showing them).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67515 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The native IAutoComplete implementation takes care to retrieve the completions
from a background thread to prevent the UI from freezing while they're being
generated, but we worked against it by always generating all the completions
from the main thread and just enumerating them from the background one.
Change this now and call wxTextCompleter::GetCompletions() method from the
background thread itself to never block the main one.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add wxTextCompleter class which allows to return the possible completions
dynamically and wxTextCompleter::AutoComplete() overload using it. So far this
is only implemented for wxMSW.
Also fix calling wxTextEntry::AutoComplete(wxArrayString) multiple times under
MSW, this didn't correctly update the list of shown completions before.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes, just make the public AutoComplete() non-virtual and add
virtual DoAutoCompleteXXX() methods to make it easier to add new public
AutoComplete() overloads in the upcoming commits.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67509 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add wxAuiTabArt::SetColour() and SetActiveColour() methods and provide trivial
default implementation of them in wxAuiDefaultTabArt to allow customizing the
tab colours.
Closes#11411.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use "wxWindows licence" and not "wxWidgets licence" and also use British spelling for licence. Updated new occurrences in recently added files and a couple of previously (r64940) missed ones.
See #12165.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775