Commit Graph

52209 Commits

Author SHA1 Message Date
Robert Roebling
e97f9fbd63 Better wording in docs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66417 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-20 19:15:15 +00:00
Robert Roebling
9c09addd35 Correction to: Support diabling items in GTK+, see #12686: Allow disabling of wxDVC items
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-20 19:13:13 +00:00
Jaakko Salli
9a7f467140 Removed non-implemented function prototype OnMouseWheel() from wxVListBoxComboPopup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-20 14:54:04 +00:00
Jaakko Salli
a2abe5f081 Use locale-specific decimal point in wxNumericPropertyValidator (fixes #12790)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66411 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-20 14:21:13 +00:00
Jaakko Salli
997ddb2ced Added OwnerDrawnComboBoxTestCase (currently only has copies of wxComboBox tests)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66410 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-20 13:55:40 +00:00
Jaakko Salli
238b33ab0e Added wxComboPopup::FindItem() to help in deciding how SetValue() should change the value of a read-only wxComboCtrl. This allows wxOwnerDrawnComboBox to have the same behavior as wxComboBox in that respect.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-20 13:51:24 +00:00
Jouk Jansen
f179b35ec2 correction to make wxGTK1 compile
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-20 13:33:39 +00:00
Jaakko Salli
a7f62f3909 Have wxUniv wxComboBox inherit from wxItemContainer instead of wxComboBoxBase, since the latter is derived from wxTextEntry which conflicts with the recent change in wxComboCtrl (fixes #12789)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-20 11:27:13 +00:00
Jaakko Salli
084a875a2e Added dummy-wxTextEntry implementation section for wxUniversal
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-20 11:23:14 +00:00
Jouk Jansen
256e97fb7d include compile support for tests on OpenVMS (part3)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-20 09:23:57 +00:00
Robert Roebling
9fc221aa81 Support diabling items in GTK+, see #12686: Allow disabling of wxDVC items
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-19 19:43:46 +00:00
Vadim Zeitlin
98f8e6666b Add the possibility to disable invisible wxDataViewCtrl items.
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
2010-12-19 15:02:56 +00:00
Vadim Zeitlin
46405e36bf Store menus titles in menus themselves in wxOSX.
Get rid of wxMenuBar::m_titles array which doesn't seem to be needed and just
store the titles in the menus themselves instead. This makes wxMenu::GetTitle()
work as in the other ports and fixes unit test failures in menu test.

It also makes it unnecessary to duplicate the base class Find[Menu]Item()
methods in wxOSX wxMenuBar so simply remove them entirely.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-19 15:02:45 +00:00
Vadim Zeitlin
8a1459665d No real changes, just get rid of _wxMenuAt() in wxOSX menu code.
The _wxMenuAt() function was totally unnecessary and duplicated the existing
wxMenuBar::GetMenu() so simply remove it and use GetMenu() instead.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66401 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-19 15:02:38 +00:00
Vadim Zeitlin
4027f0d759 Fix initial gradient point calculation in wxOSX.
This fixes the bug introduced in r63879 which used the wrong indices into the
stops array resulting in visual artefacts in wxAUI, for example (and also
possible crashes due to accessing out of bound array elements).

Closes #12784.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-19 15:02:31 +00:00
Vadim Zeitlin
1c7ce07347 Preserve wxSlider value when changing its range in wxOSX too.
This fix is similar to r66368 for wxMSW and preserves the slider value when
its range changes. This is necessary because while the underlying native
control value doesn't change when the range is, the logical value of wxSlider
does change if it must be inversed as this depends on the range.

See #12765.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66399 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-19 14:08:42 +00:00
Jaakko Salli
f74ab0041b Make wxOwnerDrawnComboBox sorting identical to the MSW sorting (same as wxComboBox)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-17 12:23:34 +00:00
Jaakko Salli
ffb9247a85 Add wxComboBox-compatible Popup() and Dismiss() functions in wxComboCtrl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66397 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-17 12:08:55 +00:00
Jaakko Salli
94daedc804 Add enough default arguments to one wxOwnerDrawnComboBox ctor so it can be consructed using only two arguments, same as the wxComboBox
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66396 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-17 11:50:54 +00:00
Jaakko Salli
65d30b7950 Mostly change the wxOwnerDrawnComboBox text value using ChangeValue() instead of SetValue()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-17 11:39:38 +00:00
Jaakko Salli
0306e73e63 Make the wxComboCtrl's wxTextEntry interface more complete and consistent. All text is no longer selected on SetValue(), but only when user selects an item from the drop-down list.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-17 11:20:50 +00:00
Robin Dunn
708cc39462 Use a " " (space) for the menu item if an empty string is used for an item in a wxChoice, in order to avoid an assert in wxMenuItem.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66391 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-17 00:56:26 +00:00
Jaakko Salli
2debe2b120 Removed a return statement from void function
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66389 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-16 19:25:31 +00:00
Jaakko Salli
eae20c901b Resolve ambiguity with wxOwnerDrawnComboBox::Clear(), virtual method which is derived from two base classes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66388 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-16 18:13:43 +00:00
Jaakko Salli
bd0fa687b6 In wxBitmapComboBox dtor, call DoClear() instead of ambiguous Clear()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-16 18:08:16 +00:00
Jaakko Salli
9ff4b6ccd9 Override wxTextEntry::GetSelection(long *from, long *to) in wxOwnerDrawnComboBox to resolve virtual method hiding issues
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-16 18:07:05 +00:00
Jaakko Salli
fda6279358 Instead of having wxComboCtrl mimic wxTextEntry interface, make it actually inherit from the class and implement functions to redirect to the embedded wxTextCtrl. This allows us to simplify the code and get rid of the dirty trick of directing wxComboCtrl's validator to the embedded wxTextCtrl. Also see #12779, which issue 1 is fixed by this change.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66385 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-16 17:21:49 +00:00
Jaakko Salli
25199f9859 Document how the sign is omitted from wxFloatProperty's displayed value when it is effectively zero (closes #12738).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66384 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-16 16:12:55 +00:00
Vadim Zeitlin
0538419f9e Initialize wxLogWindow::m_pLogFrame in ctor to avoid (rare) crash.
If the log frame creation itself generates log messages, the code using
wxLogWindow could crash because its m_pLogFrame member variable wasn't
initialized yet at this moment.

Do set it to NULL initially now to avoid this.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-15 13:36:44 +00:00
Vadim Zeitlin
66f7556189 Compilation fixes for wx{X11,GTK1,Motif} after making ref data non copyable.
Don't use wrong compiler-generated copy ctors in the other ports neither (see
r66371..66373 for wxGTK fixes). This fixes compilation after r66374 without
reducing functionality but just making it more clear where it is missing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66382 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-15 12:04:13 +00:00
Vadim Zeitlin
10c49955ad Compilation fix for wxMotif PCH build.
We need to include wx/unix/utilsx11.h even when using PCH to get
wxCharCodeXToWX() declaration.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66381 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-15 12:04:02 +00:00
Vadim Zeitlin
806b2e1692 Update accelerator unit test to pass after recent changes.
Changes of r66379 broke the unit test as wxAcceleratorEntry::Create() now
requires the TAB to be present in the string passed to it (again).

Update the test to make it pass.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-15 12:03:54 +00:00
Vadim Zeitlin
6fc7a1ad1c Don't pass strings not containing accelerators to ParseAccel().
Check for the presence of accelerator part in the string passed to
wxAcceleratorEntry::Create() and don't call ParseAccel() at all if it's not
there. This avoids the spurious warnings about unrecognized accelerators when
creating menu items that don't have any accelerators at all.

Also update wxAcceleratorEntry::FromString() documentation to mention that
the new code should pass just the accelerator to this function and that it
only accepts full menu item labels for compatibility.

Closes #12770.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66379 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-15 11:18:42 +00:00
Jouk Jansen
a67c2d4161 Include compilation of tests for OpenVMS (part2)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66378 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-15 10:54:47 +00:00
Jouk Jansen
38e5440573 Include compilation of tests for OpenVMS (part1)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66377 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-15 09:51:48 +00:00
Vadim Zeitlin
377c1ba438 Return false, not NULL, from a function returning bool.
Fix a warning (which might be an error with some compilers) about returning
NULL from bool wxRichTextImageBlock::DoMakeImageBlock() function.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66376 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-14 18:44:04 +00:00
Vadim Zeitlin
8f6f3a71d8 No real changes, just add a cast to fix a warning.
Fix warning about implicitly converting -1 to CGKeyCode when building wxOSX
with 10.4 SDK.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66375 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-14 18:43:57 +00:00
Vadim Zeitlin
fd08ccd246 Make wxRefCounter non copyable.
wxRefCounter copy ctor was wrong as the new object had the same reference
count as the old one instead of starting its life with reference count set to
1 as any new object should.

While we could fix its copy ctor, it seems to be better to forbid copying
wxRefCounter objects at all because the semantics of doing this is not obvious
and the compiler-generated copy ctor in the derived classes often doesn't do
what the code using it expects it to do, as was discovered by making
wxRefCounter non copyable: see the fixes in the previous commits.

To uncover all such bugs, make wxRefCounter and classes deriving from it non
copyable. If this uncovers more problems, they should be fixed by implementing
copying properly (and explicitly) in the derived classes.

Closes #12768.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66374 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-14 18:43:49 +00:00
Vadim Zeitlin
f9b4d680d7 Fail in CloneGDIRefData() instead of implementing it incorrectly in wxOSX.
wxIcon and wxMetaFile implemented CloneGDIRefData() using copy ctors of the
corresponding ref data classes but the copy ctors were either wrong (for
wxIconRefData as using it would result in messing up IconRef reference count)
or had wrong semantics (wxMetafileRefData copy ctor performed shallow copy
only while CloneGDIRefData() supposes a deep copy is done).

Replace the wrong implementations of these functions with assert that will be
triggered if they are ever used (which doesn't seem to be the case so far).

See #12768.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66373 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-14 18:43:39 +00:00
Vadim Zeitlin
fc684792c6 Don't use implicit wxBitmapRefData copy ctor in wxGTK code.
wxBitmapRefData didn't have a proper copy ctor but the code in wxGTK wxBitmap
implementation used it nevertheless and then manually patched the newly copied
object to avoid double pointer deletion and other unpleasantness.

Make the code more obviously correct by not using (nor providing) copy ctor at
all. There are no real changes otherwise.

See #12768.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-14 18:43:32 +00:00
Vadim Zeitlin
51bf928d02 Fail instead of crashing in wxGTK wxCursor::CloneGDIRefData().
CloneGDIRefData() used wxCursorRefData copy ctor which wasn't implemented
correctly and simply copied its internal m_cursor member without incrementing
its reference count which resulted in a crash when it was then dereferenced
twice.

Unfortunately there doesn't seem to be any simple way to clone GDK cursors but
as this should be something only rarely (if ever?) needed, simply don't
implement CloneGDIRefData() at all for now and just leave an assert in it if
it's ever really called. Also don't define wxCursorRefData copy ctor at all as
it can't be done correctly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66371 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-14 18:43:25 +00:00
Vadim Zeitlin
5cb160c564 Improve wxImage handlers documentation, especially ownership aspect.
Correct wxImage::RemoveHandler() documentation which was plain wrong.

Also mention that the handler will be deleted by wxImage in AddHandler()
documentation.

And add an example of using AddHandler() as well as fix the broken text in
wxInitAllImageHandlers() description.

Closes #12772.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66370 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-14 18:43:17 +00:00
Vadim Zeitlin
d383f40e7b Preserve value when changing range of inverted wxSlider in wxMSW.
The logical value of wxSlider was changed when its range was changed in wxMSW
if the slider had wxSL_INVERSE style because the logical value was actually
computed using the range and the actual physical control value and we forgot
to update the latter when changing the range.

Do update it now in SetRange() to fix this.

Also add unit tests checking for this and, more generally, for other
operations with inversed sliders.

Closes #12765.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66368 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-13 18:10:02 +00:00
Jaakko Salli
bac635ede2 Have wxPropertyGrid::DoubleToString() to also take comma into account as a decimal separator. In addition, the function now returns target wxString (makes writing tests easier).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66367 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-13 16:07:49 +00:00
Jaakko Salli
0b4e4c3937 Added code to remove sign from zero in wxPropertyGrid::DoubleToString(). Fixes #12738.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-11 11:57:26 +00:00
Stefan Csomor
954c66fafc changing compositing mode for Clear, see #12756
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-11 11:48:38 +00:00
Stefan Csomor
54ea28348c adding support for layout coordinates via insets from framecoordinates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-07 15:46:12 +00:00
Stefan Csomor
2a2064f895 fixing redraw debugging
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66359 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-07 15:41:33 +00:00
Stefan Csomor
9cb50d3a2c attempt at making the line continuation characters stay correct
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66358 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-07 13:28:32 +00:00
Stefan Csomor
b7e15982d3 updating files list for iphone opengl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66357 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-07 10:11:53 +00:00