diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-11-02 03:31:00 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-11-10 07:58:45 +0100 |
commit | 5368923b47e908caf7112eb23629cc76cc7e6249 (patch) | |
tree | f1f621c709f784552dd2e2b5c3fc13bf741b9833 /vcl/inc/win | |
parent | 69cae240078a2244ccc23317b4dadec7d5b8c8f0 (diff) |
at least some sanity for WinSalGraphics
we no longer invite everyone to change our member variables.
This was obviously written by a C programmer and needs further refactoring.
Change-Id: I896576a5abc24e8d03787d30e6ba6c11b0bf84c6
Diffstat (limited to 'vcl/inc/win')
-rw-r--r-- | vcl/inc/win/salgdi.h | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h index 363ab0fce023..9392cc59173d 100644 --- a/vcl/inc/win/salgdi.h +++ b/vcl/inc/win/salgdi.h @@ -144,6 +144,8 @@ public: class WinSalGraphics : public SalGraphics { + friend class WinSalGraphicsImpl; + friend class ScopedFont; private: boost::scoped_ptr<SalGraphicsImpl> mpImpl; @@ -154,21 +156,6 @@ private: bool mbScreen : 1; // is Screen compatible HWND mhWnd; // Window-Handle, when Window-Graphics -public: - HDC getHDC() const { return mhLocalDC; } - void setHDC(HDC aNew) { mhLocalDC = aNew; } - - enum Type - { - PRINTER, - VIRTUAL_DEVICE, - WINDOW, - SCREEN - }; - -public: - - HWND gethWnd(); HFONT mhFonts[ MAX_FALLBACK ]; // Font + Fallbacks const ImplWinFontData* mpWinFontData[ MAX_FALLBACK ]; // pointer to the most recent font face ImplWinFontEntry* mpWinFontEntry[ MAX_FALLBACK ]; // pointer to the most recent font instance @@ -191,6 +178,30 @@ public: sal_uIntPtr mnFontKernPairCount;// Number of Kerning Pairs of the current Font int mnPenWidth; // Linienbreite +public: + HDC getHDC() const { return mhLocalDC; } + void setHDC(HDC aNew) { mhLocalDC = aNew; } + + HPALETTE getDefPal() const; + void setDefPal(HPALETTE hDefPal); + + HRGN getRegion() const; + + void InitGraphics(); + void DeInitGraphics(); + + enum Type + { + PRINTER, + VIRTUAL_DEVICE, + WINDOW, + SCREEN + }; + +public: + + HWND gethWnd(); + HFONT ImplDoSetFont( FontSelectPattern* i_pFont, float& o_rFontScale, HFONT& o_rOldFont ); public: @@ -391,8 +402,6 @@ public: }; // Init/Deinit Graphics -void ImplSalInitGraphics( WinSalGraphics* ); -void ImplSalDeInitGraphics( WinSalGraphics* ); void ImplUpdateSysColorEntries(); int ImplIsSysColorEntry( SalColor nSalColor ); void ImplGetLogFontFromFontSelect( HDC, const FontSelectPattern*, |