Commit Graph

5998 Commits

Author SHA1 Message Date
Vadim Zeitlin
e4c903b2ea Fix wxWrapSizer minimal size calculation.
Add a unit test checking that wxWrapSizer::CalcMin() returns the expected
results.

Closes #12464.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-08 13:36:13 +00:00
Vadim Zeitlin
a5c468483d Allow accessing 64 bit registry from 32 bit MSW code and vice versa.
Implement support for KEY_WOW64_32KEY and KEY_WOW64_64KEY in wxRegKey code.

Closes #10792.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66851 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-06 01:01:01 +00:00
Vadim Zeitlin
0a12e013f5 Deprecate second parameter of wxSlider::SetTickFreq().
This parameter was never needed nor properly documented. Simply remove it from
SetTickFreq() and keep the overload still taking it for backwards
compatibility only.

Closes #12907.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-05 16:36:30 +00:00
Vadim Zeitlin
c20389eb5f Implement restoring default video mode under OS X.
Use CGRestorePermanentDisplayConfiguration() to implement switching to default
video mode in wxOSX wxDisplay implementation.

Closes #12914.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66843 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-05 16:36:18 +00:00
Dimitri Schoolwerth
15f345aad3 Added support for reading comments from a GIF image.
Applied (modified) patch by troelsk. Changed comments (which are allowed per frame in an animated GIF) to be read using wxIMAGE_OPTION_GIF_COMMENT with wxImage.GetOption. Added unit tests for reading and writing GIF comments.

Closes #12843.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-02 11:19:30 +00:00
Dimitri Schoolwerth
77b83d0a0f Added GIF and animated GIF saving support.
Applied (modified) patch by troelsk. Also added a basic unit test for checking the frames of a saved animated GIF (a previous unit test already handles content of a GIF with a single frame).

Closes #8583.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-19 12:28:31 +00:00
Vadim Zeitlin
a54cf37118 Add wxIntegerValidator and wxFloatingPointValidator classes.
Add validators for integer and floating point numbers.

Add an example of their use to the validate sample as well as a new unit test
and documentation for them.

Use the new classes instead of wxTextValidator in wxGrid code.

Closes #12166.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-19 10:48:28 +00:00
Vadim Zeitlin
066e5e3fd2 Add wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG symbol.
Instead of writing a rather unreadable "defined(wxLongLong_t) &&
!defined(wxLongLongIsLong)" expression every time we need to decide if a
function needs to be overloaded for both long and long long, add a new symbol
which can be tested directly.

No real changes in the code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66711 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-19 10:47:49 +00:00
Vadim Zeitlin
6686fbad16 Add wxNumberFormatter class helping to deal with thousands separators.
wxNumberFormatter formats and parses numbers with thousands separators.

Add the class itself as well as documentation and the unit test for it.

See #12166.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-19 10:47:40 +00:00
Vadim Zeitlin
6e91eb1f76 Mention modal dialogs in the wxWindow objects allocation guide.
The modal dialogs are an important exception to the usual rules of dealing
with wxWindow-derived objects so mention them here too.

Closes #12880.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66709 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-19 10:46:31 +00:00
Vadim Zeitlin
f8ecadbf74 Add skeleton documentation for wxAuiToolBar and related classes.
Add classes declarations to Doxygen-generated documentation. This doesn't
replace the real documentation but is better than nothing.

See #10232.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-16 23:24:37 +00:00
Vadim Zeitlin
4254f67216 Add support for icons in wxAUI panes title bars.
Add wxAuiPaneInfo::Icon() method and shows its use in the sample.

Closes #12856.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66670 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-12 13:39:36 +00:00
Vadim Zeitlin
3603e5658f Add possibility to hide panels in wxRibbon.
Add wxRibbonBar::{Show,Hide}Panels() and ArePanelsShown() accessor.

Also add a toggle button to the sample to test the new functionality
(unfortunately it couldn't be done by a control in the ribbon itself as there
would be no way to show the panels back then).

