Commit Graph

63 Commits

Author SHA1 Message Date
Vadim Zeitlin
8fbca5cb70 Remove all trailing spaces
No real changes, just clean up sources by removing trailing spaces from
all the non-generated files.

This should hopefully avoid future commits mixing significant changes
with insignificant whitespace ones.
2019-01-30 17:35:54 +01:00
Vadim Zeitlin
ee0dd4edb1 Replace wxGTKCairoDCImpl::m_{width,height} with m_size
This allows to avoid initializing the variables to 0 in all the
overloaded ctors: wxSize default ctor already does it.

It's also more convenient to use GetScaledSize() rather than assigning
m_width and m_height separately, even if the rest of the code is broadly
unchanged.
2018-01-25 14:56:43 +01:00
Vadim Zeitlin
4c8e701d84 Remove wxGTKCairoDCImpl ctor taking dummy int
We can reuse another ctor taking wxWindow* instead. Although this does
require an ugly cast, it's more explicit than just passing 0 which
could, in principle, match both the ctor taking wxWindow* and another
one taking double, and so is still preferable.
2018-01-25 14:56:43 +01:00
Vadim Zeitlin
0be81cb34b Add wxGTKCairoDCImpl::SetSize() helper
Avoid repeating gdk_window_get_{width,height}() calls in several places.
2018-01-25 14:56:43 +01:00
Vadim Zeitlin
a1cb2eb12a Also return display DPI from wxScreenDC in wxGTK3
This is similar to the previous commit and is done for the same reasons:
screen DC needs to use the same DPI as the screen itself, instead of the
default Cairo 72 DPI.
2018-01-25 14:56:43 +01:00
Vadim Zeitlin
4ad1a3d969 Return display PPI from wxDC::GetPPI() in wxGTK3
For wxDC associated with a window, such as wx{Window,Client,Paint}DC,
this method should return the window PPI, not the hard coded 72 DPI of
Cairo graphics context.

This still doesn't work correctly when using multiple monitors with
different DPI settings, but is still a (modest) improvement.
2018-01-25 14:35:11 +01:00
Vadim Zeitlin
afe0e776b9 Remove confusing "base_type" typedef from wxGTK3 wxDC code
This typedef isn't really useful in base class initializer lists and it
wasn't really used anywhere else.
2018-01-25 14:32:49 +01:00
Paul Cornett
6674ca57da implement wxDC::GetContentScaleFactor() for GTK3 2016-02-22 09:52:26 -08: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
8b4ae731d3 use wxOVERRIDE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-30 00:02:23 +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
Robin Dunn
8e72f2cd18 wxDC::GetHandle support for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-28 19:31:18 +00:00
Paul Cornett
f30b9eed38 avoid creating and immediately destroying a wxGraphicsContext when creating a wxDC with wxGTK3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-13 16:58:37 +00:00
Paul Cornett
9dc44eff02 support for GTK3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71894 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 20:39:06 +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
Paul Cornett
512cfcc341 make access for virtuals match base
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50547 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-06 16:22:00 +00:00
Paul Cornett
380740af5d non-pch build fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50403 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-01 18:37:08 +00:00
Robert Roebling
888dde65f4 DC reorganization
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-30 13:48:22 +00:00
Robert Roebling
eb7637b587 Remove several hack from PS code, use high resolution code from GNOME print, invert Y axis internally
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48922 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-24 14:04:09 +00:00
Robert Roebling
ab171e9502 Converted wxGTK's basic DC classes to new DC code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-23 11:27:41 +00:00
Robert Roebling
2970ae54d3 Beginning to make wxDC code compile both before
and after the DC reorg to make the transition
    smoother (indeed possible).
  Move the wxImplDC code to its future place in
    dcbase.cpp and wx/dc.h


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45901 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-08 23:47:43 +00:00
Robert Roebling
d296fd8ff7 More preview code for the DC reorganisation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45863 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-06 20:14:55 +00:00
Robert Roebling
b86ad1d632 Putting draft of wxImplDC and the wxDC using it
for viewing pleasure into CVS. Guarded by
   #if 0 since it doesn't even compile yet.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-03 22:29:01 +00:00
Robert Roebling
04ab8b6ddf Moved all the coordinate system calculation to wxDCBase
and thus removed all the duplicated code in all wxDC
   classes.
  Problematic is that wxSVGFileDC and wxPostscriptDC inherit
   from wxDC and therefore include platform specific code
   (also before this change) so I chose to override all
   SetLogicalOrigin() etc. methods in these classes and
   call their wxDCBase methods thereby circumventing the
   platform dependent code.
  I'm afraid the Mac code will require updating, too.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-02 11:05:45 +00:00
