Commit Graph

255 Commits

Author SHA1 Message Date
Paul Cornett
df450566dd Avoid including X11 headers from <wx/glcanvas.h>
It's generally wxWidgets policy not to include platform-specific headers from our own
to avoid namespace pollution issues, in this case with names like "None" and "Window".
2019-08-28 09:37:49 -07:00
georgp24
8e41677989 Fix wxX11 build with --disable-graphics_ctx build option.
Add missing #if wxUSE_CAIRO checks.

Closes https://github.com/wxWidgets/wxWidgets/pull/1472
2019-08-10 00:00:18 +02:00
Paul Cornett
7872b9fd38 Deprecate Set{Height,Width,Depth} for other platforms as well
Fixes GTK build with --disable-compat30
See https://github.com/wxWidgets/wxWidgets/pull/925
2018-09-23 20:02:21 -07:00
Vadim Zeitlin
8955b4b2fb Fix wxX11 build after fractional point size changes
Define {Get,Set}FractionalPointSize() in wxX11 wxFont implementation.

Note that only Pango-based version really supports floating point sizes
as XLFD can't express them.
2018-09-17 15:24:40 +02:00
Vadim Zeitlin
979d541072 Implement arbitrary font weight support for wxX11
This is mostly done to fix (half of) compilation errors after
introduction of pure virtual wxFont::{Get,Set}NumericWeight() as wxFont
in wxX11 couldn't be compiled any more as it didn't define them.
2018-09-06 03:13:23 +02:00
Paul Cornett
65cc4c1624 Avoid ifdef-ed override specification
Instead, add the base class functions so the derived class always
overrides. If/when wxX11 and wxMotif are removed there won't be an
ifdef that no one ever notices isn't needed anymore.
2017-11-12 09:33:37 -08:00
Adrien Tétar
bc562289c6 Introduce wxPenInfo class 2017-09-10 01:02:06 +02:00
ARATA Mizuki
8cfc74491a Replace wxEXPLICIT with the 'explicit' keyword
See #17655.
2016-09-14 18:45:12 +09:00
Manuel Martin
bdc95f5766 Improve wxGLCanvas to be more type safe and better support modern OpenGL
Add wxGLAttribsBase, wxGLAttributes and wxGLContextAttrs replacing the old
untyped "int attributes[]".

Don't use global object for creating OpenGL > 3.0 contexts.

Closes #16909.
2016-02-23 00:32:54 +01:00
JulianSmart
a797c9d956 Make wxBitmap ctors consistent wrt passing scale for conversion from wxImage; HiDPI adaptation for propgrid buffer and wxRTC images 2015-11-15 12:49:25 +00:00
Dimitri Schoolwerth
8f8d58d193 Use wx-prefixed macros throughout the repository.
Change {DECLARE,IMPLEMENT}_*CLASS and {DECLARE,BEGIN,END}_EVENT_TABLE
occurrences to use the wx-prefixed version of the macros.
2015-04-23 22:00:35 +04:00
Paul Cornett
ff4af7693e non-pch build fix after r78134
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78138 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-11 07:50:33 +00:00
Vadim Zeitlin
e737363e6b Introduce wxCursorBase class defining common wxCursor API.
This is done in preparation for adding a new wxCursor method and will allow us
to define it in a single place by default instead of having to provide stubs
for all ports.

See #16539.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78133 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-11 01:02:45 +00:00
Vadim Zeitlin
51309ad50a make x11 dc could get cairo context, so the graphic module could use in x11. This use cairo xlib backend.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77853 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:44:06 +00:00
Vadim Zeitlin
b045f9506b Rewrite the wxX11 cliboard
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:43:44 +00:00
Vadim Zeitlin
cc3acf904b add GetLabel/SetLabel implementation to wxWindowX11, the function just store the label string, but do nothing with it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77826 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:33 +00:00
Vadim Zeitlin
d2573ed255 Add get/set strikeline support to wxFont/x11.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77813 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:48 +00:00
Vadim Zeitlin
ae1bc4fa82 make wxPalette under x11 could store/get uchar RGB value in palette and also could get the color number in palette.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77812 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:45 +00:00
Vadim Zeitlin
58730bc356 Add wxEVT_SET_FOCUS and wxEVT_KILL_FOCUS event to wxX11
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77776 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:44 +00:00
Vadim Zeitlin
8e238e367e wxX11 wxFont miss the wxFont (const wxString &nativeInfoString) ctor, it will cause build tests failed. Added and fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:38:51 +00:00
Vadim Zeitlin
bd30752410 Just deprecate but don't schedule for removal wxNORMAL and friends.
Deprecate the use of the old untyped constants but don't schedule them from
removal in a future wx version by removing "#if WXWIN_COMPATIBILITY_3_0" tests
around their definition and use. Provoking deprecation warnings in the code
using these constants is worth it as they are unclear and it's easy to make
mistakes when using them, but breaking this code compilation outright can't be
justified -- even in the future.

