Commit Graph

15647 Commits

Author SHA1 Message Date
Vadim Zeitlin
1bc5ddea15 Fix link errors with VC 11 in DLL STL build.
Don't declare wxWindowList as DLL-exported. It's unnecessary and appears to
create problems for VC 11.

Closes #14741.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-10 00:53:42 +00:00
Vadim Zeitlin
4ca30c7d65 Simplify wxEVT_PAINT handling in wxScrollHelperBase.
Just always call the virtual OnDraw() if wxEVT_PAINT wasn't handled. This is
much simpler than connecting our own special handler just to set a flag saying
whether the event was processed which was very complicated and didn't work
anyhow for the statically connected wxEVT_PAINT handlers.

See #14757.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-10 00:53:17 +00:00
Vadim Zeitlin
ddc8faa9e1 Cache HDC used for painting for the entire duration of WM_PAINT processing.
This fixes a long standing problem with 2 wxPaintDC created one after another
(and not with nested lifetimes, which was handled by the caching mechanism
previously used) not working correctly. And as this was exactly what happened
when handling wxEVT_PAINT for wxScrolled, it also fixes drawing artefacts when
using scrolled windows.

Closes #14757.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-10 00:52:54 +00:00
Vadim Zeitlin
7a78a93782 Add wxControl::GetSizeFromTextSize() to size the control to its text.
This function can be used to size a, say, wxTextCtrl to be exactly of the size
needed to enter the given amount of text in it.

This patch adds wxGTK implementation for wxTextCtrl, wxChoice and wxCombobox;
changes to the samples and the documentation.

Closes #14812.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-09 21:11:37 +00:00
Paul Cornett
c0a2b7180e don't assign NULL to wxUIntPtr, wxUIntPtr is not a pointer, closes #14811
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-08 17:47:16 +00:00
Stefan Csomor
2ab3802522 support for freeze and thaw under cocoa
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72924 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-08 15:46:23 +00:00
Vadim Zeitlin
346634a0d3 No changes, just remove unnecessary forward declarations.
wxToggleBitmapButton doesn't exist any more, don't forward declare it.

wxToggleButton does exist but is (fully) declared just below, so don't forward
declare it neither.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72923 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-08 14:20:53 +00:00
Vadim Zeitlin
6b0dfbca1d Keep item data in sync with their position in wxEditableListBox.
When swapping the items, we also need to swap their client data and not just
their labels.

Closes #14800.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72916 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-06 23:56:44 +00:00
Vadim Zeitlin
873271f05e Use wxAUI_TB_DEFAULT_STYLE instead of 0 as default style value.
No real changes.

See #14794.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72913 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-06 23:54:25 +00:00
Stefan Csomor
0b7a7b8cd6 fixing compile for ios
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-06 06:35:29 +00:00
Vadim Zeitlin
ce63f2e9eb Make hack for button creation in wxOSX more robust.
Don't crash when creating a plain wxButton with wxBU_NOTEXT style. This
happened because we skipped creating the peer (real implementation) in this
case entirely on the assumption that we were creating a wxBitmapButton, but
this is not necessarily the case. So now test that the creation of the peer is
really disabled before skipping it (this required adding ShouldCreatePeer()
accessor).

Merging wxWidgetImpl::CreateButton() and CreateBitmapButton() (and the same
thing for toggle buttons) would still be a better solution but while it's
trivial to do for Cocoa, it isn't for Carbon. And we can't use a single
function for Cocoa but different functions for Carbon, so for now just
continue to use this hack.

Closes #13622.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-04 23:54:37 +00:00
Vadim Zeitlin
4ccde09b18 Add wxCFStringRef::AsStringWithNormalizationFormC() Cocoa overload.
Provide an overload taking NSString and casting it to CFStringRef, just as for
AsStringWithNormalizationFormC().

See #13504.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72894 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-04 23:53:52 +00:00
Vadim Zeitlin
cabc71dee3 Update the button bezel to account for multi-line labels in wxOSX.
If a button was created using a normal single-line label (including empty one)
and then its label was changed to something multi-line later, its size stayed
wrong in wxOSX as it still used the fixed size bezel used by normal buttons.

Adjust the bezel after each bezel change now to update the size of the button
if necessary.

Closes #12491.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-04 23:50:50 +00:00
Vadim Zeitlin
5af80d3112 No changes, just rename OSXSetAcceleratorFromLabel().
Make the name of the function more general and call it
OSXUpdateAfterLabelChange() as it's supposed to be called whenever the label
changes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-04 23:50:28 +00:00
Paul Cornett
80a77e3c73 fix setting background color in wxGTK3 with themes which use background images or gradients, fixes #14759
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72881 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-04 17:39:55 +00:00
Stefan Csomor
2ab6738554 missing commit, fixes #14797
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72865 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-02 17:02:15 +00:00
Stefan Csomor
a1b719bc74 exposing common used button impl class
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72860 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-02 10:06:06 +00:00
Václav Slavík
e08d449f2e wxCALL_FOR_EACH compilation fix for VC++.
VC++ has a bug where __VA_ARGS__ is incorrectly expanded as a single
token, contrary to C99. The solution is to pass the arguments to another
macro as a single token inside parenthesis.

See http://stackoverflow.com/questions/9183993/msvc-variadic-macro-expansion
for the gory details.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-01 18:25:07 +00:00
Václav Slavík
9e0959cda4 Compilation fix for PCH-less build.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-01 18:25:00 +00:00
Vadim Zeitlin
7eb0acefc2 Refactor and simplify wxChoice::DoGetBestSize().
Use wxTextMeasure instead of duplicating its code and also reuse the code
between different ports.

