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
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
The naming of this macro was inconsistent with other similar macros in
wxListCtrl and wxTreeCtrl and even EVT_DATAVIEW_COLUMN_HEADER_CLICK in
wxDataViewCtrl itself. Moreover, it was even documented under the wrong name
without "ED".
Clear this mess by removing the "ED" suffix while still keeping the old macro
name for compatibility.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Do not delete the client data in wxDataViewListCtrl, this class mainly exists
for compatibility with wxListCtrl and as the latter doesn't delete its client
data, neither should the former.
See #11088.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow specifying the drag operation flags and retrieving the drop effect when
it's over for wxDataViewCtrl drag-and-drop.
Currently this is only implemented in the generic version.
Closes#12583.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This model was comparing its items by their positions in the list instead of
their values for some reason. This broke sorting in wxDataViewListCtrl using
this model and simply didn't make any sense.
Just remove the comparison code from wxDataViewIndexListModel entirely, the
base class version works just fine for it.
Closes#14116.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is more consistent with other wxDVC methods (taking column pointer
as its argument) and other DVC-like classes where the name EditLabel()
is used for similar purposes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70377 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Even though most compilers just ignore this, it's just wrong and if you
do get warnings about header files, they can become quite overwhelming.
Forward port of r70163.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70165 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
Add wxItemId<> template which can be used to identify items in different
{tree,list}-like controls, including wxDataViewCtrl (where it replaces, in
backwards compatible way, wxDataViewItem), wxTreeCtrl (where it replaces
wxTreeItemId) and the upcoming wxTreeListCtrl.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68812 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
Avoid defining SetImageList() in several different places in wx API as not
only this resulted in (trivial) code duplication but this method also had
different semantics before: it didn't take ownership of the pointer passed to
it in wxTreeCtrl, wxListCtrl and wxBookCtrl and derived classes but did take
its ownership in wxDataViewTreeCtrl and wxRichTextFormattingDialog.
Harmonize this for all the classes now: SetImageList() never takes ownership
while AssignImageList() (which is now available in all classes having
SetImageList()) always does.
Also add convenience wxWithImages::GetImage() helper to avoid (more) code
duplication in wxDataViewTreeCtrl code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68809 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
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
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
Additionally renamed wxOSX' private wxNativePrinterDC::Ok() function to IsOk().
Didn't deprecate the various Ok() functions: given the amount of changes already introduced in 3.0 a trivial one like this seems more suitable for after 3.0.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add new wxDataViewModel::IsEnabled() and wxDataViewListStore::IsEnabledByRow()
methods and implement support for actually disabling the items in wxOSX/Cocoa
native implementation of wxDataViewCtrl and limited support for it in the
generic version.
We need to implement this in wxGTK using GtkCellRenderer "sensitive" propriety
later.
Closes#12686.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66403 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
When determining cell content's size, GetSize() measured the text using
wxDataViewCtrl's font, even though it could be renderer in bold or
italics.
Corrected by setting the attributes - and not only the value - prior to
GetSize() calls, and by using the right font in GetTextExtent() calls.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There are no real changes in this commit but it removes all trailing white
space from our source files. This avoids problems when applying patches and
making diffs and it would be nice to prevent it from reappearing.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add new special API for wxDataViewVirtualIndexModel::Reset() as
wxDataViewModel::Clear is something different and needs a different, two
step API under GTK+, one for destroying the current view and one for
rereading the new contents.
Added ::BeforeReset() and ::AfterReset() notifications for that purpose.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65533 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Current item is the same as the selected item in single selection mode but in
multiple selection mode there was no way to neither get this item nor change
it before so add the new functions to allow doing this now.
The new methods are implemented for the generic, GTK and OS X/Cocoa versions
but only stubs are provided for OS X/Carbon.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65228 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
List-only models don't have expanders and so the control shouldn't
reserve any space for them; the notion of expander column doesn't make
sense here.
Previously, this was done correctly only for wxDataViewVirtualListModel;
"ordinary" list models, such as the one used by wxDataViewListCtrl, were
treated as generic tree models and 0th column had ugly empty space
reserved for (never used) expander.
This patch fixes it by adding IsListModel() helper function in
addition to existing IsVirtualListModel(). Some of the
IsVirtualListModel() tests were changed into IsListModel() checks as
appropriate.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These are convenience functions for work working with indexes, for
consistency with other wxDataViewListCtrl methods.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65122 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These are commonly needed when using wxDataViewListCtrl, yet they were
only available in wxDataViewIndexListModel.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65121 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This class is used by wxDataViewCtrl implementation only, there is no need for
it to be in a public header.
Move the class declaration from wx/dataview.h to datavcmn.cpp.
See #11732.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64217 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Call SetAttr() to store them in wxDataViewCustomRenderer before rendering it
and also honour the attributes in RenderText() (by reusing the same code we
already use for wxDataViewTextRenderer).
The attributes now work correctly in dataview sample under wxGTK as well.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62596 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit adds no changes in functionality but paves way for the upcoming
improvements of wxDataViewCustomRenderer.
First, introduce wxDataViewCustomRendererBase class in order to allow
implementing behaviour common to custom renderers in all ports in this class
instead of triplicating it.
This required splitting monolithic dataview.h in more parts, now we have
wx/dvrenderer.h which defines wxDataViewRendererBase and the new
wxDataViewCustomRendererBase and includes wx/port/dvrenderer.h which define
wxDataViewRenderer and wx/port/dvrenderers.h which defines all the other
renderer classes.
Also bring renderers hierarchy in the generic version closer to other ports:
all standard renderer classes now inherit from wxDataViewRenderer and not
wxDataViewCustomRenderer in for consistency with the other ports.
wxDataViewRenderer itself still does derive from wxDataViewCustomRendererBase,
unlike elsewhere, but this is unavoidable considering that all generic
renderers are custom ones.
Finally do some cleanup in OS X part of the code: correct indentation,
spacing, comment style.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This method is useful for getting the number of items in the control and
should be part of the public API instead of being marked as internal.
Closes#11380.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62519 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