Robert Roebling
621b83d9b3 Made device to logical and vv conversion methods
virtual and implement them like any other method
    in the wxDC classes, not only in the their files
    but somehow belonging to the wxDCBase class.
  This is required for plugging in differnt DC backends
    with different conversions.
  Ideally (and absolutely possible ) all these methods
    should be removed and just the one in wxDCBase
    should stay using values set in the various
    derived classes.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-01 21:28:29 +00:00
Vadim Zeitlin
e19a8aea87 removed virtual GetSelectedBitmap() from the base wxDC class, it only makes sense for wxMemoryDC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-30 15:27:08 +00:00
Robin Dunn
f98bd6d6cf Fixup Blit so it can be used with a source that is a wxBufferedDC,
since wxBufferedDC doesn't derive from wxMemoryDC any more.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41965 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-12 06:23:52 +00:00
Vadim Zeitlin
2e992e06a7 added wxWindow::IsDoubleBuffered() and improve wxBufferedDC (patch 1565330)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41810 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-09 16:39:34 +00:00
Vadim Zeitlin
d3c7fc996a mark all dtors which are virtual because base class dtor is virtual explicitly virtual themselves
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41020 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-05 20:47:48 +00:00
Paul Cornett
f9562c6b2d correct access for virtual
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40782 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-24 04:41:29 +00:00
Paul Cornett
772b376785 simplify coordinate transformation code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40682 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-19 21:30:06 +00:00
Włodzimierz Skiba
0b04c4e0bd Missing wxUSE_PALETTE markup (#1369489).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-11-30 07:58:37 +00:00
Mart Raudsepp
8907154c1a Nuke #pragma implementation/interface's
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-23 12:56:45 +00:00
Michael Wetherell
20123d4958 Add import/export attributes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-08-02 22:58:06 +00:00
Włodzimierz Skiba
b1263dcfa3 Make ComputeScaleAndOrigin() as virtual part of wxDCBase and this way present on missing platforms. Add into manaul too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-12-16 21:24:45 +00:00
Julian Smart
d2b1753d16 Applied patch [ 1039940 ] Prevent redefinition of MM_xxx mapping mode constants
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29701 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-07 16:42:11 +00:00
Julian Smart
655719367a Use old licence name
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-23 20:53:33 +00:00
Julian Smart
77ffb5937e Name and version changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-23 14:56:36 +00:00
Vadim Zeitlin
d16b634fa3 use ResetClipping() instead of simply setting m_clipping to false; added call to it to wxDCBase::DestroyClippingRegion() so that some ports don't have to define their own version of it at all
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27107 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-05 22:43:57 +00:00
Václav Slavík
1202890513 added support for gcc precompiled headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-08-09 12:38:21 +00:00
Gilles Depeyrot
ab7ce33c56 disable use of #pragma interface under Mac OS X
GNU compiler included with Mac OS X 10.2 (Jaguar) as well as August Developer
Tools update contain a bug concerning #pragma interface handling that can only
be worked around by not using them (and they are not necessary anyways)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-07 12:28:46 +00:00
Vadim Zeitlin
c3e44503cf fix for wxUniv/GTK scrolling
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14104 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-02-10 16:09:49 +00:00
Vadim Zeitlin
376aa62a5d wxDC::GetSize() should work now in wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8655 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-30 16:43:37 +00:00
Bryan Petty
f6bcfd974e merged 2.2 branch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-15 19:51:35 +00:00
Robert Roebling
20e05ffbd3 Headers moved a bit.
Minor docs updates.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-11-22 19:44:25 +00:00
Vadim Zeitlin
72cdf4c9b3 1. wxApp::ProcessPendingEvents() is now common, added appcmn.cpp and
regenerated the makefiles. wxPostEvent() should work for wxGTK too (untested)
2. long -> wxCoord change for wxGTK and wxMSW, use
   wxUSE_COMPATIBLE_COORD_TYPES to get the old behaviour
3. wxHTML compilation fixes (for !wxUSE_HTML case)
4. a couple of handy macros in thread.h added


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-10-18 15:14:52 +00:00
Robert Roebling
238d735dc2 Got a new idea to do cursors, including global
ones and busy etc.
  Fixed an assert in UserScaler from PS code.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2577 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-05-26 20:40:04 +00:00
Vadim Zeitlin
b0e0d66151 wxWindowDC compiles (wxGTK doesn't link yet because of dcpsg.cpp problems...)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2457 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-05-13 23:02:35 +00:00
Vadim Zeitlin
a23fd0e1d1 1. MSW message handling simplifications
2. wxDC split into wxDC and wxDCBase
3. Several minor bug fixes, many major new bugs


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-05-13 21:21:04 +00:00
Robert Roebling
0de9b5b23f Fixes a few SGI compiler warnings..
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-05-12 20:26:54 +00:00