Commit Graph

4759 Commits

Author SHA1 Message Date
Vadim Zeitlin
9b7e022676 Add wxUSE_UIACTIONSIMULATOR and turn it off by default.
Disable the recently added wxUIActionSimulator class until the issues with it
mentioned at http://article.gmane.org/gmane.comp.lib.wxwidgets.devel/119792/
are fixed.

Also use "" around wx headers instead of <> in wx code itself.

See #11801.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-22 11:40:35 +00:00
Vadim Zeitlin
0772a89875 Ensure that setting wxChoice height to its default value does set it.
Setting wxChoice height to its default value didn't change the height even if
the current height was different from the default. This resulted in problems
when a wxChoice was used inside a wxAuiToolBar because AUI temporarily reduces
the toolbar size to (1, 1) when docking it (thus ensuring that the height of
wxChoice is changed too) and generally didn't make sense.

Fix this by resetting the height to the default value if the value passed to
wxChoice::SetSize() is what it considers to be its default height.

Add a unit test for this bug and also add a wxChoice to AUI sample to allow
testing for wxChoice behaviour inside a wxAuiToolBar being [un]docked.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-18 15:07:39 +00:00
Vadim Zeitlin
8783d72f04 Add a "not specified" icon style to the message box test dialog.
The sample allowed to test the behaviour with all wxICON_XXX including
wxICON_NONE but not without any icon styles at all. Do allow it now.

