Commit Graph

15511 Commits

Author SHA1 Message Date
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
Vadim Zeitlin
9e565667d0 Add wxSpinCtrl::SetBase() to allow entering hexadecimal numbers.
Add a generic SetBase() API even though right now only bases 10 and 16 are
supported as we might support other ones (e.g. 8?) in the future. Implement it
for MSW, GTK and generic versions.

Add controls allowing to test this feature to the widgets sample.

Add "base" property support to the XRC handler for wxSpinCtrl, document it and
test it in the xrc sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:24:38 +00:00
Vadim Zeitlin
36090ae57e Remove wxOSX implementation of wxSpinCtrl and use the generic one.
wxOSX doesn't provide a native spinner+text control so it used a generic
implementation of wxSpinCtrl but a different one to the version found in
src/generic/spinctlg.cpp.

Just use the real generic version instead, it doesn't make sense to have two
different versions of the same generic control.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72413 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:24:12 +00:00
Vadim Zeitlin
62f96636b5 Refactor text to/from double conversion in wxSpinCtrlGenericBase.
The code always used ToDouble() and Format("%g") which was a bit strange for
integer-valued wxSpinCtrl. Move the conversions to their own virtual functions
for clarity, perhaps correctness and, especially, flexibility as they will be
overridden in wxSpinCtrl soon.

Also move wxSpinCtrlGenericBase::m_format to wxSpinCtrlDouble as the base
class really doesn't need it at all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:23:49 +00:00
Vadim Zeitlin
b9b1eec604 Remove wxRTTI macros from wxSpinCtrlGTKBase.
This is not a public class and it doesn't need to be appear in wxRTTI.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72411 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:23:26 +00:00
Vadim Zeitlin
cc699de848 Added wxSimplebook class: a wxBookCtrl without controller.
This new control allows the program to show one of the several pages without
allowing the user to change them (or even see that there are several of them)
himself.

This class is fully inline, so it doesn't add anything to the library and
hence doesn't need neither wxUSE_SIMPLEBOOK nor the corresponding configure
option.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:21:54 +00:00
Vadim Zeitlin
2e18fe7139 Virtualize showing/hiding the pages in wxBookCtrlBase.
No real changes, just make it possible to change how the pages are hidden and
shown in the derived classes. This is not used by any of them yet, but will be
used by wxSimplebook soon.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:21:29 +00:00
Vadim Zeitlin
bfa78c63b9 Use wmain() if supported by the compiler/CRT instead of main().
This avoids a needless conversion from (originally Unicode) command line to
ANSI by the CRT and conversion back by wxWidgets and, especially, ensures that
there is no data loss if the Unicode command line arguments can't be converted
into the current charset.

See #14580.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:19:57 +00:00
Stefan Csomor
befe64edb4 add global NSLayoutManager instance
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72396 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-29 12:15:50 +00:00
Steve Lamerton
66ac040060 Add support for searching and highlighting a wxWebView.
Currently supports WebView on GTK and IE. Closes #14045.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-28 17:13:13 +00:00
Vadim Zeitlin
70f86dedfd Add page highlighting to wxRibbonBar.
Allow visually highlighting a page to make it more noticeable to the user.

Closes #14527.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-15 23:34:36 +00:00
Vadim Zeitlin
93b87dd910 Respect item max sizes in wxBoxSizer.
Don't give more space than the max size, if set, to wxBoxSizer elements.

Closes #11497.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-15 23:34:27 +00:00
Vadim Zeitlin
465de0be70 No real changes, just add wxSizerItem::AddBorderToSize() helper.
Factor out this function from GetMinSizeWithBorder() as it will be used for
max size too in a next commit.

See #11497.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-15 23:34:22 +00:00
Vadim Zeitlin
7d17499993 Add wxSize::DecToIfSpecified() helper.
This is similar to DecTo() but can be used even if the wxSize argument has
some components set to -1.

Notice that we don't need IncToIfSpecified() because IncTo() already works
correctly anyhow in this case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-15 23:34:15 +00:00
Vadim Zeitlin
947873e263 Restore the use of wxListCtrl in report view in wxListbook.
This reverts r71965 for wxMSW as the list mode there doesn't work correctly if
there are sufficiently many items: the native control insists on laying them
out in multiple columns which is inappropriate for wxListbook, so use report
mode for horizontal wxListbooks. Do use the list mode in the vertical case as
we do want to have multiple columns -- and not rows -- then.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72340 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-15 11:34:46 +00:00
Robin Dunn
c4bdd8225a fix some compile warnings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72338 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-14 07:13:39 +00:00
Robin Dunn
d01ca1e4d1 Update the wxVersionInfo, and don't forget to initialize the new attributes of the event class.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72337 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-14 05:55:23 +00:00
Robin Dunn
54173563c3 Update new names to conform, add new event types and event attributes, etc.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-14 05:55:08 +00:00
Robin Dunn
9b01abb82d Minimal tweaks and additions to get wxSTC compiling successfully again, with Scintilla 3.21
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-14 05:14:46 +00:00
Stefan Csomor
033f86db5f adding SetLabel -> SetTitle redirects, solves missing title updates using wxDocument/wxView
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72323 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-11 13:16:56 +00:00
Václav Slavík
e7aa9bb7c0 Show progress of printing in wxMSW.
Add the number of the page being printed as well as the total to the
wxMSW printing progress window. Improved the layout and fixed some i18n
issues in the process.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-09 15:52:15 +00:00
Václav Slavík
446659cac6 Return wxPrintAbortDialog from CreateAbortWindow().
Instead of returning a generic wxWindow*, return the type actually used.
It was part of the public header already, but not used in any publicly
visible way.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-09 15:52:08 +00:00
Václav Slavík
1a19b3210d Create wxPrintAbortDialog more sensibly.
Instead of having an empty constructor and filling the dialog with
controls from outside, do the work in the constructor.