Closes #12707.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66612 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-06 22:02:07 +00:00
Dimitri Schoolwerth
8ee313d2be Added support for saving PNG files with palette.
Based on (heavily modified) patch by troelsk.

Closes #12505.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66552 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-03 22:22:16 +00:00
Vadim Zeitlin
18f42b94df Remove calls to wxApp::SetTopWindow() from the samples and documentation.
It is definitely not necessary to call SetTopWindow() when there is only a
single top level window and it is arguable whether it's useful to do it even
when there are many of them so don't encourage its use in the documentation
and also remove all its occurrences from the samples.

Closes #12816.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66528 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-02 22:05:14 +00:00
Jaakko Salli
6f3f38980f Added 'HasAlpha' attribute for wxColourProperty. Setting it to true allows user to edit the alpha component.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66520 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-02 10:14:29 +00:00
Vadim Zeitlin
2e9b5717cd Add wxUSE_ARTPROVIDER_STD build option.
Make it possible to exclude wxDefaultArtProvider from build. Now that a
Tango-based provider exists, it may make sense to disable the standard bitmaps
if the program doesn't need the few of them not provided by Tango anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66506 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-31 17:39:37 +00:00
Vadim Zeitlin
c1d2466a79 Add wxArtProvider using Tango icons.
The icons are embedded as PNG images directly in the source code to avoid the
need for installing them. This does make the library larger though so provide
a wxUSE_ARTPROVIDER_TANGO option to turn the new code and associated bloat off.
Also turn it off by default under wxGTK as the native art provider is used
there anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-31 17:39:25 +00:00
Dimitri Schoolwerth
3d926ff8a9 Added saving support to TGA image handler.
Supports saving 24-bit and 32-bit (RGB with alpha).
Updated image unit test to verify the alpha channel of saved TGA images. Also removed a condition skipping a test which only was in place for TGA (formerly its saving handler would do nothing yet say saving was succesful).

See also #7661.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66485 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-28 22:38:04 +00:00
Jaakko Salli
94f090f241 Added section 'Customizing Keyboard Handling' into wxPropertyGrid overview
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-22 18:44:42 +00:00
Vadim Zeitlin
853149575e Switch to GtkTooltip from deprecated GtkTooltips in wxGTK wxToolTip.
Don't use deprecated GtkTooltips in wxGTK code any more, use the new
GtkTooltip instead.

Closes #12034.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66431 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-22 13:57:28 +00:00
Vadim Zeitlin
98f8e6666b Add the possibility to disable invisible wxDataViewCtrl items.
Add new wxDataViewModel::IsEnabled() and wxDataViewListStore::IsEnabledByRow()
methods and implement support for actually disabling the items in wxOSX/Cocoa
native implementation of wxDataViewCtrl and limited support for it in the
generic version.

We need to implement this in wxGTK using GtkCellRenderer "sensitive" propriety
later.

Closes #12686.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66403 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-19 15:02:56 +00:00
Vadim Zeitlin
6eefca4fb7 Allow wxAutomationObject::GetInstance() create new instance if needed.
When getting an instance of an OLE automation object, it is often useful to
connect to the existing instance if any or start a new one otherwise. Make
GetInstance() behave like this by default while still allowing to use the
wxAutomationInstance_UseExistingOnly flag to reestablish the old behaviour.

Also improve the error reporting in wxAutomationObject.

See #12489.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-26 13:30:37 +00:00
Vadim Zeitlin
ccec90930c Add wxVersionInfo and functions returning it for 3rd party libraries.
Add simple wxVersionInfo class holding the version information.

Also add GetLibraryVersionInfo() static method to wx{JPEG,PNG,TIFF}Handler,
wxStyledTextCtrl and wxXmlDocument classes and wxGetZlibVersionInfo() and
wxGetLibraryVersionInfo() global functions using it.

