corrections after wxUniv merge
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10712 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -98,7 +98,7 @@ public:
|
|||||||
|
|
||||||
#define M_BITMAPDATA ((wxBitmapRefData *)m_refData)
|
#define M_BITMAPDATA ((wxBitmapRefData *)m_refData)
|
||||||
|
|
||||||
class WXDLLEXPORT wxBitmapHandler: public wxObject
|
class WXDLLEXPORT wxBitmapHandler: public wxBitmapHandlerBase
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxBitmapHandler)
|
DECLARE_DYNAMIC_CLASS(wxBitmapHandler)
|
||||||
public:
|
public:
|
||||||
@@ -110,7 +110,7 @@ public:
|
|||||||
virtual bool Create(wxBitmap *bitmap, void *data, long flags, int width, int height, int depth = 1);
|
virtual bool Create(wxBitmap *bitmap, void *data, long flags, int width, int height, int depth = 1);
|
||||||
virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
|
virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
|
||||||
int desiredWidth, int desiredHeight);
|
int desiredWidth, int desiredHeight);
|
||||||
virtual bool SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette = NULL);
|
virtual bool SaveFile(const wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette = NULL);
|
||||||
|
|
||||||
inline void SetName(const wxString& name) { m_name = name; }
|
inline void SetName(const wxString& name) { m_name = name; }
|
||||||
inline void SetExtension(const wxString& ext) { m_extension = ext; }
|
inline void SetExtension(const wxString& ext) { m_extension = ext; }
|
||||||
@@ -126,7 +126,7 @@ protected:
|
|||||||
|
|
||||||
#define M_BITMAPHANDLERDATA ((wxBitmapRefData *)bitmap->GetRefData())
|
#define M_BITMAPHANDLERDATA ((wxBitmapRefData *)bitmap->GetRefData())
|
||||||
|
|
||||||
class WXDLLEXPORT wxBitmap: public wxGDIObject
|
class WXDLLEXPORT wxBitmap: public wxBitmapBase
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxBitmap)
|
DECLARE_DYNAMIC_CLASS(wxBitmap)
|
||||||
|
|
||||||
@@ -148,10 +148,10 @@ public:
|
|||||||
wxBitmap(char **bits);
|
wxBitmap(char **bits);
|
||||||
|
|
||||||
// Load a file or resource
|
// Load a file or resource
|
||||||
wxBitmap(const wxString& name, long type = wxBITMAP_TYPE_PICT_RESOURCE);
|
wxBitmap(const wxString& name, wxBitmapType type = wxBITMAP_TYPE_PICT_RESOURCE);
|
||||||
|
|
||||||
// Constructor for generalised creation from data
|
// Constructor for generalised creation from data
|
||||||
wxBitmap(void *data, long type, int width, int height, int depth = 1);
|
wxBitmap(void *data, wxBitmapType type, int width, int height, int depth = 1);
|
||||||
|
|
||||||
// If depth is omitted, will create a bitmap compatible with the display
|
// If depth is omitted, will create a bitmap compatible with the display
|
||||||
wxBitmap(int width, int height, int depth = -1);
|
wxBitmap(int width, int height, int depth = -1);
|
||||||
@@ -167,9 +167,12 @@ public:
|
|||||||
wxBitmap GetSubBitmap( const wxRect& rect ) const;
|
wxBitmap GetSubBitmap( const wxRect& rect ) const;
|
||||||
|
|
||||||
virtual bool Create(int width, int height, int depth = -1);
|
virtual bool Create(int width, int height, int depth = -1);
|
||||||
virtual bool Create(void *data, long type, int width, int height, int depth = 1);
|
virtual bool Create(void *data, wxBitmapType type, int width, int height, int depth = 1);
|
||||||
virtual bool LoadFile(const wxString& name, long type = wxBITMAP_TYPE_BMP_RESOURCE);
|
virtual bool LoadFile(const wxString& name, wxBitmapType type = wxBITMAP_TYPE_BMP_RESOURCE);
|
||||||
virtual bool SaveFile(const wxString& name, int type, const wxPalette *cmap = NULL);
|
virtual bool SaveFile(const wxString& name, wxBitmapType type, const wxPalette *cmap = NULL) const;
|
||||||
|
|
||||||
|
// copies the contents and mask of the given (colour) icon to the bitmap
|
||||||
|
virtual bool CopyFromIcon(const wxIcon& icon);
|
||||||
|
|
||||||
bool Ok() const;
|
bool Ok() const;
|
||||||
int GetWidth() const;
|
int GetWidth() const;
|
||||||
@@ -200,8 +203,8 @@ public:
|
|||||||
static void InsertHandler(wxBitmapHandler *handler);
|
static void InsertHandler(wxBitmapHandler *handler);
|
||||||
static bool RemoveHandler(const wxString& name);
|
static bool RemoveHandler(const wxString& name);
|
||||||
static wxBitmapHandler *FindHandler(const wxString& name);
|
static wxBitmapHandler *FindHandler(const wxString& name);
|
||||||
static wxBitmapHandler *FindHandler(const wxString& extension, long bitmapType);
|
static wxBitmapHandler *FindHandler(const wxString& extension, wxBitmapType type);
|
||||||
static wxBitmapHandler *FindHandler(long bitmapType);
|
static wxBitmapHandler *FindHandler(wxBitmapType type);
|
||||||
|
|
||||||
static void InitStandardHandlers();
|
static void InitStandardHandlers();
|
||||||
static void CleanUpHandlers();
|
static void CleanUpHandlers();
|
||||||
|
@@ -16,16 +16,12 @@
|
|||||||
#pragma interface "radiobox.h"
|
#pragma interface "radiobox.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/control.h"
|
|
||||||
|
|
||||||
WXDLLEXPORT_DATA(extern const char*) wxRadioBoxNameStr;
|
|
||||||
|
|
||||||
// List box item
|
// List box item
|
||||||
class wxBitmap ;
|
class WXDLLEXPORT wxBitmap ;
|
||||||
|
|
||||||
class wxRadioButton ;
|
class WXDLLEXPORT wxRadioButton ;
|
||||||
|
|
||||||
class wxRadioBox: public wxControl
|
class WXDLLEXPORT wxRadioBox: public wxControl, public wxRadioBoxBase
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxRadioBox)
|
DECLARE_DYNAMIC_CLASS(wxRadioBox)
|
||||||
public:
|
public:
|
||||||
@@ -55,7 +51,7 @@ public:
|
|||||||
int GetSelection() const;
|
int GetSelection() const;
|
||||||
wxString GetString(int item) const;
|
wxString GetString(int item) const;
|
||||||
virtual wxString GetStringSelection() const;
|
virtual wxString GetStringSelection() const;
|
||||||
inline virtual int Number() const { return m_noItems; } ;
|
inline virtual int GetCount() const { return m_noItems; } ;
|
||||||
void SetLabel(const wxString& label) ;
|
void SetLabel(const wxString& label) ;
|
||||||
void SetLabel(int item, const wxString& label) ;
|
void SetLabel(int item, const wxString& label) ;
|
||||||
void SetSelection(int item);
|
void SetSelection(int item);
|
||||||
|
@@ -16,11 +16,9 @@
|
|||||||
#pragma interface "statbmp.h"
|
#pragma interface "statbmp.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/control.h"
|
#include "wx/icon.h"
|
||||||
|
|
||||||
WXDLLEXPORT_DATA(extern const char*) wxStaticBitmapNameStr;
|
class WXDLLEXPORT wxStaticBitmap: public wxStaticBitmapBase
|
||||||
|
|
||||||
class WXDLLEXPORT wxStaticBitmap: public wxControl
|
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
|
DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
|
||||||
public:
|
public:
|
||||||
@@ -50,8 +48,12 @@ class WXDLLEXPORT wxStaticBitmap: public wxControl
|
|||||||
virtual void OnPaint( wxPaintEvent &event ) ;
|
virtual void OnPaint( wxPaintEvent &event ) ;
|
||||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||||
|
|
||||||
inline const wxBitmap& GetBitmap() const { return m_messageBitmap; }
|
wxBitmap GetBitmap() const { return m_bitmap; }
|
||||||
const wxIcon& GetIcon() const { return (const wxIcon&) GetBitmap() ; }
|
wxIcon GetIcon() const
|
||||||
|
{
|
||||||
|
// icons and bitmaps are really the same thing in wxMac
|
||||||
|
return (const wxIcon &)m_bitmap;
|
||||||
|
}
|
||||||
void SetIcon(const wxIcon& icon) { SetBitmap( (const wxBitmap &)icon ) ; }
|
void SetIcon(const wxIcon& icon) { SetBitmap( (const wxBitmap &)icon ) ; }
|
||||||
|
|
||||||
// overriden base class virtuals
|
// overriden base class virtuals
|
||||||
@@ -59,7 +61,7 @@ class WXDLLEXPORT wxStaticBitmap: public wxControl
|
|||||||
wxSize DoGetBestSize() const ;
|
wxSize DoGetBestSize() const ;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxBitmap m_messageBitmap;
|
wxBitmap m_bitmap;
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -77,7 +77,7 @@ int wxChoice::DoAppend(const wxString& item)
|
|||||||
m_datas.Add( NULL ) ;
|
m_datas.Add( NULL ) ;
|
||||||
int index = m_strings.GetCount() - 1 ;
|
int index = m_strings.GetCount() - 1 ;
|
||||||
DoSetItemClientData( index , NULL ) ;
|
DoSetItemClientData( index , NULL ) ;
|
||||||
SetControlMaximum( m_macControl , Number()) ;
|
SetControlMaximum( m_macControl , GetCount()) ;
|
||||||
return index ;
|
return index ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@ void wxChoice::Delete(int n)
|
|||||||
::DeleteMenuItem( m_macPopUpMenuHandle , n + 1) ;
|
::DeleteMenuItem( m_macPopUpMenuHandle , n + 1) ;
|
||||||
m_strings.Remove( n ) ;
|
m_strings.Remove( n ) ;
|
||||||
m_datas.Remove( n ) ;
|
m_datas.Remove( n ) ;
|
||||||
SetControlMaximum( m_macControl , Number()) ;
|
SetControlMaximum( m_macControl , GetCount()) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxChoice::Clear()
|
void wxChoice::Clear()
|
||||||
|
@@ -19,14 +19,14 @@
|
|||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
|
|
||||||
#if !USE_SHARED_LIBRARY
|
#if !USE_SHARED_LIBRARY
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl)
|
IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxStaticBitmapBase)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* wxStaticBitmap
|
* wxStaticBitmap
|
||||||
*/
|
*/
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxStaticBitmap, wxControl)
|
BEGIN_EVENT_TABLE(wxStaticBitmap, wxStaticBitmapBase)
|
||||||
EVT_PAINT(wxStaticBitmap::OnPaint)
|
EVT_PAINT(wxStaticBitmap::OnPaint)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id,
|
|||||||
m_backgroundColour = parent->GetBackgroundColour() ;
|
m_backgroundColour = parent->GetBackgroundColour() ;
|
||||||
m_foregroundColour = parent->GetForegroundColour() ;
|
m_foregroundColour = parent->GetForegroundColour() ;
|
||||||
|
|
||||||
m_messageBitmap = bitmap;
|
m_bitmap = bitmap;
|
||||||
if ( id == -1 )
|
if ( id == -1 )
|
||||||
m_windowId = (int)NewControlId();
|
m_windowId = (int)NewControlId();
|
||||||
else
|
else
|
||||||
@@ -52,7 +52,7 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id,
|
|||||||
m_windowStyle = style;
|
m_windowStyle = style;
|
||||||
|
|
||||||
bool ret = wxControl::Create( parent, id, pos, size, style , wxDefaultValidator , name );
|
bool ret = wxControl::Create( parent, id, pos, size, style , wxDefaultValidator , name );
|
||||||
SetSizeOrDefault( size ) ;
|
SetBestSize( size ) ;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -64,9 +64,9 @@ void wxStaticBitmap::SetSize(int x, int y, int width, int height, int sizeFlags)
|
|||||||
|
|
||||||
void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap)
|
void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap)
|
||||||
{
|
{
|
||||||
m_messageBitmap = bitmap;
|
m_bitmap = bitmap;
|
||||||
Refresh() ;
|
Refresh() ;
|
||||||
SetSizeOrDefault();
|
SetBestSize(wxSize(bitmap.GetWidth(), bitmap.GetHeight()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxStaticBitmap::OnPaint( wxPaintEvent &event )
|
void wxStaticBitmap::OnPaint( wxPaintEvent &event )
|
||||||
@@ -74,13 +74,13 @@ void wxStaticBitmap::OnPaint( wxPaintEvent &event )
|
|||||||
wxPaintDC dc(this);
|
wxPaintDC dc(this);
|
||||||
PrepareDC(dc);
|
PrepareDC(dc);
|
||||||
|
|
||||||
dc.DrawBitmap( m_messageBitmap , 0 , 0 , TRUE ) ;
|
dc.DrawBitmap( m_bitmap , 0 , 0 , TRUE ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxSize wxStaticBitmap::DoGetBestSize() const
|
wxSize wxStaticBitmap::DoGetBestSize() const
|
||||||
{
|
{
|
||||||
if ( m_messageBitmap.Ok() )
|
if ( m_bitmap.Ok() )
|
||||||
return wxSize(m_messageBitmap.GetWidth(), m_messageBitmap.GetHeight());
|
return wxSize(m_bitmap.GetWidth(), m_bitmap.GetHeight());
|
||||||
else
|
else
|
||||||
return wxSize(16, 16); // completely arbitrary
|
return wxSize(16, 16); // completely arbitrary
|
||||||
}
|
}
|
||||||
|
@@ -23,12 +23,12 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#if !USE_SHARED_LIBRARY
|
#if !USE_SHARED_LIBRARY
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxControl)
|
IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxStaticTextBase)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <wx/mac/uma.h>
|
#include <wx/mac/uma.h>
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxStaticText, wxControl)
|
BEGIN_EVENT_TABLE(wxStaticText, wxStaticTextBase)
|
||||||
EVT_PAINT(wxStaticText::OnPaint)
|
EVT_PAINT(wxStaticText::OnPaint)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
|
|||||||
m_label = label ;
|
m_label = label ;
|
||||||
|
|
||||||
bool ret = wxControl::Create( parent, id, pos, size, style , wxDefaultValidator , name );
|
bool ret = wxControl::Create( parent, id, pos, size, style , wxDefaultValidator , name );
|
||||||
SetSizeOrDefault( size ) ;
|
SetBestSize( size ) ;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -235,7 +235,7 @@ void wxStaticText::SetLabel(const wxString& st )
|
|||||||
SetTitle( st ) ;
|
SetTitle( st ) ;
|
||||||
m_label = st ;
|
m_label = st ;
|
||||||
if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
|
if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
|
||||||
SetSizeOrDefault() ;
|
SetSize( GetBestSize() ) ;
|
||||||
|
|
||||||
Refresh() ;
|
Refresh() ;
|
||||||
MacUpdateImmediately() ;
|
MacUpdateImmediately() ;
|
||||||
|
@@ -77,7 +77,7 @@ int wxChoice::DoAppend(const wxString& item)
|
|||||||
m_datas.Add( NULL ) ;
|
m_datas.Add( NULL ) ;
|
||||||
int index = m_strings.GetCount() - 1 ;
|
int index = m_strings.GetCount() - 1 ;
|
||||||
DoSetItemClientData( index , NULL ) ;
|
DoSetItemClientData( index , NULL ) ;
|
||||||
SetControlMaximum( m_macControl , Number()) ;
|
SetControlMaximum( m_macControl , GetCount()) ;
|
||||||
return index ;
|
return index ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@ void wxChoice::Delete(int n)
|
|||||||
::DeleteMenuItem( m_macPopUpMenuHandle , n + 1) ;
|
::DeleteMenuItem( m_macPopUpMenuHandle , n + 1) ;
|
||||||
m_strings.Remove( n ) ;
|
m_strings.Remove( n ) ;
|
||||||
m_datas.Remove( n ) ;
|
m_datas.Remove( n ) ;
|
||||||
SetControlMaximum( m_macControl , Number()) ;
|
SetControlMaximum( m_macControl , GetCount()) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxChoice::Clear()
|
void wxChoice::Clear()
|
||||||
|
@@ -19,14 +19,14 @@
|
|||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
|
|
||||||
#if !USE_SHARED_LIBRARY
|
#if !USE_SHARED_LIBRARY
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl)
|
IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxStaticBitmapBase)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* wxStaticBitmap
|
* wxStaticBitmap
|
||||||
*/
|
*/
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxStaticBitmap, wxControl)
|
BEGIN_EVENT_TABLE(wxStaticBitmap, wxStaticBitmapBase)
|
||||||
EVT_PAINT(wxStaticBitmap::OnPaint)
|
EVT_PAINT(wxStaticBitmap::OnPaint)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id,
|
|||||||
m_backgroundColour = parent->GetBackgroundColour() ;
|
m_backgroundColour = parent->GetBackgroundColour() ;
|
||||||
m_foregroundColour = parent->GetForegroundColour() ;
|
m_foregroundColour = parent->GetForegroundColour() ;
|
||||||
|
|
||||||
m_messageBitmap = bitmap;
|
m_bitmap = bitmap;
|
||||||
if ( id == -1 )
|
if ( id == -1 )
|
||||||
m_windowId = (int)NewControlId();
|
m_windowId = (int)NewControlId();
|
||||||
else
|
else
|
||||||
@@ -52,7 +52,7 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id,
|
|||||||
m_windowStyle = style;
|
m_windowStyle = style;
|
||||||
|
|
||||||
bool ret = wxControl::Create( parent, id, pos, size, style , wxDefaultValidator , name );
|
bool ret = wxControl::Create( parent, id, pos, size, style , wxDefaultValidator , name );
|
||||||
SetSizeOrDefault( size ) ;
|
SetBestSize( size ) ;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -64,9 +64,9 @@ void wxStaticBitmap::SetSize(int x, int y, int width, int height, int sizeFlags)
|
|||||||
|
|
||||||
void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap)
|
void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap)
|
||||||
{
|
{
|
||||||
m_messageBitmap = bitmap;
|
m_bitmap = bitmap;
|
||||||
Refresh() ;
|
Refresh() ;
|
||||||
SetSizeOrDefault();
|
SetBestSize(wxSize(bitmap.GetWidth(), bitmap.GetHeight()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxStaticBitmap::OnPaint( wxPaintEvent &event )
|
void wxStaticBitmap::OnPaint( wxPaintEvent &event )
|
||||||
@@ -74,13 +74,13 @@ void wxStaticBitmap::OnPaint( wxPaintEvent &event )
|
|||||||
wxPaintDC dc(this);
|
wxPaintDC dc(this);
|
||||||
PrepareDC(dc);
|
PrepareDC(dc);
|
||||||
|
|
||||||
dc.DrawBitmap( m_messageBitmap , 0 , 0 , TRUE ) ;
|
dc.DrawBitmap( m_bitmap , 0 , 0 , TRUE ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxSize wxStaticBitmap::DoGetBestSize() const
|
wxSize wxStaticBitmap::DoGetBestSize() const
|
||||||
{
|
{
|
||||||
if ( m_messageBitmap.Ok() )
|
if ( m_bitmap.Ok() )
|
||||||
return wxSize(m_messageBitmap.GetWidth(), m_messageBitmap.GetHeight());
|
return wxSize(m_bitmap.GetWidth(), m_bitmap.GetHeight());
|
||||||
else
|
else
|
||||||
return wxSize(16, 16); // completely arbitrary
|
return wxSize(16, 16); // completely arbitrary
|
||||||
}
|
}
|
||||||
|
@@ -23,12 +23,12 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#if !USE_SHARED_LIBRARY
|
#if !USE_SHARED_LIBRARY
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxControl)
|
IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxStaticTextBase)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <wx/mac/uma.h>
|
#include <wx/mac/uma.h>
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxStaticText, wxControl)
|
BEGIN_EVENT_TABLE(wxStaticText, wxStaticTextBase)
|
||||||
EVT_PAINT(wxStaticText::OnPaint)
|
EVT_PAINT(wxStaticText::OnPaint)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
|
|||||||
m_label = label ;
|
m_label = label ;
|
||||||
|
|
||||||
bool ret = wxControl::Create( parent, id, pos, size, style , wxDefaultValidator , name );
|
bool ret = wxControl::Create( parent, id, pos, size, style , wxDefaultValidator , name );
|
||||||
SetSizeOrDefault( size ) ;
|
SetBestSize( size ) ;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -235,7 +235,7 @@ void wxStaticText::SetLabel(const wxString& st )
|
|||||||
SetTitle( st ) ;
|
SetTitle( st ) ;
|
||||||
m_label = st ;
|
m_label = st ;
|
||||||
if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
|
if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
|
||||||
SetSizeOrDefault() ;
|
SetSize( GetBestSize() ) ;
|
||||||
|
|
||||||
Refresh() ;
|
Refresh() ;
|
||||||
MacUpdateImmediately() ;
|
MacUpdateImmediately() ;
|
||||||
|
Reference in New Issue
Block a user