Also use symbolic names for the radiobox indices for clarity.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-14 14:15:42 +00:00
Vadim Zeitlin
d9ffb9fdcc Use event tables instead of Bind() in uiaction sample.
This should fix VC6 build broken by addition of this sample as VC6 doesn't
support Bind(). Luckily, there is no need to use it here anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-13 21:58:04 +00:00
Kevin Ollivier
07b3552ed0 Add uncommitted uiaction `sample bakefiles.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63646 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-06 21:30:59 +00:00
Kevin Ollivier
b0a50d5a1f Rebake after wxUIActionSimulator addition.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-06 20:15:39 +00:00
Kevin Ollivier
a02a5cfcf3 Adding wxUIActionSimulator, a class for programmatically controlling the mouse and keyboard.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-06 20:09:23 +00:00
Vadim Zeitlin
917f228a1f Reset wxAuiNotebook selection to wxNOT_FOUND if it becomes empty.
The selection was 0 in a notebook without any pages which was wrong as it must
always be less than the page count.

Fix this in wxAuiNotebook itself and add an assert checking for this invariant
to the sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63642 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-06 13:30:01 +00:00
Vadim Zeitlin
1bab36277c Fix toggling the header in the generic wxListCtrl.
We need to update the lfags first before deciding whether we should create or
destroy the header.

Also add a test for toggling the header to the listctrl sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63637 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-06 00:31:00 +00:00
Vadim Zeitlin
f9199323a4 Make the code more clear in aui sample and avoid g++ 4 warning.
The code used bitwise XOR which was rather difficult to read and also resulted
in g++ 4 warnings about suggested parentheses.

Fix both issues by using bitwise AND and OR in two separate statements instead.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-05 23:55:23 +00:00
Vadim Zeitlin
76680db44a Avoid conflict between accelerators in the notebook sample.
Ctrl-5 was used both for the treebook in the "Type" menu and default
orientation choice in the "Orientation" menu.

Use Alt-[0..4] for the "Orientation" menu entries.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63631 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-05 23:55:14 +00:00
Jaakko Salli
abf5c8a3b4 Have to check for wxPG_SPLITTER_AUTO_CENTER style before setting propgrid column proportion in the sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-01 15:26:07 +00:00
Jaakko Salli
7fe5c04d6a Fixed property Hide command
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63556 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-25 14:04:25 +00:00
Jaakko Salli
fe01f16e53 Added wxPropertyGridInterface::SetColumnProportion(); wxPG_SPLITTER_AUTO_CENTER window style now supports column counts higher than two.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63481 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-14 14:09:06 +00:00
Vadim Zeitlin
f2d7fdf7b0 Add support for showing "elevation" icon in wxMSW buttons.
Add, document and test in the widgets sample wxButton::SetAuthNeeded().

Closes #11705.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63421 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-08 19:52:00 +00:00
Vadim Zeitlin
2d1e63c0a5 Test wxTE_PROCESS_ENTER style in the widgets sample.
Add a checkbox for toggling wxTE_PROCESS_ENTER to the text page and use this
style by default. This makes it easier to check that this style works as
intended, including that it generates the correct events.

See #11691.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63379 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-03 21:07:46 +00:00
Jaakko Salli
8669431add Added command to set wxPG_PROP_READONLY in the propgrid sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63336 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-31 18:14:24 +00:00
Stefan Csomor
86c3808c28 adding window-modal message box sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-28 09:54:51 +00:00
Vadim Zeitlin
5cb3a695e0 Add wxTreeCtrl::SelectChildren() method.
Add MSW and generic implementation, documentation and change to the sample
showing it.

Closes #11620.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-26 12:43:39 +00:00
Vadim Zeitlin
d1d1f8175d Add wxComboBox::Popup() and Dismiss() to manually show or hide its popup.
Add implementations for wxMSW and wxGTK.

Closes #11506.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63242 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-24 01:00:45 +00:00
Vadim Zeitlin
d21866cbd7 No changes, just remove the strange "#if 1".
This was apparently unintentionally added in r15050 to all files of the
widgets sample and somehow survived in this one only until now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-24 01:00:33 +00:00
Vadim Zeitlin
aa4919edd1 Use theme functions for drawing owner-drawn menus.
This makes the menu items with custom attributes or bitmaps look more native,
especially on post-XP systems.

Closes #11420.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63223 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-23 13:21:36 +00:00
Vadim Zeitlin
5852e62f1f Add support for stretchable spacers to XRC wxToolBar handler.
Notice that currently only stretchable spacers are supported via
separator-like "space" XRC element. If we ever add support for fixed spacers
in the toolbar we should do it via its fixed sub-element, e.g. they would be
specified with <fixed>1</fixed> in XRC file.

Also use spacers instead of separator in the XRC sample and ensure that the
toolbars in it are resized.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63172 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-18 00:29:00 +00:00
Vadim Zeitlin
27db5c5580 Show the more metrics for the selected font in the sample.
Show the result of wxDC::GetChar{Width,Height}() and the font size in pixels
in addition to the font size in points.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63168 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-18 00:28:35 +00:00
Kevin Ollivier
00fb97de2c Rebake.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-09 19:56:18 +00:00
Paul Cornett
abae3b805f fix broken #elif
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-08 04:05:31 +00:00
Jaakko Salli
07476eeabf Do not use deprecated property attribute wxPG_ATTR_INLINE_HELP (fixes #11605)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63093 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-07 19:35:33 +00:00
Kevin Ollivier
da8b1d4b3b Rebake from clean wx tree.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63052 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-04 00:45:45 +00:00
Jaakko Salli
e16bff8e62 Changed wxPropertyCategory to use same cell rendering code as regular properties. This allows labels for category columns other than the first. Rendering code was heavily modified to allow 'merging' of cells when needed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-29 16:04:40 +00:00
Vadim Zeitlin
62f6be4448 Ensure that frame is re-laid out when its toolbar is deleted.
The code in wxFrameBase::SetToolBar() didn't work correctly when toolbar was
unset using SetToolBar(NULL) because the frame toolbar pointer was reset
before layout was done resulting in the frame not recognizing its (still
existing) toolbar child as one of its bars and so nothing was done at all when
the frame had a single child, as in the toolbar sample.

Correct this by carefully ensuring that the toolbar pointer is still set at
the moment of the layout but hide the toolbar to ensure that no place is
allocated for it.

Also mention that it is not necessary to call SetToolBar(NULL) at all if the
toolbar is being deleted anyhow in the sample as toolbar does this itself in
its destructor.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63007 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-28 16:18:37 +00:00
Vadim Zeitlin
93ffd498e6 Correct initial value of "Toggle toolbar" check menu item in the sample.
This item should initially be checked because the toolbar is initially shown.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-28 16:18:30 +00:00
Jaakko Salli
534090e354 Replaced 'InlineHelp' property attribute with 'Hint'; Use SetHint() wxTextCtrl and wxComboCtrl member function to set it; Added a small section about help string and hint text in propgrid overview
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-26 10:45:04 +00:00
Jaakko Salli
3e6d8c3118 Added wxPropertyGrid::SetUnspecifiedValueAppearance(); Added wxPGEditor::SetControlAppearance() for applying wxPGCell attributes on a property editor.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-22 16:12:02 +00:00
Vadim Zeitlin
69bc65e3f8 Remove the test of erase background events from the toolbar sample.
Handling erase background events for toolbars never worked for the ports other
than wxMSW and now it doesn't work for MSW neither as we need to skip erasing
the background in WM_ERASEBKGND handler to avoid flicker which would result
from erasing the background twice, from there and from WM_PAINT handler which
must do it. So don't even try to test if it works, it's unlikely to be very
useful anyhow.

This reverts the change to this file in r62805.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62972 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-22 15:37:49 +00:00
Vadim Zeitlin
a30305f8b0 Add test of accelerators using both ASCII and non-ASCII keys to the sample.
Test using 'Ctrl-A', just 'A' and 'Esc' as accelerators as all of them except
the first one were reported not to work in some cases.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-17 16:44:22 +00:00
Jaakko Salli
b5aaf62e97 'Set to Unspecified' -> 'Set Value to Unspecified'
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-14 15:18:52 +00:00
Jaakko Salli
f525476870 Added wxPropertyGridManager header support; Refactored wxPropertyGrid DoSetSplitterPosition() code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62867 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-13 12:00:04 +00:00
Jaakko Salli
9d136b8b50 Added a proper log frame to the propgrid sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-12 09:59:20 +00:00
Jaakko Salli
5405bfb439 Generate wxPropertyGrid splitter (column divider) events: wxEVT_PG_COL_BEGIN_DRAG, wxEVT_PG_COL_DRAGGING, wxEVT_PG_COL_END_DRAG
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62861 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-12 09:38:10 +00:00
Vadim Zeitlin
cc26010927 Add support for stretchable spaces to wxToolBar.
Stretchable spaces consume all extra toolbar space not allocated to the fixed
size items. They can in particular be used to right-align (some) toolbar tools.

Add and document the new API, change the sample to show it and implement it
for MSW, GTK and OS X/Cocoa.

Also refactor MSW background erasing/repainting code to avoid duplicated calls
to DrawThemeBackground(), call it from a new helper MSWEraseRect() function.

Note that we may want to add support for "invisible" separators, IOW
non-stretchable spaces. This could be easily done for MSW after the changes in
this commit and is supported natively by GTK+ and Cocoa so implementing this
would be trivial if there is any interest.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-10 03:04:19 +00:00
Vadim Zeitlin
2d8e0096cd Better handling for asserts in non-main threads.
Don't call wxTrap() when an assert in a non-main thread fails. As asserts are
now always enabled by default, this is not a good idea. Instead just show the
full details about the assert failure using wxMessageOutputDebug under the
platforms without MT-safe message box function (i.e. everything but MSW
currently).

Add a possibility to test an assert happening in non-main thread to the except
sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-09 14:59:08 +00:00
Vadim Zeitlin
5ceb93670c No real changes, just remove __WXDEBUG__ tests.
These tests are unnecessary now because asserts are almost always enabled. We
could test for wxDEBUG_LEVEL but the code still compiles even if it's defined
as 0 so there doesn't seem to be any need for it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62841 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-09 14:59:01 +00:00
Vadim Zeitlin
5cd3213b65 Override OnAssertFailure() and not deprecated OnAssert() in except sample.
Also make the overridden version more interesting instead of just calling the
base class method from it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62840 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-09 14:58:56 +00:00
Vadim Zeitlin
40ff272990 Explicitly link the SDK application example with user32.lib.
As this sample uses GUI Windows functions, it requires this library.

Not sure why it isn't added by bakefile automatically for app-type==gui
target.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-09 13:31:46 +00:00
Vadim Zeitlin
94b6ce7f4b Use X64 machine type for MSVC linker instead of old AMD64.
The officially supported machine type name is X64 now, even if AMD64 is still
supported.

Closes #10711.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62825 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-08 16:36:37 +00:00
Vadim Zeitlin
efe2190fa7 Fix duplicate accelerator use in animate sample.
Both "Play" and "Stop" used Ctrl+P.

Closes #11425.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62824 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-08 16:35:54 +00:00
Vadim Zeitlin
6087ca88c1 Visually show the cells boundaries in layout sample grid sizer test.
Closes #11456.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62822 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-08 15:56:26 +00:00
Julian Smart
64178c3602 Speed up adding pages during freezing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-08 14:07:43 +00:00
Vadim Zeitlin
4b59c898ed Add a very simple example of a Win32 application using wx DLL.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62812 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-07 16:27:23 +00:00
Vadim Zeitlin
1acea7877b Use __declspec(dllexport) instead of WXEXPORT in dll sample header.
This header can be included from non-wx code so we can't use wx symbols in it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-07 16:27:14 +00:00