Closes #12690.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-25 00:53:44 +00:00
Vadim Zeitlin
a6bf0c9533 Add support for negatable command line switches.
Add wxCMD_LINE_SWITCH_NEGATABLE which allows to use a dash after a command
line switch to inverse its meaning (i.e. use "/X-" form). Also add new
wxCmdLineParser::FoundSwitch() allowing to check for whether the switch was
specified in normal or negated form.

Closes #11643.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66253 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-24 00:42:53 +00:00
Vadim Zeitlin
a4984245b6 Center task dialog-based wxProgressDialog on the parent window.
wxProgressDialog was created without the parent when using task dialogs so it
was centred on screen and not on its parent as usual. Fix this by explicitly
positioning it so that it's centered over the parent.

Closes #12699.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66244 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-23 13:11:02 +00:00
Vadim Zeitlin
426ebc992b Send page changed event after changing the page in wxMSW wxNotebook.
Update the currently selected page before generating
wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED event in wxMSW wxNotebook. This is more
consistent with other ports and more logical as "-ED" events are supposed to
be sent after the action they notify about is completed. And it also allows to
set the focus in this event handler whereas any attempts to do it would have
been disregarded before as changing the active page resets focus.

Notice that this does introduce an incompatibility: calling
wxNotebook::GetSelection() from PAGE_CHANGED event handler now returns the new
page and not the old one as before. Again, this is more logical and more
consistent.

Closes #12688.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66224 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-22 01:22:25 +00:00
Vadim Zeitlin
7dbd713731 Improve documentation about handling C++ exceptions in wx programs.
Try to explain the different exception handling strategies more clearly in the
overview and also update OnUnhandledException() documentation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-18 14:10:15 +00:00
Vadim Zeitlin
3b81609771 Fix spurious errors when writing to the child process stdin under Unix.
Since the child pipe was made non-blocking in r65993, it became possible to
write to child process without deadlocking when the pipe became full. However
this still resulted in an error from wxFileOutputStream as it didn't handle
EAGAIN returned from write() any differently than any other error, even though
it is an expected situation in this particular case.

Change Unix wxExecute() to use wxPipeOutputStream which ignores EAGAIN unlike
wxFileOutputStream to fix this.

See #12636.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66152 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-14 14:04:37 +00:00
Vadim Zeitlin
65fe93d8a5 Add wxFile::{Get,Clear}LastError() functions.
Remember the errno of the last file operation instead of just remembering
whether there was an error or not.

See #12636.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-14 12:09:59 +00:00
Vadim Zeitlin
8524dec372 Add wxImage::Rotate180() function.
Closes #12679.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-14 01:02:35 +00:00
Vadim Zeitlin
f71adb5029 Fix resizing of wxGrid columns when they were reordered.
The column resizing code in wxGrid didn't take account of the fact that the
column positions and indices could be different. Correct it by inserting calls
to wxGrid::GetColAt() and GetColPos() in a new wxGridOperations::GetLineBefore()
method.

Closes #11984.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66137 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-13 15:02:42 +00:00
Vadim Zeitlin
0526c8cc07 Add support for id ranges to XRC.
Allow to declare ranges of consecutive IDs in XRC by using the "id[n]" syntax.
Show this functionality in the xrc sample and test it in the new unit test.

Also show and test the "object reference" XRC functionality.

Closes #11431.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66059 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-07 14:00:59 +00:00
Vadim Zeitlin
62d3301bf9 Mention the GUI test in the unit test tech note.
Update the tech note to mention the (relatively) new GUI test program too.

See #11431.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-07 14:00:31 +00:00
Vadim Zeitlin
5fcef18409 Update and reorganize XRC overview to make it more useful.
Emphasize the parts most useful for the new users instead of more advanced
concepts and generally make the text more readable.

Closes #12661.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-07 14:00:19 +00:00
Vadim Zeitlin
878f28d8c8 Changed wxImage::ConvertAlphaToMask() return type to bool.
Make this function more useful by returning true from it if alpha channel was
really converted to the mask by it.

