Commit Graph

5280 Commits

Author SHA1 Message Date
Jouk Jansen
a0e3430a79 OpenVMS compile support for wxSPLASH and sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-01-21 11:04:40 +00:00
Vadim Zeitlin
90e95e6117 Rename WXTHREAD_XXX_PRIORITY yo wxPRIORITY_XXX.
This will allow to reuse the same constants for the process priorities in an
upcoming commit.

See #14931.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-01-20 02:10:07 +00:00
Vadim Zeitlin
2328f46863 Allow hiding/showing already hidden/shown wxGrid rows/columns.
Don't assert if an already hidden/shown row/column is being hidden/shown again
but simply don't do anything. This is more convenient because the code outside
wxGrid has no efficient way to only hide a row/column if it's currently shown.

Closes #14960.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73366 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-01-12 03:09:12 +00:00
Vadim Zeitlin
83c0a84c8c Re-lay out the grid sample window after auto-sizing the grid.
Changing the size of the grid without updating the sizer resulted in
overlapping windows and a mess on the display.

Closes #14948.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-01-03 20:47:18 +00:00
Steve Lamerton
c420d57be0 Add context menu enabling and disabling to wxWebView, all backends supported.
Closes #14789.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-31 13:21:21 +00:00
Steve Lamerton
c13815810e Add handling of http errors to wxWebViewIE. Tidy up existing large case statement.
Closes #14877.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73325 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-30 20:19:58 +00:00
Vadim Zeitlin
b7bd58d09a Ensure that scrollbars are shown in scrolled popup in the popup sample.
Don't call SetScrollbars(), this is overridden by sizer logic later. Instead,
add a sufficiently big window to the popup and make fix the size of the popup
itself to be smaller to ensure that the scrollbars do show.

Closes #14900.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-29 21:53:09 +00:00
Vadim Zeitlin
91270d2d17 Remove connection of MyDllApp::OnIdle() handler in the dll sample.
This method didn't really exist, the code only worked because it connected to
wxApp::OnIdle() which exists in wxMSW but not the other ports.

Simply remove the apparently unnecessary call.

See #13902.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-28 16:02:11 +00:00
Vadim Zeitlin
0ee169da2b Add wxListCtrl::EnableAlternateRowColours() and SetAlternateRowColour().
Add methods to simply enable alternative row background colours in wxListCtrl.

Closes #14618.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73239 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-22 02:33:23 +00:00
Vadim Zeitlin
87f0b1323b Don't use "Cancel" button in the about dialog of the listctrl sample.
No real changes, just remove the unnecessary button.

See #14618.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73238 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-22 02:33:04 +00:00
Vadim Zeitlin
55fd62c1e3 Open debugger at the location of failing assert, if possible.
Break into the debugger in the function containing the assert that failed
instead of inside wxWidgets assert handler which is several (~8) levels below
the last line of the user code. This is much more useful in practice and also
less confusing.

Currently this only works for MSVC as the other compilers don't have any
__debugbreak intrinsice equivalent.

Also update the except sample to test wxTrap() directly too.

Closes #11184.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73124 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-04 00:39:29 +00:00
Vadim Zeitlin
5edaa5ebb0 Correct lookup of Explorer-specific file association information.
The code added in r52154 never worked because it was looking for the Progid
value in a wrong place, look for it under UserChoice subkey where it really
is.

Also add a way to look up the command to open files with the given extension
to the exec sample.

Closes #12302.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-02 23:50:33 +00:00
Vadim Zeitlin
e9f012bc4c No changes, just reorganize the menu slightly in the exec sample.
Move all file association related commands under "File" menu from the "Exec"
one, having them there makes more sense and "Exec" menu is already quite big.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73105 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-02 23:50:10 +00:00
Paul Cornett
ea92bb677d use stock colour/pen/brush objects in samples
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-01 23:06:50 +00:00
Paul Cornett
0856cb2562 use new pen/brush style names in samples
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-01 22:34:07 +00:00
Paul Cornett
de91443612 remove colour/pen/brush arguments which are the default in the samples
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73091 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-01 22:14:36 +00:00
Paul Cornett
40a66cfd6a indentation fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73067 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-30 18:01:53 +00:00
Vadim Zeitlin
d83af3660a Compilation fix to docview sample after r73004.
Don't use wxDocManager::GetDocumentsVector() with VC6 which doesn't have it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-26 23:53:44 +00:00
Vadim Zeitlin
b62afb7914 Fix harmless warning about uninitialized variable in fswatcher sample.
Just always initialize it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73021 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-26 13:14:15 +00:00
Vadim Zeitlin
93d0805b35 Add wxDocManager::Get{Views,Documents,Templates}Vector().
Add accessors returning more convenient wxVectors to supplement the existing
ones giving access to internally used wxLists.

