Commit Graph

197 Commits

Author SHA1 Message Date
Vadim Zeitlin
1bc5ddea15 Fix link errors with VC 11 in DLL STL build.
Don't declare wxWindowList as DLL-exported. It's unnecessary and appears to
create problems for VC 11.

Closes #14741.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-10 00:53:42 +00:00
Vadim Zeitlin
e23fd60fe7 Change wxMSW-specific wxLoadUserResource() to accept standard RT_XXX types.
Resource types can be either strings for custom types or integers casted to a
TCHAR* for the standard ones. Using wxString for the resource type prevented
us from using the latter as any attempt to initialize wxString for such a
pseudo-string resulted in an immediate crash.

Change wxLoadUserResource() resource type parameter type to wxChar* to avoid
this and allow passing standard resource types, such as RT_RCDATE, to this
function directly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72472 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:13:28 +00:00
Vadim Zeitlin
598fe99d56 Move wxBell() from base to core library.
This allows to get rid of ugly preprocessor checks due to the fact that this
function could be defined in one or the other library depending on the port
used and also fix a problem with it being defined differently in the base
library depending on which GUI port (Carbon or Cocoa) was used under OS X.
It also fixes the problem with wxBell() in wxGTK under Windows.

Closes #14406.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71797 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-17 21:35:06 +00:00
Vadim Zeitlin
d98a58c543 Use __WINDOWS__ for OS kind checks and reserve __WXMSW__ for GUI toolkit.
This change prepares the way for using wxGTK under Windows as this would
still define __WINDOWS__ but use __WXGTK__ instead of __WXMSW__.

Closes #14064.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-04 00:29:31 +00:00
Paul Cornett
7bc57fd972 fix tests for WXWIN_COMPATIBILITY_2_8, closes #13800
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-23 05:59:59 +00:00
Vadim Zeitlin
ee4d438064 Added support for wxEXEC_MAKE_GROUP_LEADER to wxExecute().
Map it to the native CREATE_NEW_PROCESS_GROUP flag as it's broadly similar to
Unix semantics.

Closes #13676.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-19 12:54:48 +00:00
Vadim Zeitlin
4fe4a7c50f Add wxEXEC_HIDE_CONSOLE flag allowing to unconditionally do it under MSW.
Also renamed wxEXEC_NOHIDE to wxEXEC_SHOW_CONSOLE for symmetry (keeping the
old name for compatibility, of course).

Extend exec sample to allow easily testing the different flags and adding more
of them later.

See #13676.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-08 20:22:55 +00:00
Vadim Zeitlin
449cc35153 Don't make wxQsort() extern "C" nor use any special convention for it.
It doesn't make sense to require passing C functions to wxQsort() that we
define in a C++ library. We also don't need any special calling convention
here.

Notice that the only existing uses of wxQsort() inside wxWidgets itself were
not actually extern "C" and one of them didn't even use the correct calling
convention.

Also avoid using non-wx-prefixed CMPFUNCDATA identifier in a public header,
rename it to wxSortCallback instead.

Finally make wxQsort() documentation slightly more useful.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-27 21:10:48 +00:00
Stefan Csomor
902ddbfd3e support wxWindowDisabler on osx_cocoa
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-05 12:21:20 +00:00
Vadim Zeitlin
9aea251043 Move wxGetLibraryVersionInfo() to core from base.
This function uses the GUI toolkit information and so can't be defined in
wxBase. The code only compiled before because the function was erroneously
defined in wxCore even though it was declared as WXDLLIMPEXP_BASE.

Fix this by declaring it with WXDLLIMPEXP_CORE too. This corrects problems in
MSW DLL build.

