Commit Graph

54485 Commits

Author SHA1 Message Date
Steve Lamerton
cb9a0fbe65 Add missing aui dependencies to the notebook sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70321 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-12 10:26:51 +00:00
Václav Slavík
49f89f4d4b Don't react to Enter/Space/F2 with modifiers in generic wxDataViewCtrl.
Doing so was in conflict with system shortcuts; Alt+Space in particular
is used by Windows.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-11 13:42:53 +00:00
Vadim Zeitlin
8ba1d512d3 Only declare wxDialog::SetWindowStyleFlag() when wxUSE_DIALOG_SIZEGRIP.
This method was only defined when wxUSE_DIALOG_SIZEGRIP==1 so avoid declaring
it when wxUSE_DIALOG_SIZEGRIP==0 to fix compilation in this case (i.e. under
Windows CE).

Closes #13852.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-11 13:42:06 +00:00
Vadim Zeitlin
51c2f7ea41 Add wxUSE_OWNER_DRAW checks to wxMSW wxMenu code.
Allow compiling with wxUSE_OWNER_DRAW==0. This fixes another problem in
Windows CE build where owner drawn menus are not supported.

Closes #13851.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-11 13:42:02 +00:00
Vadim Zeitlin
29686ebc00 Fix UI in generic wxListCtrl when pressing cursor arrows while editing.
Pressing Up/Down keys while editing an item changed the selection but left the
in-place editing control on the previously selected item which was just wrong.
Ignore these keys to avoid it.

Notice that there is an underlying bug somewhere in wxGTK because we shouldn't
be getting these events in the first place while the in-place editing text
control has focus but it doesn't seem easy to fix so work around it here.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-10 23:11:39 +00:00
Dimitri Schoolwerth
5e9b80221a Fixed clicking on MSW slider not changing value with small ranges.
If the range was 9 or less the SetPageSize call would pass a page size of 0, resulting in the value not being changed when clicking on the slider area (outside the thumb). Fix this by at least passing a page size of 1 to SetPageSize.

Closes #1608.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70314 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-10 17:09:11 +00:00
Vadim Zeitlin
102db80fb5 Fix wxFrame::AttachMenuBar() compilation under Windows CE.
There was a typo in GetHwnd() call.

Closes #13848.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70313 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-10 17:01:20 +00:00
Vadim Zeitlin
d58c7af849 Use wxAbort() instead of abort() to fix Windows CE build.
abort() is not defined under CE.

