Commit Graph

51468 Commits

Author SHA1 Message Date
Vadim Zeitlin
06cfc05269 Add wxPoint::IsFullySpecified() and SetDefaults().
These methods do the same thing as wxSize methods with the same names and are
useful for the same reasons.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-11 16:03:51 +00:00
Vadim Zeitlin
01495abf87 Fix handling of help buttons with non-empty label under OS X.
Creating a button with wxID_HELP and a non-empty label used to always show
this label, even if it was just a standard "Help" or "&Help". This didn't work
at all as the help buttons under OS X are too small to show any label.

To fix this, use normal buttons, not help ones, if a really custom label is
used to ensure that it can be seen. And to still use the correct help buttons
in as many cases as possible, ignore the standard "Help" label and its
variants and don't show it at all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65258 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-11 16:03:46 +00:00
Vadim Zeitlin
34a1414265 Use correct format specifiers in wxString::Printf().
Using %d with size_t argument resulted in asserts, fix it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-11 16:03:04 +00:00
Vadim Zeitlin
1335062151 Fix line indices translation in wxGrid::DoEndDragResizeLine().
We used the translation in wrong direction, i.e. interpreted x coordinates as
rows and y coordinates as columns. This could result in passing invalid cell
indices to GetCellSize() and was generally completely wrong.

Closes #12311.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65242 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 22:39:04 +00:00
Vadim Zeitlin
0d2f3b9d7b WIP
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 22:39:00 +00:00
Vadim Zeitlin
276f883f7a Don't set Unicode key code in key events to non-Unicode values in wxGTK.
Only assign the wx key code wxKeyEvent::m_uniChar if it's a key corresponding
to an ASCII symbol, don't do it for the values outside of ASCII range such as
all the special WXK_ constants. It doesn't make sense to generate Unicode key
codes for e.g. cursor key presses.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65240 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 22:38:54 +00:00
Vadim Zeitlin
27607839f1 Use wxPanel as controls parent in wrapsizer sample.
Follow our own advice about never creating controls directly on the frame and
using an intermediate wxPanel in our own sample. This is better style and
makes it look better under Windows.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65239 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 21:48:22 +00:00
Vadim Zeitlin
d931703342 Inherit notebook background recursively under wxMSW.
With MSWSetTransparentBackground() hack only the panel which was the immediate
child of wxNotebook (i.e. its page) inherited the notebook background but not
its children. This resulted in jarring background discontinuities when nested
panels were used.

Fix this by inheriting notebook background in all child panels by testing for
the return value of the parents MSWHasInheritableBackground() method in
wxPanel::HasTransparentBackground() recursively.

Closes #12317.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65238 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 21:48:17 +00:00
Vadim Zeitlin
e9f935cb70 Fix wxBitmapButton initial best size determination in wxMSW.
This was broken during wxButton/wxBitmapButton merge and wxBitmapButton was
not created with the correct initial size if the default size was specified
when creating it any longer. Fix this by calling SetInitialSize() once again
after setting the bitmap.

See #12323.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65236 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 18:58:06 +00:00
Vadim Zeitlin
1cd44b9c5f Keep the button bitmap centered if the button has no label in wxMSW.
We should only honour the bitmap alignment if the button shows both the bitmap
and the label. If only the bitmap is shown (e.g. when wxBitmapButton is used),
it should always be centered as it used to be done in 2.8.

Closes #12323.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65235 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 18:58:02 +00:00
Vadim Zeitlin
aa83b6fc90 Remove obsolete and out of date Xcode project file.
The project files under build/osx should now be used, this Xcode project file
was out of date and couldn't be updated automatically.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65234 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 18:57:56 +00:00
Vadim Zeitlin
563cf28f2a Revert MSW window classes uniquification patch.
Making the class names unique doesn't seem to be necessary so revert the patch
which appended unique pointer value to their names (r57030).

See #9031.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65233 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 18:57:51 +00:00
Vadim Zeitlin
5ed0415e3e Don't use bitmap still selected in wxMemoryDC in image sample.
The bitmap must be deselected from wxMemoryDC before being used in any other
way but the sample didn't do this. Fix this by simply destroying the DC as
soon as we don't need it, this makes bitmap available for other use as well.

Closes #12310.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 18:57:47 +00:00
Vadim Zeitlin
5784031727 Use window position in screen coordinates in wxDisplay::GetFromWindow().
To determine the display to which the window belongs we must use the window
position in screen coordinates returned by wxWindow::GetScreenRect() and not
the positioned returned by GetRect() which is the same only for the top level
windows but not for the child ones.

Closes #12318.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65231 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 18:57:42 +00:00
Vadim Zeitlin
18ff59a401 Correct documentation of majorDimension in wxRadioBox ctor.
The default value of this parameter is 0, not 1. Also add the explanation of
what using 0 actually means.

