Commit Graph

1777 Commits

Author SHA1 Message Date
Vadim Zeitlin
c21b99e0e2 Add wxRibbonBar::DeletePage() and ClearPages() methods.
Also add a trivial GetPageCount() helper.

Closes #14437.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 16:33:18 +00:00
Vadim Zeitlin
0199dae316 Fix off by 1 error in wxHTML font size from points calculation.
m_FontSize is in 1..7 range, not 0..6, so add 1 to it when setting it from the
index into m_FontsSizes array.

Also update the comment explaining the valid range of m_FontsSize.

Closes #14442.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71878 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-28 11:58:55 +00:00
Vadim Zeitlin
b437ff98b0 Fix text extent computation in wxMSW wxGraphicsContext.
The results were incorrect for italic or bold fonts as we hardcoded
FontStyleRegular instead of using the real font style.

Closes #14421.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-20 17:54:46 +00:00
Vadim Zeitlin
ac6d7c66e0 Make wxMSW tree item unlocking reentrant.
Handle creating nested TreeItemUnlocker objects correctly. This fixes the
problem when a wxTreeCtrl method unlocking some item is called with another
item is already unlocked, e.g. from a selection changed event handler.

Closes #14400.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-12 21:41:40 +00:00
Vadim Zeitlin
9bd5c5fcda Use wxString::Clone() instead of c_str() in wxThreadEvent copy ctor.
Creating a new wxString from c_str() of the old one resulted in dropping all
string data after the first embedded NUL. Fix this by using Clone() method
that exists specifically for this purpose. It also makes the code more clear.

Closes #14380.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71701 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-08 18:44:14 +00:00
Vadim Zeitlin
0a7ee6e0f4 Implement support for wxRIBBON_PANEL_EXT_BUTTON wxRibbonPanel style.
Show the "extension button" in the ribbon panel if this style is specified.

Also generate a specific event if this button is clicked.

Closes #14283.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71642 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-03 19:17:09 +00:00
Vadim Zeitlin
017dc06b50 Use wxString::t_str() in calls to Windows API functions in wxMSW.
Use t_str() instead of wx_str() to make the code work correctly in UTF-8 build
in which wx_str() returns a pointer to UTF-8 buffer while we need a wchar_t
pointer for Windows.

Closes #14371.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-03 19:16:59 +00:00
Vadim Zeitlin
2253f18176 Add support for CP1258 (Vietnamese) and CP1361 (Korean Johab) encodings.
Recognize these encodings names and translate them to/from the corresponding
charset constants in wxMSW.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 11:01:46 +00:00
Vadim Zeitlin
779e28da63 Add wxGrid::Render() for drawing the grid to any wxDC.
In particular, this allows to print the grid contents easily.

Closes #14294.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71577 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-27 13:00:19 +00:00
Vadim Zeitlin
7ed9cd2891 Fix bug with unloading wxPluginLibrary objects in "wrong" order.
wxPluginLibrary objects had to be unloaded in exactly the reverse order to
which they were loaded in. This was not documented and was a serious
limitation for any realistic use of plugins anyhow, so fix it and allow
unloading them in any order now.

Instead of keeping a pointer to the last wxClassInfo not created by this
plugin, now keep a pointer to the first wxClassInfo that was created by it.
This makes the code slightly more complex but this pointer, unlike the old
one, remains valid even if another plugin was unloaded.

Closes #14261.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-26 12:29:54 +00:00
Vadim Zeitlin
5fb4b6cd65 Add wxDataViewListCtrl::GetItemCount().
This method is convenient and (almost, except for the return value) compatible
with wxListCtrl.

See #11088.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71563 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-25 17:02:40 +00:00
Vadim Zeitlin
518cef0470 Add wxDataViewListCtrl::{Set,Get}ItemData() methods.
These methods are convenient when migrating the code that previously used
wxListCtrl to wxDataViewCtrl.

Closes #11088.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71562 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-25 17:02:35 +00:00
Vadim Zeitlin
41abc29aa6 Use wxUIntPtr instead of wxClientData in wxDataViewListCtrl.
Do not delete the client data in wxDataViewListCtrl, this class mainly exists
for compatibility with wxListCtrl and as the latter doesn't delete its client
data, neither should the former.

See #11088.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-25 17:02:31 +00:00
Vadim Zeitlin
0cd7db14f0 Fully implement wxStyledTextCtrl::PositionToXY().
Fill in the column parameter too now.