Closes #14706.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-01 17:15:28 +00:00
Vadim Zeitlin
c236dbaed2 Invalidate best size of wxOSX wxChoice after its number of items changes.
This fixes the calculation of the initial best size as previously the default
value was not updated even if longer strings were added later.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72847 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-01 17:15:25 +00:00
Vadim Zeitlin
c94c3a77b8 Allow creating wxTextMeasure without specifying the font.
Use the default window/DC font by default as this is the most common case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-01 17:15:22 +00:00
Vadim Zeitlin
e0da9e871a Allow constructing wxGTK wxTextMeasure with NULL font.
The font is explicitly documented as being possibly NULL in the base class and
wxMSW handles NULL font just fine, so also handle it in the GTK version.

See #14706.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-01 17:15:15 +00:00
Vadim Zeitlin
84605707d1 Added wxEVT_COMMAND_DIRCTRL_CHANGED for wxDirCtrl selection changes.
This makes it much simpler to react to the changes in the control, update the
sample to show it.

Closes #14792.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-01 17:15:08 +00:00
Vadim Zeitlin
0d6f66f45c No changes, just some cleanup in wxGenericDirCtrl code.
Use GetItemData() helper to only write a cast to wxDirItemData in this
function instead of repeating it many times.

See #14790.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72841 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-01 17:15:03 +00:00
Václav Slavík
643e9cf9f6 Add wxTEST_DIALOG for testing of modal dialogs.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-01 16:45:11 +00:00
Václav Slavík
a4d982a7cf Add wxCALL_FOR_EACH() macro.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72836 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-01 16:45:01 +00:00
Vadim Zeitlin
d8986023a3 Define wxSOCKET_XXX flags as wxSOCKET_XXX_READ|wxSOCKET_XXX_WRITE.
The recently introduced (in r72591) wxSOCKET_{WAITALL,NOWAIT}_{READ,WRITE}
flags weere for some reason completely different and unrelated to the existing
bidirectional wxSOCKET_{WAITALL,NOWAIT} ones. Change this by defining the
bidirectional version simply as the sum of the two others. This makes much
more sense than testing for either wxSOCKET_XXX or wxSOCKET_XXX_READ or
wxSOCKET_XXX_WRITE being specified.

And it also fixes an assert in wxSocketWaitModeChanger where a sanity check
failed when this class was used with wxSOCKET_WAITALL|wxSOCKET_WAITALL_READ.

See #14506.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-31 00:17:17 +00:00
Vadim Zeitlin
e3f084fd47 Add wxDirCtrl::GetPath().
This allows to retrieve the directory being affected by wxTreeCtrl event.

Closes #14790.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-29 18:30:10 +00:00
Vadim Zeitlin
a69b365fbb Get rid of wxAuiToolBar::m_style and just use base class m_windowStyle.
This fixes an assert exposed by the addition of wxAuiToolBar::Create() in
r72785: as m_style was not initialized before, calling GetWindowStyle() from
wxControl::Create() returned wrong flags.

Fix this by just removing m_style completely, there doesn't seem to be any
need for it nor for overriding GetWindowStyleFlag().

See #13520.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-29 14:50:42 +00:00
Vadim Zeitlin
95c854dfc1 No changes, just avoid code duplication in wxOSX wxDirDialog.
Factor our common parts of wxDirDialog::ShowModal() and ShowWindowModal() in
OSXCreatePanel() helper.

Also some minor cosmetic changes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72814 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-29 01:20:26 +00:00
Vadim Zeitlin
0c1182328f Don't return "void" to fix MSVC6 compilation.
VC6 doesn't support returning void "value".

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-28 13:31:50 +00:00
Vadim Zeitlin
0afa3752f6 Implement support for button mnemonics in wxOSX/Cocoa.
Set the mnemonic as "key equivalent".

Closes #12917.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72809 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-28 01:08:32 +00:00
Vadim Zeitlin
79275a0dae Another attempt to fix wxTextMeasure compilation with VC6.
Simply make the methods accessed by the nested class public.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72803 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-27 12:28:04 +00:00
Vadim Zeitlin
a9f1207c1b Allow using wxTextMeasure::GetLargestStringExtent() with wxArrayString.
Change the signature of this method to take the number of strings and the
pointer to the first of them instead of wxVector<wxString> as this allows it
to be used with all of wxVector<wxString>, wxArrayString and raw arrays of
wxStrings.

Also return the computed size from it instead of filling output parameters.

Closes #14781.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-27 12:28:00 +00:00
Vadim Zeitlin
1bce253a23 Allow wxTextMeasure to work with non-native wxDC objects too.
Just forward back to wxDC itself in this case instead of using the
platform-specific code in wxTextMeasure that only works with native DCs.

See #14781.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72801 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-27 12:27:56 +00:00
Vadim Zeitlin
c70155b8ee Just fix header comments of wxTextMeasure-related files, no real changes.
See #14781.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72799 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-27 12:27:48 +00:00
Robin Dunn
6d7b19b013 Generate the interface file for STC from gen_iface too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72787 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-27 03:15:08 +00:00
Vadim Zeitlin
46e6720278 Add wxAuiToolBar::Create().
Implement two-step creation of wxAuiToolBar to allow doing it from XRC.

See #13520.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72785 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-27 01:27:19 +00:00
Vadim Zeitlin
65b139c8d1 Fix PCH-less build after previous commit.
Need to include wx/window.h now that wx/animate.h is not included any more.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72783 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-27 01:27:13 +00:00
Vadim Zeitlin
bdb4b8320d Break implicit dependency of "core" on "adv" via wxXmlResourceHandlerImplBase.
wxXmlResourceHandlerImplBase::GetAnimation() returned wxAnimation by value
which created references to wxAnimationCtrlNameStr and wxNullAnimation
symbols, defined in the "adv" library, in "core" when using Sun CC even though
they were not referenced directly.

Fix this by returning wxAnimation by pointer to keep it opaque for "core" code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72782 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-27 00:46:58 +00:00
Vadim Zeitlin
5a7c1881a1 Store the selected directory in wxGTK wxDirDialog.
This should help with the selected directory not being remembered since
GTK+ 2.24.11 as apparently gtk_file_chooser_get_filename() doesn't work any
more now after hiding the dialog -- so call it before doing this and save the
result.