This changes the meaning of ctor's 'title' argument, but this class'
terrible API made it unusable for direct use anyway, so it doesn't seem
to be harmful.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-09 15:52:04 +00:00
Vadim Zeitlin
7a7fa93b0d A better fix for wxHash{Map,Set} with g++ 4.7.
This reverts r70556, i.e. removes the scope operators added by it to all
WX_DECLARE_HASH_{MAP,SET} macros, and implements a workaround for the problem
due to the use of empty base class optimization in g++ 4.7 standard library
implementations inside the macros themselves by prepending the hasher and
comparator classes with explicit "struct".

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-06 11:06:45 +00:00
Vadim Zeitlin
03a1d86352 Fix wxAutomationObject compilation in PCH-less build.
Don't use LCID in a public header, windows.h might not be included. Use WXLCID
stand-in instead.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-05 22:44:31 +00:00
Vadim Zeitlin
c0feacc829 Add webview library in MSVC-specific setup.h.
wxNO_WEBVIEW_LIB was documented but not implemented: webview library was never
linked in implicitly at all. Fix this by adding the missing #pragma to
msvc/wx/setup.h.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-05 22:44:18 +00:00
Vadim Zeitlin
a3db17b122 Make wxGraphicsContext::GetSize() const.
Closes #14556.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-03 13:05:11 +00:00
Vadim Zeitlin
b3b3713300 Make wxRect2D::Get{Position,Size}() const.
Accessors should be const.

Closes #14555.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-03 12:50:03 +00:00
Robin Dunn
440ddb750f Have wxDCImpl::GetHandle return NULL by default instead of being pure virtual.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-02 20:25:06 +00:00
Vadim Zeitlin
6d93e28adf Fix comparisons of char and wchar_t with wxUniChar[Ref].
Comparisons didn't work correctly in the other direction as they were not
reversed as needed. Fix this by adding wxDEFINE_COMPARISON_REV() macro which
defines comparisons in terms of the reverse operations and use it for both
wxUniChar and wxUniCharRef.

Closes #14547.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-31 16:49:36 +00:00
Vadim Zeitlin
f239af65af Allow setting LCID used by wxAutomationObject.
Default user-locale-dependent LCID may be inappropriate for some situations,
notably Microsoft Excel uses localized formula names for non-English LCIDs.
So add a way to change the LCID to use at wxAutomationObject level while
preserving the old behaviour by default.

Closes #14540.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-31 10:31:55 +00:00
Vadim Zeitlin
5bdcb1f324 Use (newly) added wxStaticCastVariantData() to fix wxNO_RTTI build.
Don't define wxDynamicCastVariantData if RTTI is disabled and don't use it in
wxConvertVariantToOle() code as we don't really need it there anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-30 19:16:30 +00:00
Vadim Zeitlin
7c70331e28 Add expand/collapse button to wxRibbonBar.
This allows the user to toggle the ribbon bar visibility.

Closes #14530.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-30 17:53:36 +00:00
Vadim Zeitlin
42a4299bb3 Remove workaround for slow scrolling in wxStyledTextCtrl.
We don't need to drop mouse wheel events coming too fast after the previous
commit as now scrolling in wxStyledTextCtrl works quickly enough.

Closes #9057.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 22:08:31 +00:00
Vadim Zeitlin
1043456035 Generate clipboard events for wxComboBox in wxGTK too.
These events were only generated for wxTextCtrl but should be sent for
non-readonly wxComboBox too, so refactor the code to allow its reuse from
wxComboBox.

Also add EVT_TEXT_PASTE handlers for both controls to the widgets sample for
testing.

Closes #14520.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 22:08:15 +00:00
Vadim Zeitlin
756ead6f83 Revert HasModifiers() change in behaviour, add HasAnyModifiers().
In 2.8 wxKeyEvent::HasModifiers() returned false if (only) Shift was pressed
as it tested for Control and Alt only but when it was moved to wxKeyboardState
in r55745 it started checking for all modifiers as this made more sense now
that it was used by wxMouseEvent. However it broke existing code using it,
including in wxWidgets itself (in wxTreeCtrl), so revert it now and add
HasAnyModifiers() that does check for all modifiers, including Shift.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 22:08:09 +00:00
Vadim Zeitlin
c589dc030d Add a wxGTK-specific function to set wxNotificationMessage icon name.
It's trivial to use a stock icon with the given name in wxGTK with libnotify,
so provide a way to do it. However this is not as simple as that in other
implementations (notably Windows), so make it private to this port for now.

In the future we should try to support arbitrary wxIcons as well as extend
wxIconLocation to support FreeDesktop stock icon names.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72250 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 22:07:06 +00:00