]> git.saurik.com Git - wxWidgets.git/log
wxWidgets.git
15 years agoadding toolbar implementation for iphone
Stefan Csomor [Fri, 13 Nov 2009 18:39:38 +0000 (18:39 +0000)] 
adding toolbar implementation for iphone

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoAdd constants wxSL_LABELS_MIN_MAX and wxSL_VALUE_LABEL
Robert Roebling [Fri, 13 Nov 2009 18:36:14 +0000 (18:36 +0000)] 
Add constants wxSL_LABELS_MIN_MAX and wxSL_VALUE_LABEL

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoupdating implementations of wxGetMouseState for osx_cocoa and dummy impls for iphone
Stefan Csomor [Fri, 13 Nov 2009 18:30:00 +0000 (18:30 +0000)] 
updating implementations of wxGetMouseState for osx_cocoa and dummy impls for iphone

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62631 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoImplement and document wxDataViewTreeCtrl::IsContainer(), use it in the sample to...
Robert Roebling [Fri, 13 Nov 2009 14:14:44 +0000 (14:14 +0000)] 
Implement and document wxDataViewTreeCtrl::IsContainer(), use it in the sample to not add items to non-containers

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoMinor formating
Robert Roebling [Fri, 13 Nov 2009 13:56:55 +0000 (13:56 +0000)] 
Minor formating

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62629 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoCorrect sorting in wxDataViewTreeStore, fixes #11436, part II
Robert Roebling [Fri, 13 Nov 2009 13:56:32 +0000 (13:56 +0000)] 
Correct sorting in wxDataViewTreeStore, fixes #11436, part II

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoDon't use gtk_tree_model_get_path of the item is already the delete in the model...
Robert Roebling [Fri, 13 Nov 2009 10:30:07 +0000 (10:30 +0000)] 
Don't use gtk_tree_model_get_path of the item is already the delete in the model, fixes #11436

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62627 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoAdd tests to wxDataViewTreeCtrl
Robert Roebling [Fri, 13 Nov 2009 08:32:35 +0000 (08:32 +0000)] 
Add tests to wxDataViewTreeCtrl

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62626 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoAlso update focus rect when changing selection in single selection mode, fixes #11332
Robert Roebling [Fri, 13 Nov 2009 08:24:00 +0000 (08:24 +0000)] 
Also update focus rect when changing selection in single selection mode, fixes #11332

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoReset m_underMouse anytime the display is changed programmatically, fixes #11322
Robert Roebling [Fri, 13 Nov 2009 08:05:00 +0000 (08:05 +0000)] 
Reset m_underMouse anytime the display is changed programmatically, fixes #11322

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62624 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoOverride default handling so that we can position windows off-screen like on other...
Kevin Ollivier [Fri, 13 Nov 2009 02:28:16 +0000 (02:28 +0000)] 
Override default handling so that we can position windows off-screen like on other ports.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoMake wxSizeEvent::GetSize() description more precise.
Vadim Zeitlin [Thu, 12 Nov 2009 13:13:09 +0000 (13:13 +0000)] 
Make wxSizeEvent::GetSize() description more precise.

Mention that it returns the new total (and not client) size of the window.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoUpdate gdb pretty printing support for latest gdb version.
Vadim Zeitlin [Wed, 11 Nov 2009 23:08:41 +0000 (23:08 +0000)] 
Update gdb pretty printing support for latest gdb version.

gdb.pretty_printers is not a map any more but a list containing lookup
functions for pretty printers.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62619 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoSet wxSL_VERTICAL style in wxSlider demo page.
Vadim Zeitlin [Wed, 11 Nov 2009 22:30:07 +0000 (22:30 +0000)] 
Set wxSL_VERTICAL style in wxSlider demo page.