Closes #14332.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71557 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-25 09:48:16 +00:00
Vadim Zeitlin
b2b6da49e2 Fix wxBase compilation with UTF-8-based wxString under MSW.
Use wxString::t_str() instead of wx_str() in Windows API function calls.

Closes #14325.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71546 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-23 21:16:45 +00:00
Vadim Zeitlin
abf99aad2d Implement wxStackWalker for wxOSX.
Use atos(1) to map address to their symbolic names.

Closes #10067.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-20 20:29:22 +00:00
Julian Smart
32423dd824 Added pixel size capability to wxTextAttr and wxRichTextCtrl.
Fixed composite object positioning in centred and right-aligned
paragraphs.
Added field example to sample, and enabled pixel font size selection.
Added custom text and dimension scaling.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-20 12:25:22 +00:00
Vadim Zeitlin
5e4bbd0f45 Fix pasting large amounts of text in wxGTK.
We need to process GDK_PROPERTY_NOTIFY events when yielding for
wxEVT_CATEGORY_CLIPBOARD, otherwise we never receive large selections.

As GDK_PROPERTY_NOTIFY can be also used for non-clipboard stuff, exceptionally
assign 2 categories to it and process it in either case.

Closes #14284.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-15 10:04:11 +00:00
Vadim Zeitlin
ae8079a210 Don't return a dangling pointer from wxDateTime::ParseXXX(wxCStrData).
We don't have any sufficiently long-lived pointer to return from this
overload, so don't return anything from it -- it's better to break the
compilation of the existing code rather than make it crash during run-time.

Closes #14214.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71430 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-13 21:37:25 +00:00
Vadim Zeitlin
1e20681c9e Implement constrained best size calculation in wxMSW wxListCtrl.
This fixes wxListbook controller size to avoid spurious scrollbars.

Closes #13898.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-09 14:24:47 +00:00
Vadim Zeitlin
d5d037c362 Mention wxFoobookEvent change from classes to #defines in the change log.
These classes can't be forward-declared any more as they're not really classes
any longer but just compatibility #defines and can't be made classes again as
this would break the existing code using wxBookCtrlEvent in 2.9.

See #14242.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-09 14:24:30 +00:00
Vadim Zeitlin
36b0b09078 Allow entering more digits in wxSpinCtrl in wxMSW than fits into it.
Scroll the control automatically if there is not enough space. This is
consistent with (single line) wxTextCtrl and wxSpinCtrl under the other
platforms.

Closes #14211.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71389 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-09 14:24:27 +00:00
Julian Smart
7c9fdebe5f Added field implementation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71379 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-09 11:06:04 +00:00
Vadim Zeitlin
c9f6f0a8cd Add wxDir::GetNameWithSep() and use it to avoid consecutive slashes.
It is wrong to use dir.GetName()+"/" to obtain a slash-terminated directory
name as this results in (usually harmless but at best ugly) double slashes at
at the beginning of the string for the root directory. Add GetNameWithSep() to
obtain the correct result in all cases.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-04 20:35:31 +00:00
Vadim Zeitlin
bb91ff63bc Don't remove the last slash from "/" directory name under Unix.
This was totally wrong as it returned empty string as (invalid) directory
name.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-04 18:31:48 +00:00
Vadim Zeitlin
c04be1a29f Added wxDataViewEvent::SetDragFlags() and GetDropEffect() methods.
Allow specifying the drag operation flags and retrieving the drop effect when
it's over for wxDataViewCtrl drag-and-drop.

Currently this is only implemented in the generic version.

Closes #12583.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-29 23:22:25 +00:00
Vadim Zeitlin
0531b19965 Document the change in wxEVT_SIZE generation for wxDialogs in wxMSW.
These events are now generated earlier and can result in crashes if the
controls they use are not initialized yet.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-28 22:24:34 +00:00
Vadim Zeitlin
d6256ab96d Added note about WXWIN_COMPATIBILITY_2_6 being off in 2.9 by default.
Also list some concrete symbols which are not available any more and their
replacements.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-27 22:35:08 +00:00
Vadim Zeitlin
b7775a521f Add wxFSInputStream providing stream interface to wxFileSystem.
This class allows using virtual wxFSFiles with any wx functions taking
streams. E.g. it makes it possible to load images and animations from
wxFileSystem.

