Commit Graph

14013 Commits

Author SHA1 Message Date
Jaakko Salli
4e0bdd562d Adapted wxPropertyGrid documentation, samples, tests, and wxVariantData-macros to the new wxAny<->wxVariant conversions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-16 14:36:32 +00:00
Jaakko Salli
0bf14ab8b1 wxVariant <-> wxAny conversion functionality. Includes implicit construction of wxAny from wxVariant, and vice versa. wxVariant->wxAny conversion is implemented by adding new virtual member function into wxVariantData. wxAny->wxVariant conversion is implemented by associating wxAnyValueTypes with functions that generate wxVariantData instances (using a hash map).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-16 14:33:52 +00:00
Vadim Zeitlin
3017880eff Don't rely on __GXX_RTTI being defined with g++ < 4.3.
__GXX_RTTI is only defined since g++ 4.3.2 and so we can't rely on its absence
as indicating the use of -fno-rtti switch with the older versions of the
compiler, only do this for g++ 4.3+.

Also define wxNO_RTTI from configure if --enable-no_rtti was used as we can't
always detect it automatically.

Closes #11955.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-16 12:44:30 +00:00
Václav Slavík
3acf8a8d9b Remove wxLOCALE_CONV_ENCODING flag.
This doesn't affect Unicode builds, only the legacy ANSI one.

PO files are now always converted to the appropriate charset according
to current locale. This was the default behavior for long time; not
doing the conversion was always a fragile hack that didn't work well.
Removing this flag simplifies wxLocale code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-16 11:29:22 +00:00
Václav Slavík
f30bd8f262 Add wxLOCALE_DONT_LOAD_DEFAULT (=0) for clarity.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-16 11:29:09 +00:00
Václav Slavík
8d94819c43 Remove wxUSE_WCHAR_T checks.
wxWidgets requires wchar_t for some time now; wx/chartype.h has a check
to fail complation without it. Simplify code by removing now-dead code
for the !wxUSE_WCHAR_T case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-16 10:43:18 +00:00
Stefan Csomor
bc5c09a3aa translating background style BG_PAINT into opaqueness for speed-up of OS redraws, supporting positioning for native carbon controls also on non-composited windows (custom pane in navservices dialogs)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-16 06:18:16 +00:00
Vadim Zeitlin
7f2468e96a Fix using weak references to incomplete classes.
wxWeakRef can work with forward-declared classes provided dynamic_cast<> is
available but this wasn't detected as being the case due to the use of the
obsolete HAVE_DYNAMIC_CAST in its code.

Replace HAVE_DYNAMIC_CAST with !wxNO_RTTI to fix this.

Also add a unit test checking that this does work.

Closes #11916.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-15 22:47:37 +00:00
Stefan Csomor
7d53220e14 fixing constants to be of the expected parameter type (float instead of double)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63976 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-14 12:16:42 +00:00
Stefan Csomor
61ad44c7a9 adding support for extraControl on osx_carbon
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63970 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-13 20:27:04 +00:00
Stefan Csomor
17e2694c59 adding wrapping possibility for native tlws
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63969 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-13 20:24:59 +00:00
Stefan Csomor
b61b8371b0 correcting alpha and removing window shadow for overlay
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-12 20:39:51 +00:00
Stefan Csomor
59d866ad85 name change to correctly reflect the autorelease nature of the methods, removing double release, fixes #11547, fixes #11760
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63958 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-12 16:29:35 +00:00
Vadim Zeitlin
946ceed9cd Fix VC6 compilation which was somehow broken by adding wxWeakRef ctor.
For some mysterious reason, adding non-template wxWeakRef ctor breaks VC6
build with the apparently completely unrelated errors:

include\wx/toplevel.h(223) : error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'class wxWindow *' (or there is no acceptable conversion)
include\wx/toplevel.h(231) : error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'class wxWindow *' (or there is no acceptable conversion)
src\common\dummy.cpp(27) : error C2856: #pragma hdrstop cannot be inside an #if block

Simply don't define it for VC6 to at least allow the code not using wxWeakRef
to compile.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-12 13:08:01 +00:00
Stefan Csomor
82f8ea8547 change grow box implementation - was incorrectly getting the focus in panels before
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-12 11:59:47 +00:00
Vadim Zeitlin
476de5ea9a Fix crash in wxListbook if image list is assigned after adding pages.
The generic wxListCtrl didn't properly support switching between report and
non-report modes without invalidating the control contents, the required in
non report view geometry info pointers were not allocated when the control was
switched to a, say, list mode and not created in it.

Fix this by updating all list control lines when the report mode changes.

Closes #11698.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63946 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-12 00:37:08 +00:00
Vadim Zeitlin
8dd13d0fa1 Fix return value of wxList::insert() in non-STL builds.
The returned value was the same as the iterator that was passed in which could
even be invalid when appending.

Fix the wrong use of postfix decrement instead of prefix one and handle the
case of appending correctly.