Closes #12325.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 18:57:36 +00:00
Vadim Zeitlin
dbf9c0cdc1 Remove obsolete stc makefile.
This makefile is not used any more since stc was integrated into wx core.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65229 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 18:57:31 +00:00
Vadim Zeitlin
80ce465c64 Add wxDataViewCtrl::{Set,Get}CurrentItem().
Current item is the same as the selected item in single selection mode but in
multiple selection mode there was no way to neither get this item nor change
it before so add the new functions to allow doing this now.

The new methods are implemented for the generic, GTK and OS X/Cocoa versions
but only stubs are provided for OS X/Carbon.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65228 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 12:53:03 +00:00
Vadim Zeitlin
1e18430004 Don't lose selection in wxDataViewCtrl::Select() under Mac.
Calling Select() for an item should not deselect the other selected items in
multiple selection mode. This is consistent with the GTK and generic versions
behaviour and also just makes more sense but also document that this is indeed
the desired behaviour just in case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-09 21:17:51 +00:00
Jaakko Salli
6c78066f22 Moved wxPGProperty::SetFlag() to protected API since it does not have any side-effects that are usually desired in the user code. Added wxPGProperty::SetAutoUnspecified() since wxPG_PROP_AUTO_UNSPECIFIED can no longer be set (conveniently) with SetFlag().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65218 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-08 12:22:08 +00:00
Jaakko Salli
346f3fd640 Removed spurious semicolon that prevented compilation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65217 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-08 11:59:34 +00:00
Jaakko Salli
9ceed261f8 Added wxPGProperty::Enable() for conveniency. Refactored related code and improved related documentation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65216 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-08 11:41:20 +00:00
Vadim Zeitlin
62e9285aba Add name argument to wxDataViewCtrl ctor for consistency.
As all the other wxWidgets controls take the parameter in their ctor/Create()
it's unexpected that wxDataViewCtrl does not. Add the name parameter and pass
it to wxWindowBase::CreateBase() as usual.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65215 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-08 11:37:57 +00:00
Vadim Zeitlin
033a5ff5c7 Don't export wxDataViewCtrlInternal unnecessarily.
wxDataViewCtrlInternal is a private class used only inside wxWidgets itself
and doesn't need to be exported from the shared library, so remove the
unnecessary WXDLLIMPEXP_ADV from its declaration.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-08 11:37:50 +00:00
Vadim Zeitlin
4e848be7f6 Fix dataview sample compilation with wxUSE_DRAG_AND_DROP==0.
This allows to build it under wxX11. Unfortunately it still doesn't work at
all there.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65213 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-08 11:37:46 +00:00
Vadim Zeitlin
0c2a727057 Use helper class instead of manually calling gtk_tree_path_free().
No real changes, just simplify the code and make it more obviously correct by
ensuring that all temporary tree paths are always destroyed because they are
assigned to a wxGtkTreePath object which does it in its dtor instead of
calling gtk_tree_path_free() manually every time.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-08 11:37:41 +00:00
Vadim Zeitlin
17d98558b3 Add wxDataViewCtrl::GTKPathToItem() function and use it.
No real changes, just refactor the code to use a function mapping GtkTreeIter
to our wxDataViewItem and use it instead of duplicating its code everywhere.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65211 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-08 11:37:37 +00:00
Vadim Zeitlin
91012d561d Include wx/defs.h before testing for wxUSE_CHECKLISTBOX.
We need to include wx/defs.h that (indirectly) defines wxUSE_CHECKLISTBOX
before testing for it in wx/checklst.h, otherwise the test may fail if the
latter header is the first wx header included by the user code.

Closes #12306.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65210 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-08 11:35:55 +00:00
Vadim Zeitlin
d89b7c194d Correct a print format specifier mismatch in wxFileConfig::Parse().
Pass an int and not a size_t to a %d.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65209 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-08 11:35:49 +00:00
Bryan Petty
a9445eb48b Added the documentation for wxMemoryBuffer::AppendData(), it was lost in the Doxygen conversion.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-06 20:14:39 +00:00
Václav Slavík
aecf930c5e Fix DnD in generic wxDataViewCtrl when scrolled.
wxDataViewMainWindow drag and drop code incorrectly used Y coordinate
where X axis should be used to check whether the mouse is inside columns
area. This manifested itself as refusing to accept drops once the
control was sufficiently scrolled down.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65203 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-06 16:28:46 +00:00
Václav Slavík
926649a996 Fix attributes escaping when writing XML.
wxXmlDocument didn't correctly escape some characters that the spec says
must be escaped. Behaves correctly now.