Closes #14185.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71206 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-16 13:53:49 +00:00
Vadim Zeitlin
11527fc9f0 Added support for page tooltips to wxAuiNotebook.
Allow setting tooltips for the tabs of the individual pages of wxAuiNotebook.

Closes #14216.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71204 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-16 12:12:26 +00:00
Vadim Zeitlin
86f5e64bb1 Added wxAcceleratorEntry::ToRawString().
This function can be used to obtain language/locale-independent representation
of an accelerator. This is particularly useful for storing it in configuration
files.

Closes #14228.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71203 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-16 12:12:19 +00:00
Vadim Zeitlin
580ffdf4c0 Use new style directory selection dialog under Vista and later.
Use IFileDialog in wxDirDialog implementation if possible, it shows a much
more user-friendly dialog than the one used by SHBrowseForFolder().

Closes #11401.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71201 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-15 23:18:12 +00:00
Vadim Zeitlin
23b9814f80 Fix WXK_MENU handling in wxStyledTextCtrl.
Map it to SCK_MENU instead of treating it as a modifier and simply swallowing
it.

Closes #14205.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71199 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-15 23:18:05 +00:00
Vadim Zeitlin
4b666be659 Add support for VT_I8 (long long) values to wxAutomationObject.
Just map VT_I8 to wxLongLong.

Closes #14210.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71196 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-14 22:31:57 +00:00
Vadim Zeitlin
4eeceb1573 Add support for horizontal mouse wheel events to wxGTK too.
Handle GDK_SCROLL_{RIGHT,LEFT} directions in scroll-event handler in wxGTK.

Closes #14221.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71195 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-14 22:27:34 +00:00
Vadim Zeitlin
525454303e Set the menu itself as event object for EVT_MENU_{OPEN,CLOSED} in wxMSW.
Make wxMSW consistent with the other ports and set the menu itself, not the
window it is attached to, as the event object for the menu open/close events.

See #1595.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71115 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-05 22:27:36 +00:00
Vadim Zeitlin
5e0b09554d Fix handling of the main window of composite controls in wxMSW wxToolTip.
The main window itself should be added using DoAddHWND() and not
AddOtherWindow() as it is not, precisely, "other". This fixes removing and
updating it twice unnecessarily.

Closes #14184.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-05 13:55:56 +00:00
Vadim Zeitlin
3caee5cfaa Really fix source coordinates handling in wxDC::Blit() in wxMSW.
It turns out that the changes r71028 were unnecessary (and actually harmful)
in most cases, they're only needed when a DIB is used as a source DC. So move
the manual coordinates adjustments to the branch of code using StretchDIBits()
and don't do it anywhere else.

Also don't list this as an incompatible change as wxMSW actually already
worked as the other ports in the majority of cases and list it as a simple bug
fix instead.

Closes #14188.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-05 13:55:43 +00:00
Vadim Zeitlin
589046c0bd Avoid overflowing the wake up when handling events in Unix console apps.
Generating many wake ups from the worker threads could result in overflowing
the buffer of the pipe used to communicate with the main thread which, in
turn, resulted in other serious problems (deadlocks...).

Avoid this by only writing to the pipe if it is empty.

Closes #14166.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71089 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-04 14:36:45 +00:00
Vadim Zeitlin
ab66414a66 No changes, just categorize change log entry correctly.
wxThread::SetConcurrency() should be in the non-GUI part, not wxUniv one.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71088 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-04 14:36:39 +00:00
Vadim Zeitlin
6f26e88002 Honour source wxDC coordinate system in wxDC::Blit() in wxMSW.
wxGTK and wxOSX already did this so do it in wxMSW as well.

Update the documentation to make this explicit.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-27 12:28:04 +00:00
Vadim Zeitlin
c0795ce8ea Added wxTimePickerCtrl::GetTime() and SetTime().
These methods, taking broken down time representation, avoid the problems
arising due to DST complications when using wxDateTime to represent the time
as special care needs to be taken in this case to avoid using the date part
corresponding to a DST change date at which time is discontinuous.

Document the problem with the old functions and use the new ones in the
sample.

See #14137.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 23:17:01 +00:00
Vadim Zeitlin
069358b7cc Implement native tab art for wxAUI in wxGTK.
Use native wxAuiTabArt implementation in wxGTK, it better conforms to the
system style.