Closes #11808.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-12 00:36:36 +00:00
Vadim Zeitlin
89e1de6441 Fix compilation of wxIconBundle in some particular minimal builds.
Let the code compile when wxUSE_STREAMS==1 but wxUSE_FILE and wxUSE_FFILE are
both 0.

Closes #10900.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-12 00:36:31 +00:00
Vadim Zeitlin
d8eff331e2 Use template class instead of template function in wxVectorSort().
This allows the code to compile with VC6 which has trouble with explicit
specification of the template functions instantiation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-11 17:38:01 +00:00
Jaakko Salli
5caf524dff Fixed typo in documentation string
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-11 13:20:10 +00:00
Vadim Zeitlin
e3ab69523b Add wxString::ToStdString() and ToStdWstring().
These trivial helper functions are available in all builds (provided that
wxUSE_STD_STRING is not explicitly set to non-default 0 value) unlike implicit
conversions to std::[w]string which are only available when wxUSE_STL==1.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-11 11:08:49 +00:00
Stefan Csomor
13f0c85aa4 cocoa implementation for overlay
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63937 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-11 09:26:31 +00:00
Vadim Zeitlin
43aecc4dd7 Add non-template wxWeakRef<T> constructor from T*.
We need a non-template ctor to make the code initializing wxWeakRef with
literal NULL to compile.

Closes #11916.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-10 18:13:29 +00:00
Vadim Zeitlin
fc4e23d7c1 Add wxWeakRef::element_type, remove unnecessary assignment operator.
Define element_type for consistency with other classes (wxSharedPtr, weak_ptr)
and to allow accessing the type from the template code.

Also remove the apparently unnecessary template assignment operator:
assignment from an expression convertible to type T* works even without it and
while assigning something implicitly convertible to T* wouldn't work now, it's
for the best as we don't want to rely on such implicit conversions.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-10 18:13:23 +00:00
Vadim Zeitlin
90fbb09ae2 Add wxImage::ClearAlpha().
This simple method can be used to remove alpha channel from the image.