Also get rid of the ugly and apparently completely unnecessary OnFakeOk().

Closes #14525.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72779 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-25 23:26:36 +00:00
Vadim Zeitlin
58263bb4c3 Make wxFILE_EXISTS_SYMLINK work on its own, without wxFILE_EXISTS_NO_FOLLOW.
Include the wxFILE_EXISTS_NO_FOLLOW bit in wxFILE_EXISTS_SYMLINK definition to
allow using just wxFileName::Exists(wxFILE_EXISTS_SYMLINK) which used to never
work because the link was followed.

Closes #14777.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-25 22:30:43 +00:00
Vadim Zeitlin
df27f1dc9e Include wx/xml/xml.h from the XRC handlers that need it.
Including this header from wx/xrc/xmlres.h itself only when WXMAKINGDLL_XRC is
defined doesn't work when we're building a static library and not a shared/DLL
one and we don't have any symbol defined in this case, so just don't try to be
smart and include this header from the files that need it.

This fixes breakage of r72756.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72776 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-25 22:19:20 +00:00
Vadim Zeitlin
614e38dbb2 Implement clipping in wxSVGFileDC.
Support setting the clipping region and add update the documentation and the
sample accordingly.

Closes #14462.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72762 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-24 23:40:41 +00:00
Vadim Zeitlin
19f87dbe25 Try to avoid accidental use of wxXmlNode in XRC handlers.
Now that the handlers can be defined outside of the XRC library, we can't use
wxXmlNode in them because this would create an (unsatisfied) link dependency
on the xml library.

To avoid this happening accidentally, don't include wx/xml/xml.h from the XRC
header, unless building the xrc library itself.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-24 18:34:19 +00:00
Vadim Zeitlin
d2a02746c6 Make wxDateTime invalid after Set((time_t)-1) call.
Closes #14776.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72750 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-24 14:02:30 +00:00
Vadim Zeitlin
2ff86a86a7 Add wxVector::assign().
Closes #14703.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-24 14:01:44 +00:00
Vadim Zeitlin
8f6bb2602b Disable wxEvtHandler::CallAfter() for VC6, it's too broken for it.
There is no clear way to implement wxRemoveRef() for VC6 so just disable it,
and CallAfter() as it relies on it, for this compiler.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-24 00:17:15 +00:00
Vadim Zeitlin
c55f46d0a1 Add wxDIR_NO_FOLLOW flag for wxDir iteration.
This flag allows to avoid following the symbolic links during the directory
traversal. In particular, this means that links to the directories
(potentially outside the directory being traversed) are not considered as
directories at all when it is used, potentially avoiding surprises.

Closes #14542.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-23 23:57:32 +00:00
Paul Cornett
856cad9ac7 Minor changes to some comments
remove ambiguous "only"
procession --> processing


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-23 17:28:43 +00:00
Vadim Zeitlin
74a59798c0 Add support for wxRibbonBar and related controls to XRC.
Add wxRibbonXmlHandler and an example of using it to the xrc sample.

Closes #12058.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-23 13:52:27 +00:00
Vadim Zeitlin
00b4e7c946 Add support for wxAuiNotebook to XRC.
Add wxAuiNotebookXmlHandler to "aui" library, now that we can do it without
adding a dependency of it on "xrc" one.

Closes #10889.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-23 13:51:58 +00:00
Vadim Zeitlin
a3b9c43bbc Refactor wxXRC to allow defining handlers outside of xrc library.
Split wxXmlResourceHandler into an ABC and the real implementation to allow
referencing the ABC in the core library itself but without pulling in all of
the XRC into it. This also allows defining XRC handlers, which only depend on
this ABC and not the xrc library, in other libraries, such as richtext, as
demonstrated by the now enabled wxRichTextXMLHandler.

Closes #10996.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-23 13:51:32 +00:00
Vadim Zeitlin
4dca3e02a6 Define WXDLLIMPEXP_FWD_RIBBON for consistency with all the other libraries.
We defined only WXDLLIMPEXP_RIBBON but not the FWD version, do add it now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72726 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-23 13:51:06 +00:00
Vadim Zeitlin
cf2227623a Add wxEvtHandler::CallAfter() for asynchronous method calls.
Add wxAsyncMethodCallEvent that is handled simply by calling the method this
event was created for and add default handler for this event to wxEvtHandler.

Implement CallAfter() overloads for up to 2 parameters only for now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-23 12:02:24 +00:00
Vadim Zeitlin
32753ae949 Add wx/meta/removeref.h header defining wxRemoveRef<> helper.
This is a very simple template allowing to remove the reference from the given
type, similar to std::remove_reference<>.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72721 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-23 12:02:00 +00:00
Vadim Zeitlin
1e30d94eff Fix border size computation in wxAuiTabArt.
Space was reserved for the borders even when it wasn't filled, resulting in
visual artefacts. Fix this by virtualizing the function returning the
additional space needed for the borders and only overriding it to return non
zero in wxAuiGtkTabArt.

Closes #14710.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-22 21:46:46 +00:00
Steve Lamerton
8626e0b73d Explicitly unregister custom wxWebViewIE namespaces when we are done with them. Also add a missing ClassFactory::AddRef.
Closes #14749

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72715 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-21 20:33:48 +00:00
Vadim Zeitlin
5a3eee0dba Allow specifying all wxFlexGridSizer parameters in XRC.
Add support for specifying flexible direction, grow mode in non-flexible
direction and row/column proportions for the growable ones.

Closes #14767.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-19 22:03:25 +00:00
Vadim Zeitlin
c50db84779 Allow testing for existence of specific file types in wxFileName.
Add "flags" parameter to wxFileName::Exists() to allow testing for the
existing of files of specific type: not only regular or directory but also
symlink, device, FIFO or socket.

