Vadim Zeitlin [Wed, 15 Feb 2012 15:39:56 +0000 (15:39 +0000)]
Document the default size of new wxMemoryBuffer correctly.
Documenting it as DefBufSize wasn't really helpful, so just use its value
instead (an alternative would be to document DefBufSize -- with its value --
but it doesn't seem very useful to make it part of the public API).
Vadim Zeitlin [Wed, 15 Feb 2012 15:39:41 +0000 (15:39 +0000)]
Refactor wxFileName existence checking code.
Merge FileExists() and DirExists() together in a single
wxFileSystemObjectExists() helper in preparation for adding a function
checking for the existence of any kind of file system object.
There should be no changes for MSW/Unix but OS/2 file detection was changed
slightly to always use DosQueryPathInfo() instead of using it only for the
directories and stat() for files. Not sure if this is the right thing to do
there but it seems like the code should work.
Vadim Zeitlin [Wed, 15 Feb 2012 00:35:25 +0000 (00:35 +0000)]
Make wxDragImage ctors taking hot spot point really deprecated in wxMSW.
They were documented as deprecated and deprecated in the generic version (and
actually not even available there any more without WXWIN_COMPATIBILITY_2_6)
but not in wxMSW, where we just had the weird wxLogDebug() statements that
were inconsistent with our handling of deprecation everywhere else.
Do deprecate them now, remove wxLogDebug() and also remove the deprecated
ctors and Create() overloads from the documentation.
Finally, remove the documentation of deprecated and available in the generic
version only ctor taking only wxCursor (closes #13967).
Vadim Zeitlin [Wed, 15 Feb 2012 00:35:18 +0000 (00:35 +0000)]
Don't document private event handlers in doc/view frame classes.
wxDoc[MDI]ParentFrame::OnCloseWindow(), wxDoc[MDI]ChildFrame::OnActivate() and
OnCloseWindow() are all private, don't document them as public. Just mention
that the wxEVT_CLOSE_WINDOW and wxEVT_ACTIVATE should be left for the
processing in the frame classes to let the default handling take place.
Vadim Zeitlin [Sun, 12 Feb 2012 22:19:04 +0000 (22:19 +0000)]
Implement wxDV_ROW_LINES for generic wxDataViewCtrl.
Provide wxDataViewCtrl::SetAlternateRowColour() to specify the colour to use
for odd rows explicitly but determine it automatically from the background
colour if no explicit colour was specified.
Vadim Zeitlin [Sat, 11 Feb 2012 16:26:47 +0000 (16:26 +0000)]
Update marks in non-current months shown in wxMSW wxCalendarCtrl.
Native wxMSW calendar control can show more than just the current month. When
other months are shown, ensure that they don't have marks for the days marked
in the current month as this doesn't make sense.
Vadim Zeitlin [Sat, 11 Feb 2012 16:26:41 +0000 (16:26 +0000)]
Set marks used in wxMSW wxCalendarCtrl unconditionally.
This fixes wrong display (random days could have been shown marked) when not
using wxCAL_SHOW_HOLIDAYS style. Apparently we need to set the marks
unconditionally as they are not turned off by default, so ensure we call
UpdateMarks() even without wxCAL_SHOW_HOLIDAYS.
Vadim Zeitlin [Fri, 10 Feb 2012 23:34:49 +0000 (23:34 +0000)]
Added a test for wxUSE_DATAOBJ to wxDFB which doesn't support it.
This is just one of many, many things not supported by wxDFB but check for at
least this one as it prevents even the precompiled header from being created.
Vadim Zeitlin [Fri, 10 Feb 2012 23:34:42 +0000 (23:34 +0000)]
Add stubs for wxNativeFontInfo::{Get,Set}Strikethrough() to wxGTK.
These functions are not implemented currently (just as their
{Get,Set}Underlined() counterparts) but should still be defined to allow the
code using wxNativeFontInfo to link.
Vadim Zeitlin [Fri, 10 Feb 2012 10:22:45 +0000 (10:22 +0000)]
Fix wxHash{Set,Map} compilation with g++ 4.7 in C++11 mode.
Fully qualify the hasher and comparator classes used with
WX_DECLARE_HASH_{SET,MAP} macros as they're used as base classes by the
standard library implementation in g++ 4.7 and using them without the scope
operator results in compilation errors because they're interpreted as being
(inaccessible) base classes and not the global ones.
Vadim Zeitlin [Wed, 8 Feb 2012 02:09:55 +0000 (02:09 +0000)]
Use wxSTC_INVALID_POSITION in wxStyledTextCtrl documentation.
Comments -- copied from the generated header file -- used INVALID_POSITION
which is not actually defined, replace it with wxSTC_INVALID_POSITION that is
defined.
Robin Dunn [Wed, 8 Feb 2012 00:20:38 +0000 (00:20 +0000)]
Following the theory that something lame is better than nothing at all, provide a very generic implementation of the ctor wxRegion::wxRegion(size_t n, const wxPoint *points, wxPolygonFillMode fillStyle) by drawing the polygon into a bitmap and using that to create the region.
Vadim Zeitlin [Tue, 7 Feb 2012 21:38:31 +0000 (21:38 +0000)]
Avoid CRT deprecation warnings for MSVC build using makefiles too.
Define _CRT_SECURE_NO_DEPRECATE, _CRT_NON_CONFORMING_SWPRINTFS and
_SCL_SECURE_NO_WARNINGS when using makefiles to build the library too for
consistency with the project files.
These defines are only needed for VC8 and later but should do no harm for the
previous versions.
Vadim Zeitlin [Tue, 7 Feb 2012 21:38:09 +0000 (21:38 +0000)]
Rebake all project files to reflect MSVC deprecation warnings defines.
Rebake all the projects after the changes of r70182, even if they're only
really needed for the library itself, the other project files should
correspond to the bakefiles contents too.
Vadim Zeitlin [Tue, 7 Feb 2012 13:02:32 +0000 (13:02 +0000)]
Fix infinite loop in wxHtmlEasyPrinting page break code.
The code didn't handle cells higher than the page height correctly and entered
an infinite loop when trying to adjust page breaks in their presence, e.g.
when trying to print a very tall image.
Vadim Zeitlin [Mon, 6 Feb 2012 13:28:34 +0000 (13:28 +0000)]
Fix handling of positional parameters in wxPrintf() and related.
Handle positional parameter specifications in wxFormatConverter to ensure that
e.g. "%N$s" are correctly transformed to "%N$S" if needed. This fixes the use
of positional parameters under OS X.
Vadim Zeitlin [Sun, 5 Feb 2012 15:45:03 +0000 (15:45 +0000)]
Don't set PAGESETUPDLG::hDevNames and hDevMode when using PSD_RETURNDEFAULT.
If the page setup dialog is used to retrieve the default information, hDevMode
and hDevNames fields must not be set, otherwise PageSetupDlg() function simply
fails because of incorrect parameters passed to it.
Vadim Zeitlin [Sun, 5 Feb 2012 14:18:37 +0000 (14:18 +0000)]
Fix huge performance problem in wxStdInputStream when using MSVC8/9.
Our overridden xsgetn() method was never called when using these compilers
because they used their own, non-standard, _Xsgetn_s() instead. Because of
this the stream was always read character by character which was very
inefficient.
Fix the problem by overriding _Xsgetn_s() for these compilers and explicitly
forwarding it to xsgetn().
Vadim Zeitlin [Sun, 5 Feb 2012 14:18:33 +0000 (14:18 +0000)]
Take void** client data in wxSingleChoiceDialog ctor and not char**.
The client data is supposed to be untyped, there is really no reason (other
than compatibility with C conventions of 40 years ago) to use char** here.
So don't do it and provide the versions taking "void**" keeping "char**" ones
for backwards compatibility only.
Also deprecate GetSelectionClientData() that returned char* and add a new
GetSelectionData() returning void* instead.
Vadim Zeitlin [Sun, 5 Feb 2012 14:18:28 +0000 (14:18 +0000)]
Preserve focus when window is minimized and restored in wxMSW.
Add specific code to save and restore the focus when the window is minimized
and restored in wxMSW as the existing code in WM_ACTIVATE handler wasn't
enough because this event was generated too late when minimizing the window
(when it was already minimized and so the focus had been already lost) and too
early when restoring it (so the window was still minimized and restoring focus
failed).
This is still not perfect as we do in our code something Windows would be
expected to do automatically but for whatever reason, it doesn't do it for
wxWidgets programs, and this manual workaround at least prevents the annoying
total focus loss.
Vadim Zeitlin [Sun, 5 Feb 2012 14:18:25 +0000 (14:18 +0000)]
Ensure that the progress dialog parent is activated at the end under MSW.
The progress dialog parent was supposed to become the new foreground window
when the progress dialog was closed, but this didn't happen because
m_parentTop was never set when the native progress dialog implementation was
used under MSW. Fix this by explicitly calling the new SetTopParent() from its
ctor.
Vadim Zeitlin [Sun, 5 Feb 2012 01:20:03 +0000 (01:20 +0000)]
Fix initial state of radio toolbar tools in wxGTK.
The last radio group item was initially checked under wxGTK instead of the
first one, as under the other platforms. Fix this by correcting the check for
the first radio group item which was inversed in wxToolBar::DoInsertTool().
Vadim Zeitlin [Sun, 5 Feb 2012 01:20:00 +0000 (01:20 +0000)]
Never refresh controls from EVT_PAINT handler in wxPropertyGrid.
Refreshing the controls after finishing repainting the grid results in an
infinite stream of paint events, so don't do this, especially as this doesn't
seem to have any bad consequences under wxGTK which was the only major
platform where this behaviour was enabled.
Also rename wxPG_REFRESH_CONTROLS_AFTER_REPAINT to just wxPG_REFRESH_CONTROLS
and keep the control refreshing code for wxGTK only in a couple of places
outside of EVT_PAINT handler to be on the safe side.
Vadim Zeitlin [Fri, 3 Feb 2012 17:27:21 +0000 (17:27 +0000)]
Check string length correctly in wxFileSystem::URLToFileName().
Check that the string is long enough before accessing its first and second
characters to fix a crash when an empty or one-character string was passed to
wxFileSystem::URLToFileName().
Vadim Zeitlin [Fri, 3 Feb 2012 17:27:13 +0000 (17:27 +0000)]
Fix speed regression in wxFileHistory::AddFileToHistory().
Avoid full normalization including wxPATH_NORM_LONG when adding files to
wxFileHistory as this can take a very long time when using network paths under
Windows.
Vadim Zeitlin [Fri, 3 Feb 2012 00:21:45 +0000 (00:21 +0000)]
Fix bug with mouse wheel scrolling wxStyledTextCtrl in long running programs.
In long running programs the wxEvent time stamp could wrap around resulting in
all mouse wheel events being ignored in wxStyledTextCtrl as the comparison of
the (positive) time until which all the subsequent events were supposed to be
blocked and the (now negative) current event time stamp would be always false.
Fix this by using wxStopWatch::TimeInMicro() to avoid wraparound instead of
wxEvent::GetTimestamp().
Also rename the variable to have a more clear name as the original code wasn't
easy to understand.
Steve Lamerton [Thu, 2 Feb 2012 20:32:08 +0000 (20:32 +0000)]
Disable navigation sounds in wxWebViewIE. This brings the backend into line with the other backends. Also add a general method for changing INTERNETFEATURELIST settings.