See #10915.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63922 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-09 13:15:20 +00:00
Václav Slavík
a9d41efb74 Add system libs in msvc/wx/setup.h too.
This makes it possible to use static build of wx from VC++ by just
including its headers. Even though it's common to have these libs in
your settings, it's not always the case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-09 06:55:19 +00:00
Stefan Csomor
03c281617c trying to simplify and optimize font handling
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63918 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-08 21:39:14 +00:00
Stefan Csomor
7eb8aeb8b1 using statically allocated font objects for speedup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-08 18:47:41 +00:00
Stefan Csomor
cfb0ef701e allowing direct native tlw modal loops
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-08 09:46:36 +00:00
Robin Dunn
0a492dbe7a #include <algorithm>
to fix problem in PCH-less STL builds

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-07 22:23:45 +00:00
Robin Dunn
068c8da4a8 (blind) fix for buildbot breakage with MSVC 6
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63907 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-07 21:56:08 +00:00
Robin Dunn
38723be1d5 Add wxVectorSort function for sorting wxVector<T> containers. Closes #11889
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63904 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-07 20:32:25 +00:00
Vadim Zeitlin
e793ec1449 Fix wxGTK compilation after r63880.
SendTextUpdatedEvent() needs to be public as it's called from GTK callback.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-06 23:51:13 +00:00
Francesco Montorsi
2febffbac7 fix typos introduced by error in r63870 (see #10673)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-06 22:51:11 +00:00
Vadim Zeitlin
356fd0b532 Add wxTextEntryBase::ForwardEnableTextChangedEvents().
Use this method to forward the status of text events in the implementation of
wxComboBox in wxOSX/Carbon. This ensures that the events are correctly [not]
generated when various wxComboBox methods are called.

The unit tests now also pass with wxOSX/Carbon.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-06 18:46:35 +00:00
Vadim Zeitlin
e567904ae6 Fix text text changed events sending in OS X combo box and text control.
Don't duplicate needlessly wxTextEntry functionality in wxTextCtrl.

Don't clear the combobox text entry part twice in wxComboBox::DoClear(), it is
supposed to only clear the item container contents as the base class Clear()
already calls wxTextEntry::Clear().

Do send text updated events from wxTextEntry itself as it applies to
wxComboBox just as well as to wxTextCtrl.

The unit tests now pass under wxOSX/Cocoa, not breaking them again would be
appreciated.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63881 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-06 18:46:29 +00:00
Vadim Zeitlin
501358073b Move SendTextUpdatedEvent() down to wxTextEntryBase from wxTextCtrlBase.
This will allow reusing it in wxComboBox implementation as well.

Also add SendTextUpdatedEventIfAllowed() which can be used to only send the
events if they were not blocked at wxTextEntry level.

No real changes otherwise.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63880 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-06 18:46:24 +00:00
Vadim Zeitlin
005ac806ea Remove duplicated GetTextPeer() definitions from derived classes.
GetTextPeer() may be implemented directly in wxTextEntry under OS X, there is
no need to define it (identically) in wxTextCtrl and wxComboBox.

Also just call this method instead of duplicating its code in wxOSX
wxTextCtrl.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63878 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-06 18:46:14 +00:00
Stefan Csomor
ac349b6e66 adding clipboard events, fixes #11906
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-06 16:51:12 +00:00
Vadim Zeitlin
b2edb8f3c5 Add support for IEC and SI size units to wxFileName::GetHumanReadableSize().
Allow choosing the multiplier to use (1000 or 1024) and the names of the units
(SI or IEC). By default, still use traditional convention, i.e. multiplier of
1024 but SI unit names. This will probably need to be changed to use IEC units
in the future.

Also added unit test for this function.

Closes #10673.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63870 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-06 14:53:04 +00:00
Vadim Zeitlin
2028c33ab5 Add default constructor to wxGraphicsGradientStop.
It may be convenient to create wxGraphicsGradientStop first and initialize it
later so allow doing this by providing the default argument for constructor
parameters and thus allowing to use it as the default constructor.

See #11897.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63869 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-06 13:55:35 +00:00
Vadim Zeitlin
cc16513e28 Correct check for MSVC version in wxUSE_GRAPHICS_CONTEXT definition.
Set wxUSE_GRAPHICS_CONTEXT to 1 by default for MSVC 7.1+ and not 8+.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63868 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-06 13:55:30 +00:00
Vadim Zeitlin
3784bf308f Correct checks for gradient stop position.
It may be <= 1 in the final version and not < 1.

See #11897.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-06 00:17:16 +00:00
Václav Slavík
c765e6fb9d Fix text input and completion in wxComboCtrl and wxOwnerDrawnComboBox.
Both wxEVT_KEY_DOWN and wxEVT_CHAR must be handled and only the latter
used for completion (or any characters input). Don't make incorrect
assumptions about wxEVT_CHAR keycodes either, it's only the Unicode
character and printability that matter.

Otherwise, completion in readonly controls wouldn't work correctly
for e.g. numbers on numpad or non-ASCII characters.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63864 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-05 17:19:04 +00:00
Vadim Zeitlin
4ee4c7b948 Add support for gradient stops to wxGraphicsContext.
Allow specifying a set of gradient stops instead of just the beginning and
ending colours. Add the new wxGraphicsGradientStop(s) classes and new
wxGraphicsContext::Create{Linear,Radial}GradientBrush() overloads. Also change
the same methods of wxGraphicsRenderer to take wxGraphicsGradientStops instead
of a pair of colours.

Implement the new API for MSW and Cairo. OS X still uses just the two colours
for now.

Closes #11897.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-05 12:15:11 +00:00
Vadim Zeitlin
cd300ef760 Add wxTransparentColour global pseudo-variable.
Introduce a symbolic name for a fully transparent colour.

See #11897.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63856 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-05 11:44:33 +00:00
Jaakko Salli
1237a25bc4 Resolve GCC's 'type-punned pointer will break strict-aliasing rules' warning by breaking up code in wxAny GetValue() and SetValue() functions into several lines (fixes #11865)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-04 15:22:43 +00:00
Vadim Zeitlin
961f4d0ce6 Correct compilation breakage of r63832.
wx/setup.h can't use wxCHECK_VISUALC_VERSION() which is defined in
wx/platform.h _after_ wx/setup.h inclusion.

Replace wxCHECK_VISUALC_VERSION() with manual tests for _MSC_VER.

Also add more comments to explain what's going on.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-03 12:25:52 +00:00
Vadim Zeitlin
cde23b64b5 Allow using wxGraphicsContext with MinGW if gdiplus.h is available.
MinGW doesn't include gdiplus.h but it can be installed independently by the
user. Allow to use it if it's available:

- Include windows.h when checking for it in configure as this is apparently
  needed for its compilation.
- Don't reset wxUSE_GRAPHICS_CONTEXT to 0 for non-Microsoft compilers, instead
  just define it as 0 by default for them, allowing the user to simply change
  the definition in wx/msw/setup.h.

Closes #11892.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63832 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-02 19:30:41 +00:00
Stefan Csomor
62068535c5 simplifying modal event loop handling
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-02 14:52:08 +00:00
Francesco Montorsi
00e075e551 Committing modified version of jwiesemann's patch (see #11223):
Fix wxURL copy ctor and assignment: the default ones provided by the compiler are wrong because wxURL uses pointers internally. 
Also add a test for copy & assignment in URLTestCase.

Closes #11223

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-30 21:38:31 +00:00
Paul Cornett
38442edb48 Remove unnecessary declarations.
Contrary to the comment, they are not used often, in fact only once each
and in the same file.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63805 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-30 16:14:11 +00:00
Jouk Jansen
a41115011c correcting typo in commit 63803
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-30 12:02:16 +00:00
Jouk Jansen
7126436ab4 Defining wxCOMPILE_TIME_ASSERT for OpenVMS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63803 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-30 11:54:37 +00:00
Robin Dunn
9e96e16fe0 Apply patch (plus some additional changes) upgrading Scintilla to version 2.03. Closes #11765, #11748, #11346
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-30 03:50:06 +00:00
Vadim Zeitlin
af9b20332c Fix compilation breakage in r63783.
Added missing #endif.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63785 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-29 21:24:44 +00:00
Vadim Zeitlin
e7678d7d03 Add wxUSE_FSWATCHER dependency on wxUSE_THREADS for wxMSW.
wxFileSystemWatcher implementation uses threads under MSW and can't be
compiled when wxUSE_THREADS==0.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63783 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-29 20:57:41 +00:00
Jaakko Salli
e954958f98 For better support of wxValidators, invoke wxValidator::Validate() directly. Also remove obsolete flag wxPG_FL_VALIDATION_FAILED and make wxPropertyGrid::DoEditorValidate() virtual.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63782 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-29 18:17:55 +00:00
Václav Slavík
c44a49b852 Use fixed screen DPI of 96 when printing HTML.
Unlike font sizes, which depend on screen resolution because of weird
wxFont API, pixel sizes used elsewhere (and in particular, for images)
shouldn't depend on screen DPI.

This finally makes the output independent of screen size.

Fixes #10942.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63781 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-29 14:19:06 +00:00
Paul Cornett
a89c31bb34 build fix for IRIX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-29 06:45:00 +00:00
Paul Cornett
f089940f68 Reverse hierarchy of wxPizza GdkWindows
widget->window must be topmost in order for GTK+ to calculate DND drop coordinates correctly
fixes #11834


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63775 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-29 01:16:06 +00:00
Vadim Zeitlin
27297c823a Implement wxMask copy ctor for wxGTK.
Without copy ctor copying masks simply crashed because the same pointer was
deleted twice.

Also added a (completely trivial but better than nothing...) unit test for
wxBitmap to check that copying masks does work now.

Closes #11854.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63774 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-28 23:20:49 +00:00
Francesco Montorsi
7517dcb56e no real changes: just a small optimization on wxStaticText::DoSetLabel() to avoid altering m_labelOrig there (it's already modified by SetLabel(), no need to change it twice)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63767 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-28 22:23:38 +00:00
Vadim Zeitlin
e9c4f54ef3 Fix compilation of wx/debug.h when it's the first wx header to be included.
We must include wx/dlimpexp.h from wx/debug.h to be able to forward declare
wxString and wxCStrData using WXDLLIMPEXP_FWD_BASE, otherwise compilation
errors occur in the code which includes wx/debug.h as the first wx header.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-25 20:08:05 +00:00
Vadim Zeitlin
94dc70d190 Allow overriding print preview frame creation in docview.
Add a virtual wxDocManager::CreatePreviewFrame() which can be overridden to
customize the print preview used by docview framework.

Closes #11390.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-25 20:07:58 +00:00
Paul Cornett
d26cb76b58 better fix for #11803, don't set iconized state for hidden window
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-23 17:58:03 +00:00
Paul Cornett
3c7620f666 ignore iconized state when computing client size for GetBestSize(), fixes #11803
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63750 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-23 17:19:02 +00:00
Vadim Zeitlin
4311588bfe Implement wxDocument::Revert() and show its use in the sample.
wxDocument::Revert() method existed but didn't do anything, provide a
default implementation for it. Also document it and show it in the sample.

Closes #11849.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-23 10:49:51 +00:00
Jaakko Salli
e948e2140f Fixed RefreshRect() call in wxPropertyGrid::DrawItems() to use physical window coordinates instead of logical grid ones
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63738 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-22 16:07:45 +00:00
Vadim Zeitlin
9b7e022676 Add wxUSE_UIACTIONSIMULATOR and turn it off by default.
Disable the recently added wxUIActionSimulator class until the issues with it
mentioned at http://article.gmane.org/gmane.comp.lib.wxwidgets.devel/119792/
are fixed.

Also use "" around wx headers instead of <> in wx code itself.

See #11801.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-22 11:40:35 +00:00
Francesco Montorsi
32ee98eb76 reorder GetLabel(), GetLabelText(), SetLabel() and SetLabelText() function declarations, implementations and relative documentations.
Add wxStaticTextBase::GetLabelWithoutMarkup() and use it in the wxMSW implementation of wxStaticText::SetLabel() to close bug #11446; the function RemoveMarkup() which was previously used in fact could not check for presence/absence of wxST_MARKUP style since it's a static function.

Add wxStaticTextBase::SetLabelText() functions for symmetry with wxControlBase::SetLabelText()

Add test unit for both wxControl::*Label* and wxStaticText::*Label* functions.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-21 21:39:15 +00:00
Vadim Zeitlin
697f4a966e Add initial selection parameter to wxGetSingleChoice() functions.
Allow to easily specify the initially selected item.

Closes #11749.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-21 11:06:31 +00:00
Jaakko Salli
46291feecd Make wxPGVFBFlags an unsigned char define instead of wxByte typedef (easier time for wxPython bindings)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 14:08:34 +00:00
Vadim Zeitlin
a4578b0ced Add wxMessageDialog::GetEffectiveIcon() and use it in all ports.
Remove code duplication and inconsistencies among different ports by using a
single function in the base class for the determination of the effective icon
style to use, correctly handling both wxICON_NONE and the absence of any
wxICON_XXX styles.

Closes #11822.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 13:18:23 +00:00
Vadim Zeitlin
679918f93d Rename wxWindow::GetMainWindow() to X11GetMainWindow() in wxX11.
This avoids conflicts with GetMainWindow() defined in other wxWindow-derived
classes (such as wxDataViewCtrl and potentially user-defined classes as well).

Closes #11818.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 13:03:05 +00:00
Vadim Zeitlin
d141826876 Always include sys/time.h and sys/select.h from selectdispatcher.h.
fd_set used by this header is supposed to be defined in sys/select.h and not
including this header resulted in compilation problems under QNX. And
including sys/time.h shouldn't hurt and is needed by select() under many
systems anyhow.

See #11817.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 12:45:28 +00:00
Jaakko Salli
6cf5edea27 Use explicit wxPGPropertyFlags enum type with wxPGProperty::SetFlag() and similar member functions (thus preventing use of incorrect set of flags). Also now document wxPGProperty flags.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63700 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-17 18:17:19 +00:00
Stefan Csomor
9aee121225 adding proper removal of observer for stacked event loops, using cfrunloop for console on osx as well
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-17 08:05:04 +00:00
Stefan Csomor
80eee8378f streamlining OSX event support third step, using platform specific native run methods for event loops
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63697 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-17 07:14:03 +00:00
Vadim Zeitlin
0f1c3d30d4 Add white outline to bulls eye cursor used under MSW.
The cursor used black circles only making it perfectly invisible on black
background. Add a white outline as well to ensure that it can be seen in this
case too, similarly to how it's done for magnifying glass cursor and the same
bulls eye cursor in GTK+.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-16 14:48:02 +00:00
Vadim Zeitlin
459128ac88 Initialize picker style in native GTK file/dir pickers.
This fixes the styles used in the native wxGTK version after changes in
r63654: we must initialize base class m_pickerStyle now and the code didn't do
this before resulting in various asserts and incorrect behaviour.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63690 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-16 00:23:57 +00:00
Stefan Csomor
293a13bad7 streamlining OSX event support second step, moving pending and idle event handling to runloop-observer, see #11805, see #11797
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-15 19:31:57 +00:00
Stefan Csomor
0056673c67 streamlining OSX event support first step, see #11805, see #11797
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63687 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-15 15:40:47 +00:00
Vadim Zeitlin
5d7792236f Use _UNICODE instead of UNICODE in wx/msw/winundef.h.
This is consistent with the other checks and generally more correct.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-09 11:08:52 +00:00
Vadim Zeitlin
8eca1205e2 Use correct style for the dialog shown by generic file/dir pickers.
The picker styles don't make sense for the button so we don't use them when
creating the button but we do need to somehow use the style the picker was
created with to create an appropriate dialog when it's clicked.

Fix the problem by simply storing the style in a member variable and using it
instead of wxWindow::m_windowStyle.

Closes #11635.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-08 19:37:08 +00:00
Václav Slavík
49e714e127 Fix wxTlsValue<> memory leaks.
Win32 API doesn't provide pthreads-like destructors, so we need to
emulate them to free per-thread allocated memory.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-08 12:21:58 +00:00
Kevin Ollivier
a02a5cfcf3 Adding wxUIActionSimulator, a class for programmatically controlling the mouse and keyboard.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-06 20:09:23 +00:00
Kevin Ollivier
a45c9ba59b A call to wxPopupWindow::Show shouldn't automatically cause the popup window to steal focus.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63641 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-06 04:51:51 +00:00
Vadim Zeitlin
c1fae0d0ee Don't store header height in generic wxListCtrl member variable.
This is simply unnecessary and resulted in a crash in wxDFB because the window
was used for this variable initialization before being created.

Closes #11711.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-06 00:31:04 +00:00
Vadim Zeitlin
175363f6b8 Implement wxBookCtrlBase::CalcSizeFromPage() in the base class.
The definition of this method was needlessly duplicated in all of
wx{Choice,List,Tool,Tree}book and in all of them except the first one it
didn't account correctly for the case when the size of the controller was
greater than the size of the page.

Avoid the duplication and fix the best size determination in such case by
providing a single, correct version of the function in the base class itself.

Closes #11793.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-05 23:55:19 +00:00
Vadim Zeitlin
1d2b7f06a3 No changes, just remove redundant GetControllerSize() definitions.
For some reasons wxBookCtrlBase::GetControllerSize() was redefined in several
derived classes even though it did exactly the same thing in all of them.

Leave only the base class version and remove the other ones.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-05 23:55:09 +00:00
Stefan Csomor
878357d8f7 make sure ShowEvent doesn't get triggered to early during construction
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63618 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-03 16:33:12 +00:00
Vadim Zeitlin
18a4c97b36 Allow using version-specific vc prefix in msvc/wx/setup.h.
We still use just "vc" by default for compatibility but allow the user to
predefine either wxMSVC_VERSION or wxMSVC_VERSION_AUTO to use the specified or
version-dependent prefix instead. This is very convenient when using multiple
MSVC versions.

See #11022.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63617 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-03 14:19:29 +00:00
Vadim Zeitlin
d48a4705ab Use correct directory names in msvc/wx/setup.h for 64 bit builds.
Use _amd64 and _ia64 suffixes if _M_X64 or _M_IA64 is defined.

Closes #11022.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63616 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-03 14:19:18 +00:00
Robin Dunn
06bb8d923d Invalidate best size when the bitmap or bitmap position changes. Add GetBitmapMargins
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63595 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-01 23:20:35 +00:00
Vadim Zeitlin
b96a56e60e Make it possible to use wxCharBuffer during program initialization.
wxCharBuffer might be used during static initialization, even if only
implicitly. E.g. it is used by wxString::Format() which can be used to
initialize a global string. But it uses the global s_untypedNullData variable
might not be initialized yet resulting in mysterious failures.

Fix this in the usual way by wrapping access to the variable via a function.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-28 11:09:26 +00:00
Vadim Zeitlin
d0204feee6 Compilation fixes for wide char functions under IRIX with mipsPro.
Use correct (XPG5, not XPG4) version of wcsftime().

Bring the wide char functions only declared in std namespace into global one
under IRIX.

Declare vswscanf() ourselves as we just don't seem to get its declaration from
C++ code (only from C99).

Add a cast to fix incorrect putws() signature.

All these fixes apply to IRIX 6.5.18 with mipsPro 7.4.2. It doesn't seem to
add configure checks for most of the above fixes as previous versions of both
the OS and the compiler should be completely extinct by now but we may need to
do it if anybody is still found to use them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63583 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-28 11:09:15 +00:00
Vadim Zeitlin
05d676f558 Always declare wxCStrData::As[W]Char() as being inline.
This fixes warnings with IRIX mipsPro and not only mingw32 and probably
doesn't do any harm with the other compilers.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63581 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-28 11:09:07 +00:00
Vadim Zeitlin
54d6106853 Rearrange functions order so that they are effectively inlined.
Define wxSizer::Insert(size_t, wxSizerItem *) before it is used so that it
could really be inlined.

This also fixes an IRIX mipsPro compiler warning.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63580 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-28 11:09:02 +00:00
Vadim Zeitlin
eb3a3cbbd3 Include the real iostream header and not just iosfwd from wx/stdstream.h.
We need to include full [io]stream declaration and not just forward declare
them to be able to define classes deriving from them. Surprisingly, including
just <iosfwd> seems to work under most systems but it does not under IRIX.

So include the full <iostream> (or <iostream.h>) to be sure to get what we
need.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-28 11:08:26 +00:00
Kevin Ollivier
78a1707501 Override CanFocus because the wxWindow level test will check if the NSTextView's parent scrollview can get keyboard focus, and will return no, meaning that wx won't set the focus to the text ctrl.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63564 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-27 02:51:45 +00:00
Jaakko Salli
26b22ae371 Must clear property selection in wxPGProperty::SetChoices() or risk a crash
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63562 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-26 15:45:30 +00:00
Vadim Zeitlin
5431e4a684 Use wxGetInstance() instead of wxhInstance in wxMSW code.
No real changes, just use an accessor function instead of directly accessing
the global variable.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-25 00:03:59 +00:00
Vadim Zeitlin
2856f57b37 Include wx/defs.h from all our public headers, including wx/imaglist.h.
Without including wx/defs.h first, symbols such as __WXMSW__ are not defined
if this header is the first wxWidgets header to be included.

Closes #11718.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63553 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-25 00:03:53 +00:00
Vadim Zeitlin
e10092956f Fix multiple bugs in non-ownerdrawn wxListBox after recent merge.
Changes done in ownerdraw-refactor branch have broken non-ownerdrawn list
boxes as the code was now using m_aItems array even for them but it's not used
in this case.

Also remove unnecessarily overridden Delete() method which didn't add anything
to the base class implementation but just deleted the same m_aItems pointer
twice.

Also use HasFlag(wxLB_OWNERDRAW) everywhere consistently instead of testing
for it manually.

Closes #11729.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63551 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-25 00:03:44 +00:00
Vadim Zeitlin
b42468496c Compilation fixes in wxHTML for wxUSE_CONFIG==0.
Surround uses of wxConfig with #of wxUSE_CONFIG in wxHTML code.

Closes #11750.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-25 00:03:30 +00:00
Jaakko Salli
f231df8aa8 Property removal and deletion done from wxPropertyGrid event handler is now postponed to idle event
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63534 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-22 16:44:56 +00:00
Kevin Ollivier
e908dbcc92 Cocoa text fields and views have their own context menus, so we should use those instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63533 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-22 01:56:42 +00:00
Kevin Ollivier
809020fc97 Disable sending of events by OS X Combobox during programmatic changes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-19 03:00:07 +00:00
Jaakko Salli
76733d4cae Fixed auto-resizing behavior when double-clicking a splitter; Added wxPropertyGrid::ResetColumnSizes(); wxPropertyGrid::GetSplitterPosition() got splitterIndex argument
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63502 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-16 16:24:30 +00:00
Jaakko Salli
4279fdb44a Added wxPropertyGridInterface::GetColumnProportion()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63501 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-16 15:38:12 +00:00
Robin Dunn
b6ae7297d2 Apply new patch fixing problem of IsRunning always returning True. See #11699
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63486 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-15 17:34:21 +00:00
Jaakko Salli
fe01f16e53 Added wxPropertyGridInterface::SetColumnProportion(); wxPG_SPLITTER_AUTO_CENTER window style now supports column counts higher than two.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63481 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-14 14:09:06 +00:00
Kevin Ollivier
a7b9865d30 Basic support for tooltips under OS X Cocoa.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63477 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-13 06:30:06 +00:00
Vadim Zeitlin
06b76f7e8b Fix compilation of wx/scopeguard.h with g++ -fno-exceptions.
Don't use try/catch in public headers if exceptions support is disabled with a
compiler switch.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-12 22:47:25 +00:00
Vadim Zeitlin
011ad05168 Remove wxHAS_NAMESPACES and gcc 2.95 checks.
We use namespaces elsewhere without any checks now so it doesn't make sense to
keep checking for them here.

We also don't support g++ 2.95 since ages so no need to check for it neither.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-12 22:47:21 +00:00
Jaakko Salli
ec3cce5a29 Removed most of the propgrid '#ifndef SWIG' pre-compiler conditions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-10 16:45:39 +00:00
Vadim Zeitlin
9508a23a1b Move wxPosixPermissions definition from wx/file.h to wx/filefn.h.
This fixes compilation with wxUSE_FILE=0 as wxFileName::Mkdir() still uses
these constants but their definitions were not available in this case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-10 11:38:41 +00:00
Robin Dunn
1ed7a2064a Allow more than one timer with the same ID. Closes #11699.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63422 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-08 20:06:04 +00:00
Vadim Zeitlin
f2d7fdf7b0 Add support for showing "elevation" icon in wxMSW buttons.
Add, document and test in the widgets sample wxButton::SetAuthNeeded().

Closes #11705.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63421 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-08 19:52:00 +00:00
Stefan Csomor
126254a8d0 adding carbon event missing in 10.4 headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-08 07:20:39 +00:00
Kevin Ollivier
75a2c6a1ee Get wxSearchCtrl text events working, and share the text event handler code among all the various wxTextCtrl-based classes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63415 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-06 17:00:38 +00:00
Kevin Ollivier
808cbd174a Add an accessor to get the current drop source from window.mm so that we can implement GiveFeedback support, and also move a couple functions that check the current drop source into common DND OS X code as a result.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-06 01:45:58 +00:00
Vadim Zeitlin
95ad763a77 Extract wxSTOCK_WITHOUT_ELLIPSIS from wxSTOCK_FOR_BUTTON.
Make it possible to use this flag on its own, without wxSTOCK_WITH_MNEMONIC
which is also part of wxSTOCK_FOR_BUTTON. This can be useful for e.g. toolbar
buttons.

Closes #11681, #11682.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-04 01:33:32 +00:00
Vadim Zeitlin
1d4b9c37cb Make wxDataObjectComposite::GetObject() public.
Allow retrieving individual wxDataObjects from wxDataObjectComposite and add
an example showing how can this be done to the documentation.

Closes #11692.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63381 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-04 01:02:43 +00:00
Jaakko Salli
c05fe84146 Added nominal wxPG_PROP_READONLY support for editor controls other than wxTextCtrl-based ones
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63337 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-31 18:15:17 +00:00
Stefan Csomor
5aa6ea933f supporting clipboard command shortcuts on osx_cocoa as well, simplifying code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63332 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-31 11:01:53 +00:00
Vadim Zeitlin
96e790a567 Disable wxUSE_FSWATCHER under Unix if neither inotify nor kqueue is available.
Don't define wxUSE_FSWATCHER as 1 in configure if we can't implement it.

Also add a check to wx/unix/chkconf.h to verify that we didn't end up with an
inconsistent configuration somehow.

Closes #11670.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-29 13:07:26 +00:00
Vadim Zeitlin
aedb388157 Disable wxUSE_OWNER_DRAWN for wxUniv to fix the build.
wxMenuItem in wxUniv doesn't even use wxOwnerDrawn but linking in
ownerdrwcmn.cpp is enough to break the DLL build of wxUniv at least under MSW
as it references symbols normally defined in msw/ownerdrw.cpp which is not
part of wxUniv.

Fix this by simply disabling wxUSE_OWNER_DRAWN under wxUniv for now as it's
unused anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-28 12:07:16 +00:00
Kevin Ollivier
bfa92264c0 Get ShowWindowModal behavior working under OS X Cocoa for file, dir and message dialogs.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63291 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-28 04:06:23 +00:00
Jaakko Salli
fb9521b8f5 wxPGProperty::GetHintText() function body was missing 'inline' keyword
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-26 21:09:41 +00:00
Jaakko Salli
13bb4e59af Fixed wxPGGlobalVars export declaration
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-26 17:44:51 +00:00
Vadim Zeitlin
5cb3a695e0 Add wxTreeCtrl::SelectChildren() method.
Add MSW and generic implementation, documentation and change to the sample
showing it.

Closes #11620.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-26 12:43:39 +00:00
Vadim Zeitlin
9d043a9227 Compilation fixes for PCH-less build after ownerdraw-refactor branch merge.
Forward declare more classes, in particular use tagRECT which can be forward
declared, instead of RECT typedef in public headers.

Also include more header in #ifndef WX_PRECOMP case.

See #11595.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-26 09:01:13 +00:00
Vadim Zeitlin
108694fe19 Make wxWindow::MSWGetThemeColour() const.
There doesn't seem to be any reason for this method to not be const.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63269 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-26 09:00:55 +00:00
Stefan Csomor
4d572a2cac simplifying code, removing outdated API
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63266 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-25 22:27:42 +00:00
Julian Smart
deeb0a89b9 Added EVT_WIZARD_PAGE_SHOWN event for wxWizard, to give apps
a chance to initiate processing after a page is presented.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63263 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-25 18:48:21 +00:00
Stefan Csomor
1814b27e45 make sure we can override GetModality
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63260 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-25 17:12:07 +00:00
Vadim Zeitlin
b8190883d0 Compilation fix after ownerdraw-refactor branch merge.
Don't use HDC in public headers, it may not be declared there. Use WXHDC
instead even if this means having ugly casts.

This fixed mingw32 compilation (see #11595).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-24 14:15:12 +00:00
Václav Slavík
5c3c137277 Fixed dialog units <-> pixels conversion.
The computation is now identical to Windows native one. To achieve this,
MSDN-recommended GetTextExtent() call is used instead of GetCharWidth().
wxMulDivInt32() is used instead of integer arithmetics to achieve
correct rounding.

Use toplevel parent's font instead of window's own. This makes more
sense, as dialog units are defined for TLWs, not individual subcontrols.

Also fixed wxMSW's wxButton::GetDefaultSize() to compute dialog units
correctly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-24 11:51:09 +00:00
Vadim Zeitlin
421f32d102 Override IsSeekable() in wxString{Input,Output}Stream to return true.
These streams are seekable but somehow IsSeekable() was never overridden for
them resulting in test failures in Input_SeekI().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63248 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-24 11:33:17 +00:00
Vadim Zeitlin
4ca973967a Correct bug with returning 0 for non-empty input from wxConvAuto::ToWChar().
Since the changes of r63064 we could return 0 when asked to convert a
non-empty buffer containing only a BOM. This confused the logic in
wxTextInputStream::NextChar() and was generally unexpected so now return
wxCONV_FAILED in this case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63245 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-24 10:13:40 +00:00
Vadim Zeitlin
d1d1f8175d Add wxComboBox::Popup() and Dismiss() to manually show or hide its popup.
Add implementations for wxMSW and wxGTK.

Closes #11506.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63242 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-24 01:00:45 +00:00
Vadim Zeitlin
9677a8f017 Use a helper wxNEEDS_DECL_BEFORE_TEMPLATE symbol in wxStrcoll() workaround.
The condition for which this workaround is needed has already changed once
(see #11605) and may change again in the future as we test with more compilers
so use a symbolic name for it.

No real changes otherwise.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63237 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-24 00:59:56 +00:00
Vadim Zeitlin
a95d18b8a8 Apply workaround for wxStrcoll() template for g++ to 3.4 too.
At least mingw32 version of g++ 3.4.5 needs the same workaround to be able to
compile wx.

Closes #11605.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63236 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-24 00:59:49 +00:00
Kevin Ollivier
9482c64466 Start on ShowWindowModal for OS X Cocoa. Not working properly as children do not display.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-23 20:06:48 +00:00
Vadim Zeitlin
e556b61236 Add virtual wxSizer::DoInsert() to replace Insert().
This allows to avoid problems with hiding all but the overridden overloads of
Insert() in wxSizer-derived classes, see #11616, without having to explicitly
write any using statements.

Keep Insert(size_t, wxSizerItem) virtual to allow the existing code overriding
it to keep working.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-23 13:44:46 +00:00
Vadim Zeitlin
85ee88cd53 Improve wxCheckListBox appearance under Vista/Win7.
Fix the items alignment and also code cleanup: fix indentation, remove magic
numbers &c.

Closes #10286.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-23 13:22:00 +00:00
Vadim Zeitlin
ee00931326 Correct drawing of check marks for owner-drawn items without bitmaps.
Standard check mark was not drawn correctly for check/radio items without
bitmaps.

Closes #11480.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63225 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-23 13:21:52 +00:00
Vadim Zeitlin
9c32ed26a2 Correct alignment of menu accelerator strings in owner-drawn menus.
Draw them right-aligned as the native menus do.

Closes #11479.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63224 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-23 13:21:46 +00:00