Also use more informational wxDEPRECATED_MSG() instead of a simple
wxDEPRECATED() as it might not be obvious at all how should the code be
updated exactly.

Finally, avoid the use of deprecated constants inside the library itself.

As a side effect, this closes #15814.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-06 12:42:37 +00:00
Paul Cornett
967a94c91a remove WXWIN_COMPATIBILITY_2_6, add WXWIN_COMPATIBILITY_3_0
closes #15792

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-04 20:07:33 +00:00
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00
Stefan Csomor
7f74897f7f adding default for Create with dc
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 17:15:10 +00:00
Vadim Zeitlin
b960795ea8 Add wxFontInfo class to allow using named parameters for wxFont creation.
This helper class allows to create wxFonts using shorter and more readable
code, e.g.

	wxFont font(12, wxFONTFLAG_DEFAULT,
		    wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, true,
		    "DejaVu Sans");

can now be written simply as

	wxFont font(wxFontInfo(12).FaceName("DejaVu Sans").Underlined());

Remove the ctor from font flags added in r70445 as it's not needed any longer
now that we have this one and adding it resulted in compilation errors in the
existing code which compiled with 2.8 because of ambiguities between that ctor
and wxFont(int size, int family, int style, int weight. bool underlined, ...)
one, e.g.

	wxFont(12, wxFONTFAMILY_SWISS, wxNORMAL, wxNORMAL)

didn't compile any more but it does compile again now.

See #9907.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-30 10:27:38 +00:00
Paul Cornett
4787c92d39 use const arrays for wxDC array parameters, closes #10712
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73382 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-01-18 17:27:51 +00:00
Vadim Zeitlin
a0e5592007 Revert all wxNOEXCEPT-related changes.
This reverts r72978, 72984, 72989 and 72992. Do not use wxNOEXCEPT for
wxTextCtrl dtor as this breaks compilation of any user-defined classes
inheriting from it unless they use wxNOEXCEPT as well and the benefits
(fixing a harmless warning for the niche ICC compiler) are just not worth
the compatibility breakage.

See #14826.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-20 12:49:03 +00:00
Vadim Zeitlin
24f54e45dc Add wxNOEXCEPT to all wxTextCtrl dtors.
Fix compilation with some compilers after r72978 which added wxNOEXCEPT to
wxTextCtrlBase dtor and wxTextCtrl dtor in wxMSW but not in all the other
ports.

See #14826.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-19 11:53:49 +00:00
Vadim Zeitlin
814028444d Create a wrapper file for X11/XKBlib.h header.
We need some hacks for the older systems before including this header, extract
them from src/x11/utilsx.cpp into a new private header to be able to reuse it
from wxGTK in the next commit.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-07 13:12:20 +00:00
Vadim Zeitlin
0634700a96 Add wxFont ctor taking a single flags argument instead of style/weight/...
Currently this ctor just does the same thing as the existing ctors in a
different way but it will be extended to support wxFONTFLAG_STRIKETHROUGH in
the next commits.

See #9907.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-23 11:28:21 +00:00
Stefan Neis
6dd0883d55 Do not put semicolons after the definition of an inline function.
Even though most compilers just ignore this, it's just wrong and if you
do get warnings about header files, they can become quite overwhelming.
Forward port of r70163.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70165 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-29 14:42:13 +00:00
Dimitri Schoolwerth
80fdcdb90e No changes, synchronised source names that appear commented at the top of files with the actual path to the files.
Fixed commented names (path, filename, and extension) of files in include/ and src/. Prepended the names in src/ with "src/" everywhere, while starting those in include/wx/ with "wx/".

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-20 00:14:35 +00:00
Vadim Zeitlin
31b81622d3 Remove X11-specific wxWindowIsVisible() from common Unix file.
XGetWindowAttributes() used in this function resulted in link problems under
Fedora 14 because we don't explicitly link with libX11. Instead of doing this,
simply get rid of this function as it seems to be used in exactly one place in
wxX11 code only anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-14 12:30:43 +00:00
Vadim Zeitlin
04a8da5f57 Implement bitmap mask copying in wxX11.
Copy the mask pixmap properly in wxX11, otherwise copying masks resulted in
freeing the same pixmap twice and an X error.

This fixes the bitmap unit test for wxX11.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-10 13:53:08 +00:00
Vadim Zeitlin
59b7da02ff Return wxFONTFAMILY_DEFAULT, not UNKNOWN, from wxFont::GetFamily().
Although returning wxFONTFAMILY_UNKNOWN when the font family is not recognized
makes more sense, it breaks a lot of existing code including all the
font-related code generated by DialogBlocks, so prefer to return
wxFONTFAMILY_DEFAULT instead -- which can't be confused for a valid font
family neither but can be passed to wxFont ctor or SetFamily() without
problems.

