Commit Graph

28 Commits

Author SHA1 Message Date
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
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
2013-07-26 16:02:46 +00:00
Vadim Zeitlin
a2c3fc7c75 Fix crash on destruction of wxDataViewCtrl in wxOSX.
The control remained associated to the model so a dangling pointer could be
used if the model was destroyed after the control.

Fix this by removing the control from the model list of notifiers when it is
destroyed.

Closes #14124.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-20 20:29:09 +00:00
Vadim Zeitlin
7f15deea6d Fix wxDataViewCtrl::GetItemRect() signature in wxOSX and document it better.
The second parameter of this method should be optional, so make it so in wxOSX.

Also document what this method does exactly and the platforms under which it's
implemented.

Closes #13914.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-02 14:19:30 +00:00
Václav Slavík
907f09f44b Replace wxDataViewCtrl::StartEditor() with EditItem().
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
2012-01-17 14:05:17 +00:00
Václav Slavík
ee1377e1fa Add wxDataViewCtrl::GetCurrentColumn().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70375 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-17 14:05:07 +00:00
Václav Slavík
50703c1a72 Fix wxDataViewCtrl::GetMainWindow() signature on OS X.
Return wxWindow* as other ports do, not wxControl*.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70339 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-14 16:52:01 +00:00
Vadim Zeitlin
aadbdd1699 Remove wxHeaderColumn::SetAsSortKey() and only use SetSortOrder().
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
2011-09-21 15:07:46 +00:00
Vadim Zeitlin
fa93d732e2 Harmonize wxDataViewCtrl::GetSelection() behaviour in all ports.
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
2011-08-22 12:41:19 +00:00
Robin Dunn
eeea3b039e Virtualize StartEditor and add implementations for the ports that can do it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67817 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-31 19:36:47 +00:00
Dimitri Schoolwerth
d13b34d3f2 No code changes, fixed various typos.
Applied patch by snowleopard2 fixing typos in interface/. Extended the fixes throughout trunk.

Closes #13076.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67384 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-03 20:31:32 +00:00
Václav Slavík
b06ed2f866 Implement wxCOL_WIDTH_AUTOSIZE on OS X.
Only Cocoa build on 10.5+ is supported. Before that, NSOutlineView
didn't have reasonable support for determining cell sizes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-07 18:26:58 +00:00
Vadim Zeitlin
80ce465c64 Add wxDataViewCtrl::{Set,Get}CurrentItem().
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
2010-08-10 12:53:03 +00:00
Vadim Zeitlin
62e9285aba Add name argument to wxDataViewCtrl ctor for consistency.
As all the other wxWidgets controls take the parameter in their ctor/Create()
it's unexpected that wxDataViewCtrl does not. Add the name parameter and pass
it to wxWindowBase::CreateBase() as usual.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65215 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-08 11:37:57 +00:00
Robert Roebling
f6cb92b81f Implemented wxDataViewColumn for wxOSX/Cocoa
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64552 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-10 12:43:09 +00:00
Vadim Zeitlin
6eec70b984 Big wxDataViewCtrl renderer classes refactoring.
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
2009-11-10 17:40:58 +00:00
Vadim Zeitlin
d831e2db16 Return the real column width from wxOSX wxDataViewColumn::GetWidth().
Code used to return the last programmatically set width value instead of the
real column width which could have been changed by user if the column was
resizeable, fix this by returning the current NSTableColumn:width value.

Closes #11397.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62516 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-31 15:57:51 +00:00
Vadim Zeitlin
9461dd8c71 Use virtual functions to convert NSObject to the correct type in wxDVC.
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
2009-10-23 23:49:26 +00:00
Vadim Zeitlin
0599fe19d9 Rewrite handling cell value changes in wxOSX/Cocoa wxDVC.
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
2009-10-17 01:04:26 +00:00
Vadim Zeitlin
c937bcac0f Add ellipsization support to wxDataViewCtrl.
Implemented ellipsization in the generic, GTK and both OS X Carbon and Cocoa
versions but it currently doesn't work well in GTK as it changes the item
alignment unconditionally, this will need to be fixed later.

The behaviour for the columns is currently inconsistent between ports too:
under MSW they (natively) use wxELLIPSIZE_END, under GTK -- wxELLIPSIZE_NONE
and under OS X the same ellipsization mode as the column contents, i.e.
wxELLIPSIZE_MIDDLE by default.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-16 21:35:26 +00:00
Vadim Zeitlin
de40d73647 No real changes, just minor cleanup in Cocoa wxDataViewCtrl.
Start cleaning up Cocoa wxDataViewCtrl implementation:
 - Don't use "this->" which is not used anywhere else in wx code.
 - Use "()" instead of "(void)" as per wx coding standards.
 - Don't use end of function comments, this is inconsistent and
   unmaintainable.

No real changes otherwise.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62384 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-12 13:59:32 +00:00
Vadim Zeitlin
2d0d781336 Remove wxDataViewTextRendererAttr by merging it with wxDataViewTextRenderer.
There is no reason to have a separate class for rendering the text honouring
the attributes defined for it, wxDataViewTextRenderer itself already does this
perfectly well.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-12 13:59:25 +00:00
Vadim Zeitlin
03647350fc No changes, just removed hard tabs and trailing white space.
This commit is huge but there are no non-white-space changes in it.

Some files containing third-party sources (src/msw/wince/time.cpp,
src/x11/pango*.cpp) were left unchanged.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-21 10:41:26 +00:00
Vadim Zeitlin
8f2a8de6e7 fix many mostly harmless warnings in wxOSX/Carbon build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-20 00:21:53 +00:00
Robert Roebling
8ba01d3546 Fix sending wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK, fixes #10894: Missing OSX-Carbon DataView control header click events
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61062 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-15 18:35:24 +00:00
Robert Roebling
ca6de8c056 Forgot to commit header as part of r60586, Reapplied some previous patches
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60587 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-11 12:53:19 +00:00
Robert Roebling
e86edab05b Add wxDataViewCtrl implementation for OSX/Cocoa (closes #10617: wxDataView for wxOSX-Cocoa)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60552 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-08 17:07:50 +00:00
Stefan Csomor
ef0e92205a fixing file paths after renaming
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-11 19:17:41 +00:00
Stefan Csomor
5c6eb3a84b renaming
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-11 16:30:48 +00:00