git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45638
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
39 files changed:
\membersection{wxDC::GetTextExtent}\label{wxdcgettextextent}
\constfunc{void}{GetTextExtent}{\param{const wxString\& }{string}, \param{wxCoord *}{w}, \param{wxCoord *}{h},\\
\membersection{wxDC::GetTextExtent}\label{wxdcgettextextent}
\constfunc{void}{GetTextExtent}{\param{const wxString\& }{string}, \param{wxCoord *}{w}, \param{wxCoord *}{h},\\
- \param{wxCoord *}{descent = NULL}, \param{wxCoord *}{externalLeading = NULL}, \param{wxFont *}{font = NULL}}
+ \param{wxCoord *}{descent = NULL}, \param{wxCoord *}{externalLeading = NULL}, \param{const wxFont *}{font = NULL}}
\constfunc{wxSize}{GetTextExtent}{\param{const wxString\& }{string}}
\constfunc{wxSize}{GetTextExtent}{\param{const wxString\& }{string}}
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
- wxFont *theFont = NULL) const;
+ const wxFont *theFont = NULL) const;
virtual bool CanDrawBitmap() const;
virtual bool CanGetTextExtent() const;
virtual bool CanDrawBitmap() const;
virtual bool CanGetTextExtent() const;
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
- wxFont *theFont = NULL) const
+ const wxFont *theFont = NULL) const
{ DoGetTextExtent(string, x, y, descent, externalLeading, theFont); }
wxSize GetTextExtent(const wxString& string) const
{ DoGetTextExtent(string, x, y, descent, externalLeading, theFont); }
wxSize GetTextExtent(const wxString& string) const
wxCoord *width,
wxCoord *height,
wxCoord *heightLine = NULL,
wxCoord *width,
wxCoord *height,
wxCoord *heightLine = NULL,
- wxFont *font = NULL) const;
+ const wxFont *font = NULL) const;
wxSize GetMultiLineTextExtent(const wxString& string) const
{
wxSize GetMultiLineTextExtent(const wxString& string) const
{
long *x, long *y,
long *descent = NULL,
long *externalLeading = NULL,
long *x, long *y,
long *descent = NULL,
long *externalLeading = NULL,
- wxFont *theFont = NULL) const
+ const wxFont *theFont = NULL) const
{
wxCoord x2, y2, descent2, externalLeading2;
DoGetTextExtent(string, &x2, &y2,
{
wxCoord x2, y2, descent2, externalLeading2;
DoGetTextExtent(string, &x2, &y2,
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
- wxFont *theFont = NULL) const = 0;
+ const wxFont *theFont = NULL) const = 0;
virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
- wxFont *theFont = NULL) const;
+ const wxFont *theFont = NULL) const;
virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
- wxFont *theFont = NULL) const
+ const wxFont *theFont = NULL) const
{
// never mirrored
m_dc.DoGetTextExtent(string, x, y, descent, externalLeading, theFont);
{
// never mirrored
m_dc.DoGetTextExtent(string, x, y, descent, externalLeading, theFont);
void DoGetSize(int * x, int *y) const { *x = m_width; *y = m_height ; return ; }
void DoGetSize(int * x, int *y) const { *x = m_width; *y = m_height ; return ; }
- void DoGetTextExtent(const wxString& string, wxCoord *w, wxCoord *h, wxCoord *descent = NULL, wxCoord *externalLeading = NULL, wxFont *font = NULL) const ;
+ void DoGetTextExtent(const wxString& string, wxCoord *w, wxCoord *h, wxCoord *descent = NULL, wxCoord *externalLeading = NULL, const wxFont *font = NULL) const ;
void DoSetClippingRegionAsRegion(const class wxRegion &)
{ wxASSERT_MSG (false, wxT("wxSVGFILEDC::DoSetClippingRegionAsRegion Call not yet implemented")); return ; }
void DoSetClippingRegionAsRegion(const class wxRegion &)
{ wxASSERT_MSG (false, wxT("wxSVGFILEDC::DoSetClippingRegionAsRegion Call not yet implemented")); return ; }
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
- wxFont *theFont = NULL) const;
+ const wxFont *theFont = NULL) const;
virtual bool CanDrawBitmap() const { return true; }
virtual bool CanGetTextExtent() const { return true; }
virtual bool CanDrawBitmap() const { return true; }
virtual bool CanGetTextExtent() const { return true; }
void DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
void DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
- wxFont *theFont = NULL) const;
+ const wxFont *theFont = NULL) const;
void DoGetSize(int* width, int* height) const;
void DoGetSizeMM(int *width, int *height) const;
void DoGetSize(int* width, int* height) const;
void DoGetSizeMM(int *width, int *height) const;
wxCoord *width, wxCoord *height,
wxCoord *descent = (wxCoord *) NULL,
wxCoord *externalLeading = (wxCoord *) NULL,
wxCoord *width, wxCoord *height,
wxCoord *descent = (wxCoord *) NULL,
wxCoord *externalLeading = (wxCoord *) NULL,
- wxFont *theFont = (wxFont *) NULL) const;
+ const wxFont *theFont = (wxFont *) NULL) const;
virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
virtual void DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height );
virtual void DoSetClippingRegionAsRegion( const wxRegion ®ion );
virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
virtual void DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height );
virtual void DoSetClippingRegionAsRegion( const wxRegion ®ion );
void DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
wxCoord *descent = (wxCoord *) NULL,
wxCoord *externalLeading = (wxCoord *) NULL,
void DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
wxCoord *descent = (wxCoord *) NULL,
wxCoord *externalLeading = (wxCoord *) NULL,
- wxFont *theFont = (wxFont *) NULL ) const;
+ const wxFont *theFont = (wxFont *) NULL ) const;
void DoGetSize(int* width, int* height) const;
void DoGetSizeMM(int *width, int *height) const;
void DoGetSize(int* width, int* height) const;
void DoGetSizeMM(int *width, int *height) const;
unsigned char m_currentRed;
unsigned char m_currentGreen;
unsigned char m_currentBlue;
unsigned char m_currentRed;
unsigned char m_currentGreen;
unsigned char m_currentBlue;
int m_deviceOffsetY;
wxGnomePrinter *m_printer;
int m_deviceOffsetY;
wxGnomePrinter *m_printer;
GnomePrintJob* m_job; // only used and destroyed when created with wxPrintData
void makeEllipticalPath(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
GnomePrintJob* m_job; // only used and destroyed when created with wxPrintData
void makeEllipticalPath(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
private:
wxCoord XDEV2LOG(wxCoord x) const
{
private:
wxCoord XDEV2LOG(wxCoord x) const
{
wxCoord *width, wxCoord *height,
wxCoord *descent = (wxCoord *) NULL,
wxCoord *externalLeading = (wxCoord *) NULL,
wxCoord *width, wxCoord *height,
wxCoord *descent = (wxCoord *) NULL,
wxCoord *externalLeading = (wxCoord *) NULL,
- wxFont *theFont = (wxFont *) NULL) const;
+ const wxFont *theFont = (wxFont *) NULL) const;
public:
virtual wxCoord GetCharWidth() const;
public:
virtual wxCoord GetCharWidth() const;
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
- wxFont *theFont = NULL) const;
+ const wxFont *theFont = NULL) const;
virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
- wxFont *theFont = NULL) const;
+ const wxFont *theFont = NULL) const;
virtual bool CanDrawBitmap() const;
virtual bool CanGetTextExtent() const;
virtual bool CanDrawBitmap() const;
virtual bool CanGetTextExtent() const;
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
- wxFont *theFont = NULL) const;
+ const wxFont *theFont = NULL) const;
virtual bool CanDrawBitmap() const;
virtual bool CanGetTextExtent() const;
virtual bool CanDrawBitmap() const;
virtual bool CanGetTextExtent() const;
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
- wxFont *theFont = NULL) const;
+ const wxFont *theFont = NULL) const;
virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
virtual void SetMapMode(int mode);
virtual void GetTextExtent(const wxString& string, long *x, long *y,
long *descent = NULL, long *externalLeading = NULL,
virtual void SetMapMode(int mode);
virtual void GetTextExtent(const wxString& string, long *x, long *y,
long *descent = NULL, long *externalLeading = NULL,
- wxFont *theFont = NULL, bool use16bit = false) const;
+ const wxFont *theFont = NULL, bool use16bit = false) const;
// Implementation
wxMetafile *GetMetaFile() const { return m_metaFile; }
// Implementation
wxMetafile *GetMetaFile() const { return m_metaFile; }
virtual void SetMapMode(int mode);
virtual void GetTextExtent(const wxString& string, long *x, long *y,
long *descent = NULL, long *externalLeading = NULL,
virtual void SetMapMode(int mode);
virtual void GetTextExtent(const wxString& string, long *x, long *y,
long *descent = NULL, long *externalLeading = NULL,
- wxFont *theFont = NULL, bool use16bit = false) const;
+ const wxFont *theFont = NULL, bool use16bit = false) const;
// Implementation
inline wxMetafile *GetMetaFile(void) const { return m_metaFile; }
// Implementation
inline wxMetafile *GetMetaFile(void) const { return m_metaFile; }
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
- wxFont *theFont = NULL) const;
+ const wxFont *theFont = NULL) const;
virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
virtual bool CanDrawBitmap() const;
virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
virtual bool CanDrawBitmap() const;
virtual void SetMapMode(int mode);
virtual void GetTextExtent(const wxString& string, long *x, long *y,
long *descent = NULL, long *externalLeading = NULL,
virtual void SetMapMode(int mode);
virtual void GetTextExtent(const wxString& string, long *x, long *y,
long *descent = NULL, long *externalLeading = NULL,
- wxFont *theFont = NULL, bool use16bit = FALSE) const;
+ const wxFont *theFont = NULL, bool use16bit = FALSE) const;
// Implementation
wxMetafile *GetMetaFile() const { return m_metaFile; }
// Implementation
wxMetafile *GetMetaFile() const { return m_metaFile; }
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
- wxFont *theFont = NULL) const;
+ const wxFont *theFont = NULL) const;
-void wxDC::DoGetTextExtent(const wxString& text, wxCoord *x, wxCoord *y, wxCoord *descent, wxCoord *externalLeading, wxFont *theFont) const
+void wxDC::DoGetTextExtent(const wxString& text, wxCoord *x, wxCoord *y, wxCoord *descent, wxCoord *externalLeading, const wxFont *theFont) const
{
wxAutoNSAutoreleasePool pool;
// FIXME: Cache this so it can be used for DoDrawText
{
wxAutoNSAutoreleasePool pool;
// FIXME: Cache this so it can be used for DoDrawText
wxCoord *x,
wxCoord *y,
wxCoord *h,
wxCoord *x,
wxCoord *y,
wxCoord *h,
+ const wxFont *font) const
{
wxCoord widthTextMax = 0, widthLine,
heightTextTotal = 0, heightLineDefault = 0, heightLine = 0;
{
wxCoord widthTextMax = 0, widthLine,
heightTextTotal = 0, heightLineDefault = 0, heightLine = 0;
void wxGCDC::DoGetTextExtent( const wxString &str, wxCoord *width, wxCoord *height,
wxCoord *descent, wxCoord *externalLeading ,
void wxGCDC::DoGetTextExtent( const wxString &str, wxCoord *width, wxCoord *height,
wxCoord *descent, wxCoord *externalLeading ,
- wxFont *theFont ) const
+ const wxFont *theFont ) const
{
wxCHECK_RET( Ok(), wxT("wxGCDC(cg)::DoGetTextExtent - invalid DC") );
{
wxCHECK_RET( Ok(), wxT("wxGCDC(cg)::DoGetTextExtent - invalid DC") );
-void wxSVGFileDC::DoGetTextExtent(const wxString& string, wxCoord *w, wxCoord *h, wxCoord *descent , wxCoord *externalLeading , wxFont *font) const
+void wxSVGFileDC::DoGetTextExtent(const wxString& string, wxCoord *w, wxCoord *h, wxCoord *descent , wxCoord *externalLeading , const wxFont *font) const
void wxDC::DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
wxCoord *descent, wxCoord *externalLeading,
void wxDC::DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
wxCoord *descent, wxCoord *externalLeading,
+ const wxFont *theFont) const
{
wxCHECK_RET( Ok(), wxT("invalid dc") );
wxCHECK_RET( m_font.Ok(), wxT("no font selected") );
{
wxCHECK_RET( Ok(), wxT("invalid dc") );
wxCHECK_RET( m_font.Ok(), wxT("no font selected") );
void wxPostScriptDC::DoGetTextExtent(const wxString& string,
wxCoord *x, wxCoord *y,
wxCoord *descent, wxCoord *externalLeading,
void wxPostScriptDC::DoGetTextExtent(const wxString& string,
wxCoord *x, wxCoord *y,
wxCoord *descent, wxCoord *externalLeading,
- wxFont *theFont ) const
+ const wxFont *theFont ) const
- wxFont *fontToUse = theFont;
+ const wxFont *fontToUse = theFont;
- if (!fontToUse) fontToUse = (wxFont*) &m_font;
+ if (!fontToUse) fontToUse = &m_font;
wxCHECK_RET( fontToUse, wxT("GetTextExtent: no font defined") );
wxCHECK_RET( fontToUse, wxT("GetTextExtent: no font defined") );
void wxWindowDC::DoGetTextExtent(const wxString &string,
wxCoord *width, wxCoord *height,
wxCoord *descent, wxCoord *externalLeading,
void wxWindowDC::DoGetTextExtent(const wxString &string,
wxCoord *width, wxCoord *height,
wxCoord *descent, wxCoord *externalLeading,
+ const wxFont *theFont) const
{
if ( width )
*width = 0;
{
if ( width )
*width = 0;
void wxGnomePrintDC::DoGetTextExtent(const wxString& string, wxCoord *width, wxCoord *height,
wxCoord *descent,
wxCoord *externalLeading,
void wxGnomePrintDC::DoGetTextExtent(const wxString& string, wxCoord *width, wxCoord *height,
wxCoord *descent,
wxCoord *externalLeading,
- wxFont *theFont ) const
+ const wxFont *theFont ) const
{
if ( width )
*width = 0;
{
if ( width )
*width = 0;
void wxWindowDC::DoGetTextExtent(const wxString &string,
wxCoord *width, wxCoord *height,
wxCoord *descent, wxCoord *externalLeading,
void wxWindowDC::DoGetTextExtent(const wxString &string,
wxCoord *width, wxCoord *height,
wxCoord *descent, wxCoord *externalLeading,
+ const wxFont *theFont) const
{
if ( width )
*width = 0;
{
if ( width )
*width = 0;
void wxDC::DoGetTextExtent( const wxString &str, wxCoord *width, wxCoord *height,
wxCoord *descent, wxCoord *externalLeading ,
void wxDC::DoGetTextExtent( const wxString &str, wxCoord *width, wxCoord *height,
wxCoord *descent, wxCoord *externalLeading ,
- wxFont *theFont ) const
+ const wxFont *theFont ) const
{
wxCHECK_RET(Ok(), wxT("wxDC::DoGetTextExtent - invalid DC"));
{
wxCHECK_RET(Ok(), wxT("wxDC::DoGetTextExtent - invalid DC"));
void wxDC::DoGetTextExtent( const wxString &str, wxCoord *width, wxCoord *height,
wxCoord *descent, wxCoord *externalLeading ,
void wxDC::DoGetTextExtent( const wxString &str, wxCoord *width, wxCoord *height,
wxCoord *descent, wxCoord *externalLeading ,
- wxFont *theFont ) const
+ const wxFont *theFont ) const
{
wxCHECK_RET( Ok(), wxT("wxDC(cg)::DoGetTextExtent - invalid DC") );
{
wxCHECK_RET( Ok(), wxT("wxDC(cg)::DoGetTextExtent - invalid DC") );
void wxDC::DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
wxCoord *descent, wxCoord *externalLeading,
void wxDC::DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
wxCoord *descent, wxCoord *externalLeading,
+ const wxFont *theFont) const
void wxWindowDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *height,
wxCoord *descent, wxCoord *externalLeading,
void wxWindowDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *height,
wxCoord *descent, wxCoord *externalLeading,
+ const wxFont *font ) const
{
wxCHECK_RET( Ok(), "invalid dc" );
{
wxCHECK_RET( Ok(), "invalid dc" );
void wxDC::DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
wxCoord *descent, wxCoord *externalLeading,
void wxDC::DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
wxCoord *descent, wxCoord *externalLeading,
+ const wxFont *font) const
{
#ifdef __WXMICROWIN__
if (!GetHDC())
{
#ifdef __WXMICROWIN__
if (!GetHDC())
}
void wxMetafileDC::GetTextExtent(const wxString& string, long *x, long *y,
}
void wxMetafileDC::GetTextExtent(const wxString& string, long *x, long *y,
- long *descent, long *externalLeading, wxFont *theFont, bool WXUNUSED(use16bit)) const
+ long *descent, long *externalLeading,
+ const wxFont *theFont,
+ bool WXUNUSED(use16bit)) const
- wxFont *fontToUse = theFont;
+ const wxFont *fontToUse = theFont;
- fontToUse = (wxFont*) &m_font;
long *WXUNUSED(y),
long *WXUNUSED(descent),
long *WXUNUSED(externalLeading),
long *WXUNUSED(y),
long *WXUNUSED(descent),
long *WXUNUSED(externalLeading),
bool WXUNUSED(use16bit) ) const
{
bool WXUNUSED(use16bit) ) const
{
- wxFont *fontToUse = theFont;
+ const wxFont *fontToUse = theFont;
- fontToUse = (wxFont*) &m_font;
void wxDC::DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
wxCoord *descent, wxCoord *externalLeading,
void wxDC::DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
wxCoord *descent, wxCoord *externalLeading,
+ const wxFont *font) const
}
void wxMetafileDC::GetTextExtent(const wxString& string, long *x, long *y,
}
void wxMetafileDC::GetTextExtent(const wxString& string, long *x, long *y,
- long *descent, long *externalLeading, wxFont *theFont, bool WXUNUSED(use16bit)) const
+ long *descent, long *externalLeading,
+ const wxFont *theFont, bool WXUNUSED(use16bit)) const
void wxWindowDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *height,
wxCoord *descent, wxCoord *externalLeading,
void wxWindowDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *height,
wxCoord *descent, wxCoord *externalLeading,
+ const wxFont *font ) const
{
wxCHECK_RET( Ok(), wxT("invalid dc") );
{
wxCHECK_RET( Ok(), wxT("invalid dc") );