Closes #14814.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-24 17:37:12 +00:00
Vadim Zeitlin
3c3b6f6063 Add possibility to delay showing wxRichToolTip.
Optionally show the tooltip after a delay instead of doing it immediately when
Show() is called.

Closes #14846.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-23 14:32:15 +00:00
Vadim Zeitlin
40aa1a7e60 Implement GetSizeFromTextSize() for wxSpinCtrl.
Implement it for the native MSW and GTK versions and the generic one used in
the other ports and also for wxSpinCtrlDouble under MSW.

Also test this function in the spin page of the widgets sample.

Closes #14840.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-20 12:49:53 +00:00
Vadim Zeitlin
092e08a844 Add wxFSW_EVENT_UNMOUNT wxFileSystemWatcher flag and implement it for Linux.
This flag generates the corresponding event when the file system containing
the watched directory is unmounted. Currently it is only implemented for
Linux where unmounting now generates this event instead of an error.

Closes #14834.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-19 12:52:18 +00:00
Vadim Zeitlin
1ec4e9c2b7 Convert wxFSW_EVENT_{WARNING,ERROR} to string correctly.
Previously these types were not handled at all, resulting in asserts.

See #14834.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-19 12:51:54 +00:00
Vadim Zeitlin
f31f9900e4 Add wxFSW_EVENT_ATTRIB wxFileSystemWatcher flag.
This flag allows to monitor changes to the file attributes, such as file
modification time.

This patch adds the flag, support for it under Linux and the corresponding
modifications to the sample and the test suite.

Closes #14833.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-17 23:56:00 +00:00
Vadim Zeitlin
17c3ff902e Use wxID_EXIT for the "Quit" item in the exec sample.
This fixes the behaviour of the standard "Quit" menu item under OS X.

See #3204.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-11 13:10:21 +00:00
Vadim Zeitlin
80791c37b5 Fix incorrect wxSizerFlags::Border() call in the scroll sample.
Using 20 instead of a wxDirection resulted in an assert, fix the syntax.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72937 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-10 00:52:31 +00:00
Vadim Zeitlin
7a78a93782 Add wxControl::GetSizeFromTextSize() to size the control to its text.
This function can be used to size a, say, wxTextCtrl to be exactly of the size
needed to enter the given amount of text in it.

This patch adds wxGTK implementation for wxTextCtrl, wxChoice and wxCombobox;
changes to the samples and the documentation.

Closes #14812.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-09 21:11:37 +00:00
Vadim Zeitlin
639dbb6dd6 Restore propagation of EVT_SEARCHCTRL_CANCEL_BTN events to the parent.
This was broken by r72581, add event.Skip() call to the handler for this event
added there.

Also add a handler for this event to the corresponding page of the widgets
sample to be able to test this.

Closes #14799.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-06 23:56:21 +00:00
Vadim Zeitlin
244e36e8e2 Slightly improve the date/time dialogs in the calendar sample.
Use CreateStdDialogButtonSizer() instead of constructing
wxStdDialogButtonSizer directly, not only this is shorter but it also makes
the "OK" button default correctly.

Also initialize the labels instead of leaving them initially empty.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72898 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-04 23:55:22 +00:00
Vadim Zeitlin
5c299305d4 No changes, just make it easier to tweak splitter sample.
The sample contains disabled code for using other type of windows than
MyCanvas for the splitter children but it didn't compile any more because the
variables were declared as wxScrolledWindow. Fix this by using just wxWindow
for them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-04 23:51:58 +00:00
Vadim Zeitlin
84605707d1 Added wxEVT_COMMAND_DIRCTRL_CHANGED for wxDirCtrl selection changes.
This makes it much simpler to react to the changes in the control, update the
sample to show it.

Closes #14792.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-01 17:15:08 +00:00
Vadim Zeitlin
efafcdca4a Add distclean target to samples/Makefile.
It is necessary because it is used by the distclean target of the top level
makefile.

Closes #14793.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72840 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-01 17:14:59 +00:00
Stefan Csomor
551c2dcf88 adding constants for newer OSX versions to make sure our conditional expressions are working with earlier SDKs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72830 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-31 07:10:07 +00:00
Vadim Zeitlin
a715668100 Compare file paths using wxFileName, not wxString, in the sample.
Comparing paths using wxString is a bad idea as identical paths can be seen as
mismatching because of case-only differences.

Also, don't reset wxRadioBox selection from its selection handler, this
doesn't work under e.g. wxGTK and is a bad example.

Closes #14791.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72820 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-29 18:30:14 +00:00
Vadim Zeitlin
908d92cd83 Fix taskbar sample compilation under wxOSX/Cocoa.
Use wxTBI_XXX constants instead of wxTaskBarIcon::XXX ones which don't seem to
exist any longer.

