declare all NameStr[] strings as const char using the correct WXDLLIMPEXP_DATA_ macros; in the process, change wxPropGrid window classes to take 'const wxString& name' arguments instead of 'const wxChar *name'

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56651 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2008-11-02 22:16:14 +00:00
parent 74cc3ec18e
commit 23318a5358
31 changed files with 80 additions and 72 deletions

View File

@@ -24,7 +24,7 @@
class WXDLLIMPEXP_FWD_ADV wxAnimation; class WXDLLIMPEXP_FWD_ADV wxAnimation;
extern WXDLLIMPEXP_DATA_ADV(wxAnimation) wxNullAnimation; extern WXDLLIMPEXP_DATA_ADV(wxAnimation) wxNullAnimation;
extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxAnimationCtrlNameStr[]; extern WXDLLIMPEXP_DATA_ADV(const char) wxAnimationCtrlNameStr[];
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -29,7 +29,7 @@ class WXDLLIMPEXP_FWD_CORE wxItemContainer;
#define wxBITMAPCOMBOBOX_OWNERDRAWN_BASED #define wxBITMAPCOMBOBOX_OWNERDRAWN_BASED
#endif #endif
extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxBitmapComboBoxNameStr[]; extern WXDLLIMPEXP_DATA_ADV(const char) wxBitmapComboBoxNameStr[];
class WXDLLIMPEXP_ADV wxBitmapComboBoxBase class WXDLLIMPEXP_ADV wxBitmapComboBoxBase

View File

@@ -20,7 +20,7 @@
#include "wx/control.h" #include "wx/control.h"
// class name // class name
extern WXDLLIMPEXP_DATA_CORE(const wxChar) wxCollapsiblePaneNameStr[]; extern WXDLLIMPEXP_DATA_CORE(const char) wxCollapsiblePaneNameStr[];
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxCollapsiblePaneBase: interface for wxCollapsiblePane // wxCollapsiblePaneBase: interface for wxCollapsiblePane

View File

@@ -42,7 +42,7 @@ class WXDLLIMPEXP_FWD_ADV wxDataViewColumn;
class WXDLLIMPEXP_FWD_ADV wxDataViewRenderer; class WXDLLIMPEXP_FWD_ADV wxDataViewRenderer;
class WXDLLIMPEXP_FWD_ADV wxDataViewModelNotifier; class WXDLLIMPEXP_FWD_ADV wxDataViewModelNotifier;
extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxDataViewCtrlNameStr[]; extern WXDLLIMPEXP_DATA_ADV(const char) wxDataViewCtrlNameStr[];
// the default width of new (text) columns: // the default width of new (text) columns:
#define wxDVC_DEFAULT_WIDTH 80 #define wxDVC_DEFAULT_WIDTH 80
@@ -707,7 +707,7 @@ public:
{ return m_expander_column; } { return m_expander_column; }
virtual wxDataViewColumn *GetSortingColumn() const = 0; virtual wxDataViewColumn *GetSortingColumn() const = 0;
void SetIndent( int indent ) void SetIndent( int indent )
{ m_indent = indent ; DoSetIndent(); } { m_indent = indent ; DoSetIndent(); }
int GetIndent() const int GetIndent() const

View File

