Spacebar is used to activate columns (e.g. toggle a checkbox). Enter
activates the item, i.e. sends wxEVT_COMMAND_ITEM_ACTIVATED. If that
event isn't handled, Enter acts the same as Space.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Only warn if an explicit --enable-metafile was given, otherwise just turn it
on only for the platforms that do support it, similarly to what was done for
--enable-hotkey in the previous commit.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68969 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add --enable-hotkey switch to allow enabling hot keys support and enable it by
default under MSW and OS X that do support them but disable it elsewhere to
avoid unnecessary warnings about them being unsupported.
See #12354.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68968 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The model columns were not updated before, resulting in a mismatch between
view and model columns if ClearColumns() followed by AppendColumn() was
called.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68966 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
In both the generic and GTK+ versions, ItemAdded() always appended the
new item, regardless of its position among its siblings in the model.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68965 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is much more efficient than doing it immediately when adding large
number of items into a control with lots of them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Kernel32's SetDllDirectory is only available since XP SP1 and as such also not available in the SDK that comes by default with for example VS6. Attempt to retrieve the function from the DLL at run-time instead. Regression since r68935.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68962 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Override wxDataViewModel::IsListModel() to return true if wxTreeListCtrl
doesn't have any depth. This results in better display when using the generic
implementation of wxDataViewCtrl as no space is reserved for the (unnecessary)
expanders in this case.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We need to account for the expander even for the items that don't have
children when computing their offset as their parent still does have it,
contributing to the total offset.
This corrects the fixes of r68836 to also work for the leaf items.
Also rename expanderOffset variable to more clear itemOffset.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Updated the Xcode projects to include latest source additions and newer settings from template *_in.xcodeproj project files.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is consistent with wxGTK implementation and generally makes sense:
when the renderer cannot handle activation, whole-item activation should
be tried next.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Previously it only responded to single-clicks, which was to avoid the
need to double-click checkboxes. Fixed to react to activation via
double-click or keyboard too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxDataViewCtrl only called WXOnActivate() in reaction to double-click.
When Enter/Spacebar was pressed, only
wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED was sent, without calling
OnActivate() even if it was possible.
Fixed to handle both kinds of input identically.
Because there's currently no way to change current focus to a particular
column (as GtkTreeView can do), call WXOnActivate() on the first
activatable column.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxRendererMSW::DoDrawFrameControl (used for systems prior to XP or when theming is disabled) didn't check for the wxCONTROL_UNDETERMINED flag yet. Set the appropriate styles when the flag is used to fix drawing check boxes in their third state (as used in for example the treelist sample).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Even though wxTreeListCtrl contains just one child window it still needs to
derive from wxNavigationEnabled<> to allow focus getting to its sole child.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The alpha channel was not detected because of wrong hasAlpha determination. Also TIFFReadRGBAImage[Oriented] doesn't appear to decode an alpha channel for images that are greyscale so decode greyscale with alpha images using TIFFReadScanline.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
If our calculated image pitch is not equal to what TIFFScanlineSize returns a scanline buffer would be used. In that case the number of bytes being copied was equal to the image's width instead of pitch (width times 3).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68946 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
As TIFFReadRGBAImage[Oriented] can't deal with all images make use of TIFFReadScanline to decode per scanline. Currently only the case of a black and white image with alpha (for a total of 2 bits per pixel) is handled.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68945 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
Use TIFFReadRGBAImageOriented with a parameter of ORIENTATION_TOPLEFT instead of using TIFFReadRGBAImage (which uses ORIENTATION_BOTTOMLEFT) to read images in a more logical order and simplify code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The code assumed that the image's width is a multiple of 8, and attempted to always write per 8 pixels instead of sometimes having to write fewer pixels for the last column.
Also fixed compilo from previous commit due to not removing old code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The variable linebytes sometimes counted one extra byte, which is OK for allocating but not when accessing the image later on. Calculate the value in a slightly different way and made the variable const.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
done for GDI+.
* Enable the use of the wxCairoContext on MSW.
* Enable creating a wxGCDC from an exisiting wxGraphicsContext.
* Since it's possible for a DLL that is using wx to not be on the PATH nor in
the same location as the .exe, change the wxDynamicLibrary::RawLoad method to
explicitly look first in the same place as the main wx-using binary. This way
it will find DLLs that are in the same folder as the wx-using binary even if
that would not be in the normal DLL search path.
* Change wxDCImpl and wxDC::GetLogicalScale to be const methods.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Pressing Spacebar now behaves the same as Enter in the generic control,
for consistency with the GTK+ control and native Windows list controls.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68931 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There's no reason for DestroyTreeHelper() code, that's what destructors
are for. On a related note, make removal of children from a node more
explicit too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Too big margins were added for the buttons with wxBU_EXACTFIT style making
them larger than strictly necessary. Reduce the margins to make them really
as small as possible.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68922 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
There doesn't seem to be any reason not to do this in the controls which we
know are meant for entering file or directory names into them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The controls were too small to see long paths in them comfortably while there
was plenty of space in the page, use wxEXPAND flag for them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68919 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