See #11831.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-28 01:08:20 +00:00
Vadim Zeitlin
bdb4b8320d Break implicit dependency of "core" on "adv" via wxXmlResourceHandlerImplBase.
wxXmlResourceHandlerImplBase::GetAnimation() returned wxAnimation by value
which created references to wxAnimationCtrlNameStr and wxNullAnimation
symbols, defined in the "adv" library, in "core" when using Sun CC even though
they were not referenced directly.

Fix this by returning wxAnimation by pointer to keep it opaque for "core" code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72782 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-27 00:46:58 +00:00
Vadim Zeitlin
614e38dbb2 Implement clipping in wxSVGFileDC.
Support setting the clipping region and add update the documentation and the
sample accordingly.

Closes #14462.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72762 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-24 23:40:41 +00:00
Vadim Zeitlin
0fccda2ced Respect wxFileName::DontFollowLink() in wxFileSystemWatcher.
Watch the link itself and not its target if DontFollowLink() had been called.

Closes #14543.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-24 18:21:31 +00:00
Vadim Zeitlin
74a59798c0 Add support for wxRibbonBar and related controls to XRC.
Add wxRibbonXmlHandler and an example of using it to the xrc sample.

Closes #12058.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-23 13:52:27 +00:00
Vadim Zeitlin
ccc040255c Fix wxGrid editors background painting.
There were two fundamental problems: first, we painted on a separately created
wxClientDC instead of using the wxPaintDC already available in wxGrid. Second,
we invalidated the control while painting, resulting in endless repainting, at
least under wxGTK.

Fix the first problem by passing wxDC to wxGridCellEditor::PaintBackground()
and the second one by not refreshing the control from there as it just seems
unnecessary.

Also pass the attribute by reference for consistency with
wxGridCellRenderer::Draw() and because this pointer can never be NULL.

Closes #2628.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72697 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-17 16:44:02 +00:00
Vadim Zeitlin
0b3ef556f5 Handle deletion of watched directories in wxFileSystemWatcher sample.
Don't assert when trying to stop watching a directory that doesn't exist any
more later.

See #14544.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72683 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-15 01:10:12 +00:00
Vadim Zeitlin
1dc17bcafb Make TAB behaviour in wxGrid more configurable.
Allow making TAB/Shift-TAB wrap to the next/previous row or going to the
next/previous control when the cursor is at the end/beginning of the current
row easily.

Also add wxEVT_GRID_TABBING event to allow customizing TAB behaviour even
further.

Update the sample to show the different possible standard behaviours and a
stupid example of a custom one (it would be probably more useful to implement
something a tad more realistic, e.g. tabbing to the next non-empty cell).

Closes #14711.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-13 22:55:18 +00:00
Vadim Zeitlin
90bad79f70 Set the standard sample icon for the exec sample.
Do this for consistency with all the other ones and also because it makes it
simpler to notice any unwanted icons for hidden windows created by this sample.

See #13251.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72666 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-13 22:52:59 +00:00
Vadim Zeitlin
d34d31f6d6 Implement incremental search in wxGenericListCtrl.
Mostly copy wxGenericTreeCtrl incremental search implementation to
wxGenericListCtrl (unfortunately there is no simple way to reuse this code
currently), including the recently added EnableBellOnNoMatch() method.

Update the sample to test it, the key event handling in it had to be modified
to allow it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-07 22:42:27 +00:00
Vadim Zeitlin
27bc919446 Add a possibility to beep on no match to wxGenericTreeCtrl.
For consistency with Windows, allow to optionally generate a beep when
incremental search in the tree control doesn't find anything.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-07 22:42:02 +00:00
Vadim Zeitlin
94f39d8181 Add a setting for the disabled text colour to wxRibbon art.
Allow specifying the text for the labels of the disabled items separately.

Closes #14721.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72619 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-04 23:23:41 +00:00
Vadim Zeitlin
0015757fec Don't call ClearAll() before LoadFile() in the stc sample.
There is no need to clear the control contents before loading a file into it
because LoadFile() is supposed to do this on its own (although currently it
doesn't, which will be fixed soon).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72593 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-30 22:26:58 +00:00
Vadim Zeitlin
1d178139b2 Make stc sample startup faster.
Don't show "About" dialog on startup, this has nothing to do with the purpose
of this sample and is just annoying.

Also, don't select the entire file after opening it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-30 22:26:36 +00:00
Vadim Zeitlin
f5413b878c Add support for background-color style to span element in wxHTML.
Add code for setting/restoring background mode and use it to implement support
for changing the text background colour.

Closes #14443.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-30 22:20:58 +00:00