Fixes for gcc 2.95 and AIX.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3558 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Michael Bedward
1999-09-03 04:18:50 +00:00
parent 765e386bfa
commit 7a4b8f2770
6 changed files with 23 additions and 9 deletions

View File

@@ -15,6 +15,8 @@
#pragma interface #pragma interface
#endif #endif
class wxStaticBox;
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxStaticLine // wxStaticLine
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -39,8 +39,8 @@ class WXDLLEXPORT wxHelpControllerBase: public wxObject
// Must call this to set the filename and server name. // Must call this to set the filename and server name.
// server is only required when implementing TCP/IP-based // server is only required when implementing TCP/IP-based
// help controllers. // help controllers.
virtual bool Initialize(const wxString& WXUNUSED(file), int WXUNUSED(server) ) { return FALSE; }; virtual bool Initialize(const wxString& WXUNUSED(file), int WXUNUSED(server) ) { return FALSE; }
virtual bool Initialize(const wxString& file) = 0; virtual bool Initialize(const wxString& file) { return FALSE; }
// Set viewer: only relevant to some kinds of controller // Set viewer: only relevant to some kinds of controller
virtual void SetViewer(const wxString& WXUNUSED(viewer), long WXUNUSED(flags) = 0) {} virtual void SetViewer(const wxString& WXUNUSED(viewer), long WXUNUSED(flags) = 0) {}

View File

@@ -142,7 +142,7 @@ MyFrame::MyFrame()
: wxFrame((wxFrame *) NULL, -1, "wxConfig Demo") : wxFrame((wxFrame *) NULL, -1, "wxConfig Demo")
{ {
// submenu // submenu
wxMenu *sub_menu = new wxMenu( wxMENU_TEAROFF ); wxMenu *sub_menu = new wxMenu( wxEmptyString, wxMENU_TEAROFF );
sub_menu->Append(Minimal_About, "&About", "About this sample"); sub_menu->Append(Minimal_About, "&About", "About this sample");
sub_menu->Append(Minimal_About, "&About", "About this sample"); sub_menu->Append(Minimal_About, "&About", "About this sample");
sub_menu->Append(Minimal_About, "&About", "About this sample"); sub_menu->Append(Minimal_About, "&About", "About this sample");

View File

@@ -47,7 +47,7 @@ bool wxStaticLine::Create( wxWindow *parent,
long style, long style,
const wxString &name) const wxString &name)
{ {
if ( !CreateBase(parent, id, pos, size, style, name) ) if ( !CreateBase(parent, id, pos, size, style, wxDefaultValidator, name) )
return FALSE; return FALSE;
// ok, this is ugly but it's better than nothing: use a thin static box to // ok, this is ugly but it's better than nothing: use a thin static box to

View File

@@ -52,18 +52,24 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
else else
m_windowId = id; m_windowId = id;
#if 0 // gcc 2.95 doesn't like this apparently
char* label1 = (label.IsNull() ? "" : (char*) (const char*) label); char* label1 = (label.IsNull() ? "" : (char*) (const char*) label);
XmString text = XmStringCreateSimple (label1); XmString text = XmStringCreateSimple (label1);
#endif
wxXmString text( label );
Widget parentWidget = (Widget) parent->GetClientWidget(); Widget parentWidget = (Widget) parent->GetClientWidget();
XmFontList fontList = (XmFontList) m_font.GetFontList(1.0, XtDisplay(parentWidget)); XmFontList fontList = (XmFontList) m_font.GetFontList(1.0, XtDisplay(parentWidget));
m_mainWidget = (WXWidget) XtVaCreateManagedWidget ("toggle", m_mainWidget = (WXWidget) XtVaCreateManagedWidget ("toggle",
xmToggleButtonWidgetClass, parentWidget, xmToggleButtonWidgetClass, parentWidget,
XmNfontList, fontList, XmNfontList, fontList,
XmNlabelString, text, XmNlabelString, text(),
NULL); NULL);
#if 0
XmStringFree (text); XmStringFree (text);
#endif
XtAddCallback ((Widget) m_mainWidget, XmNvalueChangedCallback, (XtCallbackProc) wxCheckBoxCallback, XtAddCallback ((Widget) m_mainWidget, XmNvalueChangedCallback, (XtCallbackProc) wxCheckBoxCallback,
(XtPointer) this); (XtPointer) this);

View File

@@ -47,14 +47,20 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
m_windowStyle = style; m_windowStyle = style;
m_font = parent->GetFont(); m_font = parent->GetFont();
#if 0 // gcc 2.95 doesn't like this apparently
char* label1 = (label.IsNull() ? "" : (char*) (const char*) label); char* label1 = (label.IsNull() ? "" : (char*) (const char*) label);
#endif
Widget parentWidget = (Widget) parent->GetClientWidget(); Widget parentWidget = (Widget) parent->GetClientWidget();
#if 0 // gcc 2.95 doesn't like this apparently
// Use XmStringCreateLtoR(), since XmStringCreateSimple // Use XmStringCreateLtoR(), since XmStringCreateSimple
// doesn't obey separators. // doesn't obey separators.
// XmString text = XmStringCreateSimple (label1); // XmString text = XmStringCreateSimple (label1);
XmString text = XmStringCreateLtoR (label1, XmSTRING_DEFAULT_CHARSET); XmString text = XmStringCreateLtoR (label1, XmSTRING_DEFAULT_CHARSET);
#endif // 0
XmString text = XmStringCreateLtoR ((char *)(const char*)label, XmSTRING_DEFAULT_CHARSET);
XmFontList fontList = (XmFontList) m_font.GetFontList(1.0, XtDisplay(parentWidget)); XmFontList fontList = (XmFontList) m_font.GetFontList(1.0, XtDisplay(parentWidget));