Closes #12637.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-02 11:57:09 +00:00
Vadim Zeitlin
a70d268a1b Add wxDocManager::FindTemplate() method.
This allows to find the template corresponding to the document of the given
class.

Closes #12170.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-24 23:03:38 +00:00
Vadim Zeitlin
e4545e0183 Allow to use space to toggle spinning of the cube in OpenGL sample.
Small enhancement to the cube OpenGL sample.

Closes #11545.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65904 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-24 22:40:58 +00:00
Vadim Zeitlin
164db92c14 Add support for specifying child process cwd and env to wxExecute().
Add an optional wxExecuteEnv parameter to wxExecute() which allows to specify
the initial working directory and custom environment for the child process.

Closes #12163.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-24 22:40:11 +00:00
Vadim Zeitlin
4689441b05 Add XRC handler for wxToolbook.
Closes #11615.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-23 18:56:28 +00:00
Vadim Zeitlin
fe97acf0e3 Don't assume any particular default size for XRC image lists.
Let the image list deduce its size from the first bitmap in it. This is better
than the old behaviour of using the standard icon size as it allows to omit
the size from the image lists provided they contain the bitmaps of the same
size.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65884 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-23 18:56:13 +00:00
Vadim Zeitlin
df191bfe39 Added wxThread::OnKill() and OnDelete() callbacks.
Call OnXXX() from wxThread::Kill() and Delete() respectively to allow the
thread being terminated perform some cleanup.

Closes #9046.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-23 14:10:12 +00:00
Vadim Zeitlin
6becc1e617 Added "rest" argument to wxString::Before{First,Last}().
This allows to search the string just once, in BeforeXXX(), when both the
parts of the string before and after some character are needed instead of
having to do it twice in both BeforeXXX() and AfterXXX().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-22 14:17:37 +00:00
Vadim Zeitlin
53cdd2c11d Add XRC handler for wxCommandLinkButton.
Added a handler for wxCommandLinkButton class and a demo of it in the xrc sample.

Closes #12593.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65856 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-20 23:11:20 +00:00
Vadim Zeitlin
9e19da0f2a Improve wxGTK print and page setup dialogs.
Handle more fields (notably collation, number of copies and "print to file"
flag) and fix the bug with return value of print dialog ShowModal().

Closes #12499.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65830 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-16 18:11:27 +00:00
Vadim Zeitlin
676184202d Restore text drag-and-drop in wxSTC broken by Scintilla 2 update.
Drag and drop in wxStyledTextCtrl was broken, apparently since upgrade to
Scintilla 2. Restore it by using the correct wxDrag_XXX constants instead of
boolean values in the code for wxEVT_STC_START_DRAG events generation.

Closes #11709.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65827 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-16 18:11:06 +00:00
Vadim Zeitlin
817b7b0e87 Add wxHAS_3STATE_CHECKBOX symbol.
This symbol is defined for the ports that support wxCHK_3STATE style. While
most of the ports do support it, a couple still do not and having this symbol
makes it more convenient to exclude 3-state-checkbox-specific code, like in
CheckBoxTestCase.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65825 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-16 18:10:51 +00:00
Vadim Zeitlin
cff48ba847 Fix display of right aligned columns in wxGenericListCtrl.
Take into account the width of the image when drawing the right aligned item
in wxGenericListCtrl.

Closes #12562.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65799 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-13 22:10:45 +00:00
Vadim Zeitlin
323d36e452 Add wxHAS_BITMAPTOGGLEBUTTON and test for it in the unit test.
Not all ports define wxBitmapToggleButton class currently, so add a special
symbol which is defined only if this class is indeed available and test for it
in the unit test for this class.

This fixes the tests compilation under wxX11.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65706 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-01 13:05:36 +00:00
Vadim Zeitlin
a65b84f434 Add EVT_RIBBONBAR_TAB_LEFT_DCLICK event.
Generate a special event when a ribbon bar is double clicked.

Closes #12399.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65674 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-29 13:46:35 +00:00