And also to pass wxFILE_EXISTS_NO_FOLLOW flag inhibiting following the
symlinks without using DontFollowLink().

Closes #14542.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72707 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-19 22:02:15 +00:00
Vadim Zeitlin
b93bc51ed9 Declare MeasuringGuard as friend in wxTextMeasureBase.
This should hopefully fix VC6 compilation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-19 10:43:20 +00:00
Vadim Zeitlin
8cd79b7af0 Factor out text measurement from wxDC and wxWindow into wxTextMeasure.
Add a new private wxTextMeasure class implementing methods for measuring text
and move the often duplicated (but not always identically) code for doing the
same from wxDC and wxWindow into it.

Currently this class is only really implemented in wxMSW and wxGTK.

Also extend the test for text measuring functions and rename it to
MeasuringTextTestCase from MeasuringContextTestCase as it's not wxGC-specific
any more.

Closes #14705.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72699 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-17 22:35:49 +00:00
Vadim Zeitlin
ccc040255c Fix wxGrid editors background painting.
There were two fundamental problems: first, we painted on a separately created
wxClientDC instead of using the wxPaintDC already available in wxGrid. Second,
we invalidated the control while painting, resulting in endless repainting, at
least under wxGTK.

Fix the first problem by passing wxDC to wxGridCellEditor::PaintBackground()
and the second one by not refreshing the control from there as it just seems
unnecessary.

Also pass the attribute by reference for consistency with
wxGridCellRenderer::Draw() and because this pointer can never be NULL.

Closes #2628.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72697 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-17 16:44:02 +00:00
Paul Cornett
8ab7533289 Disconnect all GTK signals referencing a wx object which is being destructed
or which is destroying the associated GTK object


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72696 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-17 16:23:18 +00:00
Vadim Zeitlin
5475b39f53 Make wxFindReplaceData accessors const.
Closes #14755.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72695 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-17 15:45:20 +00:00
Vadim Zeitlin
685d0d734b Add wxEvent::GetEventUserData() and improve user data documentation.
Provide a public and documented accessor for wxEvent::m_callbackUserData.

Also document better the user data semantics and how it can be used.

Closes #14748.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-16 22:28:43 +00:00
Vadim Zeitlin
20ffcd779a Improve inotify()-based wxFileSystemWatcher to handle creation/deletion.
Handle creation and deletion of directories under the watched path better.

See #14544.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-16 14:02:40 +00:00
Vadim Zeitlin
6eef5763a8 Check for filespec when generating events in wxFileSystemWatcher.
Instead of setting watches on individual files when a non-empty filespec is
given, always watch all the files but just ignore the events from the ones not
matching the filespec. This makes the code simpler and fixes several bugs.

See #14544.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-15 01:09:25 +00:00
Vadim Zeitlin
c063adebba Add support for symlinks to wxFileName.
Allow to work with the symlinks themselves and not the file they reference by
calling the new wxFileName::DontFollowLink().

Update Unix wxDir implementation to not treat symlinks to directories as
directories, this ensures that we don't recurse into the directories outside
of the original parent accidentally.

Closes #14542.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-15 01:09:01 +00:00
Vadim Zeitlin
76cfd1bf95 Make wxFileSystemWatcher watch entries reference-counted.
This helps to avoid problems that arise from watching the same physical file
system path multiple times, which could happen when adding a watch for a path
already watched because of a recursive watch on a parent directory, for
example.

Closes #14490.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72679 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-15 01:08:37 +00:00
Vadim Zeitlin
227dee95e0 Improve handling of file spec in wxFileSystemWatcher::AddTree().
Fix watching too many files (i.e. even those not matching the provided spec)
and asserts when removing a recursive watch with a file spec in wxMSW.

Closes #14488.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72678 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-15 01:08:13 +00:00
Vadim Zeitlin
332afcdb2f Make GetClippingBox() work for wxPrinterDC in wxGTK.
GetClippingBox() implementation relies on wxDCImpl::m_clip[XY][12] being
updated in DoSetClippingRegion() but this wasn't done here. Fix this by adding
the code to do this to the base class version of this method and calling it
from wxGtkPrinterDCImpl.

Also, refactor wxGCDCImpl to reuse the same code instead of duplicating it.

Closes #14697.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72674 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-14 14:55:32 +00:00
Vadim Zeitlin
4d604ad397 Provide stand-in IDropTargetHelper definition to fix VC6 build.
VC6 SDK doesn't define this interface, so do it ourselves to fix its build
after the changes of r72668.

See #14697.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72673 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-14 14:42:58 +00:00
Vadim Zeitlin
1dc17bcafb Make TAB behaviour in wxGrid more configurable.
Allow making TAB/Shift-TAB wrap to the next/previous row or going to the
next/previous control when the cursor is at the end/beginning of the current
row easily.

Also add wxEVT_GRID_TABBING event to allow customizing TAB behaviour even
further.

Update the sample to show the different possible standard behaviours and a
stupid example of a custom one (it would be probably more useful to implement
something a tad more realistic, e.g. tabbing to the next non-empty cell).

Closes #14711.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-13 22:55:18 +00:00
Vadim Zeitlin
ac6a837eed Just correct the path in the header comment.
Add the missing "private" path component.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72671 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-13 22:54:55 +00:00
Vadim Zeitlin
403750325d Display system-provided drag images during drag-and-drop in wxMSW.
This is especially useful when dragging files from Explorer as it provides
big, informative drag images for them that can be easily displayed using
Windows shell support for them.

