Commit Graph

58531 Commits

Author SHA1 Message Date
Vadim Zeitlin
e532b3f234 Fix harmless warning about using wxCONTROL_CHECKED in ternary operator.
Add wxCONTROL_NONE which is just a symbolic name for 0 and use it in the code
to avoid g++ 4.8 warnings about mixing enum and int in conditional expression.

Closes #16242.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76484 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-08 14:43:27 +00:00
Vadim Zeitlin
9ccfe76e43 Compilation fix for PCH-less build of wxMSW.
Include wx/msw/ownerdrawnbutton.h usually included via wx/checkbox.h from the
PCH.

Closes #16241.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76483 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-08 14:43:21 +00:00
Vadim Zeitlin
baf28b5fe3 Make wxGetPangoContext() work even without open display.
Use default Pango font map if we don't have any default screen in wxGTK.

Closes #16240.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76482 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-07 15:24:50 +00:00
Vadim Zeitlin
c294ad284c Add missing "inline" to std::swap() specialization for wxUniCharRef.
Avoid multiple definitions of this function.

See #16234.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76481 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-07 13:43:14 +00:00
Vadim Zeitlin
f8fb172d64 Remove non-existent wx/ownerdrawnbutton.h from MSVS projects.
This resulted in constant spurious rebuilds as this file doesn't exist, only
wx/msw/ownerdrawnbutton.h does.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76480 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-07 13:10:32 +00:00
Vadim Zeitlin
dc83267cbe Put files in the correct groups in MSVS manually maintained projects.
Don't show textmeasurecmn.cpp, textmeasure.cpp and xmlreshandler.cpp at the
top project level.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-07 13:10:29 +00:00
Vadim Zeitlin
be00806392 Fix harmless C4275 MSVC warning in wxMSW DLL builds.
Since the addition of wxMSWOwnerDrawnButton, DLL builds started generated a
lot of warnings about using this non DLL-exported class as base class for the
DLL-exported wxCheckBox and wxRadioButton.

Simply suppress these warnings as they are harmless in this case because the
base class has no static data, which is the real problem this warning hints at.

Closes #16237.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76478 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-07 13:10:17 +00:00
Vadim Zeitlin
3fd098960f Add LexRust.cxx to manually generated MSVS project files.
This should have been part of r76121, see #15742.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76477 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-07 13:10:12 +00:00
Vadim Zeitlin
84a934b456 Remove DebugInformationFormat options from MSVC 10+ projects.
This option is common to all projects and is defined in the global properties
file, so it doesn't need to be present in the projects themselves at all.

See #16236.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76476 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-07 13:10:06 +00:00
Vadim Zeitlin
4386f20f4f Generate debug information for all MSVC builds.
We want to have debug information even for the release builds as it doesn't
affect the binaries produced but greatly helps when debugging, so create PDB
for all release builds as well in the manually maintained MSVS files (this was
already the case for Win32 release builds but not x64 ones for some reason).

This also fixes the problem with "None" being an invalid value for
DebugInformationFormat with MSVC 10 as a side effect.

