Commit Graph

14104 Commits

Author SHA1 Message Date
Jaakko Salli
c6aabd1ca9 Fix non-PCH builds (closes #12217)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64897 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-11 20:00:44 +00:00
Jaakko Salli
525b29124a Added 'Delimiter' attribute for wxArrayStringProperty. Moved static ArrayStringToString() to wxArrayStringProperty.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64894 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-11 17:04:23 +00:00
Jaakko Salli
895e26a04b Have the new incarnation of wxPGArrayEditorDialog support the old-style 'custom button' event as something that happens when the wxEditableListBox's 'New Item' button is pressed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-11 16:06:03 +00:00
Vadim Zeitlin
6dc6bcd8ab No real changes, just fix unused parameter warning.
Wrap dc parameter of wxRichTextCtrl::PaintAboveContent() in a WXUNUSED().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-11 10:44:27 +00:00
Vadim Zeitlin
679ab0b315 Optionally set the window name in wxPersistentRegisterAndRestore().
In practice names are not often used so typically whenever you want to make a
window settings persistent you also need to set its name and the it's
convenient to let a single function do both tasks, so add an overload taking
the name string (this is a separate function instead of optional parameter to
avoid compilation errors if this is ever used with non-wxWindow-derived
objects which don't have SetName() method).

Also expand the documentation slightly and add @since tags.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-11 10:44:23 +00:00
Vadim Zeitlin
3dea8ba7ac Account for largest item in wxGenericListCtrl::GetBestSize().
Don't just return a hard-coded value but at least return something big
enough to show the largest item in the control in non-report mode.

This fixes the appearance of wxListbook which simply truncated its items
before if they didn't fit in 80 pixels horizontally.

Also switch to implementing DoGetBestClientSize() instead of DoGetBestSize()
as this method doesn't account for the control borders (it does account for
the scrollbars however).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64884 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-11 10:44:08 +00:00
Vadim Zeitlin
89b799cccf Add wxSize::IncBy() and DecBy() overloads taking wxPoint.
It seems to make at least as much sense to extend a wxSize by wxPoint than by
another wxSize (which doesn't make much size to me...) so add Inc/DecBy()
overloads doing this.

We might also add operator+=() overloads taking wxPoint for consistency but
for now don't add more operator overloads unnecessarily, let's wait if anybody
asks about this first.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-11 10:44:03 +00:00
Vadim Zeitlin
b35549525f Implement wxWindow::DoGetBorderSize() for all ports.
Implement DoGetBorderSize() properly for wxGTK and use the difference between
the full window size and the client size for all the ports not implementing
this method. The latter is incorrect in the presence of the scrollbars but is
the best we can do in general.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64880 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-11 10:43:49 +00:00
Vadim Zeitlin
d6a658ff0c Allow user code to override key events in generic wxListCtrl.
The changes of r58323 ("Restore keyboard navi") fixed the handling of cursor
keys in the generic wxListCtrl implementation but at the price of not sending
keyboard events for the cursor keys to wxListCtrl itself any more. This made
it impossible to override their handling in user code, something that used to
work in previous wx versions and still works in wxMSW.

Revert the changes of this revision now and fix the original code by simply
disabling the handling of the cursor keys in wxScrollHelperBase using a newly
added DisableKeyboardScrolling() method. This ensures that the keyboard events
for cursor keys are not used to scroll the window when they are forwarded to
wxListCtrl from wxListMainWindow.

The fix is conceptually ugly as it would be better to avoid the need for such
ad hoc functions as DisableKeyboardScrolling() but it is very simple and there
just doesn't seem to be any sane way to do it otherwise with wxScrollHelperBase.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64877 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-11 10:43:35 +00:00
Jaakko Salli
2906967c4a wxArrayEditorDialog now uses wxEditableListBox. It has also been renamed to wxPGArrayEditorDialog.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64867 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-10 15:30:35 +00:00
Julian Smart
6494f8d142 iPhone SDK 2.2 compilation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64855 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-08 17:35:45 +00:00
Julian Smart
4e8d90a7ce Respect wxUSE_MENUS in toolbar base classes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64854 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-08 17:35:04 +00:00
Julian Smart
7304f3850d Avoid warning
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64851 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-08 13:32:34 +00:00
Václav Slavík
281448385a Add std::[w]string support to wxVariant.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-05 14:23:21 +00:00
Jaakko Salli
88f47aa770 Make m_inDoPropertyChanged and m_inCommitChangesFromEditor bools; Manage m_inDoPropertyChanged using wxON_BLOCK_EXIT_SET()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64814 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-04 11:21:27 +00:00
Jaakko Salli
96bffa1288 m_inDoSelectProperty: make it bool and use wxON_BLOCK_EXIT_SET() on it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-04 10:30:13 +00:00
Jaakko Salli
03d47fcf07 Redundant wxPropertyGrid validation failure message boxes should no longer be shown
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64810 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-04 09:46:43 +00:00
Jaakko Salli
4fb5dadb13 Changed wxPropertyGrid default property validation failure behavior to more user-friendly wxPG_VFB_MARK_CELL | wxPG_VFB_SHOW_MESSAGEBOX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64808 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-04 08:53:07 +00:00
Jaakko Salli
0ea0604a1e Added new wxPropertyGrid property validation failure flags wxPG_VFB_SHOW_MESSAGEBOX and wxPG_VFB_SHOW_MESSAGE_ON_STATUSBAR, which allow defining the default message display behavior more accurately
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64805 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-04 08:22:52 +00:00
Václav Slavík
b113edcdd7 Fix format strings parsing to understand C99 %zu etc.
The parser used to understand only 'Z' specifier for size_t/ptrdiff_t,
which is non-standard libc5 extension. C99 defines 'z' for this purpose,
so use that. Compatibility with 'Z' is preserved.

Also support Visual C++'s non-standard 'I' modifier with the same
meaning.

Fixes #12192.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64800 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-03 14:24:23 +00:00
Václav Slavík
16c15822fe wxFileOffsetFmtSpec isn't translatable.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64799 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-03 14:24:17 +00:00
Václav Slavík
3b12da351c Fix vararg type checking to accept ints for %c.
It's perfectly legitimate to format int values as %c, so don't assert in
this case.

Fixes #12192.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-03 14:24:12 +00:00
Václav Slavík
5b4a88f4db Simply varargs type checking by adding subtypes to check mask.
Instead of always declaraing that a C++ type corresponds to either
Arg_String or Arg_Pointer, make Arg_String superset of Arg_Pointer.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64797 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-03 14:24:06 +00:00
Jaakko Salli
2d8d109b6c Eliminated lingering validation failure message on the status bar. Added wxPropertyGrid virtual member functions DoHidePropertyError() and GetStatusBar().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-03 12:22:58 +00:00
Jaakko Salli
8915141c1e wxPropertyGrid validation failure was not (always) reset when a valid value was entered after an invalid one.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64795 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-03 11:43:49 +00:00
Václav Slavík
afc1f37c65 Fix printf arguments validation code for ANSI build.
char arguments weren't recognized as allowed variadic types. Unlike in
Unicode build, where chars are treated specially, they are primitive
types in ANSI build.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64790 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-01 15:28:35 +00:00
Václav Slavík
908c405611 Use wxScopedCharBuffer in To8BitData() in ANSI build too.
This allows one to write code compatible with both Unicode and ANSI
builds.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-01 15:28:30 +00:00
Václav Slavík
227c030f98 Don't assume size_t is either int- or long-sized.
On 64bit Windows systems, sizeof(int)==sizeof(long)=4, but size_t is 8
bytes large.

Fixes #12179.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64788 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-01 14:30:29 +00:00
Julian Smart
8698cfea93 Added missing wxTEXT_ATTR_PAGE_BREAK from wxTEXT_ATTR_PARAGRAPH
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64776 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-28 21:21:22 +00:00
Francesco Montorsi
ffc78010a9 fix couple of typos
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-26 11:43:13 +00:00
Julian Smart
35bdbae572 Added PaintAboveContent function for drawing on top of text (#12176)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-25 14:05:07 +00:00
Václav Slavík
c869479eb4 Compilation fix for compilers that don't have native wchar_t.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-24 11:25:49 +00:00
Václav Slavík
0f895b0cf5 Check wxPrintf etc. arguments types.
Implements checks similar to gcc's compile-time checks: verify that the
arguments are of correct types. This works partially at compile time
(e.g. passing an object as argument fails to compile) and partially at
runtime (assert if the specifier doesn't match the type).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-24 10:34:18 +00:00
Václav Slavík
2fe2d3de6b Add correct wxArgNormalizer code for signed char.
Signed char is distict type (see 3.9.1 [basic.fundamental] part of the
standard), covering just char and unsigned char is not enough.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64709 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-24 10:34:11 +00:00
Václav Slavík
060ec116e4 Always NUL-terminate wxPrintfConvSpec::m_szFlags.
The array was initialized and terminating NUL was only added in some
cases. In combination with strchr() calls, this would result it
incorrect calculations or even crashes.

Fixed by initializing the array to zeros. This is less error-prone than
fixing the few places where explicitly adding the terminating NUL was
missing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-24 10:34:06 +00:00
Václav Slavík
2f06971640 Check that wxSIZE_T_IS_* macros are always defined.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64707 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-24 10:34:01 +00:00
Stefan Csomor
bd7bfb002d adding mimetype patch, closes #12072
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64671 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-21 16:36:45 +00:00
Stefan Csomor
20196e15ee adding HitTest to osx_cocoa implementation of listbox, refactoring code, fixes #11972
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64670 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-21 15:30:07 +00:00
Stefan Csomor
5bd7710593 adding bestsize for osx_cocoa combobox
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-21 14:00:59 +00:00
Stefan Csomor
4275201ba3 text updated events were not always sent out correctly, fixes #11462
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64662 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-21 07:50:12 +00:00
Vadim Zeitlin
6218600646 Fix activation handling in generic wxDataViewCtrl renderers.
Handling of activation in the generic implementation of standard renderers was
broken since r62589 which stopped calling their Activate() method. Restore it
by introducing a special WXOnActivate() replacing it (but clearly marked as
private and implementation-only) and calling it instead.

Closes #11460.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-20 17:43:30 +00:00
Vadim Zeitlin
aaaa607018 Use PBM_SETMARQUEE to implement indeterminate mode in wxMSW wxGauge.
The old code which simply used PBM_SETPOS after setting PBS_MARQUEE style
often worked but sometimes apparently didn't, so switch to the officially
sanctioned PBM_SETMARQUEE to implement this.

Also make wxGauge::SetDeterminateMode() and SetIndeterminateMode() methods
private as they are not part of the public class API.

Closes #11357.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-20 17:43:02 +00:00
Vadim Zeitlin
3cb332c155 Remove unnecessary mondrian.{ico,xpm} files from samples directory.
Standardize on using sample.rc and sample icon in all the samples, it was
confusing that some of them used it and other didn't, without any apparent
logic.

Remove the now unnecessary icon files, including the dialogs sample icon which
seemed to be corrupted (this closes #11146).

Also replace multiple OS/2 resource files with a single one in the sample
directory. The OS/2 projects/makefiles would need to be updated to use them.

Remove dialogs sample icon.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-20 17:42:33 +00:00
Francesco Montorsi
774ef7e3b7 fix for non-PCH builds
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-19 12:28:38 +00:00
Francesco Montorsi
d38315df30 Remove identic implementations of wxDir::Exists from platform-specific files and put it in dircmn.cpp (they all used wxDirExists).
Add wxDir::Make() and wxDir::Remove() for coherency with wxDir::Exists() and document them as simple aliases to wxFileName functions, just a bit more readable.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-19 11:07:16 +00:00
Jaakko Salli
79c60a3ef9 Made wxAny::IsNull() doc string a bit clearer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-18 13:32:12 +00:00
Jaakko Salli
f1156cbb0d Added wxAny::HasSameType()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64624 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-18 13:30:47 +00:00
Jaakko Salli
94cd7b004d Use placement new when storing value in wxAnyValueBuffer. This should allow using any data type, regardless whether it is Plain Old Data or copyable or not.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-18 13:18:22 +00:00
Vadim Zeitlin
9655ec028f Allow specifying non default port for wxFTP connections.
Add a wxFTP::Connect() overload taking a port number.

Also specify the default port (21) explicitly if resolving "ftp" service name
failed.

Closes #12145.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-17 22:30:31 +00:00
Václav Slavík
2ab514cad4 Make the wxArrayString(int) ctor explicit.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64606 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-17 13:04:21 +00:00