See #14697.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-13 22:53:46 +00:00
Vadim Zeitlin
6754c300cf Freeze wxTreeCtrl in wxMSW by hiding it.
This is far from perfect but better than alternative as freezing this control
by sending WM_SETREDRAW to it can result in completely broken behaviour as
explained in http://support.microsoft.com/kb/130611. And not freezing it at
all shows horrible flicker when adding even a relatively small number of items
at once to the control because it recalculates and repositions its scrollbars
after every parent node addition.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72665 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-13 22:52:35 +00:00
Vadim Zeitlin
861bdae474 Set wxTAB_TRAVERSAL for wxNavigationEnabled<> windows with focusable children.
We need to have this flag under wxMSW in order for navigation events to be
generated for the window. As wxNavigationEnabled can't set this flag on
creation because its ctor is called too early, do it in overridden AddChild().

Closes #13271.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72664 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-13 22:52:12 +00:00
Vadim Zeitlin
e68b7b364a Allow using windows that can't be focused with wxNavigationEnabled<>.
The code in wxNavigationEnabled<> assumed that the window itself could be
focused if it didn't have any focusable children because it was originally
extracted from wxPanel that can, indeed, be focused. This is however not the
case for all windows, notably not for wxStaticBox which now derives from
wxNavigationEnabled as well but can never be focused itself.

Add wxControlContainer::DisableSelfFocus() and call it from wxStaticBox to
support this situation. This required splitting m_acceptsFocus flag into
m_acceptsFocusSelf and m_acceptsFocusChildren and updating various methods
using them.

See #13271.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-13 22:51:50 +00:00
Vadim Zeitlin
8f0271018e Remove unused wxNavigationEnabled::AcceptFocus() method.
This doesn't seem to be ever called or used from anywhere else.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72661 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-13 22:51:04 +00:00
Vadim Zeitlin
4d3d97a84c Use "true" by default in wxGenericListCtrl::EnableBellOnNoMatch().
The changes of r72639 mistakenly omitted the default value for
EnableBellOnNoMatch() argument in this class (although it was present in the
base class and in wxGenericTreeCtrl), fix this.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-11 12:41:07 +00:00
Vadim Zeitlin
34af6cfc8d Copy wxCommandEvent string explicitly in its copy ctor.
Due to the optimization used in wxCommandEvent::GetString(), which returns the
string from the text control that generated the event only if it's really
needed, wxCommandEvent::m_cmdString field may be empty even when it does have
an associated string. As we lose the possibility to retrieve the value on
demand from wxTextCtrl when we make a copy (because it can be associated with
a different object), we need to explicitly copy the string to avoid losing
this data entirely.

This fixes GetString() value for the text events generated by generic
wxSearchCtrl.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72647 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-09 21:01:53 +00:00
Vadim Zeitlin
bb03d283be Recreate GtkPrintOperation every time when printing in wxGTK.
Apparently reusing GtkPrintOperation is not allowed, so create a new one
every time we need it.

Closes #14731.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72642 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-08 12:09:37 +00:00
Vadim Zeitlin
9fa99f045e Improve wxAuiNotebook appearance when using some GTK themes.
Let wxAuiNotebook render the border itself, instead of doing it in dock art
class. This allows the notebook to do it correctly for the current theme.

Closes #14710.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72641 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-08 12:09:13 +00:00
Vadim Zeitlin
d34d31f6d6 Implement incremental search in wxGenericListCtrl.
Mostly copy wxGenericTreeCtrl incremental search implementation to
wxGenericListCtrl (unfortunately there is no simple way to reuse this code
currently), including the recently added EnableBellOnNoMatch() method.

Update the sample to test it, the key event handling in it had to be modified
to allow it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-07 22:42:27 +00:00
Vadim Zeitlin
27bc919446 Add a possibility to beep on no match to wxGenericTreeCtrl.
For consistency with Windows, allow to optionally generate a beep when
incremental search in the tree control doesn't find anything.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-07 22:42:02 +00:00
Vadim Zeitlin
0d7acfb995 Support some CSS styles for the links in wxHTML too.
Refactor limited CSS styles support for <span> tag to reuse it for <a> tag as
well.

Closes #14599.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-07 22:38:56 +00:00
Vadim Zeitlin
2119b213e3 Add support for wxALWAYS_SHOW_SB style to wxScrolled<>.
Simply call ShowScrollbars(wxSHOW_SB_ALWAYS) if this style is specified.

Closes #13616.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-04 23:24:28 +00:00
Vadim Zeitlin
94f39d8181 Add a setting for the disabled text colour to wxRibbon art.
Allow specifying the text for the labels of the disabled items separately.

Closes #14721.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72619 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-04 23:23:41 +00:00
Vadim Zeitlin
893d540e53 Add a more convenient wxColour::MakeDisabled() overload.
Allow creating a disabled version of the colour without having to manually
break it into RGB components and then recreating it from them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72618 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-04 23:23:18 +00:00
Vadim Zeitlin
16630eb7e3 Add wxDateSpan::GetTotalMonths() method.
This is similar to the existing GetTotalDays() and counts both months and
years.

See #14704.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72615 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-04 22:48:07 +00:00
Paul Cornett
7d1214cd72 silence warnings about shadowed variables with GCC -Wshadow
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72611 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-04 15:55:06 +00:00
Paul Cornett
95dc31e001 make more Init() functions private
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72604 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-02 15:57:03 +00:00
Vadim Zeitlin
77dd7daad2 Add wxDateTime::DiffAsDateSpan().
This method returns the difference between the dates as wxDateSpan, unlike the
existing Subtract() and overloaded operator-() that return wxTimeSpan.

Closes #14704.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72600 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-01 09:55:05 +00:00
Vadim Zeitlin
614108e211 Added wxFile::ReadAll() for consistency with wxFFile::ReadAll().
Make it possible to use wxFFile and wxFile interchangeably for simply reading
the entire contents of the file as a string.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72596 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-30 22:28:08 +00:00
Vadim Zeitlin
ce364c4ecd Reimplement wxTextEntry::DoSetValue() in wxStyledTextCtrl.
The version inherited from the base class does work already but calling
Scintilla SetText() directly should be more efficient than selecting
everything and then calling ReplaceSelection() as the base class version does,
less code is executed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72595 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-30 22:27:44 +00:00
Vadim Zeitlin
933be2dc39 Fix wxStyledTextCtrl::WriteText() to replace the selection.
WriteText() must replace the selection, not just insert the new text,
otherwise SetValue() implementation inherited from the base class doesn't work
as it doesn't clear the old contents of the control before adding new text to
it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72594 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-30 22:27:21 +00:00
Vadim Zeitlin
294a09aa8c Add per-direction wxSocket wait flags and byte counters.
Allow to specify whether the socket should block until all the data is read or
written or, on the contrary, avoid blocking only when reading or writing
instead of always using the same behaviour in both directions.