wxGTK doesn't currently take wxSL_{LEFT,RIGHT,TOP,BOTTOM} styles into account
but at least make it change the slider orientation correctly depending on them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62618 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoFix wxPropertyGrid rendering problems when used with wxAUI. It seems we cannot rely...
Jaakko Salli [Wed, 11 Nov 2009 19:49:58 +0000 (19:49 +0000)] 
Fix wxPropertyGrid rendering problems when used with wxAUI. It seems we cannot rely on wxWindow::GetRect() to return wxRect with x=0 here. (fixes #11433)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62617 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoCheck that event's IDs range is valid, i.e. that lower bound
Václav Slavík [Wed, 11 Nov 2009 17:18:49 +0000 (17:18 +0000)] 
Check that event's IDs range is valid, i.e. that lower bound
is not higher than upper bound.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62615 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoAdd wxBase64Decode(void*,size_t,wxString) overload.
Vadim Zeitlin [Wed, 11 Nov 2009 14:38:40 +0000 (14:38 +0000)] 
Add wxBase64Decode(void*,size_t,wxString) overload.

We had wxBase64Decode(void*,size_t,const char*,size_t) as well as
wxBase64Decode(const char*,size_t) and wxBase64Decode(wxString) already but
not a version taking the buffer and wxString, complete the set of overloads
now.

This allows the unit test to compile in STL build (where there is no implicit
conversion from wxString to const char *).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62614 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoFixed tab removal bug, and empty text element
Julian Smart [Wed, 11 Nov 2009 10:59:14 +0000 (10:59 +0000)] 
Fixed tab removal bug, and empty text element

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62613 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoadded a note about XRCID() and EVT_*_RANGE macros (see bug #11431)
Václav Slavík [Wed, 11 Nov 2009 10:22:57 +0000 (10:22 +0000)] 
added a note about XRCID() and EVT_*_RANGE macros (see bug #11431)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62611 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoUse wxWebKitCtrlNameStr to adhere to the convention used by other wx classes.
Kevin Ollivier [Wed, 11 Nov 2009 02:12:56 +0000 (02:12 +0000)] 
Use wxWebKitCtrlNameStr to adhere to the convention used by other wx classes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62610 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoRun sanity checks on the position values.
Kevin Ollivier [Wed, 11 Nov 2009 02:11:13 +0000 (02:11 +0000)] 
Run sanity checks on the position values.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62609 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoImplement text ellipsizing for wxDataViewCustomRenderer in wxGTK.
Vadim Zeitlin [Wed, 11 Nov 2009 01:50:06 +0000 (01:50 +0000)] 
Implement text ellipsizing for wxDataViewCustomRenderer in wxGTK.

Add another virtual function (GtkGetTextRenderer()) to the base class which
allows us to reuse the same code setting the "ellipsize" property that we
already used for wxDataViewTextRenderer for wxDataViewCustomRenderer as well.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62608 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoAdd wxOSX_USE_COCOA around Cocoa-only OSXApplyAttr() method.
Vadim Zeitlin [Wed, 11 Nov 2009 01:36:36 +0000 (01:36 +0000)] 
Add wxOSX_USE_COCOA around Cocoa-only OSXApplyAttr() method.

This method is used in wxOSX/Cocoa only.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62607 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoRevert r62598 which removed "unnecessary wxOSX_USE_COCOA checks."
Vadim Zeitlin [Wed, 11 Nov 2009 01:32:58 +0000 (01:32 +0000)] 
Revert r62598 which removed "unnecessary wxOSX_USE_COCOA checks."

These checks were not unnecessary at all, this file is used for both Cocoa and
Carbon, fix this momentary lapse of reason.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62606 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoSend the selected item in wxDVC SELECTION_CHANGED event in OSX/Cocoa.
Vadim Zeitlin [Tue, 10 Nov 2009 18:17:38 +0000 (18:17 +0000)] 
Send the selected item in wxDVC SELECTION_CHANGED event in OSX/Cocoa.

This event was perfectly useless as it didn't indicate which item was
selected. Do set the selected item now, just as the generic and GTK versions
do.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62604 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoNo changes, just reformat comments in osx/dataview.mm.
Vadim Zeitlin [Tue, 10 Nov 2009 18:17:31 +0000 (18:17 +0000)] 
No changes, just reformat comments in osx/dataview.mm.

Wrap long lines to be able to read the comments and remove the perfectly
useless "// variable definition" and "// constant definition for
abbreviational purposes" noise.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62603 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoFix width of the wxDataViewTreeCtrl column under OSX/Cocoa.
Vadim Zeitlin [Tue, 10 Nov 2009 17:42:58 +0000 (17:42 +0000)] 
Fix width of the wxDataViewTreeCtrl column under OSX/Cocoa.

Set the column resizing mode to "automatic" instead of "none" if the control
doesn't show the header. This allows the native control to properly resize the
only tree control column to always take up the entire window size (provided we
don't explicitly create it resizeable, so don't do this).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoAdd support for wxDV_NO_HEADER to OS X/Cocoa wxDataViewCtrl.
Vadim Zeitlin [Tue, 10 Nov 2009 17:42:46 +0000 (17:42 +0000)] 
Add support for wxDV_NO_HEADER to OS X/Cocoa wxDataViewCtrl.

Also use this flag with the tree control in the sample to test it and also
because it doesn't make much sense to have a single column without title
anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62601 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoMore cleanup of OS X Cocoa wxDataViewCtrl code.
Vadim Zeitlin [Tue, 10 Nov 2009 17:42:38 +0000 (17:42 +0000)] 
More cleanup of OS X Cocoa wxDataViewCtrl code.

Add wxDataViewItemFromItem() and wxDataViewItemFromMaybeNilItem() functions
instead of repeating the same ugly casts several dozens of times.

Also wrap some more long lines.

No real changes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62600 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoAdd support for custom attributes to wxOSX/Cocoa wxDataViewCustomRenderer.
Vadim Zeitlin [Tue, 10 Nov 2009 17:42:24 +0000 (17:42 +0000)] 
Add support for custom attributes to wxOSX/Cocoa wxDataViewCustomRenderer.

Virtualize applying the attributes in a new OSXApplyAttr() function and simply
store the attribute in its wxDataViewCustomRenderer version so that it could
be reused later in Render().

The attributes now work correctly in wxOSX/Cocoa dataview sample too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62599 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoNo changes, just remove unnecessary wxOSX_USE_COCOA checks.
Vadim Zeitlin [Tue, 10 Nov 2009 17:42:13 +0000 (17:42 +0000)] 
No changes, just remove unnecessary wxOSX_USE_COCOA checks.

This file is only compiled in wxOSX/Cocoa build so there is no need to check
that we're using Cocoa here.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62598 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoDon't overwrite background in custom renderer in OSX/Cocoa.
Vadim Zeitlin [Tue, 10 Nov 2009 17:42:04 +0000 (17:42 +0000)] 
Don't overwrite background in custom renderer in OSX/Cocoa.

Erasing background seems to be unnecessary and was actively harmful for the
selected items which didn't appear with the correct background colour. Just
don't do it at all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62597 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoAdd support for custom attributes to wxGTK wxDataViewCustomRenderer.
Vadim Zeitlin [Tue, 10 Nov 2009 17:41:58 +0000 (17:41 +0000)] 
Add support for custom attributes to wxGTK wxDataViewCustomRenderer.

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

15 years agoCorrect text position in wxDataViewCustomRenderer::RenderText() in wxGTK.
Vadim Zeitlin [Tue, 10 Nov 2009 17:41:50 +0000 (17:41 +0000)] 
Correct text position in wxDataViewCustomRenderer::RenderText() in wxGTK.

It simply ignored the passed in rectangle meaning that the text was always
drawn at the top left corner of the cell rectangle.

Also more code cleanup: collect all render call parameters in a single struct
and provide a public function to set them all at once instead of making them
public.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62595 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoPass full cell rectangle to WXCallRender().
Vadim Zeitlin [Tue, 10 Nov 2009 17:41:42 +0000 (17:41 +0000)] 
Pass full cell rectangle to WXCallRender().

There is no need to ask the item for its size in gtk_wx_cell_renderer_render()
as WXCallRender() will already do it (correctly, accounting for badly
implemented GetSize() unlike this version) internally on its own.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62594 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoAdd helper wxRectFromGDKRect() function and use it.
Vadim Zeitlin [Tue, 10 Nov 2009 17:41:35 +0000 (17:41 +0000)] 
Add helper wxRectFromGDKRect() function and use it.

No real changes, just another small refactoring.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62593 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoNo real changes, just remove some unnecessary casts.
Vadim Zeitlin [Tue, 10 Nov 2009 17:41:28 +0000 (17:41 +0000)] 
No real changes, just remove some unnecessary casts.

Use correct GdkRectangle* type for wxDataViewCustomRenderer::xxx_area members
instead of casting them to and from void*.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoAvoid setting attributes in GTK wxDataViewRenderer if not supported.
Vadim Zeitlin [Tue, 10 Nov 2009 17:41:22 +0000 (17:41 +0000)] 
Avoid setting attributes in GTK wxDataViewRenderer if not supported.

If the native renderer doesn't support the properties which we map our
attributes to, trying to set them is useless and results in GTK+ warnings so
don't do it.

Add wxDataViewRenderer::GtkSupportsAttrs() which can be overridden to indicate
whether the renderer supports attributes or not. We probably could use
g_object_class_find_property() instead to detect it automatically but for now
these properties are all supported only by GtkCellRendererText and not
supported anywhere else so using a single virtual function seems tidier.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62591 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoAllow custom wxDataViewCtrl renderers to easily use attributes.
Vadim Zeitlin [Tue, 10 Nov 2009 17:41:11 +0000 (17:41 +0000)] 
Allow custom wxDataViewCtrl renderers to easily use attributes.

Set up the DC passed to wxDataViewCustomRenderer::Render() to use the font and
colour defined by the item attribute by default so that any calls to
RenderText() from it will use them automatically.

Also added public wxDataViewCustomRenderer::GetAttr() to allow retrieving the
attribute explicitly in Render().

The column using custom renderer in the dataview sample now works as expected
in the generic version; the native ones will be corrected in the upcoming
commits.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoBig wxDataViewCtrl renderer classes refactoring.
Vadim Zeitlin [Tue, 10 Nov 2009 17:40:58 +0000 (17:40 +0000)] 
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

15 years agoAdd custom renderer column to the list model example in dataview sample.
Vadim Zeitlin [Tue, 10 Nov 2009 17:40:37 +0000 (17:40 +0000)] 
Add custom renderer column to the list model example in dataview sample.

Add a column using custom renderer to the example using a list model with
attributes to test attributes support -- currently they are ignored, but this
will be fixed soon.

Also make the custom renderer display somewhat more clear as previously it
didn't depend at all on its value.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoUse symbolic constants for list model columns in dataview sample.
Vadim Zeitlin [Tue, 10 Nov 2009 17:40:25 +0000 (17:40 +0000)] 
Use symbolic constants for list model columns in dataview sample.

Using Col_EditableText, Col_IconText and Col_TextWithAttr instead of 0, 1 and
2 makes the sample code a bit easier to read.

Also use switch on the column value instead of nested ifs everywhere to give
compiler a chance to warn us if we forget to update some function when a new
column is added.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62587 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agowxSpinCtrl values are always integral, they don't need to be rounded
Paul Cornett [Tue, 10 Nov 2009 17:36:53 +0000 (17:36 +0000)] 
wxSpinCtrl values are always integral, they don't need to be rounded

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agowxSpinCtrl::SetIncrement is supposed to take an int, not a double
Paul Cornett [Tue, 10 Nov 2009 17:12:36 +0000 (17:12 +0000)] 
wxSpinCtrl::SetIncrement is supposed to take an int, not a double

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62583 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoFix discrepancy between different ways of measuring text extents under Mac.
Vadim Zeitlin [Tue, 10 Nov 2009 00:13:57 +0000 (00:13 +0000)] 
Fix discrepancy between different ways of measuring text extents under Mac.

wxGraphicsContext::GetTextExtent() didn't round the returned double result to
int but truncated it instead and so returned different extent than
GetPartialTextExtents() which did round it up.

Moreover, wxGraphicsContext::GetPartialTextExtents() didn't round it up
correctly: it wrongly added 0.5 to the value still stored as double and which
was hence rounded up (correctly, this time) when converted to int in
wxDC::GetPartialTextExtents().

These two errors combined to produce difference of up to 2 pixels between the
last offset returned by wxDC::GetPartialTextExtents() and the total string
extent returned by wxDC::GetTextExtent() which thoroughly confused the code in
wxControlBase::DoEllipsizeSingleLine() (and probably not only there).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62580 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoFix unit test added in r62561 to work under Windows too.
Vadim Zeitlin [Mon, 9 Nov 2009 18:20:05 +0000 (18:20 +0000)] 
Fix unit test added in r62561 to work under Windows too.

The unit test checking that slashes were allowed in UNCs too didn't work under
Windows because GetPath() returned volume as part of the path there (and also
used backslashes by default), fix it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62579 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoRemove unused anywhere wxDataViewRenderer::RightClick().
Vadim Zeitlin [Mon, 9 Nov 2009 01:57:52 +0000 (01:57 +0000)] 
Remove unused anywhere wxDataViewRenderer::RightClick().

Code calling this method was removed by r53020 but its declaration was still
left (almost certainly by mistake) in the header, remove it now too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62578 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoFix fatal bug when changing wxDataViewCtrl model in wxGTK.
Vadim Zeitlin [Mon, 9 Nov 2009 01:57:47 +0000 (01:57 +0000)] 
Fix fatal bug when changing wxDataViewCtrl model in wxGTK.

wxDataViewCtrl::AssociateModel() wrongly delete m_notifier itself if the
control already had a model even though the notifier was registered using
AddNotifier() which also scheduled it for deletion when the old model itself
was destroyed. This resulted in double deletion and reproducible crash
whenever the model was changed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62577 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoNo changes, just correct a recurring typo in "Override".
Vadim Zeitlin [Mon, 9 Nov 2009 01:57:42 +0000 (01:57 +0000)] 
No changes, just correct a recurring typo in "Override".

Two "r"s should be enough for anybody.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoNo changes, just regenerated with bakefile 0.2.8.
Vadim Zeitlin [Mon, 9 Nov 2009 01:57:33 +0000 (01:57 +0000)] 
No changes, just regenerated with bakefile 0.2.8.

There are no changes in this file except for the version of bakefile in the
header comment.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62575 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoavoid causing idle event from GetValue(), fixes #11013
Paul Cornett [Sun, 8 Nov 2009 23:50:46 +0000 (23:50 +0000)] 
avoid causing idle event from GetValue(), fixes #11013

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62574 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoReplaced hard-coded font size in ribbon art provider with a system defined font size...
Peter Cawley [Sun, 8 Nov 2009 21:50:06 +0000 (21:50 +0000)] 
Replaced hard-coded font size in ribbon art provider with a system defined font size (see #11341).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62573 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agodocument that wxMessageDialog API additions appeared in 2.9.0
Václav Slavík [Sun, 8 Nov 2009 11:35:58 +0000 (11:35 +0000)] 
document that wxMessageDialog API additions appeared in 2.9.0

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62570 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoMake wxSTAY_ON_TOP and other window styles toggleable via SetWindowStyleFlag under...
Kevin Ollivier [Sun, 8 Nov 2009 03:03:06 +0000 (03:03 +0000)] 
Make wxSTAY_ON_TOP and other window styles toggleable via SetWindowStyleFlag under OS X Cocoa.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62568 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoRecognize MSVC 10 in wx/platform.h.
Vadim Zeitlin [Fri, 6 Nov 2009 20:48:01 +0000 (20:48 +0000)] 
Recognize MSVC 10 in wx/platform.h.

Define __VISUALC10__ for it and avoid a warning when building wx using it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoChange interpretation of font height in wxMSW to mean character height.
Vadim Zeitlin [Fri, 6 Nov 2009 20:47:52 +0000 (20:47 +0000)] 
Change interpretation of font height in wxMSW to mean character height.

Accept both positive and negative height values in wxFont::SetPixelSize() in
wxMSW and map them both to a negative height when passing to MSW API in order
to request mapping against the character height and not the total cell height.

For positive heights this is more consistent with the other ports and also
expectations of people using this function. We keep the possibility to use
the negative heights inly for compatibility with the existing code which
worked around the (incorrect) interpretation of the positive height as cell
heights in the previous wxMSW versions by passing a negative height
explicitly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoPrefer to use standard selection colour in wxDataViewCustomRenderer.
Vadim Zeitlin [Fri, 6 Nov 2009 20:47:44 +0000 (20:47 +0000)] 
Prefer to use standard selection colour in wxDataViewCustomRenderer.

We currently don't allow customizing the background colour of the selected
items which is always the system standard colour and so we should also use the
system standard selection foreground colour as a combination of a custom
foreground and standard background may be completely unreadable.

Notice that it is still possible to use custom colour if really needed from a
custom renderer by removing wxDATAVIEW_CELL_SELECTED from the flags before
calling the base class version of RenderText().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoadding support for wxShowEvent
Stefan Csomor [Fri, 6 Nov 2009 17:33:55 +0000 (17:33 +0000)] 
adding support for wxShowEvent

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62564 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoCompilation fix after r62562.
Vadim Zeitlin [Thu, 5 Nov 2009 15:37:48 +0000 (15:37 +0000)] 
Compilation fix after r62562.

Use char*, not wxChar*, for format specification strings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62563 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoChange wxLongLongFmtSpec to be a non-wide string.
Vadim Zeitlin [Thu, 5 Nov 2009 14:59:55 +0000 (14:59 +0000)] 
Change wxLongLongFmtSpec to be a non-wide string.

As with other ANSI/Unicode unification changes, we choose to preserve
compatibility with the existing code using wxLongLongFmtSpec in ANSI build
and require people using it in Unicode build to change their code.

Closes #11372.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62562 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoRecognize UNCs starting with forward slashes too in wxFileName.
Vadim Zeitlin [Thu, 5 Nov 2009 14:59:39 +0000 (14:59 +0000)] 
Recognize UNCs starting with forward slashes too in wxFileName.

Treat \\share\path and //share/path in the same way (for wxPATH_DOS paths).

Add a test for UNC parsing to the unit test.

Closes #11376.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoNo real changes, just correct "synonim" typo in comments.
Vadim Zeitlin [Thu, 5 Nov 2009 14:59:30 +0000 (14:59 +0000)] 
No real changes, just correct "synonim" typo in comments.

Closes #11408.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62560 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoImplement wxFindWindowAtPoint() correctly for wxOSX/Carbon.
Vadim Zeitlin [Thu, 5 Nov 2009 14:59:14 +0000 (14:59 +0000)] 
Implement wxFindWindowAtPoint() correctly for wxOSX/Carbon.

Use Carbon FindWindow() function instead of the generic wx version which
doesn't take the relative windows Z-order into account correctly.

Closes #11412.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62559 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoCreate an autorelease pool to catch objects created during several special situations...
Kevin Ollivier [Thu, 5 Nov 2009 00:31:36 +0000 (00:31 +0000)] 
Create an autorelease pool to catch objects created during several special situations, like customized initialization, so that we don't leak there.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62557 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoRevert "trivial" change of r61772.
Vadim Zeitlin [Wed, 4 Nov 2009 16:15:52 +0000 (16:15 +0000)] 
Revert "trivial" change of r61772.

The "slight code simplification" of r61772 broke the code as it could now
crash if dangling m_Cell pointer was used during parsing. Revert it and add a
comment explaining why the code is written in the way it is.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62556 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agowork around probable bug in GTK+ 2.18 when calling WriteText on a new, empty control...
Paul Cornett [Wed, 4 Nov 2009 05:18:38 +0000 (05:18 +0000)] 
work around probable bug in GTK+ 2.18 when calling WriteText on a new, empty control, #11409

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoDocument wxDocument::SetDocumentSaved().
Vadim Zeitlin [Tue, 3 Nov 2009 14:12:14 +0000 (14:12 +0000)] 
Document wxDocument::SetDocumentSaved().

While this function is usually called by wx itself it may be useful to call it
explicitly in some particular situations, as documented in the function
description, so make it officially public.

Closes #11396.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62546 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoSome wxComboCtrlBase member functions were enclosed within incorrect compatibility...
Jaakko Salli [Mon, 2 Nov 2009 14:57:35 +0000 (14:57 +0000)] 
Some wxComboCtrlBase member functions were enclosed within incorrect compatibility condition

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoDo trunk builds on ravnsgaard.
Michael Wetherell [Mon, 2 Nov 2009 06:27:26 +0000 (06:27 +0000)] 
Do trunk builds on ravnsgaard.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoStart on Get/SetStyle support for OS X Cocoa wxTextCtrl.
Kevin Ollivier [Sun, 1 Nov 2009 00:58:04 +0000 (00:58 +0000)] 
Start on Get/SetStyle support for OS X Cocoa wxTextCtrl.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agowxColour -> NSColor conversion.
Kevin Ollivier [Sun, 1 Nov 2009 00:56:23 +0000 (00:56 +0000)] 
wxColour -> NSColor conversion.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62530 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoNSFont -> wxFont conversion.
Kevin Ollivier [Sat, 31 Oct 2009 23:00:04 +0000 (23:00 +0000)] 
NSFont -> wxFont conversion.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoAdding NSColor -> wxColour conversion.
Kevin Ollivier [Sat, 31 Oct 2009 22:20:27 +0000 (22:20 +0000)] 
Adding NSColor -> wxColour conversion.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoBakefile 0.2.8 rebake.
Kevin Ollivier [Sat, 31 Oct 2009 20:56:47 +0000 (20:56 +0000)] 
Bakefile 0.2.8 rebake.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoUpdate to Bakefile 0.2.8.
Kevin Ollivier [Sat, 31 Oct 2009 20:52:55 +0000 (20:52 +0000)] 
Update to Bakefile 0.2.8.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62521 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agomake sure ShowWithoutActivating only takes effect once
Paul Cornett [Sat, 31 Oct 2009 16:29:19 +0000 (16:29 +0000)] 
make sure ShowWithoutActivating only takes effect once

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62520 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoMake public and document wxDataView{Index,Virtual}ListModel::GetCount().
Vadim Zeitlin [Sat, 31 Oct 2009 15:58:19 +0000 (15:58 +0000)] 
Make public and document wxDataView{Index,Virtual}ListModel::GetCount().

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

15 years agoFix wx headers compilation in mingw32 strict ANSI mode.
Vadim Zeitlin [Sat, 31 Oct 2009 15:58:05 +0000 (15:58 +0000)] 
Fix wx headers compilation in mingw32 strict ANSI mode.

Add checks for !defined(__STRICT_ANSI__) when checking for various common but
non-standard CRT extensions.

This allows compiling programs using wx with g++ -std=c++[0x] option (notice
that compiling wx itself using it still doesn't work).

Closes #11374.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoNo real changes, just fix a typo in wxDataViewModel::Compare().
Vadim Zeitlin [Sat, 31 Oct 2009 15:57:58 +0000 (15:57 +0000)] 
No real changes, just fix a typo in wxDataViewModel::Compare().

Return -1 from the comparison function instead of -11 when comparing
wxDateTime values. It shouldn't matter which value is returned as long as it's
negative but it is definitely tidier.

Closes #11381.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62517 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoReturn the real column width from wxOSX wxDataViewColumn::GetWidth().
Vadim Zeitlin [Sat, 31 Oct 2009 15:57:51 +0000 (15:57 +0000)] 
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

15 years agoimplement ShowWithoutActivating for GTK+
Paul Cornett [Fri, 30 Oct 2009 07:39:58 +0000 (07:39 +0000)] 
implement ShowWithoutActivating for GTK+

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62510 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoCompilation fix for last commit.
Kevin Ollivier [Fri, 30 Oct 2009 06:01:16 +0000 (06:01 +0000)] 
Compilation fix for last commit.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62509 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoInitial ShowWithoutActivating implementations for Mac and Windows, and attempt to...
Kevin Ollivier [Fri, 30 Oct 2009 05:04:47 +0000 (05:04 +0000)] 
Initial ShowWithoutActivating implementations for Mac and Windows, and attempt to improve IsActive behavior on Mac. Also adding ShowWithoutActivating() and Show/Hide tests,  but until the mainloop issues are resolved, not adding them to tests.bkl.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agofixing wx/evtloop.h for gtk1
Jouk Jansen [Thu, 29 Oct 2009 07:30:42 +0000 (07:30 +0000)] 
fixing wx/evtloop.h for gtk1

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62507 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoFixed backslash escaping in wxArrayStringProperty::StringToValue()
Jaakko Salli [Wed, 28 Oct 2009 15:57:58 +0000 (15:57 +0000)] 
Fixed backslash escaping in wxArrayStringProperty::StringToValue()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62506 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoomitting assert that makes no sense for OpenVMS
Jouk Jansen [Wed, 28 Oct 2009 12:05:18 +0000 (12:05 +0000)] 
omitting assert that makes no sense for OpenVMS

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoNo changes, just add a comment to the button focus handling code.
Vadim Zeitlin [Tue, 27 Oct 2009 16:44:16 +0000 (16:44 +0000)] 
No changes, just add a comment to the button focus handling code.

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

15 years agoUndo commit of test code accidentally checked in in r62478.
Vadim Zeitlin [Tue, 27 Oct 2009 16:44:12 +0000 (16:44 +0000)] 
Undo commit of test code accidentally checked in in r62478.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agofeature name must match description
Paul Cornett [Sun, 25 Oct 2009 17:48:32 +0000 (17:48 +0000)] 
feature name must match description
fixes --disable-sysoptions

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62501 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoMake wxDataViewModel::GetAttr() and GetAttrByRow() const.
Vadim Zeitlin [Sat, 24 Oct 2009 21:42:04 +0000 (21:42 +0000)] 
Make wxDataViewModel::GetAttr() and GetAttrByRow() const.

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

15 years agoAdd wxDataViewListModel base class for list models.
Vadim Zeitlin [Sat, 24 Oct 2009 21:41:54 +0000 (21:41 +0000)] 
Add wxDataViewListModel base class for list models.

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

15 years agoCreate model and column in wxDataViewTreeCtrl::Create(), not ctor.
Vadim Zeitlin [Sat, 24 Oct 2009 21:41:44 +0000 (21:41 +0000)] 
Create model and column in wxDataViewTreeCtrl::Create(), not ctor.

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

15 years agoNo real changes, just make wxDataViewCtrl::Init() private in wxGTK.
Vadim Zeitlin [Sat, 24 Oct 2009 21:41:30 +0000 (21:41 +0000)] 
No real changes, just make wxDataViewCtrl::Init() private in wxGTK.

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

15 years agosupport for auto-rotate on iphone
Stefan Csomor [Sat, 24 Oct 2009 19:28:50 +0000 (19:28 +0000)] 
support for auto-rotate on iphone

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoswitching to explicit flush mode, otherwise clientdc destruction lead to contention...
Stefan Csomor [Sat, 24 Oct 2009 19:22:40 +0000 (19:22 +0000)] 
switching to explicit flush mode, otherwise clientdc destruction lead to contention in customrenderers in osx

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 years agoDon't show anything in the cells which should be empty in Cocoa wxDVC.
Vadim Zeitlin [Sat, 24 Oct 2009 01:03:36 +0000 (01:03 +0000)] 
Don't show anything in the cells which should be empty in Cocoa wxDVC.

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

15 years agoAdd wxDataViewModel::HasValue().
Vadim Zeitlin [Sat, 24 Oct 2009 01:03:24 +0000 (01:03 +0000)] 
Add wxDataViewModel::HasValue().

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

15 years agoUse virtual items in wxDVC sample under Mac too.
Vadim Zeitlin [Sat, 24 Oct 2009 01:02:31 +0000 (01:02 +0000)] 
Use virtual items in wxDVC sample under Mac too.

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

15 years agoUse virtual functions to convert NSObject to the correct type in wxDVC.
Vadim Zeitlin [Fri, 23 Oct 2009 23:49:26 +0000 (23:49 +0000)] 
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

15 years agoAdd wxDataViewModel::ChangeValue() and use it in wxDVC implementation.
Vadim Zeitlin [Fri, 23 Oct 2009 23:49:16 +0000 (23:49 +0000)] 
Add wxDataViewModel::ChangeValue() and use it in wxDVC implementation.

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