To ensure that this behaviour is correctly implemented by all ports, rename
the existing wxFont::GetFamily() to DoGetFamily() and call the new method from
wxFontBase::GetFamily() which adjusts the return value if needed.

Closes #12330.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65670 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-29 13:46:09 +00:00
Vadim Zeitlin
571d991bb3 Merge wxUIActionSimulator fixes from SOC2010_GUI_TEST branch.
Correct a lot of problems with the initial implementation, notably make the
API consistent across all platforms, e.g. all keyboard-related methods now
take just a wxKeyCode.

Add some useful higher-level helpers such as Text() and MouseDragDrop().

Improve documentation.

wxUIActionSimulator now works under MSW, GTK and OS X and is enabled by
default.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65385 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-22 22:15:42 +00:00
Vadim Zeitlin
7282b0678a Replace wxTINY_CAPTION_{HORIZ,VERT} with a single wxTINY_CAPTION.
These two styles were always equivalent so we can just as well replace them
with a single one and stop wasting an extra bit.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-10 21:09:57 +00:00
Vadim Zeitlin
679918f93d Rename wxWindow::GetMainWindow() to X11GetMainWindow() in wxX11.
This avoids conflicts with GetMainWindow() defined in other wxWindow-derived
classes (such as wxDataViewCtrl and potentially user-defined classes as well).

Closes #11818.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 13:03:05 +00:00
Vadim Zeitlin
af7e24c33e Make wxPORTRAIT and wxLANDSCAPE elements of wxPrintOrientation enum.
Change wxPrintData::SetOrientation() to take wxPrintOrientation instead of
int.

Closes #11393.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-08 16:35:47 +00:00
Vadim Zeitlin
8462a84b2c Removed wxFont::Set/GetNoAntiAliasing() implementations.
Most of them were dummy and didn't do anything and this API was never meant to
be used anyhow.

Keep just the declarations in wxFontBase but mark them as deprecated.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62349 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-09 13:04:59 +00:00
Vadim Zeitlin
03647350fc No changes, just removed hard tabs and trailing white space.
This commit is huge but there are no non-white-space changes in it.

Some files containing third-party sources (src/msw/wince/time.cpp,
src/x11/pango*.cpp) were left unchanged.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-21 10:41:26 +00:00
Vadim Zeitlin
9a83f86094 Globally replace _T() with wxT().
Standardize on using a single macro across all wxWidgets sources and solve the name clash with Sun CC standard headers (see #10660).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-23 20:30:22 +00:00
Vadim Zeitlin
f76c075805 added convenient wxFont::Make{Bold,Italic,Smaller,Larger} and Scale() methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-12 20:11:21 +00:00
Vadim Zeitlin
6de7047076 add virtual DoGetTextExtent() to allow calling the overloaded wxWindowBase::GetTextExtent() on wxWindow objects without any ugly casts/scope resolution operators
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-10 16:41:41 +00:00
Vadim Zeitlin
657a8a3598 first round of debug/release merge: introduce wxDEBUG_LEVEL, for now defined as 1 if __WXDEBUG__ is defined, i.e. no real changes; don't use __WXDEBUG__ in the headers to keep debug and release builds ABI-compatible; add functions to customize or disable asserts handling
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59711 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-21 23:36:37 +00:00
Francesco Montorsi
b5791cc7af add the wxFont(const wxSize& pixelSize, ...) ctor to all ports; add some wxCHECK_MSGs to ensure that the wxSize objects contains non-negative arguments; document that passing zero for the width parameter is allowed; other minor doc fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59564 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-15 16:28:33 +00:00
Francesco Montorsi
732d8c74f8 add wxSize overloads to wxBitmap ctors and to wxBitmap::Create
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-14 13:57:51 +00:00
Francesco Montorsi
dde19c2180 second part of #10320: move wxApp event handling functions to wxEventLoopBase (in particular move Yield() functions); add backward compatible redirections to wxApp; update docs; remove global lists wxPendingEvents and wxPendingEventsLocker
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58911 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-15 14:25:08 +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
Francesco Montorsi
d48b06bd90 check in the 'selective yield' patch (see ticket #10320):
- implements YieldFor() with event filtering for wxMSW and wxGTK,
  adds TODO markers in other ports;
- replaces wxYield() in GTK's clipboard code with a wxTheApp->YieldFor() call, thus fixing possible reentrancies 
(and modifies clipboard sample to test synchronous IsSupported calls)
- replaces wxYieldIfNeeded() calls in wxProgressDialog with wxTheApp->YieldFor() calls, so that it processes only 
UI/user-input events, thus fixing the race condition visible in the "thread" sample
- documents the new functions


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-04 17:42:28 +00:00