Also add separate counters for the bytes read/written instead of using the
same one for both.

These changes make it possible to use the same socket for reading/writing in
different threads.

Closes #14506.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72591 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-30 22:21:44 +00:00
Vadim Zeitlin
f5413b878c Add support for background-color style to span element in wxHTML.
Add code for setting/restoring background mode and use it to implement support
for changing the text background colour.

Closes #14443.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-30 22:20:58 +00:00
Vadim Zeitlin
a0393f9725 Fix handling of spaces after <img> tag in wxHTML.
Don't collapse the spaces following this tag with the ones preceding it.

See #14557.

Closes #2980.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-30 22:20:34 +00:00
Vadim Zeitlin
6f2df68ec4 No changes, just fix some typos in comments in wxXRC code.
Closes #14714.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-30 22:19:24 +00:00
Vadim Zeitlin
e5eff43833 Clear the search control automatically when it's "Cancel" button is pressed.
This should be the desired behaviour in the vast majority of cases, so do it
by default.

Replace the useless OnSearchButton() doing nothing with search button events
with OnCancelButton() handling cancel button events and clearing the control.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72581 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-30 20:35:10 +00:00
Paul Cornett
ec373f2a81 make wxWindowGTK::Init() private, it is not meant to be called from derived classes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72579 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-30 16:55:40 +00:00
Vadim Zeitlin
eae48ea12d Make wxHelpControllerBase::SetFrameParameters() title more clear.
Describe it as "title format string" and call it "titleFormat" and not just
"title" because this is what it is.

Closes #14707.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72573 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-28 23:48:57 +00:00
Vadim Zeitlin
45df4bb6c2 Add "inherit" to <font> XRC tag.
This allows to construct a font based on the parent window font instead of
either fully specifying all font parameters or basing it on a standard font.

Closes #14632.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72572 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-28 23:48:34 +00:00
Paul Cornett
603e7f6d0c Avoid unrealizing a frozen window
It seems to continue to prevent updates to the affected area

Fixes #13543


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-28 16:09:12 +00:00
Vadim Zeitlin
b8d6be7f57 Add two step creation to wxTextEntryDialog.
Add Create() method and default ctor for consistency with the other classes.

See #14702.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-27 22:41:33 +00:00
Vadim Zeitlin
732281950a Remove the now unnecessary wxRichTextCtrl::SelectAll().
It is already inherited from the base wxTextEntry class.

See #14701.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-27 22:40:46 +00:00
Vadim Zeitlin
0d1dd76baa Merge "selected" and "active" child in wxAuiMDIParentFrame.
They are one and the same thing and so just make them really synonymous
instead of (unsuccessfully) trying to keep them synchronized.

Closes #14684.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72556 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-26 12:20:07 +00:00
Stefan Csomor
dea54670b3 adding constants for newer OSX versions to make sure our conditional expressions are working with earlier SDKs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72549 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-25 13:08:37 +00:00
Vadim Zeitlin
226fa6db3d Improve SAFEARRAY support in wxMSW OLE Automation code.
Add a new wxSafeArray<> class wrapping SAFEARRAY.

Also add support for converting VARIANTs containing other, previously
unsupported, standard types.

Closes #14637.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72543 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-23 22:49:50 +00:00
Vadim Zeitlin
e380ca3cf8 Correct best size computation for wxCheckBox with borders under MSW.
As wxCheckBox can now have borders (see previous commit), we must override
DoGetBestClientSize() and not DoGetBestSize() in it to take account of them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-23 22:48:16 +00:00
Vadim Zeitlin
687823a157 Respect styles translated to WS_EX_XXX in wxMSW wxCheckBox and wxRadioButton.
Take into account the window styles that translate to extended Windows styles
at MSW level.

Also override MSWGetStyle() in these classes, just as in most (all?) other
ones, for consistency instead of doing wx-to-MSW styles translation directly
in Create().

Notice that as a side effect of this change, border styles now work for
wxCheckBox which wasn't the case before. It's not clear if this is really
wanted but OTOH there doesn't seem to be any real reason to forbid them
neither.

Closes #14674.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72538 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-23 22:47:52 +00:00
Vadim Zeitlin
9b9a7c3331 Add public (but not documented) wxCheckBox::MSWMakeOwnerDrawn().
It can be useful to explicitly make a check box owner drawn, so make the
private MakeOwnerDrawn() public and add "MSW" prefix to it to allow doing this
from the user code.