Fixes #12275.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65192 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-04 14:57:30 +00:00
Julian Smart
bbd55ff956 Don't reset bullet number and outline number when applying style sheet.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65170 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-03 17:15:33 +00:00
Václav Slavík
a492bccff9 Fix MSVC warning about int->bool conversion.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65167 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-03 12:59:30 +00:00
Václav Slavík
0826c4d39a Fix Tab navigation when focused control is disabled.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-01 10:11:53 +00:00
Václav Slavík
ce5abbf9f5 Fix wxDataViewCtrl to omit expander space for all kinds of lists.
List-only models don't have expanders and so the control shouldn't
reserve any space for them; the notion of expander column doesn't make
sense here.

Previously, this was done correctly only for wxDataViewVirtualListModel;
"ordinary" list models, such as the one used by wxDataViewListCtrl, were
treated as generic tree models and 0th column had ugly empty space
reserved for (never used) expander.

This patch fixes it by adding IsListModel() helper function in
addition to existing IsVirtualListModel(). Some of the
IsVirtualListModel() tests were changed into IsListModel() checks as
appropriate.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-29 20:54:00 +00:00
Robert Roebling
e78778c8e2 Add ability to render checkbox in undeterminate state, fixes #12290: wxRendererGTK does not support wx.CONTROL_UNDETERMINED for checkboxes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65139 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-29 16:57:09 +00:00
Václav Slavík
780e4fd003 Fix gcc warning in wxDataViewListCtrl::ItemToRow().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65138 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-29 15:30:11 +00:00
Vadim Zeitlin
c8eab84f83 Fix wxOSX wxTextCtrl refactoring of r65129.
Add the Init() calls in wxNSTextFieldControl ctors forgotten the last time.

Closes #12284.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65131 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-28 18:22:26 +00:00
Vadim Zeitlin
40c4350f96 Allow non-modal windows shown from modal dialogs to work in wxOSX.
Use kCGUtilityWindowLevel for such windows instead of kCGFloatingWindowLevel
and also call setWorksWhenModal:YES.

Closes #12187.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65130 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-28 18:22:20 +00:00
Vadim Zeitlin
c072b9ec8a Add association between wxOSX wxTextWidgetImpl and wxTextEntry.
This allows to always find the correct wxTextEntry to use in the
implementation of text-related widgets without using any casts. Notably, the
wrong up-cast of wxWindow to wxTextCtrl in wxNSTextFieldControl::controlAction()
which resulted in a crash when the window was actually a wxComboBox can now be
fixed.

Closes #12284.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-28 11:27:01 +00:00
Vadim Zeitlin
f50d84586a Correct the check for MRU menu items range.
The last id of the range if offset by the first one by the number of items in
the menu, not the base id of the file history menu.

Closes #12141.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65128 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-28 11:26:49 +00:00
Vadim Zeitlin
1ef352a926 Correct id in the wxRichTextCtrl::OnUndo() documentation.
wxID_PASTE was wrongly used instead of wxID_UNDO.

Closes #12278.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65127 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-28 11:26:41 +00:00
Vadim Zeitlin
54cbdc6414 Return after activating already opened document in wxDocManager.
Add accidentally omitted "return" in wxDocManager::CreateDocument() to prevent
recreating already opened documents.

Closes #12277.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65126 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-28 11:26:33 +00:00
Vadim Zeitlin
4a49fa24c9 Fix harmless float to int conversion warnings in wxOSX build.
Add casts to truncate the values as the code intended anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-28 11:26:26 +00:00
Vadim Zeitlin
6178debcd3 Correct format specifiers used to show wxIPV4address.
wxIPV4address::IPAddress() used %lu to show each of (byte-sized) IPv4 address
components for some reason, which resulted in asserts about format specifier
mismatch. Fix this by just using %u.

Closes #12272.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65124 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-28 11:26:14 +00:00
Václav Slavík
fa629adae4 Add index-based selection functions to wxDataViewListCtrl.
These are convenience functions for work working with indexes, for
consistency with other wxDataViewListCtrl methods.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65122 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-27 21:45:50 +00:00
Václav Slavík
17de95e4e0 Add item<->row mapping helpers to wxDataViewListCtrl.
These are commonly needed when using wxDataViewListCtrl, yet they were
only available in wxDataViewIndexListModel.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65121 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-27 21:45:45 +00:00
Václav Slavík
9ba389145a Created the model in wxDataViewListCtrl::Create().
It was totally unexpected that construction through the ctor behaved
differently from Create(). Also, the behavior now actually matches
documentation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65120 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-27 21:45:37 +00:00
Václav Slavík
b390729ff9 Allow empty message in wxRearrangeDialog.
If the message is empty, don't reserve space for it at the top; instead,
just make the dialog a bit smaller.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65119 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-27 21:45:29 +00:00
Robert Roebling
a3a8d81d48 Let wxMSW report wxDataViewCustomRenderer::LeftClick() report the click position relative to the inner cell, not the window - as in wxGTK, fixes #12270: wxDataViewCustomRenderer::LeftClick behaves differently under wxGTK and
wxMSW

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-27 17:04:44 +00:00