Closes #16236.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76475 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-07 13:09:55 +00:00
Vadim Zeitlin
b445166012 Define std::swap() correctly for wxUniCharRef.
The default implementation doesn't work for this reference-like class, and
this breaks not only swap() itself (see #14694), but also any algorithms using
it, such as std::reverse().

Fix this by providing our own specialization which does work correctly.

Closes #16234.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-07 13:09:40 +00:00
Vadim Zeitlin
5b56498f88 Allow using sizers for laying out wxMDIClientWindow in wxMSW.
Let the user code put wxMDIParentFrame::GetClientWindow() into a sizer and
manage it as any other window, instead of having to do it manually.

Closes #16196.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-06 18:20:38 +00:00
Vadim Zeitlin
3f7086de4c Minor documentation corrections.
Escape the space after "i.e." (or avoid using it altogether), add missing @ref.

Closes #16235.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76472 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-06 18:16:29 +00:00
Paul Cornett
6fc2e956cf Always check for wide char IO functions, they are used regardless of wxUSE_UNICODE setting
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-06 16:34:47 +00:00
Stefan Csomor
9a44838055 using the base class wxHAS_NATIVE_ENABLED_MANAGEMENT in cocoa disabling/enabling child windows, fixes #16232, fixes #15495
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-06 15:49:15 +00:00
Vadim Zeitlin
0a3329546b Add wx/msw/ownerdrawnbutton.h to {make,project} files.
In particular, ensure that it's installed when using configure+make.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76467 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-06 11:44:14 +00:00
Vadim Zeitlin
dd59bdf40b Define BS_TYPEMASK for the compilers which don't have it.
Fixes compilation with MinGW after wxMSWOwnerDrawnButton introduction.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-06 11:44:07 +00:00
Paul Cornett
a0f10ec1d6 Implement access to a global toplevel GdkWindow in a way that does not require always having an extra GtkWindow.
And don't use "RootWindow" in the name, it is not a root window in the X11 sense.
Also add wxGetPangoContext() to get access to a PangoContext.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-05 15:53:27 +00:00
Vadim Zeitlin
70387b4857 Fix wxMSW owner drawn buttons appearance in "selected" state.
Draw the buttons (i.e. checkboxes and radio buttons) correctly when the space
key is pressed.

See #10137.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76464 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-05 14:47:45 +00:00
Vadim Zeitlin
06292da40f Add a TODO comment to wxGTK wxToolBar::FindToolForPosition().
Replace the out of date comment saying that GTK+ doesn't have a function to do
this with a TODO comment mentioning the name of the function which should be
used here.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76463 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-05 14:42:40 +00:00
Vadim Zeitlin
8a245f0ec3 Fix handling of multiple and rectangular selections in wxSTC.
Copy and paste rectangular selections in the standard format, this is
especially important under Windows where a (de facto) standard clipboard
format for such selections exists.

Also fix handling of multipaste, i.e. pasting clipboard contents into several
locations at once.

Closes #16221.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76462 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-05 14:42:35 +00:00
Vadim Zeitlin
cd4c928d9a Show Scintilla multiple selections and multipaste features in the sample.
Add menu items to toggle multiple selections and multipaste support in wxSTC.

See #16221.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76461 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-05 14:42:29 +00:00
Vadim Zeitlin
29ff6f3e3b Fix resetting owner drawn radio buttons to normal state.
Ensure that we bring the native button in sync with the real state of the
radio button when we switch to normal state.

Also avoid using BM_GETCHECK for the owner drawn buttons as we don't use
BM_SETCHECK for them (as it's useless).

See #10137.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76460 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-04 22:13:39 +00:00
Vadim Zeitlin
cc73050b73 Factor out common owner drawn code from wx{Check,Radio}Box.
Create wxMSWOwnerDrawnButton class which contains all of this code.

Currently the methods of this class are (still) implemented in
src/msw/control.cpp.

See #10137.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-04 22:13:28 +00:00
Vadim Zeitlin
f1be272d32 Fix pressed owner-drawn checkbox appearance in wxMSW.
Handle the "pressed" state correctly in wxCheckBox::MSWOnDraw().

See #10137.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-04 22:13:22 +00:00
Vadim Zeitlin
81b931f8d1 Fix the size of owner-drawn checkbox and radiobuttons under Vista and later.
The size of the native buttons has changed between XP and Vista, so add
version check to draw the buttons of correct size under all Windows versions.

See #10137.

REBASE: squash with aa5d7c5 Fix the size of owner-drawn check and radio boxes under Vista and later.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76457 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-04 22:13:17 +00:00
Vadim Zeitlin
fd65d4b4f5 Implement setting foreground colour for wxRadioButton in wxMSW.
Native radio buttons don't support changing their foreground colour, so use
owner drawn buttons if SetForegroundColour() was called, similarly to what was
already done for wxCheckBox.

Closes #10137.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-04 22:13:12 +00:00
Vadim Zeitlin
3fc6738025 Refactor owner drawn buttons drawing code in wxMSW.
Move it from wxCheckBox to wxControl to allow reusing this code in other
classes, notably wxRadioButton in the upcoming commits.

See #10137.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-04 22:13:07 +00:00
Vadim Zeitlin
34d3e680c8 Use wxArrayInt methods instead of duplicating them.
Just use wxArrayInt::Index() instead of doing a linear search in the array
manually. Also use RemoveAt() + Insert() instead of manually iterating over
the items.

See #16110.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-04 22:13:02 +00:00
Vadim Zeitlin
c03557f0be Fix position of the column after drag-move operation in wxGrid.
Fix the logic for finding the correct position to drop the column at when
ending a drag move operation. The old code dropped it one position too far to
the left when it was dropped on the "far" (i.e. right with LTR layout) part of
the target column.

See #16110.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76453 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-04 22:12:57 +00:00
Vadim Zeitlin
50fe1fadc2 Fix changing column order in wxGrid when some columns are hidden.
Using negative column widths used for hidden columns when updating the column
positions after dragging one of them to a new position totally broke their
display. Fix this by ignoring the hidden columns.

Closes #16110.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76452 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-04 22:12:47 +00:00
Vadim Zeitlin
2e8988c3d6 Add wxGridCellRenderer::GetBest{Height,Width}() and use them in wxGrid.
Allow the renderer to specify the best height at the given width (or vice
versa) instead of the best size in both direction which is not defined for
e.g. wxGridCellAutoWrapStringRenderer.

Closes #15943.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-04 22:12:42 +00:00
Vadim Zeitlin
02f5b809bd Document restrictions on icon names in the resources in wxMSW.
Make it more clear that application icon must precede "wx" in alphabetical
order.

Closes #3529.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-04 22:12:36 +00:00
Vadim Zeitlin
07427c4fbd Fix busy cursor handling in modal dialogs under MSW.
Modal dialogs shown during wxBusyCursor effect shouldn't show the busy cursor
as they do accept input, but did in wxMSW (as could be seen in e.g. the
widgets sample after enabling the "Global busy cursor" in the menu and showing
the text entry dialog via "Text|Set Help Hint").

Fix this by explicitly checking for the special case of having a modal dialog
as parent at wxWindow level as doing it in wxDialog simply didn't work as its
WM_SETCURSOR handler wasn't called at all for determining the cursor to use
for its children because they handled WM_SETCURSOR themselves in the global
busy state, without letting DefWindowProc(), which propagates this message
upwards the window hierarchy, to have it at all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-04 22:12:32 +00:00
Vadim Zeitlin
e3979f5186 Bring MSVS 2010 projects in line with 2011 and 2012 ones.
The new projects are easier to customize as the build options can now be
specified in wx_vc10_local.props file. They also have correct dependencies and
avoid sharing violations when copying wx/setup.h.

Finally, they also use the correct names for the webview DLL, see #15820.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76448 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-04 22:12:27 +00:00
Vadim Zeitlin
51871b7b5a Reset icon ref count when deleting the icon in wxMSW balloon icons code.
This avoids the assert which happened when trying to show the next
notification message in SetUpIcon() as the icon was null while the reference
count was positive.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76447 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-04 22:12:05 +00:00
Paul Cornett
1be1f56be1 vswscanf is needed regardless of wxUSE_UNICODE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76442 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-03 16:44:14 +00:00
Paul Cornett
2eb7668968 build fix for systems lacking vswscanf when wxUSE_UNICODE==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76441 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-03 16:31:41 +00:00
Julian Smart
5b8e5e81b6 Implemented keyboard selection and better cell navigation for tables
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76440 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-03 13:07:16 +00:00
Vadim Zeitlin
6b12d12fe9 Fix property sheets names in MSVS 2013 custom build project.
It must be vc12, not vc11.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-02 14:19:59 +00:00
Vadim Zeitlin
0a62ce8c8e Add dependency of wxregex on wx/setup.h in MSVS projects.
Modified regex library code uses wx headers, so build _custom_build project
creating wx/setup.h before it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76438 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-02 14:19:56 +00:00
Vadim Zeitlin
eeccbf98f4 Don't crash when dismissing expanded ribbon panel.
The parent of wxRibbonPanel is not always a wxRibbonPage, it can also be the
containing wxFrame itself if the panel is a temporarily expanded one created
when the user clicks a panel reduced to a button. So don't rely on the cast of
the parent to wxRibbonPage to always work. This is ugly but at least avoids a
crash.

Closes #16215.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76437 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-02 14:19:48 +00:00
Paul Cornett
605e637f47 send changed event when selecting a special directory from wxDirPickerCtrl combobox
closes #16064


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-01 16:57:50 +00:00
Paul Cornett
8b93b050cf avoid referencing xml and html libs when they are not enabled
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-30 17:08:50 +00:00
Vadim Zeitlin
2fbda42aed Fix wxGetClientDisplayRect() when _NET_WORKAREA is not supported.
Don't intersect the total rectangle with the uninitialized work area one
resulting in an empty rectangle being returned from wxGetClientDisplayRect()
if X11 server doesn't support _NET_WORKAREA (this is the case for at least
Cygwin X11 server).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-30 14:11:01 +00:00
Stefan Csomor
617e17b746 supporting alpha channel correctly from clipboard, closes #16198
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76431 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-30 06:59:42 +00:00
Vadim Zeitlin
570926f0d7 Use SetInitialSize() in the about wxHTML sample.
SetSize() is useless here as it is simply ignored by the sizer which will fit
the window to its initial size anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76430 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-29 20:35:40 +00:00
Stefan Csomor
012ccdf8a5 adding support for multi-line text in rotated text, fixes #16216
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-29 18:22:54 +00:00
Stefan Csomor
337454f387 fix memory leak for initial empty menubar, see #15666
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76426 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-29 14:18:30 +00:00
Vadim Zeitlin
59e5a48141 Recognize Intel compiler as MSVC one under Windows in the build options.
The two compilers are binary compatible and by pretending that Intel compiler
is the same as MSVC, we allow using ICC to build applications using DLLs built
with MSVC.

Closes #9437.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76425 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-29 10:59:59 +00:00