Closes #14098.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 17:56:04 +00:00
Vadim Zeitlin
9d98c19792 Correct Eric Jensen name in the change log.
See #14134.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 12:14:53 +00:00
Vadim Zeitlin
c3562311c8 Implement wxGraphicsContext::SetInterpolationQuality() for wxMSW.
Provide implementation of the previously stubbed out method.

Closes #14134.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-24 18:24:15 +00:00
Vadim Zeitlin
b9e52a19e6 Implement horizontal mouse wheel events support for wxMSW.
Handle WM_MOUSEHWHEEL messages and translate them to the corresponding
wxMouseEvents.

Closes #14105.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70962 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-22 00:27:02 +00:00
Vadim Zeitlin
32632baf6d Use pthread_setconcurrency() in wxThread::SetConcurrency().
Use POSIX function if available instead of only using Solaris-specific
thr_setconcurrency() which is not found in modern Linux systems any more.

Closes #2115.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-22 00:12:40 +00:00
Vadim Zeitlin
8d241dea5c Fix display of "const" methods in wxGTK assert dialog.
Don't separate the function name and its arguments types in 2 different
columns in the assert dialog, this doesn't really work with const methods as
"const" can't be separated from the function like this. The old code just
didn't take "const" into account at all and mangled all the const methods by
showing ") cons" (no typo) at the end.

Just show everything in one column to avoid the problem and also simplify the
code.

Closes #14104.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-21 00:11:12 +00:00
Vadim Zeitlin
9827ce9208 Enable/disable "Window" menu items in AUI MDI correctly.
Add EVT_UPDATE_UI handlers for "Close", "Close All" as well as "Next" and
"Previous" menu commands.

Closes #14102.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-15 13:49:54 +00:00
Vadim Zeitlin
e3f54c8f7c Implement wxDirDialog:: and wxFileDialog::Create() in wxGTK.
Simply move the code from non-default constructor to Create(). This allows to
create the dialogs using 2-step creation if necessary.

Closes #14069.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70898 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-14 12:32:27 +00:00
Vadim Zeitlin
c0430d964d Added wxSplitterWindow::SetSashInvisible() and IsSashInvisible().
Also fix handling of wxSP_NOSASH.

Closes #14074.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70840 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-08 13:23:39 +00:00
Vadim Zeitlin
e94f303173 Deprecate wxWindow::MakeModal().
Using this function was never the right way to show a modal window and it
didn't really work correctly. Instead of futilely trying to fix it, just
deprecate it.

Closes #1561.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70838 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-07 23:50:21 +00:00
Vadim Zeitlin
3a1ec1d5dc Add wxEVT_AUI_PANE_ACTIVATED event.
This event is sent when an AUI pane becomes active.

Closes #14026.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70807 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-04 20:31:34 +00:00
Vadim Zeitlin
76c6713102 Fix stretchable spaces in wxToolBar after tool removal in wxMSW.
The stretchable spaces need to be manually updated after removing a tool from
the toolbar.

Closes #13577.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-04 00:29:44 +00:00
Vadim Zeitlin
996d3fe3f8 Added wxFileName::Exists().
This function checks for existence of anything with the given name, not
necessarily just a file or a directory.

Extend the unit test to verify that it returns true for /dev/null on Unix
systems.

Closes #953.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70600 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-15 15:39:46 +00:00
Vadim Zeitlin
4bdc891f54 Implement wxDV_ROW_LINES for generic wxDataViewCtrl.
Provide wxDataViewCtrl::SetAlternateRowColour() to specify the colour to use
for odd rows explicitly but determine it automatically from the background
colour if no explicit colour was specified.

Closes #12834.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-12 22:19:04 +00:00
Vadim Zeitlin
8b6af8eedd Don't use deprecated wxDataViewCtrl::StartEditor() in the sample.
Also document this deprecation in the change log and explain how to update the
existing code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70575 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-12 22:18:59 +00:00
Vadim Zeitlin
1442168125 Implement wxBG_STYLE_TRANSPARENT support for wxGTK.
Use composited windows if supported by GTK+ for wxWindows with this background
style.

Also add wxWindow::IsTransparentBackgroundSupported() and show how to use it
in the sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-11 16:26:52 +00:00
Vadim Zeitlin
846f4568e5 Fix infinite loop in wxHtmlEasyPrinting page break code.
The code didn't handle cells higher than the page height correctly and entered
an infinite loop when trying to adjust page breaks in their presence, e.g.
when trying to print a very tall image.

