From 23318a5358be74727fb62854f623da84a4545bcd Mon Sep 17 00:00:00 2001 From: Francesco Montorsi Date: Sun, 2 Nov 2008 22:16:14 +0000 Subject: [PATCH] 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 --- include/wx/animate.h | 2 +- include/wx/bmpcbox.h | 2 +- include/wx/collpane.h | 2 +- include/wx/dataview.h | 4 ++-- include/wx/dlimpexp.h | 12 +++++++++--- include/wx/editlbox.h | 2 +- include/wx/filectrl.h | 2 +- include/wx/generic/grid.h | 6 +++--- include/wx/gtk/tglbtn.h | 8 ++++---- include/wx/htmllbox.h | 4 ++-- include/wx/hyperlink.h | 2 +- include/wx/propgrid/manager.h | 6 +++--- include/wx/propgrid/propgrid.h | 14 ++++++++------ include/wx/statusbr.h | 2 +- include/wx/stc/stc.h | 6 +++--- src/common/animatecmn.cpp | 2 +- src/common/bmpcboxcmn.cpp | 4 ++-- src/common/datavcmn.cpp | 6 +++--- src/common/filectrlcmn.cpp | 2 +- src/common/hyperlnkcmn.cpp | 2 +- src/common/statbar.cpp | 2 +- src/generic/collpaneg.cpp | 8 ++++---- src/generic/editlbox.cpp | 2 +- src/generic/grid.cpp | 2 +- src/generic/htmllbox.cpp | 4 ++-- src/gtk/collpane.cpp | 2 +- src/propgrid/manager.cpp | 10 +++++----- src/propgrid/propgrid.cpp | 22 +++++++++++----------- src/stc/stc.cpp | 2 +- src/stc/stc.cpp.in | 2 +- src/stc/stc.h.in | 6 +++--- 31 files changed, 80 insertions(+), 72 deletions(-) diff --git a/include/wx/animate.h b/include/wx/animate.h index 97321c5994..fd9ca49320 100644 --- a/include/wx/animate.h +++ b/include/wx/animate.h @@ -24,7 +24,7 @@ class WXDLLIMPEXP_FWD_ADV wxAnimation; extern WXDLLIMPEXP_DATA_ADV(wxAnimation) wxNullAnimation; -extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxAnimationCtrlNameStr[]; +extern WXDLLIMPEXP_DATA_ADV(const char) wxAnimationCtrlNameStr[]; // ---------------------------------------------------------------------------- diff --git a/include/wx/bmpcbox.h b/include/wx/bmpcbox.h index 08b1f4638d..f73f82e047 100644 --- a/include/wx/bmpcbox.h +++ b/include/wx/bmpcbox.h @@ -29,7 +29,7 @@ class WXDLLIMPEXP_FWD_CORE wxItemContainer; #define wxBITMAPCOMBOBOX_OWNERDRAWN_BASED #endif -extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxBitmapComboBoxNameStr[]; +extern WXDLLIMPEXP_DATA_ADV(const char) wxBitmapComboBoxNameStr[]; class WXDLLIMPEXP_ADV wxBitmapComboBoxBase diff --git a/include/wx/collpane.h b/include/wx/collpane.h index 9f6c04230d..e2278e4ee8 100644 --- a/include/wx/collpane.h +++ b/include/wx/collpane.h @@ -20,7 +20,7 @@ #include "wx/control.h" // class name -extern WXDLLIMPEXP_DATA_CORE(const wxChar) wxCollapsiblePaneNameStr[]; +extern WXDLLIMPEXP_DATA_CORE(const char) wxCollapsiblePaneNameStr[]; // ---------------------------------------------------------------------------- // wxCollapsiblePaneBase: interface for wxCollapsiblePane diff --git a/include/wx/dataview.h b/include/wx/dataview.h index 91c6456e0a..b31d6765aa 100644 --- a/include/wx/dataview.h +++ b/include/wx/dataview.h @@ -42,7 +42,7 @@ class WXDLLIMPEXP_FWD_ADV wxDataViewColumn; class WXDLLIMPEXP_FWD_ADV wxDataViewRenderer; 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: #define wxDVC_DEFAULT_WIDTH 80 @@ -707,7 +707,7 @@ public: { return m_expander_column; } virtual wxDataViewColumn *GetSortingColumn() const = 0; - + void SetIndent( int indent ) { m_indent = indent ; DoSetIndent(); } int GetIndent() const diff --git a/include/wx/dlimpexp.h b/include/wx/dlimpexp.h index 3c0a823edd..3f400f52d8 100644 --- a/include/wx/dlimpexp.h +++ b/include/wx/dlimpexp.h @@ -218,10 +218,13 @@ #ifdef WXMAKINGDLL_PROPGRID # define WXDLLIMPEXP_PROPGRID WXEXPORT +# define WXDLLIMPEXP_DATA_PROPGRID(type) WXEXPORT type #elif defined(WXUSINGDLL) # define WXDLLIMPEXP_PROPGRID WXIMPORT +# define WXDLLIMPEXP_DATA_PROPGRID(type) WXIMPORT type #else /* not making nor using DLL */ # define WXDLLIMPEXP_PROPGRID +# define WXDLLIMPEXP_DATA_PROPGRID(type) type #endif #ifdef WXMAKINGDLL_RICHTEXT @@ -241,11 +244,14 @@ #endif #ifdef WXMAKINGDLL_STC - #define WXDLLIMPEXP_STC WXEXPORT +# define WXDLLIMPEXP_STC WXEXPORT +# define WXDLLIMPEXP_DATA_STC(type) WXEXPORT type #elif defined(WXUSINGDLL) - #define WXDLLIMPEXP_STC WXIMPORT +# define WXDLLIMPEXP_STC WXIMPORT +# define WXDLLIMPEXP_DATA_STC(type) WXIMPORT type #else /* not making nor using DLL */ - #define WXDLLIMPEXP_STC +# define WXDLLIMPEXP_STC +# define WXDLLIMPEXP_DATA_STC(type) type #endif /* diff --git a/include/wx/editlbox.h b/include/wx/editlbox.h index 59236bcf3f..7820e72764 100644 --- a/include/wx/editlbox.h +++ b/include/wx/editlbox.h @@ -27,7 +27,7 @@ class WXDLLIMPEXP_FWD_CORE wxListEvent; #define wxEL_NO_REORDER 0x0800 #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 // user easily enter list of strings diff --git a/include/wx/filectrl.h b/include/wx/filectrl.h index b3756ef62c..3bf068e8a8 100644 --- a/include/wx/filectrl.h +++ b/include/wx/filectrl.h @@ -29,7 +29,7 @@ enum }; #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_FILEACTIVATED; diff --git a/include/wx/generic/grid.h b/include/wx/generic/grid.h index 6bee40b3d4..075bd336fd 100644 --- a/include/wx/generic/grid.h +++ b/include/wx/generic/grid.h @@ -22,7 +22,7 @@ // constants // ---------------------------------------------------------------------------- -extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxGridNameStr[]; +extern WXDLLIMPEXP_DATA_ADV(const char) wxGridNameStr[]; // Default parameters for wxGrid // @@ -2326,8 +2326,8 @@ public: SetEventObject(obj); } - // explicitly specifying inline allows gcc < 3.4 to - // handle the deprecation attribute even in the constructor. + // explicitly specifying inline allows gcc < 3.4 to + // handle the deprecation attribute even in the constructor. wxDEPRECATED( inline wxGridEvent(int id, wxEventType type, diff --git a/include/wx/gtk/tglbtn.h b/include/wx/gtk/tglbtn.h index 38ae24ee7d..1b7d9d3ed4 100644 --- a/include/wx/gtk/tglbtn.h +++ b/include/wx/gtk/tglbtn.h @@ -26,7 +26,7 @@ class WXDLLIMPEXP_FWD_CORE wxToggleBitmapButton; // global data //----------------------------------------------------------------------------- -extern WXDLLIMPEXP_CORE const char wxCheckBoxNameStr[]; +extern WXDLLIMPEXP_DATA_CORE(const char) wxCheckBoxNameStr[]; //----------------------------------------------------------------------------- // wxBitmapToggleButton @@ -78,7 +78,7 @@ public: protected: void GTKDisableEvents(); void GTKEnableEvents(); - + virtual wxSize DoGetBestSize() const; virtual void DoApplyWidgetStyle(GtkRcStyle *style); virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; @@ -127,11 +127,11 @@ public: static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); - + protected: void GTKDisableEvents(); void GTKEnableEvents(); - + virtual wxSize DoGetBestSize() const; virtual void DoApplyWidgetStyle(GtkRcStyle *style); virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; diff --git a/include/wx/htmllbox.h b/include/wx/htmllbox.h index a8f41d7f76..3ef995e74e 100644 --- a/include/wx/htmllbox.h +++ b/include/wx/htmllbox.h @@ -25,8 +25,8 @@ class WXDLLIMPEXP_FWD_HTML wxHtmlWinParser; class WXDLLIMPEXP_FWD_HTML wxHtmlListBoxCache; class WXDLLIMPEXP_FWD_HTML wxHtmlListBoxStyle; -extern WXDLLIMPEXP_DATA_HTML(const wxChar) wxHtmlListBoxNameStr[]; -extern WXDLLIMPEXP_DATA_HTML(const wxChar) wxSimpleHtmlListBoxNameStr[]; +extern WXDLLIMPEXP_DATA_HTML(const char) wxHtmlListBoxNameStr[]; +extern WXDLLIMPEXP_DATA_HTML(const char) wxSimpleHtmlListBoxNameStr[]; // ---------------------------------------------------------------------------- // wxHtmlListBox diff --git a/include/wx/hyperlink.h b/include/wx/hyperlink.h index eb45cd9466..1d1a74d91e 100644 --- a/include/wx/hyperlink.h +++ b/include/wx/hyperlink.h @@ -28,7 +28,7 @@ #define wxHL_ALIGN_CENTRE 0x0008 #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[]; // ---------------------------------------------------------------------------- diff --git a/include/wx/propgrid/manager.h b/include/wx/propgrid/manager.h index 5459534ea7..1ecbf84e88 100644 --- a/include/wx/propgrid/manager.h +++ b/include/wx/propgrid/manager.h @@ -27,7 +27,7 @@ // ----------------------------------------------------------------------- #ifndef SWIG -extern WXDLLIMPEXP_PROPGRID const wxChar *wxPropertyGridManagerNameStr; +extern WXDLLIMPEXP_DATA_PROPGRID(const char) wxPropertyGridManagerNameStr[]; #endif /** @class wxPropertyGridPage @@ -260,7 +260,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxPGMAN_DEFAULT_STYLE, - const wxChar* name = wxPropertyGridManagerNameStr ); + const wxString& name = wxPropertyGridManagerNameStr ); /** Destructor */ virtual ~wxPropertyGridManager(); @@ -320,7 +320,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxPGMAN_DEFAULT_STYLE, - const wxChar* name = wxPropertyGridManagerNameStr ); + const wxString& name = wxPropertyGridManagerNameStr ); /** Enables or disables (shows/hides) categories according to parameter diff --git a/include/wx/propgrid/propgrid.h b/include/wx/propgrid/propgrid.h index 9eae5fad80..c88c60e23b 100644 --- a/include/wx/propgrid/propgrid.h +++ b/include/wx/propgrid/propgrid.h @@ -24,7 +24,7 @@ #ifndef SWIG -extern WXDLLIMPEXP_PROPGRID const wxChar *wxPropertyGridNameStr; +extern WXDLLIMPEXP_DATA_PROPGRID(const char) wxPropertyGridNameStr[]; #endif @@ -418,10 +418,10 @@ enum wxPG_KEYBOARD_ACTIONS wxPG_ACTION_EXPAND_PROPERTY, wxPG_ACTION_COLLAPSE_PROPERTY, 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 }; - + /** @} */ @@ -614,19 +614,21 @@ public: /** The default constructor. The styles to be used are styles valid for 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, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxPG_DEFAULT_STYLE, - const wxChar* name = wxPropertyGridNameStr ); + const wxString& name = wxPropertyGridNameStr ); /** Destructor */ virtual ~wxPropertyGrid(); #endif /** Adds given key combination to trigger given action. + @param action Which action to trigger. See @link pgactions List of list of wxPropertyGrid actions@endlink. @@ -693,7 +695,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxPG_DEFAULT_STYLE, - const wxChar* name = wxPropertyGridNameStr ); + const wxString& name = wxPropertyGridNameStr ); /** Call when editor widget's contents is modified. diff --git a/include/wx/statusbr.h b/include/wx/statusbr.h index bccef6f403..70f24e2734 100644 --- a/include/wx/statusbr.h +++ b/include/wx/statusbr.h @@ -20,7 +20,7 @@ #include "wx/list.h" #include "wx/dynarray.h" -extern WXDLLIMPEXP_DATA_CORE(const wxChar) wxStatusBarNameStr[]; +extern WXDLLIMPEXP_DATA_CORE(const char) wxStatusBarNameStr[]; WX_DECLARE_LIST(wxString, wxListString); diff --git a/include/wx/stc/stc.h b/include/wx/stc/stc.h index 985e10df14..118e23cc13 100644 --- a/include/wx/stc/stc.h +++ b/include/wx/stc/stc.h @@ -1978,7 +1978,7 @@ class WordList; struct SCNotification; #ifndef SWIG -extern WXDLLIMPEXP_STC const wxChar* wxSTCNameStr; +extern WXDLLIMPEXP_DATA_STC(const char) wxSTCNameStr[]; class WXDLLIMPEXP_FWD_STC wxStyledTextCtrl; class WXDLLIMPEXP_FWD_STC wxStyledTextEvent; #endif @@ -3703,7 +3703,7 @@ public: if ( to ) *to = GetSelectionEnd(); } - + // kept for compatibility only void GetSelection(int *from, int *to) { @@ -3715,7 +3715,7 @@ public: *to = t; } #endif - + virtual bool IsEditable() const { return !GetReadOnly(); } virtual void SetEditable(bool editable) { SetReadOnly(!editable); } diff --git a/src/common/animatecmn.cpp b/src/common/animatecmn.cpp index e18c6e8d34..4ba1483bac 100644 --- a/src/common/animatecmn.cpp +++ b/src/common/animatecmn.cpp @@ -26,7 +26,7 @@ #include "wx/image.h" #include "wx/dcmemory.h" -const wxChar wxAnimationCtrlNameStr[] = wxT("animationctrl"); +const char wxAnimationCtrlNameStr[] = "animationctrl"; // global object wxAnimation wxNullAnimation; diff --git a/src/common/bmpcboxcmn.cpp b/src/common/bmpcboxcmn.cpp index 0e869aeedb..fc403b7135 100644 --- a/src/common/bmpcboxcmn.cpp +++ b/src/common/bmpcboxcmn.cpp @@ -38,7 +38,7 @@ #include "wx/odcombo.h" -const wxChar wxBitmapComboBoxNameStr[] = wxT("bitmapComboBox"); +const char wxBitmapComboBoxNameStr[] = "bitmapComboBox"; #if defined(wxBITMAPCOMBOBOX_OWNERDRAWN_BASED) @@ -235,7 +235,7 @@ wxCoord wxBitmapComboBoxBase::MeasureItem(size_t WXUNUSED(item)) const int imgHeightArea = m_usedImgSize.y + 2; return imgHeightArea > m_fontHeight ? imgHeightArea : m_fontHeight; } - + return wxBCB_DEFAULT_ITEM_HEIGHT; } diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp index 1a7dcf453a..cf2cea41f7 100644 --- a/src/common/datavcmn.cpp +++ b/src/common/datavcmn.cpp @@ -30,7 +30,7 @@ #include "wx/crt.h" #endif -const wxChar wxDataViewCtrlNameStr[] = wxT("dataviewCtrl"); +const char wxDataViewCtrlNameStr[] = "dataviewCtrl"; bool operator == (const wxDataViewItem &left, const wxDataViewItem &right) @@ -721,7 +721,7 @@ bool wxDataViewRendererBase::StartEditing( const wxDataViewItem &item, wxRect la void wxDataViewRendererBase::CancelEditing() { if (!m_editorCtrl) return; - + GetOwner()->GetOwner()->GetMainWindow()->SetFocus(); m_editorCtrl->Hide(); @@ -1220,7 +1220,7 @@ wxDataViewCtrlBase::PrependColumn( wxDataViewColumn *col ) return true; } -bool +bool wxDataViewCtrlBase::InsertColumn( unsigned int WXUNUSED(pos), wxDataViewColumn *col ) { col->SetOwner( (wxDataViewCtrl*) this ); diff --git a/src/common/filectrlcmn.cpp b/src/common/filectrlcmn.cpp index d0af51319c..76ef8187f4 100644 --- a/src/common/filectrlcmn.cpp +++ b/src/common/filectrlcmn.cpp @@ -23,7 +23,7 @@ # include "wx/debug.h" #endif -const wxChar wxFileCtrlNameStr[] = wxT( "wxfilectrl" ); +const char wxFileCtrlNameStr[] = "wxfilectrl"; DEFINE_EVENT_TYPE( wxEVT_FILECTRL_SELECTIONCHANGED ) DEFINE_EVENT_TYPE( wxEVT_FILECTRL_FILEACTIVATED ) diff --git a/src/common/hyperlnkcmn.cpp b/src/common/hyperlnkcmn.cpp index d72bca7601..e7f27a4069 100644 --- a/src/common/hyperlnkcmn.cpp +++ b/src/common/hyperlnkcmn.cpp @@ -45,7 +45,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxHyperlinkEvent, wxCommandEvent) DEFINE_EVENT_TYPE(wxEVT_COMMAND_HYPERLINK) -const wxChar wxHyperlinkCtrlNameStr[] = wxT("hyperlink"); +const char wxHyperlinkCtrlNameStr[] = "hyperlink"; // ---------------------------------------------------------------------------- // wxHyperlinkCtrlBase diff --git a/src/common/statbar.cpp b/src/common/statbar.cpp index 3e91d47ec6..36f0ac976e 100644 --- a/src/common/statbar.cpp +++ b/src/common/statbar.cpp @@ -35,7 +35,7 @@ #include "wx/listimpl.cpp" WX_DEFINE_LIST(wxListString) -const wxChar wxStatusBarNameStr[] = wxT("statusBar"); +const char wxStatusBarNameStr[] = "statusBar"; // ============================================================================ // wxStatusBarBase implementation diff --git a/src/generic/collpaneg.cpp b/src/generic/collpaneg.cpp index df93ce72ae..0afc81416e 100644 --- a/src/generic/collpaneg.cpp +++ b/src/generic/collpaneg.cpp @@ -39,7 +39,7 @@ // implementation // ============================================================================ -const wxChar wxCollapsiblePaneNameStr[] = wxT("collapsiblePane"); +const char wxCollapsiblePaneNameStr[] = "collapsiblePane"; //----------------------------------------------------------------------------- // wxGenericCollapsiblePane @@ -86,7 +86,7 @@ bool wxGenericCollapsiblePane::Create(wxWindow *parent, // on Mac we use the disclosure triangle // we need a light gray line above and below, lets approximate with the frame m_pStaticLine = NULL; - m_pButton = new wxDisclosureTriangle( this, wxID_ANY, GetBtnLabel(), + m_pButton = new wxDisclosureTriangle( this, wxID_ANY, GetBtnLabel(), wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER ); m_pButton->SetBackgroundColour( wxColour( 221, 226, 239 ) ); m_sz = new wxBoxSizer(wxHORIZONTAL); @@ -124,10 +124,10 @@ wxGenericCollapsiblePane::~wxGenericCollapsiblePane() { if (m_pButton) m_pButton->SetContainingSizer(NULL); - + if (m_pStaticLine) m_pStaticLine->SetContainingSizer(NULL); - + // our sizer is not deleted automatically since we didn't use SetSizer()! wxDELETE(m_sz); } diff --git a/src/generic/editlbox.cpp b/src/generic/editlbox.cpp index c1970a993a..1e0dc8e738 100644 --- a/src/generic/editlbox.cpp +++ b/src/generic/editlbox.cpp @@ -30,7 +30,7 @@ // implementation // ============================================================================ -const wxChar wxEditableListBoxNameStr[] = wxT("editableListBox"); +const char wxEditableListBoxNameStr[] = "editableListBox"; static const char * eledit_xpm[] = { "16 16 3 1", diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 69a99ab9ba..a5978ae75d 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -50,7 +50,7 @@ #include "wx/generic/gridsel.h" -const wxChar wxGridNameStr[] = wxT("grid"); +const char wxGridNameStr[] = "grid"; #if defined(__WXMOTIF__) #define WXUNUSED_MOTIF(identifier) WXUNUSED(identifier) diff --git a/src/generic/htmllbox.cpp b/src/generic/htmllbox.cpp index 62abb07171..fd023f93b8 100644 --- a/src/generic/htmllbox.cpp +++ b/src/generic/htmllbox.cpp @@ -46,8 +46,8 @@ FORCE_WXHTML_MODULES() // small border always added to the cells: static const wxCoord CELL_BORDER = 2; -const wxChar wxHtmlListBoxNameStr[] = wxT("htmlListBox"); -const wxChar wxSimpleHtmlListBoxNameStr[] = wxT("simpleHtmlListBox"); +const char wxHtmlListBoxNameStr[] = "htmlListBox"; +const char wxSimpleHtmlListBoxNameStr[] = "simpleHtmlListBox"; // ============================================================================ // private classes diff --git a/src/gtk/collpane.cpp b/src/gtk/collpane.cpp index dd68dda505..324dc3856d 100644 --- a/src/gtk/collpane.cpp +++ b/src/gtk/collpane.cpp @@ -29,7 +29,7 @@ // 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 -const wxChar wxCollapsiblePaneNameStr[] = wxT("collapsiblePane"); +const char wxCollapsiblePaneNameStr[] = "collapsiblePane"; DEFINE_EVENT_TYPE(wxEVT_COMMAND_COLLPANE_CHANGED) diff --git a/src/propgrid/manager.cpp b/src/propgrid/manager.cpp index 5a1b675206..c156cb3281 100644 --- a/src/propgrid/manager.cpp +++ b/src/propgrid/manager.cpp @@ -72,7 +72,7 @@ // wxPropertyGridManager // ----------------------------------------------------------------------- -const wxChar *wxPropertyGridManagerNameStr = wxT("wxPropertyGridManager"); +const char wxPropertyGridManagerNameStr[] = "wxPropertyGridManager"; // Categoric Mode Icon @@ -259,7 +259,7 @@ wxPropertyGridManager::wxPropertyGridManager( wxWindow *parent, const wxPoint& pos, const wxSize& size, long style, - const wxChar* name ) + const wxString& name ) : wxPanel() { Init1(); @@ -273,7 +273,7 @@ bool wxPropertyGridManager::Create( wxWindow *parent, const wxPoint& pos, const wxSize& size, long style, - const wxChar* name ) + const wxString& name ) { bool res = wxPanel::Create( parent, id, pos, size, @@ -371,7 +371,7 @@ void wxPropertyGridManager::Init2( int style ) #ifdef __WXMAC__ // Smaller controls on Mac SetWindowVariant(wxWINDOW_VARIANT_SMALL); -#endif +#endif // Create propertygrid. m_pPropGrid->Create(this,baseId,wxPoint(0,0),csz, @@ -512,7 +512,7 @@ void wxPropertyGridManager::SetWindowStyleFlag( long style ) (style&wxPG_MAN_PASS_FLAGS_MASK) ); // Need to re-position windows? - if ( (oldWindowStyle & (wxPG_TOOLBAR|wxPG_DESCRIPTION)) != + if ( (oldWindowStyle & (wxPG_TOOLBAR|wxPG_DESCRIPTION)) != (style & (wxPG_TOOLBAR|wxPG_DESCRIPTION)) ) { RecreateControls(); diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index 2e4b1a5fa9..d356712b77 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -134,7 +134,7 @@ void wxPropertyGrid::AutoGetTranslation ( bool ) { } // ----------------------------------------------------------------------- -const wxChar *wxPropertyGridNameStr = wxT("wxPropertyGrid"); +const char wxPropertyGridNameStr[] = "wxPropertyGrid"; // ----------------------------------------------------------------------- // Statics in one class for easy destruction. @@ -325,11 +325,11 @@ protected: } void OnPaint( wxPaintEvent& event ); - + // Always be focussable, even with child windows virtual void SetCanFocus(bool WXUNUSED(canFocus)) { wxPanel::SetCanFocus(true); } - + private: DECLARE_EVENT_TABLE() @@ -409,7 +409,7 @@ wxPropertyGrid::wxPropertyGrid( wxWindow *parent, const wxPoint& pos, const wxSize& size, long style, - const wxChar* name ) + const wxString& name ) : wxScrolledWindow() { Init1(); @@ -423,7 +423,7 @@ bool wxPropertyGrid::Create( wxWindow *parent, const wxPoint& pos, const wxSize& size, long style, - const wxChar* name ) + const wxString& name ) { if ( !(style&wxBORDER_MASK) ) @@ -526,7 +526,7 @@ void wxPropertyGrid::Init2() #ifdef __WXMAC__ // Smaller controls on Mac SetWindowVariant(wxWINDOW_VARIANT_SMALL); -#endif +#endif // Now create state, if one didn't exist already // (wxPropertyGridManager might have created it for us). @@ -2058,7 +2058,7 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc, cellX += state->m_colWidths[ci]; if ( ci < (state->m_colWidths.size()-1) ) nextCellWidth = state->m_colWidths[ci+1]; - cellRect.x = cellX; + cellRect.x = cellX; dc.DestroyClippingRegion(); // Is this really necessary? textXAdd = 0; } @@ -3095,7 +3095,7 @@ void wxPropertyGrid::OnCustomEditorEvent( wxEvent &event ) else { // No value after all - + // Regardless of editor type, unfocus editor on // text-editing related enter press. 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() ); else wxPrintf( "None selected\n" ); - + if (p) wxPrintf( "P = %s\n", p->GetClassInfo()->GetClassName() ); else wxPrintf( "P = NULL\n" ); */ - + // If we are frozen, then just set the values. 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 { wxArrayInt arr; diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index 2b01d9033f..7be0bfe412 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -53,7 +53,7 @@ //---------------------------------------------------------------------- -const wxChar* wxSTCNameStr = wxT("stcwindow"); +const char wxSTCNameStr[] = "stcwindow"; #ifdef MAKELONG #undef MAKELONG diff --git a/src/stc/stc.cpp.in b/src/stc/stc.cpp.in index 2320b53268..3ce6e5c982 100644 --- a/src/stc/stc.cpp.in +++ b/src/stc/stc.cpp.in @@ -53,7 +53,7 @@ //---------------------------------------------------------------------- -const wxChar* wxSTCNameStr = wxT("stcwindow"); +const char wxSTCNameStr[] = "stcwindow"; #ifdef MAKELONG #undef MAKELONG diff --git a/src/stc/stc.h.in b/src/stc/stc.h.in index 1f2622784f..d15a2c0822 100644 --- a/src/stc/stc.h.in +++ b/src/stc/stc.h.in @@ -77,7 +77,7 @@ class WordList; struct SCNotification; #ifndef SWIG -extern WXDLLIMPEXP_STC const wxChar* wxSTCNameStr; +extern WXDLLIMPEXP_DATA_STC(const char) wxSTCNameStr[]; class WXDLLIMPEXP_FWD_STC wxStyledTextCtrl; class WXDLLIMPEXP_FWD_STC wxStyledTextEvent; #endif @@ -339,7 +339,7 @@ public: if ( to ) *to = GetSelectionEnd(); } - + // kept for compatibility only void GetSelection(int *from, int *to) { @@ -351,7 +351,7 @@ public: *to = t; } #endif - + virtual bool IsEditable() const { return !GetReadOnly(); } virtual void SetEditable(bool editable) { SetReadOnly(!editable); } -- 2.45.2