Vadim Zeitlin [Sun, 15 Jan 2012 14:46:41 +0000 (14:46 +0000)]
Remove wxMGL port.
The company behind MGL toolkit (SciTech) doesn't exist since several years and
this port is not used by anybody, so remove it to ease maintenance burden.
Vadim Zeitlin [Sun, 15 Jan 2012 13:41:17 +0000 (13:41 +0000)]
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.
Vadim Zeitlin [Sun, 15 Jan 2012 01:05:28 +0000 (01:05 +0000)]
Remove Palm OS port.
The platform targeted by this port doesn't exist any more and the port never
achieved really working state so remove the code to avoid having to maintain
it.
Vadim Zeitlin [Sat, 14 Jan 2012 17:57:11 +0000 (17:57 +0000)]
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().
Vadim Zeitlin [Sat, 14 Jan 2012 17:57:08 +0000 (17:57 +0000)]
Update wxNotebook selection when user changes the page in wxOSX.
wxNotebook::m_selection was only updated if the selected page was changed
programmatically but not if it was done by the user. Do update it in this case
as well, it fixes generation of the events which was broken before because of
comparison of the new selection with the incorrect current selection value in
m_selection.
Vadim Zeitlin [Fri, 13 Jan 2012 11:36:33 +0000 (11:36 +0000)]
Call tzset() for all compilers before using time zone variable.
Changes of r66245 shouldn't have been specific to MSVC, we must call tzset()
when using any other compiler as well, otherwise time zone information can be
initially incorrect.
Vadim Zeitlin [Thu, 12 Jan 2012 18:15:12 +0000 (18:15 +0000)]
Correct wxDropSource constructors documentation.
The types of the arguments (wxCursor vs wxIcon) were inversed. Even though the
description correctly said that wxCursor version was used by MSW and wxIcon --
by wxGTK the converse was actually documented.
Fix this and also mention OS X.
Finally remove the unnecessary and useless destructor documentation.
Vadim Zeitlin [Wed, 11 Jan 2012 13:42:06 +0000 (13:42 +0000)]
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).
Vadim Zeitlin [Tue, 10 Jan 2012 23:11:39 +0000 (23:11 +0000)]
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.
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.
Vadim Zeitlin [Mon, 9 Jan 2012 18:48:42 +0000 (18:48 +0000)]
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.
Vadim Zeitlin [Mon, 9 Jan 2012 18:48:34 +0000 (18:48 +0000)]
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.
Vadim Zeitlin [Sun, 8 Jan 2012 14:52:51 +0000 (14:52 +0000)]
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.
Vadim Zeitlin [Sun, 8 Jan 2012 14:52:47 +0000 (14:52 +0000)]
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.
Vadim Zeitlin [Sat, 7 Jan 2012 15:09:54 +0000 (15:09 +0000)]
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.
Vadim Zeitlin [Sat, 7 Jan 2012 15:09:51 +0000 (15:09 +0000)]
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.
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.
Vadim Zeitlin [Sat, 7 Jan 2012 15:09:43 +0000 (15:09 +0000)]
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.
Vadim Zeitlin [Thu, 5 Jan 2012 12:51:42 +0000 (12:51 +0000)]
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).
Vadim Zeitlin [Thu, 5 Jan 2012 12:51:40 +0000 (12:51 +0000)]
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.
Vadim Zeitlin [Thu, 5 Jan 2012 12:51:37 +0000 (12:51 +0000)]
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.
Vadim Zeitlin [Tue, 3 Jan 2012 00:40:27 +0000 (00:40 +0000)]
Document wxIMAGE_OPTION_CUR_HOTSPOT_[XY] in wxCursor ctor.
These options were already mentioned in wxCursor documentation but not
prominently enough, so mention them explicitly in the documentation of
wxCursor ctor from wxImage.