Closes #13935.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70528 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-07 13:02:32 +00:00
Vadim Zeitlin
75717cb121 Fix handling of positional parameters in wxPrintf() and related.
Handle positional parameter specifications in wxFormatConverter to ensure that
e.g. "%N$s" are correctly transformed to "%N$S" if needed. This fixes the use
of positional parameters under OS X.

Closes #10965.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70523 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-06 13:28:34 +00:00
Vadim Zeitlin
0e3b10c509 Fix huge performance problem in wxStdInputStream when using MSVC8/9.
Our overridden xsgetn() method was never called when using these compilers
because they used their own, non-standard, _Xsgetn_s() instead. Because of
this the stream was always read character by character which was very
inefficient.

Fix the problem by overriding _Xsgetn_s() for these compilers and explicitly
forwarding it to xsgetn().

Closes #13926.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70515 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-05 14:18:37 +00:00
Vadim Zeitlin
fc12b1f12a Take void** client data in wxSingleChoiceDialog ctor and not char**.
The client data is supposed to be untyped, there is really no reason (other
than compatibility with C conventions of 40 years ago) to use char** here.
So don't do it and provide the versions taking "void**" keeping "char**" ones
for backwards compatibility only.

Also deprecate GetSelectionClientData() that returned char* and add a new
GetSelectionData() returning void* instead.

Closes #13876.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-05 14:18:33 +00:00
Vadim Zeitlin
d928f01967 Fix setting frame icon when using non-standard icon sizes in wxMSW.
Set the closest (and larger, if possible) icon if the icon of exactly the
system icon size is not available. This fixes setting the icons when using
custom DPI settings under MSW as the standard icon size may be different from
the standard 32*32 in this case.

This also improves wxIconBundle::GetIcon() to make its behaviour when the icon
with exactly the given size is not found more flexible as a side effect.

Closes #13891.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-24 22:17:47 +00:00
Vadim Zeitlin
c7a49742ec Add support for stricken-through fonts.
Support stricken-through fonts in wxMSW and wxGTK (including special support
in wxStaticText and wxTextCtrl).

Closes #9907.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-23 11:28:28 +00:00
Vadim Zeitlin
421388f204 Fix time zone in wxDateTime::UNow().
The internal wxDateTime representation is in the UTC, so use
wxGetUTCTimeMillis() in UNow(), using wxGetLocalTimeMillis() made it
inconsistent with Now() and wrong.

Really closes #13862.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-20 22:11:55 +00:00
Vadim Zeitlin
ab9d6a4c8b Add SetPostBuffer(wxMemoryBuffer) and SetPostText() to wxHTTP.
This allows to post binary data or text data in e.g. UTF-8 encoding (which is
by far the most common case) easily.

Deprecate the existing SetPostBuffer(wxString) as it didn't explicitly specify
the encoding to use for the data to be posted.

Closes #13870.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-20 12:22:25 +00:00
Steve Lamerton
accc94d55c Implement IDocHostUIHandler in wxWebViewIE to improve the default behaviour. Disable built-in keyboard handlers, remove the 3D border and enable themes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-15 19:19:00 +00:00
Vadim Zeitlin
e4a23857ec Implement wxMenuBar::EnableTop() for wxMSW and wxGTK.
This method was only available in wxUniv before and just always returned true
in the other ports. Implement it for wxMSW and wxGTK too now and document it.
Also add a unit test.

Closes #795.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-15 13:41:17 +00:00
Vadim Zeitlin
be74a2a21a Fix the size of the font returned from wxTextCtrl::GetStyle() in wxMSW.
Due to a typo the size was expressed in 1/10th of a point and not in points.
Fix this and add a unit test checking that GetStyle() returns the same font as
was set by SetStyle().

Closes #2120.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-14 17:57:11 +00:00
Vadim Zeitlin
d1bf0be0bc Enhance wxRibbonToolBar functionality to wxRibbonButtonBar level.
Allow inserting and deleting tools and not only appending them.

Add possibility to enable/disable and toggle tools.

Send wxUpdateUIEvent for the tools.

Add various properties accessors.

Closes #13835.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-08 14:52:56 +00:00
Vadim Zeitlin
6a0e4ead1e Add wxTopLevelWindow::SetRepresentedFilename().
This currently is only implemented under OS X and sets the proxy icon there
but could be implemented to do something useful under the other platforms too
in the future.