Closes #14679.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72530 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-20 22:15:37 +00:00
Vadim Zeitlin
652aa9360f Fix and enhance support for client data in wxRibbonButtonBar.
Add the possibility to retrieve the client data associated with a button and
not only set it (which wasn't very useful on its own).

Also allow having both typed (owned) and untyped (not owned) client data, as
in the other wxWidgets controls.

To avoid confusion between two different kinds of data, remove "client_data"
argument from the functions adding buttons and provide separate methods with
distinct names for setting and getting client data.

Closes #14630.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72529 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-20 20:02:25 +00:00
Vadim Zeitlin
7f08b8283b Add wxRibbonButtonBarEvent::GetButton().
Allow to retrieve the button associated with the given button bar event.

See #14630.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72528 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-20 20:02:02 +00:00
Vadim Zeitlin
02a40ac1da Add wxRibbonButtonBar::GetActiveItem() and GetHoveredItem().
Add accessors for the button being currently clicked or hovered over.

See #14630.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72527 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-20 20:01:36 +00:00
Vadim Zeitlin
71a77e77d1 Add wxRibbonButtonBar::GetItem(), GetItemById() and GetItemId().
Allow accessing the ribbon bar buttons either by index or ID.

See #14630.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-20 20:01:12 +00:00
Vadim Zeitlin
9b14c706b2 Make it possible to TAB-navigate among wxStaticBox children.
As wxStaticBox can now contain child windows, derive it from
wxNavigationEnabled<> to allow TAB-navigating among them. Without this, it was
impossible to switch focus from keyboard to any of the controls inside
wxStaticBox.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72523 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-20 16:00:07 +00:00
Jouk Jansen
bab5e0d028 backport wxspinctrl::get/setbase form gtk ->gtk1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-20 12:33:05 +00:00
Vadim Zeitlin
95725e35d8 Add wxStyledTextCtrl::AnnotationClearLine().
Simply set NULL annotation text for the given line.

Closes #12960.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-20 10:20:42 +00:00
Robin Dunn
b452fd5535 Add define for MAC_OS_X_VERSION_10_7 if there isn't one already
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-19 18:55:07 +00:00
Vadim Zeitlin
4801d9613f More s/loose/lose/ in wxEncodingConverter comments.
Finish the changes started by r72500 and lose the remaining loosely used
words.

Closes #14665.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72506 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-18 22:45:38 +00:00
Dimitri Schoolwerth
81a887a895 Set svn properties on recently added files.
Added svn:eol-style (set to native) and svn:keywords (set to Id) for .cpp and .h files that were added since r72218.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-17 23:35:26 +00:00
Vadim Zeitlin
105b2ca747 No changes, just fix some typos in the comments in the headers.
Closes #14665.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-17 11:07:30 +00:00
Vadim Zeitlin
daa3509726 No changes, just silence some MSVC 11 static analyzer warnings.
This is an aborted attempt to make wxWidgets code compile without warnings
when using MSVC 11 /analyze option, as it was supposed to have become much
better. Unfortunately it still produces way too many false positives to be
really useful, in particular NULL pointer detection is completely broken as
even the code such as (from object.cpp):

        wxClassInfo *info = sm_first;
        while (info)
        {
            if ( info->m_next == this )
                ...
        }

provokes tons of warnings about "info" being NULL inside the loop which is
clearly impossible.

So this commit just fixes a few obvious warnings, mostly about variable
shadowing but also a couple about possibly passing NULL to memcpy().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-15 23:20:23 +00:00
Vadim Zeitlin
42d7394119 Add help button support to wxRibbonBar.
Optionally show standard "Help" question mark button in the ribbon top right
corner and generate the appropriate event for it.

Closes #14576.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-15 23:19:59 +00:00
Vadim Zeitlin
c9848e6318 No real changes, just slightly simplify wxSVGFileDCImpl code.
Move m_graphics_changed check inside NewGraphics() itself instead of checking
whether it's true each time before calling it, it is better to both test the
flag and reset it inside this function rather than do the first part in the
caller and the second one in the callee.

Also rename the function to NewGraphicsIfNeeded() to make its meaning more
clear.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-15 23:19:11 +00:00
Vadim Zeitlin
3049690536 Preserve size of wxGrid rows/columns when hiding and showing them back.
Previously, if a wxGrid row or column was hidden by setting its size to 0, its
original size was lost. Change this so that it's preserved now and can be
restored by setting the size to the special -1 value later.

Closes #14133.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72491 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-15 23:18:23 +00:00
Vadim Zeitlin
a349dc1085 Handle underlined and strikethrough attributes in wxGTK native font info.
These attributes were not handled by wxFont::GetNativeFontInfoDesc() as it
only serialized the Pango font description which doesn't support them.

Fix this by handling these attributes explicitly and prepending them to the
Pango font string if necessary.

Closes #14559.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-15 23:17:12 +00:00
Vadim Zeitlin
cba4e486a4 Take into account wxFONTFLAG_STRIKETHROUGH in wxGTK wxFont ctor.
Honour wxFONTFLAG_STRIKETHROUGH in wxFont ctor taking flags as this is the
only way to create a strike-through font currently.

See #14559.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72487 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-15 23:16:46 +00:00
Vadim Zeitlin
c03c654417 Relax wxMessageDialog style checks, assume wxOK by default.
Don't complain if neither wxOK nor wxYES[_NO] are specified but just assume
wxOK by default. This allows the code calling wxMessageBox() with just an icon
flag to continue to work in the same way in 2.9 as it did in 2.8.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:16:11 +00:00
Vadim Zeitlin
c3f641cb5e Add wxBITMAP_PNG() macro similar to wxBITMAP() but for PNG images.
Just as wxBITMAP() provides a portable way of loading bitmaps from either
Windows BMP resources or embedded XPM data depending on the platform,
wxBITMAP_PNG() hides the difference between loading bitmaps from PNG resources
under Windows and embedded PNG data elsewhere.

Also add wxBITMAP_PNG_FROM_DATA() macro which always loads PNG data from
memory: it's needed anyhow as part of wxBITMAP_PNG() implementation and some
people may prefer to always use it under all platforms.

Finally modify the image sample to demonstrate loading PNG images from both
resources and memory. This involved creation of a new Windows .rc file for it
and copying its data files to Resources bundle directory under OS X.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72477 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:15:25 +00:00
Vadim Zeitlin
20e6714a67 Add wxBitmap::NewFromPNGData() for creating bitmaps from PNG data.
This simple function can be used to create a wxBitmap from the raw image data
in PNG format. It is just a thin wrapper around wxImage load functions under
almost all platforms but has two advantages:

1. It can be implemented natively for some platforms (currently only OS X).
2. It can be used in a single expression as it doesn't require creating a
   temporary wxMemoryInputStream and this will be required by wxBITMAP_PNG()
   macro that will be added soon.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72476 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:15:00 +00:00
Vadim Zeitlin
3ccea0978c Don't ignore invalid files entered into wxFileDirPickerCtrlBase.
File/directory picker controls with wxFLP_FILE_MUST_EXIST/wxDIRP_DIR_MUST_EXIST
style simply ignored any value entered by user if it didn't correspond to an
existing file/directory. This meant that the program didn't use the value that
was shown on the screen resulting in very confusing UI -- e.g. a program could
complain that no value was entered when actually it was and just corresponded
to a non-existing file.

As we can't prevent the entry of arbitrary strings in the text field of the
file picker control, stop pretending that we can validate it and just update
the control value, and send the corresponding event, whenever the text control
value changes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72475 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:14:37 +00:00
Vadim Zeitlin
be7a086c0c Extract "Close" button creation from wxInfoBarGeneric into new function.
Such buttons may be needed in other places and it's not obvious to create
them, so add a new public wxBitmapButton::NewCloseButton() method to allow
creating them easily.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:14:14 +00:00
Vadim Zeitlin
e23fd60fe7 Change wxMSW-specific wxLoadUserResource() to accept standard RT_XXX types.
Resource types can be either strings for custom types or integers casted to a
TCHAR* for the standard ones. Using wxString for the resource type prevented
us from using the latter as any attempt to initialize wxString for such a
pseudo-string resulted in an immediate crash.

Change wxLoadUserResource() resource type parameter type to wxChar* to avoid
this and allow passing standard resource types, such as RT_RCDATE, to this
function directly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72472 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:13:28 +00:00
Vadim Zeitlin
5ddb3b8c53 Fix setting colours for the edit control part of wxComboBox.
Recognize this control as part of wxComboBox and so handle WM_CTLCOLOR for it.

To do this, override ContainsHWND() in wxComboBox and use it, on the parent
window, in wxControl::DoMSWControlColor(), if we fail to find the window
directly.

Closes #811.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:11:56 +00:00
Julian Smart
d07f2e1918 Added support for wxTEXT_ATTR_EFFECT_SMALL_CAPITALS.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-12 18:58:30 +00:00
Steve Lamerton
0bfd90b3e7 Add generic wxFileSystem support to wxWebView using wxWebViewFSHandler.
Closes #14623.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72461 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-11 09:26:58 +00:00
Steve Lamerton
e52aec972c Move wxWebViewIE missing definitions to webview_missing.h and add new definitions required for Find.
These are required as some compilers, notably MinGW and VC6, do not include up to date headers. Fixes #14621.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72460 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-10 20:02:58 +00:00
Vadim Zeitlin
44b7211689 Remove workarounds for wxTextCtrl::SetValue() events in pickers code.
Simply use ChangeValue() instead of SetValue() to avoid the unwanted events
instead of using guard variables.

No real changes but the code is simpler and shorter now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-09 13:35:57 +00:00
Vadim Zeitlin
06a419244f Simplify and correct setting of initial directory for wxFilePickerCtrl.
Create wxFileDialog with correct initial directory and default file name from
the very beginning instead of updating it later. This makes the code simpler
and also actually makes it work as the initial directory setting was
overwritten by setting the default path later even if it didn't contain any
directory component.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-09 13:34:49 +00:00
Vadim Zeitlin
f78b3d1fc0 Don't try to determine the clicked item ourselves in wxMSW wxListBox.
This doesn't work when the listbox is scrolled as the result of a click to
make the selected item fully visible and results in the index of the item
being off by 1 in the generated event which is a pretty serious problem.

Fix it by simply retrieving the item from the listbox itself, without doing
any hit testing. This seems to give the correct result in all cases and also
makes the code much simpler as we don't have to use 2 different ways of
finding the item depending on whether it was selected using the keyboard or
the mouse and makes it unnecessary to keep track of how the selection was done
completely, i.e. reverts r64498 which is not needed any more.

Closes #14635.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72444 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-09 00:44:26 +00:00
Vadim Zeitlin
e60165f72e Fix narrow/wide string concatenation in recently added wxSizerFlags assert.
This fixes MSVC build after r72434.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-08 21:48:57 +00:00
Vadim Zeitlin
71c3620229 Check validity of wxSizerFlags::Border() direction parameter.
Catch the misguided attempts to pass the size of the border as the first
parameter of the Border(direction, size) overload.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-08 15:46:50 +00:00
Václav Slavík
c4dae34da8 Add MUI_LANGUAGE_NAME to wx/msw/missing.h.
Fixes VC6 compilation after r72430.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72431 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-08 10:53:16 +00:00
Václav Slavík
01f953efb2 Add wxTranslations::GetBestTranslation().
Implement preferred language selection on modern systems (OS X, Windows
Vista+). User settings for locale (aka "regional settings") and UI
language are independent there and the UI language shouldn't be
determined from the locale.

Moreover, the OS provides a list of preferred languages, not a single
value (as with locale), so we should use the best language given user's
preferences and available translations. A Czech user may prefer Slovak
UI over English, for example, and we should use Slovak translation in
absence of Czech one in that case instead of falling back to English.

On Unix, locale is language and so things remain as before.

Notice that calling wxLocale::Init(wxLANGUAGE_DEFAULT) does the right
thing now: it sets the locale to whatever the user has configured in
regional settings and loads translations corresponding to default
wxTranslations language, which is determined as described above.
Previously, UI would be translated using a language corresponding to the
regional settings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72430 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-08 08:58:38 +00:00
Vadim Zeitlin
81b93d3e85 Fix wxVLogStatus definition.
This macro can be used with 2 arguments (format and argptr) or 3 (the frame
pointer as an additional first argument), so don't define it as taking 2
arguments but as a macro without arguments, as we already do for
wxVLogSysErrorfor the same reasons.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72421 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-01 22:38:40 +00:00