If we need to get a string containing user-readable wxBase version too, we
should add another function (as it's not possible to virtualize this one) but
such function doesn't seem incredibly useful to have anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-30 22:37:03 +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
2a0ca9dbaf Fix warnings about signed/unsigned comparisons inside wxMax() and friends.
wxMax, wxMin and wxClip work correctly when called with a mix of signed and
unsigned arguments but give warnings about comparing them when compiled with
g++.

Cast both arguments to the result type, which is defined consistently with
standard C rules for implicit promotion, before comparing them to avoid this.

Also add more tests to check that using these functions in this case doesn't
provoke warnings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-27 20:23:55 +00:00
Václav Slavík
a52475807e Make wxMin, wxMax and wxClip template functions.
Previously used macro's arguments were evaluated twice, but there were
many occurences of their use in our code that didn't account for this
and used expensive-to-evaluate arguments as if they were functions.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-25 09:43:00 +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
Julian Smart
a94656538f Use common inline version of wxHexToDec
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65336 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-18 12:59:52 +00:00
Václav Slavík
18923e360c Add instance argument to wxLoadUserResource().
This makes it possible to load resources from other modules than the
main executable.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64152 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-26 20:51:02 +00:00
Václav Slavík
1930cbd768 Make wxLoadUserResource() declaration available to wxBase too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-26 20:50:57 +00:00
Vadim Zeitlin
c5ba485124 Add wxLoadUserResource() overload not copying the resource data.
The existing wxLoadUserResource() copies the resource data which is often
unnecessary. Add another overload which just returns the pointer directly to
the resource data.

Also move the function into base from core as it can be useful for the console
applications as well.

Finally, define wxUserResourceStr used by this function only in the same file
where the function itself is defined instead of datacmn.cpp.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-26 16:53:21 +00:00
Vadim Zeitlin
59d43911b4 Optionally return length from wxLoadUserResource().
Add optional length output parameter and also change the return type to "char
*" from "wxChar *" to which it apparently was blindly changed just to make
this code compile even though this function never returned any strings.

Closes #11214.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-19 16:29:57 +00:00
Francesco Montorsi
23790a2a29 add wxGetLinuxDistributionInfo() and wxPlatformInfo::GetLinuxDistribution() functions; also add to wxPlatformInfo the GetOperatingSystemDescription(), GetDesktopEnvironment(), GetOperatingSystemDirectory() functions to group in the same class (wxPlatformInfo) all available platform-detection functions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-02 13:01:41 +00:00
Václav Slavík
de4983f323 split wxCharTypeBuffer<T> into wxScopedCharTypeBuffer<T> and wxCharTypeBuffer<T> -- the former is for transient data with validity limited to parent's lifetime, the latter is for permanent storage of string data (bug #9638)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-27 15:33:55 +00:00
Vadim Zeitlin
c0c133e13b add wx-prefixed and semicolon-requiring versions of DECLARE_NO_{COPY,ASSIGN}_CLASS macros
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-08 11:45:59 +00:00
Vadim Zeitlin
d3b9f782ef don't use annoying and unneeded in C++ casts of NULL to "T *" in all other files neither
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58227 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-19 13:55:27 +00:00
Francesco Montorsi
3828182615 fix wxYield[IfNeeded] dll linkage (closes #10325)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57879 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-07 11:28:50 +00:00
Francesco Montorsi
24c4d27f2a use WXWIN_COMPATIBILITY_2_8 instead of WXWIN_COMPATIBILITY_2_6 for wxUsleep even if it was deprecated since wx2.6
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57863 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-06 20:25:31 +00:00
Francesco Montorsi
8d4ff84937 add WXWIN_COMPATIBILITY_2_6 block around wxUsleep deprecation; put wxPlatform declaration out of the 'Miscellaneous functions' block
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57854 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-06 12:56:07 +00:00
Vadim Zeitlin
51810d4d7e deprecate wxStringEq
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57238 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-10 20:07:33 +00:00
Vadim Zeitlin
0e0977894a make wxKeyEvent and wxMouseEvent derive from the same wxKeyboardState object (indirectly via wxMouseState in the case of the latter) to make Get/HasModifiers() available in wxMouseEvent as well while avoiding code duplication
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-19 18:41:41 +00:00
Vadim Zeitlin
118a41d993 added wxSHUTDOWN_LOGOFF flag, don't use EWX_FORCE by default but only if wxSHUTDOWN_FORCE is specified
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-08-03 10:56:05 +00:00
Vadim Zeitlin
f75e0c15ae show busy cursor in wxLaunchDefaultBrowser and add a new flag to avoid it (#9678)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54558 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-07-09 02:32:16 +00:00
Robert Roebling
1dea1566c8 Added mostly empty wxLaunchDefaultApplication
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-27 14:14:13 +00:00
Vadim Zeitlin
e38ce1bcbf added wxMouseState::GetPosition(), for consistency with wxMouseEvent
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-04-18 01:51:04 +00:00
Vadim Zeitlin
6e3515377c make wxMouseState accessors const; document this class
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-04-18 01:48:44 +00:00
Francesco Montorsi
53a2db124c substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-26 15:06:00 +00:00
Vadim Zeitlin
d7ef641d4e fix wxExecute() compilation in ANSI build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52773 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-24 23:13:12 +00:00
Vadim Zeitlin
05718a98f9 avoid needless Unicode<->MB conversions in Unix wxExecute(); simplify the code; provide both versions taking char** and wchar_t** for compatibility; also use wxMacExecute() (renamed to wxMacLaunch() to avoid confusion) from all wxExecute() overloads but don't use it if wxEXEC_SYNC was requested as it doesn't support it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-23 02:27:23 +00:00
Vadim Zeitlin
2ecd1756e4 added wxWindowDisabler ctor for conditionally disabling all windows and use it in WaitForChild()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52671 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-22 03:06:57 +00:00
Vadim Zeitlin
a131b460ac don't redeclare wxYield() if it had been already declared to fix g++ warnings with -Wredundant-decls
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-08 08:17:41 +00:00
Paul Cornett
162e998c2f check for self-assignment in operator=
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51123 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-01-09 04:08:33 +00:00
Vadim Zeitlin
4f7d425f60 use correct WXDLLIMPEXP_FWD_XXX (patch from Tim Stahlhut)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50184 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-23 14:13:50 +00:00
Vadim Zeitlin
8cf304f81b added public wxInfoMessageBox() (slightly modified patch 1828235)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-18 19:56:03 +00:00
Vadim Zeitlin
14d6351382 always return wxString from wxGetUserHome() instead of char */wxWCharBuffer depending on the build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-06 12:38:15 +00:00
Vadim Zeitlin
a43bd048a3 fix unused parameter warning in wxSetEnv() in release build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48604 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-07 23:39:22 +00:00
Vadim Zeitlin
01101e2da6 added support for 2 extra mouse buttons (patch 1757630)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-29 01:04:33 +00:00
Robert Roebling
fe5f448f43 Added wxQsort()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47696 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-24 09:26:51 +00:00
Vadim Zeitlin
033bf67c3c added missing WXDLLIMPEXP_CORE for wxGetDisplay() for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-09 13:18:32 +00:00
Václav Slavík
b5dbe15d0b added WXDLLIMPEXP_FWD_FOO macros in addition to WXDLLIMPEXP_FOO for use with forward declarations (in preparation for GCC visibility support)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-09 10:09:52 +00:00
Václav Slavík
90a77e6484 make wxSetEnv compatible with ANSI and Unicode, deprecate passing NULL to it in favour of wxUnsetEnv()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46547 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-19 20:02:49 +00:00
Julian Smart
f728025eae Added a new overload of wxDecToHex and used it in wxRichTextImageBlock::WriteHex
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-11 17:16:59 +00:00
David Elliott
c5f0d1f903 Move wxLaunchDefaultBrowser from BASE to CORE per wx-dev discussion.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-08 19:13:49 +00:00