Closes #13797.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-08 14:52:47 +00:00
Vadim Zeitlin
94248d2ed1 Implement best size calculation for report mode wxListCtrl.
Use the column labels to determine the minimal width required by the control
to show them all in full.

Also declare all image list and column-related wxListCtrl methods in
wxListCtrlBase now as we need some of them in DoGetBestClientSize()
implementation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-07 15:09:43 +00:00
Vadim Zeitlin
3b2f80c205 Set Z-position correctly for wxEVT_JOY_ZMOVE events.
Z-move events don't have (x, y) position, but they do have Z-position which
needs to be set.

Also don't use (x, y) position for these events in the sample.

See #748.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-07 15:09:29 +00:00
Vadim Zeitlin
444bc2b24d Implement support for "%z" in wxDateTime::Format() and Parse().
"%z" specifier can now be used when printing the dates out to specify the time
zone and is also recognized when parsing dates.

Closes #1215.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-05 00:47:10 +00:00
Vadim Zeitlin
59cd3bbd6c Fix child selection in multi-selection generic wxTreeCtrl.
The children which are not currently shown on the screen shouldn't be affected
by Shift-selecting in multi-selection control.

Closes #1312.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70249 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-03 00:44:47 +00:00
Vadim Zeitlin
ff4cb9160e Add wxRibbonButtonBar::InsertXXXButton() methods.
Allow inserting buttons into the ribbon bar and not only appending them.

Closes #13811.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70181 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-29 22:05:39 +00:00
Vadim Zeitlin
f01e56249a Allow using wxEVT_UPDATE_UI with wxRibbonButtonBar.
Generate wxUpdateUIEvent for the ribbon buttons to allow updating their state
using wxEVT_UPDATE_UI. Also update the same to show this.

Closes #12003.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70180 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-29 22:05:34 +00:00
Vadim Zeitlin
be8fbbff66 Store row/column selection more appropriately in wxGrid.
Use wxGridSelection::m_rowSelection and m_colSelection for storing the
selected rows/columns respectively instead of storing them in m_blockXXX
arrays. This makes more sense and allows to easily implement the proper
handling of Ctrl-clicking in the row or column selection modes.

Closes #12638.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70177 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-29 22:05:23 +00:00
Vadim Zeitlin
349f41fdbd Display help string for ribbon tools in a tool tip.
Show the help string of the ribbon item currently being hovered over in a
tooltip.

Closes #11879.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70175 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-29 22:05:15 +00:00
Vadim Zeitlin
7f3f059ac5 Complete wxEVT_MENU_{OPEN,CLOSE} implementation in wxMSW and wxOSX.
Set the wxMenu correctly for wxEVT_MENU_CLOSE events in wxMSW.

Set the menu id correctly to allow wxMenuEvent::IsPopup() to work for both
wxEVT_MENU_OPEN and wxEVT_MENU_CLOSE in wxOSX.

Closes #11313.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-28 13:51:17 +00:00
Vadim Zeitlin
59060c07b4 Update the value of read-only wxComboBox in wxUniv.
Fix regression in combobox appearance: it never showed the selected value when
it was read-only any more.

Closes #13688.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70126 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-27 01:21:46 +00:00
Vadim Zeitlin
3e65f74e18 Add support for more CSS styles to SPAN tag in wxHtmlWindow.
Add limited support font-family, font-style and text-decoration.

Closes #13170.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70120 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-27 01:21:26 +00:00
Vadim Zeitlin
864181f4f6 Implement wxNotebook::CalcSizeFromPage() for wxGTK.
The implementation is far from perfect as it relies on hard-coded margins but
is better than nothing as it allows wxNotebook best size determination and
SetPageSize() method to work correctly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-24 18:19:26 +00:00
Vadim Zeitlin
4ffdb64018 Add wxLogFormatter to allow easier wxLog output customization.
Delegate the log string creation to wxLogFormatter. This allows defining a
custom object of a class derived from it to customize the log output instead
of having to override DoLogRecord() in wxLog itself.

Closes #13792.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70086 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-22 13:35:01 +00:00
Vadim Zeitlin
fceac6bbfe Provide native implementation of wx{Date,Time}PickerCtrl for wxOSX/Cocoa.
Use NSDatePicker to implement both of these controls. Almost all of
wxDatePickerCtrl styles are not supported in the native version but the basic
functionality does work and looks much better than the generic version (which
is still available as wxDatePickerCtrlGeneric if needed) under Mac.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-20 21:27:14 +00:00
Vadim Zeitlin
4d0c23087a Fix horizontal alignment in icon view in generic wxListCtrl.
Ensure that all the items in the same column have the same width, so that
their labels are centred.