Closes #13847.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-10 17:01:17 +00:00
Vadim Zeitlin
975dc6910e Added wxAbort() which can also be used under Windows CE.
Windows CE doesn't have abort() so provide a wrapper which can be used even
there (see #13847).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-10 17:01:13 +00:00
Vadim Zeitlin
864c08b2ed Add missing wxUSE_TOOLTIPS and wxUSE_UXTHEME checks to wxMSW.
Allow compiling wxStatusBar without tooltips and theme support.

Closes #13846.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-10 17:01:09 +00:00
Václav Slavík
f52f37959d Don't crash in generic wxDataViewCtrl if selected column is removed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-09 18:59:23 +00:00
Vadim Zeitlin
f1cfa1132c Add check for _T() to svn pre-commit hook.
_T() shouldn't be used in any new code so don't allow committing it.

We could have used "svnlook diff" instead of "svnlook cat" and check only for
_T() not being added but in practice there shouldn't be any difference and
using "cat" is simpler.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-09 18:48:42 +00:00
Vadim Zeitlin
ebd98179c5 Use wxT() instead of _T() in XTI code.
_T() is deprecated and doesn't work with Solaris compiler, use wxT() instead.

Also change one occurrence of _T() inside a comment in wx/debug.h.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-09 18:48:39 +00:00
Vadim Zeitlin
9349c84fdb Use wxT(), not _T(), in wxRichText code.
_T() doesn't compile with Sun CC and is deprecated, please don't use it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-09 18:48:36 +00:00
Vadim Zeitlin
3b7e7e2497 Resolve ambiguity between two wxAuiNotebook overloads.
wxAuiNotebook-specific InsertPage() and the version inherited from
wxBookCtrlBase were ambiguous if used with default values for their 2 last
arguments. Resolve this by removing defaults from the inherited version.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-09 18:48:34 +00:00
Julian Smart
bb7bbd12d3 Improved layout, in particular passed a container size in order to allow relative size calculation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70303 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-09 14:19:50 +00:00
Dimitri Schoolwerth
d9384bfb6d no code changes, fixed some typos
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-09 14:04:25 +00:00
Jouk Jansen
9fa7b43626 Correction for the #define wxUSE_DRAG_AND_DROP 0 case
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-09 07:18:19 +00:00
Paul Cornett
02800dde9e move render params out of wxDataViewCustomRenderer
they only need to exist for the duration of the render() call

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-09 06:31:07 +00:00
Julian Smart
1199fbd4e0 Fixed default style setting to take into account text boxes; fixed AddBoxStyle
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70299 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-08 18:27:47 +00:00
Vadim Zeitlin
1076e695b4 Fix menu creation in wxOSX/Carbon when using wx in a plugin.
In this case the host application may have its own menu so we need to avoid
conflicting with its menu elements.

Closes #13832.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-08 14:52:59 +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
becc95d84b Don't generate drag events without valid item in wxGenericListCtrl.
Dragging the mouse from the empty area of the control must not generate any
drag events as there is nothing to drag there. Also, MSW version doesn't do
it.

So fix the generic version to avoid generating such invalid drag events too by
checking that we have a valid item before checking that we're dragging.

Closes #1619.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-08 14:52:51 +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
bc5bb77365 Another wxOSX/Carbon compilation fix after wxListCtrlBase changes.
Fix DoInsertColumn() parameter const-ness too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-08 10:54:28 +00:00
Paul Cornett
2df9f4581c use correct signature for init functions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-08 07:12:35 +00:00
Paul Cornett
8a724edb3d remove unnecessary class definitions and variables
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70292 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-08 06:40:26 +00:00
Paul Cornett
8945688a86 remove unnecessary finalize overrides
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70291 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-08 06:30:55 +00:00
Vadim Zeitlin
0482be5e1d Fix wxOSX/Carbon compilation after wxListCtrlBase introduction.
Make wxListCtrl::SetColumn() item parameter const reference.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-08 00:55:22 +00:00
Vadim Zeitlin
22f772f8e3 Compilation fixes to joystick sample after r70279.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70287 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-07 16:35:02 +00:00
Vadim Zeitlin
0dc45ad6b5 Compilation fix for PCH-less build after wxListCtrlBase changes.
Include the base class declaration from wx/listbase.h.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70286 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-07 16:11:10 +00:00
Vadim Zeitlin
3d167c0022 Improve column auto-sizing code in generic wxListCtrl.
Take the width of the header itself into account when setting width to
wxLIST_AUTOSIZE.

Also refactor the code to reuse the code used in wxLIST_AUTOSIZE_USEHEADER
case in SetColumnWidth() when inserting or updating the column width to this
value.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-07 15:09:54 +00:00
Vadim Zeitlin
0fb731b8bf Add support for wxLIST_AUTOSIZE_USEHEADER to InsertColumn().
Use the fixed default width in InsertColumn() by default for compatibility but
allow more useful behaviour in it by supporting wxLIST_AUTOSIZE_USEHEADER as
well.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70284 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-07 15:09:51 +00:00
Vadim Zeitlin
c23edb1b71 Add convenient wxListCtrl::AppendColumn() wrapper.
In the vast majority of cases, columns are just appended to the end and not
inserted at arbitrary positions in wxListCtrl so provide a convenient wrapper
to do this, especially as it's really trivial to do it now when it can be done
only once at wxListCtrlBase level.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-07 15:09: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
a9bd911fde Replace 3 copies of wxListCtrl mode tests with a single one in wxListCtrlBase.
Move InReportView() and IsVirtual() into the base class as they were the same
in all the implementations.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-07 15:09:37 +00:00
Vadim Zeitlin
26df5dd39a Add wxListCtrlBase common base class for port-specific wxListCtrl.
This base class is currently trivial, more methods will be moved to it from
the derived classes later.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-07 15:09:34 +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
f9aa52355e Joystick messages coordinates are unsigned, treat them as such.
Apparently the joystick messages (x, y) coordinates are unsigned, so use
LOWORD/HIWORD to extract them from LPARAM.

See #748.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-07 15:09:24 +00:00
Julian Smart
4e63bfb9b3 Removed compilation ambiguity between different forms of ...WithUndo functions.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70275 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-05 15:48:21 +00:00
Julian Smart
b9433288e4 Fixed box style application.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-05 14:10:24 +00:00
Julian Smart
61e6149e58 Fixed #13833: wxRichTextCtrl: 'Copy' can grab an extra character
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-05 14:08:52 +00:00
Vadim Zeitlin
18dd537805 Ensure that wxListEvent::m_itemIndex and m_item.m_itemId are in sync.
Unfortunately we have two ways to get the item affected by wxListEvent: via
its m_itemIndex (or GetIndex()) and m_item.m_itemId (or GetItem()). This can't
be changed for the usual backwards compatibility reasons but at least make
sure that both contain the same values in the events sent by the generic
version (MSW one already did it).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-05 12:51:42 +00:00
Vadim Zeitlin
8c62f53ee2 Don't fill wxListEvent::m_item when using virtual list control in wxMSW.
When using virtual list control the main program already has the items data so
it's completely useless to call GetItem() when preparing an event for it. It
is also inefficient to call GetItem() for potentially many items.

For both of these reasons the generic version already didn't fill the item
contents for virtual list controls events. Now modify wxMSW to not do it
neither.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-05 12:51:40 +00:00
Vadim Zeitlin
1e40bd4c74 Initialize wxListItem::m_itemId to -1, not 0.
Currently we have two redundant pieces of data in wxListEvent: m_itemIndex and
m_item.m_itemId. The former is initialized to -1 by default which makes sense
as it means "no item". But the latter was 0 by default which not only didn't
make sense but also made it inconsistent with m_itemIndex for the events which
really didn't have any associated item.

Fix this by initializing m_itemId to -1 as well.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70270 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-05 12:51:37 +00:00
Vadim Zeitlin
86d19346c5 Fix wxDateTime unit test compilation without PCH.
Include wx/time.h to get wxGetTimeZone() declaration.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70269 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-05 10:21:46 +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
Julian Smart
cd72035387 Added box style functionality to style manager dialog
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70267 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-04 19:38:31 +00:00
Julian Smart
eb3d8a3319 Implement missing wxTextBoxAttr::IsDefault function
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70266 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-04 16:32:08 +00:00
Vadim Zeitlin
2f783a2390 More pt_BR translations from Felipe.
All the messages are now translated.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-04 15:53:08 +00:00