@@ -218,10 +218,13 @@
#ifdef WXMAKINGDLL_PROPGRID #ifdef WXMAKINGDLL_PROPGRID
# define WXDLLIMPEXP_PROPGRID WXEXPORT # define WXDLLIMPEXP_PROPGRID WXEXPORT
# define WXDLLIMPEXP_DATA_PROPGRID(type) WXEXPORT type
#elif defined(WXUSINGDLL) #elif defined(WXUSINGDLL)
# define WXDLLIMPEXP_PROPGRID WXIMPORT # define WXDLLIMPEXP_PROPGRID WXIMPORT
# define WXDLLIMPEXP_DATA_PROPGRID(type) WXIMPORT type
#else /* not making nor using DLL */ #else /* not making nor using DLL */
# define WXDLLIMPEXP_PROPGRID # define WXDLLIMPEXP_PROPGRID
# define WXDLLIMPEXP_DATA_PROPGRID(type) type
#endif #endif
#ifdef WXMAKINGDLL_RICHTEXT #ifdef WXMAKINGDLL_RICHTEXT
@@ -241,11 +244,14 @@
#endif #endif
#ifdef WXMAKINGDLL_STC #ifdef WXMAKINGDLL_STC
#define WXDLLIMPEXP_STC WXEXPORT # define WXDLLIMPEXP_STC WXEXPORT
# define WXDLLIMPEXP_DATA_STC(type) WXEXPORT type
#elif defined(WXUSINGDLL) #elif defined(WXUSINGDLL)
#define WXDLLIMPEXP_STC WXIMPORT # define WXDLLIMPEXP_STC WXIMPORT
# define WXDLLIMPEXP_DATA_STC(type) WXIMPORT type
#else /* not making nor using DLL */ #else /* not making nor using DLL */
#define WXDLLIMPEXP_STC # define WXDLLIMPEXP_STC
# define WXDLLIMPEXP_DATA_STC(type) type
#endif #endif
/* /*

View File

@@ -27,7 +27,7 @@ class WXDLLIMPEXP_FWD_CORE wxListEvent;
#define wxEL_NO_REORDER 0x0800 #define wxEL_NO_REORDER 0x0800
#define wxEL_DEFAULT_STYLE (wxEL_ALLOW_NEW | wxEL_ALLOW_EDIT | wxEL_ALLOW_DELETE) #define wxEL_DEFAULT_STYLE (wxEL_ALLOW_NEW | wxEL_ALLOW_EDIT | wxEL_ALLOW_DELETE)
extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxEditableListBoxNameStr[]; extern WXDLLIMPEXP_DATA_ADV(const char) wxEditableListBoxNameStr[];
// This class provides a composite control that lets the // This class provides a composite control that lets the
// user easily enter list of strings // user easily enter list of strings

View File

@@ -29,7 +29,7 @@ enum
}; };
#define wxFC_DEFAULT_STYLE wxFC_OPEN #define wxFC_DEFAULT_STYLE wxFC_OPEN
extern WXDLLIMPEXP_DATA_CORE( const wxChar ) wxFileCtrlNameStr[]; // in filectrlcmn.cpp extern WXDLLIMPEXP_DATA_CORE(const char) wxFileCtrlNameStr[]; // in filectrlcmn.cpp
extern WXDLLIMPEXP_CORE const wxEventType wxEVT_FILECTRL_SELECTIONCHANGED; extern WXDLLIMPEXP_CORE const wxEventType wxEVT_FILECTRL_SELECTIONCHANGED;
extern WXDLLIMPEXP_CORE const wxEventType wxEVT_FILECTRL_FILEACTIVATED; extern WXDLLIMPEXP_CORE const wxEventType wxEVT_FILECTRL_FILEACTIVATED;

View File

@@ -22,7 +22,7 @@
// constants // constants
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxGridNameStr[]; extern WXDLLIMPEXP_DATA_ADV(const char) wxGridNameStr[];
// Default parameters for wxGrid // Default parameters for wxGrid
// //
@@ -2326,8 +2326,8 @@ public:
SetEventObject(obj); SetEventObject(obj);
} }
// explicitly specifying inline allows gcc < 3.4 to // explicitly specifying inline allows gcc < 3.4 to
// handle the deprecation attribute even in the constructor. // handle the deprecation attribute even in the constructor.
wxDEPRECATED( inline wxDEPRECATED( inline
wxGridEvent(int id, wxGridEvent(int id,
wxEventType type, wxEventType type,

View File

@@ -26,7 +26,7 @@ class WXDLLIMPEXP_FWD_CORE wxToggleBitmapButton;
// global data // global data
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
extern WXDLLIMPEXP_CORE const char wxCheckBoxNameStr[]; extern WXDLLIMPEXP_DATA_CORE(const char) wxCheckBoxNameStr[];
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxBitmapToggleButton // wxBitmapToggleButton
@@ -78,7 +78,7 @@ public:
protected: protected:
void GTKDisableEvents(); void GTKDisableEvents();
void GTKEnableEvents(); void GTKEnableEvents();
virtual wxSize DoGetBestSize() const; virtual wxSize DoGetBestSize() const;
virtual void DoApplyWidgetStyle(GtkRcStyle *style); virtual void DoApplyWidgetStyle(GtkRcStyle *style);
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
@@ -127,11 +127,11 @@ public:
static wxVisualAttributes static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
protected: protected:
void GTKDisableEvents(); void GTKDisableEvents();
void GTKEnableEvents(); void GTKEnableEvents();
virtual wxSize DoGetBestSize() const; virtual wxSize DoGetBestSize() const;
virtual void DoApplyWidgetStyle(GtkRcStyle *style); virtual void DoApplyWidgetStyle(GtkRcStyle *style);
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;

View File

@@ -25,8 +25,8 @@ class WXDLLIMPEXP_FWD_HTML wxHtmlWinParser;
class WXDLLIMPEXP_FWD_HTML wxHtmlListBoxCache; class WXDLLIMPEXP_FWD_HTML wxHtmlListBoxCache;
class WXDLLIMPEXP_FWD_HTML wxHtmlListBoxStyle; class WXDLLIMPEXP_FWD_HTML wxHtmlListBoxStyle;
extern WXDLLIMPEXP_DATA_HTML(const wxChar) wxHtmlListBoxNameStr[]; extern WXDLLIMPEXP_DATA_HTML(const char) wxHtmlListBoxNameStr[];
extern WXDLLIMPEXP_DATA_HTML(const wxChar) wxSimpleHtmlListBoxNameStr[]; extern WXDLLIMPEXP_DATA_HTML(const char) wxSimpleHtmlListBoxNameStr[];
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxHtmlListBox // wxHtmlListBox

View File

@@ -28,7 +28,7 @@
#define wxHL_ALIGN_CENTRE 0x0008 #define wxHL_ALIGN_CENTRE 0x0008
#define wxHL_DEFAULT_STYLE (wxHL_CONTEXTMENU|wxNO_BORDER|wxHL_ALIGN_CENTRE) #define wxHL_DEFAULT_STYLE (wxHL_CONTEXTMENU|wxNO_BORDER|wxHL_ALIGN_CENTRE)
extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxHyperlinkCtrlNameStr[]; extern WXDLLIMPEXP_DATA_ADV(const char) wxHyperlinkCtrlNameStr[];
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -27,7 +27,7 @@
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
#ifndef SWIG #ifndef SWIG
extern WXDLLIMPEXP_PROPGRID const wxChar *wxPropertyGridManagerNameStr; extern WXDLLIMPEXP_DATA_PROPGRID(const char) wxPropertyGridManagerNameStr[];
#endif #endif
/** @class wxPropertyGridPage /** @class wxPropertyGridPage
@@ -260,7 +260,7 @@ public:
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxPGMAN_DEFAULT_STYLE, long style = wxPGMAN_DEFAULT_STYLE,
const wxChar* name = wxPropertyGridManagerNameStr ); const wxString& name = wxPropertyGridManagerNameStr );
/** Destructor */ /** Destructor */
virtual ~wxPropertyGridManager(); virtual ~wxPropertyGridManager();
@@ -320,7 +320,7 @@ public:
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxPGMAN_DEFAULT_STYLE, long style = wxPGMAN_DEFAULT_STYLE,
const wxChar* name = wxPropertyGridManagerNameStr ); const wxString& name = wxPropertyGridManagerNameStr );
/** /**
Enables or disables (shows/hides) categories according to parameter Enables or disables (shows/hides) categories according to parameter

View File

@@ -24,7 +24,7 @@
#ifndef SWIG #ifndef SWIG
extern WXDLLIMPEXP_PROPGRID const wxChar *wxPropertyGridNameStr; extern WXDLLIMPEXP_DATA_PROPGRID(const char) wxPropertyGridNameStr[];
#endif #endif
@@ -418,10 +418,10 @@ enum wxPG_KEYBOARD_ACTIONS
wxPG_ACTION_EXPAND_PROPERTY, wxPG_ACTION_EXPAND_PROPERTY,
wxPG_ACTION_COLLAPSE_PROPERTY, wxPG_ACTION_COLLAPSE_PROPERTY,
wxPG_ACTION_CANCEL_EDIT, wxPG_ACTION_CANCEL_EDIT,
wxPG_ACTION_PRESS_BUTTON, // Causes editor button (if any) to be pressed wxPG_ACTION_PRESS_BUTTON, // Causes editor button (if any) to be pressed
wxPG_ACTION_MAX wxPG_ACTION_MAX
}; };
/** @} /** @}
*/ */
@@ -614,19 +614,21 @@ public:
/** The default constructor. The styles to be used are styles valid for /** The default constructor. The styles to be used are styles valid for
the wxWindow and wxScrolledWindow. the wxWindow and wxScrolledWindow.
@see @link wndflags Additional Window Styles@endlink
@see @link wndflags Additional Window Styles @endlink
*/ */
wxPropertyGrid( wxWindow *parent, wxWindowID id = wxID_ANY, wxPropertyGrid( wxWindow *parent, wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxPG_DEFAULT_STYLE, long style = wxPG_DEFAULT_STYLE,
const wxChar* name = wxPropertyGridNameStr ); const wxString& name = wxPropertyGridNameStr );
/** Destructor */ /** Destructor */
virtual ~wxPropertyGrid(); virtual ~wxPropertyGrid();
#endif #endif
/** Adds given key combination to trigger given action. /** Adds given key combination to trigger given action.
@param action @param action
Which action to trigger. See @link pgactions List of list of Which action to trigger. See @link pgactions List of list of
wxPropertyGrid actions@endlink. wxPropertyGrid actions@endlink.
@@ -693,7 +695,7 @@ public:
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxPG_DEFAULT_STYLE, long style = wxPG_DEFAULT_STYLE,
const wxChar* name = wxPropertyGridNameStr ); const wxString& name = wxPropertyGridNameStr );
/** /**
Call when editor widget's contents is modified. Call when editor widget's contents is modified.

View File

@@ -20,7 +20,7 @@
#include "wx/list.h" #include "wx/list.h"
#include "wx/dynarray.h" #include "wx/dynarray.h"
extern WXDLLIMPEXP_DATA_CORE(const wxChar) wxStatusBarNameStr[]; extern WXDLLIMPEXP_DATA_CORE(const char) wxStatusBarNameStr[];
WX_DECLARE_LIST(wxString, wxListString); WX_DECLARE_LIST(wxString, wxListString);

View File

@@ -1978,7 +1978,7 @@ class WordList;
struct SCNotification; struct SCNotification;
#ifndef SWIG #ifndef SWIG
extern WXDLLIMPEXP_STC const wxChar* wxSTCNameStr; extern WXDLLIMPEXP_DATA_STC(const char) wxSTCNameStr[];
class WXDLLIMPEXP_FWD_STC wxStyledTextCtrl; class WXDLLIMPEXP_FWD_STC wxStyledTextCtrl;
class WXDLLIMPEXP_FWD_STC wxStyledTextEvent; class WXDLLIMPEXP_FWD_STC wxStyledTextEvent;
#endif #endif
@@ -3703,7 +3703,7 @@ public:
if ( to ) if ( to )
*to = GetSelectionEnd(); *to = GetSelectionEnd();
} }
// kept for compatibility only // kept for compatibility only
void GetSelection(int *from, int *to) void GetSelection(int *from, int *to)
{ {
@@ -3715,7 +3715,7 @@ public:
*to = t; *to = t;
} }
#endif #endif
virtual bool IsEditable() const { return !GetReadOnly(); } virtual bool IsEditable() const { return !GetReadOnly(); }
virtual void SetEditable(bool editable) { SetReadOnly(!editable); } virtual void SetEditable(bool editable) { SetReadOnly(!editable); }

View File

@@ -26,7 +26,7 @@
#include "wx/image.h" #include "wx/image.h"
#include "wx/dcmemory.h" #include "wx/dcmemory.h"
const wxChar wxAnimationCtrlNameStr[] = wxT("animationctrl"); const char wxAnimationCtrlNameStr[] = "animationctrl";
// global object // global object
wxAnimation wxNullAnimation; wxAnimation wxNullAnimation;

View File

@@ -38,7 +38,7 @@
#include "wx/odcombo.h" #include "wx/odcombo.h"
const wxChar wxBitmapComboBoxNameStr[] = wxT("bitmapComboBox"); const char wxBitmapComboBoxNameStr[] = "bitmapComboBox";
#if defined(wxBITMAPCOMBOBOX_OWNERDRAWN_BASED) #if defined(wxBITMAPCOMBOBOX_OWNERDRAWN_BASED)
@@ -235,7 +235,7 @@ wxCoord wxBitmapComboBoxBase::MeasureItem(size_t WXUNUSED(item)) const
int imgHeightArea = m_usedImgSize.y + 2; int imgHeightArea = m_usedImgSize.y + 2;
return imgHeightArea > m_fontHeight ? imgHeightArea : m_fontHeight; return imgHeightArea > m_fontHeight ? imgHeightArea : m_fontHeight;
} }
return wxBCB_DEFAULT_ITEM_HEIGHT; return wxBCB_DEFAULT_ITEM_HEIGHT;
} }

View File

@@ -30,7 +30,7 @@
#include "wx/crt.h" #include "wx/crt.h"
#endif #endif
const wxChar wxDataViewCtrlNameStr[] = wxT("dataviewCtrl"); const char wxDataViewCtrlNameStr[] = "dataviewCtrl";
bool operator == (const wxDataViewItem &left, const wxDataViewItem &right) bool operator == (const wxDataViewItem &left, const wxDataViewItem &right)
@@ -721,7 +721,7 @@ bool wxDataViewRendererBase::StartEditing( const wxDataViewItem &item, wxRect la
void wxDataViewRendererBase::CancelEditing() void wxDataViewRendererBase::CancelEditing()
{ {
if (!m_editorCtrl) return; if (!m_editorCtrl) return;
GetOwner()->GetOwner()->GetMainWindow()->SetFocus(); GetOwner()->GetOwner()->GetMainWindow()->SetFocus();
m_editorCtrl->Hide(); m_editorCtrl->Hide();
@@ -1220,7 +1220,7 @@ wxDataViewCtrlBase::PrependColumn( wxDataViewColumn *col )
return true; return true;
} }
bool bool
wxDataViewCtrlBase::InsertColumn( unsigned int WXUNUSED(pos), wxDataViewColumn *col ) wxDataViewCtrlBase::InsertColumn( unsigned int WXUNUSED(pos), wxDataViewColumn *col )
{ {
col->SetOwner( (wxDataViewCtrl*) this ); col->SetOwner( (wxDataViewCtrl*) this );

View File

@@ -23,7 +23,7 @@
# include "wx/debug.h" # include "wx/debug.h"
#endif #endif
const wxChar wxFileCtrlNameStr[] = wxT( "wxfilectrl" ); const char wxFileCtrlNameStr[] = "wxfilectrl";
DEFINE_EVENT_TYPE( wxEVT_FILECTRL_SELECTIONCHANGED ) DEFINE_EVENT_TYPE( wxEVT_FILECTRL_SELECTIONCHANGED )
DEFINE_EVENT_TYPE( wxEVT_FILECTRL_FILEACTIVATED ) DEFINE_EVENT_TYPE( wxEVT_FILECTRL_FILEACTIVATED )

View File

@@ -45,7 +45,7 @@
IMPLEMENT_DYNAMIC_CLASS(wxHyperlinkEvent, wxCommandEvent) IMPLEMENT_DYNAMIC_CLASS(wxHyperlinkEvent, wxCommandEvent)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_HYPERLINK) DEFINE_EVENT_TYPE(wxEVT_COMMAND_HYPERLINK)
const wxChar wxHyperlinkCtrlNameStr[] = wxT("hyperlink"); const char wxHyperlinkCtrlNameStr[] = "hyperlink";
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxHyperlinkCtrlBase // wxHyperlinkCtrlBase

View File

@@ -35,7 +35,7 @@
#include "wx/listimpl.cpp" #include "wx/listimpl.cpp"
WX_DEFINE_LIST(wxListString) WX_DEFINE_LIST(wxListString)
const wxChar wxStatusBarNameStr[] = wxT("statusBar"); const char wxStatusBarNameStr[] = "statusBar";
// ============================================================================ // ============================================================================
// wxStatusBarBase implementation // wxStatusBarBase implementation

View File

@@ -39,7 +39,7 @@
// implementation // implementation
// ============================================================================ // ============================================================================
const wxChar wxCollapsiblePaneNameStr[] = wxT("collapsiblePane"); const char wxCollapsiblePaneNameStr[] = "collapsiblePane";
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxGenericCollapsiblePane // wxGenericCollapsiblePane
@@ -86,7 +86,7 @@ bool wxGenericCollapsiblePane::Create(wxWindow *parent,
// on Mac we use the disclosure triangle // on Mac we use the disclosure triangle
// we need a light gray line above and below, lets approximate with the frame // we need a light gray line above and below, lets approximate with the frame
m_pStaticLine = NULL; m_pStaticLine = NULL;
m_pButton = new wxDisclosureTriangle( this, wxID_ANY, GetBtnLabel(), m_pButton = new wxDisclosureTriangle( this, wxID_ANY, GetBtnLabel(),
wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER ); wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER );
m_pButton->SetBackgroundColour( wxColour( 221, 226, 239 ) ); m_pButton->SetBackgroundColour( wxColour( 221, 226, 239 ) );
m_sz = new wxBoxSizer(wxHORIZONTAL); m_sz = new wxBoxSizer(wxHORIZONTAL);
@@ -124,10 +124,10 @@ wxGenericCollapsiblePane::~wxGenericCollapsiblePane()
{ {
if (m_pButton) if (m_pButton)
m_pButton->SetContainingSizer(NULL); m_pButton->SetContainingSizer(NULL);
if (m_pStaticLine) if (m_pStaticLine)
m_pStaticLine->SetContainingSizer(NULL); m_pStaticLine->SetContainingSizer(NULL);
// our sizer is not deleted automatically since we didn't use SetSizer()! // our sizer is not deleted automatically since we didn't use SetSizer()!
wxDELETE(m_sz); wxDELETE(m_sz);
} }

View File

@@ -30,7 +30,7 @@
// implementation // implementation
// ============================================================================ // ============================================================================
const wxChar wxEditableListBoxNameStr[] = wxT("editableListBox"); const char wxEditableListBoxNameStr[] = "editableListBox";
static const char * eledit_xpm[] = { static const char * eledit_xpm[] = {
"16 16 3 1", "16 16 3 1",

View File

@@ -50,7 +50,7 @@
#include "wx/generic/gridsel.h" #include "wx/generic/gridsel.h"
const wxChar wxGridNameStr[] = wxT("grid"); const char wxGridNameStr[] = "grid";
#if defined(__WXMOTIF__) #if defined(__WXMOTIF__)
#define WXUNUSED_MOTIF(identifier) WXUNUSED(identifier) #define WXUNUSED_MOTIF(identifier) WXUNUSED(identifier)

View File

@@ -46,8 +46,8 @@ FORCE_WXHTML_MODULES()
// small border always added to the cells: // small border always added to the cells:
static const wxCoord CELL_BORDER = 2; static const wxCoord CELL_BORDER = 2;
const wxChar wxHtmlListBoxNameStr[] = wxT("htmlListBox"); const char wxHtmlListBoxNameStr[] = "htmlListBox";
const wxChar wxSimpleHtmlListBoxNameStr[] = wxT("simpleHtmlListBox"); const char wxSimpleHtmlListBoxNameStr[] = "simpleHtmlListBox";
// ============================================================================ // ============================================================================
// private classes // private classes

View File

@@ -29,7 +29,7 @@
// the lines below duplicate the same definitions in collpaneg.cpp, if we have // the lines below duplicate the same definitions in collpaneg.cpp, if we have
// another implementation of this class we should extract them to a common file // another implementation of this class we should extract them to a common file
const wxChar wxCollapsiblePaneNameStr[] = wxT("collapsiblePane"); const char wxCollapsiblePaneNameStr[] = "collapsiblePane";
DEFINE_EVENT_TYPE(wxEVT_COMMAND_COLLPANE_CHANGED) DEFINE_EVENT_TYPE(wxEVT_COMMAND_COLLPANE_CHANGED)

View File

@@ -72,7 +72,7 @@
// wxPropertyGridManager // wxPropertyGridManager
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
const wxChar *wxPropertyGridManagerNameStr = wxT("wxPropertyGridManager"); const char wxPropertyGridManagerNameStr[] = "wxPropertyGridManager";
// Categoric Mode Icon // Categoric Mode Icon
@@ -259,7 +259,7 @@ wxPropertyGridManager::wxPropertyGridManager( wxWindow *parent,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, const wxSize& size,
long style, long style,
const wxChar* name ) const wxString& name )
: wxPanel() : wxPanel()
{ {
Init1(); Init1();
@@ -273,7 +273,7 @@ bool wxPropertyGridManager::Create( wxWindow *parent,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, const wxSize& size,
long style, long style,
const wxChar* name ) const wxString& name )
{ {
bool res = wxPanel::Create( parent, id, pos, size, bool res = wxPanel::Create( parent, id, pos, size,
@@ -371,7 +371,7 @@ void wxPropertyGridManager::Init2( int style )
#ifdef __WXMAC__ #ifdef __WXMAC__
// Smaller controls on Mac // Smaller controls on Mac
SetWindowVariant(wxWINDOW_VARIANT_SMALL); SetWindowVariant(wxWINDOW_VARIANT_SMALL);
#endif #endif
// Create propertygrid. // Create propertygrid.
m_pPropGrid->Create(this,baseId,wxPoint(0,0),csz, m_pPropGrid->Create(this,baseId,wxPoint(0,0),csz,
@@ -512,7 +512,7 @@ void wxPropertyGridManager::SetWindowStyleFlag( long style )
(style&wxPG_MAN_PASS_FLAGS_MASK) ); (style&wxPG_MAN_PASS_FLAGS_MASK) );
// Need to re-position windows? // Need to re-position windows?
if ( (oldWindowStyle & (wxPG_TOOLBAR|wxPG_DESCRIPTION)) != if ( (oldWindowStyle & (wxPG_TOOLBAR|wxPG_DESCRIPTION)) !=
(style & (wxPG_TOOLBAR|wxPG_DESCRIPTION)) ) (style & (wxPG_TOOLBAR|wxPG_DESCRIPTION)) )
{ {
RecreateControls(); RecreateControls();

View File

@@ -134,7 +134,7 @@ void wxPropertyGrid::AutoGetTranslation ( bool ) { }
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
const wxChar *wxPropertyGridNameStr = wxT("wxPropertyGrid"); const char wxPropertyGridNameStr[] = "wxPropertyGrid";
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// Statics in one class for easy destruction. // Statics in one class for easy destruction.
@@ -325,11 +325,11 @@ protected:
} }
void OnPaint( wxPaintEvent& event ); void OnPaint( wxPaintEvent& event );
// Always be focussable, even with child windows // Always be focussable, even with child windows
virtual void SetCanFocus(bool WXUNUSED(canFocus)) virtual void SetCanFocus(bool WXUNUSED(canFocus))
{ wxPanel::SetCanFocus(true); } { wxPanel::SetCanFocus(true); }
private: private:
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
@@ -409,7 +409,7 @@ wxPropertyGrid::wxPropertyGrid( wxWindow *parent,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, const wxSize& size,
long style, long style,
const wxChar* name ) const wxString& name )
: wxScrolledWindow() : wxScrolledWindow()
{ {
Init1(); Init1();
@@ -423,7 +423,7 @@ bool wxPropertyGrid::Create( wxWindow *parent,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, const wxSize& size,
long style, long style,
const wxChar* name ) const wxString& name )
{ {
if ( !(style&wxBORDER_MASK) ) if ( !(style&wxBORDER_MASK) )
@@ -526,7 +526,7 @@ void wxPropertyGrid::Init2()
#ifdef __WXMAC__ #ifdef __WXMAC__
// Smaller controls on Mac // Smaller controls on Mac
SetWindowVariant(wxWINDOW_VARIANT_SMALL); SetWindowVariant(wxWINDOW_VARIANT_SMALL);
#endif #endif
// Now create state, if one didn't exist already // Now create state, if one didn't exist already
// (wxPropertyGridManager might have created it for us). // (wxPropertyGridManager might have created it for us).
@@ -2058,7 +2058,7 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc,
cellX += state->m_colWidths[ci]; cellX += state->m_colWidths[ci];
if ( ci < (state->m_colWidths.size()-1) ) if ( ci < (state->m_colWidths.size()-1) )
nextCellWidth = state->m_colWidths[ci+1]; nextCellWidth = state->m_colWidths[ci+1];
cellRect.x = cellX; cellRect.x = cellX;
dc.DestroyClippingRegion(); // Is this really necessary? dc.DestroyClippingRegion(); // Is this really necessary?
textXAdd = 0; textXAdd = 0;
} }
@@ -3095,7 +3095,7 @@ void wxPropertyGrid::OnCustomEditorEvent( wxEvent &event )
else else
{ {
// No value after all // No value after all
// Regardless of editor type, unfocus editor on // Regardless of editor type, unfocus editor on
// text-editing related enter press. // text-editing related enter press.
if ( event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER ) if ( event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER )
@@ -3337,13 +3337,13 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags )
wxPrintf( "Selected %s\n", m_selected->GetClassInfo()->GetClassName() ); wxPrintf( "Selected %s\n", m_selected->GetClassInfo()->GetClassName() );
else else
wxPrintf( "None selected\n" ); wxPrintf( "None selected\n" );
if (p) if (p)
wxPrintf( "P = %s\n", p->GetClassInfo()->GetClassName() ); wxPrintf( "P = %s\n", p->GetClassInfo()->GetClassName() );
else else
wxPrintf( "P = NULL\n" ); wxPrintf( "P = NULL\n" );
*/ */
// If we are frozen, then just set the values. // If we are frozen, then just set the values.
if ( m_frozen ) if ( m_frozen )
{ {
@@ -5502,7 +5502,7 @@ wxArrayInt wxPGChoices::GetValuesForStrings( const wxArrayString& strings ) cons
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
wxArrayInt wxPGChoices::GetIndicesForStrings( const wxArrayString& strings, wxArrayInt wxPGChoices::GetIndicesForStrings( const wxArrayString& strings,
wxArrayString* unmatched ) const wxArrayString* unmatched ) const
{ {
wxArrayInt arr; wxArrayInt arr;

View File

@@ -53,7 +53,7 @@
//---------------------------------------------------------------------- //----------------------------------------------------------------------
const wxChar* wxSTCNameStr = wxT("stcwindow"); const char wxSTCNameStr[] = "stcwindow";
#ifdef MAKELONG #ifdef MAKELONG
#undef MAKELONG #undef MAKELONG

View File

@@ -53,7 +53,7 @@
//---------------------------------------------------------------------- //----------------------------------------------------------------------
const wxChar* wxSTCNameStr = wxT("stcwindow"); const char wxSTCNameStr[] = "stcwindow";
#ifdef MAKELONG #ifdef MAKELONG
#undef MAKELONG #undef MAKELONG

View File

@@ -77,7 +77,7 @@ class WordList;
struct SCNotification; struct SCNotification;
#ifndef SWIG #ifndef SWIG
extern WXDLLIMPEXP_STC const wxChar* wxSTCNameStr; extern WXDLLIMPEXP_DATA_STC(const char) wxSTCNameStr[];
class WXDLLIMPEXP_FWD_STC wxStyledTextCtrl; class WXDLLIMPEXP_FWD_STC wxStyledTextCtrl;
class WXDLLIMPEXP_FWD_STC wxStyledTextEvent; class WXDLLIMPEXP_FWD_STC wxStyledTextEvent;
#endif #endif
@@ -339,7 +339,7 @@ public:
if ( to ) if ( to )
*to = GetSelectionEnd(); *to = GetSelectionEnd();
} }
// kept for compatibility only // kept for compatibility only
void GetSelection(int *from, int *to) void GetSelection(int *from, int *to)
{ {
@@ -351,7 +351,7 @@ public:
*to = t; *to = t;
} }
#endif #endif
virtual bool IsEditable() const { return !GetReadOnly(); } virtual bool IsEditable() const { return !GetReadOnly(); }
virtual void SetEditable(bool editable) { SetReadOnly(!editable); } virtual void SetEditable(bool editable) { SetReadOnly(!editable); }