Closes #9227.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-20 21:21:38 +00:00
Vadim Zeitlin
aa866feeaa Mention the dialog focus regression fix in wxMSW in the change log.
See #13765.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70062 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-20 13:24:48 +00:00
Vadim Zeitlin
ee4d438064 Added support for wxEXEC_MAKE_GROUP_LEADER to wxExecute().
Map it to the native CREATE_NEW_PROCESS_GROUP flag as it's broadly similar to
Unix semantics.

Closes #13676.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-19 12:54:48 +00:00
Vadim Zeitlin
1c959a62ce Add possibility to set item background in generic wxDataViewCtrl.
Added wxDataViewItemAttr::SetBackgroundColour() and code to honour it in the
generic implementation of wxDataViewCtrl.

Closes #12621.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-19 12:54:38 +00:00
Vadim Zeitlin
75cb911c7c Added wxFilePickerCtrl::SetInitialDirectory().
This method allows to configure the initial directory to be shown when
browsing for files in an initially empty wxFileDirPickerCtrl.

It is also available for wxDirPickerCtrl but is less useful there.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-18 12:34:47 +00:00
Vadim Zeitlin
afe9b0559a Add the release date of 2.9.3 to the change log.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-14 00:46:12 +00:00
Vadim Zeitlin
4fe4a7c50f Add wxEXEC_HIDE_CONSOLE flag allowing to unconditionally do it under MSW.
Also renamed wxEXEC_NOHIDE to wxEXEC_SHOW_CONSOLE for symmetry (keeping the
old name for compatibility, of course).

Extend exec sample to allow easily testing the different flags and adding more
of them later.

See #13676.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-08 20:22:55 +00:00
Vadim Zeitlin
ff8cb900da Implement wxComboBox::Popup() and Dismiss() for wxOSX/Cocoa.
Unlike in the other ports, these methods currently don't generate any events
under OS X because these events are never generated at all there.

Closes #12642.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-07 23:41:06 +00:00
Vadim Zeitlin
7daecf9e6a Handle OpenBSD in wxDialUpManager code.
Closes #13716.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-02 12:04:42 +00:00
Vadim Zeitlin
edf5822ace Implement EVT_CHAR_HOOK for wxOSX/Cocoa.
Send wxEVT_CHAR_HOOK event from wxOSX/Cocoa code.

Also test for wxEVT_CHAR_HOOK in the keyboard sample and show the effect of
not skipping it.

Closes #12431.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-02 00:50:12 +00:00
Vadim Zeitlin
b9697cb410 Added wxCriticalSection::TryEnter() method.
This is similar to wxMutex::TryLock() and useful for the same reasons.

Closes #13638.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-01 14:22:15 +00:00
Vadim Zeitlin
1d8d3cc5a1 Add support for custom numeric formats to wxGrid.
Allow %e and %g formats (as well as their upper-letter equivalents) in
addition to the default %f format for number display in wxGrid.

Closes #13583.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69856 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-28 13:23:33 +00:00
Vadim Zeitlin
603c73dbba Implement wxStackWalker for wxMSW under x86-64.
Use 64 bit debug help functions instead of 32 bit ones and add code for
dealing with x86-64 stack frames.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-27 19:52:13 +00:00
Vadim Zeitlin
796e54ef37 Use wxGetUTCTimeUSec() in wxStopWatch under Unix for higher precision.
If gettimeofday() is available we can achieve better than millisecond
precision (even if it usually isn't as high as microsecond), so use it as
clock source in wxStopWatch.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69841 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-27 19:50:42 +00:00
Vadim Zeitlin
a43503cb8d Added wxGetUTCTimeMillis() and wxGetUTCTimeUSec().
Fixed wxGetLocalTimeMillis() to really return the local time and provide
wxGetUTCTimeMillis() doing what this function used to do before. Closes #13610.

Also add wxGetUTCTimeUSec() for even higher resolution time stamps as it is
basically the same as wxGetUTCTimeMillis() anyhow, at least for MSW and
non-ancient Unix systems providing gettimeofday().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-27 19:50:23 +00:00