The workarounds for the button focus issues should become unnecessary if we
switch to setting the focus correctly as explained in the linked post.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is an incompatible change but having to use a non-const model pointer to
call a clearly logically const version was simply too ugly so change it while
we still can.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Introduce a base class for wxDataViewIndexListModel and
wxDataViewVirtualListModel instead of duplicating the same code in both of
them making the code difficult to maintain and change.
For now this class is not documented as it is used just to avoid duplication
in the implementation but maybe we should make it public to allow defining
other flat list data models (if this can be made to work in Carbon version).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62499 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Old code created the tree model and its unique built-in column only in
wxDataViewTreeCtrl ctor but not in Create(), meaning that the behaviour was
very different depending on whether you used base class ctor call or Create()
in a derived class. This was confusing and completely inconsistent with wx API
in which using the default ctor and Create() is supposed to always have
exactly the same effect as using non-default ctor so change this to create the
model in Create() so that it's always done.
Slightly update the documentation and also add wxDataViewTreeCtrl::Init() for
consistency.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The usual convention is for Init() method to be private and to call it from
constructor, follow it in GTK implementation of wxDataViewCtrl too instead of
making it public and calling it from Create().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Implement a custom NSTableColumn-derived class to return nil for the cells
which shouldn't show anything at all because they are part of a container row.
This finally fixes the totally wrong display of the first page of the dataview
sample under OS X.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This method allows to simply test whether we have a value at the given row and
column or not (as it happens for container items unless they too have columns).
Currently this method is not virtual and is not used by the implementations
yet but it might make sense to make it virtual and allow overriding it in the
future.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62492 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There doesn't seem to be any reason to not use them and having different
appearance under OS X and elsewhere is just confusing and looks like a bug.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62491 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Instead of trying to determine the type of the value which should be extracted
from the NSObject we receive from NSOutlineView, just pass it to a virtual
method in the renderer which knows which type does it need.
This fixes the problem with editing boolean/checkbox columns and makes the
code more elegant.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62490 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
ChangeValue() is a trivial wrapper calling both SetValue() and ValueChanged().
It allows to replace many calls to SetValue() immediately followed by
ValueChanged() with a single function call which is significantly shorter and
less error-prone (e.g. most of the existing code didn't test SetValue() return
code at all).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Unfortunately 0.2.7 release contained a bug in msvc backend which resulted in
warnings generated for each file compiled. Apply the fix from bakefile svn to
fix this (and test if no other problems are found).
Also update all makefile.unx after changes of r62477.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Output more details when more than one event is unexpectedly received.
Hopefully this will allow to debug the test failure at build bot slaves which
doesn't seem to be happening locally.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62482 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Enums can't be used to deduce template parameters so cast WAIT_DURATION to int
explicitly before passing it to wxString::Format().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62481 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Work around an internal compiler error and don't initialize static variable
when declaring it as VC6 doesn't support this.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62480 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Currently wxEventLoopSource can't be created directly and can only be used to
monitor file descriptors so reduce the API to just wxEventLoop::AddSourceForFD()
and remove AddSource(), RemoveSource() and RemoveAllSources() which couldn't
be implemented for all ports. This makes the code much simpler without any
loss of functionality.
Make wxEventLoopSource responsible for removing itself from the event loop
when it is deleted. This allows to remove IsOk() and Invalidate() methods
making the code simpler and gets rid of various sets/maps which were used
before.
This also allows to support event loop sources in Carbon as well: wxOSX/Carbon
now compiles and works with wxUSE_FSWATCHER==1.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62475 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Merges everything from the branch with only some minor changes, mostly renamed
wxUSE_FSWATCHER_{INOTIFY,KQUEUE} to wxHAS_{INOTIFY,KQUEUE}.
Add wxFileSystemWatcher and related classes.
Also introduces wxEventLoopSource.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The old code tried to work around the lack of unsigned __int64 to double
conversion in VC6 by casting from UseUintMax to wxAnyBaseIntType but this was
wrong as this value was -1 when cast to wxAnyBaseIntType (__int64) and so
UseUintMaxF was defined as -1.0.
Use a slightly uglier but simpler work around now: just define the constants
as macros instead of (typed) variables and let the compiler deal with literal
values on its own (which it does correctly).
This fixes the unit test failure: conversion from double to unsigned always
failed when using VC6.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62471 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This was the last warning given during the tests phase in build bot builds.
Also use #pragma warning(pop) for MSVC instead of incorrect warning(default).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Remove VC9-only solution files from a couple of tests/utils/demos (there is
no reason at all to have only VC9 solutions: either we have all of [789] or
none of them) and also remove all solutions files for the ribbon sample which
were probably added mistakenly in the first place (as no other sample has
them).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62469 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is because of two recent changes: addition of the 'ribbon'
library (with filenames shared with other libs) and unconditional
enabling of debug info with VC++. Both of these uncovered bugs
in Bakefile's VC++ support that weren't fixed until after 0.2.6.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use a separate WXCONFIG_LDFLAGS variable for the flags which should be used
when linking applications using wxWidgets and not wxWidgets itself.
The only intentional effect this change is supposed to have right now is that
-arch options added to LDFLAGS when building wx for multiple architectures
under OS X are not used for building the applications any more.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Temporary fix after the changes of r62323 which broke generation of makefiles
using wx presets unless they explicitly defined COMPILER_PREFIX: define
COMPILER_PREFIX as COMPILER by default.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Comment and document the (non obvious) requirement for the PNG image handler
to be enabled when using this function under OS X. In fact, document the
entire function itself which was forgotten previously.
Do enable PNG image handler when using DrawTitleBarBitmap() in the sample.
Closes#11345.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Although 2.9 and later doesn't have debug/release distinction, previous
version of wx may be installed on the system and should be usable via 2.9
wx-config so honour this option for them.
Closes#11316.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We must update the internally stored columns order even if the end reorder
event was processed (but not vetoed), otherwise we don't reflect the new order
in the our public functions such as GetColumnsOrder() which broke wxDVC
display under MSW.
Closes#11300.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62442 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We must explicitly define WX_CPU_AMD64 when compiling using mingw64 and
configure as wx/msw/genrcdefs.h is not used in this case and even if it were,
it wouldn't work because g++ doesn't define _M_AMD64 (unlike MSVC).
So just add the flag directly to windres command line in configure.
Closes#11336.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62441 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Instead of using a chain of dynamic_cast<>s to find the right type of the
value, construct a wxVariant corresponding to the type of the object we
receive in NSOutlineView:setObjectValue:forTableColumn:byItem and pass it to a
wxDataViewRenderer virtual function.
This fixes assert and allows to edit icon text items under OS X.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Reformat/reindent, use more wx coding style, wrap some extremely long lines.
Use shorter and less Carbon-ish variable names. Clarify some comments.
Also use static_cast<> because there is no need to use reinterpret_cast<> when
a static_cast<> will do.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
NSOutlineView::editedColumn: and editedRow: return -1 when they are called
from textDidEndEditing so we need to store their values in textDidBeginEditing
and reuse them later.
This fixes the crash in the sample with out-of-range array index exception
which happened whenever a cell was edited.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775